@ecan-bi/pivot-table 1.0.71 → 1.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DrillModal-36f4c56e.mjs → DrillModal-e9b34ae7.mjs} +3 -3
- package/dist/{DrillModal-36f4c56e.mjs.map → DrillModal-e9b34ae7.mjs.map} +1 -1
- package/dist/{index-d073710e.mjs → index-c36e79f0.mjs} +435 -435
- package/dist/{index-d073710e.mjs.map → index-c36e79f0.mjs.map} +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +2 -2
- package/package.json +2 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @ecan-bi/pivot-table@1.0.
|
|
1
|
+
/*! @ecan-bi/pivot-table@1.0.73 */
|
|
2
2
|
(function(Je,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue"),require("dayjs"),require("lodash-es"),require("axios"),require("ant-design-vue"),require("ant-design-vue/es/input-number/style"),require("ant-design-vue/es/form/style"),require("echarts"),require("vuedraggable")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","lodash-es","axios","ant-design-vue","ant-design-vue/es/input-number/style","ant-design-vue/es/form/style","echarts","vuedraggable"],v):(Je=typeof globalThis<"u"?globalThis:Je||self,v(Je["@ecan-bi/pivot-table"]={},Je.Vue,Je.Dayjs,Je.LodashEs,Je.Axios,Je.AntDesignVue,null,null,Je.Echarts,Je.Draggable))})(this,function(Je,v,Fo,Ue,DB,Gi,nX,oX,OB,Hb){"use strict";function zB(i){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return t.default=i,Object.freeze(t)}const NB=zB(OB),WB=i=>(i.install=t=>{t.component(i.name,i)},i);function Eb(i,t){var e={};for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function"){var o=0;for(n=Object.getOwnPropertySymbols(i);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(i,n[o])&&(e[n[o]]=i[n[o]])}return e}const VB=()=>{},jB=Object.assign,$B=Array.isArray,mf=i=>typeof i=="function",GB=i=>typeof i=="symbol";let Lb;const vf=()=>Lb||(Lb=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function bf(i){const t=i&&i.__v_raw;return t?bf(t):i}function kb(i){return!(!i||i.__v_isRef!==!0)}function Mi(i){return kb(i)?i.value:i}new Set(Object.getOwnPropertyNames(Symbol).filter(i=>i!=="arguments"&&i!=="caller").map(i=>Symbol[i]).filter(GB));const Ur=[];function Cf(i,...t){if(process.env.NODE_ENV==="production")return;const e=Ur.length?Ur[Ur.length-1].component:null,n=e&&e.appContext.config.warnHandler,o=function(){let r=Ur[Ur.length-1];if(!r)return[];const s=[];for(;r;){const l=s[0];l&&l.vnode===r?l.recurseCount++:s.push({vnode:r,recurseCount:0});const a=r.component&&r.component.parent;r=a&&a.vnode}return s}();if(n)yf(n,e,11,[i+t.join(""),e&&e.proxy,o.map(({vnode:r})=>`at <${jb(e,r.type)}>`).join(`
|
|
3
3
|
`),o]);else{const r=[`[Vue warn]: ${i}`,...t];o.length&&r.push(`
|
|
4
4
|
`,...function(s){const l=[];return s.forEach((a,h)=>{l.push(...h===0?[]:[`
|
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
border: 1px solid #E6E8ED;
|
|
307
307
|
}
|
|
308
308
|
`,document.head.appendChild(i)}v9();const Ih="vtable__bubble-tooltip-element",wT=`${Ih}__content`,ST=`${Ih}__triangle`,Il=`${Ih}--hidden`,Dh=`${Ih}--shown`;class b9{constructor(){this._handler=new bc;const t=this._rootElement=To("div",[Ih,Il]),e=To("div",[wT]),n=To("span",[ST]);t.appendChild(n),t.appendChild(e),this._messageElement=t.querySelector(`.${wT}`)||void 0,this._triangleElement=t.querySelector(`.${ST}`)||void 0,t.addEventListener("mousemove",()=>{this._disappearDelayId&&clearTimeout(this._disappearDelayId)}),t.addEventListener("mouseleave",()=>{this._disappearDelay=void 0,this.unbindFromCell()}),e.addEventListener("wheel",o=>{o.stopPropagation()}),e.addEventListener("copy",o=>{u4(e)&&o.stopPropagation()})}bindToCell(t,e,n,o,r){var s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A;this._disappearDelay=o==null?void 0:o.disappearDelay,this._disappearDelayId&&clearTimeout(this._disappearDelayId);const x=this._rootElement,T=this._messageElement,M=this._triangleElement;if(x==null||x.classList.remove(Dh),x==null||x.classList.add(Il),this._canBindToCell(t,e,n)){if(T.setAttribute("style",""),M.setAttribute("style",""),o!=null&&o.className&&x.classList.add(o.className),!((s=o==null?void 0:o.style)===null||s===void 0)&&s.bgColor&&(T.style.backgroundColor=(l=o==null?void 0:o.style)===null||l===void 0?void 0:l.bgColor),!((a=o==null?void 0:o.style)===null||a===void 0)&&a.bgColor&&(M.style.backgroundColor=(h=o==null?void 0:o.style)===null||h===void 0?void 0:h.bgColor),M.style.display=((d=o==null?void 0:o.style)===null||d===void 0?void 0:d.arrowMark)===!0?"block":"none",!((u=o==null?void 0:o.style)===null||u===void 0)&&u.fontSize&&(T.style.fontSize=((g=(c=o==null?void 0:o.style)===null||c===void 0?void 0:c.fontSize)!==null&&g!==void 0?g:12)+"px"),!((f=o==null?void 0:o.style)===null||f===void 0)&&f.fontFamily&&(T.style.fontFamily=(p=o==null?void 0:o.style)===null||p===void 0?void 0:p.fontFamily),!((m=o==null?void 0:o.style)===null||m===void 0)&&m.color&&(T.style.color=(b=o==null?void 0:o.style)===null||b===void 0?void 0:b.color),!((C=o==null?void 0:o.style)===null||C===void 0)&&C.padding&&(T.style.padding=`${(_=o==null?void 0:o.style)===null||_===void 0?void 0:_.padding.join("px ")}px`),!((w=o==null?void 0:o.style)===null||w===void 0)&&w.maxHeight&&(T.style.maxHeight=`${(y=o==null?void 0:o.style)===null||y===void 0?void 0:y.maxHeight}px`),!((S=o==null?void 0:o.style)===null||S===void 0)&&S.maxWidth&&(T.style.maxWidth=`${(R=o==null?void 0:o.style)===null||R===void 0?void 0:R.maxWidth}px`),T&&(T.textContent=o==null?void 0:o.content),this._bindToCell(t,e,n,o==null?void 0:o.position,o==null?void 0:o.referencePosition,r,(A=o==null?void 0:o.style)===null||A===void 0?void 0:A.arrowMark))return x==null||x.classList.add(Dh),x==null||x.classList.remove(Il),!0}else this.unbindFromCell();return!1}release(){var t,e;this.unbindFromCell();const n=this._rootElement;n!=null&&n.parentElement&&n.parentElement.removeChild(n),(e=(t=this._handler)===null||t===void 0?void 0:t.release)===null||e===void 0||e.call(t),delete this._rootElement,delete this._messageElement}move(t,e,n,o,r){const s=this._rootElement;this._canBindToCell(t,e,n)?(this._bindToCell(t,e,n,o==null?void 0:o.position,o==null?void 0:o.referencePosition,r),s==null||s.classList.add(Dh),s==null||s.classList.remove(Il)):this.unbindFromCell()}unbindFromCell(){var t;if(this._disappearDelay)this._disappearDelayId=setTimeout(()=>{const e=this._rootElement;e!=null&&e.parentElement&&(e.classList.remove(Dh),e.classList.add(Il))},(t=this._disappearDelay)!==null&&t!==void 0?t:0);else{const e=this._rootElement;e!=null&&e.parentElement&&(e.classList.remove(Dh),e.classList.add(Il))}}_canBindToCell(t,e,n){const o=t.getCellRangeRelativeRect({col:e,row:n}),r=t.getElement(),{bottom:s,left:l,right:a,top:h}=o;if(t.isFrozenCell(e,n))return!0;if(s<t.getFrozenRowsHeight()||a<t.getFrozenColsWidth()||l>t.tableNoFrameWidth-t.getRightFrozenColsWidth()||h>t.tableNoFrameHeight-t.getBottomFrozenRowsHeight())return!1;const{offsetHeight:d,offsetWidth:u}=r;return!(h>d)&&!(l>u)}_bindToCell(t,e,n,o,r,s,l){const a=this._rootElement,h=t.getCellRangeRelativeRect({col:e,row:n}),d=t.internalProps.tooltip.parentElement,u=t.internalProps.element.offsetWidth,{width:c}=h;if(a){let g,f;a.parentElement!==d&&d.appendChild(a),a.style.left="0px";const p=Math.min(.8*u,4*c);a.style.maxWidth=`${p}px`;const m=a.clientWidth,b=a.clientHeight;if(!o&&!r)return!1;{const T=this.getComputedPosition(t,e,n,o,r,s,l);f=T.x,g=T.y}a.style.left=`${f}px`,a.style.top=`${g}px`,sm()&&(a.style.fontSize="11px");const{x1:C,x2:_,y1:w,y2:y}=t.stateManager.menu.bounds,S=f,R=S+m,A=g,x=S+b;return!(t.stateManager.menu.isShow&&C<R&&_>S&&y>A&&w<x)}return!1}getComputedPosition(t,e,n,o,r,s,l){var a;const h=this._rootElement,d=t.getCellRangeRelativeRect({col:e,row:n}),{x:u,y:c}=t.internalProps.tooltip.parentElement.getBoundingClientRect(),{width:g,height:f,x:p,y:m}=t.internalProps.element.getBoundingClientRect(),{width:b}=d;let C,_;const w=Math.min(.8*g,4*b);h.style.maxWidth=`${w}px`;const y=h.clientWidth,S=h.clientHeight,R=l?6:0;if(o)_=o.x,C=o.y+R,this._triangleElement.style.left="50%",this._triangleElement.style.marginLeft="-5px",this._triangleElement.style.top="-5px";else if(r){let A=(a=r.placement)!==null&&a!==void 0?a:nn.bottom;const x=r.rect.left+r.rect.width/2,T=r.rect.top+r.rect.height/2,M=r.rect.top,B=r.rect.bottom,P=r.rect.left,F=r.rect.right;let H=0;const E=()=>{H++,H>=4||(this.removeStyleFromTriangle(),A===nn.top?(_=x-y/2,C=M-S-R,this._triangleElement.style.left="50%",this._triangleElement.style.marginLeft="-5px",this._triangleElement.style.bottom="-5px",s&&C<0&&(A=nn.right,E())):A===nn.bottom?(_=x-y/2,C=B+R,this._triangleElement.style.left="50%",this._triangleElement.style.marginLeft="-5px",this._triangleElement.style.top="-5px",s&&C+S>f&&(A=nn.left,E())):A===nn.left?(C=T-S/2,_=P-y-R,this._triangleElement.style.top="50%",this._triangleElement.style.marginTop="-5px",this._triangleElement.style.right="-5px",s&&_<0&&(A=nn.top,E())):A===nn.right&&(C=T-S/2,_=F+R,this._triangleElement.style.top="50%",this._triangleElement.style.marginTop="-5px",this._triangleElement.style.left="-5px",s&&_+y>g&&(A=nn.bottom,E())))};E()}return s&&(_<0?_=0:_+h.offsetWidth>g&&(_=g-h.offsetWidth)),{x:_+p-u,y:C+m-c}}removeStyleFromTriangle(){this._triangleElement.style.left="",this._triangleElement.style.right="",this._triangleElement.style.top="",this._triangleElement.style.bottom="",this._triangleElement.style.marginLeft="",this._triangleElement.style.marginTop=""}_locate(t,e,n,o,r,s){const l=this.getComputedPosition(t,e,n,o,r,s),a=l.x,h=l.y;this._rootElement.style.left=`${a}px`,this._rootElement.style.top=`${h}px`}}class C9 extends m9{createTooltipElementInternal(){return new b9}}const y9={"bubble-tooltip":function(i){return new C9(i)}};class _9{constructor(t,e){this._table=t,this._tooltipInstances={},this._bindTableEvent(t),this.confine=e}release(){var t,e;const n=this._tooltipInstances;for(const o in n)(e=(t=n[o])===null||t===void 0?void 0:t.release)===null||e===void 0||e.call(t);delete this._tooltipInstances,this._attachInfo=null}_bindToCell(t,e,n){var o;const r=this._attachInfo,s=this._getTooltipInstanceInfo(t,e);if(!r||s&&r.instance===s||((o=r.instance)===null||o===void 0||o.unbindTooltipElement(),this._attachInfo=null),!!s&&s&&s.bindTooltipElement(t,e,n,this.confine)){const l=this._table.getCellRange(t,e);this._attachInfo={range:l,instance:s,tooltipOptions:n}}}_move(t,e,n){const o=this._attachInfo;if(!o||!qi(o.range,t,e))return;const{instance:r}=o;r==null||r.moveTooltipElement(t,e,n,this.confine)}moveToPosition(t,e,n,o){const r=this._attachInfo;if(!r||!qi(r.range,t,e))return;const{instance:s}=r;this._attachInfo.tooltipOptions.position=n,this._attachInfo.tooltipOptions.referencePosition=o,s==null||s.locateTooltipElement(t,e,n,o,this.confine)}_unbindFromCell(){const t=this._attachInfo;if(!t)return;const{instance:e}=t;e==null||e.unbindTooltipElement(),this._attachInfo=null}_isBindCell(t,e){const n=this._attachInfo;return!!n&&qi(n.range,t,e)}_bindTableEvent(t){t.on(lt.MOUSEENTER_CELL,e=>{if(sm())return;const{x1:n,x2:o,y1:r,y2:s}=t.stateManager.menu.bounds;if(t.stateManager.menu.isShow&&typeof e.x=="number"&&typeof e.y=="number"&&e.x>n&&e.x<o&&e.y>r&&e.y<s)return;const{col:l,row:a}=e;this.showTooltip(l,a)}),t.on(lt.MOUSEMOVE_CELL,e=>{var n,o;if(!sm()){if(!((o=(n=this._attachInfo)===null||n===void 0?void 0:n.tooltipOptions)===null||o===void 0)&&o.referencePosition){const r=this._attachInfo.tooltipOptions.referencePosition,{event:s}=e,{left:l,right:a,top:h,bottom:d}=r.rect,u=t._getMouseAbstractPoint(s,!1);u.inTable&&u.x>=l-5&&u.x<=a+5&&u.y>=h-5&&u.y<=d+5||this._unbindFromCell()}this._attachInfo&&t.stateManager.menu.isShow&&this._bindToCell(e.col,e.row)}}),t.on(lt.MOUSELEAVE_CELL,e=>{this._unbindFromCell()}),t.on(lt.SELECTED_CELL,e=>{this._isBindCell(e.col,e.row)&&this._unbindFromCell()}),t.on(lt.MOUSELEAVE_TABLE,e=>{this._unbindFromCell()}),t.on(lt.SCROLL,e=>{this._unbindFromCell()})}showTooltip(t,e){var n,o,r;let s;const l=this._table,a=l.getHeaderDescription(t,e);if(a){const h=l.getCellRangeRelativeRect({col:t,row:e});s={content:a,referencePosition:{placement:nn.bottom,rect:h},disappearDelay:(n=l.internalProps.tooltip.overflowTextTooltipDisappearDelay)!==null&&n!==void 0?n:0,style:l.theme.tooltipStyle}}else if(ce((o=l.internalProps.tooltip)===null||o===void 0?void 0:o.isShowOverflowTextTooltip)?l.internalProps.tooltip.isShowOverflowTextTooltip(t,e,l):l.internalProps.tooltip.isShowOverflowTextTooltip){const h=l.getCellOverflowText(t,e),d=l.getCellRangeRelativeRect({col:t,row:e});h&&(s={content:a?`${a}
|
|
309
|
-
${h}`:h,referencePosition:{placement:nn.bottom,rect:d},disappearDelay:(r=l.internalProps.tooltip.overflowTextTooltipDisappearDelay)!==null&&r!==void 0?r:0,style:l.theme.tooltipStyle})}s?this._bindToCell(t,e,s):this._unbindFromCell()}_getTooltipInstanceInfo(t,e){const n=this._table,o=this._tooltipInstances;return o&&o["bubble-tooltip"]||o&&(o["bubble-tooltip"]=y9["bubble-tooltip"](n))}isBinded(t){var e;return JSON.stringify(t)===JSON.stringify((e=this._attachInfo)===null||e===void 0?void 0:e.tooltipOptions)}}const Pg=()=>{Et.registerComponent("axis",UV),Et.registerFunction("computeAxisComponentWidth",XV),Et.registerFunction("computeAxisComponentHeight",qV),Et.registerFunction("getAxisConfigInPivotChart",V8)},Hg=()=>{Et.registerComponent("emptyTip",JV)},Eg=()=>{Et.registerFunction("createLegend",a9)},Lg=()=>{Et.registerComponent("menuHandler",f9)},kg=()=>{Et.registerComponent("title",p9)},Fg=()=>{Et.registerComponent("tooltipHandler",_9)};class w9{constructor(t){this.titleRows=[],this.showedTitleRows=[],this.rowNow=-1,this.skipStartRow=-1,this.skipEndRow=-1,this.table=t,this.table.on("scroll",e=>{e.scrollDirection==="vertical"&&this.updateGroupTitle()}),this.table.on("resize_column",e=>{this.updateGroupTitle()})}updateGroupTitle(){this.table.scrollTop===0?(this.titleRows=[],this.showedTitleRows=[]):this.skipStartRow!==-1&&this.skipEndRow!==-1&&this.skipStartRow!==this.table.scenegraph.proxy.bodyTopRow-1?(this.table.scenegraph.proxy.screenTopRow<=this.skipStartRow||this.table.scenegraph.proxy.screenTopRow>=this.skipEndRow)&&(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()):(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()),this.updateScenegraph()}updateGroupTitleInfo(){this.rowNow=this.table.scenegraph.proxy.screenTopRow+this.titleRows.length;const t=this.table.getRecordIndexByCell(0,this.rowNow),e=this.table.getRecordIndexByCell(0,this.rowNow+1);this.getTitleRowsByRecordIndex(t,e)}getTitleRowsByRecordIndex(t,e){st(t)||(t=[t]),st(e)||(e=[e]);for(let l=0;l<t.length;l++){const a=t.slice(0,l+1);this.table.dataSource.getRaw(a)}const n=[],o=e.length===t.length+1;let r=t.slice(0,o?t.length:t.length-1);const s=this.table.dataSource.currentIndexedData;for(let l=this.rowNow-this.table.columnHeaderLevelCount;l>=0;l--){const a=s[l];if(st(a)&&r.length===a.length){let h=!0;for(let d=0;d<a.length;d++)if(a[d]!==r[d]){h=!1;break}h&&(n.push(l+this.table.columnHeaderLevelCount),r=r.slice(0,r.length-1))}else if(a===t[0]){n.push(l+this.table.columnHeaderLevelCount);break}}this.titleRows=n.reverse()}updateScenegraph(){const{table:t}=this,{shadowGroup:e,shadowGroupFrozen:n}=x9(t);this.showedTitleRows.length=0;let o=0;for(let r=0;r<t.colCount;r++){let s;r<t.frozenColCount?(s=new ue({x:t.getColsWidth(0,r-1),y:t.getFrozenRowsHeight()}),n.add(s)):(s=new ue({x:t.getColsWidth(t.frozenColCount,r-1),y:t.getFrozenRowsHeight()}),e.add(s)),s.col=r;for(let l=0;l<this.titleRows.length;l++){const a=this.titleRows[l];if(S9(a,this.rowNow,t.scenegraph.proxy.screenTopRow,this.titleRows)){r===0&&o++;continue}r===0&&this.showedTitleRows.push(a);const h=t.scenegraph.getCell(r,a);if(h.role==="cell"){const d=xT(h);d.setAttributes({y:40*l}),s.add(d)}else{const d=xo(r,a,t,!0,!0);d.setAttributes({y:40*l}),s.add(d)}}}o>0&&this.skipStartRow===-1&&this.skipEndRow===-1&&(this.skipStartRow=t.scenegraph.proxy.screenTopRow-1,this.skipEndRow=t.scenegraph.proxy.screenTopRow+1)}}function S9(i,t,e,n){return i===t&&i!==e+n.length-1?!0:i===e+n.indexOf(i)+1&&i<t}function xT(i){const t=i.clone();if(t.role=i.role,t.col=i.col,t.row=i.row,t.mergeStartCol=i.mergeStartCol,t.mergeStartRow=i.mergeStartRow,t.mergeEndCol=i.mergeEndCol,t.mergeEndRow=i.mergeEndRow,t.contentWidth=i.contentWidth,t.contentHeight=i.contentHeight,t.role==="cell"){const e=Ie({x:0,y:0,width:t.attribute.width,height:t.attribute.height});t.add(e)}if(i.type==="group"){const e=t;i.forEachChildren(n=>{const o=xT(n);e.add(o)})}return t}function x9(i){const t=i.scenegraph.colHeaderGroup,e=i.scenegraph.cornerHeaderGroup;if(!t.border){const r=Ie({x:0,y:0,width:0,height:0,cursor:"pointer"});t.add(r),t.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=Lr(a),{col:d,row:u}=h;AT(u-l.indexOf(u),i)})}if(!e.border){const r=Ie({x:0,y:0,width:0,height:0,cursor:"pointer"});e.add(r),e.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=Lr(a),{col:d,row:u}=h;AT(u-l.indexOf(u),i)})}const n=t.border.shadowRoot,o=e.border.shadowRoot;return n.removeAllChild(),o.removeAllChild(),{shadowGroup:n,shadowGroupFrozen:o}}function AT(i,t){const e=t.getDrawRange();if(z(i)&&i>=t.frozenRowCount){const n=t.getFrozenRowsHeight(),o=t.getRowsHeight(0,i-1);t.scrollTop=Math.min(o-n,t.getAllRowsHeight()-e.height)-1}t.scenegraph.updateNextFrame()}const A9=()=>{Et.registerComponent("listTreeStickCellPlugin",w9)},R9={};function T9(){return rh(R9,wg)}function M9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C){var _,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j;const G=T9()[d],Z=f._getCellStyle(o,r),et=Fc("padding",Z,o,r,f);if(z(et)&&(a=et),!i){const gt=xs(o,r,p,f);b&&(i=f.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(w=(_=p==null?void 0:p.group)===null||_===void 0?void 0:_.lineWidth)!==null&&w!==void 0?w:void 0,fill:(S=(y=p==null?void 0:p.group)===null||y===void 0?void 0:y.fill)!==null&&S!==void 0?S:void 0,stroke:(A=(R=p==null?void 0:p.group)===null||R===void 0?void 0:R.stroke)!==null&&A!==void 0?A:void 0,strokeArrayWidth:gt,strokeArrayColor:(T=(x=p==null?void 0:p.group)===null||x===void 0?void 0:x.strokeArrayColor)!==null&&T!==void 0?T:void 0,cursor:(B=(M=p==null?void 0:p.group)===null||M===void 0?void 0:M.cursor)!==null&&B!==void 0?B:void 0,lineDash:(F=(P=p==null?void 0:p.group)===null||P===void 0?void 0:P.lineDash)!==null&&F!==void 0?F:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius}),i&&i.role==="cell"||((i=new ue({x:e,y:n,width:s,height:l,lineWidth:(E=(H=p==null?void 0:p.group)===null||H===void 0?void 0:H.lineWidth)!==null&&E!==void 0?E:void 0,fill:(I=(k=p==null?void 0:p.group)===null||k===void 0?void 0:k.fill)!==null&&I!==void 0?I:void 0,stroke:(D=(L=p==null?void 0:p.group)===null||L===void 0?void 0:L.stroke)!==null&&D!==void 0?D:void 0,strokeArrayWidth:gt,strokeArrayColor:(W=(O=p==null?void 0:p.group)===null||O===void 0?void 0:O.strokeArrayColor)!==null&&W!==void 0?W:void 0,cursor:($=(N=p==null?void 0:p.group)===null||N===void 0?void 0:N.cursor)!==null&&$!==void 0?$:void 0,lineDash:(Y=(U=p==null?void 0:p.group)===null||U===void 0?void 0:U.lineDash)!==null&&Y!==void 0?Y:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}if(i.AABBBounds.width(),C&&Array.isArray(f.getCellValue(o,r))||!C){const gt=new Rl(m,{stroke:!1,x:a[3],y:a[0],canvas:(j=f.canvas)!==null&&j!==void 0?j:f.scenegraph.stage.window.getContext().canvas,mode:f.options.mode,modeParams:f.options.modeParams,spec:u,ClassType:G,width:s-a[3]-a[1],height:l-a[2]-a[0],chartInstance:c,dataId:g,data:f.getCellValue(o,r)||[],cellPadding:a,dpr:f.internalProps.pixelRatio,axes:f.isPivotChart()?f.internalProps.layoutMap.getChartAxes(o,r):[],tableChartOption:f.options.chartOption});i.appendChild(gt),f.internalProps.layoutMap.setChartInstance(o,r,gt.chartInstance)}return i}function B9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b){var C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U;if(!i){const et=xs(o,r,f,g);b&&(i=g.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:l,height:a,lineWidth:(_=(C=f==null?void 0:f.group)===null||C===void 0?void 0:C.lineWidth)!==null&&_!==void 0?_:void 0,fill:(y=(w=f==null?void 0:f.group)===null||w===void 0?void 0:w.fill)!==null&&y!==void 0?y:void 0,stroke:(R=(S=f==null?void 0:f.group)===null||S===void 0?void 0:S.stroke)!==null&&R!==void 0?R:void 0,strokeArrayWidth:et,strokeArrayColor:(x=(A=f==null?void 0:f.group)===null||A===void 0?void 0:A.strokeArrayColor)!==null&&x!==void 0?x:void 0,cursor:(M=(T=f==null?void 0:f.group)===null||T===void 0?void 0:T.cursor)!==null&&M!==void 0?M:void 0,lineDash:(P=(B=f==null?void 0:f.group)===null||B===void 0?void 0:B.lineDash)!==null&&P!==void 0?P:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),i&&i.role==="cell"||((i=new ue({x:e,y:n,width:l,height:a,lineWidth:(H=(F=f==null?void 0:f.group)===null||F===void 0?void 0:F.lineWidth)!==null&&H!==void 0?H:void 0,fill:(k=(E=f==null?void 0:f.group)===null||E===void 0?void 0:E.fill)!==null&&k!==void 0?k:void 0,stroke:(L=(I=f==null?void 0:f.group)===null||I===void 0?void 0:I.stroke)!==null&&L!==void 0?L:void 0,strokeArrayWidth:et,strokeArrayColor:(O=(D=f==null?void 0:f.group)===null||D===void 0?void 0:D.strokeArrayColor)!==null&&O!==void 0?O:void 0,cursor:(N=(W=f==null?void 0:f.group)===null||W===void 0?void 0:W.cursor)!==null&&N!==void 0?N:void 0,lineDash:(U=($=f==null?void 0:f.group)===null||$===void 0?void 0:$.lineDash)!==null&&U!==void 0?U:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}let Y;if(c){let et=o,gt=r;m&&(et=m.start.col,gt=m.start.row),Y=g.getCellIcons(et,gt)}let j=0,G=0;if(Array.isArray(Y)&&Y.length!==0){const{leftIconWidth:et,rightIconWidth:gt,absoluteLeftIconWidth:vt,absoluteRightIconWidth:it}=zc(Y,i,m,g);j=et+gt,G=et,i.forEachChildren(nt=>{nt.role==="icon-left"?nt.setAttribute("x",nt.attribute.x+h[3]):nt.role==="icon-right"?nt.setAttribute("x",nt.attribute.x+l-gt-h[1]):nt.role==="icon-absolute-right"&&nt.setAttribute("x",nt.attribute.x+l-it-h[1])}),i.forEachChildren(nt=>{u==="middle"?nt.setAttribute("y",(a-nt.AABBBounds.height())/2):u==="bottom"?nt.setAttribute("y",a-nt.AABBBounds.height()-h[2]):nt.setAttribute("y",h[0])})}const Z=P9(o,r,s-j,l,a,h,f,p,g);return Z&&i.appendChild(Z),Z.render(),l-=h[1]+h[3]+j,a-=h[0]+h[2],d==="center"?Z.setAttribute("x",h[3]+G+(l-Z.AABBBounds.width())/2):d==="right"?Z.setAttribute("x",h[3]+G+l-Z.AABBBounds.width()):Z.setAttribute("x",h[3]+G),u==="middle"?Z.setAttribute("y",h[0]+(a-Z.AABBBounds.height())/2):u==="bottom"?Z.setAttribute("y",h[0]+a-Z.AABBBounds.height()):Z.setAttribute("y",h[0]),i}function P9(i,t,e,n,o,r,s,l,a){var h,d,u,c;const g=a._getCellStyle(i,t),f=wt("size",g,i,t,a),p=wt("spaceBetweenTextAndIcon",g,i,t,a),m=wt("defaultFill",g,i,t,a),b=wt("defaultStroke",g,i,t,a),C=wt("disableFill",g,i,t,a),_=wt("checkedFill",g,i,t,a),w=wt("checkedStroke",g,i,t,a),y=wt("disableCheckedFill",g,i,t,a),S=wt("disableCheckedStroke",g,i,t,a),R=wt("checkIconImage",g,i,t,a),A=wt("indeterminateIconImage",g,i,t,a),x=a.getCellValue(i,t),T=a.getCellOriginValue(i,t);let M,B,P=(h=x)!==null&&h!==void 0?h:"";pe(x)?(M=x.checked,B=x.disable,P=(d=x.text)!==null&&d!==void 0?d:""):typeof x=="boolean"&&(M=x,P=""),M=a.stateManager.syncCheckedState(i,t,l.field,M);const F=uo(i,t,a),H=a._getCellStyle(i,t),E=(u=H.autoWrapText)!==null&&u!==void 0?u:a.internalProps.autoWrapText,{lineClamp:k}=H,{checked:I,disable:L}=l;if(M==null||typeof M=="function"){const Y=ii(I,{col:i,row:t,table:a,context:null,value:x,dataValue:T});M=a.stateManager.syncCheckedState(i,t,l.field,Y)}const D=ii(L,{col:i,row:t,table:a,context:null,value:x,dataValue:T}),O=e==="auto",W=a.isAutoRowHeight(t),N={text:P.length===1?P[0]:P,maxLineWidth:O?1/0:n-(r[1]+r[3]+F)-f-p,textBaseline:"top",autoWrapText:E,lineClamp:k,wordBreak:"break-word",heightLimit:W?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:F,whiteSpace:P.length!==1||E?"normal":"no-wrap"},$={x:0,y:0,text:s.text?Object.assign({},s.text,N):N,icon:{width:Math.floor(f/1.4),height:Math.floor(f/1.4)},box:{width:f,height:f},spaceBetweenTextAndIcon:p,disabled:(c=B??D)!==null&&c!==void 0&&c};M==="indeterminate"?($.checked=void 0,$.indeterminate=!0):($.checked=M,$.indeterminate=void 0),m&&($.box.fill=m),b&&($.box.stroke=b),C&&($.box.disableFill=C),_&&($.box.checkedFill=_),w&&($.box.checkedStroke=w),y&&($.box.disableCheckedFill=y),S&&($.box.disableCheckedStroke=S),R&&($.icon.checkIconImage=R),A&&($.icon.indeterminateIconImage=A);const U=new Tr($);return U.name="checkbox",U}function H9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f){var p,m,b,C,_,w,y,S,R,A,x,T;if(!i){const P=xs(o,r,g,c);(i=new ue({x:e,y:n,width:l,height:a,lineWidth:(m=(p=g==null?void 0:g.group)===null||p===void 0?void 0:p.lineWidth)!==null&&m!==void 0?m:void 0,fill:(C=(b=g==null?void 0:g.group)===null||b===void 0?void 0:b.fill)!==null&&C!==void 0?C:void 0,stroke:(w=(_=g==null?void 0:g.group)===null||_===void 0?void 0:_.stroke)!==null&&w!==void 0?w:void 0,strokeArrayWidth:P,strokeArrayColor:(S=(y=g==null?void 0:g.group)===null||y===void 0?void 0:y.strokeArrayColor)!==null&&S!==void 0?S:void 0,cursor:(A=(R=g==null?void 0:g.group)===null||R===void 0?void 0:R.cursor)!==null&&A!==void 0?A:void 0,lineDash:(T=(x=g==null?void 0:g.group)===null||x===void 0?void 0:x.lineDash)!==null&&T!==void 0?T:void 0,lineCap:"butt",clip:!0,cornerRadius:g.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i)}const{width:M,height:B}=E9(o,r,s,l,a,h,g,f,i,c);return l-=h[1]+h[3],a-=h[0]+h[2],i.forEachChildren(P=>{d==="center"?P.setAttribute("x",h[3]+P.attribute.x+(l-M)/2):d==="right"?P.setAttribute("x",h[3]+P.attribute.x+l-M):P.setAttribute("x",h[3]+P.attribute.x),u==="middle"?P.setAttribute("y",h[0]+P.attribute.y+(a-B)/2):u==="bottom"?P.setAttribute("y",h[0]+P.attribute.y+a-B):P.setAttribute("y",h[0]+P.attribute.y)}),i}function E9(i,t,e,n,o,r,s,l,a,h){var d,u;const c=h._getCellStyle(i,t);let g=wt("size",c,i,t,h),f=wt("innerRadius",c,i,t,h),p=wt("outerRadius",c,i,t,h);const m=wt("spaceBetweenTextAndIcon",c,i,t,h),b=wt("spaceBetweenRadio",c,i,t,h),C=wt("defaultFill",c,i,t,h),_=wt("defaultStroke",c,i,t,h),w=wt("disableFill",c,i,t,h),y=wt("checkedFill",c,i,t,h),S=wt("checkedStroke",c,i,t,h),R=wt("disableCheckedFill",c,i,t,h),A=wt("disableCheckedStroke",c,i,t,h);pt(p)?g=2*p:p=Math.round(g/2),(!pt(f)||f<0)&&(f=Math.round(p/7*3));const x=h.getCellValue(i,t),T=h.getCellOriginValue(i,t),M=uo(i,t,h),B=h._getCellStyle(i,t),P=(d=B.autoWrapText)!==null&&d!==void 0?d:h.internalProps.autoWrapText,{lineClamp:F}=B,H=e==="auto",E=h.heightMode==="autoHeight",k={maxLineWidth:H?1/0:n-(r[1]+r[3]+M)-g-m,textBaseline:"top",autoWrapText:P,lineClamp:F,wordBreak:"break-word",heightLimit:E?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:M},I={x:0,y:0,text:s.text?Object.assign({},s.text,k):k,circle:{innerRadius:f,outerRadius:p},spaceBetweenTextAndIcon:m};C&&(I.circle.fill=C),_&&(I.circle.stroke=_),w&&(I.circle.disableFill=w),y&&(I.circle.checkedFill=y),S&&(I.circle.checkedStroke=S),R&&(I.circle.disableCheckedFill=R),A&&(I.circle.disableCheckedStroke=A);let L=0,D=0;const O=(u=l.radioDirectionInCell)!==null&&u!==void 0?u:"vertical";if(st(x))x.forEach((W,N)=>{const $=RT(W,T,N,i,t,l,P,I,h);$&&a.appendChild($),$.id=`radio-${i}-${t}-${N}`,$.render();const U=$.AABBBounds;O==="vertical"?($.setAttribute("y",D),D+=U.height()+(N!==x.length-1?b:0),L=Math.max(L,U.width())):O==="horizontal"&&($.setAttribute("x",L),L+=U.width()+(N!==x.length-1?b:0),D=Math.max(D,U.height()))});else{const W=RT(x,T,void 0,i,t,l,P,I,h);W&&a.appendChild(W),W.id=`radio-${i}-${t}`,W.render();const N=W.AABBBounds;L=N.width(),D=N.height()}return{width:L,height:D}}function RT(i,t,e,n,o,r,s,l,a){const h=L9(i,t,e,n,o,r,a),d=k9(i,t,n,o,r,a),u=pe(i)?i.text:vi(i)?"":i??"",c=xt({},l,{checked:h,disabled:d,text:{text:u.length===1?u[0]:u,whiteSpace:u.length!==1||s?"normal":"no-wrap"},boundsPadding:0}),g=new eh(c);return g.name="radio",g}function L9(i,t,e,n,o,r,s){var l,a;const h=(l=r.radioCheckType)!==null&&l!==void 0?l:"column";let d,u;return pe(i)?d=i.checked:typeof i=="boolean"&&(d=i),d=s.stateManager.syncRadioState(n,o,r.field,h,e,d),d!=null&&typeof d!="function"||(u=ii(r.checked,{col:n,row:o,table:s,context:null,value:i,dataValue:t}),d=s.stateManager.syncRadioState(n,o,r.field,h,e,u)),(a=d??u)!==null&&a!==void 0&&a}function k9(i,t,e,n,o,r){var s;let l;pe(i)&&(l=i.disable);const a=ii(o.disable,{col:e,row:n,table:r,context:null,value:i,dataValue:t});return(s=l??a)!==null&&s!==void 0&&s}const zr=new sz,Nr=new cs;function F9(i,t,e,n,o,r,s,l,a,h,d,u){var c,g,f,p,m,b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L;if(!i){const O=xs(o,r,d,h);u&&(i=h.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(g=(c=d==null?void 0:d.group)===null||c===void 0?void 0:c.lineWidth)!==null&&g!==void 0?g:void 0,fill:(p=(f=d==null?void 0:d.group)===null||f===void 0?void 0:f.fill)!==null&&p!==void 0?p:void 0,stroke:(b=(m=d==null?void 0:d.group)===null||m===void 0?void 0:m.stroke)!==null&&b!==void 0?b:void 0,strokeArrayWidth:O,strokeArrayColor:(_=(C=d==null?void 0:d.group)===null||C===void 0?void 0:C.strokeArrayColor)!==null&&_!==void 0?_:void 0,cursor:(y=(w=d==null?void 0:d.group)===null||w===void 0?void 0:w.cursor)!==null&&y!==void 0?y:void 0,lineDash:(R=(S=d==null?void 0:d.group)===null||S===void 0?void 0:S.lineDash)!==null&&R!==void 0?R:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius}),i&&i.role==="cell"||((i=new ue({x:e,y:n,width:s,height:l,lineWidth:(x=(A=d==null?void 0:d.group)===null||A===void 0?void 0:A.lineWidth)!==null&&x!==void 0?x:void 0,fill:(M=(T=d==null?void 0:d.group)===null||T===void 0?void 0:T.fill)!==null&&M!==void 0?M:void 0,stroke:(P=(B=d==null?void 0:d.group)===null||B===void 0?void 0:B.stroke)!==null&&P!==void 0?P:void 0,strokeArrayWidth:O,strokeArrayColor:(H=(F=d==null?void 0:d.group)===null||F===void 0?void 0:F.strokeArrayColor)!==null&&H!==void 0?H:void 0,cursor:(k=(E=d==null?void 0:d.group)===null||E===void 0?void 0:E.cursor)!==null&&k!==void 0?k:void 0,lineDash:(L=(I=d==null?void 0:d.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}const D=I9(o,r,s,l,a,h);return D&&i.appendChild(D),i}function I9(i,t,e,n,o,r){let s,l;const a=r.internalProps.layoutMap.getBody(i,t).sparklineSpec,h=r.getCellValue(i,t);if(!Array.isArray(h))return;const d=o[3],u=o[0];e-=o[1]+o[3];const c=n-=o[0]+o[2];if(typeof a=="function"){const _={col:i,row:t,dataValue:r.getCellOriginValue(i,t)||"",value:r.getCellValue(i,t)||"",rect:r.getCellRangeRelativeRect(r.getCellRange(i,t)),table:r};s=a(_),l=TT(s,d,u,e,n)}else s=a,l=TT(a,d,u,e,n);const g=[],f=[];let p,m;if(typeof s.xField=="object")zr.domain(s.xField.domain),p=s.xField.field;else if(typeof s.xField=="string"){const _=h.map(w=>w[s.xField]);zr.domain(_),p=s.xField}else Array.isArray(h)&&(zr.domain(Array.from({length:h.length},(_,w)=>w)),p=s.xField);if(zr.range([0,e]),typeof s.yField=="object")Nr.domain(s.yField.domain),m=s.yField.field;else if(typeof s.yField=="string"){const _=MT(h,s.yField);Nr.domain([Math.min(..._),Math.max(..._)]),m=s.yField}else if(Array.isArray(h)){const _=MT(h);Nr.domain([Math.min(..._),Math.max(..._)]),m=s.yField}if(Nr.range([0,n]),typeof s.xField=="object"&&Array.isArray(s.xField.domain)){const _=h.map(y=>y[s.xField.field]),w=s.xField.domain;for(let y=0;y<w.length;y++){let S=!1;for(let R=0;R<_.length;R++)if(w[y]===_[R]){const A=h[R];if(!z(A[p])||!z(A[m]))break;g.push({x:0+zr.scale(A[p]),y:c-Nr.scale(A[m]),defined:z(A[m])}),f.push(A),S=!0;break}S||(g.push({x:0+zr.scale(w[y]),y:0,defined:!1}),f.push({[p]:w[y],[m]:null}))}}else for(let _=0;_<h.length;_++){const w=h[_];g.push({x:0+zr.scale(p?w[p]:_),y:c-Nr.scale(m?w[m]:w),defined:z(m?w[m]:w),rawData:w}),f.push(w)}const b=l.getChildByName("sparkline-line");b&&b.setAttribute("points",g),b.bandwidth=zr.step(),b.min=Nr.range()[0],b.max=Nr.range()[1];const C=l.getChildByName("sparkline-symbol-group");if(C){const _=s.pointShowRule==="isolatedPoint";if(s.pointShowRule==="all")for(let w=0;w<g.length;w++){const{x:y,y:S,defined:R}=g[w];if(R){const A=ka({x:y,y:S});C.appendChild(A)}}else if(_)for(let w=0;w<g.length;w++){const{x:y,y:S,defined:R}=g[w];if(R&&(!g[w-1]||!g[w-1].defined)&&(!g[w+1]||!g[w+1].defined)){const A=ka({x:y,y:S});C.appendChild(A)}}}return l}function TT(i,t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A,x,T;let M;M=typeof i=="function"?i(null):i;const B=new ue({x:t,y:e,width:n,height:o,stroke:!1,fill:!1});if(B.name="sparkline",M.type==="line"){const P=mn({x:0,y:0,curveType:M.smooth?"monotoneX":"linear",stroke:(l=(s=(r=M.line)===null||r===void 0?void 0:r.style)===null||s===void 0?void 0:s.stroke)!==null&&l!==void 0?l:"blue",lineWidth:(d=(h=(a=M.line)===null||a===void 0?void 0:a.style)===null||h===void 0?void 0:h.strokeWidth)!==null&&d!==void 0?d:2});P.name="sparkline-line",B.addChild(P),M.crosshair&&(P.hover=(c=(u=M.crosshair)===null||u===void 0?void 0:u.style)!==null&&c!==void 0?c:{stroke:"#000",interpolate:"linear"});const F=new ue({x:0,y:0,width:n,height:o,stroke:!1,fill:!1});F.name="sparkline-symbol-group",F.setTheme({symbol:{stroke:(p=(f=(g=M.point)===null||g===void 0?void 0:g.style)===null||f===void 0?void 0:f.stroke)!==null&&p!==void 0?p:"#000",lineWidth:(C=(b=(m=M.point)===null||m===void 0?void 0:m.style)===null||b===void 0?void 0:b.strokeWidth)!==null&&C!==void 0?C:1,fill:(y=(w=(_=M.point)===null||_===void 0?void 0:_.style)===null||w===void 0?void 0:w.fill)!==null&&y!==void 0?y:"#000",size:2*((A=(R=(S=M.point)===null||S===void 0?void 0:S.style)===null||R===void 0?void 0:R.size)!==null&&A!==void 0?A:3),symbolType:"circle"}}),B.addChild(F),F.hover=(T=(x=M.point)===null||x===void 0?void 0:x.hover)!==null&&T!==void 0&&T}return B}function MT(i,t){const e=[];for(let n=0;n<i.length;n++){const o=i[n];z(t)&&z(o[t])?e.push(o[t]):!z(t)&&z(o)&&e.push(o)}return e}const pv=Cn();function D9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m){var b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et;const gt=g._getCellStyle(n,o),vt=Fc("padding",gt,n,o,g);!((b=g.options.customConfig)===null||b===void 0)&&b.imageMargin?h=ee((C=g.options.customConfig)===null||C===void 0?void 0:C.imageMargin):z(vt)&&(h=vt),!((_=f==null?void 0:f.text)===null||_===void 0)&&_.textAlign&&(d=(w=f==null?void 0:f.text)===null||w===void 0?void 0:w.textAlign),!((y=f==null?void 0:f.text)===null||y===void 0)&&y.textBaseline&&(u=(S=f==null?void 0:f.text)===null||S===void 0?void 0:S.textBaseline);const it=xs(n,o,f,g);let nt,bt;if(m&&(nt=g.scenegraph.highPerformanceGetCell(n,o,!0),nt&&nt.role==="cell"&&nt.setAttributes({x:t,y:e,width:r,height:s,lineWidth:(A=(R=f==null?void 0:f.group)===null||R===void 0?void 0:R.lineWidth)!==null&&A!==void 0?A:void 0,fill:(T=(x=f==null?void 0:f.group)===null||x===void 0?void 0:x.fill)!==null&&T!==void 0?T:void 0,stroke:(B=(M=f==null?void 0:f.group)===null||M===void 0?void 0:M.stroke)!==null&&B!==void 0?B:void 0,strokeArrayWidth:it,strokeArrayColor:(F=(P=f==null?void 0:f.group)===null||P===void 0?void 0:P.strokeArrayColor)!==null&&F!==void 0?F:void 0,cursor:(E=(H=f==null?void 0:f.group)===null||H===void 0?void 0:H.cursor)!==null&&E!==void 0?E:void 0,lineDash:(I=(k=f==null?void 0:f.group)===null||k===void 0?void 0:k.lineDash)!==null&&I!==void 0?I:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})),nt&&nt.role==="cell"||(nt=new ue({x:t,y:e,width:r,height:s,lineWidth:(D=(L=f==null?void 0:f.group)===null||L===void 0?void 0:L.lineWidth)!==null&&D!==void 0?D:void 0,fill:(W=(O=f==null?void 0:f.group)===null||O===void 0?void 0:O.fill)!==null&&W!==void 0?W:void 0,stroke:($=(N=f==null?void 0:f.group)===null||N===void 0?void 0:N.stroke)!==null&&$!==void 0?$:void 0,strokeArrayWidth:it,strokeArrayColor:(Y=(U=f==null?void 0:f.group)===null||U===void 0?void 0:U.strokeArrayColor)!==null&&Y!==void 0?Y:void 0,cursor:(G=(j=f==null?void 0:f.group)===null||j===void 0?void 0:j.cursor)!==null&&G!==void 0?G:void 0,lineDash:(et=(Z=f==null?void 0:f.group)===null||Z===void 0?void 0:Z.lineDash)!==null&&et!==void 0?et:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),nt.role="cell",nt.col=n,nt.row=o,i==null||i.addCellGroup(nt)),c){let _t=n,ut=o;p&&(_t=p.start.col,ut=p.start.row),bt=g.getCellIcons(_t,ut)}let Ct=0,at=0;if(Array.isArray(bt)&&bt.length!==0){const{leftIconWidth:_t,rightIconWidth:ut,absoluteLeftIconWidth:It,absoluteRightIconWidth:Ut}=zc(bt,nt,p,g);Ct=_t,at=ut,nt.forEachChildren(yt=>{yt.role==="icon-left"?yt.setAttribute("x",yt.attribute.x+h[3]):yt.role==="icon-right"?yt.setAttribute("x",yt.attribute.x+r-ut-h[1]):yt.role==="icon-absolute-right"&&yt.setAttribute("x",yt.attribute.x+r-Ut-h[1])}),nt.forEachChildren(yt=>{u==="middle"?yt.setAttribute("y",(s-yt.AABBBounds.height())/2):u==="bottom"?yt.setAttribute("y",s-yt.AABBBounds.height()-h[2]):yt.setAttribute("y",h[0])}),nt._cellLeftIconWidth=Ct,nt._cellRightIconWidth=at}const rt=g.getCellValue(n,o),ct=document.createElement("video");ct.addEventListener("loadeddata",()=>{a&&fA(n,o,ct.videoWidth,ct.videoHeight,g.scenegraph,h,nt);const{width:_t,height:ut,isMerge:It}=Sl(nt,g);if(l){const{width:ye,height:Oe}=kc(ct.videoWidth,ct.videoHeight,_t-h[1]-h[3],ut-h[0]-h[2]),Be=Pm(0,0,_t,ut,ye,Oe,d,u,h);ht.setAttributes({width:ye,height:Oe,x:Be.x,y:Be.y,dx:0})}else ht.setAttributes({x:h[3],y:h[0],width:_t-h[1]-h[3],height:ut-h[2]-h[0],dy:0});It&&Hm(nt.mergeStartCol,nt.mergeEndCol,nt.mergeStartRow,nt.mergeEndRow,g);const{width:Ut,height:yt}=Sl(nt,g),Tt=Math.floor(Math.min(Ut-h[1]-h[3],yt-h[2]-h[0])/2),kt=0+(Ut>ht.attribute.width?ht.attribute.x-0+ht.attribute.width/2:Ut/2),oe=0+(yt>ht.attribute.height?ht.attribute.y-0+ht.attribute.height/2:yt/2),re=new vs({x:kt-Tt/2,y:oe-Tt/2,width:Tt,height:Tt,image:pv.play.svg,cursor:pv.play.cursor});re.name="play-icon",nt.appendChild(re),g.scenegraph.updateNextFrame()}),ct.onerror=()=>{ht.image=pv.damage_pic.svg},ct.src=rt,ct.setAttribute("preload","auto");const ht=pu({x:h[3],y:h[0],width:r-h[1]-h[3],height:s-h[2]-h[0],image:ct,cursor:"pointer"});return ht.name="image",ht.keepAspectRatio=l,ht.textAlign=d,ht.textBaseline=u,nt.appendChild(ht),nt}function O9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C){var _,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt;const bt=i._getCellStyle(r,s),Ct=Fc("padding",bt,r,s,i);z(Ct)&&(d=Ct),!((_=m==null?void 0:m.text)===null||_===void 0)&&_.textAlign&&(u=(w=m==null?void 0:m.text)===null||w===void 0?void 0:w.textAlign),!((y=m==null?void 0:m.text)===null||y===void 0)&&y.textBaseline&&(c=(S=m==null?void 0:m.text)===null||S===void 0?void 0:S.textBaseline);const at=i.isAutoRowHeight(s),rt=l==="auto",ct=(R=bt.autoWrapText)!==null&&R!==void 0?R:i.internalProps.autoWrapText,ht=bt.lineClamp,_t=xs(r,s,m,i);let ut;if(C&&(ut=i.scenegraph.getCell(r,s,!0),ut&&ut.role==="cell"&&ut.setAttributes({x:n,y:o,width:a,height:h,lineWidth:(x=(A=m==null?void 0:m.group)===null||A===void 0?void 0:A.lineWidth)!==null&&x!==void 0?x:void 0,fill:(M=(T=m==null?void 0:m.group)===null||T===void 0?void 0:T.fill)!==null&&M!==void 0?M:void 0,stroke:(P=(B=m==null?void 0:m.group)===null||B===void 0?void 0:B.stroke)!==null&&P!==void 0?P:void 0,strokeArrayWidth:_t??void 0,strokeArrayColor:(H=(F=m==null?void 0:m.group)===null||F===void 0?void 0:F.strokeArrayColor)!==null&&H!==void 0?H:void 0,cursor:(k=(E=m==null?void 0:m.group)===null||E===void 0?void 0:E.cursor)!==null&&k!==void 0?k:void 0,lineDash:(L=(I=m==null?void 0:m.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius})),ut&&ut.role==="cell"||(ut=new ue({x:n,y:o,width:a,height:h,lineWidth:(O=(D=m==null?void 0:m.group)===null||D===void 0?void 0:D.lineWidth)!==null&&O!==void 0?O:void 0,fill:(N=(W=m==null?void 0:m.group)===null||W===void 0?void 0:W.fill)!==null&&N!==void 0?N:void 0,stroke:(U=($=m==null?void 0:m.group)===null||$===void 0?void 0:$.stroke)!==null&&U!==void 0?U:void 0,strokeArrayWidth:_t??void 0,strokeArrayColor:(j=(Y=m==null?void 0:m.group)===null||Y===void 0?void 0:Y.strokeArrayColor)!==null&&j!==void 0?j:void 0,cursor:(Z=(G=m==null?void 0:m.group)===null||G===void 0?void 0:G.cursor)!==null&&Z!==void 0?Z:void 0,lineDash:(gt=(et=m==null?void 0:m.group)===null||et===void 0?void 0:et.lineDash)!==null&>!==void 0?gt:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius}),ut.role="cell",ut.col=r,ut.row=s,e==null||e.addCellGroup(ut)),f&&ut.appendChild(f),p){const It=t;let Ut;if(g){let yt=r,Tt=s;b&&(yt=b.start.col,Tt=b.start.row),Ut=i.getCellIcons(yt,Tt)}if(tN(ut,Ut,It,d,rt,at,ct,typeof ht=="number"?ht:void 0,ut.attribute.width,ut.attribute.height,u,c,i,m,b),(vt=m==null?void 0:m._vtable)===null||vt===void 0?void 0:vt.marked){const yt=o0({x:ut.attribute.width,y:0,startAngle:Math.PI/2,endAngle:Math.PI,outerRadius:6,fill:"#3073F2",pickable:!1});yt.name="mark",ut.appendChild(yt)}}return f&&ut.setAttributes({width:Math.max(ut.attribute.width,(it=f.attribute.width)!==null&&it!==void 0?it:0),height:Math.max(ut.attribute.height,(nt=f.attribute.height)!==null&&nt!==void 0?nt:0)}),ut}function z9(i,t,e,n,o,r,s,l,a,h){var d,u,c,g,f,p;i.dependField&&(o=(u=(d=a.getCellOriginRecord(r,s))===null||d===void 0?void 0:d[i.dependField])!==null&&u!==void 0?u:o),i.barType=(c=i.barType)!==null&&c!==void 0?c:"default",i.min=(g=ii(i.min,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&g!==void 0?g:0,i.max=(f=ii(i.max,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&f!==void 0?f:i.min+100;let m=0;m=h?a.getRowsHeight(h.start.row,h.end.row):a.getRowHeight(s);let b=e,C=m,_=0;pt(a.theme._contentOffset)&&(_=a.theme._contentOffset);const w=new ue({x:-_,y:-_,width:b,height:C});w.name="progress-bar";const{showBar:y,barColor:S,barBgColor:R,barPositiveColor:A,barNegativeColor:x,barAxisColor:T,barRightToLeft:M,showBarMark:B,barMarkPositiveColor:P,barMarkNegativeColor:F,barMarkWidth:H,barMarkPosition:E}=t;let{barHeight:k,barBottom:I,barPadding:L}=t;L.length===1?L=[L[0],L[0],L[0],L[0]]:L.length===2?L=[L[0],L[1],L[0],L[1]]:L.length===3&&(L=[L[0],L[1],L[2],L[1]]),L=L.map((G,Z)=>{if(typeof G=="string"&&vc.endsWith(G,"%")){const et=Number(G.substr(0,G.length-1));return Z===0||Z===2?m*et/100:e*et/100}return Number(G)});const D=ee(wt("borderLineWidth",t,r,s,a)),O=Math.max(L[0],Math.ceil(D[0]/2)),W=Math.max(L[1],Math.floor(D[1]/2)),N=Math.max(L[2],Math.floor(D[2]/2)),$=Math.max(L[3],Math.ceil(D[3]/2));b-=W+$,C-=N+O,s===a.rowCount-1&&[0,"0"].includes(I)&&(C-=1);const U=O,Y=$,j=b;if(typeof k=="string"&&vc.endsWith(k,"%")?(k=Number(k.substr(0,k.length-1)),k=C*k/100):k=Number(k),typeof I=="string"&&vc.endsWith(I,"%")?(I=Number(I.substr(0,I.length-1)),I=C*I/100):I=Number(I),ii(y,{col:r,row:s,table:a,context:null,value:n,dataValue:o})){let G=`${o}`;vc.endsWith(G,"%")&&(G=G.substr(0,G.length-1));const Z=Number(G);if(isNaN(Z))return w;if(((p=i.barType)!==null&&p!==void 0?p:"default")==="default"){const et=Z<i.min?0:Z>i.max?1:(Z-i.min)/(i.max-i.min),gt=b,vt=U+C-k-I;let it=Math.min(gt*et,gt);const nt=M?Y+j-it:Y;r!==a.colCount-1||et!==1||M||(it-=1);const bt=ii(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:et});if(bt){const rt=Ie({x:nt,y:vt,width:gt,height:k,fill:bt});w.addChild(rt)}const Ct=ii(S,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:et})||"#20a8d8",at=Ie({x:nt,y:vt,width:it,height:k,fill:Ct});w.addChild(at)}else if(i.barType==="negative"){const et=i.min<0?-i.min:0,gt=i.max>0?i.max:0,vt=et/(et+gt),it=1-vt,nt=Z>0?Z/gt:0,bt=Z<0?-Z/et:0,Ct=b,at=U+C-k-I,rt=Y,ct=ii(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt});if(ct){const Be=Ie({x:rt,y:at,width:Ct,height:k,fill:ct});w.addChild(Be)}const ht=M?it*Ct:vt*Ct,_t=Math.min(Ct*vt*bt,Ct),ut=M?{left:rt+ht,top:at,width:_t,height:k}:{left:rt+ht-_t,top:at,width:_t,height:k},It=ii(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:bt})||"#20a8d8",Ut=Ie({x:ut.left,y:ut.top,width:ut.width,height:ut.height,fill:It});w.addChild(Ut);let yt=Math.min(Ct*it*nt,Ct);r!==a.colCount-1||nt!==1||M||(yt-=1);const Tt=M?{left:rt+ht-yt,top:at,width:yt,height:k}:{left:rt+ht,top:at,width:yt,height:k},kt=ii(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt})||"#20a8d8",oe=Ie({x:Tt.left,y:Tt.top,width:Tt.width,height:Tt.height,fill:kt});w.addChild(oe);const re=M?ut.left:Tt.left,ye=ii(T,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt}),Oe=mn({x:0,y:0,stroke:ye,lineWidth:1,lineDash:[2,2],points:[{x:re,y:0},{x:re,y:m}]});if(w.addChild(Oe),B&&(nt||bt)){const Be=H,Ee=[];let At;if(nt>0)if(At=ii(P,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt})||"#20a8d8",E==="right"){const Bt=M?Tt.left+H/2:Tt.left+Tt.width-H/2;Ee.push({x:Bt,y:Tt.top}),Ee.push({x:Bt,y:Tt.top+Tt.height})}else E==="bottom"&&(Ee.push({x:Tt.left,y:Tt.top+Tt.height-H/2}),Ee.push({x:Tt.left+Tt.width,y:Tt.top+Tt.height-H/2}));else if(bt>0)if(At=ii(F,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:bt})||"#20a8d8",E==="right"){const Bt=M?ut.left+ut.width-H/2:ut.left+H/2;Ee.push({x:Bt,y:ut.top}),Ee.push({x:Bt,y:ut.top+ut.height})}else E==="bottom"&&(Ee.push({x:ut.left,y:ut.top+ut.height-H/2}),Ee.push({x:ut.left+ut.width,y:ut.top+ut.height-H/2}));const mt=mn({x:0,y:0,stroke:At,lineWidth:Be,points:Ee});w.addChild(mt)}}else if(i.barType==="negative_no_axis"){const et=i.min<0?-i.min:0,gt=i.max>0?i.max:0,vt=Math.max(et,gt),it=vt===0?0:Math.abs(Z)/vt,nt=b;let bt=Math.min(nt*it,nt);r!==a.colCount-1||it!==1||M||(bt-=1);const Ct=U+C-k-I,at=M?Y+j-bt:Y,rt=ii(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it});if(rt){const ut=Ie({x:at,y:Ct,width:nt,height:k,fill:rt});w.addChild(ut)}const ct={left:at,top:Ct,width:bt,height:k};let ht;ht=Z>=0?ii(A,{col:r,row:s,table:a,context:null,value:n,percentile:it,dataValue:o})||"#20a8d8":ii(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it})||"#20a8d8";const _t=Ie({x:ct.left,y:ct.top,width:ct.width,height:ct.height,fill:ht});if(w.addChild(_t),B&&Z){const ut=H,It=[];let Ut;if(Ut=Z>=0?ii(P,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it})||"#20a8d8":ii(F,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it})||"#20a8d8",E==="right"){const Tt=M?ct.left+H/2:ct.left+ct.width-H/2;It.push({x:Tt,y:ct.top}),It.push({x:Tt,y:ct.top+ct.height})}else E==="bottom"&&(It.push({x:ct.left,y:ct.top+ct.height-H/2}),It.push({x:ct.left+ct.width,y:ct.top+ct.height-H/2}));const yt=mn({x:0,y:0,stroke:Ut,lineWidth:ut,points:It});w.addChild(yt)}}}return w}function N9(i,t,e,n,o,r){var s,l,a,h,d,u,c,g,f;if(e!=null&&e.zero&&(i=Math.min(i,0),t=Math.max(t,0)),e==null?void 0:e.expand){const b=i,C=t;z(e.expand.min)&&(i=b-(C-b)*e.expand.min),z(e.expand.max)&&(t=C+(C-b)*e.expand.max)}let p,m;if(pt(e==null?void 0:e.min)&&(i=e.min),pt(e==null?void 0:e.max)&&(t=e.max),(e==null?void 0:e.type)==="log"?(p=new qa,p.base((s=e==null?void 0:e.base)!==null&&s!==void 0?s:10)):(e==null?void 0:e.type)==="symlog"?(p=new Za,p.constant((l=e==null?void 0:e.constant)!==null&&l!==void 0?l:10)):p=new cs,p.domain([i,t],!!(e!=null&&e.nice)),e==null?void 0:e.nice){let b=(u=(h=(a=e.tick)===null||a===void 0?void 0:a.forceTickCount)!==null&&h!==void 0?h:(d=e.tick)===null||d===void 0?void 0:d.tickCount)!==null&&u!==void 0?u:10;ce(b)&&(b=b({axisLength:o,labelStyle:(g=(c=e==null?void 0:e.label)===null||c===void 0?void 0:c.style)!==null&&g!==void 0?g:{fontSize:kh.LABEL_FONT_SIZE}})),e.niceType==="accurateFirst"&&(b=Math.max(10,b)),Mt(e.min)&&Mt(e.max)?p.nice(b):z(e.min)&&Mt(e.max)?p.niceMax(b):Mt(e.min)&&z(e.max)&&p.niceMin(b)}return delete p._niceType,r||(m=p.ticks(pt(e==null?void 0:e.tickCount)?e==null?void 0:e.tickCount:5,{noDecimals:(f=e==null?void 0:e.tick)===null||f===void 0?void 0:f.noDecimals})),{range:p.domain(),ticks:m}}const Ig=()=>{Et.registerFunction("createChartCellGroup",M9),Et.registerFunction("getAxisDomainRangeAndLabels",N9)},Dg=()=>{Et.registerFunction("createCheckboxCellGroup",B9)},Og=()=>{Et.registerFunction("createImageCellGroup",nN)},zg=()=>{Et.registerFunction("createProgressBarCell",z9)},Ng=()=>{Et.registerFunction("createRadioCellGroup",H9)},Wg=()=>{Et.registerFunction("createSparkLineCellGroup",F9)},Dl=()=>{Et.registerFunction("createTextCellGroup",O9)},Vg=()=>{Et.registerFunction("createVideoCellGroup",D9)};Pg(),Hg(),Eg(),Lg(),kg(),Fg(),A9(),Ig(),Dg(),Og(),zg(),Ng(),Wg(),Dl(),Vg();class W9 extends bT{}Dl();class V9 extends bT{}function j9(i,t,e,n,o,r){const s=r.columnHeaderLevelCount,l=[],a=[];for(let c=0;c<e.length;c++)n.includes(e[c])||a.push(o[c]);for(let c=0;c<n.length;c++)if(!e.includes(n[c])){const g={col:i,row:s+c};l.push(g)}let h=r.getParentCellId(i,t),d=r.getRowHeaderCellAddressByCellId(h);const u=[];for(d&&u.push(d);h;)h=r.getParentCellId(d.col,d.row),h&&(d=r.getRowHeaderCellAddressByCellId(h),u.push(d));return{addCellPositions:l,removeCellPositions:a,updateCellPositions:u}}const BT={startInTotal:0,level:0};class hr{constructor(t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y;this.colIndex=0,this._showHeader=!0,this.columnHeaderObjs=[],this.rowHeaderObjs=[],this._cornerHeaderCellFullPathIds=[],this._columnHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds_FULL=[],this._cornerHeaderCellIds=[],this._columnHeaderCellIds=[],this._rowHeaderCellIds=[],this._rowHeaderCellIds_FULL=[],this._columnWidths=[],this.columnPaths=[],this._headerObjects=[],this._headerObjectMap={},this._indicators=[],this.indicatorsAsCol=!0,this.hideIndicatorName=!1,this._showRowHeader=!0,this._showColumnHeader=!0,this._indicatorShowType="column",this.rowHierarchyTextStartAlignment=!1,this.rowDimensionKeys=[],this.colDimensionKeys=[],this.indicatorKeys=[],this.indicatorDimensionKey=Zi,this._rowHeaderExtensionTree={},this._extensionRowDimensionKeys=[],this.fullRowDimensionKeys=[],this.leftRowSeriesNumberColumnCount=0,this.rightRowSeriesNumberColumnCount=0,this._useGetBodyCache=!1,this._getBodyCache=new Map,this._useHeaderPathCache=!1,this._colHeaderPathCache=new Map,this._rowHeaderPathCache=new Map,this.sharedVar=t.layoutNodeId,this._table=t,t.options.rowHierarchyType==="tree"&&(this.extensionRows=t.options.extensionRows),this.dataset=e,this._largeCellRangeCache=[],this._CellHeaderPathMap=new Map,this.rowTree=t.internalProps.rowTree,this.columnTree=t.internalProps.columnTree,this.rowsDefine=(r=t.internalProps.rows)!==null&&r!==void 0?r:[],this.columnsDefine=(s=t.internalProps.columns)!==null&&s!==void 0?s:[],this.indicatorsDefine=(l=t.internalProps.indicators)!==null&&l!==void 0?l:[],this.indicatorTitle=t.options.indicatorTitle,this.indicatorsAsCol=(a=t.options.indicatorsAsCol)===null||a===void 0||a,this.hideIndicatorName=(h=t.options.hideIndicatorName)!==null&&h!==void 0&&h,this.showRowHeader=(d=t.options.showRowHeader)===null||d===void 0||d,this.showColumnHeader=(u=t.options.showColumnHeader)===null||u===void 0||u,this.rowHeaderTitle=t.options.rowHeaderTitle,this.columnHeaderTitle=t.options.columnHeaderTitle,this.rowHierarchyType=(c=t.options.rowHierarchyType)!==null&&c!==void 0?c:"grid",this.rowExpandLevel=(g=t.options.rowExpandLevel)!==null&&g!==void 0?g:1,this.rowHierarchyIndent=(f=t.options.rowHierarchyIndent)!==null&&f!==void 0?f:20,this.rowHierarchyTextStartAlignment=t.options.rowHierarchyTextStartAlignment,this.cornerSetting=Object.assign({titleOnDimension:"column",forceShowHeader:!1},t.options.corner),e&&(this.rowTree=e.rowHeaderTree,this.columnTree=e.colHeaderTree),(p=this.indicatorsDefine)===null||p===void 0||p.forEach(x=>{typeof x=="string"?this.indicatorKeys.push(x):this.indicatorKeys.push(x.indicatorKey)}),this.columnDimensionTree=n,this.rowDimensionTree=o,this.colDimensionKeys=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this.resetRowHeaderLevelCount(),this._table.isPivotChart()&&(this.hasTwoIndicatorAxes=this.indicatorsDefine.some(x=>{var T,M;if(x.chartSpec&&x.chartSpec.series&&x.chartSpec.series.length>1){const B=(M=(T=x.chartSpec.axes)!==null&&T!==void 0?T:this._table.pivotChartAxes)!==null&&M!==void 0?M:[];if(!B.length||B.every(P=>P.orient!==(this.indicatorsAsCol?"top":"right")||P.visible!==!1))return!0}return!1})),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=nm(this._rowHeaderCellFullPathIds_FULL),t.options.rowHierarchyType==="tree"&&((m=this.extensionRows)===null||m===void 0?void 0:m.length)>=1&&(this.generateExtensionRowTree(),this.extensionRows.forEach(x=>{const T=[];x.rows.forEach(M=>{typeof M=="string"?T.push(M):T.push(M.dimensionKey)}),this._extensionRowDimensionKeys.push(T),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(T)})),this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);let S,R=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();!this.dataset||this._table.isPivotChart()||((C=(b=this.dataset.records)===null||b===void 0?void 0:b.length)!==null&&C!==void 0?C:0)!==0||this.dataset.customColTree||(R=this.columnsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol&&R.push(this.indicatorDimensionKey)),R=this.columnHeaderTitle?[""].concat(R):R;let A=[];if(this.rowHierarchyType==="tree"&&((_=this.extensionRows)===null||_===void 0?void 0:_.length)>=1){const x=[];x.push(this.rowDimensionKeys[0]),this._extensionRowDimensionKeys.forEach(T=>{x.push(T[0])}),A=this.extensionRows.reduce((T,M)=>T.concat(M.rows),[]),S=this.rowHeaderTitle?[""].concat(x):x}else S=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),!this.dataset||this._table.isPivotChart()||((y=(w=this.dataset.records)===null||w===void 0?void 0:w.length)!==null&&y!==void 0?y:0)!==0||this.dataset.customRowTree||(S=this.rowsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol||S.push(this.indicatorDimensionKey)),S=this.rowHeaderTitle?[""].concat(S):S;this.cornerHeaderObjs=this._addCornerHeaders(R,S,this.columnsDefine.concat(...this.rowsDefine,...A)),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((x,T)=>(x[T.id]=T,x),{}),this.indicatorsAsCol&&!this.hideIndicatorName?this._indicatorShowType="column":this.indicatorsAsCol||this.hideIndicatorName?this._indicatorShowType="none":this._indicatorShowType="row",this.generateCellIdsConsiderHideHeader(),this.setPagination(t.options.pagination),this._table.isPivotChart()&&(this._chartItemSpanSize=0,this._chartItemBandSize=0,this._indicators.find(x=>{var T,M,B,P,F,H,E,k;!((T=x==null?void 0:x.style)===null||T===void 0)&&T.padding&&(this._chartPadding=x.style.padding),!((M=x.chartSpec)===null||M===void 0)&&M.barWidth&&typeof x.chartSpec.barWidth=="number"&&(this._chartItemSpanSize=(B=x.chartSpec)===null||B===void 0?void 0:B.barWidth);const I=(F=(P=x.chartSpec)===null||P===void 0?void 0:P.axes)===null||F===void 0?void 0:F.find(L=>L.type==="band");return I!=null&&I.bandSize&&(this._chartItemBandSize=I==null?void 0:I.bandSize,this._chartPaddingInner=(H=st(I.paddingInner)?I.paddingInner[0]:I.paddingInner)!==null&&H!==void 0?H:0,this._chartPaddingOuter=(E=st(I.paddingOuter)?I.paddingOuter[0]:I.paddingOuter)!==null&&E!==void 0?E:0),this._chartItemSpanSize>0||((k=x.chartSpec.series)===null||k===void 0||k.find(L=>(L.barWidth&&typeof L.barWidth=="number"&&(this._chartItemSpanSize=L.barWidth),this._chartItemSpanSize>0)),!1)})),this.handleRowSeriesNumber(t.internalProps.rowSeriesNumber),this.setColumnWidths()}handleRowSeriesNumber(t){var e,n;t&&(Array.isArray(t)?this.rowSeriesNumberColumn=t.map(o=>{var r,s;return{id:"",title:o.title,define:o,cellType:(r=o.cellType)!==null&&r!==void 0?r:"text",headerType:(s=o.cellType)!==null&&s!==void 0?s:"text",width:o.width,style:o.style,format:o.format,field:o.field,icon:o.icon}}):this.rowSeriesNumberColumn=[{id:"",title:t.title,define:t,cellType:(e=t.cellType)!==null&&e!==void 0?e:"text",headerType:(n=t.cellType)!==null&&n!==void 0?n:"text",style:t.style,width:t.width,format:t.format,field:"",icon:t.icon,isChildNode:!1}],this.leftRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!0),this.rightRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!1),this.leftRowSeriesNumberColumnCount=this.leftRowSeriesNumberColumn.length,this.rightRowSeriesNumberColumnCount=this.rightRowSeriesNumberColumn.length)}_generateColHeaderIds(){var t,e,n,o,r,s,l,a;if(((t=this.columnDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1){let h=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&this.indicatorsAsCol&&this.columnDimensionTree.totalLevel<this.columnHeaderLevelCount){h=this.columnHeaderLevelCount-this.columnDimensionTree.totalLevel;for(let d=0;d<h;d++)this._columnHeaderCellFullPathIds.unshift([])}this._addHeaders(this._columnHeaderCellFullPathIds,h,this.columnDimensionTree.tree.children,[],this.columnHeaderObjs)}if(this.columnHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const h=++this.sharedVar.seqId,d=Array(this.colCount-this.rowHeaderLevelCount-this.rightFrozenColCount).fill(h);this._columnHeaderCellFullPathIds.unshift(d);const u={id:h,title:typeof this.columnHeaderTitle.title=="string"?this.columnHeaderTitle.title:this.columnsDefine.reduce((c,g)=>typeof g=="string"?c:c+(c?`/${g.title}`:`${g.title}`),""),field:void 0,headerType:(r=(o=this.columnHeaderTitle)===null||o===void 0?void 0:o.headerType)!==null&&r!==void 0?r:"text",style:(s=this.columnHeaderTitle)===null||s===void 0?void 0:s.headerStyle,define:{id:h,disableHeaderHover:!!(!((l=this.columnHeaderTitle)===null||l===void 0)&&l.disableHeaderHover),disableHeaderSelect:!!(!((a=this.columnHeaderTitle)===null||a===void 0)&&a.disableHeaderSelect)}};this.columnHeaderObjs.push(u),this._headerObjects[h]=u}}_generateRowHeaderIds(){var t,e,n,o,r,s,l,a,h,d;if(((t=this.rowDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1)if(this.rowHierarchyType==="tree")this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs);else{let u=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&!this.indicatorsAsCol&&this.rowDimensionTree.totalLevel<this.rowHeaderLevelCount){u=this.rowHeaderLevelCount-this.rowDimensionTree.totalLevel;for(let c=0;c<u;c++)this._rowHeaderCellFullPathIds_FULL.unshift([])}this._addHeaders(this._rowHeaderCellFullPathIds_FULL,u,this.rowDimensionTree.tree.children,[],this.rowHeaderObjs)}if(this.rowHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const u=++this.sharedVar.seqId,c=Array((r=(o=this._rowHeaderCellFullPathIds_FULL[0])===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:this.rowDimensionTree.tree.size).fill(u);this._rowHeaderCellFullPathIds_FULL.unshift(c);const g={id:u,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((f,p)=>typeof p=="string"?f:f+(f?`/${p.title}`:`${p.title}`),""),field:void 0,headerType:(l=(s=this.rowHeaderTitle)===null||s===void 0?void 0:s.headerType)!==null&&l!==void 0?l:"text",style:(a=this.rowHeaderTitle)===null||a===void 0?void 0:a.headerStyle,define:{id:u,disableHeaderHover:!!(!((h=this.rowHeaderTitle)===null||h===void 0)&&h.disableHeaderHover),disableHeaderSelect:!!(!((d=this.rowHeaderTitle)===null||d===void 0)&&d.disableHeaderSelect)}};this.rowHeaderObjs.push(g),this._headerObjects[u]=g}}_addHeaders(t,e,n,o,r){const s=this;t[e]||function(l){const a=t[l]=[];if(s.colIndex===0)return a;const h=t[l-1];for(let d=0;d<(h==null?void 0:h.length);d++)a[d]=h[d]}(e);for(let l=0;l<n.length;l++){const a=n[l];H8(a,t,r,o,e,this)}}_addHeadersForTreeMode(t,e,n,o,r,s,l,a){const h=this;t[e]||function(d){const u=t[d]=[];if(h.colIndex===0)return u;const c=t[d-1];for(let g=0;g<(c==null?void 0:c.length);g++)u[g]=c[g]}(e);for(let d=0;d<n.length;d++){const u=n[d];E8(u,t,a,o,e,r,s,l,this)}}_addCornerHeaders(t,e,n){var o,r;const s=[];if(this.cornerSetting.titleOnDimension==="all")if(this.indicatorsAsCol){let l=-1;t&&t.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}),e&&e.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[l]||(this._cornerHeaderCellFullPathIds[l]=[]),this._cornerHeaderCellFullPathIds[l][h]=c})}else{let l=-1;e&&e.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f;for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c}),t&&t.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h][l]=c})}else if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="column"){const l=((o=this.cornerSetting)===null||o===void 0?void 0:o.titleOnDimension)==="row"?e:t;l&&l.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};if(s[c]=f,this._headerObjects[c]=f,this.cornerSetting.titleOnDimension==="column"){this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}else if(this.cornerSetting.titleOnDimension==="row")for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c})}else{const l=++this.sharedVar.seqId,a={id:l,title:"",field:"维度名称",style:this.cornerSetting.headerStyle,headerType:(r=this.cornerSetting.headerType)!==null&&r!==void 0?r:"text",define:{dimensionKey:"维度名称",id:l,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect}};s[l]=a,this._headerObjects[l]=a;for(let h=0;h<this.columnHeaderLevelCount;h++)for(let d=0;d<this.rowHeaderLevelCount;d++)this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]),this._cornerHeaderCellFullPathIds[h][d]=l}return s}generateExtensionRowTree(){this.extensionRows.forEach((t,e)=>{const n=this._rowHeaderCellFullPathIds_FULL;this._rowHeaderCellFullPathIds_FULL=[],n.forEach((o,r)=>{const s=o[o.length-1];let l,a;if(this.colIndex=0,typeof t.rowTree=="function"){const d=this.findFullCellIds(o);l=t.rowTree(d.map(u=>({dimensionKey:this._headerObjects[u].field,value:this._headerObjects[u].title})))}else l=Le(t.rowTree);this._rowHeaderExtensionTree[s]?(this._rowHeaderExtensionTree[s].reset(this._rowHeaderExtensionTree[s].tree.children,!0),a=this._rowHeaderExtensionTree[s]):(a=new He(l??[],this.sharedVar,this.rowHierarchyType,void 0),this._rowHeaderExtensionTree[s]=a);const h=[];this._addHeadersForTreeMode(h,0,a.tree.children,[],a.totalLevel,!0,t.rows,this.rowHeaderObjs);for(let d=0;d<h[0].length;d++)this._rowHeaderCellFullPathIds_FULL.push(o.concat(h[0][d]))})})}setColumnWidths(){var t,e,n;const o=new Array(this.colCount).fill(void 0);if(this.leftRowSeriesNumberColumnCount&&(o[0]=this.leftRowSeriesNumberColumn[0]),this.showHeader&&this.showRowHeader)if(this.rowHeaderTitle&&(o[0+this.leftRowSeriesNumberColumnCount]={}),this.rowHierarchyType==="tree"){const r=this.rowDimensionKeys[0];if(r){const s=(t=this.rowsDefine)===null||t===void 0?void 0:t.find(l=>typeof l!="string"&&l.dimensionKey===r);s&&(o[0+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:s.width,minWidth:s.minWidth,maxWidth:s.maxWidth})}(e=this._extensionRowDimensionKeys)===null||e===void 0||e.forEach((s,l)=>{var a;const h=s[0];if(h){const d=(a=this.extensionRows[l].rows)===null||a===void 0?void 0:a.find(u=>typeof u!="string"&&u.dimensionKey===h);d&&(o[l+1+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth})}})}else(this.rowDimensionTree.totalLevel>0?this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr():this.rowsDefine.map(r=>typeof r=="string"?r:r.dimensionKey)).forEach((r,s)=>{var l;const a=(l=this.rowsDefine)===null||l===void 0?void 0:l.find(h=>typeof h!="string"&&h.dimensionKey===r);a&&(o[s+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:a.width,minWidth:a.minWidth,maxWidth:a.maxWidth})});if(this.indicatorsAsCol)for(let r=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;r<this.colCount;r++){const s=this.getBody(r,this.columnHeaderLevelCount);o[r]={width:s==null?void 0:s.width,minWidth:s==null?void 0:s.minWidth,maxWidth:s==null?void 0:s.maxWidth}}else{let r,s,l,a=0;(n=this._indicators)===null||n===void 0||n.forEach((h,d)=>{var u,c;typeof h.width=="number"?a=Math.max(h.width,a):h.width==="auto"&&(l=!0),typeof h.minWidth=="number"&&(s=Math.max(h.minWidth,(u=s)!==null&&u!==void 0?u:0)),typeof h.maxWidth=="number"&&(r=Math.min(h.maxWidth,(c=r)!==null&&c!==void 0?c:Number.MAX_VALUE))}),a=a>0?a:l?"auto":void 0,o.fill({width:a,minWidth:s,maxWidth:r},this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount,this.colCount-this.rightFrozenColCount)}this._columnWidths=o}get columnWidths(){return this._columnWidths}getColumnWidthDefined(t){return this._columnWidths[t]}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader=t}get showColumnHeader(){return this._showColumnHeader}set showColumnHeader(t){this._showColumnHeader=t}get showRowHeader(){return this._showRowHeader}set showRowHeader(t){this._showRowHeader=t}get columnHeaderTitle(){return this._columnHeaderTitle}set columnHeaderTitle(t){this._columnHeaderTitle=t}get rowHeaderTitle(){return this._rowHeaderTitle}set rowHeaderTitle(t){this._rowHeaderTitle=t}getHeaderFieldKey(t,e){}getCellLocation(t,e){return this.isCornerHeader(t,e)?"cornerHeader":this.isColumnHeader(t,e)?"columnHeader":this.isRowHeader(t,e)?"rowHeader":"body"}isHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||e>=0&&e<this.columnHeaderLevelCount||t>=this.colCount-this.rightHeaderColCount||e>=this.rowCount-this.bottomHeaderRowCount}isCornerHeader(t,e){return t>=0&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isColumnHeader(t,e){return t>=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isRowHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=this.columnHeaderLevelCount}isFrozen(t,e){return this.isFrozenColumn(t)||this.isRightFrozenColumn(t)||this.isBottomFrozenRow(e)||this.isFrozenRow(e)||this.isSeriesNumberInBody(t,e)||this.isSeriesNumberInHeader(t,e)}isFrozenColumn(t,e){if(z(e)){if(t>=0&&t<this.frozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.frozenColCount>0&&t>=0&&t<this.frozenColCount)return!0;return!1}isRightFrozenColumn(t,e){if(z(e)){if(t>=this.colCount-this.rightFrozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.rightFrozenColCount>0&&t>=this.colCount-this.rightFrozenColCount)return!0;return!1}isFrozenRow(t,e){if(z(e)){if(e>=0&&e<this.frozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.frozenRowCount>0&&e>=0&&e<this.frozenRowCount)return!0;return!1}isBottomFrozenRow(t,e){if(z(e)){if(e>=this.rowCount-this.bottomFrozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.bottomFrozenRowCount>0&&e>=this.rowCount-this.bottomFrozenRowCount)return!0;return!1}isLeftTopCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=0&&e<this.frozenRowCount}isLeftBottomCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}isRightTopCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=0&&e<this.frozenRowCount}isRightBottomCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}getColumnHeaderRange(){return{start:{col:this.rowHeaderLevelCount,row:0},end:{col:this.colCount-1,row:this.columnHeaderLevelCount-1}}}getRowHeaderRange(){return{start:{col:0,row:this.columnHeaderLevelCount},end:{col:this.rowHeaderLevelCount-1,row:this.rowCount-1}}}getCornerHeaderRange(){return{start:{col:0,row:0},end:{col:this.rowHeaderLevelCount-1,row:this.columnHeaderLevelCount-1}}}getBodyRange(){return{start:{col:this.rowHeaderLevelCount,row:this.columnHeaderLevelCount},end:{col:this.colCount-1,row:this.rowCount-1}}}resetCellIds(){}get frozenColCount(){return this._table.internalProps.frozenColCount?this.colCount>this._table.internalProps.frozenColCount?this._table.internalProps.frozenColCount:this.colCount:0}get frozenRowCount(){return this._table.internalProps.frozenRowCount?this.rowCount>=this._table.internalProps.frozenRowCount?this._table.internalProps.frozenRowCount:this.rowCount:0}get headerLevelCount(){return this.columnHeaderLevelCount}resetColumnHeaderLevelCount(){var t,e,n,o,r,s,l,a,h,d,u;if(this.showHeader&&this.showColumnHeader){if(this._table.isPivotChart()&&this.indicatorsAsCol&&!(!((e=(t=this.dataset)===null||t===void 0?void 0:t.colKeys)===null||e===void 0)&&e.length)&&((o=(n=this.columnDimensionTree)===null||n===void 0?void 0:n.tree)===null||o===void 0?void 0:o.level)===0&&!this.hasTwoIndicatorAxes)return void(this.columnHeaderLevelCount=0);let c=this.indicatorsAsCol&&this.hideIndicatorName&&this.colDimensionKeys[this.colDimensionKeys.length-1]===this.indicatorDimensionKey?this.columnDimensionTree.totalLevel-1:this.columnDimensionTree.totalLevel;return c===0&&this.dataset&&!(!((r=this.dataset.customColTree)===null||r===void 0)&&r.length)?this.cornerSetting.titleOnDimension==="row"&&this.cornerSetting.forceShowHeader?c=1:this._table.isPivotChart()||((l=(s=this.dataset.records)===null||s===void 0?void 0:s.length)!==null&&l!==void 0?l:0)!==0||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(a=this.columnsDefine.length)!==null&&a!==void 0?a:0):!this.dataset||this._table.isPivotChart()||((d=(h=this.dataset.records)===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0)!==0||this.dataset.customColTree||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(u=this.columnsDefine.length)!==null&&u!==void 0?u:0,!this.hideIndicatorName&&this.indicatorsAsCol&&c++),this.columnHeaderTitle&&(c+=1),this._table.isPivotChart()&&this.indicatorsAsCol&&!this.hasTwoIndicatorAxes&&Fh(this.indicatorsDefine)&&(c-=1),void(this.columnHeaderLevelCount=c)}this.columnHeaderLevelCount=this.indicatorsAsCol?this.hideIndicatorName?0:1:0}resetRowHeaderLevelCount(){var t,e,n,o,r,s,l,a;if(this.showHeader&&this.showRowHeader){if(this.rowHierarchyType==="tree"){const u=(e=(t=this.extensionRows)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0;return this.rowHeaderTitle?void(this.rowHeaderLevelCount=2+u):void(this.rowHeaderLevelCount=1+u)}const h=this.rowDimensionTree.totalLevel;let d=h;return d===0&&this.dataset&&!(!((n=this.dataset.customRowTree)===null||n===void 0)&&n.length)?this.cornerSetting.titleOnDimension==="column"&&this.cornerSetting.forceShowHeader?d=1:this._table.isPivotChart()||((r=(o=this.dataset.records)===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:0)!==0||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=(s=this.rowsDefine.length)!==null&&s!==void 0?s:0):!this.dataset||this._table.isPivotChart()||((a=(l=this.dataset.records)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)!==0||this.dataset.customRowTree||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=this.rowsDefine.length,this.hideIndicatorName||this.indicatorsAsCol||d++),!this.indicatorsAsCol&&this.hideIndicatorName&&this.rowDimensionKeys[this.rowDimensionKeys.length-1]===this.indicatorDimensionKey&&(d=h-1),this.rowHeaderTitle&&(d+=1),void(this.rowHeaderLevelCount=d)}this.rowHeaderLevelCount=this.indicatorsAsCol||this.hideIndicatorName?0:1}get columnHeaderLevelCount(){return this._columnHeaderLevelCount}set columnHeaderLevelCount(t){this._columnHeaderLevelCount=t}get rowHeaderLevelCount(){return this._rowHeaderLevelCount}set rowHeaderLevelCount(t){this._rowHeaderLevelCount=t}get colCount(){var t;return(this.columnDimensionTree.totalLevel>0||this._table.isPivotChart()||((t=this.dataset.records)===null||t===void 0?void 0:t.length)>0||this.dataset.records&&!Array.isArray(this.dataset.records)?this.columnDimensionTree.tree.size:0)+this.rowHeaderLevelCount+this.rightHeaderColCount+this.leftRowSeriesNumberColumnCount}get rowCount(){var t,e,n,o;return((this._table.records||this.dataset.records)&&(!Array.isArray(this._table.records)||this._table.records.length>0)&&((t=this._indicators)===null||t===void 0?void 0:t.length)>0&&!(!((e=this._rowHeaderCellIds)===null||e===void 0)&&e.length)?1:(o=(n=this._rowHeaderCellIds)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)+this.columnHeaderLevelCount+this.bottomHeaderRowCount}get bodyRowSpanCount(){return this.rowDimensionTree.tree.size}get bottomFrozenRowCount(){if(!this._table.isPivotChart())return this._table.internalProps.bottomFrozenRowCount?this.rowCount-this.headerLevelCount>=this._table.internalProps.bottomFrozenRowCount?this._table.internalProps.bottomFrozenRowCount:this.rowCount-this.headerLevelCount:0;if(this.indicatorKeys.length>=1&&Fh(this.indicatorsDefine)){const t=this._table.pivotChartAxes.find(e=>e.orient==="bottom");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}return 0}get rightFrozenColCount(){if(!this._table.isPivotChart())return this._table.internalProps.rightFrozenColCount?this.colCount-this.rowHeaderLevelCount>=this._table.internalProps.rightFrozenColCount?this._table.internalProps.rightFrozenColCount:this.colCount-this.rowHeaderLevelCount:0;const t=this._table.pivotChartAxes.find(e=>e.orient==="right");return(t==null?void 0:t.visible)===!1||this.indicatorsAsCol?0:this.hasTwoIndicatorAxes?1:0}get bodyRowCount(){return this.rowCount-this.bottomFrozenRowCount-this.headerLevelCount}get bodyColCount(){return this.colCount-this.rightFrozenColCount-this.rowHeaderLevelCount}get headerObjects(){return this._headerObjects}get columnObjects(){return this._indicators}getCellId(t,e){var n,o,r,s,l;if(e>=0&&t>=0){if(this.isSeriesNumber(t,e))return"";if(this.isCornerHeader(t,e))return(n=this._cornerHeaderCellIds[e])===null||n===void 0?void 0:n[t-this.leftRowSeriesNumberColumnCount];if(this.isColumnHeader(t,e))return(o=this._columnHeaderCellIds[e])===null||o===void 0?void 0:o[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount];if(this.isRowHeader(t,e))return(r=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||r===void 0?void 0:r[t-this.leftRowSeriesNumberColumnCount];if(this.isRightFrozenColumn(t,e))return(s=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||s===void 0?void 0:s[this.rowHeaderLevelCount-1];if(this.isBottomFrozenRow(t,e))return(l=this._columnHeaderCellIds[this.columnHeaderLevelCount-1])===null||l===void 0?void 0:l[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount]}}getHeader(t,e){var n;if(this.isSeriesNumberInHeader(t,e))return this.getSeriesNumberHeader(t,e);const o=this.getCellId(t,e);return(n=this._headerObjectMap[o])!==null&&n!==void 0?n:{id:void 0,field:"",headerType:"text",define:void 0}}getHeaderField(t,e){var n,o;const r=this.getCellId(t,e);return((n=this._headerObjectMap[r])===null||n===void 0?void 0:n.field)||((o=this.getBody(t,e))===null||o===void 0?void 0:o.field)}getHeaderCellAdressById(t){for(let e=0;e<this._columnHeaderCellIds.length;e++){const n=this._columnHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o+this._table.frozenColCount,row:e}}for(let e=0;e<this._rowHeaderCellIds.length;e++){const n=this._rowHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e+this._table.frozenRowCount}}for(let e=0;e<this._cornerHeaderCellIds.length;e++){const n=this._cornerHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e}}}getHeaderCellAddressByField(t){const e=this.headerObjects.find(n=>n&&n.field===t);return e&&this.getHeaderCellAdressById(e.id)}getBody(t,e){var n,o,r,s,l,a,h,d,u,c;const g=this.getBodyWidthCache(t,e);if(g)return g;if(this.isSeriesNumber(t,e)){const b=this.getSeriesNumberBody(t,e);return this.setBodyWidthCache(t,e,b),b}const f=this.getCellHeaderPaths(t,e);if(this.indicatorsAsCol){const b=(o=(n=f.colHeaderPaths)===null||n===void 0?void 0:n.find(_=>_.indicatorKey))===null||o===void 0?void 0:o.indicatorKey,C=z(b)&&(l=(s=(r=this._indicators)===null||r===void 0?void 0:r.find(_=>_.indicatorKey===b))!==null&&s!==void 0?s:this._indicators[0])!==null&&l!==void 0?l:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,C),C}const p=(h=(a=f.rowHeaderPaths)===null||a===void 0?void 0:a.find(b=>b.indicatorKey))===null||h===void 0?void 0:h.indicatorKey,m=z(p)&&(c=(u=(d=this._indicators)===null||d===void 0?void 0:d.find(b=>b.indicatorKey===p))!==null&&u!==void 0?u:this._indicators[0])!==null&&c!==void 0?c:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,m),m}getCellRange(t,e){var n,o;const r={start:{col:t,row:e},end:{col:t,row:e}};if(!this.isHeader(t,e)||t===-1||e===-1||this.isRightFrozenColumn(t,e)||this.isBottomFrozenRow(t,e))return r;if(this._table.isPivotChart()){if(this.isLeftBottomCorner(t,e))return{start:{col:0,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.frozenColCount-1,row:this.rowCount-1}};if(this.isRightTopCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:0},end:{col:this.colCount-1,row:this.frozenRowCount-1}};if(this.isRightBottomCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.colCount-1,row:this.rowCount-1}}}for(let s=0;s<this._largeCellRangeCache.length;s++){const l=this._largeCellRangeCache[s];if(t>=l.start.col&&t<=l.end.col&&e>=l.start.row&&e<=l.end.row)return l}if(this.isHeader(t,e)&&t!==-1&&e!==-1){const s=this.getCellId(t,e);for(let l=t-1;l>=0&&s===this.getCellId(l,e);l--)r.start.col=l;for(let l=t+1;l<((n=this.colCount)!==null&&n!==void 0?n:0)&&s===this.getCellId(l,e);l++)r.end.col=l;for(let l=e-1;l>=0&&s===this.getCellId(t,l);l--)r.start.row=l;for(let l=e+1;l<((o=this.rowCount)!==null&&o!==void 0?o:0)&&!(s!==this.getCellId(t,l)||this.isSeriesNumberInHeader(t,e)&&l>=this.columnHeaderLevelCount);l++)r.end.row=l}return(r.end.col-r.start.col>100||r.end.row-r.start.row>100)&&this._largeCellRangeCache.push(r),r}isCellRangeEqual(t,e,n,o){const r=this.getCellRange(t,e),s=this.getCellRange(n,o);return r.start.col===s.start.col&&r.end.col===s.end.col&&r.start.row===s.start.row&&r.end.row===s.end.row}getBodyIndexByRow(t){return t<this.columnHeaderLevelCount||t>=this.rowCount-this.bottomHeaderRowCount?-1:t-this.columnHeaderLevelCount}get bottomHeaderRowCount(){return this._table.isPivotChart()?this.bottomFrozenRowCount:0}get rightHeaderColCount(){return this._table.isPivotChart()?this.rightFrozenColCount:0}getBodyIndexByCol(t){return t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||t>=this.colCount-this.rightHeaderColCount?-1:t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount}getRecordStartRowByRecordIndex(t){return this.columnHeaderLevelCount+t}getRecordShowIndexByCell(t,e){}getCellHeaderPathsWithTreeNode(t,e){for(let l=0;l<this._largeCellRangeCache.length;l++){const a=this._largeCellRangeCache[l];if(t>=a.start.col&&t<=a.end.col&&e>=a.start.row&&e<=a.end.row)break}let n=this.getColHeaderPathCache(t,e),o=this.getRowHeaderPathCache(t,e);const r=this.getBodyIndexByCol(t),s=this.getBodyIndexByRow(e)+this.currentPageStartIndex;if(!n&&e>=0&&r>=0&&(n=this.columnDimensionTree.getTreePath(r,this.showHeader&&this.showColumnHeader?e-(this.columnHeaderTitle?1:0):this.columnDimensionTree.totalLevel),this.setColHeaderPathCache(t,e,n)),!o&&t>=0&&s>=0){if(o=[],this.rowHierarchyType==="tree"){const l=this._rowHeaderCellFullPathIds[s];let a=this.rowDimensionTree,h=0;for(;a;){const d=[];let u=l[h];for(d.push(u);;){const g=this._headerObjectMap[u];if(!(g!=null&&g.parentCellId))break;d.unshift(g.parentCellId),u=g.parentCellId}const c=a.getTreePathByCellIds(d);o.push(...c),a=this._rowHeaderExtensionTree[l[h]],h++}}else o=this.rowDimensionTree.getTreePath(s,this.showHeader&&this.showRowHeader?t-(this.rowHeaderTitle?1:0)-this.leftRowSeriesNumberColumnCount:this.rowDimensionTree.totalLevel);this.setRowHeaderPathCache(t,e,o)}return{colHeaderPaths:n,rowHeaderPaths:o,cellLocation:this.getCellLocation(t,e)}}getCellHeaderPaths(t,e){var n,o;const r=this.getCellHeaderPathsWithTreeNode(t,e),s={colHeaderPaths:[],rowHeaderPaths:[],cellLocation:r.cellLocation};return(n=r.colHeaderPaths)===null||n===void 0||n.forEach(l=>{var a,h,d;const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.colHeaderPaths.push(u)}),(o=r.rowHeaderPaths)===null||o===void 0||o.forEach(l=>{var a,h,d;if(l.dimensionKey!=="axis"){const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.rowHeaderPaths.push(u)}}),s}getIndicatorInfoByIndicatorKey(t){var e;return(e=this.indicatorsDefine)===null||e===void 0?void 0:e.find(n=>typeof n!="string"&&!!t&&n.indicatorKey===t)}findFullCellIds(t){const e=[];for(let n=0;n<t.length;n++){let o=t[n];for(e.push(o);;){const r=this._headerObjectMap[o];if(!(r!=null&&r.parentCellId))break;e.unshift(r.parentCellId),o=r.parentCellId}}return e}getHeaderDimension(t,e){var n,o,r;if(this.isHeader(t,e)){const s=this.getHeader(t,e);return(o=(n=this.rowsDefine)===null||n===void 0?void 0:n.find(l=>typeof l!="string"&&l.dimensionKey===s.field))!==null&&o!==void 0?o:(r=this.columnsDefine)===null||r===void 0?void 0:r.find(l=>typeof l!="string"&&l.dimensionKey===s.field)}}isColumnIndicatorHeader(t,e){return this._indicatorShowType==="column"&&e===this.columnHeaderLevelCount-1&&t>=this.rowHeaderLevelCount}isRowIndicatorHeader(t,e){return this._indicatorShowType==="row"&&t===this.rowHeaderLevelCount-1&&e>=this.columnHeaderLevelCount}isIndicatorHeader(t,e){return this.isColumnIndicatorHeader(t,e)||this.isRowIndicatorHeader(t,e)}toggleHierarchyState(t,e){var n,o,r,s,l,a;this.colIndex=0;const h=this._rowHeaderCellFullPathIds_FULL.slice(0),d=h.map((g,f)=>({col:t,row:f+this.columnHeaderLevelCount})),u=this.getHeader(t,e);if(u.define.hierarchyState=u.define.hierarchyState===Vt.collapse?Vt.expand:Vt.collapse,this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._rowHeaderCellFullPathIds_FULL=[],this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=[],this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs),this.rowHeaderTitle){const g=++this.sharedVar.seqId,f=Array(this.rowCount-this.columnHeaderLevelCount).fill(g);this._rowHeaderCellFullPathIds_FULL.unshift(f);const p={id:g,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((m,b)=>typeof b=="string"?m:m+(m?`/${b.title}`:`${b.title}`),""),field:void 0,headerType:(o=(n=this.rowHeaderTitle)===null||n===void 0?void 0:n.headerType)!==null&&o!==void 0?o:"text",style:(r=this.rowHeaderTitle)===null||r===void 0?void 0:r.headerStyle,define:{field:"",headerType:"text",cellType:"text",disableHeaderHover:!!(!((s=this.rowHeaderTitle)===null||s===void 0)&&s.disableHeaderHover),disableHeaderSelect:!!(!((l=this.rowHeaderTitle)===null||l===void 0)&&l.disableHeaderSelect)}};this.rowHeaderObjs.push(p),this._headerObjects[g]=p}this._rowHeaderCellFullPathIds_FULL=nm(this._rowHeaderCellFullPathIds_FULL),this.rowHierarchyType==="tree"&&((a=this.extensionRows)===null||a===void 0?void 0:a.length)>=1&&this.generateExtensionRowTree(),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((g,f)=>(g[f.id]=f,g),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0;const c=j9(t,e,h.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),this._rowHeaderCellFullPathIds_FULL.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),d,this);return this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination),c}isHeaderForColWidth(t,e){return this.isHeader(t,e)}getHeaderForColWidth(t,e){return this.getHeader(t,e)}getPivotCellAdress(t){var e;if(!Array.isArray(t))return;let n,o,r=this.rowTree,s=this.columnTree;for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1){if(((e=this==null?void 0:this.cornerSetting)===null||e===void 0?void 0:e.titleOnDimension)==="row"){let g=0;return this.rowHierarchyType==="grid"&&(g=this.rowDimensionKeys.indexOf(d.dimensionKey)),g===-1?void 0:{col:(this.rowHeaderTitle?g+1:g)+this.leftRowSeriesNumberColumnCount,row:0}}const c=this.colDimensionKeys.indexOf(d.dimensionKey);return c===-1?void 0:{col:0+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderTitle?c+1:c}}let u=!1;for(let c=0;c<s.length;c++){const g=s[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){s=g.children,o=g,u=!0;break}}if(!u)for(let c=0;c<r.length;c++){const g=r[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){r=g.children,n=g;break}}}let l=0,a=0;if(n){a=this.columnHeaderLevelCount;const{startInTotal:h,level:d}=n;return a+=h,l=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?d+1:d)+this.leftRowSeriesNumberColumnCount:0+this.leftRowSeriesNumberColumnCount,{col:l,row:a}}if(o){l=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:h,level:d}=o;return l+=h,a=this.columnHeaderTitle?d+1:d,{col:l,row:a}}}getPivotDimensionInfo(t,e){var n;const{colHeaderPaths:o,rowHeaderPaths:r}=this.getCellHeaderPaths(t,e),s=[];return o.length?o.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):r.length?r.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):this.isCornerHeader(t,e)&&(((n=this==null?void 0:this.cornerSetting)===null||n===void 0?void 0:n.titleOnDimension)==="row"?s.push({dimensionKey:this.rowDimensionKeys[(this.rowHeaderTitle?t-1:t)-this.leftRowSeriesNumberColumnCount],isPivotCorner:!0}):s.push({dimensionKey:this.colDimensionKeys[this.columnHeaderTitle?e-1:e],isPivotCorner:!0})),s}getIndicatorKey(t,e){var n;return(n=this.getBody(t,e))===null||n===void 0?void 0:n.indicatorKey}getParentCellId(t,e){if(e!==0)return this.isColumnHeader(t,e)?this.getCellId(t,e-1):this.isRowHeader(t,e)?this.getCellId(t-1,e):void 0}getRowHeaderCellAddressByCellId(t){let e,n;if(this._rowHeaderCellIds.find((o,r)=>!!o.find((s,l)=>s===t&&(e=l,!0))&&(n=r,!0)),z(e)&&z(n))return{col:e,row:n+this.columnHeaderLevelCount}}canMoveHeaderPosition(t,e){if(this.isSeriesNumberInHeader(e.col,e.row)||this.isSeriesNumberInHeader(t.col,t.row)||this.isCornerHeader(e.col,e.row)||t.col<0||t.row<0||e.col<0||e.row<0)return!1;this.isSeriesNumberInBody(e.col,e.row)&&this.isSeriesNumberInBody(t.col,t.row)&&(t.col=t.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1,e.col=e.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1);const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row))return this.getParentCellId(t.col,n.start.row)===this.getParentCellId(e.col,n.start.row);if(this.isRowHeader(t.col,t.row)){if(this.rowHierarchyType!=="tree")return this.getParentCellId(n.start.col,t.row)===this.getParentCellId(n.start.col,e.row);{const o=Le(this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths),r=Le(this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths);if(o.pop(),r.pop(),o.length<=r.length){if(o.length===r.length)return!o.find((s,l)=>s.dimensionKey!==r[l].dimensionKey||s.value!==r[l].value);if(o.length>0){for(let s=0;s<o.length;s++)if(o[s].startInTotal!==r[s].startInTotal)return!1}return!0}}}return!1}moveHeaderPosition(t,e){if(this.canMoveHeaderPosition(t,e)&&!this.isCellRangeEqual(t.col,t.row,e.col,e.row)){const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row)){const o=n.end.col-n.start.col+1;let r;const s=this.getCellRange(e.col,n.start.row);if(r=e.col>=t.col?s.end.col-o+1:s.start.col,r===n.start.col)return null;for(let a=0;a<this._columnHeaderCellFullPathIds.length;a++){const h=this._columnHeaderCellFullPathIds[a].splice(n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,o);h.unshift(r-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnHeaderCellFullPathIds[a],h)}const l=this._columnWidths.splice(n.start.col-this.leftRowSeriesNumberColumnCount,o);return l.unshift(r-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnWidths,l),this.columnDimensionTree.movePosition(this.getCellHeaderPathsWithTreeNode(t.col,t.row).colHeaderPaths.length-1,n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,s.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount),this.columnDimensionTree.reset(this.columnDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.col,targetIndex:r,sourceSize:o,targetSize:s.end.col-s.start.col+1,moveType:"column"}}if(this.isRowHeader(t.col,t.row)){let o;const r=this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths,s=this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths,l=r[r.length-1],a=s[r.length-1],h=l.size;if(o=e.row>=t.row?a.startInTotal+a.size-h:a.startInTotal,o===n.start.row-this.columnHeaderLevelCount)return null;const d=this._rowHeaderCellIds.splice(n.start.row-this.columnHeaderLevelCount,h);d.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellIds,d);const u=this._rowHeaderCellFullPathIds.splice(n.start.row-this.columnHeaderLevelCount,h);u.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds,u);const c=this._rowHeaderCellIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);c.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellIds_FULL,c);const g=this._rowHeaderCellFullPathIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);return g.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL,g),this.rowDimensionTree.movePosition(r.length-1,n.start.row-this.columnHeaderLevelCount,o+(e.row>t.row?l.size-1:0)),this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.row,targetIndex:o+this.columnHeaderLevelCount,sourceSize:h,targetSize:a.size,moveType:"row"}}}return null}getCellAdressByHeaderPath(t){var e,n,o,r,s,l;let a,h,d=!1,u=!1;if(Array.isArray(t)){if(t.length>this.rowDimensionKeys.length+this.colDimensionKeys.length)return;a=t.filter(y=>this.colDimensionKeys.indexOf(y.dimensionKey)>=0||this.colDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey),h=t.filter(y=>this.rowDimensionKeys.indexOf(y.dimensionKey)>=0||this.rowDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey)}else a=t.colHeaderPaths,h=t.rowHeaderPaths,(t==null?void 0:t.cellLocation)==="body"&&this._table.isPivotTable()&&(u=!0);if(!Array.isArray(a)&&!Array.isArray(h))return;if(a==null||a.sort((y,S)=>{var R,A;return this.colDimensionKeys.indexOf((R=y.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)-this.colDimensionKeys.indexOf((A=S.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)}),h==null||h.sort((y,S)=>{var R,A;return this.fullRowDimensionKeys.indexOf((R=y.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)-this.fullRowDimensionKeys.indexOf((A=S.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)}),a==null||a.forEach(y=>{y.isPivotCorner&&(d=!0)}),h==null||h.forEach(y=>{y.isPivotCorner&&(d=!0)}),d){if(this.cornerSetting.titleOnDimension==="all"&&this.indicatorsAsCol&&a.length===0){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((e=h[0])===null||e===void 0?void 0:e.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderLevelCount-1}}else if(this.cornerSetting.titleOnDimension!=="all"||this.indicatorsAsCol||h.length!==0){if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="all"&&!this.indicatorsAsCol){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((o=h[0])===null||o===void 0?void 0:o.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:0}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((r=a[0])===null||r===void 0?void 0:r.dimensionKey)===this.colDimensionKeys[y])return{col:0,row:y}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((n=a[0])===null||n===void 0?void 0:n.dimensionKey)===this.colDimensionKeys[y])return{col:this.rowHeaderLevelCount-1,row:y}}let c,g,f,p,m=!1;(a==null?void 0:a.length)>=1&&(h==null?void 0:h.length)>=1&&(m=!0);let b,C,_=this.rowTree,w=this.columnTree;if(a)for(let y=0;y<a.length;y++){const S=a[y];for(let R=0;R<w.length;R++){const A=w[R];if(!z(S.indicatorKey)&&A.dimensionKey===S.dimensionKey&&A.value===S.value||z(S.indicatorKey)&&A.indicatorKey===S.indicatorKey){w=A.children,m&&!w?C=A:m||(C=A);break}}}if((h==null?void 0:h.length)>=1)if(this.rowHierarchyType==="tree"){const y=h[h.length-1],S=this.headerObjects.filter(A=>((A==null?void 0:A.field)===y.dimensionKey||(A==null?void 0:A.field)===y.indicatorKey)&&(A==null?void 0:A.title)===y.value).map(A=>A.id),R=this._rowHeaderCellIds.filter(A=>S.indexOf(A[A.length-1])>=0).find(A=>{const x=this.findFullCellIds(A);return x.length===h.length&&x.every(T=>{const M=this._headerObjectMap[T];return h.find(B=>B.dimensionKey===M.field&&B.value===M.title)})});g=this._rowHeaderCellIds.indexOf(R)+this.columnHeaderLevelCount}else for(let y=0;y<h.length;y++){const S=h[y];for(let R=0;R<_.length;R++){const A=_[R];if(!z(S.indicatorKey)&&A.dimensionKey===S.dimensionKey&&A.value===S.value||z(S.indicatorKey)&&A.indicatorKey===S.indicatorKey&&(!z(S.value)||A.value===S.value)){_=A.children,(!m||_&&!_.some(x=>x.dimensionKey==="axis"))&&m||(b=A);break}}}if(u||!m||(b||z(g))&&C){if(b||u){g=this.columnHeaderLevelCount;const{startInTotal:y,level:S}=(s=b)!==null&&s!==void 0?s:BT;g+=y??0,f=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?S+1:S)+this.leftRowSeriesNumberColumnCount:0}if(C||u){c=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:y,level:S}=(l=C)!==null&&l!==void 0?l:BT;c+=y??0,p=this.columnHeaderTitle?S+1:S}return z(c)||z(g)?{col:c??f,row:g??p}:void 0}}setChartInstance(t,e,n){var o,r,s,l;const a=this.getCellHeaderPaths(t,e);let h;if(this.indicatorsAsCol){const d=(o=a.colHeaderPaths.find(u=>u.indicatorKey))===null||o===void 0?void 0:o.indicatorKey;h=(r=this._indicators)===null||r===void 0?void 0:r.find(u=>u.indicatorKey===d)}else{const d=(s=a.rowHeaderPaths.find(u=>u.indicatorKey))===null||s===void 0?void 0:s.indicatorKey;h=(l=this._indicators)===null||l===void 0?void 0:l.find(u=>u.indicatorKey===d)}typeof(h==null?void 0:h.chartSpec)!="function"&&h&&(h.chartInstance=n)}getChartInstance(t,e){var n,o,r,s;const l=this.getCellHeaderPaths(t,e);let a;if(this.indicatorsAsCol){const h=(n=l.colHeaderPaths.find(d=>d.indicatorKey))===null||n===void 0?void 0:n.indicatorKey;a=(o=this._indicators)===null||o===void 0?void 0:o.find(d=>d.indicatorKey===h)}else{const h=(r=l.rowHeaderPaths.find(d=>d.indicatorKey))===null||r===void 0?void 0:r.indicatorKey;a=(s=this._indicators)===null||s===void 0?void 0:s.find(d=>d.indicatorKey===h)}return a==null?void 0:a.chartInstance}checkHasChart(){return pT(this)}getDimension(t,e){var n,o;return e==="column"?(n=this.columnsDefine)===null||n===void 0?void 0:n.find(r=>typeof r!="string"&&r.dimensionKey===t):e==="row"?(o=this.rowsDefine)===null||o===void 0?void 0:o.find(r=>typeof r!="string"&&r.dimensionKey===t):void 0}getAxisConfigInPivotChart(t,e){if((this.isFrozenColumn(t,e)||this.isRightFrozenColumn(t,e))&&El(t,e,"row",this)||(this.isFrozenRow(t,e)||this.isBottomFrozenRow(t,e))&&El(t,e,"col",this))return Et.getFunction("getAxisConfigInPivotChart")(t,e,this)}isEmpty(t,e){return!!this._table.isPivotChart()&&(!!this.isLeftBottomCorner(t,e)||!!this.isRightBottomCorner(t,e)||!!this.isRightTopCorner(t,e))}isAxisCell(t,e){return this._table.isPivotChart()?!!(this.indicatorKeys.length>=1&&Fh(this.indicatorsDefine)&&(this.isBottomFrozenRow(t,e)&&El(t,e,"col",this)||this.isRightFrozenColumn(t,e)&&El(t,e,"row",this)||this.isRowHeader(t,e)&&t===this.rowHeaderLevelCount-1&&El(t,e,"row",this)||this.hasTwoIndicatorAxes&&this.indicatorsAsCol&&e===this.columnHeaderLevelCount-1&&El(t,e,"col",this))):!1}getChartAxes(t,e){if(_V(t,e,this)||this.isAxisCell(t,e))return SV(t,e,this)}getRawChartSpec(t,e){return bV(t,e,this)}getChartSpec(t,e){return wV(t,e,this)}isShareChartSpec(t,e){return CV(t,e,this)}getChartDataId(t,e){return fT(t,e,this)}isNoChartDataRenderNothing(t,e){return yV(t,e,this)}setPagination(t){var e,n,o,r,s,l,a;if(this.clearCellRangeMap(),this._table.internalProps.useOneRowHeightFillAll=!1,this.pagination=t,this.rowHierarchyType==="grid"&&z((e=this.pagination)===null||e===void 0?void 0:e.perPageCount)&&z((n=this.pagination)===null||n===void 0?void 0:n.currentPage)){this.indicatorsAsCol===!1&&(this.pagination.perPageCount=Math.ceil(this.pagination.perPageCount/this.indicatorKeys.length)*this.indicatorKeys.length);const{perPageCount:h,currentPage:d}=this.pagination;this.currentPageStartIndex=h*(d||0),this.currentPageEndIndex=this.currentPageStartIndex+h,this._rowHeaderCellIds=(o=this._rowHeaderCellIds_FULL)===null||o===void 0?void 0:o.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(r=this._rowHeaderCellFullPathIds_FULL)===null||r===void 0?void 0:r.slice(this.currentPageStartIndex,this.currentPageEndIndex)}else this.currentPageStartIndex=0,this.currentPageEndIndex=this._rowHeaderCellIds_FULL.length,this._rowHeaderCellIds=(s=this._rowHeaderCellIds_FULL)===null||s===void 0?void 0:s.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(l=this._rowHeaderCellFullPathIds_FULL)===null||l===void 0?void 0:l.slice(this.currentPageStartIndex,this.currentPageEndIndex);this.pagination&&(this.pagination.totalCount=(a=this._rowHeaderCellIds_FULL)===null||a===void 0?void 0:a.length)}release(){var t;const e=this._table._getActiveChartInstance();e==null||e.release(),(t=this._indicators)===null||t===void 0||t.forEach(n=>{var o;(o=n.chartInstance)===null||o===void 0||o.release()})}getHeadNode(t,e){var n,o,r;let s;const l=this.getCellHeaderPaths(t,e);return l.rowHeaderPaths&&((o=(n=l.rowHeaderPaths)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0?s=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.slice(0,l.rowHeaderPaths.length):l.colHeaderPaths&&l.colHeaderPaths.length>0&&(s=l.colHeaderPaths.slice(0,l.colHeaderPaths.length)),this.getHeadNodeByRowOrColDimensions(s,t,e)}getHeadNodeByRowOrColDimensions(t,e,n){var o;if(!Array.isArray(t))return;let r,s,l=this.rowTree,a=this.columnTree;if(z(n)&&z(e)&&this.rowHierarchyType==="tree"&&this.extensionRows&&e>=1+this.leftRowSeriesNumberColumnCount){const h=this.getCellId(e-1,n);l=this._rowHeaderExtensionTree[h].tree.children}for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1)return;let u=!1;for(let c=0;c<a.length;c++){const g=a[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){a=g.children,s=g,u=!0;break}}if(!u)for(let c=0;(o=c<(l==null?void 0:l.length))!==null&&o!==void 0&&o;c++){const g=l[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){l=g.children,r=g;break}}}return r||s||void 0}clearCellRangeMap(){this._largeCellRangeCache.length=0,this._CellHeaderPathMap=new Map}getDimensionKeyInChartSpec(t,e){var n,o,r,s,l,a;let h;if(this.indicatorsAsCol===!1)for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(n=u.xField)!==null&&n!==void 0?n:(r=(o=u==null?void 0:u.series)===null||o===void 0?void 0:o[0])===null||r===void 0?void 0:r.xField,h))return h}else for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(s=u.yField)!==null&&s!==void 0?s:(a=(l=u==null?void 0:u.series)===null||l===void 0?void 0:l[0])===null||a===void 0?void 0:a.yField,h))return h}return null}_generateChartState(){return{vtable_selected:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}},vtable_selected_reverse:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}}}}updateDataStateToChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();this._indicators.forEach(o=>{var r;const s=o.chartInstance;((r=o.chartSpec.select)===null||r===void 0?void 0:r.enable)!==!1&&s.updateState(n)}),t==null||t.updateState(n)}}updateDataStateToActiveChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();t==null||t.updateState(n)}}getIndicatorKeyInChartSpec(t,e){const n=this.getRawChartSpec(t,e),o=[];if(n){if(n.series||n.xField||n.yField)return this.indicatorsAsCol===!1?n.series?n.series.forEach(r=>{const s=r.yField;o.push(s)}):o.push(n.yField):n.series?n.series.forEach(r=>{const s=r.xField;o.push(s)}):o.push(n.xField),o;if(n.valueField&&o.push(n.valueField),o.length>=1)return o}return null}getOptimunHeightForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(this.rowHeaderLevelCount,t).rowHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="yField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=PT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=ee((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[0]+d[2]}getOptimunWidthForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(t,this.columnHeaderLevelCount).colHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="xField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=PT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=ee((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[1]+d[3]}get leftAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="left");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}get topAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="top");return(t==null?void 0:t.visible)===!1?0:this.indicatorsAsCol&&this.hasTwoIndicatorAxes?1:0}get rightAxesCount(){return this.rightFrozenColCount}get bottomAxesCount(){return this.bottomFrozenRowCount}getColKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.colHeaderPaths.length&&n.colHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getRowKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.rowHeaderPaths.length&&n.rowHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getIndicatorInfo(t,e=""){var n;return(n=this.indicatorsDefine)===null||n===void 0?void 0:n.find(o=>typeof o!="string"&&(t?o.indicatorKey===t:!!e&&o.title===e))}getLayoutColumnTree(){const t=[],e=this.columnDimensionTree.tree.children;return rv(t,e),t}getLayoutRowTree(){const t=[],e=this.rowDimensionTree.tree.children;return rv(t,e),t}getLayoutColumnTreeCount(){const t=this.columnDimensionTree.tree.children;return yg(t,this.rowHierarchyType==="tree")}getLayoutRowTreeCount(){var t;const e=this.rowDimensionTree.tree.children;let n=yg(e,this.rowHierarchyType==="tree");return(t=this.extensionRows)===null||t===void 0||t.forEach(o=>{if(typeof o.rowTree!="function"){const r=yg(o.rowTree,!0);n*=r}}),n}resetHeaderTree(){var t,e,n;this.colIndex=0,this._rowHeaderCellFullPathIds_FULL=[],this._columnHeaderCellFullPathIds=[],this._columnHeaderCellIds=[];const o=this.dataset;this.rowTree=o.rowHeaderTree,this.columnTree=o.colHeaderTree;const r=this.rowDimensionTree.tree.children;(t=this.rowTree)===null||t===void 0||t.forEach((s,l)=>{const a=r.find(h=>h.dimensionKey===s.dimensionKey&&h.value===s.value);a&&this._table._syncHierarchyState(a,s)}),this.columnDimensionTree=new He((e=this.columnTree)!==null&&e!==void 0?e:[],this.sharedVar),this.rowDimensionTree=new He((n=this.rowTree)!==null&&n!==void 0?n:[],this.sharedVar,this.rowHierarchyType,this.rowHierarchyType==="tree"?this.rowExpandLevel:void 0),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=nm(this._rowHeaderCellFullPathIds_FULL),this._headerObjectMap=this._headerObjects.reduce((s,l)=>(s[l.id]=l,s),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination)}isSeriesNumberInHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount}isSeriesNumberInBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount}isSeriesNumber(t,e){return!!(z(t)&&z(e)&&(this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount))}getSeriesNumberHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount?Object.assign({},this.leftRowSeriesNumberColumn[t],{style:this._table.internalProps.rowSeriesNumber.headerStyle}):this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount&&e<this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}getSeriesNumberBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.leftRowSeriesNumberColumn[t]:this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}changeTreeNodeTitle(t,e,n){this.getHeadNode(t,e).value=n;const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}changeCornerTitle(t,e,n){if(this.isCornerHeader(t,e)){const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}}generateCellIdsConsiderHideHeader(){if(this._columnHeaderCellIds=this._columnHeaderCellFullPathIds.slice(),!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(Zi),e=this._columnHeaderCellIds.splice(t,1);this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length),this._columnHeaderCellIds.push(e[0])}else this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length);if(this._rowHeaderCellIds_FULL=this._rowHeaderCellFullPathIds_FULL.slice(),!this.showRowHeader)if(this.indicatorsAsCol||this.hideIndicatorName)this._rowHeaderCellIds_FULL.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._rowHeaderCellIds_FULL[e]=n});else{const t=this.rowDimensionKeys.indexOf(Zi);this._rowHeaderCellIds_FULL.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._rowHeaderCellIds_FULL[n]=o})}if(this._rowHeaderCellIds=this._rowHeaderCellIds_FULL.slice(),this._cornerHeaderCellIds=this._cornerHeaderCellFullPathIds.slice(),this.rowHeaderLevelCount===0||this.columnHeaderLevelCount===0)this._cornerHeaderCellIds=[];else if(this.cornerSetting.titleOnDimension!=="row"||this.showRowHeader){if(this.cornerSetting.titleOnDimension==="column"&&!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(Zi),e=this._cornerHeaderCellIds.splice(t,1);this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length),this._cornerHeaderCellIds.push(e[0])}else this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length)}else if(this.indicatorsAsCol||this.hideIndicatorName)this._cornerHeaderCellIds.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._cornerHeaderCellIds[e]=n});else{const t=this.rowDimensionKeys.indexOf(Zi);this._cornerHeaderCellIds.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._cornerHeaderCellIds[n]=o})}}enableUseGetBodyCache(){this._useGetBodyCache=!0,this._getBodyCache.clear()}disableUseGetBodyCache(){this._useGetBodyCache=!1,this._getBodyCache.clear()}enableUseHeaderPathCache(){this._useHeaderPathCache=!0,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}disableUseHeaderPathCache(){this._useHeaderPathCache=!1,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}getBodyWidthCache(t,e){if(this._useGetBodyCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e))return this.indicatorsAsCol&&this._getBodyCache.has(t)?this._getBodyCache.get(t):!this.indicatorsAsCol&&this._getBodyCache.has(e)?this._getBodyCache.get(e):void 0}setBodyWidthCache(t,e,n){!this._useGetBodyCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||(this.indicatorsAsCol?this._getBodyCache.set(t,n):this._getBodyCache.set(e,n))}getColHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._colHeaderPathCache.has(t))return this._colHeaderPathCache.get(t)}setColHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._colHeaderPathCache.set(t,n)}getRowHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._rowHeaderPathCache.has(e))return this._rowHeaderPathCache.get(e)}setRowHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._rowHeaderPathCache.set(e,n)}}function PT(i,t,e,n){e===1&&(e=0);const o=$9(i,e,n),r=t/(1-e);return Math.ceil(o*r)}function $9(i,t,e){let n;return n=i===1?i+2*e:i-t+2*e,i?n>0?n:1:0}class mv{constructor(t,e){this.tree={},this.beforeChangedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.dataConfig=t,e&&(this.records=e,typeof window<"u"&&window.performance.now(),this.setRecords(e),typeof window<"u"&&window.performance.now())}changeDataConfig(t){this.dataConfig=t}setRecords(t){this.processRecords()}processRecords(){for(let t=0,e=this.records.length;t<e;t++){const n=this.records[t];this.processRecord(n)}}processRecord(t){var e;const n=[],o=[];for(let r=0,s=this.dataConfig.rows.length;r<s;r++){const l=this.dataConfig.rows[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&o.push(t[l])}for(let r=0,s=this.dataConfig.columns.length;r<s;r++){const l=this.dataConfig.columns[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&n.push(t[l])}(e=this.dataConfig.indicators)===null||e===void 0||e.forEach(r=>{const s=t[r];s!==void 0&&(this.dataConfig.indicatorsAsCol?n.push(r):o.push(r));const l=o.join(this.stringJoinChar),a=n.join(this.stringJoinChar);o.length!==0&&(this.rowFlatKeys[l]||(this.rowFlatKeys[l]=1)),n.length!==0&&(this.colFlatKeys[a]||(this.colFlatKeys[a]=1)),n.length===0&&o.length===0||(this.tree[l]||(this.tree[l]={}),s!==void 0&&(this.tree[l][a]={value:s,record:t},this.dataConfig.indicatorsAsCol?n.pop():o.pop()))})}getTreeNode(t=[],e=[],n,o=!0){var r,s,l,a;let h,d;if(typeof t=="string")h=t;else{let u=!1;t.map((c,g)=>{c===n&&(t.splice(g,1),u=!0)}),u&&t.push(n),h=t.join(this.stringJoinChar)}if(typeof e=="string")d=e;else{let u=!1;e.map((c,g)=>{c===n&&(e.splice(g,1),u=!0)}),u&&e.push(n),d=e.join(this.stringJoinChar)}return o?(l=(s=(r=this.tree)===null||r===void 0?void 0:r[h])===null||s===void 0?void 0:s[d])!==null&&l!==void 0?l:void 0:z((a=this.beforeChangedTree[h])===null||a===void 0?void 0:a[d])?{value:this.beforeChangedTree[h][d].value,record:this.beforeChangedTree[h][d].record}:void 0}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l,a,h,d,u;let c,g;if(typeof t=="string")c=t;else{let m=!1;t.map((b,C)=>{b===n&&(t.splice(C,1),m=!0)}),m&&t.push(n),c=t.join(this.stringJoinChar)}if(typeof e=="string")g=e;else{let m=!1;e.map((b,C)=>{b===n&&(e.splice(C,1),m=!0)}),m&&e.push(n),g=e.join(this.stringJoinChar)}const f=(s=(r=this.tree[c])===null||r===void 0?void 0:r[g])===null||s===void 0?void 0:s.value,p=Object.assign({},(a=(l=this.tree[c])===null||l===void 0?void 0:l[g])===null||a===void 0?void 0:a.record);!((d=(h=this.tree[c])===null||h===void 0?void 0:h[g])===null||d===void 0)&&d.record?(this.tree[c][g].record[n]=o,this.tree[c][g].value=o):(this.tree[c]||(this.tree[c]={}),this.tree[c][g]={record:this._buildRecord(t,e,n,o),value:o}),!((u=this.beforeChangedTree[c])===null||u===void 0)&&u[g]||(this.beforeChangedTree[c]={},this.beforeChangedTree[c][g]={record:void 0,value:void 0},this.beforeChangedTree[c][g].record=p,this.beforeChangedTree[c][g].value=f)}_buildRecord(t=[],e=[],n,o){const r={},s=this.dataConfig.rows,l=this.dataConfig.columns;return s.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=t[h])}),l.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=e[h])}),r[n]=o,this.records.push(r),r}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}this.records.push(t)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.dataConfig.indicators.length;r++)this.dataConfig.indicators[r]===t&&(o=!0);if(!o){for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}}function HT(i,t){let e="";for(let n=0;n<i.length;n++)e+=i[n],n!==i.length-1&&(e+=t);return e}class Oh{constructor(t,e,n,o,r,s,l,a,h,d,u,c,g){var f,p,m,b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt,bt;this.tree={},this.changedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.colKeys_normal=[],this.rowKeys_normal=[],this.rowOrder="key_a_to_z",this.colOrder="key_a_to_z",this.sorted=!1,this.indicatorStatistics=[],this.aggregators={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.registerAggregators(),this.dataConfig=t,this.filterRules=(f=this.dataConfig)===null||f===void 0?void 0:f.filterRules,this.rowHierarchyType=a??"grid",this.sortRules=(p=this.dataConfig)===null||p===void 0?void 0:p.sortRules,this.aggregationRules=(m=this.dataConfig)===null||m===void 0?void 0:m.aggregationRules,this.derivedFieldRules=(b=this.dataConfig)===null||b===void 0?void 0:b.derivedFieldRules,this.mappingRules=(C=this.dataConfig)===null||C===void 0?void 0:C.mappingRules,this.calculatedFieldRules=(_=this.dataConfig)===null||_===void 0?void 0:_.calculatedFieldRules,this.calculatedFiledKeys=(y=(w=this.calculatedFieldRules)===null||w===void 0?void 0:w.map(Ct=>Ct.key))!==null&&y!==void 0?y:[],this.calculatedFieldDependIndicatorKeys=(R=(S=this.calculatedFieldRules)===null||S===void 0?void 0:S.reduce((Ct,at)=>{for(let rt=0;rt<at.dependIndicatorKeys.length;rt++)Ct.indexOf(at.dependIndicatorKeys[rt])===-1&&Ct.push(at.dependIndicatorKeys[rt]);return Ct},[]))!==null&&R!==void 0?R:[],this.totals=(A=this.dataConfig)===null||A===void 0?void 0:A.totals,this.rows=e,this.columns=n,this.indicatorKeys=o,this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys=[...o];for(let Ct=0;Ct<this.calculatedFieldDependIndicatorKeys.length;Ct++)this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.indexOf(this.calculatedFieldDependIndicatorKeys[Ct])===-1&&this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.push(this.calculatedFieldDependIndicatorKeys[Ct]);if(this.indicatorsAsCol=s,this.indicators=r,this.customColTree=h,this.customRowTree=d,this.hasExtensionRowTree=c,this.parseCustomTreeToMatchRecords=g,this.parseCustomTreeToMatchRecords&&(this.customColTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customColTree,"col"),this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))),this.colGrandTotalLabel=(M=(T=(x=this.totals)===null||x===void 0?void 0:x.column)===null||T===void 0?void 0:T.grandTotalLabel)!==null&&M!==void 0?M:"总计",this.colSubTotalLabel=(F=(P=(B=this.totals)===null||B===void 0?void 0:B.column)===null||P===void 0?void 0:P.subTotalLabel)!==null&&F!==void 0?F:"小计",this.rowGrandTotalLabel=(k=(E=(H=this.totals)===null||H===void 0?void 0:H.row)===null||E===void 0?void 0:E.grandTotalLabel)!==null&&k!==void 0?k:"总计",this.rowSubTotalLabel=(D=(L=(I=this.totals)===null||I===void 0?void 0:I.row)===null||L===void 0?void 0:L.subTotalLabel)!==null&&D!==void 0?D:"小计",this.collectValuesBy=(O=this.dataConfig)===null||O===void 0?void 0:O.collectValuesBy,this.needSplitPositiveAndNegative=u!=null&&u,this.rowsIsTotal=new Array((N=(W=this.rows)===null||W===void 0?void 0:W.length)!==null&&N!==void 0?N:0).fill(!1),this.colsIsTotal=new Array((U=($=this.columns)===null||$===void 0?void 0:$.length)!==null&&U!==void 0?U:0).fill(!1),((Y=this.totals)===null||Y===void 0?void 0:Y.row)&&this.totals.row.showSubTotals!==!1&&this.totals.row.subTotalsDimensions)for(let Ct=0,at=(et=(Z=(G=(j=this.totals)===null||j===void 0?void 0:j.row)===null||G===void 0?void 0:G.subTotalsDimensions)===null||Z===void 0?void 0:Z.length)!==null&&et!==void 0?et:0;Ct<at;Ct++){const rt=this.totals.row.subTotalsDimensions[Ct],ct=this.rows.indexOf(rt);this.rowsIsTotal[ct]=!0}if(!((gt=this.totals)===null||gt===void 0)&>.column&&this.totals.column.showSubTotals!==!1&&this.totals.column.subTotalsDimensions)for(let Ct=0,at=(bt=(nt=(it=(vt=this.totals)===null||vt===void 0?void 0:vt.column)===null||it===void 0?void 0:it.subTotalsDimensions)===null||nt===void 0?void 0:nt.length)!==null&&bt!==void 0?bt:0;Ct<at;Ct++){const rt=this.totals.column.subTotalsDimensions[Ct],ct=this.columns.indexOf(rt);this.colsIsTotal[ct]=!0}this.setRecords(l)}setRecords(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w;this.records=t,this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.tree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.rowsHasValue=[],this.columnsHasValue=[],t&&(this.records=t,typeof window<"u"&&window.performance.now(),this.processRecords(),this.processCollectedValuesWithSumBy(),this.generateCollectedValuesSortRule(),this.processCollectedValuesWithSortBy(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.totalStatistics(),typeof window<"u"&&window.performance.now(),this.rowKeys_normal=this.rowKeys.slice(),this.colKeys_normal=this.colKeys.slice(),typeof window<"u"&&window.performance.now(),this.sortKeys(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.customRowTree?this.rowHeaderTree=this.customRowTree:this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((y,S)=>this.rowsHasValue[S]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((y,S)=>this.rowsHasValue[S]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u),this.customColTree?this.colHeaderTree=this.customColTree:this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((y,S)=>this.columnsHasValue[S]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(_=(C=(b=this.totals)===null||b===void 0?void 0:b.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&_!==void 0&&_),typeof window<"u"&&window.performance.now(),!((w=this.dataConfig)===null||w===void 0)&&w.isPivotChart&&this.cacheDeminsionCollectedValues())}registerAggregator(t,e){this.aggregators[t]=e}registerAggregators(){this.registerAggregator(zt.RECORD,kx),this.registerAggregator(zt.SUM,Ix),this.registerAggregator(zt.COUNT,Dx),this.registerAggregator(zt.MAX,zx),this.registerAggregator(zt.MIN,Nx),this.registerAggregator(zt.AVG,Ox),this.registerAggregator(zt.NONE,Fx),this.registerAggregator(zt.RECALCULATE,Q4)}processCollectedValuesWithSumBy(){var t,e,n,o,r,s;for(const l in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[l])===null||e===void 0)&&e.sumBy)for(const a in this.collectedValues[l]){let h;((n=this.collectValuesBy[l])===null||n===void 0?void 0:n.extendRange)==="sum"?(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>g+f.value(),0),h+=Math.round(h/20)):(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()>g?f.value():g,Number.MIN_SAFE_INTEGER),((o=this.collectValuesBy[l])===null||o===void 0?void 0:o.extendRange)==="max"?h+=Math.round(h/20):typeof((r=this.collectValuesBy[l])===null||r===void 0?void 0:r.extendRange)=="number"&&(h=Math.max(h,(s=this.collectValuesBy[l])===null||s===void 0?void 0:s.extendRange)));const d=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()<g?f.value():g,Number.MAX_SAFE_INTEGER);let u,c;this.needSplitPositiveAndNegative&&(u=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.positiveValue()>g?f.positiveValue():g,Number.MIN_SAFE_INTEGER),c=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.negativeValue()<g?f.negativeValue():g,Number.MAX_SAFE_INTEGER)),this.collectedValues[l][a]={},this.collectedValues[l][a].max=h,this.collectedValues[l][a].min=d,this.needSplitPositiveAndNegative&&(this.collectedValues[l][a].positiveMax=u,this.collectedValues[l][a].negativeMin=c)}}processCollectedValuesWithSortBy(){var t,e;const n=this;for(const o in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[o])===null||e===void 0)&&e.sortBy)for(const r in this.collectedValues[o])this.collectedValues[o][r]=this.collectedValues[o][r].sort((s,l)=>{var a,h,d,u;return((h=(a=n.collectValuesBy[o].sortBy)===null||a===void 0?void 0:a.indexOf(s))!==null&&h!==void 0?h:-1)-((u=(d=n.collectValuesBy[o].sortBy)===null||d===void 0?void 0:d.indexOf(l))!==null&&u!==void 0?u:-1)})}generateCollectedValuesSortRule(){for(const t in this.collectedValues)if(this.collectValuesBy&&this.collectValuesBy[t]&&!this.collectValuesBy[t].sortBy){let e=[];for(const n in this.collectedValues[t])Array.isArray(this.collectedValues[t][n])&&(e.push(...this.collectedValues[t][n]),e=Array.from(new Set(e)));e.length>0&&(this.collectValuesBy[t].sortBy=e)}}processRecords(){var t,e;let n=!1;if(((e=(t=this.filterRules)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0)>=1&&(n=!0),Array.isArray(this.records)){this.filteredRecords||(this.filteredRecords=[]);for(let o=0,r=this.records.length;o<r;o++){const s=this.records[o];n&&!this.filterRecord(s)||(this.filteredRecords.push(s),this.processRecord(s))}}else{this.filteredRecords||(this.filteredRecords={});for(const o in this.records)for(let r=0,s=this.records[o].length;r<s;r++){const l=this.records[o][r];n&&!this.filterRecord(l)||(this.filteredRecords[o]||(this.filteredRecords[o]=[]),this.filteredRecords[o].push(l),this.processRecord(l,o))}}this.rowFlatKeys={},this.colFlatKeys={}}filterRecord(t){var e,n;let o=!0;if(this.filterRules)for(let r=0;r<this.filterRules.length;r++){const s=this.filterRules[r];if(s.filterKey){const l=t[s.filterKey];if(((e=s.filteredValues)===null||e===void 0?void 0:e.indexOf(l))===-1){o=!1;break}}else if(!(!((n=s.filterFunc)===null||n===void 0)&&n.call(s,t))){o=!1;break}}return o}processRecord(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt,bt,Ct,at,rt,ct,ht,_t,ut,It,Ut,yt,Tt,kt,oe,re,ye,Oe;(n=this.derivedFieldRules)===null||n===void 0||n.forEach((mt,Bt)=>{mt.fieldName&&mt.derivedFunc&&(t[mt.fieldName]=mt.derivedFunc(t))});for(const mt in this.collectValuesBy)if(z(t[mt])){this.collectedValues[mt]||(this.collectedValues[mt]={});const Bt=this.collectValuesBy[mt].by.map(Kt=>t[Kt]).join(this.stringJoinChar);if(this.collectedValues[mt][Bt]||(this.collectValuesBy[mt].sumBy?this.collectedValues[mt][Bt]={}:this.collectValuesBy[mt].range?this.collectedValues[mt][Bt]={min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER}:this.collectedValues[mt][Bt]=[]),this.collectValuesBy[mt].sumBy){const Kt=this.collectValuesBy[mt].sumBy.map(qt=>t[qt]).join(this.stringJoinChar);this.collectedValues[mt][Bt][Kt]||(this.collectedValues[mt][Bt][Kt]=new this.aggregators[zt.SUM]({key:mt,dimension:mt,isRecord:void 0,needSplitPositiveAndNegative:this.needSplitPositiveAndNegative})),this.collectedValues[mt][Bt][Kt].push(t)}else if(this.collectValuesBy[mt].range){const Kt=this.collectedValues[mt][Bt],qt=Math.max(t[mt],Kt.max),fe=Math.min(t[mt],Kt.min);isNaN(qt)||(Kt.max=qt,Kt.min=fe)}else{const Kt=this.collectedValues[mt][Bt];Kt.indexOf(t[mt])===-1&&Kt.push(t[mt])}}let Be=!1;const Ee=[],At=[];if(!this.parseCustomTreeToMatchRecords||!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart||!(!((r=this.customRowTree)===null||r===void 0)&&r.length)||e||this.hasExtensionRowTree){const mt=[];At.push({rowKey:mt,indicatorKey:e});for(let Bt=0,Kt=this.rows.length;Bt<Kt;Bt++){const qt=this.rows[Bt];if(qt in t)this.rowsHasValue[Bt]=!0,mt.push(t[qt]);else if(qt!==Zi){if(!((a=(l=(s=this.dataConfig)===null||s===void 0?void 0:s.totals)===null||l===void 0?void 0:l.row)===null||a===void 0)&&a.showGrandTotals&&Bt===0&&!this.rows.find(fe=>fe in t)){mt.push(this.rowGrandTotalLabel),Be=!0;break}if(!((u=(d=(h=this.dataConfig)===null||h===void 0?void 0:h.totals)===null||d===void 0?void 0:d.row)===null||u===void 0)&&u.subTotalsDimensions&&((f=(g=(c=this.dataConfig)===null||c===void 0?void 0:c.totals)===null||g===void 0?void 0:g.row)===null||f===void 0?void 0:f.subTotalsDimensions.indexOf(this.rows[Bt-1]))>=0){this.rowHierarchyType==="grid"&&mt.push(this.rowSubTotalLabel),Be=!0;break}}}}else{const mt=this.getFieldMatchRowDimensionPaths(t);if(mt.length>0)for(let Bt=0,Kt=mt.length;Bt<Kt;Bt++){const qt=mt[Bt],fe=[];let Yt;for(let Nt=0,dt=qt.length;Nt<dt;Nt++)z(qt[Nt].indicatorKey)?Yt=qt[Nt].indicatorKey:fe.push(qt[Nt].value);At.push({rowKey:fe,indicatorKey:Yt})}}if(!this.parseCustomTreeToMatchRecords||!((p=this.dataConfig)===null||p===void 0)&&p.isPivotChart||!(!((m=this.customColTree)===null||m===void 0)&&m.length)||e||this.hasExtensionRowTree){const mt=[];Ee.push({colKey:mt,indicatorKey:e});for(let Bt=0,Kt=this.columns.length;Bt<Kt;Bt++){const qt=this.columns[Bt];if(qt in t)this.columnsHasValue[Bt]=!0,mt.push(t[qt]);else if(qt!==Zi){if(!((_=(C=(b=this.dataConfig)===null||b===void 0?void 0:b.totals)===null||C===void 0?void 0:C.column)===null||_===void 0)&&_.showGrandTotals&&Bt===0&&!this.columns.find(fe=>fe in t)){mt.push(this.colGrandTotalLabel),Be=!0;break}if(!((S=(y=(w=this.dataConfig)===null||w===void 0?void 0:w.totals)===null||y===void 0?void 0:y.column)===null||S===void 0)&&S.subTotalsDimensions&&((x=(A=(R=this.dataConfig)===null||R===void 0?void 0:R.totals)===null||A===void 0?void 0:A.column)===null||x===void 0?void 0:x.subTotalsDimensions.indexOf(this.columns[Bt-1]))>=0){mt.push(this.colSubTotalLabel),Be=!0;break}}}}else{const mt=this.getFieldMatchColDimensionPaths(t);if(mt.length>0)for(let Bt=0,Kt=mt.length;Bt<Kt;Bt++){const qt=mt[Bt],fe=[];let Yt;for(let Nt=0,dt=qt.length;Nt<dt;Nt++)z(qt[Nt].indicatorKey)?Yt=qt[Nt].indicatorKey:fe.push(qt[Nt].value);Ee.push({colKey:fe,indicatorKey:Yt})}}for(let mt=0;mt<At.length;mt++){const Bt=At[mt].rowKey;let Kt;this.indicatorsAsCol||(Kt=At[mt].indicatorKey);for(let qt=0;qt<Ee.length;qt++){const fe=Ee[qt].colKey;this.indicatorsAsCol&&(Kt=Ee[qt].indicatorKey);const Yt=Bt.join(this.stringJoinChar),Nt=fe.join(this.stringJoinChar);if(Be){this.totalRecordsTree[Yt]||(this.totalRecordsTree[Yt]={}),this.totalRecordsTree[Yt][Nt]||(this.totalRecordsTree[Yt][Nt]=[]);const Ft=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let $t=0;$t<Ft.length;$t++)if(this.calculatedFiledKeys.indexOf(Ft[$t])>=0){const ae=(T=this.calculatedFieldRules)===null||T===void 0?void 0:T.find(Ti=>Ti.key===Ft[$t]);!((B=(M=this.totalRecordsTree[Yt])===null||M===void 0?void 0:M[Nt])===null||B===void 0)&&B[$t]||(this.totalRecordsTree[Yt][Nt][$t]=new this.aggregators[zt.RECALCULATE]({key:Ft[$t],dimension:Ft[$t],isRecord:!0,formatFun:(F=(P=this.indicators)===null||P===void 0?void 0:P.find(Ti=>typeof Ti!="string"&&Ti.indicatorKey===Ft[$t]))===null||F===void 0?void 0:F.format,calculateFun:ae==null?void 0:ae.calculateFun,dependAggregators:this.totalRecordsTree[Yt][Nt],dependIndicatorKeys:ae==null?void 0:ae.dependIndicatorKeys})),Ft[$t]in t&&((E=(H=this.totalRecordsTree[Yt])===null||H===void 0?void 0:H[Nt])===null||E===void 0||E[$t].push(t))}else{const ae=this.getAggregatorRule(Ft[$t]);!((I=(k=this.totalRecordsTree[Yt])===null||k===void 0?void 0:k[Nt])===null||I===void 0)&&I[$t]||(this.totalRecordsTree[Yt][Nt][$t]=new this.aggregators[(L=ae==null?void 0:ae.aggregationType)!==null&&L!==void 0?L:zt.SUM]({key:Ft[$t],dimension:(D=ae==null?void 0:ae.field)!==null&&D!==void 0?D:Ft[$t],formatFun:(O=ae==null?void 0:ae.formatFun)!==null&&O!==void 0?O:(N=(W=this.indicators)===null||W===void 0?void 0:W.find(Ti=>typeof Ti!="string"&&Ti.indicatorKey===Ft[$t]))===null||N===void 0?void 0:N.format})),Ft[$t]in t&&((U=($=this.totalRecordsTree[Yt])===null||$===void 0?void 0:$[Nt])===null||U===void 0||U[$t].push(t))}return}Bt.length!==0&&(this.rowFlatKeys[Yt]||(this.rowKeys.push(Bt),this.rowFlatKeys[Yt]=1)),fe.length!==0&&(this.colFlatKeys[Nt]||(this.colKeys.push(fe),this.colFlatKeys[Nt]=1)),this.tree[Yt]||(this.tree[Yt]={}),!((Y=this.tree[Yt])===null||Y===void 0)&&Y[Nt]||(this.tree[Yt][Nt]=[]);const dt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Ft=0;Ft<dt.length;Ft++)if(this.calculatedFiledKeys.indexOf(dt[Ft])>=0){const $t=(j=this.calculatedFieldRules)===null||j===void 0?void 0:j.find(ae=>ae.key===dt[Ft]);!((Z=(G=this.tree[Yt])===null||G===void 0?void 0:G[Nt])===null||Z===void 0)&&Z[Ft]||(this.tree[Yt][Nt][Ft]=new this.aggregators[zt.RECALCULATE]({key:dt[Ft],dimension:dt[Ft],isRecord:!0,formatFun:(gt=(et=this.indicators)===null||et===void 0?void 0:et.find(ae=>typeof ae!="string"&&ae.indicatorKey===dt[Ft]))===null||gt===void 0?void 0:gt.format,calculateFun:$t==null?void 0:$t.calculateFun,dependAggregators:this.tree[Yt][Nt],dependIndicatorKeys:$t==null?void 0:$t.dependIndicatorKeys})),(it=(vt=this.tree[Yt])===null||vt===void 0?void 0:vt[Nt])===null||it===void 0||it[Ft].push(t)}else{const $t=this.getAggregatorRule(dt[Ft]);let ae=!1;Kt?e===Kt?dt[Ft]===Kt&&(ae=!0):dt[Ft]===Kt&&dt[Ft]in t&&(ae=!0):$t!=null&&$t.field?typeof($t==null?void 0:$t.field)=="string"?($t==null?void 0:$t.field)in t&&(ae=!0):$t!=null&&$t.field.find(Ti=>Ti in t)&&(ae=!0):dt[Ft]in t&&(ae=!0),!(!((bt=(nt=this.tree[Yt])===null||nt===void 0?void 0:nt[Nt])===null||bt===void 0)&&bt[Ft])&&ae&&(this.tree[Yt][Nt][Ft]=new this.aggregators[(Ct=$t==null?void 0:$t.aggregationType)!==null&&Ct!==void 0?Ct:zt.SUM]({key:dt[Ft],dimension:(at=$t==null?void 0:$t.field)!==null&&at!==void 0?at:dt[Ft],formatFun:(rt=$t==null?void 0:$t.formatFun)!==null&&rt!==void 0?rt:(ht=(ct=this.indicators)===null||ct===void 0?void 0:ct.find(Ti=>typeof Ti!="string"&&Ti.indicatorKey===dt[Ft]))===null||ht===void 0?void 0:ht.format})),ae&&((ut=(_t=this.tree[Yt])===null||_t===void 0?void 0:_t[Nt])===null||ut===void 0||ut[Ft].push(t))}if(this.mappingRules)for(let Ft=0;Ft<this.indicatorKeys.length;Ft++){if(!this.indicatorStatistics[Ft]){const $t=this.getAggregatorRule(this.indicatorKeys[Ft]);this.indicatorStatistics[Ft]={max:new this.aggregators[zt.MAX]({key:this.indicatorKeys[Ft],dimension:this.indicatorKeys[Ft]}),min:new this.aggregators[zt.MIN]({key:this.indicatorKeys[Ft],dimension:this.indicatorKeys[Ft]}),total:new this.aggregators[(It=$t==null?void 0:$t.aggregationType)!==null&&It!==void 0?It:zt.SUM]({key:this.indicatorKeys[Ft],dimension:(Ut=$t==null?void 0:$t.field)!==null&&Ut!==void 0?Ut:this.indicatorKeys[Ft],formatFun:(yt=$t==null?void 0:$t.formatFun)!==null&&yt!==void 0?yt:(kt=(Tt=this.indicators)===null||Tt===void 0?void 0:Tt.find(ae=>typeof ae!="string"&&ae.indicatorKey===this.indicatorKeys[Ft]))===null||kt===void 0?void 0:kt.format})}}this.indicatorStatistics[Ft].max.push((re=(oe=this.tree[Yt])===null||oe===void 0?void 0:oe[Nt])===null||re===void 0?void 0:re[Ft].value()),this.indicatorStatistics[Ft].min.push((Oe=(ye=this.tree[Yt])===null||ye===void 0?void 0:ye[Nt])===null||Oe===void 0?void 0:Oe[Ft].value()),this.indicatorStatistics[Ft].total.push(t)}}}}updateSortRules(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_;this.sorted=!1,this.sortRules=t,this.sortKeys(),this.customRowTree||(this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((w,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((w,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u)),this.customColTree||(this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((w,y)=>this.columnsHasValue[y]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(_=(C=(b=this.totals)===null||b===void 0?void 0:b.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&_!==void 0&&_))}updateFilterRules(t,e=!1){var n,o;if(this.filterRules=t,this.filteredRecords=void 0,e)this.tree={};else for(const r in this.tree)for(const s in this.tree[r])for(let l=0;l<this.tree[r][s].length;l++)(n=this.tree[r][s][l])===null||n===void 0||n.reset();this.collectedValues={},this.processRecords(),this.processCollectedValuesWithSumBy(),this.processCollectedValuesWithSortBy(),this.totalStatistics(),!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart&&this.cacheDeminsionCollectedValues()}getAggregatorRule(t){var e;return(e=this.aggregationRules)===null||e===void 0?void 0:e.find((n,o)=>t===n.indicatorKey)}getAggregator(t=[],e=[],n,o=!0,r){var s,l,a,h;const d=this.indicatorKeys.indexOf(n);let u,c;typeof t=="string"?u=t:(r&&r.position!=="row"||t.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||t.splice(p,1)}),u=HT(t,this.stringJoinChar)),typeof e=="string"?c=e:(r&&r.position!=="col"||e.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||e.splice(p,1)}),c=HT(e,this.stringJoinChar));const g=(l=(s=this.tree[u])===null||s===void 0?void 0:s[c])===null||l===void 0?void 0:l[d];if(o&&z((h=(a=this.changedTree[u])===null||a===void 0?void 0:a[c])===null||h===void 0?void 0:h[d])){const f=this.changedTree[u][c][d];return g?{value:()=>f,formatValue:g.formatValue,formatFun:g.formatFun,records:g.records,className:"",recalculate(){},push(){},deleteRecord(){},updateRecord(){},clearCacheValue(){},reset(){}}:{value:()=>f,className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},formatValue:()=>f,clearCacheValue(){},reset(){}}}return g||{className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},value:()=>null,clearCacheValue(){},reset(){}}}sortKeys(){if(this.colKeys=this.colKeys_normal.slice(),this.rowKeys=this.rowKeys_normal.slice(),!this.sorted){this.sorted=!0,this.rowKeys.sort(this.arrSort(this.rows,!0));const t=this.arrSort(this.columns,!1);this.colKeys.sort(t)}}arrSort(t,e){let n;const o=this,r=function(s){const l=[];for(let a=0,h=t.length;a<h;a++)if(n=t[a],o.sortRules)for(let d=0,u=o.sortRules.length;d<u;d++)o.sortRules[d].sortField===n&&l.push({field:n,fieldIndex:a,sortRule:o.sortRules[d],func:o.getSort(o.sortRules[d],e)});return l}.call(this);return function(s,l){var a,h,d,u;let c,g;for(let f=0;f<r.length;f++){if(g=r[f],(a=g.sortRule)===null||a===void 0?void 0:a.sortByIndicator){let p=s,m=l;g.fieldIndex<t.length-1&&(p=s.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?p.push(o.rowSubTotalLabel):e||p.push(o.colSubTotalLabel),m=l.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?m.push(o.rowSubTotalLabel):e||m.push(o.colSubTotalLabel)),c=g.func(p,m,(h=g.sortRule)===null||h===void 0?void 0:h.sortType)}else c=(d=g.func)===null||d===void 0?void 0:d.call(g,s[g.fieldIndex],l[g.fieldIndex],(u=g.sortRule)===null||u===void 0?void 0:u.sortType);if(c!==0)return c}return 0}}getSort(t,e){const n=this;return t.sortByIndicator?(o,r,s)=>{const l=function(a,h){return n.rowHierarchyType==="grid"&&a.length<n.rows.length&&a[a.length-1]!==n.rowSubTotalLabel&&a[a.length-1]!==n.rowGrandTotalLabel&&a.push(n.rowSubTotalLabel),h.length<n.columns.length&&h[h.length-1]!==n.colSubTotalLabel&&h[h.length-1]!==n.colGrandTotalLabel&&h.push(n.colSubTotalLabel),n.getAggregator(a,h,t.sortByIndicator).value()};return e?yc(l(o,t.query),l(r,t.query),s):yc(l(t.query,o),l(t.query,r),s)}:t.sortBy?e6(t.sortBy):t.sortFunc?t.sortFunc:t.sortType?t6:yc}totalStatistics(){var t,e,n,o,r,s,l,a,h,d,u,c,g,f;const p=this,m=(b,C)=>{var _,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt,bt,Ct,at,rt,ct,ht,_t,ut,It,Ut,yt,Tt,kt,oe,re,ye,Oe,Be;if(!((w=(_=this.totalRecordsTree)===null||_===void 0?void 0:_[b])===null||w===void 0)&&w[C])return this.tree[b]||(this.tree[b]={}),void(this.tree[b][C]=(S=(y=this.totalRecordsTree)===null||y===void 0?void 0:y[b])===null||S===void 0?void 0:S[C]);const Ee=C.split(this.stringJoinChar);if(!((A=(R=p.totals)===null||R===void 0?void 0:R.column)===null||A===void 0)&&A.subTotalsDimensions&&((M=(T=(x=p.totals)===null||x===void 0?void 0:x.column)===null||T===void 0?void 0:T.subTotalsDimensions)===null||M===void 0?void 0:M.length)>0&&p.totals.column.showSubTotals!==!1)for(let At=0,mt=(F=(P=(B=p.totals)===null||B===void 0?void 0:B.column)===null||P===void 0?void 0:P.subTotalsDimensions)===null||F===void 0?void 0:F.length;At<mt;At++){const Bt=p.totals.column.subTotalsDimensions[At],Kt=p.columns.indexOf(Bt);if(Kt>=0){const qt=Ee.slice(0,Kt+1);qt.push(p.colSubTotalLabel);const fe=qt.join(this.stringJoinChar);if(!((E=(H=this.totalRecordsTree)===null||H===void 0?void 0:H[b])===null||E===void 0)&&E[fe])return void(this.tree[b][fe]=(I=(k=this.totalRecordsTree)===null||k===void 0?void 0:k[b])===null||I===void 0?void 0:I[fe]);this.tree[b][fe]||(this.tree[b][fe]=[]);const Yt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Nt=0;Nt<Yt.length;Nt++)if(this.calculatedFiledKeys.indexOf(Yt[Nt])>=0){const dt=(L=this.calculatedFieldRules)===null||L===void 0?void 0:L.find(Ft=>Ft.key===Yt[Nt]);!((O=(D=this.tree[b])===null||D===void 0?void 0:D[fe])===null||O===void 0)&&O[Nt]||(this.tree[b][fe][Nt]=new this.aggregators[zt.RECALCULATE]({key:Yt[Nt],dimension:Yt[Nt],isRecord:!0,formatFun:(N=(W=this.indicators)===null||W===void 0?void 0:W.find(Ft=>typeof Ft!="string"&&Ft.indicatorKey===Yt[Nt]))===null||N===void 0?void 0:N.format,calculateFun:dt==null?void 0:dt.calculateFun,dependAggregators:this.tree[b][fe],dependIndicatorKeys:dt==null?void 0:dt.dependIndicatorKeys})),fe!==C&&this.tree[b][fe][Nt].push((U=($=p.tree[b])===null||$===void 0?void 0:$[C])===null||U===void 0?void 0:U[Nt])}else{if(!this.tree[b][fe][Nt]){const dt=this.getAggregatorRule(Yt[Nt]);this.tree[b][fe][Nt]=new this.aggregators[(Y=dt==null?void 0:dt.aggregationType)!==null&&Y!==void 0?Y:zt.SUM]({key:Yt[Nt],dimension:(j=dt==null?void 0:dt.field)!==null&&j!==void 0?j:Yt[Nt],formatFun:(G=dt==null?void 0:dt.formatFun)!==null&&G!==void 0?G:(et=(Z=this.indicators)===null||Z===void 0?void 0:Z.find(Ft=>typeof Ft!="string"&&Ft.indicatorKey===Yt[Nt]))===null||et===void 0?void 0:et.format})}fe!==C&&this.tree[b][fe][Nt].push((vt=(gt=p.tree[b])===null||gt===void 0?void 0:gt[C])===null||vt===void 0?void 0:vt[Nt])}}}if(!((nt=(it=p.totals)===null||it===void 0?void 0:it.column)===null||nt===void 0)&&nt.showGrandTotals||this.rows.length===0){const At=p.colGrandTotalLabel;if(!((Ct=(bt=this.totalRecordsTree)===null||bt===void 0?void 0:bt[b])===null||Ct===void 0)&&Ct[At])return void(this.tree[b][At]=(rt=(at=this.totalRecordsTree)===null||at===void 0?void 0:at[b])===null||rt===void 0?void 0:rt[At]);this.tree[b][At]||(this.tree[b][At]=[]);const mt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Bt=0;Bt<mt.length;Bt++)if(this.calculatedFiledKeys.indexOf(mt[Bt])>=0){const Kt=(ct=this.calculatedFieldRules)===null||ct===void 0?void 0:ct.find(qt=>qt.key===mt[Bt]);!((_t=(ht=this.tree[b])===null||ht===void 0?void 0:ht[At])===null||_t===void 0)&&_t[Bt]||(this.tree[b][At][Bt]=new this.aggregators[zt.RECALCULATE]({key:mt[Bt],dimension:mt[Bt],isRecord:!0,formatFun:(It=(ut=this.indicators)===null||ut===void 0?void 0:ut.find(qt=>typeof qt!="string"&&qt.indicatorKey===mt[Bt]))===null||It===void 0?void 0:It.format,calculateFun:Kt==null?void 0:Kt.calculateFun,dependAggregators:this.tree[b][At],dependIndicatorKeys:Kt==null?void 0:Kt.dependIndicatorKeys})),At!==C&&this.tree[b][At][Bt].push((yt=(Ut=p.tree[b])===null||Ut===void 0?void 0:Ut[C])===null||yt===void 0?void 0:yt[Bt])}else{if(!this.tree[b][At][Bt]){const Kt=this.getAggregatorRule(mt[Bt]);this.tree[b][At][Bt]=new this.aggregators[(Tt=Kt==null?void 0:Kt.aggregationType)!==null&&Tt!==void 0?Tt:zt.SUM]({key:mt[Bt],dimension:(kt=Kt==null?void 0:Kt.field)!==null&&kt!==void 0?kt:mt[Bt],formatFun:(oe=Kt==null?void 0:Kt.formatFun)!==null&&oe!==void 0?oe:(ye=(re=this.indicators)===null||re===void 0?void 0:re.find(qt=>typeof qt!="string"&&qt.indicatorKey===mt[Bt]))===null||ye===void 0?void 0:ye.format})}At!==C&&this.tree[b][At][Bt].push((Be=(Oe=p.tree[b])===null||Oe===void 0?void 0:Oe[C])===null||Be===void 0?void 0:Be[Bt])}}};if(!((e=(t=p==null?void 0:p.totals)===null||t===void 0?void 0:t.column)===null||e===void 0)&&e.subTotalsDimensions&&((r=(o=(n=p==null?void 0:p.totals)===null||n===void 0?void 0:n.column)===null||o===void 0?void 0:o.subTotalsDimensions)===null||r===void 0?void 0:r.length)>=1||!((l=(s=p==null?void 0:p.totals)===null||s===void 0?void 0:s.row)===null||l===void 0)&&l.subTotalsDimensions&&((d=(h=(a=p==null?void 0:p.totals)===null||a===void 0?void 0:a.row)===null||h===void 0?void 0:h.subTotalsDimensions)===null||d===void 0?void 0:d.length)>=1||!((c=(u=p==null?void 0:p.totals)===null||u===void 0?void 0:u.column)===null||c===void 0)&&c.showGrandTotals||!((f=(g=p==null?void 0:p.totals)===null||g===void 0?void 0:g.row)===null||f===void 0)&&f.showGrandTotals){const b=[];Object.keys(p.tree).forEach(C=>{const _=C.split(this.stringJoinChar);Object.keys(p.tree[C]).forEach(w=>{var y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt;if(!((S=(y=p.totals)===null||y===void 0?void 0:y.row)===null||S===void 0)&&S.subTotalsDimensions&&((x=(A=(R=p.totals)===null||R===void 0?void 0:R.row)===null||A===void 0?void 0:A.subTotalsDimensions)===null||x===void 0?void 0:x.length)>0&&p.totals.row.showSubTotals!==!1)for(let bt=0,Ct=(B=(M=(T=p.totals)===null||T===void 0?void 0:T.row)===null||M===void 0?void 0:M.subTotalsDimensions)===null||B===void 0?void 0:B.length;bt<Ct;bt++){const at=p.totals.row.subTotalsDimensions[bt],rt=p.rows.indexOf(at);if(rt>=0&&rt<p.rows.length-1){const ct=_.slice(0,rt+1);this.rowHierarchyType==="grid"&&ct.push(p.rowSubTotalLabel);const ht=ct.join(this.stringJoinChar);this.tree[ht]||(this.tree[ht]={},b.push(ht)),this.tree[ht][w]||(this.tree[ht][w]=[]);const _t=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let ut=0;ut<_t.length;ut++){if(!this.tree[ht][w][ut])if(this.calculatedFiledKeys.indexOf(_t[ut])>=0){const It=(P=this.calculatedFieldRules)===null||P===void 0?void 0:P.find(Ut=>Ut.key===_t[ut]);this.tree[ht][w][ut]=new this.aggregators[zt.RECALCULATE]({key:_t[ut],dimension:_t[ut],isRecord:!0,formatFun:(H=(F=this.indicators)===null||F===void 0?void 0:F.find(Ut=>typeof Ut!="string"&&Ut.indicatorKey===_t[ut]))===null||H===void 0?void 0:H.format,calculateFun:It==null?void 0:It.calculateFun,dependAggregators:this.tree[ht][w],dependIndicatorKeys:It==null?void 0:It.dependIndicatorKeys})}else{const It=this.getAggregatorRule(_t[ut]);this.tree[ht][w][ut]=new this.aggregators[(E=It==null?void 0:It.aggregationType)!==null&&E!==void 0?E:zt.SUM]({key:_t[ut],dimension:(k=It==null?void 0:It.field)!==null&&k!==void 0?k:_t[ut],formatFun:(I=It==null?void 0:It.formatFun)!==null&&I!==void 0?I:(D=(L=this.indicators)===null||L===void 0?void 0:L.find(Ut=>typeof Ut!="string"&&Ut.indicatorKey===_t[ut]))===null||D===void 0?void 0:D.format})}ht!==C&&this.tree[ht][w][ut].push((W=(O=p.tree[C])===null||O===void 0?void 0:O[w])===null||W===void 0?void 0:W[ut])}}}if(!(($=(N=p.totals)===null||N===void 0?void 0:N.row)===null||$===void 0)&&$.showGrandTotals||this.columns.length===0){const bt=p.rowGrandTotalLabel;this.tree[bt]||(this.tree[bt]={},b.push(bt)),this.tree[bt][w]||(this.tree[bt][w]=[]);const Ct=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let at=0;at<Ct.length;at++){if(!this.tree[bt][w][at])if(this.calculatedFiledKeys.indexOf(Ct[at])>=0){const rt=(U=this.calculatedFieldRules)===null||U===void 0?void 0:U.find(ct=>ct.key===Ct[at]);this.tree[bt][w][at]=new this.aggregators[zt.RECALCULATE]({key:Ct[at],dimension:Ct[at],isRecord:!0,formatFun:(j=(Y=this.indicators)===null||Y===void 0?void 0:Y.find(ct=>typeof ct!="string"&&ct.indicatorKey===Ct[at]))===null||j===void 0?void 0:j.format,calculateFun:rt==null?void 0:rt.calculateFun,dependAggregators:this.tree[bt][w],dependIndicatorKeys:rt==null?void 0:rt.dependIndicatorKeys})}else{const rt=this.getAggregatorRule(Ct[at]);this.tree[bt][w][at]=new this.aggregators[(G=rt==null?void 0:rt.aggregationType)!==null&&G!==void 0?G:zt.SUM]({key:Ct[at],dimension:(Z=rt==null?void 0:rt.field)!==null&&Z!==void 0?Z:Ct[at],formatFun:(et=rt==null?void 0:rt.formatFun)!==null&&et!==void 0?et:(vt=(gt=this.indicators)===null||gt===void 0?void 0:gt.find(ct=>typeof ct!="string"&&ct.indicatorKey===Ct[at]))===null||vt===void 0?void 0:vt.format})}bt!==C&&this.tree[bt][w][at].push((nt=(it=p.tree[C])===null||it===void 0?void 0:it[w])===null||nt===void 0?void 0:nt[at])}}m(C,w)})}),b.forEach(C=>{Object.keys(p.tree[C]).forEach(_=>{m(C,_)})})}for(const b in p.totalRecordsTree)for(const C in p.totalRecordsTree[b])m(b,C)}ArrToTree1(t,e,n,o,r){const s=[],l=this.stringJoinChar,a=new Map;function h(d){const u=[];let c;d.forEach((g,f)=>{var p;u.push(g);const m=u.join(l);let b=a.get(m);b||(b={value:g,dimensionKey:e[f],children:f===d.length-1&&((p=n==null?void 0:n.length)!==null&&p!==void 0?p:0)>=1?n==null?void 0:n.map(C=>typeof C=="string"?{indicatorKey:C,value:C}:{indicatorKey:C.indicatorKey,value:C.title}):[]},a.set(m,b),c?c.children.push(b):s.push(b)),c=b})}return t.forEach(d=>h(d)),o&&h([r]),s}ArrToTree(t,e,n,o,r,s,l,a,h){var d;let u=[];const c=this.stringJoinChar,g=new Map;if(t!=null&&t.length?t.forEach(f=>function(p){const m=[];let b;p.forEach((C,_)=>{var w,y,S,R;m.push(C);const A=m.join(c);let x=g.get(A);if(!x){if(x={value:C,dimensionKey:e[_],children:_===p.length-1&&((w=n==null?void 0:n.length)!==null&&w!==void 0?w:0)>=1?n==null?void 0:n.map(T=>typeof T=="string"?{indicatorKey:T,value:T}:{indicatorKey:T.indicatorKey,value:T.title}):[]},o[_]){let T=(y=x.children)!==null&&y!==void 0?y:[];const M={value:l,dimensionKey:e[_+1],levelSpan:o.length-_-1,children:((S=n==null?void 0:n.length)!==null&&S!==void 0?S:0)>=1?n==null?void 0:n.map(B=>typeof B=="string"?{indicatorKey:B,value:B}:{indicatorKey:B.indicatorKey,value:B.title}):[]};T.push(M),T=(R=M.children)!==null&&R!==void 0?R:[]}g.set(A,x),b?o[_-1]&&!h?b.children.splice(b.children.length-1,0,x):b.children.push(x):u.push(x)}b=x})}(f)):n&&(u=n==null?void 0:n.map(f=>{var p;return typeof f=="string"?{indicatorKey:f,value:f}:{indicatorKey:f.indicatorKey,value:(p=f.title)!==null&&p!==void 0?p:f.indicatorKey}})),r&&(t==null?void 0:t.length)){const f={value:s,dimensionKey:e[0],levelSpan:o.length,children:(d=n==null?void 0:n.map(p=>typeof p=="string"?{indicatorKey:p,value:p}:{indicatorKey:p.indicatorKey,value:p.title}))!==null&&d!==void 0?d:[]};a?u.unshift(f):u.push(f)}return u}cacheDeminsionCollectedValues(){for(const t in this.collectValuesBy)this.collectValuesBy[t].type!=="xField"&&this.collectValuesBy[t].type!=="yField"||(this.dataConfig.dimensionSortArray?this.cacheCollectedValues[t]=G9(this.collectedValues[t],this.dataConfig.dimensionSortArray):this.cacheCollectedValues[t]=this.collectedValues[t])}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l;const a=this.indicatorKeys.indexOf(n);let h,d;h=typeof t=="string"?t:t.join(this.stringJoinChar),d=typeof e=="string"?e:e.join(this.stringJoinChar),!((r=this.changedTree[h])===null||r===void 0)&&r[d]?this.changedTree[h][d][a]=o:this.changedTree[h]?(this.changedTree[h][d]=[],this.changedTree[h][d][a]=o):(this.changedTree[h]={},this.changedTree[h][d]=[],this.changedTree[h][d][a]=o);const u=(l=(s=this.tree[h])===null||s===void 0?void 0:s[d])===null||l===void 0?void 0:l[a];(u==null?void 0:u.records.length)===1&&(u.records[0][this.indicatorKeys[a]]=o)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.indicatorKeys.length;r++)this.indicatorKeys[r]===t&&(o=!0);if(!o){if(Array.isArray(this.records))for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}else for(const r in this.records)for(let s=0,l=this.records[r].length;s<l;s++){const a=this.records[r][s];a[t]===e&&(a[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}_rowTreeHasChanged(){this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))}changeDataConfig(t){this.rows=t.rows,this.columns=t.columns}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}Array.isArray(this.records)&&this.records.push(t)}customTreeToDimensionPathArr(t,e){const n=[],o=this;function r(s,l){var a,h,d;s.virtual||(!((a=l[l.length-1])===null||a===void 0)&&a.childKeys&&s.dimensionKey&&l[l.length-1].childKeys.indexOf(s.dimensionKey)===-1&&s.dimensionKey!==l[l.length-1].dimensionKey&&l[l.length-1].childKeys.push(s.dimensionKey),l.push({dimensionKey:z(s.indicatorKey)?void 0:s.dimensionKey,value:s.value,indicatorKey:s.indicatorKey,virtual:s.virtual})),((h=s.children)===null||h===void 0?void 0:h.length)>0?(o.rowHierarchyType==="tree"&&e==="row"&&(l[l.length-1].childKeys=[],n.push([...l])),(d=s.children)===null||d===void 0||d.forEach(u=>r(u,[...l]))):n.push(l)}return t==null||t.forEach(s=>r(s,[])),n}getFieldMatchColDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customColTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customColTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}}l&&o.push(s)}return o}getFieldMatchRowDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customRowTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customRowTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}if(h.childKeys&&a===s.length-1&&h.childKeys.length>0&&h.childKeys.find(d=>z(t[d]))){l=!1;break}}l&&(this.indicatorsAsCol||this.rowHierarchyType!=="tree"||s.find(a=>a.indicatorKey)||(l=!1)),l&&o.push(s)}return o}}function G9(i,t){return i.sort((e,n)=>{const o=t.indexOf(e),r=t.indexOf(n);return o<r?-1:o>r?1:0})}let ET=class extends _g{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C;if(le.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},e){e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Le(e.columns),this.internalProps.rows=Le(e.rows),this.internalProps.indicators=go(e.indicators),(n=e.indicators)===null||n===void 0||n.forEach((w,y)=>{typeof w=="object"&&(w!=null&&w.editor)&&(this.internalProps.indicators[y].editor=w.editor)}),this.internalProps.columnTree=!e.indicatorsAsCol||!((o=e.columns)===null||o===void 0)&&o.length||e.columnTree?Le(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((r=e.rows)===null||r===void 0)&&r.length||e.rowTree?Le(e.rowTree):[],this.internalProps.records=e.records,this.pagination=e.pagination,this.internalProps.columnResizeType=(s=e.columnResizeType)!==null&&s!==void 0?s:"column",this.internalProps.rowResizeType=(l=e.rowResizeType)!==null&&l!==void 0?l:"row",this.internalProps.dataConfig=Le(e.dataConfig),this.internalProps.columnWidthConfig=e.columnWidthConfig;const _=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((a=_==null?void 0:_[0])===null||a===void 0?void 0:a.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((h=e.customConfig)===null||h===void 0?void 0:h.enableDataAnalysis)===!1){const w=new He((d=this.internalProps.columnTree)!==null&&d!==void 0?d:[],this.layoutNodeId),y=new He((u=this.internalProps.rowTree)!==null&&u!==void 0?u:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(c=this.options.rowExpandLevel)!==null&&c!==void 0?c:1:void 0);this.internalProps.layoutMap=new hr(this,null,w,y),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new mv({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey},_))}else{const w=YR(this,e),{rowKeys:y,columnKeys:S,indicatorKeys:R}=w;let{columnDimensionTree:A,rowDimensionTree:x}=w;this.dataset=new Oh(this.internalProps.dataConfig,y,S,R,this.internalProps.indicators,(g=e.indicatorsAsCol)===null||g===void 0||g,e.records,e.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!e.extensionRows,!!e.parseCustomTreeToMatchRecords),e.columnTree||(e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,e.indicators)),A=new He((f=this.dataset.colHeaderTree)!==null&&f!==void 0?f:[],this.layoutNodeId)),e.rowTree||(e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,e.indicators)),x=new He((p=this.dataset.rowHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(m=this.options.rowExpandLevel)!==null&&m!==void 0?m:1:void 0)),this.internalProps.layoutMap=new hr(this,this.dataset,A,x)}if(this._changePivotSortStateBySortRules(),((C=(b=e.pivotSortState)===null||b===void 0?void 0:b.length)!==null&&C!==void 0?C:0)>0&&(this.pivotSortState=[],this.pivotSortState=e.pivotSortState),le.mode!=="node"&&(this.editorManager=new mT(this)),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.stateManager.initCheckedState(_),this.scenegraph.createSceneGraph(),e.title){const w=Et.getComponent("title");this.internalProps.title=new w(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const w=Et.getComponent("emptyTip");this.internalProps.emptyTip=new w(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(lt.INITIALIZED,null)},0)}}static get EVENT_TYPE(){return lr}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!1}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n){if(this.internalProps.layoutMap.isSeriesNumber(t,e)&&this.internalProps.rowSeriesNumber.disableColumnResize===!0)return!1;if(!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_;const w=this.internalProps;if(super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Le(t.columns),this.internalProps.rows=Le(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?go(t.indicators):[],(n=t.indicators)===null||n===void 0||n.forEach((S,R)=>{typeof S=="object"&&(S!=null&&S.editor)&&(this.internalProps.indicators[R].editor=S.editor)}),this.internalProps.columnTree=!t.indicatorsAsCol||!((o=t.columns)===null||o===void 0)&&o.length||t.columnTree?Le(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((r=t.rows)===null||r===void 0)&&r.length||t.rowTree?Le(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.stateManager.initCheckedState(this.internalProps.records),this.stateManager.updateDrillState(void 0,void 0,!1,!1,-1,-1),this.pagination=t.pagination,w.columnResizeType=(s=t.columnResizeType)!==null&&s!==void 0?s:"column",w.rowResizeType=(l=t.rowResizeType)!==null&&l!==void 0?l:"row",w.dataConfig=Le(t.dataConfig),this.internalProps.columnWidthConfig=t.columnWidthConfig,(t==null?void 0:t.rowHierarchyType)==="tree"&&this.internalProps.layoutMap.rowHierarchyType==="tree"&&this.internalProps.layoutMap.rowExpandLevel===(t==null?void 0:t.rowExpandLevel)){const S=this.internalProps.layoutMap.rowDimensionTree.tree.children;(a=this.internalProps.rowTree)===null||a===void 0||a.forEach((R,A)=>{const x=S.find(T=>T.dimensionKey===R.dimensionKey&&T.value===R.value);x&&this._syncHierarchyState(x,R)})}const y=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((h=y==null?void 0:y[0])===null||h===void 0?void 0:h.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((d=t.customConfig)===null||d===void 0?void 0:d.enableDataAnalysis)===!1){let S,R;t.columnTree&&(S=new He((u=this.internalProps.columnTree)!==null&&u!==void 0?u:[],this.layoutNodeId)),t.rowTree&&(R=new He((c=this.internalProps.rowTree)!==null&&c!==void 0?c:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(g=this.options.rowExpandLevel)!==null&&g!==void 0?g:1:void 0)),w.layoutMap=new hr(this,null,S,R),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new mv({rows:w.layoutMap.fullRowDimensionKeys,columns:w.layoutMap.colDimensionKeys,indicators:w.layoutMap.indicatorKeys,indicatorsAsCol:w.layoutMap.indicatorsAsCol,indicatorDimensionKey:w.layoutMap.indicatorDimensionKey},y))}else{const S=YR(this,t),{rowKeys:R,columnKeys:A,indicatorKeys:x}=S;let{columnDimensionTree:T,rowDimensionTree:M}=S;this.dataset=new Oh(w.dataConfig,R,A,x,this.internalProps.indicators,(f=t.indicatorsAsCol)===null||f===void 0||f,y,t.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!t.extensionRows,!!t.parseCustomTreeToMatchRecords),t.columnTree||(t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,t.indicators)),T=new He((p=this.dataset.colHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId)),t.rowTree||(t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,t.indicators)),M=new He((m=this.dataset.rowHeaderTree)!==null&&m!==void 0?m:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(b=this.options.rowExpandLevel)!==null&&b!==void 0?b:1:void 0)),w.layoutMap=new hr(this,this.dataset,T,M)}if(this._changePivotSortStateBySortRules(),((_=(C=t.pivotSortState)===null||C===void 0?void 0:C.length)!==null&&_!==void 0?_:0)>0&&(this.pivotSortState=[],this.pivotSortState=t.pivotSortState),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,w.releaseList&&(w.releaseList.forEach(S=>{var R;return(R=S==null?void 0:S.release)===null||R===void 0?void 0:R.call(S)}),w.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const S=Et.getComponent("title");this.internalProps.title=new S(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const S=Et.getComponent("emptyTip");this.internalProps.emptyTip=new S(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(S=>{setTimeout(S,0)})}updatePagination(t){t?(this.pagination||(this.pagination={currentPage:0,perPageCount:0}),typeof t.currentPage=="number"&&t.currentPage>=0&&(this.pagination.currentPage=t.currentPage),t.perPageCount&&(this.pagination.perPageCount=t.perPageCount||this.pagination.perPageCount),this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(this.pagination),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render()):this.pagination&&(this.pagination=void 0,this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(void 0),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render())}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a,h;const d=this,{layoutMap:u}=d.internalProps;u&&(d.colCount=(t=u.colCount)!==null&&t!==void 0?t:0,d.rowCount=(e=u.rowCount)!==null&&e!==void 0?e:0,this.internalProps.frozenColCount=Math.max(((n=u.rowHeaderLevelCount)!==null&&n!==void 0?n:0)+u.leftRowSeriesNumberColumnCount,(o=this.options.frozenColCount)!==null&&o!==void 0?o:0),d.frozenRowCount=Math.max(u.headerLevelCount,(r=this.options.frozenRowCount)!==null&&r!==void 0?r:0),d.bottomFrozenRowCount!==((s=this.options.bottomFrozenRowCount)!==null&&s!==void 0?s:0)&&(d.bottomFrozenRowCount=(l=this.options.bottomFrozenRowCount)!==null&&l!==void 0?l:0),d.rightFrozenColCount!==((a=this.options.rightFrozenColCount)!==null&&a!==void 0?a:0)&&(d.rightFrozenColCount=(h=this.options.rightFrozenColCount)!==null&&h!==void 0?h:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}get rowHierarchyType(){return this.internalProps.layoutMap.rowHierarchyType}_syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;if(!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r){const a=t.children.find(h=>h.dimensionKey===r.dimensionKey&&h.value===r.value);a&&this._syncHierarchyState(a,r)}}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getFieldData(t,e,n){var o,r,s;if(!this.internalProps.layoutMap.isHeader(e,n)){if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(n),a=this.getBodyIndexByCol(e);return(o=this.records[l])===null||o===void 0?void 0:o[a]}if(this.dataset){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n);if(l){let a;const h=(r=l.colHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(s=l.rowHeaderPaths)===null||s===void 0?void 0:s.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(e,n),!0,a);if(u.records&&u.records.length>=1)return u.records[0][t]}}else if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(e,n).indicatorKey,!1);if(d!=null&&d.record)return d==null?void 0:d.record[t]}}}getCellValue(t,e,n){var o,r,s,l,a,h,d;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isSeriesNumber(t,e)){if(this.internalProps.layoutMap.isSeriesNumberInHeader(t,e)){const{title:c}=this.internalProps.layoutMap.getSeriesNumberHeader(t,e);return c}const{format:u}=this.internalProps.layoutMap.getSeriesNumberBody(t,e);return typeof u=="function"?u(t,e,this):e-this.columnHeaderLevelCount+1}if(this.internalProps.layoutMap.isHeader(t,e)){const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.internalProps.recordsIsTwoDimensionalArray){const{fieldFormat:u}=this.internalProps.layoutMap.getBody(t,e),c=this.getBodyIndexByRow(e),g=this.getBodyIndexByCol(t),f=(o=this.records[c])===null||o===void 0?void 0:o[g];return typeof u=="function"?u(f,t,e,this):f}if(this.dataset){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e);let c;const g=(s=(r=u.colHeaderPaths)===null||r===void 0?void 0:r.filter(b=>!b.virtual))===null||s===void 0?void 0:s.map((b,C)=>{var _;return b.indicatorKey&&(c={position:"col",index:C}),(_=b.indicatorKey)!==null&&_!==void 0?_:b.value}),f=(a=(l=u.rowHeaderPaths)===null||l===void 0?void 0:l.filter(b=>!b.virtual))===null||a===void 0?void 0:a.map((b,C)=>{var _;return b.indicatorKey&&(c={position:"row",index:C}),(_=b.indicatorKey)!==null&&_!==void 0?_:b.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,c),{fieldFormat:m}=this.internalProps.layoutMap.getBody(t,e);return p.formatValue?p.formatValue(t,e,this):typeof m=="function"?m(p==null?void 0:p.value(),t,e,this):(h=p==null?void 0:p.value())!==null&&h!==void 0?h:""}if(this.flatDataToObjects){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e),c=u.colHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),g=u.rowHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),f=this.flatDataToObjects.getTreeNode(g,c,this.internalProps.layoutMap.getBody(t,e).indicatorKey),{fieldFormat:p}=this.internalProps.layoutMap.getBody(t,e);return typeof p=="function"?p(f==null?void 0:f.value,t,e,this):(d=f==null?void 0:f.value)!==null&&d!==void 0?d:""}}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return d==null?void 0:d.value}}getCellRawValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return d==null?void 0:d.value}}getCellOriginRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return h==null?void 0:h.record}}}getCellRawRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return h==null?void 0:h.record}}}updateSortRules(t,e,n){this.internalProps.dataConfig?this.internalProps.dataConfig.sortRules=t:this.internalProps.dataConfig={sortRules:t},this.dataset.updateSortRules(t),this._changePivotSortStateBySortRules();const{layoutMap:o}=this.internalProps;o.resetHeaderTree(),this.scenegraph.clearCells(),pt(e)&&pt(n)?(this.isRowHeader(e,n)?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):this.isCornerHeader(e,n)?o.cornerSetting.titleOnDimension==="column"?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):o.cornerSetting.titleOnDimension==="row"&&this.internalProps._heightResizedRowMap.clear():this.isColumnHeader(e,n)&&this.internalProps._heightResizedRowMap.clear(),this.refreshRowColCount()):this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(!0),this.render()}_changePivotSortStateBySortRules(){var t,e,n,o;this.pivotSortState=[];const r=(e=(t=this.internalProps.dataConfig)===null||t===void 0?void 0:t.sortRules)!==null&&e!==void 0?e:[];for(let s=0;s<r.length;s++){const l=r[s],a=[];if(l.sortByIndicator&&l.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])){for(let d=0;d<l.query.length;d++)a.push({dimensionKey:this.dataset.indicatorsAsCol?this.dataset.columns[d]:this.dataset.rows[d],value:l.query[d]});a.push({indicatorKey:l.sortByIndicator,value:(o=(n=this.internalProps.layoutMap.getIndicatorInfo(l.sortByIndicator))===null||n===void 0?void 0:n.title)!==null&&o!==void 0?o:l.sortByIndicator})}else a.push({dimensionKey:l.sortField,isPivotCorner:!0,value:l.sortField});const h=l.sortType?l.sortType.toUpperCase():"ASC";this.pivotSortState.push({dimensions:a,order:gi[h]})}}_parseColumnWidthConfig(t){for(let e=0;e<(t==null?void 0:t.length);e++){const n=t[e],o=n.dimensions,r=n.width,s=this.getCellAddressByHeaderPaths(o);s&&!this.internalProps._widthResizedColMap.has(s.col)&&(this._setColWidth(s.col,r),this.internalProps._widthResizedColMap.add(s.col))}}updatePivotSortState(t){this.pivotSortState=t}sort(t,e,n){var o;let r;if(this.isCornerHeader(t,e)){const a=this.getHeaderDefine(t,e);r=[];const h={isPivotCorner:!0,dimensionKey:a.value,value:a.value};r.push(h)}else r=this.isColumnHeader(t,e)?this.getCellHeaderPaths(t,e).colHeaderPaths:this.getCellHeaderPaths(t,e).rowHeaderPaths;const s=r[r.length-1].indicatorKey,l=this.getHeaderDefine(t,e);if(l.sort){if(this.dataset.sortRules){const a={};for(let h=this.dataset.sortRules.length-1;h>=0;h--){const d=this.dataset.sortRules[h];l.dimensionKey&&d.sortField===l.dimensionKey?(a[d.sortField]=d,this.dataset.sortRules.splice(h,1)):s&&d.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])&&this.dataset.sortRules.splice(h,1)}s?this.dataset.sortRules.push({sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:gi[n],sortByIndicator:s,query:r.reduce((h,d)=>(d.dimensionKey&&h.push(d.value),h),[])}):this.dataset.sortRules.push(Object.assign((o=a[l.dimensionKey])!==null&&o!==void 0?o:{},{sortField:l.dimensionKey,sortType:gi[n]}))}else this.dataset.sortRules=s?[{sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:gi[n],sortByIndicator:s,query:r.reduce((a,h)=>(h.dimensionKey&&a.push(h.value),a),[])}]:[{sortField:l.dimensionKey,sortType:gi[n]}];this.updateSortRules(this.dataset.sortRules,t,e)}}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const r=this.pivotSortState[o],s=r.dimensions,l=this.getCellAddressByHeaderPaths(s),a=r.order;if(l&&qi(n,l.col,l.row))return a}}_moveHeaderPosition(t,e){const n=this.getCellRange(t.col,t.row),o=this.getCellRange(e.col,e.row),r=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(r){if(r.moveType==="column"){if(this.internalProps.recordsIsTwoDimensionalArray)for(let s=0;s<this.internalProps.records.length;s++){const l=this.internalProps.records[s].splice(r.sourceIndex-this.rowHeaderLevelCount,r.sourceSize);l.unshift(r.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[s],l)}this.colWidthsMap.exchangeOrder(n.start.col,n.end.col-n.start.col+1,o.start.col,o.end.col-o.start.col+1,r.targetIndex),this.setMinMaxLimitWidth()}else if(r.moveType==="row"){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.internalProps.records.splice(r.sourceIndex-this.columnHeaderLevelCount,r.sourceSize);s.unshift(r.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,s)}r.targetIndex>r.sourceIndex?this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex+r.sourceSize-r.targetSize,r.targetSize,r.targetIndex):this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex,r.targetSize,r.targetIndex)}return r}return null}toggleHierarchyState(t,e,n=!0){const o=this.getHierarchyState(t,e);if(o===Vt.expand)this._refreshHierarchyState(t,e,n),this.fireListeners(lr.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Vt.collapse});else if(o===Vt.collapse){const r=this.internalProps.layoutMap.getHeadNode(t,e);Array.isArray(r.children)&&this._refreshHierarchyState(t,e,n),this.fireListeners(lr.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Vt.expand,originData:r})}}_refreshHierarchyState(t,e,n=!0,o){let r=!1,s=!1;this.stateManager.updateHoverIcon(t,e,void 0,void 0);const l=this.internalProps.layoutMap.checkHasChart();l&&(this.autoFillWidth&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight));const a=this.internalProps.layoutMap.toggleHierarchyState(t,e);o&&o(),this.refreshRowColCount(),this.clearCellStyleCache(),this.scenegraph.updateHierarchyIcon(t,e),this.scenegraph.updateRow(a.removeCellPositions,a.addCellPositions,a.updateCellPositions,n),l&&(this.autoFillWidth&&!r&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&!s&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight),(this.widthMode==="adaptive"||r||this.heightMode==="adaptive"||s)&&this.scenegraph.updateChartSizeForResizeColWidth(-1))}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}setRecords(t){var e,n,o,r,s;const l={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t,this.internalProps.recordsIsTwoDimensionalArray=!1,((e=t==null?void 0:t[0])===null||e===void 0?void 0:e.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0);const a=this.options,h=this.internalProps;if(((n=this.options.customConfig)===null||n===void 0?void 0:n.enableDataAnalysis)===!1)this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new mv({rows:h.layoutMap.fullRowDimensionKeys,columns:h.layoutMap.colDimensionKeys,indicators:h.layoutMap.indicatorKeys,indicatorsAsCol:h.layoutMap.indicatorsAsCol,indicatorDimensionKey:h.layoutMap.indicatorDimensionKey},t));else{let d,u;this.dataset.setRecords(t),d=a.columnTree?h.layoutMap.columnDimensionTree:new He((o=this.dataset.colHeaderTree)!==null&&o!==void 0?o:[],this.layoutNodeId),u=a.rowTree?h.layoutMap.rowDimensionTree:new He((r=this.dataset.rowHeaderTree)!==null&&r!==void 0?r:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(s=this.options.rowExpandLevel)!==null&&s!==void 0?s:1:void 0),h.layoutMap=new hr(this,this.dataset,d,u),this.pivotSortState=[],a.pivotSortState&&(this.pivotSortState=a.pivotSortState)}if(this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(l.col,l.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder(),this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const d=Et.getComponent("emptyTip");this.internalProps.emptyTip=new d(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}}startEditCell(t,e,n){var o;if(z(t)&&z(e))this.eventManager.isDraging=!1,this.selectCell(t,e),this.editorManager.startEditCell(t,e,n);else if(!((o=this.stateManager.select)===null||o===void 0)&&o.cellPos){const{col:r,row:s}=this.stateManager.select.cellPos;z(r)&&z(s)&&this.editorManager.startEditCell(r,s,n)}}completeEditCell(){this.editorManager.completeEdit()}getEditor(t,e){var n,o,r;let s;if(this.isCornerHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(n=l==null?void 0:l.headerEditor)!==null&&n!==void 0?n:this.options.headerEditor}else if(this.isHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(o=l==null?void 0:l.headerEditor)!==null&&o!==void 0?o:this.options.headerEditor}else{const l=this.getBodyColumnDefine(t,e);s=(r=l==null?void 0:l.editor)!==null&&r!==void 0?r:this.options.editor}return typeof s=="function"&&(s=s({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),typeof s=="string"?aT(s):s}isHasEditorDefine(t,e){var n;const o=this.getBodyColumnDefine(t,e);let r=(n=o==null?void 0:o.editor)!==null&&n!==void 0?n:this.options.editor;return typeof r=="function"&&(r=r({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),z(r)}changeCellValue(t,e,n,o=!1){if(o&&this.isHasEditorDefine(t,e)||o===!1){let r=n;const s=this.getCellOriginValue(t,e),l=this.getCellRawValue(t,e);typeof l=="number"&&am(n)&&(r=parseFloat(n)),this._changeCellValueToDataSet(t,e,s,r);const a=this.getCellRange(t,e);for(let h=a.start.col;h<=a.end.col;h++)for(let d=a.start.row;d<=a.end.row;d++)this.scenegraph.updateCellContent(h,d);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else if(!this.internalProps._widthResizedColMap.has(t)){const h=this.getColWidth(t),d=Dr(t,0,this.rowCount-1,this,!1);d!==h&&this.scenegraph.updateColWidth(t,d-h)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.internalProps._heightResizedRowMap.size===0&&this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"&&!this.internalProps._heightResizedRowMap.has(e)){const h=this.getRowHeight(e),d=rn(e,0,this.colCount-1,this);this.scenegraph.updateRowHeight(e,d-h)}this.fireListeners(lt.CHANGE_CELL_VALUE,{col:t,row:e,rawValue:l,currentValue:s,changedValue:r}),this.scenegraph.updateNextFrame()}}changeCellValues(t,e,n,o=!1){let r=t,s=e;const l=[],a=[];for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){const c=n[u],g=[],f=[];l.push(g),a.push(f);for(let p=0;p<c.length&&!(t+p>this.colCount-1);p++){const m=this.getCellRawValue(t+p,e+u);g.push(m);const b=this.getCellOriginValue(t+p,e+u);f.push(b)}}for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){s=e+u;const c=n[u];let g=t;for(let f=0;f<c.length&&!(t+f>this.colCount-1);f++)if(g=t+f,o&&this.isHasEditorDefine(t+f,e+u)||o===!1){const p=c[f];let m=p;const b=a[u][f],C=l[u][f];typeof C=="number"&&am(p)&&(m=parseFloat(p)),this._changeCellValueToDataSet(t+f,e+u,b,m),this.fireListeners(lt.CHANGE_CELL_VALUE,{col:t+f,row:e+u,rawValue:C,currentValue:b,changedValue:this.getCellOriginValue(t+f,e+u)})}r=Math.max(r,g)}const h=this.getCellRange(t,e),d=this.getCellRange(r,s);for(let u=h.start.col;u<=d.end.col;u++)for(let c=h.start.row;c<=d.end.row;c++)this.scenegraph.updateCellContent(u,c);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else for(let u=t;u<=d.end.col;u++)if(!this.internalProps._widthResizedColMap.has(u)){const c=this.getColWidth(u),g=Dr(u,0,this.rowCount-1,this,!1);g!==c&&this.scenegraph.updateColWidth(u,g-c)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"){const u=[],c=[];for(let g=e;g<=d.end.row;g++)if(this.rowHeightsMap.get(g)){const f=this.getRowHeight(g),p=rn(g,0,this.colCount-1,this);u.push(g),c.push(p-f)}this.scenegraph.updateRowsHeight(u,c)}this.scenegraph.updateNextFrame()}_changeCellValueToDataSet(t,e,n,o){var r,s,l,a,h,d,u,c;if(this.internalProps.recordsIsTwoDimensionalArray){const g=this.getBodyIndexByRow(e),f=this.getBodyIndexByCol(t);this.records[g][f]=o}else if(this.dataset){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isCornerHeader(t,e))this.internalProps.layoutMap.changeCornerTitle(t,e,o);else if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.dataset.changeRecordFieldValue(!((r=g.colHeaderPaths)===null||r===void 0)&&r.length?(s=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&s!==void 0?s:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(l=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&l!==void 0?l:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=(a=g.colHeaderPaths)===null||a===void 0?void 0:a.filter(m=>!m.virtual).map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),p=(h=g.rowHeaderPaths)===null||h===void 0?void 0:h.filter(m=>!m.virtual).map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value});this.dataset.changeTreeNodeValue(this.internalProps.layoutMap.indicatorsAsCol?p:p.slice(0,-1),this.internalProps.layoutMap.indicatorsAsCol?f.slice(0,-1):f,this.internalProps.layoutMap.getIndicatorKey(t,e),o)}}else if(this.flatDataToObjects){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.flatDataToObjects.changeRecordFieldValue(!((d=g.colHeaderPaths)===null||d===void 0)&&d.length?(u=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&u!==void 0?u:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(c=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&c!==void 0?c:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=g.colHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),p=g.rowHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value});this.flatDataToObjects.changeTreeNodeValue(p,f,this.internalProps.layoutMap.getBody(t,e).indicatorKey,o)}}}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}setTreeNodeChildren(t,e,n,o){this.flatDataToObjects?(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.flatDataToObjects.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey}),this.flatDataToObjects.addRecords(e)})):(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.dataset._rowTreeHasChanged(),this.dataset.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys}),this.dataset.addRecords(e)}))}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),this.renderWithRecreateCells()}getFilteredRecords(){var t;return(t=this.dataset)===null||t===void 0?void 0:t.filterRules}};Pg(),Hg(),Eg(),Lg(),kg(),Fg(),Ig(),Dg(),Og(),zg(),Ng(),Wg(),Dl(),Vg();class LT extends ET{}Dl();class U9 extends ET{}Pg(),Hg(),Eg(),Lg(),kg(),Fg(),Ig(),Dg(),Og(),zg(),Ng(),Wg(),Dl(),Vg();let K9=class extends _g{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w;let y,S;le.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},this._selectedDataItemsInChart=[],this._selectedDimensionInChart=[],this._chartEventMap={},e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Le(e.columns),this.internalProps.rows=Le(e.rows),this.internalProps.indicators=go(e.indicators),this.internalProps.columnTree=!e.indicatorsAsCol||!((n=e.columns)===null||n===void 0)&&n.length||e.columnTree?Le(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((o=e.rows)===null||o===void 0)&&o.length||e.rowTree?Le(e.rowTree):[],this.internalProps.records=e.records,this.setCustomStateNameToSpec(),this.internalProps.columnResizeType=(r=e.columnResizeType)!==null&&r!==void 0?r:"column",this.internalProps.rowResizeType=(s=e.rowResizeType)!==null&&s!==void 0?s:"row",this.internalProps.dataConfig={isPivotChart:!0},this._axes=st(e.axes)?e.axes:[],e.columnTree&&(e.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Vi(this.internalProps.columnTree,e.indicators)),y=new He((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),e.rowTree&&(e.indicatorsAsCol===!1&&(this.internalProps.rowTree=Vi(this.internalProps.rowTree,e.indicators)),S=new He((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const R=!((h=S==null?void 0:S.dimensionKeys)===null||h===void 0)&&h.count?S.dimensionKeys.valueArr():(u=(d=e.rows)===null||d===void 0?void 0:d.reduce((T,M)=>(typeof M=="string"?T.push(M):T.push(M.dimensionKey),T),[]))!==null&&u!==void 0?u:[],A=!((c=y==null?void 0:y.dimensionKeys)===null||c===void 0)&&c.count?y.dimensionKeys.valueArr():(f=(g=e.columns)===null||g===void 0?void 0:g.reduce((T,M)=>(typeof M=="string"?T.push(M):T.push(M.dimensionKey),T),[]))!==null&&f!==void 0?f:[],x=(m=(p=e.indicators)===null||p===void 0?void 0:p.reduce((T,M)=>(typeof M=="string"?T.push(M):T.push(M.indicatorKey),T),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(A,R),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new Oh(this.internalProps.dataConfig,R,A,x,this.internalProps.indicators,(b=e.indicatorsAsCol)===null||b===void 0||b,e.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&Fh(this.internalProps.indicators)){const T=M=>{M.forEach(B=>{var P;!((P=B.children)===null||P===void 0)&&P.length?T(B.children):B.children=[{dimensionKey:"axis",value:""}]})};!((C=this.dataset.rowHeaderTree)===null||C===void 0)&&C.length?T(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(e.columnTree||e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,e.indicators)),e.rowTree||e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,e.indicators)),y=new He((_=this.dataset.colHeaderTree)!==null&&_!==void 0?_:[],this.layoutNodeId),S=new He((w=this.dataset.rowHeaderTree)!==null&&w!==void 0?w:[],this.layoutNodeId),this.internalProps.layoutMap=new hr(this,this.dataset,y,S),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(),e.title){const T=Et.getComponent("title");this.internalProps.title=new T(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const T=Et.getComponent("emptyTip");this.internalProps.emptyTip=new T(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(lt.INITIALIZED,null)},0)}static get EVENT_TYPE(){return TR}get pivotChartAxes(){return this._axes}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!0}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n&&!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y;const S=this.internalProps;let R,A;super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Le(t.columns),this.internalProps.rows=Le(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?go(t.indicators):[],this.internalProps.columnTree=!t.indicatorsAsCol||!((n=t.columns)===null||n===void 0)&&n.length||t.columnTree?Le(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((o=t.rows)===null||o===void 0)&&o.length||t.rowTree?Le(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.setCustomStateNameToSpec(),this._selectedDataItemsInChart=[],S.columnResizeType=(r=t.columnResizeType)!==null&&r!==void 0?r:"column",S.rowResizeType=(s=t.rowResizeType)!==null&&s!==void 0?s:"row",S.dataConfig={isPivotChart:!0},this._axes=st(t.axes)?t.axes:[],t.columnTree&&(t.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Vi(this.internalProps.columnTree,t.indicators)),R=new He((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),t.rowTree&&(t.indicatorsAsCol===!1&&(this.internalProps.rowTree=Vi(this.internalProps.rowTree,t.indicators)),A=new He((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const x=!((h=A==null?void 0:A.dimensionKeys)===null||h===void 0)&&h.count?A.dimensionKeys.valueArr():(u=(d=t.rows)===null||d===void 0?void 0:d.reduce((B,P)=>(typeof P=="string"?B.push(P):B.push(P.dimensionKey),B),[]))!==null&&u!==void 0?u:[],T=!((c=R==null?void 0:R.dimensionKeys)===null||c===void 0)&&c.count?R.dimensionKeys.valueArr():(f=(g=t.columns)===null||g===void 0?void 0:g.reduce((B,P)=>(typeof P=="string"?B.push(P):B.push(P.dimensionKey),B),[]))!==null&&f!==void 0?f:[],M=(m=(p=t.indicators)===null||p===void 0?void 0:p.reduce((B,P)=>(typeof P=="string"?B.push(P):B.push(P.indicatorKey),B),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(T,x),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new Oh(this.internalProps.dataConfig,x,T,M,this.internalProps.indicators,(b=t.indicatorsAsCol)===null||b===void 0||b,(C=t.records)!==null&&C!==void 0?C:this.internalProps.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&Fh(this.internalProps.indicators)){const B=P=>{P.forEach(F=>{var H;!((H=F.children)===null||H===void 0)&&H.length?B(F.children):F.children=[{dimensionKey:"axis",value:""}]})};!((_=this.dataset.rowHeaderTree)===null||_===void 0)&&_.length?B(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(t.columnTree||t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,t.indicators)),t.rowTree||t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,t.indicators)),R=new He((w=this.dataset.colHeaderTree)!==null&&w!==void 0?w:[],this.layoutNodeId),A=new He((y=this.dataset.rowHeaderTree)!==null&&y!==void 0?y:[],this.layoutNodeId),S.layoutMap=new hr(this,this.dataset,R,A),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,S.releaseList&&(S.releaseList.forEach(B=>{var P;return(P=B==null?void 0:B.release)===null||P===void 0?void 0:P.call(B)}),S.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const B=Et.getComponent("title");this.internalProps.title=new B(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const B=Et.getComponent("emptyTip");this.internalProps.emptyTip=new B(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(B=>{setTimeout(B,0)})}updatePagination(){}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a;const h=this,{layoutMap:d}=h.internalProps;d&&(h.colCount=(t=d.colCount)!==null&&t!==void 0?t:0,h.rowCount=(e=d.rowCount)!==null&&e!==void 0?e:0,h.internalProps.frozenColCount=(n=d.rowHeaderLevelCount)!==null&&n!==void 0?n:0,h.frozenRowCount=Math.max(d.headerLevelCount,(o=this.options.frozenRowCount)!==null&&o!==void 0?o:0),h.bottomFrozenRowCount!==((r=d==null?void 0:d.bottomFrozenRowCount)!==null&&r!==void 0?r:0)&&(h.bottomFrozenRowCount=(s=d==null?void 0:d.bottomFrozenRowCount)!==null&&s!==void 0?s:0),h.rightFrozenColCount!==((l=d==null?void 0:d.rightFrozenColCount)!==null&&l!==void 0?l:0)&&(h.rightFrozenColCount=(a=d==null?void 0:d.rightFrozenColCount)!==null&&a!==void 0?a:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r&&this.syncHierarchyState(t.children[s],r)}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getCellValue(t,e,n){var o,r,s;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const g=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let f;return g==null||g.forEach(p=>{const m=this.internalProps.layoutMap.getIndicatorInfo(p);m&&(f=m)}),(r=(o=f==null?void 0:f.title)!==null&&o!==void 0?o:f==null?void 0:f.indicatorKey)!==null&&r!==void 0?r:""}const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.dataset){let u;const c=this.internalProps.layoutMap.getCellHeaderPaths(t,e),g=c.colHeaderPaths.map((m,b)=>{var C;return m.indicatorKey&&(u={position:"col",index:b}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),f=c.rowHeaderPaths.map((m,b)=>{var C;return m.indicatorKey&&(u={position:"row",index:b}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,u);return p.value?p.value():void 0}const{fieldFormat:l}=this.internalProps.layoutMap.getBody(t,e),a=this.getBodyIndexByRow(e),h=this.getBodyIndexByCol(t),d=(s=this.records[a])===null||s===void 0?void 0:s[h];return typeof l=="function"?l(d,t,e,this):d}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const d=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let u;return d==null||d.forEach(c=>{const g=this.internalProps.layoutMap.getIndicatorInfo(c);g&&(u=g)}),(o=(n=u==null?void 0:u.title)!==null&&n!==void 0?n:u==null?void 0:u.indicatorKey)!==null&&o!==void 0?o:""}const{title:h}=s.internalProps.layoutMap.getHeader(t,e);return typeof h=="function"?h():h}if(this.dataset){let h;const d=this.internalProps.layoutMap.getCellHeaderPaths(t,e),u=d.colHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"col",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),c=d.rowHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"row",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),g=this.dataset.getAggregator(c,u,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,h);return g.value?g.value():void 0}const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(r=this.records[l])===null||r===void 0?void 0:r[a]}getCellRawValue(t,e){return this.getCellOriginValue(t,e)}getCellOriginRecord(t,e){if(!this.internalProps.layoutMap.isHeader(t,e)&&this.dataset){let n;const o=this.internalProps.layoutMap.getCellHeaderPaths(t,e),r=o.colHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"col",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value}),s=o.rowHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"row",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value});return this.dataset.getAggregator(s,r,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,n).records}}getCellRawRecord(t,e){return this.getCellOriginRecord(t,e)}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const{col:r,row:s,order:l}=this.pivotSortState[o];if(qi(n,r,s))return l}}_moveHeaderPosition(t,e){var n,o,r,s;const l=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(l){if(l.moveType==="column"){if(((o=(n=this.options.records)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.constructor)===Array)for(let a=0;a<this.internalProps.records.length;a++){const h=this.internalProps.records[a].splice(l.sourceIndex-this.rowHeaderLevelCount,l.sourceSize);h.unshift(l.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[a],h)}this.colWidthsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize),this.setMinMaxLimitWidth()}else if(l.moveType==="row"){if(((s=(r=this.options.records)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.constructor)===Array){const a=this.internalProps.records.splice(l.sourceIndex-this.columnHeaderLevelCount,l.sourceSize);a.unshift(l.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,a)}this.rowHeightsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize)}return l}return null}toggleHierarchyState(t,e,n=!0){}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}_generateCollectValuesConfig(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_;t=t.filter(S=>S!==Zi),e=e.filter(S=>S!==Zi);const w=this.internalProps.indicators,y={};for(let S=0,R=w==null?void 0:w.length;S<R;S++)if(typeof w[S]!="string"&&w[S].chartSpec){if(((n=w[S].chartSpec)===null||n===void 0?void 0:n.type)==="pie"||((o=w[S].chartSpec)===null||o===void 0?void 0:o.type)==="rose"||((r=w[S].chartSpec)===null||r===void 0?void 0:r.type)==="radar"||((s=w[S].chartSpec)===null||s===void 0?void 0:s.type)==="gauge"||((l=w[S].chartSpec)===null||l===void 0?void 0:l.type)==="wordCloud")continue;const A=w[S],x=A.chartSpec;if(this.options.indicatorsAsCol===!1)if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[A.indicatorKey]={by:e,range:!0,sumBy:(x==null?void 0:x.stack)&&t.concat(x==null?void 0:x.xField)},x.series)x.series.forEach(T=>{var M,B,P,F,H,E,k,I,L,D,O,W,N,$;const U=typeof T.xField=="string"?T.xField:T.xField[0];y[U]={by:t,type:T.direction!=="horizontal"?"xField":void 0,range:Ms(T,this._axes,T.direction==="horizontal",!0),sortBy:T.direction!=="horizontal"?(F=(P=(B=(M=T==null?void 0:T.data)===null||M===void 0?void 0:M.fields)===null||B===void 0?void 0:B[U])===null||P===void 0?void 0:P.domain)!==null&&F!==void 0?F:(k=(E=(H=x==null?void 0:x.data)===null||H===void 0?void 0:H.fields)===null||E===void 0?void 0:E[U])===null||k===void 0?void 0:k.domain:void 0};const Y=T.yField;T.stack!==!1&&(T.type==="bar"||T.type==="area")&&(T.stack=!0),y[Y]={by:e,range:Ms(T,this._axes,T.direction==="horizontal",!1),sumBy:T.stack&&t.concat(T==null?void 0:T.xField),sortBy:T.direction==="horizontal"?(O=(D=(L=(I=T==null?void 0:T.data)===null||I===void 0?void 0:I.fields)===null||L===void 0?void 0:L[Y])===null||D===void 0?void 0:D.domain)!==null&&O!==void 0?O:($=(N=(W=x==null?void 0:x.data)===null||W===void 0?void 0:W.fields)===null||N===void 0?void 0:N[Y])===null||$===void 0?void 0:$.domain:void 0,extendRange:Mc(x.markLine)}});else{const T=typeof x.xField=="string"?x.xField:x.xField[0];y[T]={by:t,type:x.direction!=="horizontal"?"xField":void 0,range:Ms(x,this._axes,x.direction==="horizontal",!0),sortBy:x.direction!=="horizontal"?(d=(h=(a=x==null?void 0:x.data)===null||a===void 0?void 0:a.fields)===null||h===void 0?void 0:h[T])===null||d===void 0?void 0:d.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const M=x.yField;y[M]={by:e,range:x.direction!=="horizontal",sumBy:x.stack&&t.concat(x==null?void 0:x.xField),sortBy:x.direction==="horizontal"?(g=(c=(u=x==null?void 0:x.data)===null||u===void 0?void 0:u.fields)===null||c===void 0?void 0:c[M])===null||g===void 0?void 0:g.domain:void 0,extendRange:Mc(x.markLine)}}else{const T=w[S];if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[T.indicatorKey]={by:t,range:!0,sumBy:(x==null?void 0:x.stack)&&e.concat(x==null?void 0:x.yField)},x.series)x.series.forEach(M=>{var B,P,F,H,E,k,I,L,D,O,W,N,$,U;const Y=typeof M.yField=="string"?M.yField:M.yField[0];y[Y]={by:e,type:M.direction==="horizontal"?"yField":void 0,range:Ms(M,this._axes,M.direction==="horizontal",!1),sortBy:M.direction==="horizontal"?(H=(F=(P=(B=M==null?void 0:M.data)===null||B===void 0?void 0:B.fields)===null||P===void 0?void 0:P[Y])===null||F===void 0?void 0:F.domain)!==null&&H!==void 0?H:(I=(k=(E=x==null?void 0:x.data)===null||E===void 0?void 0:E.fields)===null||k===void 0?void 0:k[Y])===null||I===void 0?void 0:I.domain:void 0};const j=M.xField;M.stack!==!1&&(M.type==="bar"||M.type==="area")&&(M.stack=!0),y[j]={by:t,range:Ms(M,this._axes,M.direction==="horizontal",!0),sumBy:M.stack&&e.concat(M==null?void 0:M.yField),sortBy:M.direction!=="horizontal"?(W=(O=(D=(L=M==null?void 0:M.data)===null||L===void 0?void 0:L.fields)===null||D===void 0?void 0:D[j])===null||O===void 0?void 0:O.domain)!==null&&W!==void 0?W:(U=($=(N=x==null?void 0:x.data)===null||N===void 0?void 0:N.fields)===null||$===void 0?void 0:$[j])===null||U===void 0?void 0:U.domain:void 0,extendRange:Mc(x.markLine)}});else{const M=typeof x.yField=="string"?x.yField:x.yField[0];y[M]={by:e,type:x.direction==="horizontal"?"yField":void 0,range:Ms(x,this._axes,x.direction==="horizontal",!1),sortBy:x.direction==="horizontal"?(m=(p=(f=x==null?void 0:x.data)===null||f===void 0?void 0:f.fields)===null||p===void 0?void 0:p[M])===null||m===void 0?void 0:m.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const B=x.xField;y[B]={by:t,range:Ms(x,this._axes,x.direction==="horizontal",!0),sumBy:x.stack&&e.concat(x==null?void 0:x.yField),sortBy:x.direction!=="horizontal"?(_=(C=(b=x==null?void 0:x.data)===null||b===void 0?void 0:b.fields)===null||C===void 0?void 0:C[B])===null||_===void 0?void 0:_.domain:void 0,extendRange:Mc(x.markLine)}}}}return y}_generateAggregationRules(){var t;const e=[];return(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:zt.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=this.options.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:zt.RECORD})}else{const s=this.options.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:zt.RECORD})}}),e}setCustomStateNameToSpec(){var t;const e=n=>{var o,r,s,l,a,h,d,u,c,g;!((r=(o=n.bar)===null||o===void 0?void 0:o.state)===null||r===void 0)&&r.selected&&(n.bar.state.vtable_selected=n.bar.state.selected,n.bar.state.vtable_selected_reverse=n.bar.state.selected_reverse,delete n.bar.state.selected,delete n.bar.state.selected_reverse),!((l=(s=n.point)===null||s===void 0?void 0:s.state)===null||l===void 0)&&l.selected&&(n.point.state.vtable_selected=n.point.state.selected,n.point.state.vtable_selected_reverse=n.point.state.selected_reverse,delete n.point.state.selected,delete n.point.state.selected_reverse),!((h=(a=n.line)===null||a===void 0?void 0:a.state)===null||h===void 0)&&h.selected&&(n.line.state.vtable_selected=n.line.state.selected,n.line.state.vtable_selected_reverse=n.line.state.selected_reverse,delete n.line.state.selected,delete n.line.state.selected_reverse),!((u=(d=n.area)===null||d===void 0?void 0:d.state)===null||u===void 0)&&u.selected&&(n.area.state.vtable_selected=n.area.state.selected,n.area.state.vtable_selected_reverse=n.area.state.selected_reverse,delete n.area.state.selected,delete n.area.state.selected_reverse),!((g=(c=n.pie)===null||c===void 0?void 0:c.state)===null||g===void 0)&&g.selected&&(n.pie.state.vtable_selected=n.pie.state.selected,n.pie.state.vtable_selected_reverse=n.pie.state.selected_reverse,delete n.pie.state.selected,delete n.pie.state.selected_reverse)};(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{if(n.chartSpec){const o=n.chartSpec;o.series?o.series.forEach(r=>{e(r)}):e(o)}})}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),Bh(this.scenegraph),IW(this.scenegraph),this.render()}clearChartCacheImage(t,e){pt(t)&&pt(e)?FW(t,e,this.scenegraph):Bh(this.scenegraph)}getLegendSelected(){var t;const e=[];return(t=this.internalProps.legends)===null||t===void 0||t.forEach(n=>{const o=n.legendComponent._getSelectedLegends().map(r=>r.label);e.push(...o)}),e}setLegendSelected(t){var e;(e=this.internalProps.legends)===null||e===void 0||e.forEach(n=>{n.legendComponent.setSelected(t)})}getChartDatumPosition(t,e){const{chartInstance:n,bounds:o}=this.getChartInstance(e);if(n){const r=n.convertDatumToPosition(t);return r?{x:Math.round(r.x+o.x1),y:Math.round(r.y+o.y1)}:null}return null}getCellAddressByRecord(t){const e=[],n=[],o={},r=[];this.dataset.dataConfig.aggregationRules.forEach(s=>{if(typeof s.field=="string")o[s.field]=s.indicatorKey,r.push(s.field);else for(let l=0;l<s.field.length;l++)o[s.field[l]]=s.indicatorKey,r.push(s.field[l])});for(const s in t)this.dataset.rows.indexOf(s)>=0&&e.push({dimensionKey:s,value:t[s]}),this.dataset.columns.indexOf(s)>=0&&n.push({dimensionKey:s,value:t[s]}),r.indexOf(s)>=0&&(this.dataset.indicatorsAsCol?n.push({indicatorKey:o[s]}):e.push({indicatorKey:o[s]}));return this.getCellAddressByHeaderPaths({rowHeaderPaths:e,colHeaderPaths:n,cellLocation:"body"})}getChartInstance(t){var e,n,o,r,s;const l=this.getCellAddressByHeaderPaths(t);if(l){const a=this.getCellRelativeRect(l.col,l.row),h=this.scenegraph.getCell(l.col,l.row);let d;const u=(e=h==null?void 0:h.getChildren())===null||e===void 0?void 0:e[0];if(u.attribute.chartInstance){d=u.attribute.chartInstance;const{dataId:c,data:g,axes:f,spec:p}=u.attribute,m=u.getViewBox();if(f==null||f.forEach((b,C)=>{var _,w,y,S;b.type==="linear"?d.updateModelSpecSync({type:"axes",index:C},{min:(w=(_=b.range)===null||_===void 0?void 0:_.min)!==null&&w!==void 0?w:0,max:(S=(y=b.range)===null||y===void 0?void 0:y.max)!==null&&S!==void 0?S:0},!0):b.type==="band"&&d.updateModelSpec({type:"axes",index:C},{domain:b.domain.slice(0)},!0)}),d.updateViewBox({x1:m.x1-u.getRootNode().table.scrollLeft,x2:m.x2-u.getRootNode().table.scrollLeft,y1:m.y1-u.getRootNode().table.scrollTop,y2:m.y2-u.getRootNode().table.scrollTop},!1,!1),typeof c=="string")d.updateDataSync(c,g??[]);else{const b=[];for(const C in c){const _=c[C],w=p.series.find(y=>{var S;return((S=y==null?void 0:y.data)===null||S===void 0?void 0:S.id)===C});b.push({id:C,values:_?(n=g==null?void 0:g.filter(y=>y.hasOwnProperty(_)))!==null&&n!==void 0?n:[]:g??[],fields:(o=w==null?void 0:w.data)===null||o===void 0?void 0:o.fields}),d.updateFullDataSync||d.updateDataSync(C,_?(r=g==null?void 0:g.filter(y=>y.hasOwnProperty(_)))!==null&&r!==void 0?r:[]:g??[])}(s=d.updateFullDataSync)===null||s===void 0||s.call(d,b)}this.renderAsync()}return{chartInstance:d,bounds:a.bounds}}return{}}_getDimensionSortArray(){var t,e;if(!((e=(t=this.options)===null||t===void 0?void 0:t.axes)===null||e===void 0)&&e.length){const n=this.options.indicatorsAsCol?"left":"bottom",o=this.options.axes.find(r=>r.orient===n);if(o&&st(o.domain))return o.domain}}setRecords(t){var e,n;const o={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t;const r=this.options,s=this.internalProps;let l,a;this.dataset.setRecords(t),l=r.columnTree?s.layoutMap.columnDimensionTree:new He((e=this.dataset.colHeaderTree)!==null&&e!==void 0?e:[],this.layoutNodeId),a=r.rowTree?s.layoutMap.rowDimensionTree:new He((n=this.dataset.rowHeaderTree)!==null&&n!==void 0?n:[],this.layoutNodeId),s.layoutMap=new hr(this,this.dataset,l,a),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(o.col,o.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder()}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}};class Y9 extends Zp{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class kT extends fn{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p;t.direction&&(t.flexDirection=t.direction),!t.justifyContent||t.justifyContent!=="start"&&t.justifyContent!=="end"||(t.justifyContent="flex-"+t.justifyContent),!t.alignItems||t.alignItems!=="start"&&t.alignItems!=="end"||(t.alignItems="flex-"+t.alignItems),!t.alignContent||t.alignContent!=="start"&&t.alignContent!=="end"||(t.alignContent="flex-"+t.alignContent),t.display="flex",t.flexDirection||(t.flexDirection="row"),t.clip=!0,t.fill=(e=t==null?void 0:t.background)===null||e===void 0?void 0:e.fill,t.stroke=(n=t==null?void 0:t.background)===null||n===void 0?void 0:n.stroke,t.lineWidth=(o=t==null?void 0:t.background)===null||o===void 0?void 0:o.lineWidth,t.cornerRadius=(r=t==null?void 0:t.background)===null||r===void 0?void 0:r.cornerRadius;const m=st(t.boundsPadding),b=[(l=(s=t.marginTop)!==null&&s!==void 0?s:m?t.boundsPadding[0]:t.boundsPadding)!==null&&l!==void 0?l:0,(h=(a=t.marginRight)!==null&&a!==void 0?a:m?t.boundsPadding[1]:t.boundsPadding)!==null&&h!==void 0?h:0,(c=(d=t.marginBottom)!==null&&d!==void 0?d:m?(u=t.boundsPadding[2])!==null&&u!==void 0?u:t.boundsPadding[0]:t.boundsPadding)!==null&&c!==void 0?c:0,(p=(g=t.marginLeft)!==null&&g!==void 0?g:m?(f=t.boundsPadding[3])!==null&&f!==void 0?f:t.boundsPadding[1]:t.boundsPadding)!==null&&p!==void 0?p:0];t.boundsPadding=b,super(t)}}class X9 extends kT{constructor(t){t.flexWrap="nowrap",super(t)}}let q9=class extends Yo{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g;let f;ge(t.iconName)&&(f=Cn()[t.iconName],f&&(t.width=(e=t.width)!==null&&e!==void 0?e:f.width,t.height=(n=t.height)!==null&&n!==void 0?n:f.height,t.svg=f.svg,t.cursor=f.cursor)),t.svg&&(t.image=t.svg);const p=st(t.boundsPadding),m=[(r=(o=t.marginTop)!==null&&o!==void 0?o:p?t.boundsPadding[0]:t.boundsPadding)!==null&&r!==void 0?r:0,(l=(s=t.marginRight)!==null&&s!==void 0?s:p?t.boundsPadding[1]:t.boundsPadding)!==null&&l!==void 0?l:0,(d=(a=t.marginBottom)!==null&&a!==void 0?a:p?(h=t.boundsPadding[2])!==null&&h!==void 0?h:t.boundsPadding[0]:t.boundsPadding)!==null&&d!==void 0?d:0,(g=(u=t.marginLeft)!==null&&u!==void 0?u:p?(c=t.boundsPadding[3])!==null&&c!==void 0?c:t.boundsPadding[1]:t.boundsPadding)!==null&&g!==void 0?g:0];t.boundsPadding=m,super(t),this.cache=f}},Z9=class extends Yo{constructor(t){var e,n,o,r,s,l,a,h,d,u;t.src&&(t.image=t.src),t.shape==="circle"&&(t.cornerRadius=t.width/2);const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}};class J9 extends fu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class Q9 extends Hi{constructor(t){var e,n,o,r,s,l,a,h,d,u,c;t.textBaseline||(t.textBaseline="top");const g=st(t.boundsPadding),f=[(n=(e=t.marginTop)!==null&&e!==void 0?e:g?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:g?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:g?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:g?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=f,t.fill=(c=t.fill)!==null&&c!==void 0?c:"#000",super(t)}getSize(t){this.AABBBounds.width()}}function t7(i,t=0){return{percent:i,delta:t}}class e7 extends mu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class i7 extends $a{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}getSize(t){this.AABBBounds.width()}}class n7 extends fn{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}const o7=Object.freeze(Object.defineProperty({__proto__:null,Arc:e7,CheckBox:Tr,Circle:Y9,Container:kT,Group:n7,GroupElement:X9,Icon:q9,Image:Z9,Line:n0,Radio:eh,Rect:J9,Tag:i7,Text:Q9,percentCalc:t7},Symbol.toStringTag,{value:"Module"}));function r7(i){var t,e,n,o,r,s,l,a,h,d,u;const c={seqId:0},g={isPivotChart:!0};let f,p,m,b;i.columnTree&&(i.indicatorsAsCol!==!1&&(m=Vi(i.columnTree,i.indicators)),f=new He((t=i.columnTree)!==null&&t!==void 0?t:[],c)),i.rowTree&&(i.indicatorsAsCol===!1&&(b=Vi(i.rowTree,i.indicators)),p=new He((e=i.rowTree)!==null&&e!==void 0?e:[],c));const C=!((n=p.dimensionKeys)===null||n===void 0)&&n.count?p.dimensionKeys.valueArr():(r=(o=i.rows)===null||o===void 0?void 0:o.reduce((y,S)=>(typeof S=="string"?y.push(S):y.push(S.dimensionKey),y),[]))!==null&&r!==void 0?r:[],_=!((s=f.dimensionKeys)===null||s===void 0)&&s.count?f.dimensionKeys.valueArr():(a=(l=i.columns)===null||l===void 0?void 0:l.reduce((y,S)=>(typeof S=="string"?y.push(S):y.push(S.dimensionKey),y),[]))!==null&&a!==void 0?a:[],w=(d=(h=i.indicators)===null||h===void 0?void 0:h.reduce((y,S)=>(typeof S=="string"?y.push(S):y.push(S.indicatorKey),y),[]))!==null&&d!==void 0?d:[];return g.collectValuesBy=s7(i,_,C),g.aggregationRules=l7(i),{dataset:new Oh(g,C,_,w,i.indicators,(u=i.indicatorsAsCol)===null||u===void 0||u,i.records,void 0,m||i.columnTree,b||i.rowTree,!0),columnDimensionTree:f,rowDimensionTree:p,layoutNodeId:c}}function s7(i,t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A,x;const T={};for(let M=0,B=(n=i.indicators)===null||n===void 0?void 0:n.length;M<B;M++)if(typeof i.indicators[M]!="string"&&i.indicators[M].chartSpec)if(i.indicatorsAsCol===!1){const P=i.indicators[M];if(T[P.indicatorKey]={by:e,range:!0,sumBy:((o=P.chartSpec)===null||o===void 0?void 0:o.stack)!==!1&&t.concat((r=P.chartSpec)===null||r===void 0?void 0:r.xField)},P.chartSpec.series)P.chartSpec.series.forEach(F=>{var H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et;const gt=typeof F.xField=="string"?F.xField:F.xField[0];T[gt]={by:t,type:F.direction!=="horizontal"?"xField":void 0,range:F.direction==="horizontal",sortBy:F.direction!=="horizontal"?(I=(k=(E=(H=F==null?void 0:F.data)===null||H===void 0?void 0:H.fields)===null||E===void 0?void 0:E[gt])===null||k===void 0?void 0:k.domain)!==null&&I!==void 0?I:(W=(O=(D=(L=P.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[gt])===null||W===void 0?void 0:W.domain:void 0};const vt=F.yField;T[vt]={by:e,range:F.direction!=="horizontal",sumBy:F.stack!==!1&&t.concat(F==null?void 0:F.xField),sortBy:F.direction==="horizontal"?(Y=(U=($=(N=F==null?void 0:F.data)===null||N===void 0?void 0:N.fields)===null||$===void 0?void 0:$[vt])===null||U===void 0?void 0:U.domain)!==null&&Y!==void 0?Y:(et=(Z=(G=(j=P.chartSpec)===null||j===void 0?void 0:j.data)===null||G===void 0?void 0:G.fields)===null||Z===void 0?void 0:Z[vt])===null||et===void 0?void 0:et.domain:void 0}});else{const F=typeof P.chartSpec.xField=="string"?P.chartSpec.xField:P.chartSpec.xField[0];T[F]={by:t,type:P.chartSpec.direction!=="horizontal"?"xField":void 0,range:P.chartSpec.direction==="horizontal",sortBy:P.chartSpec.direction!=="horizontal"?(h=(a=(l=(s=P.chartSpec)===null||s===void 0?void 0:s.data)===null||l===void 0?void 0:l.fields)===null||a===void 0?void 0:a[F])===null||h===void 0?void 0:h.domain:void 0};const H=P.chartSpec.yField;T[H]={by:e,range:i.indicators[M].chartSpec.direction!=="horizontal",sumBy:P.chartSpec.stack!==!1&&t.concat((d=P.chartSpec)===null||d===void 0?void 0:d.xField),sortBy:P.chartSpec.direction==="horizontal"?(f=(g=(c=(u=P.chartSpec)===null||u===void 0?void 0:u.data)===null||c===void 0?void 0:c.fields)===null||g===void 0?void 0:g[H])===null||f===void 0?void 0:f.domain:void 0}}}else{const P=i.indicators[M];if(T[P.indicatorKey]={by:t,range:!0,sumBy:((p=P.chartSpec)===null||p===void 0?void 0:p.stack)!==!1&&e.concat((m=P.chartSpec)===null||m===void 0?void 0:m.yField)},P.chartSpec.series)P.chartSpec.series.forEach(F=>{var H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et;const gt=typeof F.yField=="string"?F.yField:F.yField[0];T[gt]={by:e,type:F.direction==="horizontal"?"yField":void 0,range:F.direction!=="horizontal",sortBy:F.direction==="horizontal"?(I=(k=(E=(H=F==null?void 0:F.data)===null||H===void 0?void 0:H.fields)===null||E===void 0?void 0:E[gt])===null||k===void 0?void 0:k.domain)!==null&&I!==void 0?I:(W=(O=(D=(L=P.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[gt])===null||W===void 0?void 0:W.domain:void 0};const vt=F.xField;T[vt]={by:t,range:F.direction==="horizontal",sumBy:F.stack!==!1&&e.concat(F==null?void 0:F.yField),sortBy:F.direction!=="horizontal"?(Y=(U=($=(N=F==null?void 0:F.data)===null||N===void 0?void 0:N.fields)===null||$===void 0?void 0:$[vt])===null||U===void 0?void 0:U.domain)!==null&&Y!==void 0?Y:(et=(Z=(G=(j=P.chartSpec)===null||j===void 0?void 0:j.data)===null||G===void 0?void 0:G.fields)===null||Z===void 0?void 0:Z[vt])===null||et===void 0?void 0:et.domain:void 0}});else{const F=typeof P.chartSpec.yField=="string"?P.chartSpec.yField:P.chartSpec.yField[0];T[F]={by:e,type:P.chartSpec.direction==="horizontal"?"yField":void 0,range:P.chartSpec.direction!=="horizontal",sortBy:P.chartSpec.direction==="horizontal"?(w=(_=(C=(b=P.chartSpec)===null||b===void 0?void 0:b.data)===null||C===void 0?void 0:C.fields)===null||_===void 0?void 0:_[F])===null||w===void 0?void 0:w.domain:void 0};const H=P.chartSpec.xField;T[H]={by:t,range:i.indicators[M].chartSpec.direction==="horizontal",sumBy:P.chartSpec.stack!==!1&&e.concat((y=P.chartSpec)===null||y===void 0?void 0:y.yField),sortBy:P.chartSpec.direction!=="horizontal"?(x=(A=(R=(S=P.chartSpec)===null||S===void 0?void 0:S.data)===null||R===void 0?void 0:R.fields)===null||A===void 0?void 0:A[H])===null||x===void 0?void 0:x.domain:void 0}}}return T}function l7(i){var t;const e=[];return(t=i.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:zt.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=i.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:zt.RECORD})}else{const s=i.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:zt.RECORD})}}),e}function a7(i,t,e){var n,o;const r=r7(i);let s=r.columnDimensionTree,l=r.rowDimensionTree,a=!1,h=!1;i.columnTree&&i.indicatorsAsCol&&!s.dimensionKeys.contain(Zi)&&(a=!0),i.rowTree&&(i.indicatorsAsCol||l.dimensionKeys.contain(Zi)||(h=!0));const{dataset:d,layoutNodeId:u}=r,c={options:i,layoutNodeId:u,internalProps:i,isPivotChart:()=>!0,pivotChartAxes:[],_selectedDataItemsInChart:[],_getActiveChartInstance:()=>({updateState:()=>{}})};i.columnTree&&!a||(s=new He((n=d.colHeaderTree)!==null&&n!==void 0?n:[],u)),i.rowTree&&!h||(l=new He((o=d.rowHeaderTree)!==null&&o!==void 0?o:[],u));const g=new hr(c,d,s,l);for(let f=0;f<g.colCount;f++)for(let p=0;p<g.rowCount;p++){if(g.isHeader(f,p))continue;const m=g.getCellHeaderPaths(f,p),b=m.colHeaderPaths.map(y=>{var S;return(S=y.indicatorKey)!==null&&S!==void 0?S:y.value}),C=m.rowHeaderPaths.map(y=>{var S;return(S=y.indicatorKey)!==null&&S!==void 0?S:y.value}),_=d.getAggregator(g.indicatorsAsCol?C:C.slice(0,-1),g.indicatorsAsCol?b.slice(0,-1):b,g.getIndicatorKey(f,p)),w=h7(_.value?_.value():void 0,t,f,p,g,e);if(w)return w}}function h7(i,t,e,n,o,r){if(st(i)){for(let s=0;s<i.length;s++)if(r?r(i[s],t):d7(i[s],t))return o.getCellHeaderPaths(e,n)}}function d7(i,t){return JSON.stringify(i)===JSON.stringify(t)}function u7(i){return new $a(i?i.attribute:{})}function c7(i){return new Tr(i?i.attribute:{})}function g7(i){return new eh(i?i.attribute:{})}class f7{constructor(t,e){var n,o,r,s,l,a;this.willUpdateRow=!1,this.willUpdateCol=!1,this.table=t,this.rowCount=(n=e==null?void 0:e.rowCount)!==null&&n!==void 0?n:void 0,this.colCount=(o=e==null?void 0:e.colCount)!==null&&o!==void 0?o:void 0,this.animationDuration=(r=e==null?void 0:e.animationDuration)!==null&&r!==void 0?r:500,this.animationDelay=(s=e==null?void 0:e.animationDelay)!==null&&s!==void 0?s:1e3,this.animationEasing=(l=e==null?void 0:e.animationEasing)!==null&&l!==void 0?l:"linear",this.replaceScrollAction=(a=e==null?void 0:e.replaceScrollAction)!==null&&a!==void 0&&a,this.reset(),this.init()}init(){this.replaceScrollAction&&(this.table.disableScroll(),this.table.scenegraph.stage.addEventListener("wheel",this.onScrollEnd.bind(this)))}reset(){this.playing=!1,this.row=this.table.frozenRowCount,this.col=this.table.frozenColCount}onScrollEnd(t){this.rowCount?(t.deltaY>0?(this.row+=this.rowCount,this.row=Math.min(this.row,this.table.rowCount-this.table.frozenRowCount)):t.deltaY<0&&(this.row-=this.rowCount,this.row=Math.max(this.row,this.table.frozenRowCount)),this.table.scrollToRow(this.row,{duration:this.animationDuration,easing:this.animationEasing})):this.colCount&&(t.deltaX>0?(this.col+=this.colCount,this.col=Math.min(this.col,this.table.colCount-this.table.frozenColCount)):t.deltaX<0&&(this.col-=this.colCount,this.col=Math.max(this.col,this.table.frozenColCount)),this.table.scrollToCol(this.col,{duration:this.animationDuration,easing:this.animationEasing}))}play(){this.playing=!0,this.rowCount&&!this.willUpdateRow?this.updateRow():this.colCount&&!this.willUpdateCol&&this.updateCol()}pause(){this.playing=!1}updateRow(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenTopRow!==this.row?(this.row=this.table.frozenRowCount,t=!1):this.row+=this.rowCount,this.table.scrollToRow(this.row,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateRow=!0,setTimeout(()=>{this.willUpdateRow=!1,this.updateRow()},this.animationDuration+this.animationDelay)}updateCol(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenLeftCol!==this.col?(this.col=this.table.frozenColCount,t=!1):this.col+=this.colCount,this.table.scrollToCol(this.col,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateCol=!0,setTimeout(()=>{this.willUpdateCol=!1,this.updateCol()},this.animationDuration+this.animationDelay)}}class p7{constructor(t,e){this.table=t,this.options=e,this.registerStyle(),this.bindEvent()}registerStyle(){var t,e,n,o,r,s,l,a;this.table.registerCustomCellStyle("col-highlight",{bgColor:(e=(t=this.options)===null||t===void 0?void 0:t.colHighlightBGColor)!==null&&e!==void 0?e:"#82b2f5",color:(o=(n=this.options)===null||n===void 0?void 0:n.colHighlightColor)!==null&&o!==void 0?o:"#FFF"}),this.table.registerCustomCellStyle("row-highlight",{bgColor:(s=(r=this.options)===null||r===void 0?void 0:r.rowHighlightBGColor)!==null&&s!==void 0?s:"#82b2f5",color:(a=(l=this.options)===null||l===void 0?void 0:l.rowHighlightColor)!==null&&a!==void 0?a:"#FFF"})}bindEvent(){this.table.on("selected_cell",t=>{this.updateHighlight()}),this.table.on("selected_clear",()=>{this.clearHighlight()}),this.table.on("mousemove_table",()=>{this.table.stateManager.select.selecting&&this.updateHighlight()})}clearHighlight(){this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),this.colHeaderRange=void 0,this.rowHeaderRange=void 0}updateHighlight(){var t,e,n,o;if(((t=this.options)===null||t===void 0?void 0:t.colHighlight)===!1&&((e=this.options)===null||e===void 0?void 0:e.rowHighlight)===!1)return;const r=this.table.getSelectedCellRanges();if(r.length===0)return void this.clearHighlight();const s=r[0],l=[s.start.row,s.end.row];l.sort((u,c)=>u-c);const a=[s.start.col,s.end.col];let h,d;a.sort((u,c)=>u-c),this.table.isPivotTable()?(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}):this.table.internalProps.transpose?d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}:(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},this.table.internalProps.rowSeriesNumber&&(d={start:{col:0,row:l[0]},end:{col:0,row:l[1]}})),((n=this.options)===null||n===void 0?void 0:n.colHighlight)===!1||FT(this.colHeaderRange,h)||(this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),h&&this.table.arrangeCustomCellStyle({range:h},"col-highlight"),this.colHeaderRange=h),((o=this.options)===null||o===void 0?void 0:o.rowHighlight)===!1||FT(this.rowHeaderRange,d)||(this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),d&&this.table.arrangeCustomCellStyle({range:d},"row-highlight"),this.rowHeaderRange=d)}}function FT(i,t){return i===void 0&&t===void 0||i!==void 0&&t!==void 0&&i.start.col===t.start.col&&i.start.row===t.start.row&&i.end.col===t.end.col&&i.end.row===t.end.row}sx();const m7="1.11.1";function v7(){return Cn()}function b7(){hT()}const C7=Object.freeze(Object.defineProperty({__proto__:null,CarouselAnimationPlugin:f7,CustomLayout:o7,DataStatistics:hV,EventTarget:ih,HeaderHighlightPlugin:p7,InvertHighlightPlugin:rN,ListTable:W9,ListTableSimple:V9,PIVOT_CHART_EVENT_TYPE:TR,PIVOT_TABLE_EVENT_TYPE:lr,PivotChart:K9,PivotTable:LT,PivotTableSimple:U9,TABLE_EVENT_TYPE:lt,TYPES:Xz,VArc:DI,VArea:OI,VCheckBox:c7,VCircle:zI,VGlyph:WI,VGroup:NI,VImage:VI,VLine:jI,VPath:$I,VPolygon:GI,VRadio:g7,VRect:UI,VSymbol:KI,VTag:u7,VText:YI,clearGlobal:b7,core:Q8,data:r6,getDataCellPath:a7,getIcons:v7,getTargetCell:Lr,graphicUtil:L1,jsx:qI,onBeforeAttributeUpdateForInvertHighlight:bA,register:oV,registerAxis:Pg,registerChartCell:Ig,registerCheckboxCell:Dg,registerEmptyTip:Hg,registerImageCell:Og,registerLegend:Eg,registerMenu:Lg,registerProgressBarCell:zg,registerRadioCell:Ng,registerSparkLineCell:Wg,registerTextCell:Dl,registerTitle:kg,registerTooltip:Fg,registerVideoCell:Vg,renderChart:jm,restoreMeasureText:pN,setCustomAlphabetCharSet:fN,themes:X4,updateCell:xo,version:m7},Symbol.toStringTag,{value:"Module"})),dr=DB.create({baseURL:"/",validateStatus(i){return i===200},timeout:1e3*15});dr.interceptors.request.use(i=>i,i=>Promise.reject(i)),dr.interceptors.response.use(i=>{var t,e;return+((t=i==null?void 0:i.data)==null?void 0:t.code)==500&&Gi.message.error({content:((e=i==null?void 0:i.data)==null?void 0:e.message)||"服务器异常",key:"SERVER_ERROR"}),i},i=>{if(i.message.includes("timeout"))Gi.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:t}=i.response;t===401?Gi.message.error({content:"当前用户信息不正确",key:"REQUEST_ERROR"}):t>=500?Gi.message.error({content:"服务器异常",key:"REQUEST_ERROR"}):Gi.message.error({content:"请求异常",key:"REQUEST_ERROR"})}return Promise.reject(i)});var IT={},y7={get exports(){return IT},set exports(i){IT=i}};(function(i,t){(function(e,n){i.exports=n(Fo)})(cP,function(e){function n(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=n(e),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var a=100*s+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return o.default.locale(r,null,!0),r})})(y7);const EX="",LX="",Ri=(i,t)=>{const e=i.__vccOpts||i;for(const[n,o]of t)e[n]=o;return e};Fo.locale("zh-cn");const _7=v.defineComponent({name:"PivotFilter",props:{data:{type:Object,default:()=>{}},customDimensions:{type:Array,default:()=>[]},dimensions:{type:Array,default:()=>[]},indicators:{type:Array,default:()=>[]}},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref(!1),r=v.ref(!1),s=v.ref([]),l=v.ref(""),a=v.ref(),h=v.ref(""),d=v.ref([]),u=v.ref(),c=v.ref("range"),g=v.ref(),f=v.ref({}),p=v.ref(),m=v.ref({}),b=v.inject("getContainer",()=>{}),C=v.inject("scaleValue",{}),_=v.inject("theme","light"),w=v.inject("pageId",""),y=v.inject("context",""),S=v.inject("indicatorUrl",""),R=v.inject("indicatorToken",""),A=v.inject("graphicConfig",{}),x=v.inject("theDateInfo",{}),T=[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}],M=[{label:"单个日期",value:"date"},{label:"日期范围",value:"range"}],B=j=>{r.value=!1,s.value=j.target.checked?v.unref(d).map(G=>G.value):[]};v.watch(s,j=>{o.value=j.length===v.unref(d).length,r.value=!!j.length&&j.length<v.unref(d).length});const P=async j=>{var ht,_t;const{queryColumnList:G=[],edvDataSetId:Z="",source:et,dataSourceId:gt}=v.unref(A);let vt=G.find(ut=>ut.name===j||ut.label===j);vt||(vt=i.customDimensions.find(ut=>ut.name===j||ut.label===j));const it={},{search:nt}=(window==null?void 0:window.location)||{},Ct=nt.slice(1,nt.length).split("&");for(const ut of Ct)if(ut){const It=ut.split("=");if(It[0])if(It[0]==="userInfo")try{it.token=(_t=(ht=JSON.parse(decodeURIComponent(It[1])))==null?void 0:ht.baseInfo)==null?void 0:_t.hrpToken}catch(Ut){console.log(Ut)}else it[It[0]]=It[1]}const at=await dr.post(`${v.unref(S)}/diagram/groupvalue`,{source:et,groupColumn:j,hrpIndexTypeGuid:vt==null?void 0:vt.typeGuid,pageId:v.unref(w),pageFlag:!0,edvDataSetId:Z,dataSourceId:gt,extParam:it},{headers:{Authentication:v.unref(R),operateContext:v.unref(y)}}),{success:rt,data:ct=[]}=at.data;rt&&(d.value=ct.map(ut=>({value:ut})))},F=v.ref("");async function H(){const{filterData:j,type:G,key:Z}=i.data,gt=i.dimensions.concat(i.indicators).find(vt=>vt.label===Z);gt&&(F.value=gt.genericType),v.unref(F)==="DATE"?u.value="date":u.value="select",G==="dimension"?v.unref(u)==="select"?(await P(Z),Array.isArray(j)?s.value=j:s.value=(j==null?void 0:j.value)||[]):v.unref(u)==="date"&&(j==null?void 0:j.length)===2&&(a.value=[Fo(j[0].value),Fo(j[1].value)]):(l.value=(j==null?void 0:j.rule)||"",a.value=(j==null?void 0:j.value)||""),n.value=!0}const E=v.computed(()=>v.unref(x).dateFormat||"YYYY-MM-DD");function k(){var et;const{key:j,type:G}=i.data;let Z={};G==="dimension"?v.unref(u)==="select"?Z={rule:"IN",value:v.unref(s)}:v.unref(u)==="date"&&(v.unref(c)==="date"?Z={rule:"EQUAL",value:((et=v.unref(a))==null?void 0:et.format(v.unref(E)))||""}:v.unref(c)==="range"&&v.unref(a)&&(Z=[{rule:"GREATER_EQUAL",value:v.unref(a)[0].format(v.unref(E))},{rule:"LESS_EQUAL",value:v.unref(a)[1].format(v.unref(E))}])):Z={rule:v.unref(l),value:v.unref(a)},t("change",{checkKeys:Z,key:j,type:G}),n.value=!1}function I(){l.value="",a.value=null}const L=v.computed(()=>v.unref(_)==="darkBlue"?"#b2c3dd":""),D=()=>document.getElementsByClassName("filter-modal")[0]||document.body,O=j=>{var G,Z,et;if(j){const gt=(G=v.unref(g))==null?void 0:G.getBoundingClientRect();if(gt){const vt=gt.left/(((Z=v.unref(C))==null?void 0:Z.widthScale)||1)+"px",it=(gt.top+gt.height)/(((et=v.unref(C))==null?void 0:et.heightScale)||1)+"px";setTimeout(()=>{var Ct,at;const nt=document.querySelectorAll(".ant-select-dropdown"),bt=Array.from(nt).filter(rt=>window.getComputedStyle(rt).display!=="none");if(bt!=null&&bt.length){const rt=document.getElementsByClassName("filter-modal")[0];bt[0].classList.add("filter-select-dropdown"),(Ct=rt==null?void 0:rt.style)==null||Ct.setProperty("--drop-down-left",vt),(at=rt==null?void 0:rt.style)==null||at.setProperty("--drop-down-top",it),f.value={visibility:"visible"}}},200)}}else f.value={}},W=j=>{var G,Z,et;if(j){const gt=(G=v.unref(p))==null?void 0:G.getBoundingClientRect();if(gt){const vt=gt.left/(((Z=v.unref(C))==null?void 0:Z.widthScale)||1)+"px",it=(gt.top+gt.height)/(((et=v.unref(C))==null?void 0:et.heightScale)||1)+"px";setTimeout(()=>{var Ct,at;const nt=document.querySelectorAll(".pivot-table-range-date-dropdown"),bt=Array.from(nt).filter(rt=>window.getComputedStyle(rt).display!=="none");if(bt!=null&&bt.length){const rt=document.getElementsByClassName("filter-modal")[0];bt[0].classList.add("filter-range-picker-dropdown"),(Ct=rt==null?void 0:rt.style)==null||Ct.setProperty("--range-picker-dropdown-left",vt),(at=rt==null?void 0:rt.style)==null||at.setProperty("--range-picker-dropdown-top",it),m.value={visibility:"visible"}}},200)}}else m.value={}},N=v.computed(()=>{let j="270px";return v.unref(u)==="date"&&(j=""),{padding:"10px",height:j,maxHeight:"280px"}}),$=()=>{a.value=null};v.watch(n,j=>{window.modalShow&&window.modalShow(j)});const U=v.computed(()=>{let j="date";return v.unref(E).endsWith("MM")?j="month":v.unref(E).endsWith("YYYY")&&(j="year"),j}),Y=j=>{const{startTime:G,endTime:Z,rangeFormat:et}=v.unref(x);if(G&&Z){let gt="day";return et.endsWith("MM")?gt="month":et.endsWith("YYYY")&&(gt="year"),j&>&&(j<Fo(G).startOf(gt)||j>Fo(Z).endOf(gt))}else return!1};return e({showModal:H}),{visible:n,checkAllDimensions:o,dimIndeterminate:r,dimensionCheckKeys:s,ruleValue:l,ruleOptions:T,filterValue:a,searchDimName:h,fontColor:L,valueList:d,filterType:u,dateSelectType:c,bodyStyle:N,dateType:U,dateSelectOptions:M,formatStr:E,theme:_,handleOk:k,onCheckAllDimChange:B,handleClear:I,dropdownStyle:f,popupStyle:m,selectRef:g,rangePickerRef:p,getPopupContainer:D,onChangeSelectType:$,disabledDate:Y,getContainer:b,dropdownVisibleChange:O,openChange:W}}}),w7={class:"wrap-header"},S7={class:"wrap-body"},x7={style:{padding:"20px",display:"none"}},A7={ref:"selectRef",style:{display:"inline-block"}},R7={style:{padding:"10px 20px"}},T7={key:0,class:"ecan-date-picker"},M7={key:1,class:"ecan-range-picker",style:{display:"inline-block"},ref:"rangePickerRef"},B7={key:1},P7={style:{padding:"20px"}},H7={ref:"selectRef",style:{display:"inline-block"}},E7={style:{padding:"10px 20px"}};function L7(i,t,e,n,o,r){var p;const s=v.resolveComponent("a-checkbox"),l=v.resolveComponent("a-input"),a=v.resolveComponent("a-checkbox-group"),h=v.resolveComponent("a-select-option"),d=v.resolveComponent("a-select"),u=v.resolveComponent("a-date-picker"),c=v.resolveComponent("a-range-picker"),g=v.resolveComponent("a-button"),f=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(f,{wrapClassName:i.theme+" filter-modal",visible:i.visible,"onUpdate:visible":t[9]||(t[9]=m=>i.visible=m),title:((p=i.data)==null?void 0:p.fieldName)+"-筛选","ok-text":"确认","cancel-text":"取消",bodyStyle:i.bodyStyle,getContainer:i.getContainer,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(g,{onClick:t[8]||(t[8]=m=>i.visible=!1)},{default:v.withCtx(()=>t[10]||(t[10]=[v.createTextVNode("取消")])),_:1}),i.data.type==="indicators"?(v.openBlock(),v.createBlock(g,{key:0,onClick:i.handleClear},{default:v.withCtx(()=>t[11]||(t[11]=[v.createTextVNode("清除筛选")])),_:1},8,["onClick"])):v.createCommentVNode("",!0),v.createVNode(g,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[12]||(t[12]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[i.data.type==="dimension"?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["dimension-wrap",i.filterType==="select"?"border":""])},[i.filterType==="select"?(v.openBlock(),v.createElementBlock(v.Fragment,{key:0},[v.createElementVNode("div",w7,[v.createVNode(s,{checked:i.checkAllDimensions,"onUpdate:checked":t[0]||(t[0]=m=>i.checkAllDimensions=m),indeterminate:i.dimIndeterminate,disabled:!!i.searchDimName,onChange:i.onCheckAllDimChange},{default:v.withCtx(()=>[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},"全选",4)]),_:1},8,["checked","indeterminate","disabled","onChange"]),v.createVNode(l,{value:i.searchDimName,"onUpdate:value":t[1]||(t[1]=m=>i.searchDimName=m),placeholder:"请输入关键字搜索",style:{width:"200px","margin-left":"15px"}},null,8,["value"])]),v.createElementVNode("div",S7,[v.createVNode(a,{value:i.dimensionCheckKeys,"onUpdate:value":t[2]||(t[2]=m=>i.dimensionCheckKeys=m),style:{width:"100%"}},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.valueList||[],(m,b)=>v.withDirectives((v.openBlock(),v.createElementBlock("div",{class:"body-item",key:b},[v.createVNode(s,{value:m.value},{default:v.withCtx(()=>[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},v.toDisplayString(m.value),5)]),_:2},1032,["value"])])),[[v.vShow,!i.searchDimName||m.value.includes(i.searchDimName)]])),128))]),_:1},8,["value"])])],64)):i.filterType==="date"?(v.openBlock(),v.createElementBlock(v.Fragment,{key:1},[v.createElementVNode("div",x7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选类型:",4),v.createElementVNode("div",A7,[v.createVNode(d,{value:i.dateSelectType,"onUpdate:value":t[3]||(t[3]=m=>i.dateSelectType=m),style:{width:"200px"},placeholder:"请选择",dropdownClassName:"pivot-table-select-dropdown",getPopupContainer:i.getPopupContainer,dropdownStyle:i.dropdownStyle,onDropdownVisibleChange:i.dropdownVisibleChange,onChange:i.onChangeSelectType},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dateSelectOptions,m=>(v.openBlock(),v.createBlock(h,{key:m.value,value:m.value},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer","dropdownStyle","onDropdownVisibleChange","onChange"])],512)]),v.createElementVNode("div",R7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选值:",4),i.dateSelectType==="date"?(v.openBlock(),v.createElementBlock("span",T7,[v.createVNode(u,{dropdownClassName:"ecan-date-picker-dropdown",value:i.filterValue,"onUpdate:value":t[4]||(t[4]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,getPopupContainer:i.getPopupContainer},null,8,["value","picker","format","getPopupContainer"])])):i.dateSelectType==="range"?(v.openBlock(),v.createElementBlock("div",M7,[v.createVNode(c,{dropdownClassName:"ecan-range-picker-dropdown pivot-table-range-date-dropdown",value:i.filterValue,"onUpdate:value":t[5]||(t[5]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,"disabled-date":i.disabledDate,getPopupContainer:i.getPopupContainer,popupStyle:i.popupStyle,onOpenChange:i.openChange},null,8,["value","picker","format","disabled-date","getPopupContainer","popupStyle","onOpenChange"])],512)):v.createCommentVNode("",!0)])],64)):v.createCommentVNode("",!0)],2)):i.data.type==="indicators"?(v.openBlock(),v.createElementBlock("div",B7,[v.createElementVNode("div",P7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选规则:",4),v.createElementVNode("div",H7,[v.createVNode(d,{value:i.ruleValue,"onUpdate:value":t[6]||(t[6]=m=>i.ruleValue=m),style:{width:"200px"},placeholder:"请选择",dropdownClassName:"pivot-table-select-dropdown",getPopupContainer:i.getPopupContainer,dropdownStyle:i.dropdownStyle,onDropdownVisibleChange:i.dropdownVisibleChange},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.ruleOptions,m=>(v.openBlock(),v.createBlock(h,{key:m.value,value:m.value},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer","dropdownStyle","onDropdownVisibleChange"])],512)]),v.createElementVNode("div",E7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选值:",4),v.createVNode(l,{value:i.filterValue,"onUpdate:value":t[7]||(t[7]=m=>i.filterValue=m),placeholder:"请输入",style:{width:"200px"}},null,8,["value"])])])):v.createCommentVNode("",!0)]),_:1},8,["wrapClassName","visible","title","bodyStyle","getContainer","onOk"])}const DT=Ri(_7,[["render",L7],["__scopeId","data-v-8f8e78da"]]),kX="",k7=v.defineComponent({name:"PivotProperty",props:{},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref({unit:"",format:"",floatLength:""}),r=v.ref(),s=v.ref({}),l=v.inject("theme","light"),a=v.inject("scaleValue",{}),h=v.inject("getContainer",()=>{}),d=[{label:"整数",value:"integer"},{label:"小数",value:"float"},{label:"百分比",value:"percent"}];function u(p){o.value=p,n.value=!0}function c(){t("change",v.unref(o)),n.value=!1}const g=()=>document.getElementsByClassName("property-modal")[0]||document.body,f=p=>{var m,b,C;if(p){const _=(m=v.unref(r))==null?void 0:m.getBoundingClientRect();if(_){const w=_.left/(((b=v.unref(a))==null?void 0:b.widthScale)||1)+"px",y=(_.top+_.height)/(((C=v.unref(a))==null?void 0:C.heightScale)||1)+"px";setTimeout(()=>{var A,x;const S=document.querySelectorAll(".ant-select-dropdown"),R=Array.from(S).filter(T=>window.getComputedStyle(T).display!=="none");if(R!=null&&R.length){const T=document.getElementsByClassName("property-modal")[0];R[0].classList.add("property-select-dropdown"),(A=T==null?void 0:T.style)==null||A.setProperty("--drop-down-left",w),(x=T==null?void 0:T.style)==null||x.setProperty("--drop-down-top",y),s.value={visibility:"visible"}}},200)}}else s.value={}};return v.watch(n,p=>{window.modalShow&&window.modalShow(p)}),e({showModal:u}),{theme:l,visible:n,formData:o,handleOk:c,getPopupContainer:g,formatOptions:d,getContainer:h,selectRef:r,dropdownStyle:s,dropdownVisibleChange:f}}}),F7={ref:"selectRef"};function I7(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-radio-button"),h=v.resolveComponent("a-radio-group"),d=v.resolveComponent("a-select"),u=v.resolveComponent("a-form"),c=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(c,{wrapClassName:i.theme+" property-modal",visible:i.visible,"onUpdate:visible":t[4]||(t[4]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",title:i.formData.fieldName+"-度量属性",destroyOnClose:!1,getContainer:i.getContainer,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(u,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"度量单位"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.formData.unit,"onUpdate:value":t[0]||(t[0]=g=>i.formData.unit=g)},null,8,["value"])]),_:1}),i.formData.unit?(v.openBlock(),v.createBlock(l,{key:0,label:"度量单位位置"},{default:v.withCtx(()=>[v.createVNode(h,{value:i.formData.position,"onUpdate:value":t[1]||(t[1]=g=>i.formData.position=g),"button-style":"solid"},{default:v.withCtx(()=>[v.createVNode(a,{value:"left"},{default:v.withCtx(()=>t[5]||(t[5]=[v.createTextVNode("数据左侧")])),_:1}),v.createVNode(a,{value:"right"},{default:v.withCtx(()=>t[6]||(t[6]=[v.createTextVNode("数据右侧")])),_:1})]),_:1},8,["value"])]),_:1})):v.createCommentVNode("",!0),v.createVNode(l,{label:"格式化"},{default:v.withCtx(()=>[v.createElementVNode("div",F7,[v.createVNode(d,{value:i.formData.format,"onUpdate:value":t[2]||(t[2]=g=>i.formData.format=g),options:i.formatOptions,getPopupContainer:i.getPopupContainer,dropdownStyle:i.dropdownStyle,onDropdownVisibleChange:i.dropdownVisibleChange},null,8,["value","options","getPopupContainer","dropdownStyle","onDropdownVisibleChange"])],512)]),_:1}),["float","percent"].includes(i.formData.format)?(v.openBlock(),v.createBlock(l,{key:1,label:"小数位数"},{default:v.withCtx(()=>[v.createVNode(s,{type:"number",value:i.formData.floatLength,"onUpdate:value":t[3]||(t[3]=g=>i.formData.floatLength=g),min:0},null,8,["value"])]),_:1})):v.createCommentVNode("",!0)]),_:1})]),_:1},8,["wrapClassName","visible","title","getContainer","onOk"])}const D7=Ri(k7,[["render",I7]]);function $n(i,t){O7(i)&&(i="100%");var e=z7(i);return i=t===360?i:Math.min(t,Math.max(0,parseFloat(i))),e&&(i=parseInt(String(i*t),10)/100),Math.abs(i-t)<1e-6?1:(t===360?i=(i<0?i%t+t:i%t)/parseFloat(String(t)):i=i%t/parseFloat(String(t)),i)}function O7(i){return typeof i=="string"&&i.indexOf(".")!==-1&&parseFloat(i)===1}function z7(i){return typeof i=="string"&&i.indexOf("%")!==-1}function N7(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function jg(i){return i<=1?"".concat(Number(i)*100,"%"):i}function vv(i){return i.length===1?"0"+i:String(i)}function W7(i,t,e){return{r:$n(i,255)*255,g:$n(t,255)*255,b:$n(e,255)*255}}function bv(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?i+(t-i)*(6*e):e<1/2?t:e<2/3?i+(t-i)*(2/3-e)*6:i}function V7(i,t,e){var n,o,r;if(i=$n(i,360),t=$n(t,100),e=$n(e,100),t===0)o=e,r=e,n=e;else{var s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;n=bv(l,s,i+1/3),o=bv(l,s,i),r=bv(l,s,i-1/3)}return{r:n*255,g:o*255,b:r*255}}function j7(i,t,e){i=$n(i,255),t=$n(t,255),e=$n(e,255);var n=Math.max(i,t,e),o=Math.min(i,t,e),r=0,s=n,l=n-o,a=n===0?0:l/n;if(n===o)r=0;else{switch(n){case i:r=(t-e)/l+(t<e?6:0);break;case t:r=(e-i)/l+2;break;case e:r=(i-t)/l+4;break}r/=6}return{h:r,s:a,v:s}}function $7(i,t,e){i=$n(i,360)*6,t=$n(t,100),e=$n(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:h*255,g:d*255,b:u*255}}function G7(i,t,e,n){var o=[vv(Math.round(i).toString(16)),vv(Math.round(t).toString(16)),vv(Math.round(e).toString(16))];return n&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function OT(i){return Sn(i)/255}function Sn(i){return parseInt(i,16)}var zT={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function zh(i){var t={r:0,g:0,b:0},e=1,n=null,o=null,r=null,s=!1,l=!1;return typeof i=="string"&&(i=Y7(i)),typeof i=="object"&&(ur(i.r)&&ur(i.g)&&ur(i.b)?(t=W7(i.r,i.g,i.b),s=!0,l=String(i.r).substr(-1)==="%"?"prgb":"rgb"):ur(i.h)&&ur(i.s)&&ur(i.v)?(n=jg(i.s),o=jg(i.v),t=$7(i.h,n,o),s=!0,l="hsv"):ur(i.h)&&ur(i.s)&&ur(i.l)&&(n=jg(i.s),r=jg(i.l),t=V7(i.h,n,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(i,"a")&&(e=i.a)),e=N7(e),{ok:s,format:i.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}var U7="[-\\+]?\\d+%?",K7="[-\\+]?\\d*\\.\\d+%?",Wr="(?:".concat(K7,")|(?:").concat(U7,")"),Cv="[\\s|\\(]+(".concat(Wr,")[,|\\s]+(").concat(Wr,")[,|\\s]+(").concat(Wr,")\\s*\\)?"),yv="[\\s|\\(]+(".concat(Wr,")[,|\\s]+(").concat(Wr,")[,|\\s]+(").concat(Wr,")[,|\\s]+(").concat(Wr,")\\s*\\)?"),po={CSS_UNIT:new RegExp(Wr),rgb:new RegExp("rgb"+Cv),rgba:new RegExp("rgba"+yv),hsl:new RegExp("hsl"+Cv),hsla:new RegExp("hsla"+yv),hsv:new RegExp("hsv"+Cv),hsva:new RegExp("hsva"+yv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Y7(i){if(i=i.trim().toLowerCase(),i.length===0)return!1;var t=!1;if(zT[i])i=zT[i],t=!0;else if(i==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=po.rgb.exec(i);return e?{r:e[1],g:e[2],b:e[3]}:(e=po.rgba.exec(i),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=po.hsl.exec(i),e?{h:e[1],s:e[2],l:e[3]}:(e=po.hsla.exec(i),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=po.hsv.exec(i),e?{h:e[1],s:e[2],v:e[3]}:(e=po.hsva.exec(i),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=po.hex8.exec(i),e?{r:Sn(e[1]),g:Sn(e[2]),b:Sn(e[3]),a:OT(e[4]),format:t?"name":"hex8"}:(e=po.hex6.exec(i),e?{r:Sn(e[1]),g:Sn(e[2]),b:Sn(e[3]),format:t?"name":"hex"}:(e=po.hex4.exec(i),e?{r:Sn(e[1]+e[1]),g:Sn(e[2]+e[2]),b:Sn(e[3]+e[3]),a:OT(e[4]+e[4]),format:t?"name":"hex8"}:(e=po.hex3.exec(i),e?{r:Sn(e[1]+e[1]),g:Sn(e[2]+e[2]),b:Sn(e[3]+e[3]),format:t?"name":"hex"}:!1)))))))))}function ur(i){return!!po.CSS_UNIT.exec(String(i))}var $g=2,NT=.16,X7=.05,q7=.05,Z7=.15,WT=5,VT=4,J7=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function jT(i){var t=i.r,e=i.g,n=i.b,o=j7(t,e,n);return{h:o.h*360,s:o.s,v:o.v}}function Gg(i){var t=i.r,e=i.g,n=i.b;return"#".concat(G7(t,e,n,!1))}function Q7(i,t,e){var n=e/100,o={r:(t.r-i.r)*n+i.r,g:(t.g-i.g)*n+i.g,b:(t.b-i.b)*n+i.b};return o}function $T(i,t,e){var n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=e?Math.round(i.h)-$g*t:Math.round(i.h)+$g*t:n=e?Math.round(i.h)+$g*t:Math.round(i.h)-$g*t,n<0?n+=360:n>=360&&(n-=360),n}function GT(i,t,e){if(i.h===0&&i.s===0)return i.s;var n;return e?n=i.s-NT*t:t===VT?n=i.s+NT:n=i.s+X7*t,n>1&&(n=1),e&&t===WT&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function UT(i,t,e){var n;return e?n=i.v+q7*t:n=i.v-Z7*t,n>1&&(n=1),Number(n.toFixed(2))}function _v(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=[],n=zh(i),o=WT;o>0;o-=1){var r=jT(n),s=Gg(zh({h:$T(r,o,!0),s:GT(r,o,!0),v:UT(r,o,!0)}));e.push(s)}e.push(Gg(n));for(var l=1;l<=VT;l+=1){var a=jT(n),h=Gg(zh({h:$T(a,l),s:GT(a,l),v:UT(a,l)}));e.push(h)}return t.theme==="dark"?J7.map(function(d){var u=d.index,c=d.opacity,g=Gg(Q7(zh(t.backgroundColor||"#141414"),zh(e[u]),c*100));return g}):e}var wv={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Sv={},xv={};Object.keys(wv).forEach(function(i){Sv[i]=_v(wv[i]),Sv[i].primary=Sv[i][5],xv[i]=_v(wv[i],{theme:"dark",backgroundColor:"#141414"}),xv[i].primary=xv[i][5]});var KT=[],Nh=[],tj="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function ej(){var i=document.createElement("style");return i.setAttribute("type","text/css"),i}function ij(i,t){if(t=t||{},i===void 0)throw new Error(tj);var e=t.prepend===!0?"prepend":"append",n=t.container!==void 0?t.container:document.querySelector("head"),o=KT.indexOf(n);o===-1&&(o=KT.push(n)-1,Nh[o]={});var r;return Nh[o]!==void 0&&Nh[o][e]!==void 0?r=Nh[o][e]:(r=Nh[o][e]=ej(),e==="prepend"?n.insertBefore(r,n.childNodes[0]):n.appendChild(r)),i.charCodeAt(0)===65279&&(i=i.substr(1,i.length)),r.styleSheet?r.styleSheet.cssText+=i:r.textContent+=i,r}function YT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){nj(i,o,e[o])})}return i}function nj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function oj(i,t){process.env.NODE_ENV!=="production"&&!i&&console!==void 0&&console.error("Warning: ".concat(t))}function rj(i,t){oj(i,"[@ant-design/icons-vue] ".concat(t))}function XT(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function Av(i,t,e){return e?v.h(i.tag,YT({key:t},e,i.attrs),(i.children||[]).map(function(n,o){return Av(n,"".concat(t,"-").concat(i.tag,"-").concat(o))})):v.h(i.tag,YT({key:t},i.attrs),(i.children||[]).map(function(n,o){return Av(n,"".concat(t,"-").concat(i.tag,"-").concat(o))}))}function qT(i){return _v(i)[0]}function ZT(i){return i?Array.isArray(i)?i:[i]:[]}var sj=`
|
|
309
|
+
${h}`:h,referencePosition:{placement:nn.bottom,rect:d},disappearDelay:(r=l.internalProps.tooltip.overflowTextTooltipDisappearDelay)!==null&&r!==void 0?r:0,style:l.theme.tooltipStyle})}s?this._bindToCell(t,e,s):this._unbindFromCell()}_getTooltipInstanceInfo(t,e){const n=this._table,o=this._tooltipInstances;return o&&o["bubble-tooltip"]||o&&(o["bubble-tooltip"]=y9["bubble-tooltip"](n))}isBinded(t){var e;return JSON.stringify(t)===JSON.stringify((e=this._attachInfo)===null||e===void 0?void 0:e.tooltipOptions)}}const Pg=()=>{Et.registerComponent("axis",UV),Et.registerFunction("computeAxisComponentWidth",XV),Et.registerFunction("computeAxisComponentHeight",qV),Et.registerFunction("getAxisConfigInPivotChart",V8)},Hg=()=>{Et.registerComponent("emptyTip",JV)},Eg=()=>{Et.registerFunction("createLegend",a9)},Lg=()=>{Et.registerComponent("menuHandler",f9)},kg=()=>{Et.registerComponent("title",p9)},Fg=()=>{Et.registerComponent("tooltipHandler",_9)};class w9{constructor(t){this.titleRows=[],this.showedTitleRows=[],this.rowNow=-1,this.skipStartRow=-1,this.skipEndRow=-1,this.table=t,this.table.on("scroll",e=>{e.scrollDirection==="vertical"&&this.updateGroupTitle()}),this.table.on("resize_column",e=>{this.updateGroupTitle()})}updateGroupTitle(){this.table.scrollTop===0?(this.titleRows=[],this.showedTitleRows=[]):this.skipStartRow!==-1&&this.skipEndRow!==-1&&this.skipStartRow!==this.table.scenegraph.proxy.bodyTopRow-1?(this.table.scenegraph.proxy.screenTopRow<=this.skipStartRow||this.table.scenegraph.proxy.screenTopRow>=this.skipEndRow)&&(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()):(this.skipStartRow=-1,this.skipEndRow=-1,this.updateGroupTitleInfo()),this.updateScenegraph()}updateGroupTitleInfo(){this.rowNow=this.table.scenegraph.proxy.screenTopRow+this.titleRows.length;const t=this.table.getRecordIndexByCell(0,this.rowNow),e=this.table.getRecordIndexByCell(0,this.rowNow+1);this.getTitleRowsByRecordIndex(t,e)}getTitleRowsByRecordIndex(t,e){st(t)||(t=[t]),st(e)||(e=[e]);for(let l=0;l<t.length;l++){const a=t.slice(0,l+1);this.table.dataSource.getRaw(a)}const n=[],o=e.length===t.length+1;let r=t.slice(0,o?t.length:t.length-1);const s=this.table.dataSource.currentIndexedData;for(let l=this.rowNow-this.table.columnHeaderLevelCount;l>=0;l--){const a=s[l];if(st(a)&&r.length===a.length){let h=!0;for(let d=0;d<a.length;d++)if(a[d]!==r[d]){h=!1;break}h&&(n.push(l+this.table.columnHeaderLevelCount),r=r.slice(0,r.length-1))}else if(a===t[0]){n.push(l+this.table.columnHeaderLevelCount);break}}this.titleRows=n.reverse()}updateScenegraph(){const{table:t}=this,{shadowGroup:e,shadowGroupFrozen:n}=x9(t);this.showedTitleRows.length=0;let o=0;for(let r=0;r<t.colCount;r++){let s;r<t.frozenColCount?(s=new ue({x:t.getColsWidth(0,r-1),y:t.getFrozenRowsHeight()}),n.add(s)):(s=new ue({x:t.getColsWidth(t.frozenColCount,r-1),y:t.getFrozenRowsHeight()}),e.add(s)),s.col=r;for(let l=0;l<this.titleRows.length;l++){const a=this.titleRows[l];if(S9(a,this.rowNow,t.scenegraph.proxy.screenTopRow,this.titleRows)){r===0&&o++;continue}r===0&&this.showedTitleRows.push(a);const h=t.scenegraph.getCell(r,a);if(h.role==="cell"){const d=xT(h);d.setAttributes({y:40*l}),s.add(d)}else{const d=xo(r,a,t,!0,!0);d.setAttributes({y:40*l}),s.add(d)}}}o>0&&this.skipStartRow===-1&&this.skipEndRow===-1&&(this.skipStartRow=t.scenegraph.proxy.screenTopRow-1,this.skipEndRow=t.scenegraph.proxy.screenTopRow+1)}}function S9(i,t,e,n){return i===t&&i!==e+n.length-1?!0:i===e+n.indexOf(i)+1&&i<t}function xT(i){const t=i.clone();if(t.role=i.role,t.col=i.col,t.row=i.row,t.mergeStartCol=i.mergeStartCol,t.mergeStartRow=i.mergeStartRow,t.mergeEndCol=i.mergeEndCol,t.mergeEndRow=i.mergeEndRow,t.contentWidth=i.contentWidth,t.contentHeight=i.contentHeight,t.role==="cell"){const e=Ie({x:0,y:0,width:t.attribute.width,height:t.attribute.height});t.add(e)}if(i.type==="group"){const e=t;i.forEachChildren(n=>{const o=xT(n);e.add(o)})}return t}function x9(i){const t=i.scenegraph.colHeaderGroup,e=i.scenegraph.cornerHeaderGroup;if(!t.border){const r=Ie({x:0,y:0,width:0,height:0,cursor:"pointer"});t.add(r),t.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=Lr(a),{col:d,row:u}=h;AT(u-l.indexOf(u),i)})}if(!e.border){const r=Ie({x:0,y:0,width:0,height:0,cursor:"pointer"});e.add(r),e.border=r,r.attachShadow(r.shadowRoot),r.name="border-rect",r.addEventListener("click",s=>{const l=i.listTreeStickCellPlugin.titleRows,{shadowTarget:a}=s.pickParams,h=Lr(a),{col:d,row:u}=h;AT(u-l.indexOf(u),i)})}const n=t.border.shadowRoot,o=e.border.shadowRoot;return n.removeAllChild(),o.removeAllChild(),{shadowGroup:n,shadowGroupFrozen:o}}function AT(i,t){const e=t.getDrawRange();if(z(i)&&i>=t.frozenRowCount){const n=t.getFrozenRowsHeight(),o=t.getRowsHeight(0,i-1);t.scrollTop=Math.min(o-n,t.getAllRowsHeight()-e.height)-1}t.scenegraph.updateNextFrame()}const A9=()=>{Et.registerComponent("listTreeStickCellPlugin",w9)},R9={};function T9(){return rh(R9,wg)}function M9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C){var _,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j;const G=T9()[d],Z=f._getCellStyle(o,r),et=Fc("padding",Z,o,r,f);if(z(et)&&(a=et),!i){const gt=xs(o,r,p,f);b&&(i=f.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(w=(_=p==null?void 0:p.group)===null||_===void 0?void 0:_.lineWidth)!==null&&w!==void 0?w:void 0,fill:(S=(y=p==null?void 0:p.group)===null||y===void 0?void 0:y.fill)!==null&&S!==void 0?S:void 0,stroke:(A=(R=p==null?void 0:p.group)===null||R===void 0?void 0:R.stroke)!==null&&A!==void 0?A:void 0,strokeArrayWidth:gt,strokeArrayColor:(T=(x=p==null?void 0:p.group)===null||x===void 0?void 0:x.strokeArrayColor)!==null&&T!==void 0?T:void 0,cursor:(B=(M=p==null?void 0:p.group)===null||M===void 0?void 0:M.cursor)!==null&&B!==void 0?B:void 0,lineDash:(F=(P=p==null?void 0:p.group)===null||P===void 0?void 0:P.lineDash)!==null&&F!==void 0?F:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius}),i&&i.role==="cell"||((i=new ue({x:e,y:n,width:s,height:l,lineWidth:(E=(H=p==null?void 0:p.group)===null||H===void 0?void 0:H.lineWidth)!==null&&E!==void 0?E:void 0,fill:(I=(k=p==null?void 0:p.group)===null||k===void 0?void 0:k.fill)!==null&&I!==void 0?I:void 0,stroke:(D=(L=p==null?void 0:p.group)===null||L===void 0?void 0:L.stroke)!==null&&D!==void 0?D:void 0,strokeArrayWidth:gt,strokeArrayColor:(W=(O=p==null?void 0:p.group)===null||O===void 0?void 0:O.strokeArrayColor)!==null&&W!==void 0?W:void 0,cursor:($=(N=p==null?void 0:p.group)===null||N===void 0?void 0:N.cursor)!==null&&$!==void 0?$:void 0,lineDash:(Y=(U=p==null?void 0:p.group)===null||U===void 0?void 0:U.lineDash)!==null&&Y!==void 0?Y:void 0,lineCap:"butt",clip:!0,cornerRadius:p.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}if(i.AABBBounds.width(),C&&Array.isArray(f.getCellValue(o,r))||!C){const gt=new Rl(m,{stroke:!1,x:a[3],y:a[0],canvas:(j=f.canvas)!==null&&j!==void 0?j:f.scenegraph.stage.window.getContext().canvas,mode:f.options.mode,modeParams:f.options.modeParams,spec:u,ClassType:G,width:s-a[3]-a[1],height:l-a[2]-a[0],chartInstance:c,dataId:g,data:f.getCellValue(o,r)||[],cellPadding:a,dpr:f.internalProps.pixelRatio,axes:f.isPivotChart()?f.internalProps.layoutMap.getChartAxes(o,r):[],tableChartOption:f.options.chartOption});i.appendChild(gt),f.internalProps.layoutMap.setChartInstance(o,r,gt.chartInstance)}return i}function B9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b){var C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U;if(!i){const et=xs(o,r,f,g);b&&(i=g.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:l,height:a,lineWidth:(_=(C=f==null?void 0:f.group)===null||C===void 0?void 0:C.lineWidth)!==null&&_!==void 0?_:void 0,fill:(y=(w=f==null?void 0:f.group)===null||w===void 0?void 0:w.fill)!==null&&y!==void 0?y:void 0,stroke:(R=(S=f==null?void 0:f.group)===null||S===void 0?void 0:S.stroke)!==null&&R!==void 0?R:void 0,strokeArrayWidth:et,strokeArrayColor:(x=(A=f==null?void 0:f.group)===null||A===void 0?void 0:A.strokeArrayColor)!==null&&x!==void 0?x:void 0,cursor:(M=(T=f==null?void 0:f.group)===null||T===void 0?void 0:T.cursor)!==null&&M!==void 0?M:void 0,lineDash:(P=(B=f==null?void 0:f.group)===null||B===void 0?void 0:B.lineDash)!==null&&P!==void 0?P:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),i&&i.role==="cell"||((i=new ue({x:e,y:n,width:l,height:a,lineWidth:(H=(F=f==null?void 0:f.group)===null||F===void 0?void 0:F.lineWidth)!==null&&H!==void 0?H:void 0,fill:(k=(E=f==null?void 0:f.group)===null||E===void 0?void 0:E.fill)!==null&&k!==void 0?k:void 0,stroke:(L=(I=f==null?void 0:f.group)===null||I===void 0?void 0:I.stroke)!==null&&L!==void 0?L:void 0,strokeArrayWidth:et,strokeArrayColor:(O=(D=f==null?void 0:f.group)===null||D===void 0?void 0:D.strokeArrayColor)!==null&&O!==void 0?O:void 0,cursor:(N=(W=f==null?void 0:f.group)===null||W===void 0?void 0:W.cursor)!==null&&N!==void 0?N:void 0,lineDash:(U=($=f==null?void 0:f.group)===null||$===void 0?void 0:$.lineDash)!==null&&U!==void 0?U:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}let Y;if(c){let et=o,gt=r;m&&(et=m.start.col,gt=m.start.row),Y=g.getCellIcons(et,gt)}let j=0,G=0;if(Array.isArray(Y)&&Y.length!==0){const{leftIconWidth:et,rightIconWidth:gt,absoluteLeftIconWidth:vt,absoluteRightIconWidth:it}=zc(Y,i,m,g);j=et+gt,G=et,i.forEachChildren(nt=>{nt.role==="icon-left"?nt.setAttribute("x",nt.attribute.x+h[3]):nt.role==="icon-right"?nt.setAttribute("x",nt.attribute.x+l-gt-h[1]):nt.role==="icon-absolute-right"&&nt.setAttribute("x",nt.attribute.x+l-it-h[1])}),i.forEachChildren(nt=>{u==="middle"?nt.setAttribute("y",(a-nt.AABBBounds.height())/2):u==="bottom"?nt.setAttribute("y",a-nt.AABBBounds.height()-h[2]):nt.setAttribute("y",h[0])})}const Z=P9(o,r,s-j,l,a,h,f,p,g);return Z&&i.appendChild(Z),Z.render(),l-=h[1]+h[3]+j,a-=h[0]+h[2],d==="center"?Z.setAttribute("x",h[3]+G+(l-Z.AABBBounds.width())/2):d==="right"?Z.setAttribute("x",h[3]+G+l-Z.AABBBounds.width()):Z.setAttribute("x",h[3]+G),u==="middle"?Z.setAttribute("y",h[0]+(a-Z.AABBBounds.height())/2):u==="bottom"?Z.setAttribute("y",h[0]+a-Z.AABBBounds.height()):Z.setAttribute("y",h[0]),i}function P9(i,t,e,n,o,r,s,l,a){var h,d,u,c;const g=a._getCellStyle(i,t),f=wt("size",g,i,t,a),p=wt("spaceBetweenTextAndIcon",g,i,t,a),m=wt("defaultFill",g,i,t,a),b=wt("defaultStroke",g,i,t,a),C=wt("disableFill",g,i,t,a),_=wt("checkedFill",g,i,t,a),w=wt("checkedStroke",g,i,t,a),y=wt("disableCheckedFill",g,i,t,a),S=wt("disableCheckedStroke",g,i,t,a),R=wt("checkIconImage",g,i,t,a),A=wt("indeterminateIconImage",g,i,t,a),x=a.getCellValue(i,t),T=a.getCellOriginValue(i,t);let M,B,P=(h=x)!==null&&h!==void 0?h:"";pe(x)?(M=x.checked,B=x.disable,P=(d=x.text)!==null&&d!==void 0?d:""):typeof x=="boolean"&&(M=x,P=""),M=a.stateManager.syncCheckedState(i,t,l.field,M);const F=uo(i,t,a),H=a._getCellStyle(i,t),E=(u=H.autoWrapText)!==null&&u!==void 0?u:a.internalProps.autoWrapText,{lineClamp:k}=H,{checked:I,disable:L}=l;if(M==null||typeof M=="function"){const Y=ii(I,{col:i,row:t,table:a,context:null,value:x,dataValue:T});M=a.stateManager.syncCheckedState(i,t,l.field,Y)}const D=ii(L,{col:i,row:t,table:a,context:null,value:x,dataValue:T}),O=e==="auto",W=a.isAutoRowHeight(t),N={text:P.length===1?P[0]:P,maxLineWidth:O?1/0:n-(r[1]+r[3]+F)-f-p,textBaseline:"top",autoWrapText:E,lineClamp:k,wordBreak:"break-word",heightLimit:W?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:F,whiteSpace:P.length!==1||E?"normal":"no-wrap"},$={x:0,y:0,text:s.text?Object.assign({},s.text,N):N,icon:{width:Math.floor(f/1.4),height:Math.floor(f/1.4)},box:{width:f,height:f},spaceBetweenTextAndIcon:p,disabled:(c=B??D)!==null&&c!==void 0&&c};M==="indeterminate"?($.checked=void 0,$.indeterminate=!0):($.checked=M,$.indeterminate=void 0),m&&($.box.fill=m),b&&($.box.stroke=b),C&&($.box.disableFill=C),_&&($.box.checkedFill=_),w&&($.box.checkedStroke=w),y&&($.box.disableCheckedFill=y),S&&($.box.disableCheckedStroke=S),R&&($.icon.checkIconImage=R),A&&($.icon.indeterminateIconImage=A);const U=new Tr($);return U.name="checkbox",U}function H9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f){var p,m,b,C,_,w,y,S,R,A,x,T;if(!i){const P=xs(o,r,g,c);(i=new ue({x:e,y:n,width:l,height:a,lineWidth:(m=(p=g==null?void 0:g.group)===null||p===void 0?void 0:p.lineWidth)!==null&&m!==void 0?m:void 0,fill:(C=(b=g==null?void 0:g.group)===null||b===void 0?void 0:b.fill)!==null&&C!==void 0?C:void 0,stroke:(w=(_=g==null?void 0:g.group)===null||_===void 0?void 0:_.stroke)!==null&&w!==void 0?w:void 0,strokeArrayWidth:P,strokeArrayColor:(S=(y=g==null?void 0:g.group)===null||y===void 0?void 0:y.strokeArrayColor)!==null&&S!==void 0?S:void 0,cursor:(A=(R=g==null?void 0:g.group)===null||R===void 0?void 0:R.cursor)!==null&&A!==void 0?A:void 0,lineDash:(T=(x=g==null?void 0:g.group)===null||x===void 0?void 0:x.lineDash)!==null&&T!==void 0?T:void 0,lineCap:"butt",clip:!0,cornerRadius:g.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i)}const{width:M,height:B}=E9(o,r,s,l,a,h,g,f,i,c);return l-=h[1]+h[3],a-=h[0]+h[2],i.forEachChildren(P=>{d==="center"?P.setAttribute("x",h[3]+P.attribute.x+(l-M)/2):d==="right"?P.setAttribute("x",h[3]+P.attribute.x+l-M):P.setAttribute("x",h[3]+P.attribute.x),u==="middle"?P.setAttribute("y",h[0]+P.attribute.y+(a-B)/2):u==="bottom"?P.setAttribute("y",h[0]+P.attribute.y+a-B):P.setAttribute("y",h[0]+P.attribute.y)}),i}function E9(i,t,e,n,o,r,s,l,a,h){var d,u;const c=h._getCellStyle(i,t);let g=wt("size",c,i,t,h),f=wt("innerRadius",c,i,t,h),p=wt("outerRadius",c,i,t,h);const m=wt("spaceBetweenTextAndIcon",c,i,t,h),b=wt("spaceBetweenRadio",c,i,t,h),C=wt("defaultFill",c,i,t,h),_=wt("defaultStroke",c,i,t,h),w=wt("disableFill",c,i,t,h),y=wt("checkedFill",c,i,t,h),S=wt("checkedStroke",c,i,t,h),R=wt("disableCheckedFill",c,i,t,h),A=wt("disableCheckedStroke",c,i,t,h);pt(p)?g=2*p:p=Math.round(g/2),(!pt(f)||f<0)&&(f=Math.round(p/7*3));const x=h.getCellValue(i,t),T=h.getCellOriginValue(i,t),M=uo(i,t,h),B=h._getCellStyle(i,t),P=(d=B.autoWrapText)!==null&&d!==void 0?d:h.internalProps.autoWrapText,{lineClamp:F}=B,H=e==="auto",E=h.heightMode==="autoHeight",k={maxLineWidth:H?1/0:n-(r[1]+r[3]+M)-g-m,textBaseline:"top",autoWrapText:P,lineClamp:F,wordBreak:"break-word",heightLimit:E?-1:o-Math.floor(r[0]+r[2]),pickable:!1,dx:M},I={x:0,y:0,text:s.text?Object.assign({},s.text,k):k,circle:{innerRadius:f,outerRadius:p},spaceBetweenTextAndIcon:m};C&&(I.circle.fill=C),_&&(I.circle.stroke=_),w&&(I.circle.disableFill=w),y&&(I.circle.checkedFill=y),S&&(I.circle.checkedStroke=S),R&&(I.circle.disableCheckedFill=R),A&&(I.circle.disableCheckedStroke=A);let L=0,D=0;const O=(u=l.radioDirectionInCell)!==null&&u!==void 0?u:"vertical";if(st(x))x.forEach((W,N)=>{const $=RT(W,T,N,i,t,l,P,I,h);$&&a.appendChild($),$.id=`radio-${i}-${t}-${N}`,$.render();const U=$.AABBBounds;O==="vertical"?($.setAttribute("y",D),D+=U.height()+(N!==x.length-1?b:0),L=Math.max(L,U.width())):O==="horizontal"&&($.setAttribute("x",L),L+=U.width()+(N!==x.length-1?b:0),D=Math.max(D,U.height()))});else{const W=RT(x,T,void 0,i,t,l,P,I,h);W&&a.appendChild(W),W.id=`radio-${i}-${t}`,W.render();const N=W.AABBBounds;L=N.width(),D=N.height()}return{width:L,height:D}}function RT(i,t,e,n,o,r,s,l,a){const h=L9(i,t,e,n,o,r,a),d=k9(i,t,n,o,r,a),u=pe(i)?i.text:vi(i)?"":i??"",c=xt({},l,{checked:h,disabled:d,text:{text:u.length===1?u[0]:u,whiteSpace:u.length!==1||s?"normal":"no-wrap"},boundsPadding:0}),g=new eh(c);return g.name="radio",g}function L9(i,t,e,n,o,r,s){var l,a;const h=(l=r.radioCheckType)!==null&&l!==void 0?l:"column";let d,u;return pe(i)?d=i.checked:typeof i=="boolean"&&(d=i),d=s.stateManager.syncRadioState(n,o,r.field,h,e,d),d!=null&&typeof d!="function"||(u=ii(r.checked,{col:n,row:o,table:s,context:null,value:i,dataValue:t}),d=s.stateManager.syncRadioState(n,o,r.field,h,e,u)),(a=d??u)!==null&&a!==void 0&&a}function k9(i,t,e,n,o,r){var s;let l;pe(i)&&(l=i.disable);const a=ii(o.disable,{col:e,row:n,table:r,context:null,value:i,dataValue:t});return(s=l??a)!==null&&s!==void 0&&s}const zr=new sz,Nr=new cs;function F9(i,t,e,n,o,r,s,l,a,h,d,u){var c,g,f,p,m,b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L;if(!i){const O=xs(o,r,d,h);u&&(i=h.scenegraph.highPerformanceGetCell(o,r,!0))&&i.role==="cell"&&i.setAttributes({x:e,y:n,width:s,height:l,lineWidth:(g=(c=d==null?void 0:d.group)===null||c===void 0?void 0:c.lineWidth)!==null&&g!==void 0?g:void 0,fill:(p=(f=d==null?void 0:d.group)===null||f===void 0?void 0:f.fill)!==null&&p!==void 0?p:void 0,stroke:(b=(m=d==null?void 0:d.group)===null||m===void 0?void 0:m.stroke)!==null&&b!==void 0?b:void 0,strokeArrayWidth:O,strokeArrayColor:(_=(C=d==null?void 0:d.group)===null||C===void 0?void 0:C.strokeArrayColor)!==null&&_!==void 0?_:void 0,cursor:(y=(w=d==null?void 0:d.group)===null||w===void 0?void 0:w.cursor)!==null&&y!==void 0?y:void 0,lineDash:(R=(S=d==null?void 0:d.group)===null||S===void 0?void 0:S.lineDash)!==null&&R!==void 0?R:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius}),i&&i.role==="cell"||((i=new ue({x:e,y:n,width:s,height:l,lineWidth:(x=(A=d==null?void 0:d.group)===null||A===void 0?void 0:A.lineWidth)!==null&&x!==void 0?x:void 0,fill:(M=(T=d==null?void 0:d.group)===null||T===void 0?void 0:T.fill)!==null&&M!==void 0?M:void 0,stroke:(P=(B=d==null?void 0:d.group)===null||B===void 0?void 0:B.stroke)!==null&&P!==void 0?P:void 0,strokeArrayWidth:O,strokeArrayColor:(H=(F=d==null?void 0:d.group)===null||F===void 0?void 0:F.strokeArrayColor)!==null&&H!==void 0?H:void 0,cursor:(k=(E=d==null?void 0:d.group)===null||E===void 0?void 0:E.cursor)!==null&&k!==void 0?k:void 0,lineDash:(L=(I=d==null?void 0:d.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:d.group.cornerRadius})).role="cell",i.col=o,i.row=r,t==null||t.addCellGroup(i))}const D=I9(o,r,s,l,a,h);return D&&i.appendChild(D),i}function I9(i,t,e,n,o,r){let s,l;const a=r.internalProps.layoutMap.getBody(i,t).sparklineSpec,h=r.getCellValue(i,t);if(!Array.isArray(h))return;const d=o[3],u=o[0];e-=o[1]+o[3];const c=n-=o[0]+o[2];if(typeof a=="function"){const _={col:i,row:t,dataValue:r.getCellOriginValue(i,t)||"",value:r.getCellValue(i,t)||"",rect:r.getCellRangeRelativeRect(r.getCellRange(i,t)),table:r};s=a(_),l=TT(s,d,u,e,n)}else s=a,l=TT(a,d,u,e,n);const g=[],f=[];let p,m;if(typeof s.xField=="object")zr.domain(s.xField.domain),p=s.xField.field;else if(typeof s.xField=="string"){const _=h.map(w=>w[s.xField]);zr.domain(_),p=s.xField}else Array.isArray(h)&&(zr.domain(Array.from({length:h.length},(_,w)=>w)),p=s.xField);if(zr.range([0,e]),typeof s.yField=="object")Nr.domain(s.yField.domain),m=s.yField.field;else if(typeof s.yField=="string"){const _=MT(h,s.yField);Nr.domain([Math.min(..._),Math.max(..._)]),m=s.yField}else if(Array.isArray(h)){const _=MT(h);Nr.domain([Math.min(..._),Math.max(..._)]),m=s.yField}if(Nr.range([0,n]),typeof s.xField=="object"&&Array.isArray(s.xField.domain)){const _=h.map(y=>y[s.xField.field]),w=s.xField.domain;for(let y=0;y<w.length;y++){let S=!1;for(let R=0;R<_.length;R++)if(w[y]===_[R]){const A=h[R];if(!z(A[p])||!z(A[m]))break;g.push({x:0+zr.scale(A[p]),y:c-Nr.scale(A[m]),defined:z(A[m])}),f.push(A),S=!0;break}S||(g.push({x:0+zr.scale(w[y]),y:0,defined:!1}),f.push({[p]:w[y],[m]:null}))}}else for(let _=0;_<h.length;_++){const w=h[_];g.push({x:0+zr.scale(p?w[p]:_),y:c-Nr.scale(m?w[m]:w),defined:z(m?w[m]:w),rawData:w}),f.push(w)}const b=l.getChildByName("sparkline-line");b&&b.setAttribute("points",g),b.bandwidth=zr.step(),b.min=Nr.range()[0],b.max=Nr.range()[1];const C=l.getChildByName("sparkline-symbol-group");if(C){const _=s.pointShowRule==="isolatedPoint";if(s.pointShowRule==="all")for(let w=0;w<g.length;w++){const{x:y,y:S,defined:R}=g[w];if(R){const A=ka({x:y,y:S});C.appendChild(A)}}else if(_)for(let w=0;w<g.length;w++){const{x:y,y:S,defined:R}=g[w];if(R&&(!g[w-1]||!g[w-1].defined)&&(!g[w+1]||!g[w+1].defined)){const A=ka({x:y,y:S});C.appendChild(A)}}}return l}function TT(i,t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A,x,T;let M;M=typeof i=="function"?i(null):i;const B=new ue({x:t,y:e,width:n,height:o,stroke:!1,fill:!1});if(B.name="sparkline",M.type==="line"){const P=mn({x:0,y:0,curveType:M.smooth?"monotoneX":"linear",stroke:(l=(s=(r=M.line)===null||r===void 0?void 0:r.style)===null||s===void 0?void 0:s.stroke)!==null&&l!==void 0?l:"blue",lineWidth:(d=(h=(a=M.line)===null||a===void 0?void 0:a.style)===null||h===void 0?void 0:h.strokeWidth)!==null&&d!==void 0?d:2});P.name="sparkline-line",B.addChild(P),M.crosshair&&(P.hover=(c=(u=M.crosshair)===null||u===void 0?void 0:u.style)!==null&&c!==void 0?c:{stroke:"#000",interpolate:"linear"});const F=new ue({x:0,y:0,width:n,height:o,stroke:!1,fill:!1});F.name="sparkline-symbol-group",F.setTheme({symbol:{stroke:(p=(f=(g=M.point)===null||g===void 0?void 0:g.style)===null||f===void 0?void 0:f.stroke)!==null&&p!==void 0?p:"#000",lineWidth:(C=(b=(m=M.point)===null||m===void 0?void 0:m.style)===null||b===void 0?void 0:b.strokeWidth)!==null&&C!==void 0?C:1,fill:(y=(w=(_=M.point)===null||_===void 0?void 0:_.style)===null||w===void 0?void 0:w.fill)!==null&&y!==void 0?y:"#000",size:2*((A=(R=(S=M.point)===null||S===void 0?void 0:S.style)===null||R===void 0?void 0:R.size)!==null&&A!==void 0?A:3),symbolType:"circle"}}),B.addChild(F),F.hover=(T=(x=M.point)===null||x===void 0?void 0:x.hover)!==null&&T!==void 0&&T}return B}function MT(i,t){const e=[];for(let n=0;n<i.length;n++){const o=i[n];z(t)&&z(o[t])?e.push(o[t]):!z(t)&&z(o)&&e.push(o)}return e}const pv=Cn();function D9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m){var b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et;const gt=g._getCellStyle(n,o),vt=Fc("padding",gt,n,o,g);!((b=g.options.customConfig)===null||b===void 0)&&b.imageMargin?h=ee((C=g.options.customConfig)===null||C===void 0?void 0:C.imageMargin):z(vt)&&(h=vt),!((_=f==null?void 0:f.text)===null||_===void 0)&&_.textAlign&&(d=(w=f==null?void 0:f.text)===null||w===void 0?void 0:w.textAlign),!((y=f==null?void 0:f.text)===null||y===void 0)&&y.textBaseline&&(u=(S=f==null?void 0:f.text)===null||S===void 0?void 0:S.textBaseline);const it=xs(n,o,f,g);let nt,bt;if(m&&(nt=g.scenegraph.highPerformanceGetCell(n,o,!0),nt&&nt.role==="cell"&&nt.setAttributes({x:t,y:e,width:r,height:s,lineWidth:(A=(R=f==null?void 0:f.group)===null||R===void 0?void 0:R.lineWidth)!==null&&A!==void 0?A:void 0,fill:(T=(x=f==null?void 0:f.group)===null||x===void 0?void 0:x.fill)!==null&&T!==void 0?T:void 0,stroke:(B=(M=f==null?void 0:f.group)===null||M===void 0?void 0:M.stroke)!==null&&B!==void 0?B:void 0,strokeArrayWidth:it,strokeArrayColor:(F=(P=f==null?void 0:f.group)===null||P===void 0?void 0:P.strokeArrayColor)!==null&&F!==void 0?F:void 0,cursor:(E=(H=f==null?void 0:f.group)===null||H===void 0?void 0:H.cursor)!==null&&E!==void 0?E:void 0,lineDash:(I=(k=f==null?void 0:f.group)===null||k===void 0?void 0:k.lineDash)!==null&&I!==void 0?I:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius})),nt&&nt.role==="cell"||(nt=new ue({x:t,y:e,width:r,height:s,lineWidth:(D=(L=f==null?void 0:f.group)===null||L===void 0?void 0:L.lineWidth)!==null&&D!==void 0?D:void 0,fill:(W=(O=f==null?void 0:f.group)===null||O===void 0?void 0:O.fill)!==null&&W!==void 0?W:void 0,stroke:($=(N=f==null?void 0:f.group)===null||N===void 0?void 0:N.stroke)!==null&&$!==void 0?$:void 0,strokeArrayWidth:it,strokeArrayColor:(Y=(U=f==null?void 0:f.group)===null||U===void 0?void 0:U.strokeArrayColor)!==null&&Y!==void 0?Y:void 0,cursor:(G=(j=f==null?void 0:f.group)===null||j===void 0?void 0:j.cursor)!==null&&G!==void 0?G:void 0,lineDash:(et=(Z=f==null?void 0:f.group)===null||Z===void 0?void 0:Z.lineDash)!==null&&et!==void 0?et:void 0,lineCap:"butt",clip:!0,cornerRadius:f.group.cornerRadius}),nt.role="cell",nt.col=n,nt.row=o,i==null||i.addCellGroup(nt)),c){let _t=n,ut=o;p&&(_t=p.start.col,ut=p.start.row),bt=g.getCellIcons(_t,ut)}let Ct=0,at=0;if(Array.isArray(bt)&&bt.length!==0){const{leftIconWidth:_t,rightIconWidth:ut,absoluteLeftIconWidth:It,absoluteRightIconWidth:Ut}=zc(bt,nt,p,g);Ct=_t,at=ut,nt.forEachChildren(yt=>{yt.role==="icon-left"?yt.setAttribute("x",yt.attribute.x+h[3]):yt.role==="icon-right"?yt.setAttribute("x",yt.attribute.x+r-ut-h[1]):yt.role==="icon-absolute-right"&&yt.setAttribute("x",yt.attribute.x+r-Ut-h[1])}),nt.forEachChildren(yt=>{u==="middle"?yt.setAttribute("y",(s-yt.AABBBounds.height())/2):u==="bottom"?yt.setAttribute("y",s-yt.AABBBounds.height()-h[2]):yt.setAttribute("y",h[0])}),nt._cellLeftIconWidth=Ct,nt._cellRightIconWidth=at}const rt=g.getCellValue(n,o),ct=document.createElement("video");ct.addEventListener("loadeddata",()=>{a&&fA(n,o,ct.videoWidth,ct.videoHeight,g.scenegraph,h,nt);const{width:_t,height:ut,isMerge:It}=Sl(nt,g);if(l){const{width:ye,height:Oe}=kc(ct.videoWidth,ct.videoHeight,_t-h[1]-h[3],ut-h[0]-h[2]),Be=Pm(0,0,_t,ut,ye,Oe,d,u,h);ht.setAttributes({width:ye,height:Oe,x:Be.x,y:Be.y,dx:0})}else ht.setAttributes({x:h[3],y:h[0],width:_t-h[1]-h[3],height:ut-h[2]-h[0],dy:0});It&&Hm(nt.mergeStartCol,nt.mergeEndCol,nt.mergeStartRow,nt.mergeEndRow,g);const{width:Ut,height:yt}=Sl(nt,g),Tt=Math.floor(Math.min(Ut-h[1]-h[3],yt-h[2]-h[0])/2),kt=0+(Ut>ht.attribute.width?ht.attribute.x-0+ht.attribute.width/2:Ut/2),oe=0+(yt>ht.attribute.height?ht.attribute.y-0+ht.attribute.height/2:yt/2),re=new vs({x:kt-Tt/2,y:oe-Tt/2,width:Tt,height:Tt,image:pv.play.svg,cursor:pv.play.cursor});re.name="play-icon",nt.appendChild(re),g.scenegraph.updateNextFrame()}),ct.onerror=()=>{ht.image=pv.damage_pic.svg},ct.src=rt,ct.setAttribute("preload","auto");const ht=pu({x:h[3],y:h[0],width:r-h[1]-h[3],height:s-h[2]-h[0],image:ct,cursor:"pointer"});return ht.name="image",ht.keepAspectRatio=l,ht.textAlign=d,ht.textBaseline=u,nt.appendChild(ht),nt}function O9(i,t,e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C){var _,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt;const bt=i._getCellStyle(r,s),Ct=Fc("padding",bt,r,s,i);z(Ct)&&(d=Ct),!((_=m==null?void 0:m.text)===null||_===void 0)&&_.textAlign&&(u=(w=m==null?void 0:m.text)===null||w===void 0?void 0:w.textAlign),!((y=m==null?void 0:m.text)===null||y===void 0)&&y.textBaseline&&(c=(S=m==null?void 0:m.text)===null||S===void 0?void 0:S.textBaseline);const at=i.isAutoRowHeight(s),rt=l==="auto",ct=(R=bt.autoWrapText)!==null&&R!==void 0?R:i.internalProps.autoWrapText,ht=bt.lineClamp,_t=xs(r,s,m,i);let ut;if(C&&(ut=i.scenegraph.getCell(r,s,!0),ut&&ut.role==="cell"&&ut.setAttributes({x:n,y:o,width:a,height:h,lineWidth:(x=(A=m==null?void 0:m.group)===null||A===void 0?void 0:A.lineWidth)!==null&&x!==void 0?x:void 0,fill:(M=(T=m==null?void 0:m.group)===null||T===void 0?void 0:T.fill)!==null&&M!==void 0?M:void 0,stroke:(P=(B=m==null?void 0:m.group)===null||B===void 0?void 0:B.stroke)!==null&&P!==void 0?P:void 0,strokeArrayWidth:_t??void 0,strokeArrayColor:(H=(F=m==null?void 0:m.group)===null||F===void 0?void 0:F.strokeArrayColor)!==null&&H!==void 0?H:void 0,cursor:(k=(E=m==null?void 0:m.group)===null||E===void 0?void 0:E.cursor)!==null&&k!==void 0?k:void 0,lineDash:(L=(I=m==null?void 0:m.group)===null||I===void 0?void 0:I.lineDash)!==null&&L!==void 0?L:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius})),ut&&ut.role==="cell"||(ut=new ue({x:n,y:o,width:a,height:h,lineWidth:(O=(D=m==null?void 0:m.group)===null||D===void 0?void 0:D.lineWidth)!==null&&O!==void 0?O:void 0,fill:(N=(W=m==null?void 0:m.group)===null||W===void 0?void 0:W.fill)!==null&&N!==void 0?N:void 0,stroke:(U=($=m==null?void 0:m.group)===null||$===void 0?void 0:$.stroke)!==null&&U!==void 0?U:void 0,strokeArrayWidth:_t??void 0,strokeArrayColor:(j=(Y=m==null?void 0:m.group)===null||Y===void 0?void 0:Y.strokeArrayColor)!==null&&j!==void 0?j:void 0,cursor:(Z=(G=m==null?void 0:m.group)===null||G===void 0?void 0:G.cursor)!==null&&Z!==void 0?Z:void 0,lineDash:(gt=(et=m==null?void 0:m.group)===null||et===void 0?void 0:et.lineDash)!==null&>!==void 0?gt:void 0,lineCap:"butt",clip:!0,cornerRadius:m.group.cornerRadius}),ut.role="cell",ut.col=r,ut.row=s,e==null||e.addCellGroup(ut)),f&&ut.appendChild(f),p){const It=t;let Ut;if(g){let yt=r,Tt=s;b&&(yt=b.start.col,Tt=b.start.row),Ut=i.getCellIcons(yt,Tt)}if(tN(ut,Ut,It,d,rt,at,ct,typeof ht=="number"?ht:void 0,ut.attribute.width,ut.attribute.height,u,c,i,m,b),(vt=m==null?void 0:m._vtable)===null||vt===void 0?void 0:vt.marked){const yt=o0({x:ut.attribute.width,y:0,startAngle:Math.PI/2,endAngle:Math.PI,outerRadius:6,fill:"#3073F2",pickable:!1});yt.name="mark",ut.appendChild(yt)}}return f&&ut.setAttributes({width:Math.max(ut.attribute.width,(it=f.attribute.width)!==null&&it!==void 0?it:0),height:Math.max(ut.attribute.height,(nt=f.attribute.height)!==null&&nt!==void 0?nt:0)}),ut}function z9(i,t,e,n,o,r,s,l,a,h){var d,u,c,g,f,p;i.dependField&&(o=(u=(d=a.getCellOriginRecord(r,s))===null||d===void 0?void 0:d[i.dependField])!==null&&u!==void 0?u:o),i.barType=(c=i.barType)!==null&&c!==void 0?c:"default",i.min=(g=ii(i.min,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&g!==void 0?g:0,i.max=(f=ii(i.max,{col:r,row:s,table:a,value:n,dataValue:o,cellHeaderPaths:void 0}))!==null&&f!==void 0?f:i.min+100;let m=0;m=h?a.getRowsHeight(h.start.row,h.end.row):a.getRowHeight(s);let b=e,C=m,_=0;pt(a.theme._contentOffset)&&(_=a.theme._contentOffset);const w=new ue({x:-_,y:-_,width:b,height:C});w.name="progress-bar";const{showBar:y,barColor:S,barBgColor:R,barPositiveColor:A,barNegativeColor:x,barAxisColor:T,barRightToLeft:M,showBarMark:B,barMarkPositiveColor:P,barMarkNegativeColor:F,barMarkWidth:H,barMarkPosition:E}=t;let{barHeight:k,barBottom:I,barPadding:L}=t;L.length===1?L=[L[0],L[0],L[0],L[0]]:L.length===2?L=[L[0],L[1],L[0],L[1]]:L.length===3&&(L=[L[0],L[1],L[2],L[1]]),L=L.map((G,Z)=>{if(typeof G=="string"&&vc.endsWith(G,"%")){const et=Number(G.substr(0,G.length-1));return Z===0||Z===2?m*et/100:e*et/100}return Number(G)});const D=ee(wt("borderLineWidth",t,r,s,a)),O=Math.max(L[0],Math.ceil(D[0]/2)),W=Math.max(L[1],Math.floor(D[1]/2)),N=Math.max(L[2],Math.floor(D[2]/2)),$=Math.max(L[3],Math.ceil(D[3]/2));b-=W+$,C-=N+O,s===a.rowCount-1&&[0,"0"].includes(I)&&(C-=1);const U=O,Y=$,j=b;if(typeof k=="string"&&vc.endsWith(k,"%")?(k=Number(k.substr(0,k.length-1)),k=C*k/100):k=Number(k),typeof I=="string"&&vc.endsWith(I,"%")?(I=Number(I.substr(0,I.length-1)),I=C*I/100):I=Number(I),ii(y,{col:r,row:s,table:a,context:null,value:n,dataValue:o})){let G=`${o}`;vc.endsWith(G,"%")&&(G=G.substr(0,G.length-1));const Z=Number(G);if(isNaN(Z))return w;if(((p=i.barType)!==null&&p!==void 0?p:"default")==="default"){const et=Z<i.min?0:Z>i.max?1:(Z-i.min)/(i.max-i.min),gt=b,vt=U+C-k-I;let it=Math.min(gt*et,gt);const nt=M?Y+j-it:Y;r!==a.colCount-1||et!==1||M||(it-=1);const bt=ii(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:et});if(bt){const rt=Ie({x:nt,y:vt,width:gt,height:k,fill:bt});w.addChild(rt)}const Ct=ii(S,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:et})||"#20a8d8",at=Ie({x:nt,y:vt,width:it,height:k,fill:Ct});w.addChild(at)}else if(i.barType==="negative"){const et=i.min<0?-i.min:0,gt=i.max>0?i.max:0,vt=et/(et+gt),it=1-vt,nt=Z>0?Z/gt:0,bt=Z<0?-Z/et:0,Ct=b,at=U+C-k-I,rt=Y,ct=ii(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt});if(ct){const Be=Ie({x:rt,y:at,width:Ct,height:k,fill:ct});w.addChild(Be)}const ht=M?it*Ct:vt*Ct,_t=Math.min(Ct*vt*bt,Ct),ut=M?{left:rt+ht,top:at,width:_t,height:k}:{left:rt+ht-_t,top:at,width:_t,height:k},It=ii(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:bt})||"#20a8d8",Ut=Ie({x:ut.left,y:ut.top,width:ut.width,height:ut.height,fill:It});w.addChild(Ut);let yt=Math.min(Ct*it*nt,Ct);r!==a.colCount-1||nt!==1||M||(yt-=1);const Tt=M?{left:rt+ht-yt,top:at,width:yt,height:k}:{left:rt+ht,top:at,width:yt,height:k},kt=ii(A,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt})||"#20a8d8",oe=Ie({x:Tt.left,y:Tt.top,width:Tt.width,height:Tt.height,fill:kt});w.addChild(oe);const re=M?ut.left:Tt.left,ye=ii(T,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt}),Oe=mn({x:0,y:0,stroke:ye,lineWidth:1,lineDash:[2,2],points:[{x:re,y:0},{x:re,y:m}]});if(w.addChild(Oe),B&&(nt||bt)){const Be=H,Ee=[];let At;if(nt>0)if(At=ii(P,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:nt})||"#20a8d8",E==="right"){const Bt=M?Tt.left+H/2:Tt.left+Tt.width-H/2;Ee.push({x:Bt,y:Tt.top}),Ee.push({x:Bt,y:Tt.top+Tt.height})}else E==="bottom"&&(Ee.push({x:Tt.left,y:Tt.top+Tt.height-H/2}),Ee.push({x:Tt.left+Tt.width,y:Tt.top+Tt.height-H/2}));else if(bt>0)if(At=ii(F,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:bt})||"#20a8d8",E==="right"){const Bt=M?ut.left+ut.width-H/2:ut.left+H/2;Ee.push({x:Bt,y:ut.top}),Ee.push({x:Bt,y:ut.top+ut.height})}else E==="bottom"&&(Ee.push({x:ut.left,y:ut.top+ut.height-H/2}),Ee.push({x:ut.left+ut.width,y:ut.top+ut.height-H/2}));const mt=mn({x:0,y:0,stroke:At,lineWidth:Be,points:Ee});w.addChild(mt)}}else if(i.barType==="negative_no_axis"){const et=i.min<0?-i.min:0,gt=i.max>0?i.max:0,vt=Math.max(et,gt),it=vt===0?0:Math.abs(Z)/vt,nt=b;let bt=Math.min(nt*it,nt);r!==a.colCount-1||it!==1||M||(bt-=1);const Ct=U+C-k-I,at=M?Y+j-bt:Y,rt=ii(R,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it});if(rt){const ut=Ie({x:at,y:Ct,width:nt,height:k,fill:rt});w.addChild(ut)}const ct={left:at,top:Ct,width:bt,height:k};let ht;ht=Z>=0?ii(A,{col:r,row:s,table:a,context:null,value:n,percentile:it,dataValue:o})||"#20a8d8":ii(x,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it})||"#20a8d8";const _t=Ie({x:ct.left,y:ct.top,width:ct.width,height:ct.height,fill:ht});if(w.addChild(_t),B&&Z){const ut=H,It=[];let Ut;if(Ut=Z>=0?ii(P,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it})||"#20a8d8":ii(F,{col:r,row:s,table:a,context:null,value:n,dataValue:o,percentile:it})||"#20a8d8",E==="right"){const Tt=M?ct.left+H/2:ct.left+ct.width-H/2;It.push({x:Tt,y:ct.top}),It.push({x:Tt,y:ct.top+ct.height})}else E==="bottom"&&(It.push({x:ct.left,y:ct.top+ct.height-H/2}),It.push({x:ct.left+ct.width,y:ct.top+ct.height-H/2}));const yt=mn({x:0,y:0,stroke:Ut,lineWidth:ut,points:It});w.addChild(yt)}}}return w}function N9(i,t,e,n,o,r){var s,l,a,h,d,u,c,g,f;if(e!=null&&e.zero&&(i=Math.min(i,0),t=Math.max(t,0)),e==null?void 0:e.expand){const b=i,C=t;z(e.expand.min)&&(i=b-(C-b)*e.expand.min),z(e.expand.max)&&(t=C+(C-b)*e.expand.max)}let p,m;if(pt(e==null?void 0:e.min)&&(i=e.min),pt(e==null?void 0:e.max)&&(t=e.max),(e==null?void 0:e.type)==="log"?(p=new qa,p.base((s=e==null?void 0:e.base)!==null&&s!==void 0?s:10)):(e==null?void 0:e.type)==="symlog"?(p=new Za,p.constant((l=e==null?void 0:e.constant)!==null&&l!==void 0?l:10)):p=new cs,p.domain([i,t],!!(e!=null&&e.nice)),e==null?void 0:e.nice){let b=(u=(h=(a=e.tick)===null||a===void 0?void 0:a.forceTickCount)!==null&&h!==void 0?h:(d=e.tick)===null||d===void 0?void 0:d.tickCount)!==null&&u!==void 0?u:10;ce(b)&&(b=b({axisLength:o,labelStyle:(g=(c=e==null?void 0:e.label)===null||c===void 0?void 0:c.style)!==null&&g!==void 0?g:{fontSize:kh.LABEL_FONT_SIZE}})),e.niceType==="accurateFirst"&&(b=Math.max(10,b)),Mt(e.min)&&Mt(e.max)?p.nice(b):z(e.min)&&Mt(e.max)?p.niceMax(b):Mt(e.min)&&z(e.max)&&p.niceMin(b)}return delete p._niceType,r||(m=p.ticks(pt(e==null?void 0:e.tickCount)?e==null?void 0:e.tickCount:5,{noDecimals:(f=e==null?void 0:e.tick)===null||f===void 0?void 0:f.noDecimals})),{range:p.domain(),ticks:m}}const Ig=()=>{Et.registerFunction("createChartCellGroup",M9),Et.registerFunction("getAxisDomainRangeAndLabels",N9)},Dg=()=>{Et.registerFunction("createCheckboxCellGroup",B9)},Og=()=>{Et.registerFunction("createImageCellGroup",nN)},zg=()=>{Et.registerFunction("createProgressBarCell",z9)},Ng=()=>{Et.registerFunction("createRadioCellGroup",H9)},Wg=()=>{Et.registerFunction("createSparkLineCellGroup",F9)},Dl=()=>{Et.registerFunction("createTextCellGroup",O9)},Vg=()=>{Et.registerFunction("createVideoCellGroup",D9)};Pg(),Hg(),Eg(),Lg(),kg(),Fg(),A9(),Ig(),Dg(),Og(),zg(),Ng(),Wg(),Dl(),Vg();class W9 extends bT{}Dl();class V9 extends bT{}function j9(i,t,e,n,o,r){const s=r.columnHeaderLevelCount,l=[],a=[];for(let c=0;c<e.length;c++)n.includes(e[c])||a.push(o[c]);for(let c=0;c<n.length;c++)if(!e.includes(n[c])){const g={col:i,row:s+c};l.push(g)}let h=r.getParentCellId(i,t),d=r.getRowHeaderCellAddressByCellId(h);const u=[];for(d&&u.push(d);h;)h=r.getParentCellId(d.col,d.row),h&&(d=r.getRowHeaderCellAddressByCellId(h),u.push(d));return{addCellPositions:l,removeCellPositions:a,updateCellPositions:u}}const BT={startInTotal:0,level:0};class hr{constructor(t,e,n,o){var r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y;this.colIndex=0,this._showHeader=!0,this.columnHeaderObjs=[],this.rowHeaderObjs=[],this._cornerHeaderCellFullPathIds=[],this._columnHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds=[],this._rowHeaderCellFullPathIds_FULL=[],this._cornerHeaderCellIds=[],this._columnHeaderCellIds=[],this._rowHeaderCellIds=[],this._rowHeaderCellIds_FULL=[],this._columnWidths=[],this.columnPaths=[],this._headerObjects=[],this._headerObjectMap={},this._indicators=[],this.indicatorsAsCol=!0,this.hideIndicatorName=!1,this._showRowHeader=!0,this._showColumnHeader=!0,this._indicatorShowType="column",this.rowHierarchyTextStartAlignment=!1,this.rowDimensionKeys=[],this.colDimensionKeys=[],this.indicatorKeys=[],this.indicatorDimensionKey=Zi,this._rowHeaderExtensionTree={},this._extensionRowDimensionKeys=[],this.fullRowDimensionKeys=[],this.leftRowSeriesNumberColumnCount=0,this.rightRowSeriesNumberColumnCount=0,this._useGetBodyCache=!1,this._getBodyCache=new Map,this._useHeaderPathCache=!1,this._colHeaderPathCache=new Map,this._rowHeaderPathCache=new Map,this.sharedVar=t.layoutNodeId,this._table=t,t.options.rowHierarchyType==="tree"&&(this.extensionRows=t.options.extensionRows),this.dataset=e,this._largeCellRangeCache=[],this._CellHeaderPathMap=new Map,this.rowTree=t.internalProps.rowTree,this.columnTree=t.internalProps.columnTree,this.rowsDefine=(r=t.internalProps.rows)!==null&&r!==void 0?r:[],this.columnsDefine=(s=t.internalProps.columns)!==null&&s!==void 0?s:[],this.indicatorsDefine=(l=t.internalProps.indicators)!==null&&l!==void 0?l:[],this.indicatorTitle=t.options.indicatorTitle,this.indicatorsAsCol=(a=t.options.indicatorsAsCol)===null||a===void 0||a,this.hideIndicatorName=(h=t.options.hideIndicatorName)!==null&&h!==void 0&&h,this.showRowHeader=(d=t.options.showRowHeader)===null||d===void 0||d,this.showColumnHeader=(u=t.options.showColumnHeader)===null||u===void 0||u,this.rowHeaderTitle=t.options.rowHeaderTitle,this.columnHeaderTitle=t.options.columnHeaderTitle,this.rowHierarchyType=(c=t.options.rowHierarchyType)!==null&&c!==void 0?c:"grid",this.rowExpandLevel=(g=t.options.rowExpandLevel)!==null&&g!==void 0?g:1,this.rowHierarchyIndent=(f=t.options.rowHierarchyIndent)!==null&&f!==void 0?f:20,this.rowHierarchyTextStartAlignment=t.options.rowHierarchyTextStartAlignment,this.cornerSetting=Object.assign({titleOnDimension:"column",forceShowHeader:!1},t.options.corner),e&&(this.rowTree=e.rowHeaderTree,this.columnTree=e.colHeaderTree),(p=this.indicatorsDefine)===null||p===void 0||p.forEach(x=>{typeof x=="string"?this.indicatorKeys.push(x):this.indicatorKeys.push(x.indicatorKey)}),this.columnDimensionTree=n,this.rowDimensionTree=o,this.colDimensionKeys=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this.resetRowHeaderLevelCount(),this._table.isPivotChart()&&(this.hasTwoIndicatorAxes=this.indicatorsDefine.some(x=>{var T,M;if(x.chartSpec&&x.chartSpec.series&&x.chartSpec.series.length>1){const B=(M=(T=x.chartSpec.axes)!==null&&T!==void 0?T:this._table.pivotChartAxes)!==null&&M!==void 0?M:[];if(!B.length||B.every(P=>P.orient!==(this.indicatorsAsCol?"top":"right")||P.visible!==!1))return!0}return!1})),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=nm(this._rowHeaderCellFullPathIds_FULL),t.options.rowHierarchyType==="tree"&&((m=this.extensionRows)===null||m===void 0?void 0:m.length)>=1&&(this.generateExtensionRowTree(),this.extensionRows.forEach(x=>{const T=[];x.rows.forEach(M=>{typeof M=="string"?T.push(M):T.push(M.dimensionKey)}),this._extensionRowDimensionKeys.push(T),this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(T)})),this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);let S,R=this.columnDimensionTree.dimensionKeysIncludeVirtual.valueArr();!this.dataset||this._table.isPivotChart()||((C=(b=this.dataset.records)===null||b===void 0?void 0:b.length)!==null&&C!==void 0?C:0)!==0||this.dataset.customColTree||(R=this.columnsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol&&R.push(this.indicatorDimensionKey)),R=this.columnHeaderTitle?[""].concat(R):R;let A=[];if(this.rowHierarchyType==="tree"&&((_=this.extensionRows)===null||_===void 0?void 0:_.length)>=1){const x=[];x.push(this.rowDimensionKeys[0]),this._extensionRowDimensionKeys.forEach(T=>{x.push(T[0])}),A=this.extensionRows.reduce((T,M)=>T.concat(M.rows),[]),S=this.rowHeaderTitle?[""].concat(x):x}else S=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),!this.dataset||this._table.isPivotChart()||((y=(w=this.dataset.records)===null||w===void 0?void 0:w.length)!==null&&y!==void 0?y:0)!==0||this.dataset.customRowTree||(S=this.rowsDefine.map(x=>typeof x=="string"?x:x.dimensionKey),this.indicatorsAsCol||S.push(this.indicatorDimensionKey)),S=this.rowHeaderTitle?[""].concat(S):S;this.cornerHeaderObjs=this._addCornerHeaders(R,S,this.columnsDefine.concat(...this.rowsDefine,...A)),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((x,T)=>(x[T.id]=T,x),{}),this.indicatorsAsCol&&!this.hideIndicatorName?this._indicatorShowType="column":this.indicatorsAsCol||this.hideIndicatorName?this._indicatorShowType="none":this._indicatorShowType="row",this.generateCellIdsConsiderHideHeader(),this.setPagination(t.options.pagination),this._table.isPivotChart()&&(this._chartItemSpanSize=0,this._chartItemBandSize=0,this._indicators.find(x=>{var T,M,B,P,F,H,E,k;!((T=x==null?void 0:x.style)===null||T===void 0)&&T.padding&&(this._chartPadding=x.style.padding),!((M=x.chartSpec)===null||M===void 0)&&M.barWidth&&typeof x.chartSpec.barWidth=="number"&&(this._chartItemSpanSize=(B=x.chartSpec)===null||B===void 0?void 0:B.barWidth);const I=(F=(P=x.chartSpec)===null||P===void 0?void 0:P.axes)===null||F===void 0?void 0:F.find(L=>L.type==="band");return I!=null&&I.bandSize&&(this._chartItemBandSize=I==null?void 0:I.bandSize,this._chartPaddingInner=(H=st(I.paddingInner)?I.paddingInner[0]:I.paddingInner)!==null&&H!==void 0?H:0,this._chartPaddingOuter=(E=st(I.paddingOuter)?I.paddingOuter[0]:I.paddingOuter)!==null&&E!==void 0?E:0),this._chartItemSpanSize>0||((k=x.chartSpec.series)===null||k===void 0||k.find(L=>(L.barWidth&&typeof L.barWidth=="number"&&(this._chartItemSpanSize=L.barWidth),this._chartItemSpanSize>0)),!1)})),this.handleRowSeriesNumber(t.internalProps.rowSeriesNumber),this.setColumnWidths()}handleRowSeriesNumber(t){var e,n;t&&(Array.isArray(t)?this.rowSeriesNumberColumn=t.map(o=>{var r,s;return{id:"",title:o.title,define:o,cellType:(r=o.cellType)!==null&&r!==void 0?r:"text",headerType:(s=o.cellType)!==null&&s!==void 0?s:"text",width:o.width,style:o.style,format:o.format,field:o.field,icon:o.icon}}):this.rowSeriesNumberColumn=[{id:"",title:t.title,define:t,cellType:(e=t.cellType)!==null&&e!==void 0?e:"text",headerType:(n=t.cellType)!==null&&n!==void 0?n:"text",style:t.style,width:t.width,format:t.format,field:"",icon:t.icon,isChildNode:!1}],this.leftRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!0),this.rightRowSeriesNumberColumn=this.rowSeriesNumberColumn.filter(o=>!1),this.leftRowSeriesNumberColumnCount=this.leftRowSeriesNumberColumn.length,this.rightRowSeriesNumberColumnCount=this.rightRowSeriesNumberColumn.length)}_generateColHeaderIds(){var t,e,n,o,r,s,l,a;if(((t=this.columnDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1){let h=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&this.indicatorsAsCol&&this.columnDimensionTree.totalLevel<this.columnHeaderLevelCount){h=this.columnHeaderLevelCount-this.columnDimensionTree.totalLevel;for(let d=0;d<h;d++)this._columnHeaderCellFullPathIds.unshift([])}this._addHeaders(this._columnHeaderCellFullPathIds,h,this.columnDimensionTree.tree.children,[],this.columnHeaderObjs)}if(this.columnHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const h=++this.sharedVar.seqId,d=Array(this.colCount-this.rowHeaderLevelCount-this.rightFrozenColCount).fill(h);this._columnHeaderCellFullPathIds.unshift(d);const u={id:h,title:typeof this.columnHeaderTitle.title=="string"?this.columnHeaderTitle.title:this.columnsDefine.reduce((c,g)=>typeof g=="string"?c:c+(c?`/${g.title}`:`${g.title}`),""),field:void 0,headerType:(r=(o=this.columnHeaderTitle)===null||o===void 0?void 0:o.headerType)!==null&&r!==void 0?r:"text",style:(s=this.columnHeaderTitle)===null||s===void 0?void 0:s.headerStyle,define:{id:h,disableHeaderHover:!!(!((l=this.columnHeaderTitle)===null||l===void 0)&&l.disableHeaderHover),disableHeaderSelect:!!(!((a=this.columnHeaderTitle)===null||a===void 0)&&a.disableHeaderSelect)}};this.columnHeaderObjs.push(u),this._headerObjects[h]=u}}_generateRowHeaderIds(){var t,e,n,o,r,s,l,a,h,d;if(((t=this.rowDimensionTree.tree.children)===null||t===void 0?void 0:t.length)>=1)if(this.rowHierarchyType==="tree")this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs);else{let u=0;if(this.dataset&&!this._table.isPivotChart()&&((n=(e=this.dataset.records)===null||e===void 0?void 0:e.length)!==null&&n!==void 0?n:0)===0&&!this.dataset.customColTree&&!this.dataset.customRowTree&&!this.indicatorsAsCol&&this.rowDimensionTree.totalLevel<this.rowHeaderLevelCount){u=this.rowHeaderLevelCount-this.rowDimensionTree.totalLevel;for(let c=0;c<u;c++)this._rowHeaderCellFullPathIds_FULL.unshift([])}this._addHeaders(this._rowHeaderCellFullPathIds_FULL,u,this.rowDimensionTree.tree.children,[],this.rowHeaderObjs)}if(this.rowHeaderTitle){this.sharedVar.seqId=Math.max(this.sharedVar.seqId,this._headerObjects.length);const u=++this.sharedVar.seqId,c=Array((r=(o=this._rowHeaderCellFullPathIds_FULL[0])===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:this.rowDimensionTree.tree.size).fill(u);this._rowHeaderCellFullPathIds_FULL.unshift(c);const g={id:u,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((f,p)=>typeof p=="string"?f:f+(f?`/${p.title}`:`${p.title}`),""),field:void 0,headerType:(l=(s=this.rowHeaderTitle)===null||s===void 0?void 0:s.headerType)!==null&&l!==void 0?l:"text",style:(a=this.rowHeaderTitle)===null||a===void 0?void 0:a.headerStyle,define:{id:u,disableHeaderHover:!!(!((h=this.rowHeaderTitle)===null||h===void 0)&&h.disableHeaderHover),disableHeaderSelect:!!(!((d=this.rowHeaderTitle)===null||d===void 0)&&d.disableHeaderSelect)}};this.rowHeaderObjs.push(g),this._headerObjects[u]=g}}_addHeaders(t,e,n,o,r){const s=this;t[e]||function(l){const a=t[l]=[];if(s.colIndex===0)return a;const h=t[l-1];for(let d=0;d<(h==null?void 0:h.length);d++)a[d]=h[d]}(e);for(let l=0;l<n.length;l++){const a=n[l];H8(a,t,r,o,e,this)}}_addHeadersForTreeMode(t,e,n,o,r,s,l,a){const h=this;t[e]||function(d){const u=t[d]=[];if(h.colIndex===0)return u;const c=t[d-1];for(let g=0;g<(c==null?void 0:c.length);g++)u[g]=c[g]}(e);for(let d=0;d<n.length;d++){const u=n[d];E8(u,t,a,o,e,r,s,l,this)}}_addCornerHeaders(t,e,n){var o,r;const s=[];if(this.cornerSetting.titleOnDimension==="all")if(this.indicatorsAsCol){let l=-1;t&&t.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}),e&&e.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[l]||(this._cornerHeaderCellFullPathIds[l]=[]),this._cornerHeaderCellFullPathIds[l][h]=c})}else{let l=-1;e&&e.forEach((a,h)=>{var d,u;a===this.indicatorDimensionKey&&(l=h);const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f;for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c}),t&&t.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};s[c]=f,this._headerObjects[c]=f,this._cornerHeaderCellFullPathIds[h][l]=c})}else if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="column"){const l=((o=this.cornerSetting)===null||o===void 0?void 0:o.titleOnDimension)==="row"?e:t;l&&l.forEach((a,h)=>{var d,u;const c=++this.sharedVar.seqId,g=n.find(p=>typeof p!="string"&&p.dimensionKey===a),f={id:c,title:a===this.indicatorDimensionKey?this.indicatorTitle:g?g.title:a==="axis"?"":a,field:a,style:this.cornerSetting.headerStyle,headerType:(d=this.cornerSetting.headerType)!==null&&d!==void 0?d:"text",showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,define:{showSort:g==null?void 0:g.showSortInCorner,sort:g==null?void 0:g.sort,dimensionKey:a,id:c,value:a,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,headerEditor:this.cornerSetting.headerEditor,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect},dropDownMenu:g==null?void 0:g.cornerDropDownMenu,headerIcon:g==null?void 0:g.cornerHeaderIcon,pivotInfo:{value:(u=g==null?void 0:g.title)!==null&&u!==void 0?u:"",dimensionKey:a,isPivotCorner:!0},description:g==null?void 0:g.cornerDescription};if(s[c]=f,this._headerObjects[c]=f,this.cornerSetting.titleOnDimension==="column"){this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]);for(let p=0;p<this.rowHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[h][p]=c}else if(this.cornerSetting.titleOnDimension==="row")for(let p=0;p<this.columnHeaderLevelCount;p++)this._cornerHeaderCellFullPathIds[p]||(this._cornerHeaderCellFullPathIds[p]=[]),this._cornerHeaderCellFullPathIds[p][h]=c})}else{const l=++this.sharedVar.seqId,a={id:l,title:"",field:"维度名称",style:this.cornerSetting.headerStyle,headerType:(r=this.cornerSetting.headerType)!==null&&r!==void 0?r:"text",define:{dimensionKey:"维度名称",id:l,headerCustomRender:this.cornerSetting.customRender,headerCustomLayout:this.cornerSetting.customLayout,disableHeaderHover:!!this.cornerSetting.disableHeaderHover,disableHeaderSelect:!!this.cornerSetting.disableHeaderSelect}};s[l]=a,this._headerObjects[l]=a;for(let h=0;h<this.columnHeaderLevelCount;h++)for(let d=0;d<this.rowHeaderLevelCount;d++)this._cornerHeaderCellFullPathIds[h]||(this._cornerHeaderCellFullPathIds[h]=[]),this._cornerHeaderCellFullPathIds[h][d]=l}return s}generateExtensionRowTree(){this.extensionRows.forEach((t,e)=>{const n=this._rowHeaderCellFullPathIds_FULL;this._rowHeaderCellFullPathIds_FULL=[],n.forEach((o,r)=>{const s=o[o.length-1];let l,a;if(this.colIndex=0,typeof t.rowTree=="function"){const d=this.findFullCellIds(o);l=t.rowTree(d.map(u=>({dimensionKey:this._headerObjects[u].field,value:this._headerObjects[u].title})))}else l=Le(t.rowTree);this._rowHeaderExtensionTree[s]?(this._rowHeaderExtensionTree[s].reset(this._rowHeaderExtensionTree[s].tree.children,!0),a=this._rowHeaderExtensionTree[s]):(a=new He(l??[],this.sharedVar,this.rowHierarchyType,void 0),this._rowHeaderExtensionTree[s]=a);const h=[];this._addHeadersForTreeMode(h,0,a.tree.children,[],a.totalLevel,!0,t.rows,this.rowHeaderObjs);for(let d=0;d<h[0].length;d++)this._rowHeaderCellFullPathIds_FULL.push(o.concat(h[0][d]))})})}setColumnWidths(){var t,e,n;const o=new Array(this.colCount).fill(void 0);if(this.leftRowSeriesNumberColumnCount&&(o[0]=this.leftRowSeriesNumberColumn[0]),this.showHeader&&this.showRowHeader)if(this.rowHeaderTitle&&(o[0+this.leftRowSeriesNumberColumnCount]={}),this.rowHierarchyType==="tree"){const r=this.rowDimensionKeys[0];if(r){const s=(t=this.rowsDefine)===null||t===void 0?void 0:t.find(l=>typeof l!="string"&&l.dimensionKey===r);s&&(o[0+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:s.width,minWidth:s.minWidth,maxWidth:s.maxWidth})}(e=this._extensionRowDimensionKeys)===null||e===void 0||e.forEach((s,l)=>{var a;const h=s[0];if(h){const d=(a=this.extensionRows[l].rows)===null||a===void 0?void 0:a.find(u=>typeof u!="string"&&u.dimensionKey===h);d&&(o[l+1+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth})}})}else(this.rowDimensionTree.totalLevel>0?this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr():this.rowsDefine.map(r=>typeof r=="string"?r:r.dimensionKey)).forEach((r,s)=>{var l;const a=(l=this.rowsDefine)===null||l===void 0?void 0:l.find(h=>typeof h!="string"&&h.dimensionKey===r);a&&(o[s+(this.rowHeaderTitle?1:0)+this.leftRowSeriesNumberColumnCount]={width:a.width,minWidth:a.minWidth,maxWidth:a.maxWidth})});if(this.indicatorsAsCol)for(let r=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;r<this.colCount;r++){const s=this.getBody(r,this.columnHeaderLevelCount);o[r]={width:s==null?void 0:s.width,minWidth:s==null?void 0:s.minWidth,maxWidth:s==null?void 0:s.maxWidth}}else{let r,s,l,a=0;(n=this._indicators)===null||n===void 0||n.forEach((h,d)=>{var u,c;typeof h.width=="number"?a=Math.max(h.width,a):h.width==="auto"&&(l=!0),typeof h.minWidth=="number"&&(s=Math.max(h.minWidth,(u=s)!==null&&u!==void 0?u:0)),typeof h.maxWidth=="number"&&(r=Math.min(h.maxWidth,(c=r)!==null&&c!==void 0?c:Number.MAX_VALUE))}),a=a>0?a:l?"auto":void 0,o.fill({width:a,minWidth:s,maxWidth:r},this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount,this.colCount-this.rightFrozenColCount)}this._columnWidths=o}get columnWidths(){return this._columnWidths}getColumnWidthDefined(t){return this._columnWidths[t]}get showHeader(){return this._showHeader}set showHeader(t){this._showHeader=t}get showColumnHeader(){return this._showColumnHeader}set showColumnHeader(t){this._showColumnHeader=t}get showRowHeader(){return this._showRowHeader}set showRowHeader(t){this._showRowHeader=t}get columnHeaderTitle(){return this._columnHeaderTitle}set columnHeaderTitle(t){this._columnHeaderTitle=t}get rowHeaderTitle(){return this._rowHeaderTitle}set rowHeaderTitle(t){this._rowHeaderTitle=t}getHeaderFieldKey(t,e){}getCellLocation(t,e){return this.isCornerHeader(t,e)?"cornerHeader":this.isColumnHeader(t,e)?"columnHeader":this.isRowHeader(t,e)?"rowHeader":"body"}isHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||e>=0&&e<this.columnHeaderLevelCount||t>=this.colCount-this.rightHeaderColCount||e>=this.rowCount-this.bottomHeaderRowCount}isCornerHeader(t,e){return t>=0&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isColumnHeader(t,e){return t>=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=0&&e<this.columnHeaderLevelCount}isRowHeader(t,e){return t>=this.leftRowSeriesNumberColumnCount&&t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount&&e>=this.columnHeaderLevelCount}isFrozen(t,e){return this.isFrozenColumn(t)||this.isRightFrozenColumn(t)||this.isBottomFrozenRow(e)||this.isFrozenRow(e)||this.isSeriesNumberInBody(t,e)||this.isSeriesNumberInHeader(t,e)}isFrozenColumn(t,e){if(z(e)){if(t>=0&&t<this.frozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.frozenColCount>0&&t>=0&&t<this.frozenColCount)return!0;return!1}isRightFrozenColumn(t,e){if(z(e)){if(t>=this.colCount-this.rightFrozenColCount&&e>=this.frozenRowCount&&e<this.rowCount-this.bottomFrozenRowCount)return!0}else if(this.rightFrozenColCount>0&&t>=this.colCount-this.rightFrozenColCount)return!0;return!1}isFrozenRow(t,e){if(z(e)){if(e>=0&&e<this.frozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.frozenRowCount>0&&e>=0&&e<this.frozenRowCount)return!0;return!1}isBottomFrozenRow(t,e){if(z(e)){if(e>=this.rowCount-this.bottomFrozenRowCount&&t>=this.frozenColCount&&t<this.colCount-this.rightFrozenColCount)return!0}else if(e=t,this.bottomFrozenRowCount>0&&e>=this.rowCount-this.bottomFrozenRowCount)return!0;return!1}isLeftTopCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=0&&e<this.frozenRowCount}isLeftBottomCorner(t,e){return t>=0&&t<this.frozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}isRightTopCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=0&&e<this.frozenRowCount}isRightBottomCorner(t,e){return t>=this.colCount-this.rightFrozenColCount&&e>=this.rowCount-this.bottomFrozenRowCount}getColumnHeaderRange(){return{start:{col:this.rowHeaderLevelCount,row:0},end:{col:this.colCount-1,row:this.columnHeaderLevelCount-1}}}getRowHeaderRange(){return{start:{col:0,row:this.columnHeaderLevelCount},end:{col:this.rowHeaderLevelCount-1,row:this.rowCount-1}}}getCornerHeaderRange(){return{start:{col:0,row:0},end:{col:this.rowHeaderLevelCount-1,row:this.columnHeaderLevelCount-1}}}getBodyRange(){return{start:{col:this.rowHeaderLevelCount,row:this.columnHeaderLevelCount},end:{col:this.colCount-1,row:this.rowCount-1}}}resetCellIds(){}get frozenColCount(){return this._table.internalProps.frozenColCount?this.colCount>this._table.internalProps.frozenColCount?this._table.internalProps.frozenColCount:this.colCount:0}get frozenRowCount(){return this._table.internalProps.frozenRowCount?this.rowCount>=this._table.internalProps.frozenRowCount?this._table.internalProps.frozenRowCount:this.rowCount:0}get headerLevelCount(){return this.columnHeaderLevelCount}resetColumnHeaderLevelCount(){var t,e,n,o,r,s,l,a,h,d,u;if(this.showHeader&&this.showColumnHeader){if(this._table.isPivotChart()&&this.indicatorsAsCol&&!(!((e=(t=this.dataset)===null||t===void 0?void 0:t.colKeys)===null||e===void 0)&&e.length)&&((o=(n=this.columnDimensionTree)===null||n===void 0?void 0:n.tree)===null||o===void 0?void 0:o.level)===0&&!this.hasTwoIndicatorAxes)return void(this.columnHeaderLevelCount=0);let c=this.indicatorsAsCol&&this.hideIndicatorName&&this.colDimensionKeys[this.colDimensionKeys.length-1]===this.indicatorDimensionKey?this.columnDimensionTree.totalLevel-1:this.columnDimensionTree.totalLevel;return c===0&&this.dataset&&!(!((r=this.dataset.customColTree)===null||r===void 0)&&r.length)?this.cornerSetting.titleOnDimension==="row"&&this.cornerSetting.forceShowHeader?c=1:this._table.isPivotChart()||((l=(s=this.dataset.records)===null||s===void 0?void 0:s.length)!==null&&l!==void 0?l:0)!==0||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(a=this.columnsDefine.length)!==null&&a!==void 0?a:0):!this.dataset||this._table.isPivotChart()||((d=(h=this.dataset.records)===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0)!==0||this.dataset.customColTree||this.cornerSetting.titleOnDimension!=="column"&&this.cornerSetting.titleOnDimension!=="all"||(c=(u=this.columnsDefine.length)!==null&&u!==void 0?u:0,!this.hideIndicatorName&&this.indicatorsAsCol&&c++),this.columnHeaderTitle&&(c+=1),this._table.isPivotChart()&&this.indicatorsAsCol&&!this.hasTwoIndicatorAxes&&Fh(this.indicatorsDefine)&&(c-=1),void(this.columnHeaderLevelCount=c)}this.columnHeaderLevelCount=this.indicatorsAsCol?this.hideIndicatorName?0:1:0}resetRowHeaderLevelCount(){var t,e,n,o,r,s,l,a;if(this.showHeader&&this.showRowHeader){if(this.rowHierarchyType==="tree"){const u=(e=(t=this.extensionRows)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0;return this.rowHeaderTitle?void(this.rowHeaderLevelCount=2+u):void(this.rowHeaderLevelCount=1+u)}const h=this.rowDimensionTree.totalLevel;let d=h;return d===0&&this.dataset&&!(!((n=this.dataset.customRowTree)===null||n===void 0)&&n.length)?this.cornerSetting.titleOnDimension==="column"&&this.cornerSetting.forceShowHeader?d=1:this._table.isPivotChart()||((r=(o=this.dataset.records)===null||o===void 0?void 0:o.length)!==null&&r!==void 0?r:0)!==0||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=(s=this.rowsDefine.length)!==null&&s!==void 0?s:0):!this.dataset||this._table.isPivotChart()||((a=(l=this.dataset.records)===null||l===void 0?void 0:l.length)!==null&&a!==void 0?a:0)!==0||this.dataset.customRowTree||this.cornerSetting.titleOnDimension!=="row"&&this.cornerSetting.titleOnDimension!=="all"||(d=this.rowsDefine.length,this.hideIndicatorName||this.indicatorsAsCol||d++),!this.indicatorsAsCol&&this.hideIndicatorName&&this.rowDimensionKeys[this.rowDimensionKeys.length-1]===this.indicatorDimensionKey&&(d=h-1),this.rowHeaderTitle&&(d+=1),void(this.rowHeaderLevelCount=d)}this.rowHeaderLevelCount=this.indicatorsAsCol||this.hideIndicatorName?0:1}get columnHeaderLevelCount(){return this._columnHeaderLevelCount}set columnHeaderLevelCount(t){this._columnHeaderLevelCount=t}get rowHeaderLevelCount(){return this._rowHeaderLevelCount}set rowHeaderLevelCount(t){this._rowHeaderLevelCount=t}get colCount(){var t;return(this.columnDimensionTree.totalLevel>0||this._table.isPivotChart()||((t=this.dataset.records)===null||t===void 0?void 0:t.length)>0||this.dataset.records&&!Array.isArray(this.dataset.records)?this.columnDimensionTree.tree.size:0)+this.rowHeaderLevelCount+this.rightHeaderColCount+this.leftRowSeriesNumberColumnCount}get rowCount(){var t,e,n,o;return((this._table.records||this.dataset.records)&&(!Array.isArray(this._table.records)||this._table.records.length>0)&&((t=this._indicators)===null||t===void 0?void 0:t.length)>0&&!(!((e=this._rowHeaderCellIds)===null||e===void 0)&&e.length)?1:(o=(n=this._rowHeaderCellIds)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)+this.columnHeaderLevelCount+this.bottomHeaderRowCount}get bodyRowSpanCount(){return this.rowDimensionTree.tree.size}get bottomFrozenRowCount(){if(!this._table.isPivotChart())return this._table.internalProps.bottomFrozenRowCount?this.rowCount-this.headerLevelCount>=this._table.internalProps.bottomFrozenRowCount?this._table.internalProps.bottomFrozenRowCount:this.rowCount-this.headerLevelCount:0;if(this.indicatorKeys.length>=1&&Fh(this.indicatorsDefine)){const t=this._table.pivotChartAxes.find(e=>e.orient==="bottom");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}return 0}get rightFrozenColCount(){if(!this._table.isPivotChart())return this._table.internalProps.rightFrozenColCount?this.colCount-this.rowHeaderLevelCount>=this._table.internalProps.rightFrozenColCount?this._table.internalProps.rightFrozenColCount:this.colCount-this.rowHeaderLevelCount:0;const t=this._table.pivotChartAxes.find(e=>e.orient==="right");return(t==null?void 0:t.visible)===!1||this.indicatorsAsCol?0:this.hasTwoIndicatorAxes?1:0}get bodyRowCount(){return this.rowCount-this.bottomFrozenRowCount-this.headerLevelCount}get bodyColCount(){return this.colCount-this.rightFrozenColCount-this.rowHeaderLevelCount}get headerObjects(){return this._headerObjects}get columnObjects(){return this._indicators}getCellId(t,e){var n,o,r,s,l;if(e>=0&&t>=0){if(this.isSeriesNumber(t,e))return"";if(this.isCornerHeader(t,e))return(n=this._cornerHeaderCellIds[e])===null||n===void 0?void 0:n[t-this.leftRowSeriesNumberColumnCount];if(this.isColumnHeader(t,e))return(o=this._columnHeaderCellIds[e])===null||o===void 0?void 0:o[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount];if(this.isRowHeader(t,e))return(r=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||r===void 0?void 0:r[t-this.leftRowSeriesNumberColumnCount];if(this.isRightFrozenColumn(t,e))return(s=this._rowHeaderCellIds[e-this.columnHeaderLevelCount])===null||s===void 0?void 0:s[this.rowHeaderLevelCount-1];if(this.isBottomFrozenRow(t,e))return(l=this._columnHeaderCellIds[this.columnHeaderLevelCount-1])===null||l===void 0?void 0:l[t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount]}}getHeader(t,e){var n;if(this.isSeriesNumberInHeader(t,e))return this.getSeriesNumberHeader(t,e);const o=this.getCellId(t,e);return(n=this._headerObjectMap[o])!==null&&n!==void 0?n:{id:void 0,field:"",headerType:"text",define:void 0}}getHeaderField(t,e){var n,o;const r=this.getCellId(t,e);return((n=this._headerObjectMap[r])===null||n===void 0?void 0:n.field)||((o=this.getBody(t,e))===null||o===void 0?void 0:o.field)}getHeaderCellAdressById(t){for(let e=0;e<this._columnHeaderCellIds.length;e++){const n=this._columnHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o+this._table.frozenColCount,row:e}}for(let e=0;e<this._rowHeaderCellIds.length;e++){const n=this._rowHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e+this._table.frozenRowCount}}for(let e=0;e<this._cornerHeaderCellIds.length;e++){const n=this._cornerHeaderCellIds[e];for(let o=0;o<n.length;o++)if(n[o]===t)return{col:o,row:e}}}getHeaderCellAddressByField(t){const e=this.headerObjects.find(n=>n&&n.field===t);return e&&this.getHeaderCellAdressById(e.id)}getBody(t,e){var n,o,r,s,l,a,h,d,u,c;const g=this.getBodyWidthCache(t,e);if(g)return g;if(this.isSeriesNumber(t,e)){const b=this.getSeriesNumberBody(t,e);return this.setBodyWidthCache(t,e,b),b}const f=this.getCellHeaderPaths(t,e);if(this.indicatorsAsCol){const b=(o=(n=f.colHeaderPaths)===null||n===void 0?void 0:n.find(_=>_.indicatorKey))===null||o===void 0?void 0:o.indicatorKey,C=z(b)&&(l=(s=(r=this._indicators)===null||r===void 0?void 0:r.find(_=>_.indicatorKey===b))!==null&&s!==void 0?s:this._indicators[0])!==null&&l!==void 0?l:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,C),C}const p=(h=(a=f.rowHeaderPaths)===null||a===void 0?void 0:a.find(b=>b.indicatorKey))===null||h===void 0?void 0:h.indicatorKey,m=z(p)&&(c=(u=(d=this._indicators)===null||d===void 0?void 0:d.find(b=>b.indicatorKey===p))!==null&&u!==void 0?u:this._indicators[0])!==null&&c!==void 0?c:{id:"",field:void 0,indicatorKey:void 0,cellType:"text",define:void 0};return this.setBodyWidthCache(t,e,m),m}getCellRange(t,e){var n,o;const r={start:{col:t,row:e},end:{col:t,row:e}};if(!this.isHeader(t,e)||t===-1||e===-1||this.isRightFrozenColumn(t,e)||this.isBottomFrozenRow(t,e))return r;if(this._table.isPivotChart()){if(this.isLeftBottomCorner(t,e))return{start:{col:0,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.frozenColCount-1,row:this.rowCount-1}};if(this.isRightTopCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:0},end:{col:this.colCount-1,row:this.frozenRowCount-1}};if(this.isRightBottomCorner(t,e))return{start:{col:this.colCount-this.rightFrozenColCount,row:this.rowCount-this.bottomFrozenRowCount},end:{col:this.colCount-1,row:this.rowCount-1}}}for(let s=0;s<this._largeCellRangeCache.length;s++){const l=this._largeCellRangeCache[s];if(t>=l.start.col&&t<=l.end.col&&e>=l.start.row&&e<=l.end.row)return l}if(this.isHeader(t,e)&&t!==-1&&e!==-1){const s=this.getCellId(t,e);for(let l=t-1;l>=0&&s===this.getCellId(l,e);l--)r.start.col=l;for(let l=t+1;l<((n=this.colCount)!==null&&n!==void 0?n:0)&&s===this.getCellId(l,e);l++)r.end.col=l;for(let l=e-1;l>=0&&s===this.getCellId(t,l);l--)r.start.row=l;for(let l=e+1;l<((o=this.rowCount)!==null&&o!==void 0?o:0)&&!(s!==this.getCellId(t,l)||this.isSeriesNumberInHeader(t,e)&&l>=this.columnHeaderLevelCount);l++)r.end.row=l}return(r.end.col-r.start.col>100||r.end.row-r.start.row>100)&&this._largeCellRangeCache.push(r),r}isCellRangeEqual(t,e,n,o){const r=this.getCellRange(t,e),s=this.getCellRange(n,o);return r.start.col===s.start.col&&r.end.col===s.end.col&&r.start.row===s.start.row&&r.end.row===s.end.row}getBodyIndexByRow(t){return t<this.columnHeaderLevelCount||t>=this.rowCount-this.bottomHeaderRowCount?-1:t-this.columnHeaderLevelCount}get bottomHeaderRowCount(){return this._table.isPivotChart()?this.bottomFrozenRowCount:0}get rightHeaderColCount(){return this._table.isPivotChart()?this.rightFrozenColCount:0}getBodyIndexByCol(t){return t<this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount||t>=this.colCount-this.rightHeaderColCount?-1:t-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount}getRecordStartRowByRecordIndex(t){return this.columnHeaderLevelCount+t}getRecordShowIndexByCell(t,e){}getCellHeaderPathsWithTreeNode(t,e){for(let l=0;l<this._largeCellRangeCache.length;l++){const a=this._largeCellRangeCache[l];if(t>=a.start.col&&t<=a.end.col&&e>=a.start.row&&e<=a.end.row)break}let n=this.getColHeaderPathCache(t,e),o=this.getRowHeaderPathCache(t,e);const r=this.getBodyIndexByCol(t),s=this.getBodyIndexByRow(e)+this.currentPageStartIndex;if(!n&&e>=0&&r>=0&&(n=this.columnDimensionTree.getTreePath(r,this.showHeader&&this.showColumnHeader?e-(this.columnHeaderTitle?1:0):this.columnDimensionTree.totalLevel),this.setColHeaderPathCache(t,e,n)),!o&&t>=0&&s>=0){if(o=[],this.rowHierarchyType==="tree"){const l=this._rowHeaderCellFullPathIds[s];let a=this.rowDimensionTree,h=0;for(;a;){const d=[];let u=l[h];for(d.push(u);;){const g=this._headerObjectMap[u];if(!(g!=null&&g.parentCellId))break;d.unshift(g.parentCellId),u=g.parentCellId}const c=a.getTreePathByCellIds(d);o.push(...c),a=this._rowHeaderExtensionTree[l[h]],h++}}else o=this.rowDimensionTree.getTreePath(s,this.showHeader&&this.showRowHeader?t-(this.rowHeaderTitle?1:0)-this.leftRowSeriesNumberColumnCount:this.rowDimensionTree.totalLevel);this.setRowHeaderPathCache(t,e,o)}return{colHeaderPaths:n,rowHeaderPaths:o,cellLocation:this.getCellLocation(t,e)}}getCellHeaderPaths(t,e){var n,o;const r=this.getCellHeaderPathsWithTreeNode(t,e),s={colHeaderPaths:[],rowHeaderPaths:[],cellLocation:r.cellLocation};return(n=r.colHeaderPaths)===null||n===void 0||n.forEach(l=>{var a,h,d;const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.colHeaderPaths.push(u)}),(o=r.rowHeaderPaths)===null||o===void 0||o.forEach(l=>{var a,h,d;if(l.dimensionKey!=="axis"){const u={};u.dimensionKey=l.dimensionKey,u.indicatorKey=l.indicatorKey,u.value=(d=(a=l.value)!==null&&a!==void 0?a:(h=this.getIndicatorInfoByIndicatorKey(l.indicatorKey))===null||h===void 0?void 0:h.title)!==null&&d!==void 0?d:"",u.virtual=l.virtual,s.rowHeaderPaths.push(u)}}),s}getIndicatorInfoByIndicatorKey(t){var e;return(e=this.indicatorsDefine)===null||e===void 0?void 0:e.find(n=>typeof n!="string"&&!!t&&n.indicatorKey===t)}findFullCellIds(t){const e=[];for(let n=0;n<t.length;n++){let o=t[n];for(e.push(o);;){const r=this._headerObjectMap[o];if(!(r!=null&&r.parentCellId))break;e.unshift(r.parentCellId),o=r.parentCellId}}return e}getHeaderDimension(t,e){var n,o,r;if(this.isHeader(t,e)){const s=this.getHeader(t,e);return(o=(n=this.rowsDefine)===null||n===void 0?void 0:n.find(l=>typeof l!="string"&&l.dimensionKey===s.field))!==null&&o!==void 0?o:(r=this.columnsDefine)===null||r===void 0?void 0:r.find(l=>typeof l!="string"&&l.dimensionKey===s.field)}}isColumnIndicatorHeader(t,e){return this._indicatorShowType==="column"&&e===this.columnHeaderLevelCount-1&&t>=this.rowHeaderLevelCount}isRowIndicatorHeader(t,e){return this._indicatorShowType==="row"&&t===this.rowHeaderLevelCount-1&&e>=this.columnHeaderLevelCount}isIndicatorHeader(t,e){return this.isColumnIndicatorHeader(t,e)||this.isRowIndicatorHeader(t,e)}toggleHierarchyState(t,e){var n,o,r,s,l,a;this.colIndex=0;const h=this._rowHeaderCellFullPathIds_FULL.slice(0),d=h.map((g,f)=>({col:t,row:f+this.columnHeaderLevelCount})),u=this.getHeader(t,e);if(u.define.hierarchyState=u.define.hierarchyState===Vt.collapse?Vt.expand:Vt.collapse,this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._rowHeaderCellFullPathIds_FULL=[],this.rowDimensionKeys=this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr(),this.fullRowDimensionKeys=[],this.fullRowDimensionKeys=this.fullRowDimensionKeys.concat(this.rowDimensionKeys),this._addHeadersForTreeMode(this._rowHeaderCellFullPathIds_FULL,0,this.rowDimensionTree.tree.children,[],this.rowDimensionTree.totalLevel,!0,this.rowsDefine,this.rowHeaderObjs),this.rowHeaderTitle){const g=++this.sharedVar.seqId,f=Array(this.rowCount-this.columnHeaderLevelCount).fill(g);this._rowHeaderCellFullPathIds_FULL.unshift(f);const p={id:g,title:typeof this.rowHeaderTitle.title=="string"?this.rowHeaderTitle.title:this.rowsDefine.reduce((m,b)=>typeof b=="string"?m:m+(m?`/${b.title}`:`${b.title}`),""),field:void 0,headerType:(o=(n=this.rowHeaderTitle)===null||n===void 0?void 0:n.headerType)!==null&&o!==void 0?o:"text",style:(r=this.rowHeaderTitle)===null||r===void 0?void 0:r.headerStyle,define:{field:"",headerType:"text",cellType:"text",disableHeaderHover:!!(!((s=this.rowHeaderTitle)===null||s===void 0)&&s.disableHeaderHover),disableHeaderSelect:!!(!((l=this.rowHeaderTitle)===null||l===void 0)&&l.disableHeaderSelect)}};this.rowHeaderObjs.push(p),this._headerObjects[g]=p}this._rowHeaderCellFullPathIds_FULL=nm(this._rowHeaderCellFullPathIds_FULL),this.rowHierarchyType==="tree"&&((a=this.extensionRows)===null||a===void 0?void 0:a.length)>=1&&this.generateExtensionRowTree(),this.colIndex=0,this._headerObjectMap=this._headerObjects.reduce((g,f)=>(g[f.id]=f,g),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0;const c=j9(t,e,h.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),this._rowHeaderCellFullPathIds_FULL.map(g=>g[t-this.leftRowSeriesNumberColumnCount]),d,this);return this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination),c}isHeaderForColWidth(t,e){return this.isHeader(t,e)}getHeaderForColWidth(t,e){return this.getHeader(t,e)}getPivotCellAdress(t){var e;if(!Array.isArray(t))return;let n,o,r=this.rowTree,s=this.columnTree;for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1){if(((e=this==null?void 0:this.cornerSetting)===null||e===void 0?void 0:e.titleOnDimension)==="row"){let g=0;return this.rowHierarchyType==="grid"&&(g=this.rowDimensionKeys.indexOf(d.dimensionKey)),g===-1?void 0:{col:(this.rowHeaderTitle?g+1:g)+this.leftRowSeriesNumberColumnCount,row:0}}const c=this.colDimensionKeys.indexOf(d.dimensionKey);return c===-1?void 0:{col:0+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderTitle?c+1:c}}let u=!1;for(let c=0;c<s.length;c++){const g=s[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){s=g.children,o=g,u=!0;break}}if(!u)for(let c=0;c<r.length;c++){const g=r[c];if((z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey)&&g.value===d.value){r=g.children,n=g;break}}}let l=0,a=0;if(n){a=this.columnHeaderLevelCount;const{startInTotal:h,level:d}=n;return a+=h,l=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?d+1:d)+this.leftRowSeriesNumberColumnCount:0+this.leftRowSeriesNumberColumnCount,{col:l,row:a}}if(o){l=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:h,level:d}=o;return l+=h,a=this.columnHeaderTitle?d+1:d,{col:l,row:a}}}getPivotDimensionInfo(t,e){var n;const{colHeaderPaths:o,rowHeaderPaths:r}=this.getCellHeaderPaths(t,e),s=[];return o.length?o.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):r.length?r.forEach((l,a)=>{s.push({dimensionKey:l.dimensionKey,value:l.value,isPivotCorner:!1,indicatorKey:l.indicatorKey})}):this.isCornerHeader(t,e)&&(((n=this==null?void 0:this.cornerSetting)===null||n===void 0?void 0:n.titleOnDimension)==="row"?s.push({dimensionKey:this.rowDimensionKeys[(this.rowHeaderTitle?t-1:t)-this.leftRowSeriesNumberColumnCount],isPivotCorner:!0}):s.push({dimensionKey:this.colDimensionKeys[this.columnHeaderTitle?e-1:e],isPivotCorner:!0})),s}getIndicatorKey(t,e){var n;return(n=this.getBody(t,e))===null||n===void 0?void 0:n.indicatorKey}getParentCellId(t,e){if(e!==0)return this.isColumnHeader(t,e)?this.getCellId(t,e-1):this.isRowHeader(t,e)?this.getCellId(t-1,e):void 0}getRowHeaderCellAddressByCellId(t){let e,n;if(this._rowHeaderCellIds.find((o,r)=>!!o.find((s,l)=>s===t&&(e=l,!0))&&(n=r,!0)),z(e)&&z(n))return{col:e,row:n+this.columnHeaderLevelCount}}canMoveHeaderPosition(t,e){if(this.isSeriesNumberInHeader(e.col,e.row)||this.isSeriesNumberInHeader(t.col,t.row)||this.isCornerHeader(e.col,e.row)||t.col<0||t.row<0||e.col<0||e.row<0)return!1;this.isSeriesNumberInBody(e.col,e.row)&&this.isSeriesNumberInBody(t.col,t.row)&&(t.col=t.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1,e.col=e.col+this.leftRowSeriesNumberColumnCount+this.rowHeaderLevelCount-1);const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row))return this.getParentCellId(t.col,n.start.row)===this.getParentCellId(e.col,n.start.row);if(this.isRowHeader(t.col,t.row)){if(this.rowHierarchyType!=="tree")return this.getParentCellId(n.start.col,t.row)===this.getParentCellId(n.start.col,e.row);{const o=Le(this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths),r=Le(this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths);if(o.pop(),r.pop(),o.length<=r.length){if(o.length===r.length)return!o.find((s,l)=>s.dimensionKey!==r[l].dimensionKey||s.value!==r[l].value);if(o.length>0){for(let s=0;s<o.length;s++)if(o[s].startInTotal!==r[s].startInTotal)return!1}return!0}}}return!1}moveHeaderPosition(t,e){if(this.canMoveHeaderPosition(t,e)&&!this.isCellRangeEqual(t.col,t.row,e.col,e.row)){const n=this.getCellRange(t.col,t.row);if(this.isColumnHeader(t.col,t.row)){const o=n.end.col-n.start.col+1;let r;const s=this.getCellRange(e.col,n.start.row);if(r=e.col>=t.col?s.end.col-o+1:s.start.col,r===n.start.col)return null;for(let a=0;a<this._columnHeaderCellFullPathIds.length;a++){const h=this._columnHeaderCellFullPathIds[a].splice(n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,o);h.unshift(r-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnHeaderCellFullPathIds[a],h)}const l=this._columnWidths.splice(n.start.col-this.leftRowSeriesNumberColumnCount,o);return l.unshift(r-this.leftRowSeriesNumberColumnCount,0),Array.prototype.splice.apply(this._columnWidths,l),this.columnDimensionTree.movePosition(this.getCellHeaderPathsWithTreeNode(t.col,t.row).colHeaderPaths.length-1,n.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount,s.start.col-this.rowHeaderLevelCount-this.leftRowSeriesNumberColumnCount),this.columnDimensionTree.reset(this.columnDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.col,targetIndex:r,sourceSize:o,targetSize:s.end.col-s.start.col+1,moveType:"column"}}if(this.isRowHeader(t.col,t.row)){let o;const r=this.getCellHeaderPathsWithTreeNode(t.col,t.row).rowHeaderPaths,s=this.getCellHeaderPathsWithTreeNode(e.col,e.row).rowHeaderPaths,l=r[r.length-1],a=s[r.length-1],h=l.size;if(o=e.row>=t.row?a.startInTotal+a.size-h:a.startInTotal,o===n.start.row-this.columnHeaderLevelCount)return null;const d=this._rowHeaderCellIds.splice(n.start.row-this.columnHeaderLevelCount,h);d.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellIds,d);const u=this._rowHeaderCellFullPathIds.splice(n.start.row-this.columnHeaderLevelCount,h);u.unshift(o-this.currentPageStartIndex,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds,u);const c=this._rowHeaderCellIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);c.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellIds_FULL,c);const g=this._rowHeaderCellFullPathIds_FULL.splice(n.start.row-this.columnHeaderLevelCount+this.currentPageStartIndex,h);return g.unshift(o,0),Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL,g),this.rowDimensionTree.movePosition(r.length-1,n.start.row-this.columnHeaderLevelCount,o+(e.row>t.row?l.size-1:0)),this.rowDimensionTree.reset(this.rowDimensionTree.tree.children,!0),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,{sourceIndex:n.start.row,targetIndex:o+this.columnHeaderLevelCount,sourceSize:h,targetSize:a.size,moveType:"row"}}}return null}getCellAdressByHeaderPath(t){var e,n,o,r,s,l;let a,h,d=!1,u=!1;if(Array.isArray(t)){if(t.length>this.rowDimensionKeys.length+this.colDimensionKeys.length)return;a=t.filter(y=>this.colDimensionKeys.indexOf(y.dimensionKey)>=0||this.colDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey),h=t.filter(y=>this.rowDimensionKeys.indexOf(y.dimensionKey)>=0||this.rowDimensionKeys.indexOf(this.indicatorDimensionKey)>=0&&y.indicatorKey)}else a=t.colHeaderPaths,h=t.rowHeaderPaths,(t==null?void 0:t.cellLocation)==="body"&&this._table.isPivotTable()&&(u=!0);if(!Array.isArray(a)&&!Array.isArray(h))return;if(a==null||a.sort((y,S)=>{var R,A;return this.colDimensionKeys.indexOf((R=y.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)-this.colDimensionKeys.indexOf((A=S.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)}),h==null||h.sort((y,S)=>{var R,A;return this.fullRowDimensionKeys.indexOf((R=y.dimensionKey)!==null&&R!==void 0?R:this.indicatorDimensionKey)-this.fullRowDimensionKeys.indexOf((A=S.dimensionKey)!==null&&A!==void 0?A:this.indicatorDimensionKey)}),a==null||a.forEach(y=>{y.isPivotCorner&&(d=!0)}),h==null||h.forEach(y=>{y.isPivotCorner&&(d=!0)}),d){if(this.cornerSetting.titleOnDimension==="all"&&this.indicatorsAsCol&&a.length===0){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((e=h[0])===null||e===void 0?void 0:e.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:this.columnHeaderLevelCount-1}}else if(this.cornerSetting.titleOnDimension!=="all"||this.indicatorsAsCol||h.length!==0){if(this.cornerSetting.titleOnDimension==="row"||this.cornerSetting.titleOnDimension==="all"&&!this.indicatorsAsCol){for(let y=0;y<this.rowDimensionKeys.length;y++)if(((o=h[0])===null||o===void 0?void 0:o.dimensionKey)===this.rowDimensionKeys[y])return{col:y+this.leftRowSeriesNumberColumnCount,row:0}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((r=a[0])===null||r===void 0?void 0:r.dimensionKey)===this.colDimensionKeys[y])return{col:0,row:y}}else for(let y=0;y<this.colDimensionKeys.length;y++)if(((n=a[0])===null||n===void 0?void 0:n.dimensionKey)===this.colDimensionKeys[y])return{col:this.rowHeaderLevelCount-1,row:y}}let c,g,f,p,m=!1;(a==null?void 0:a.length)>=1&&(h==null?void 0:h.length)>=1&&(m=!0);let b,C,_=this.rowTree,w=this.columnTree;if(a)for(let y=0;y<a.length;y++){const S=a[y];for(let R=0;R<w.length;R++){const A=w[R];if(!z(S.indicatorKey)&&A.dimensionKey===S.dimensionKey&&A.value===S.value||z(S.indicatorKey)&&A.indicatorKey===S.indicatorKey){w=A.children,m&&!w?C=A:m||(C=A);break}}}if((h==null?void 0:h.length)>=1)if(this.rowHierarchyType==="tree"){const y=h[h.length-1],S=this.headerObjects.filter(A=>((A==null?void 0:A.field)===y.dimensionKey||(A==null?void 0:A.field)===y.indicatorKey)&&(A==null?void 0:A.title)===y.value).map(A=>A.id),R=this._rowHeaderCellIds.filter(A=>S.indexOf(A[A.length-1])>=0).find(A=>{const x=this.findFullCellIds(A);return x.length===h.length&&x.every(T=>{const M=this._headerObjectMap[T];return h.find(B=>B.dimensionKey===M.field&&B.value===M.title)})});g=this._rowHeaderCellIds.indexOf(R)+this.columnHeaderLevelCount}else for(let y=0;y<h.length;y++){const S=h[y];for(let R=0;R<_.length;R++){const A=_[R];if(!z(S.indicatorKey)&&A.dimensionKey===S.dimensionKey&&A.value===S.value||z(S.indicatorKey)&&A.indicatorKey===S.indicatorKey&&(!z(S.value)||A.value===S.value)){_=A.children,(!m||_&&!_.some(x=>x.dimensionKey==="axis"))&&m||(b=A);break}}}if(u||!m||(b||z(g))&&C){if(b||u){g=this.columnHeaderLevelCount;const{startInTotal:y,level:S}=(s=b)!==null&&s!==void 0?s:BT;g+=y??0,f=this.rowHierarchyType==="grid"?(this.rowHeaderTitle?S+1:S)+this.leftRowSeriesNumberColumnCount:0}if(C||u){c=this.rowHeaderLevelCount+this.leftRowSeriesNumberColumnCount;const{startInTotal:y,level:S}=(l=C)!==null&&l!==void 0?l:BT;c+=y??0,p=this.columnHeaderTitle?S+1:S}return z(c)||z(g)?{col:c??f,row:g??p}:void 0}}setChartInstance(t,e,n){var o,r,s,l;const a=this.getCellHeaderPaths(t,e);let h;if(this.indicatorsAsCol){const d=(o=a.colHeaderPaths.find(u=>u.indicatorKey))===null||o===void 0?void 0:o.indicatorKey;h=(r=this._indicators)===null||r===void 0?void 0:r.find(u=>u.indicatorKey===d)}else{const d=(s=a.rowHeaderPaths.find(u=>u.indicatorKey))===null||s===void 0?void 0:s.indicatorKey;h=(l=this._indicators)===null||l===void 0?void 0:l.find(u=>u.indicatorKey===d)}typeof(h==null?void 0:h.chartSpec)!="function"&&h&&(h.chartInstance=n)}getChartInstance(t,e){var n,o,r,s;const l=this.getCellHeaderPaths(t,e);let a;if(this.indicatorsAsCol){const h=(n=l.colHeaderPaths.find(d=>d.indicatorKey))===null||n===void 0?void 0:n.indicatorKey;a=(o=this._indicators)===null||o===void 0?void 0:o.find(d=>d.indicatorKey===h)}else{const h=(r=l.rowHeaderPaths.find(d=>d.indicatorKey))===null||r===void 0?void 0:r.indicatorKey;a=(s=this._indicators)===null||s===void 0?void 0:s.find(d=>d.indicatorKey===h)}return a==null?void 0:a.chartInstance}checkHasChart(){return pT(this)}getDimension(t,e){var n,o;return e==="column"?(n=this.columnsDefine)===null||n===void 0?void 0:n.find(r=>typeof r!="string"&&r.dimensionKey===t):e==="row"?(o=this.rowsDefine)===null||o===void 0?void 0:o.find(r=>typeof r!="string"&&r.dimensionKey===t):void 0}getAxisConfigInPivotChart(t,e){if((this.isFrozenColumn(t,e)||this.isRightFrozenColumn(t,e))&&El(t,e,"row",this)||(this.isFrozenRow(t,e)||this.isBottomFrozenRow(t,e))&&El(t,e,"col",this))return Et.getFunction("getAxisConfigInPivotChart")(t,e,this)}isEmpty(t,e){return!!this._table.isPivotChart()&&(!!this.isLeftBottomCorner(t,e)||!!this.isRightBottomCorner(t,e)||!!this.isRightTopCorner(t,e))}isAxisCell(t,e){return this._table.isPivotChart()?!!(this.indicatorKeys.length>=1&&Fh(this.indicatorsDefine)&&(this.isBottomFrozenRow(t,e)&&El(t,e,"col",this)||this.isRightFrozenColumn(t,e)&&El(t,e,"row",this)||this.isRowHeader(t,e)&&t===this.rowHeaderLevelCount-1&&El(t,e,"row",this)||this.hasTwoIndicatorAxes&&this.indicatorsAsCol&&e===this.columnHeaderLevelCount-1&&El(t,e,"col",this))):!1}getChartAxes(t,e){if(_V(t,e,this)||this.isAxisCell(t,e))return SV(t,e,this)}getRawChartSpec(t,e){return bV(t,e,this)}getChartSpec(t,e){return wV(t,e,this)}isShareChartSpec(t,e){return CV(t,e,this)}getChartDataId(t,e){return fT(t,e,this)}isNoChartDataRenderNothing(t,e){return yV(t,e,this)}setPagination(t){var e,n,o,r,s,l,a;if(this.clearCellRangeMap(),this._table.internalProps.useOneRowHeightFillAll=!1,this.pagination=t,this.rowHierarchyType==="grid"&&z((e=this.pagination)===null||e===void 0?void 0:e.perPageCount)&&z((n=this.pagination)===null||n===void 0?void 0:n.currentPage)){this.indicatorsAsCol===!1&&(this.pagination.perPageCount=Math.ceil(this.pagination.perPageCount/this.indicatorKeys.length)*this.indicatorKeys.length);const{perPageCount:h,currentPage:d}=this.pagination;this.currentPageStartIndex=h*(d||0),this.currentPageEndIndex=this.currentPageStartIndex+h,this._rowHeaderCellIds=(o=this._rowHeaderCellIds_FULL)===null||o===void 0?void 0:o.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(r=this._rowHeaderCellFullPathIds_FULL)===null||r===void 0?void 0:r.slice(this.currentPageStartIndex,this.currentPageEndIndex)}else this.currentPageStartIndex=0,this.currentPageEndIndex=this._rowHeaderCellIds_FULL.length,this._rowHeaderCellIds=(s=this._rowHeaderCellIds_FULL)===null||s===void 0?void 0:s.slice(this.currentPageStartIndex,this.currentPageEndIndex),this._rowHeaderCellFullPathIds=(l=this._rowHeaderCellFullPathIds_FULL)===null||l===void 0?void 0:l.slice(this.currentPageStartIndex,this.currentPageEndIndex);this.pagination&&(this.pagination.totalCount=(a=this._rowHeaderCellIds_FULL)===null||a===void 0?void 0:a.length)}release(){var t;const e=this._table._getActiveChartInstance();e==null||e.release(),(t=this._indicators)===null||t===void 0||t.forEach(n=>{var o;(o=n.chartInstance)===null||o===void 0||o.release()})}getHeadNode(t,e){var n,o,r;let s;const l=this.getCellHeaderPaths(t,e);return l.rowHeaderPaths&&((o=(n=l.rowHeaderPaths)===null||n===void 0?void 0:n.length)!==null&&o!==void 0?o:0)>0?s=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.slice(0,l.rowHeaderPaths.length):l.colHeaderPaths&&l.colHeaderPaths.length>0&&(s=l.colHeaderPaths.slice(0,l.colHeaderPaths.length)),this.getHeadNodeByRowOrColDimensions(s,t,e)}getHeadNodeByRowOrColDimensions(t,e,n){var o;if(!Array.isArray(t))return;let r,s,l=this.rowTree,a=this.columnTree;if(z(n)&&z(e)&&this.rowHierarchyType==="tree"&&this.extensionRows&&e>=1+this.leftRowSeriesNumberColumnCount){const h=this.getCellId(e-1,n);l=this._rowHeaderExtensionTree[h].tree.children}for(let h=0;h<t.length;h++){const d=t[h];if((d.isPivotCorner||!z(d.value))&&h===t.length-1)return;let u=!1;for(let c=0;c<a.length;c++){const g=a[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){a=g.children,s=g,u=!0;break}}if(!u)for(let c=0;(o=c<(l==null?void 0:l.length))!==null&&o!==void 0&&o;c++){const g=l[c];if(z(d.dimensionKey)&&g.dimensionKey===d.dimensionKey&&g.value===d.value||z(d.indicatorKey)&&g.indicatorKey===d.indicatorKey&&(g.value===d.value||!z(d.value)||!z(g.value))){l=g.children,r=g;break}}}return r||s||void 0}clearCellRangeMap(){this._largeCellRangeCache.length=0,this._CellHeaderPathMap=new Map}getDimensionKeyInChartSpec(t,e){var n,o,r,s,l,a;let h;if(this.indicatorsAsCol===!1)for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(n=u.xField)!==null&&n!==void 0?n:(r=(o=u==null?void 0:u.series)===null||o===void 0?void 0:o[0])===null||r===void 0?void 0:r.xField,h))return h}else for(let d=0;d<this.indicatorsDefine.length;d++){const u=this.indicatorsDefine[d].chartSpec;if(u&&(h=(s=u.yField)!==null&&s!==void 0?s:(a=(l=u==null?void 0:u.series)===null||l===void 0?void 0:l[0])===null||a===void 0?void 0:a.yField,h))return h}return null}_generateChartState(){return{vtable_selected:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}},vtable_selected_reverse:{filter:t=>{var e;return this._table._selectedDataItemsInChart.length>=1?!this._table._selectedDataItemsInChart.find(n=>{for(const o in n)if(typeof n[o]!="object"&&n[o]!==t[o])return!1;return!0}):!((e=this._table._selectedDimensionInChart)===null||e===void 0)&&e.length?!this._table._selectedDimensionInChart.every(n=>typeof n.value=="object"||t[n.key]===n.value):!1}}}}updateDataStateToChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();this._indicators.forEach(o=>{var r;const s=o.chartInstance;((r=o.chartSpec.select)===null||r===void 0?void 0:r.enable)!==!1&&s.updateState(n)}),t==null||t.updateState(n)}}updateDataStateToActiveChartInstance(t){var e;if(((e=t==null?void 0:t.getSpec().select)===null||e===void 0?void 0:e.enable)!==!1){t||(t=this._table._getActiveChartInstance());const n=this._generateChartState();t==null||t.updateState(n)}}getIndicatorKeyInChartSpec(t,e){const n=this.getRawChartSpec(t,e),o=[];if(n){if(n.series||n.xField||n.yField)return this.indicatorsAsCol===!1?n.series?n.series.forEach(r=>{const s=r.yField;o.push(s)}):o.push(n.yField):n.series?n.series.forEach(r=>{const s=r.xField;o.push(s)}):o.push(n.xField),o;if(n.valueField&&o.push(n.valueField),o.length>=1)return o}return null}getOptimunHeightForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(this.rowHeaderLevelCount,t).rowHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="yField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=PT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=ee((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[0]+d[2]}getOptimunWidthForChart(t){var e,n,o,r,s;const l=this.getCellHeaderPaths(t,this.columnHeaderLevelCount).colHeaderPaths;let a,h;for(const u in this.dataset.collectValuesBy)if(this.dataset.collectValuesBy[u].type==="xField"&&!this.dataset.collectValuesBy[u].range){a=(e=this.dataset.collectedValues[u])===null||e===void 0?void 0:e[l.map(c=>c.value).join(this.dataset.stringJoinChar)];break}if(this._chartItemBandSize)h=PT((n=a==null?void 0:a.length)!==null&&n!==void 0?n:0,this._chartItemBandSize,this._chartPaddingInner,this._chartPaddingOuter);else{const u=this._chartItemSpanSize||25;h=((o=a==null?void 0:a.length)!==null&&o!==void 0?o:0)*(u+u/3)}const d=ee((s=(r=this._chartPadding)!==null&&r!==void 0?r:this._table.theme.bodyStyle.padding)!==null&&s!==void 0?s:0);return h+d[1]+d[3]}get leftAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="left");return(t==null?void 0:t.visible)===!1?0:(this.indicatorsAsCol,1)}get topAxesCount(){if(!this._table.isPivotChart())return 0;const t=this._table.pivotChartAxes.find(e=>e.orient==="top");return(t==null?void 0:t.visible)===!1?0:this.indicatorsAsCol&&this.hasTwoIndicatorAxes?1:0}get rightAxesCount(){return this.rightFrozenColCount}get bottomAxesCount(){return this.bottomFrozenRowCount}getColKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.colHeaderPaths.length&&n.colHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getRowKeysPath(t,e){const n=this.getCellHeaderPaths(t,e),o=[];return n.rowHeaderPaths.length&&n.rowHeaderPaths.forEach(r=>{r.dimensionKey&&o.push(r.value)}),o==null?void 0:o.join(this.dataset.stringJoinChar)}getIndicatorInfo(t,e=""){var n;return(n=this.indicatorsDefine)===null||n===void 0?void 0:n.find(o=>typeof o!="string"&&(t?o.indicatorKey===t:!!e&&o.title===e))}getLayoutColumnTree(){const t=[],e=this.columnDimensionTree.tree.children;return rv(t,e),t}getLayoutRowTree(){const t=[],e=this.rowDimensionTree.tree.children;return rv(t,e),t}getLayoutColumnTreeCount(){const t=this.columnDimensionTree.tree.children;return yg(t,this.rowHierarchyType==="tree")}getLayoutRowTreeCount(){var t;const e=this.rowDimensionTree.tree.children;let n=yg(e,this.rowHierarchyType==="tree");return(t=this.extensionRows)===null||t===void 0||t.forEach(o=>{if(typeof o.rowTree!="function"){const r=yg(o.rowTree,!0);n*=r}}),n}resetHeaderTree(){var t,e,n;this.colIndex=0,this._rowHeaderCellFullPathIds_FULL=[],this._columnHeaderCellFullPathIds=[],this._columnHeaderCellIds=[];const o=this.dataset;this.rowTree=o.rowHeaderTree,this.columnTree=o.colHeaderTree;const r=this.rowDimensionTree.tree.children;(t=this.rowTree)===null||t===void 0||t.forEach((s,l)=>{const a=r.find(h=>h.dimensionKey===s.dimensionKey&&h.value===s.value);a&&this._table._syncHierarchyState(a,s)}),this.columnDimensionTree=new He((e=this.columnTree)!==null&&e!==void 0?e:[],this.sharedVar),this.rowDimensionTree=new He((n=this.rowTree)!==null&&n!==void 0?n:[],this.sharedVar,this.rowHierarchyType,this.rowHierarchyType==="tree"?this.rowExpandLevel:void 0),this.resetColumnHeaderLevelCount(),this._generateColHeaderIds(),this.colIndex=0,this._generateRowHeaderIds(),this._rowHeaderCellFullPathIds_FULL=nm(this._rowHeaderCellFullPathIds_FULL),this._headerObjectMap=this._headerObjects.reduce((s,l)=>(s[l.id]=l,s),{}),this._CellHeaderPathMap=new Map,this._largeCellRangeCache.length=0,this.generateCellIdsConsiderHideHeader(),this.setPagination(this.pagination)}isSeriesNumberInHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount}isSeriesNumberInBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount||this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount}isSeriesNumber(t,e){return!!(z(t)&&z(e)&&(this.leftRowSeriesNumberColumnCount>0&&t>=0&&e>=0&&t<this.leftRowSeriesNumberColumnCount||this.rightRowSeriesNumberColumnCount>0&&e>=0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount))}getSeriesNumberHeader(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e<this.headerLevelCount?Object.assign({},this.leftRowSeriesNumberColumn[t],{style:this._table.internalProps.rowSeriesNumber.headerStyle}):this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e<this.headerLevelCount&&e<this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}getSeriesNumberBody(t,e){return this.leftRowSeriesNumberColumnCount>0&&t>=0&&t<this.leftRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.leftRowSeriesNumberColumn[t]:this.rightRowSeriesNumberColumnCount>0&&t>=this.colCount-this.rightRowSeriesNumberColumnCount&&e>=this.headerLevelCount?this.rightRowSeriesNumberColumn[t-(this.colCount-this.rightRowSeriesNumberColumnCount)]:void 0}changeTreeNodeTitle(t,e,n){this.getHeadNode(t,e).value=n;const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}changeCornerTitle(t,e,n){if(this.isCornerHeader(t,e)){const o=this.getCellId(t,e);this._headerObjectMap[o].title=n}}generateCellIdsConsiderHideHeader(){if(this._columnHeaderCellIds=this._columnHeaderCellFullPathIds.slice(),!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(Zi),e=this._columnHeaderCellIds.splice(t,1);this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length),this._columnHeaderCellIds.push(e[0])}else this._columnHeaderCellIds.splice(0,this._columnHeaderCellIds.length);if(this._rowHeaderCellIds_FULL=this._rowHeaderCellFullPathIds_FULL.slice(),!this.showRowHeader)if(this.indicatorsAsCol||this.hideIndicatorName)this._rowHeaderCellIds_FULL.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._rowHeaderCellIds_FULL[e]=n});else{const t=this.rowDimensionKeys.indexOf(Zi);this._rowHeaderCellIds_FULL.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._rowHeaderCellIds_FULL[n]=o})}if(this._rowHeaderCellIds=this._rowHeaderCellIds_FULL.slice(),this._cornerHeaderCellIds=this._cornerHeaderCellFullPathIds.slice(),this.rowHeaderLevelCount===0||this.columnHeaderLevelCount===0)this._cornerHeaderCellIds=[];else if(this.cornerSetting.titleOnDimension!=="row"||this.showRowHeader){if(this.cornerSetting.titleOnDimension==="column"&&!this.showColumnHeader)if(this.indicatorsAsCol&&!this.hideIndicatorName){const t=this.colDimensionKeys.indexOf(Zi),e=this._cornerHeaderCellIds.splice(t,1);this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length),this._cornerHeaderCellIds.push(e[0])}else this._cornerHeaderCellIds.splice(0,this._cornerHeaderCellIds.length)}else if(this.indicatorsAsCol||this.hideIndicatorName)this._cornerHeaderCellIds.forEach((t,e)=>{const n=t.slice();n.splice(0,n.length),this._cornerHeaderCellIds[e]=n});else{const t=this.rowDimensionKeys.indexOf(Zi);this._cornerHeaderCellIds.forEach((e,n)=>{const o=e.slice(),r=o.splice(t,1);o.splice(0,o.length),o.push(r[0]),this._cornerHeaderCellIds[n]=o})}}enableUseGetBodyCache(){this._useGetBodyCache=!0,this._getBodyCache.clear()}disableUseGetBodyCache(){this._useGetBodyCache=!1,this._getBodyCache.clear()}enableUseHeaderPathCache(){this._useHeaderPathCache=!0,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}disableUseHeaderPathCache(){this._useHeaderPathCache=!1,this._colHeaderPathCache.clear(),this._rowHeaderPathCache.clear()}getBodyWidthCache(t,e){if(this._useGetBodyCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e))return this.indicatorsAsCol&&this._getBodyCache.has(t)?this._getBodyCache.get(t):!this.indicatorsAsCol&&this._getBodyCache.has(e)?this._getBodyCache.get(e):void 0}setBodyWidthCache(t,e,n){!this._useGetBodyCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||(this.indicatorsAsCol?this._getBodyCache.set(t,n):this._getBodyCache.set(e,n))}getColHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._colHeaderPathCache.has(t))return this._colHeaderPathCache.get(t)}setColHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._colHeaderPathCache.set(t,n)}getRowHeaderPathCache(t,e){if(this._useHeaderPathCache&&!this.isHeader(t,e)&&!this.isSeriesNumber(t,e)&&this._rowHeaderPathCache.has(e))return this._rowHeaderPathCache.get(e)}setRowHeaderPathCache(t,e,n){!this._useHeaderPathCache||this.isHeader(t,e)||this.isSeriesNumber(t,e)||this._rowHeaderPathCache.set(e,n)}}function PT(i,t,e,n){e===1&&(e=0);const o=$9(i,e,n),r=t/(1-e);return Math.ceil(o*r)}function $9(i,t,e){let n;return n=i===1?i+2*e:i-t+2*e,i?n>0?n:1:0}class mv{constructor(t,e){this.tree={},this.beforeChangedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.dataConfig=t,e&&(this.records=e,typeof window<"u"&&window.performance.now(),this.setRecords(e),typeof window<"u"&&window.performance.now())}changeDataConfig(t){this.dataConfig=t}setRecords(t){this.processRecords()}processRecords(){for(let t=0,e=this.records.length;t<e;t++){const n=this.records[t];this.processRecord(n)}}processRecord(t){var e;const n=[],o=[];for(let r=0,s=this.dataConfig.rows.length;r<s;r++){const l=this.dataConfig.rows[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&o.push(t[l])}for(let r=0,s=this.dataConfig.columns.length;r<s;r++){const l=this.dataConfig.columns[r];t[l]!==void 0&&l!==this.dataConfig.indicatorDimensionKey&&n.push(t[l])}(e=this.dataConfig.indicators)===null||e===void 0||e.forEach(r=>{const s=t[r];s!==void 0&&(this.dataConfig.indicatorsAsCol?n.push(r):o.push(r));const l=o.join(this.stringJoinChar),a=n.join(this.stringJoinChar);o.length!==0&&(this.rowFlatKeys[l]||(this.rowFlatKeys[l]=1)),n.length!==0&&(this.colFlatKeys[a]||(this.colFlatKeys[a]=1)),n.length===0&&o.length===0||(this.tree[l]||(this.tree[l]={}),s!==void 0&&(this.tree[l][a]={value:s,record:t},this.dataConfig.indicatorsAsCol?n.pop():o.pop()))})}getTreeNode(t=[],e=[],n,o=!0){var r,s,l,a;let h,d;if(typeof t=="string")h=t;else{let u=!1;t.map((c,g)=>{c===n&&(t.splice(g,1),u=!0)}),u&&t.push(n),h=t.join(this.stringJoinChar)}if(typeof e=="string")d=e;else{let u=!1;e.map((c,g)=>{c===n&&(e.splice(g,1),u=!0)}),u&&e.push(n),d=e.join(this.stringJoinChar)}return o?(l=(s=(r=this.tree)===null||r===void 0?void 0:r[h])===null||s===void 0?void 0:s[d])!==null&&l!==void 0?l:void 0:z((a=this.beforeChangedTree[h])===null||a===void 0?void 0:a[d])?{value:this.beforeChangedTree[h][d].value,record:this.beforeChangedTree[h][d].record}:void 0}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l,a,h,d,u;let c,g;if(typeof t=="string")c=t;else{let m=!1;t.map((b,C)=>{b===n&&(t.splice(C,1),m=!0)}),m&&t.push(n),c=t.join(this.stringJoinChar)}if(typeof e=="string")g=e;else{let m=!1;e.map((b,C)=>{b===n&&(e.splice(C,1),m=!0)}),m&&e.push(n),g=e.join(this.stringJoinChar)}const f=(s=(r=this.tree[c])===null||r===void 0?void 0:r[g])===null||s===void 0?void 0:s.value,p=Object.assign({},(a=(l=this.tree[c])===null||l===void 0?void 0:l[g])===null||a===void 0?void 0:a.record);!((d=(h=this.tree[c])===null||h===void 0?void 0:h[g])===null||d===void 0)&&d.record?(this.tree[c][g].record[n]=o,this.tree[c][g].value=o):(this.tree[c]||(this.tree[c]={}),this.tree[c][g]={record:this._buildRecord(t,e,n,o),value:o}),!((u=this.beforeChangedTree[c])===null||u===void 0)&&u[g]||(this.beforeChangedTree[c]={},this.beforeChangedTree[c][g]={record:void 0,value:void 0},this.beforeChangedTree[c][g].record=p,this.beforeChangedTree[c][g].value=f)}_buildRecord(t=[],e=[],n,o){const r={},s=this.dataConfig.rows,l=this.dataConfig.columns;return s.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=t[h])}),l.forEach((a,h)=>{a!==this.dataConfig.indicatorDimensionKey&&(r[a]=e[h])}),r[n]=o,this.records.push(r),r}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}this.records.push(t)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.dataConfig.indicators.length;r++)this.dataConfig.indicators[r]===t&&(o=!0);if(!o){for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}}function HT(i,t){let e="";for(let n=0;n<i.length;n++)e+=i[n],n!==i.length-1&&(e+=t);return e}class Oh{constructor(t,e,n,o,r,s,l,a,h,d,u,c,g){var f,p,m,b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt,bt;this.tree={},this.changedTree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.colKeys_normal=[],this.rowKeys_normal=[],this.rowOrder="key_a_to_z",this.colOrder="key_a_to_z",this.sorted=!1,this.indicatorStatistics=[],this.aggregators={},this.stringJoinChar=String.fromCharCode(0),this.rowsIsTotal=[],this.colsIsTotal=[],this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.registerAggregators(),this.dataConfig=t,this.filterRules=(f=this.dataConfig)===null||f===void 0?void 0:f.filterRules,this.rowHierarchyType=a??"grid",this.sortRules=(p=this.dataConfig)===null||p===void 0?void 0:p.sortRules,this.aggregationRules=(m=this.dataConfig)===null||m===void 0?void 0:m.aggregationRules,this.derivedFieldRules=(b=this.dataConfig)===null||b===void 0?void 0:b.derivedFieldRules,this.mappingRules=(C=this.dataConfig)===null||C===void 0?void 0:C.mappingRules,this.calculatedFieldRules=(_=this.dataConfig)===null||_===void 0?void 0:_.calculatedFieldRules,this.calculatedFiledKeys=(y=(w=this.calculatedFieldRules)===null||w===void 0?void 0:w.map(Ct=>Ct.key))!==null&&y!==void 0?y:[],this.calculatedFieldDependIndicatorKeys=(R=(S=this.calculatedFieldRules)===null||S===void 0?void 0:S.reduce((Ct,at)=>{for(let rt=0;rt<at.dependIndicatorKeys.length;rt++)Ct.indexOf(at.dependIndicatorKeys[rt])===-1&&Ct.push(at.dependIndicatorKeys[rt]);return Ct},[]))!==null&&R!==void 0?R:[],this.totals=(A=this.dataConfig)===null||A===void 0?void 0:A.totals,this.rows=e,this.columns=n,this.indicatorKeys=o,this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys=[...o];for(let Ct=0;Ct<this.calculatedFieldDependIndicatorKeys.length;Ct++)this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.indexOf(this.calculatedFieldDependIndicatorKeys[Ct])===-1&&this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys.push(this.calculatedFieldDependIndicatorKeys[Ct]);if(this.indicatorsAsCol=s,this.indicators=r,this.customColTree=h,this.customRowTree=d,this.hasExtensionRowTree=c,this.parseCustomTreeToMatchRecords=g,this.parseCustomTreeToMatchRecords&&(this.customColTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customColTree,"col"),this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))),this.colGrandTotalLabel=(M=(T=(x=this.totals)===null||x===void 0?void 0:x.column)===null||T===void 0?void 0:T.grandTotalLabel)!==null&&M!==void 0?M:"总计",this.colSubTotalLabel=(F=(P=(B=this.totals)===null||B===void 0?void 0:B.column)===null||P===void 0?void 0:P.subTotalLabel)!==null&&F!==void 0?F:"小计",this.rowGrandTotalLabel=(k=(E=(H=this.totals)===null||H===void 0?void 0:H.row)===null||E===void 0?void 0:E.grandTotalLabel)!==null&&k!==void 0?k:"总计",this.rowSubTotalLabel=(D=(L=(I=this.totals)===null||I===void 0?void 0:I.row)===null||L===void 0?void 0:L.subTotalLabel)!==null&&D!==void 0?D:"小计",this.collectValuesBy=(O=this.dataConfig)===null||O===void 0?void 0:O.collectValuesBy,this.needSplitPositiveAndNegative=u!=null&&u,this.rowsIsTotal=new Array((N=(W=this.rows)===null||W===void 0?void 0:W.length)!==null&&N!==void 0?N:0).fill(!1),this.colsIsTotal=new Array((U=($=this.columns)===null||$===void 0?void 0:$.length)!==null&&U!==void 0?U:0).fill(!1),((Y=this.totals)===null||Y===void 0?void 0:Y.row)&&this.totals.row.showSubTotals!==!1&&this.totals.row.subTotalsDimensions)for(let Ct=0,at=(et=(Z=(G=(j=this.totals)===null||j===void 0?void 0:j.row)===null||G===void 0?void 0:G.subTotalsDimensions)===null||Z===void 0?void 0:Z.length)!==null&&et!==void 0?et:0;Ct<at;Ct++){const rt=this.totals.row.subTotalsDimensions[Ct],ct=this.rows.indexOf(rt);this.rowsIsTotal[ct]=!0}if(!((gt=this.totals)===null||gt===void 0)&>.column&&this.totals.column.showSubTotals!==!1&&this.totals.column.subTotalsDimensions)for(let Ct=0,at=(bt=(nt=(it=(vt=this.totals)===null||vt===void 0?void 0:vt.column)===null||it===void 0?void 0:it.subTotalsDimensions)===null||nt===void 0?void 0:nt.length)!==null&&bt!==void 0?bt:0;Ct<at;Ct++){const rt=this.totals.column.subTotalsDimensions[Ct],ct=this.columns.indexOf(rt);this.colsIsTotal[ct]=!0}this.setRecords(l)}setRecords(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w;this.records=t,this.collectedValues={},this.cacheCollectedValues={},this.totalRecordsTree={},this.tree={},this.colFlatKeys={},this.rowFlatKeys={},this.colKeys=[],this.rowKeys=[],this.rowsHasValue=[],this.columnsHasValue=[],t&&(this.records=t,typeof window<"u"&&window.performance.now(),this.processRecords(),this.processCollectedValuesWithSumBy(),this.generateCollectedValuesSortRule(),this.processCollectedValuesWithSortBy(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.totalStatistics(),typeof window<"u"&&window.performance.now(),this.rowKeys_normal=this.rowKeys.slice(),this.colKeys_normal=this.colKeys.slice(),typeof window<"u"&&window.performance.now(),this.sortKeys(),typeof window<"u"&&window.performance.now(),typeof window<"u"&&window.performance.now(),this.customRowTree?this.rowHeaderTree=this.customRowTree:this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((y,S)=>this.rowsHasValue[S]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((y,S)=>this.rowsHasValue[S]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u),this.customColTree?this.colHeaderTree=this.customColTree:this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((y,S)=>this.columnsHasValue[S]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(_=(C=(b=this.totals)===null||b===void 0?void 0:b.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&_!==void 0&&_),typeof window<"u"&&window.performance.now(),!((w=this.dataConfig)===null||w===void 0)&&w.isPivotChart&&this.cacheDeminsionCollectedValues())}registerAggregator(t,e){this.aggregators[t]=e}registerAggregators(){this.registerAggregator(zt.RECORD,kx),this.registerAggregator(zt.SUM,Ix),this.registerAggregator(zt.COUNT,Dx),this.registerAggregator(zt.MAX,zx),this.registerAggregator(zt.MIN,Nx),this.registerAggregator(zt.AVG,Ox),this.registerAggregator(zt.NONE,Fx),this.registerAggregator(zt.RECALCULATE,Q4)}processCollectedValuesWithSumBy(){var t,e,n,o,r,s;for(const l in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[l])===null||e===void 0)&&e.sumBy)for(const a in this.collectedValues[l]){let h;((n=this.collectValuesBy[l])===null||n===void 0?void 0:n.extendRange)==="sum"?(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>g+f.value(),0),h+=Math.round(h/20)):(h=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()>g?f.value():g,Number.MIN_SAFE_INTEGER),((o=this.collectValuesBy[l])===null||o===void 0?void 0:o.extendRange)==="max"?h+=Math.round(h/20):typeof((r=this.collectValuesBy[l])===null||r===void 0?void 0:r.extendRange)=="number"&&(h=Math.max(h,(s=this.collectValuesBy[l])===null||s===void 0?void 0:s.extendRange)));const d=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.value()<g?f.value():g,Number.MAX_SAFE_INTEGER);let u,c;this.needSplitPositiveAndNegative&&(u=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.positiveValue()>g?f.positiveValue():g,Number.MIN_SAFE_INTEGER),c=Object.values(this.collectedValues[l][a]).reduce((g,f)=>f.negativeValue()<g?f.negativeValue():g,Number.MAX_SAFE_INTEGER)),this.collectedValues[l][a]={},this.collectedValues[l][a].max=h,this.collectedValues[l][a].min=d,this.needSplitPositiveAndNegative&&(this.collectedValues[l][a].positiveMax=u,this.collectedValues[l][a].negativeMin=c)}}processCollectedValuesWithSortBy(){var t,e;const n=this;for(const o in this.collectedValues)if(!((e=(t=this.collectValuesBy)===null||t===void 0?void 0:t[o])===null||e===void 0)&&e.sortBy)for(const r in this.collectedValues[o])this.collectedValues[o][r]=this.collectedValues[o][r].sort((s,l)=>{var a,h,d,u;return((h=(a=n.collectValuesBy[o].sortBy)===null||a===void 0?void 0:a.indexOf(s))!==null&&h!==void 0?h:-1)-((u=(d=n.collectValuesBy[o].sortBy)===null||d===void 0?void 0:d.indexOf(l))!==null&&u!==void 0?u:-1)})}generateCollectedValuesSortRule(){for(const t in this.collectedValues)if(this.collectValuesBy&&this.collectValuesBy[t]&&!this.collectValuesBy[t].sortBy){let e=[];for(const n in this.collectedValues[t])Array.isArray(this.collectedValues[t][n])&&(e.push(...this.collectedValues[t][n]),e=Array.from(new Set(e)));e.length>0&&(this.collectValuesBy[t].sortBy=e)}}processRecords(){var t,e;let n=!1;if(((e=(t=this.filterRules)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0)>=1&&(n=!0),Array.isArray(this.records)){this.filteredRecords||(this.filteredRecords=[]);for(let o=0,r=this.records.length;o<r;o++){const s=this.records[o];n&&!this.filterRecord(s)||(this.filteredRecords.push(s),this.processRecord(s))}}else{this.filteredRecords||(this.filteredRecords={});for(const o in this.records)for(let r=0,s=this.records[o].length;r<s;r++){const l=this.records[o][r];n&&!this.filterRecord(l)||(this.filteredRecords[o]||(this.filteredRecords[o]=[]),this.filteredRecords[o].push(l),this.processRecord(l,o))}}this.rowFlatKeys={},this.colFlatKeys={}}filterRecord(t){var e,n;let o=!0;if(this.filterRules)for(let r=0;r<this.filterRules.length;r++){const s=this.filterRules[r];if(s.filterKey){const l=t[s.filterKey];if(((e=s.filteredValues)===null||e===void 0?void 0:e.indexOf(l))===-1){o=!1;break}}else if(!(!((n=s.filterFunc)===null||n===void 0)&&n.call(s,t))){o=!1;break}}return o}processRecord(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt,bt,Ct,at,rt,ct,ht,_t,ut,It,Ut,yt,Tt,kt,oe,re,ye,Oe;(n=this.derivedFieldRules)===null||n===void 0||n.forEach((mt,Bt)=>{mt.fieldName&&mt.derivedFunc&&(t[mt.fieldName]=mt.derivedFunc(t))});for(const mt in this.collectValuesBy)if(z(t[mt])){this.collectedValues[mt]||(this.collectedValues[mt]={});const Bt=this.collectValuesBy[mt].by.map(Kt=>t[Kt]).join(this.stringJoinChar);if(this.collectedValues[mt][Bt]||(this.collectValuesBy[mt].sumBy?this.collectedValues[mt][Bt]={}:this.collectValuesBy[mt].range?this.collectedValues[mt][Bt]={min:Number.MAX_SAFE_INTEGER,max:Number.MIN_SAFE_INTEGER}:this.collectedValues[mt][Bt]=[]),this.collectValuesBy[mt].sumBy){const Kt=this.collectValuesBy[mt].sumBy.map(qt=>t[qt]).join(this.stringJoinChar);this.collectedValues[mt][Bt][Kt]||(this.collectedValues[mt][Bt][Kt]=new this.aggregators[zt.SUM]({key:mt,dimension:mt,isRecord:void 0,needSplitPositiveAndNegative:this.needSplitPositiveAndNegative})),this.collectedValues[mt][Bt][Kt].push(t)}else if(this.collectValuesBy[mt].range){const Kt=this.collectedValues[mt][Bt],qt=Math.max(t[mt],Kt.max),fe=Math.min(t[mt],Kt.min);isNaN(qt)||(Kt.max=qt,Kt.min=fe)}else{const Kt=this.collectedValues[mt][Bt];Kt.indexOf(t[mt])===-1&&Kt.push(t[mt])}}let Be=!1;const Ee=[],At=[];if(!this.parseCustomTreeToMatchRecords||!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart||!(!((r=this.customRowTree)===null||r===void 0)&&r.length)||e||this.hasExtensionRowTree){const mt=[];At.push({rowKey:mt,indicatorKey:e});for(let Bt=0,Kt=this.rows.length;Bt<Kt;Bt++){const qt=this.rows[Bt];if(qt in t)this.rowsHasValue[Bt]=!0,mt.push(t[qt]);else if(qt!==Zi){if(!((a=(l=(s=this.dataConfig)===null||s===void 0?void 0:s.totals)===null||l===void 0?void 0:l.row)===null||a===void 0)&&a.showGrandTotals&&Bt===0&&!this.rows.find(fe=>fe in t)){mt.push(this.rowGrandTotalLabel),Be=!0;break}if(!((u=(d=(h=this.dataConfig)===null||h===void 0?void 0:h.totals)===null||d===void 0?void 0:d.row)===null||u===void 0)&&u.subTotalsDimensions&&((f=(g=(c=this.dataConfig)===null||c===void 0?void 0:c.totals)===null||g===void 0?void 0:g.row)===null||f===void 0?void 0:f.subTotalsDimensions.indexOf(this.rows[Bt-1]))>=0){this.rowHierarchyType==="grid"&&mt.push(this.rowSubTotalLabel),Be=!0;break}}}}else{const mt=this.getFieldMatchRowDimensionPaths(t);if(mt.length>0)for(let Bt=0,Kt=mt.length;Bt<Kt;Bt++){const qt=mt[Bt],fe=[];let Yt;for(let Nt=0,dt=qt.length;Nt<dt;Nt++)z(qt[Nt].indicatorKey)?Yt=qt[Nt].indicatorKey:fe.push(qt[Nt].value);At.push({rowKey:fe,indicatorKey:Yt})}}if(!this.parseCustomTreeToMatchRecords||!((p=this.dataConfig)===null||p===void 0)&&p.isPivotChart||!(!((m=this.customColTree)===null||m===void 0)&&m.length)||e||this.hasExtensionRowTree){const mt=[];Ee.push({colKey:mt,indicatorKey:e});for(let Bt=0,Kt=this.columns.length;Bt<Kt;Bt++){const qt=this.columns[Bt];if(qt in t)this.columnsHasValue[Bt]=!0,mt.push(t[qt]);else if(qt!==Zi){if(!((_=(C=(b=this.dataConfig)===null||b===void 0?void 0:b.totals)===null||C===void 0?void 0:C.column)===null||_===void 0)&&_.showGrandTotals&&Bt===0&&!this.columns.find(fe=>fe in t)){mt.push(this.colGrandTotalLabel),Be=!0;break}if(!((S=(y=(w=this.dataConfig)===null||w===void 0?void 0:w.totals)===null||y===void 0?void 0:y.column)===null||S===void 0)&&S.subTotalsDimensions&&((x=(A=(R=this.dataConfig)===null||R===void 0?void 0:R.totals)===null||A===void 0?void 0:A.column)===null||x===void 0?void 0:x.subTotalsDimensions.indexOf(this.columns[Bt-1]))>=0){mt.push(this.colSubTotalLabel),Be=!0;break}}}}else{const mt=this.getFieldMatchColDimensionPaths(t);if(mt.length>0)for(let Bt=0,Kt=mt.length;Bt<Kt;Bt++){const qt=mt[Bt],fe=[];let Yt;for(let Nt=0,dt=qt.length;Nt<dt;Nt++)z(qt[Nt].indicatorKey)?Yt=qt[Nt].indicatorKey:fe.push(qt[Nt].value);Ee.push({colKey:fe,indicatorKey:Yt})}}for(let mt=0;mt<At.length;mt++){const Bt=At[mt].rowKey;let Kt;this.indicatorsAsCol||(Kt=At[mt].indicatorKey);for(let qt=0;qt<Ee.length;qt++){const fe=Ee[qt].colKey;this.indicatorsAsCol&&(Kt=Ee[qt].indicatorKey);const Yt=Bt.join(this.stringJoinChar),Nt=fe.join(this.stringJoinChar);if(Be){this.totalRecordsTree[Yt]||(this.totalRecordsTree[Yt]={}),this.totalRecordsTree[Yt][Nt]||(this.totalRecordsTree[Yt][Nt]=[]);const Ft=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let $t=0;$t<Ft.length;$t++)if(this.calculatedFiledKeys.indexOf(Ft[$t])>=0){const ae=(T=this.calculatedFieldRules)===null||T===void 0?void 0:T.find(Ti=>Ti.key===Ft[$t]);!((B=(M=this.totalRecordsTree[Yt])===null||M===void 0?void 0:M[Nt])===null||B===void 0)&&B[$t]||(this.totalRecordsTree[Yt][Nt][$t]=new this.aggregators[zt.RECALCULATE]({key:Ft[$t],dimension:Ft[$t],isRecord:!0,formatFun:(F=(P=this.indicators)===null||P===void 0?void 0:P.find(Ti=>typeof Ti!="string"&&Ti.indicatorKey===Ft[$t]))===null||F===void 0?void 0:F.format,calculateFun:ae==null?void 0:ae.calculateFun,dependAggregators:this.totalRecordsTree[Yt][Nt],dependIndicatorKeys:ae==null?void 0:ae.dependIndicatorKeys})),Ft[$t]in t&&((E=(H=this.totalRecordsTree[Yt])===null||H===void 0?void 0:H[Nt])===null||E===void 0||E[$t].push(t))}else{const ae=this.getAggregatorRule(Ft[$t]);!((I=(k=this.totalRecordsTree[Yt])===null||k===void 0?void 0:k[Nt])===null||I===void 0)&&I[$t]||(this.totalRecordsTree[Yt][Nt][$t]=new this.aggregators[(L=ae==null?void 0:ae.aggregationType)!==null&&L!==void 0?L:zt.SUM]({key:Ft[$t],dimension:(D=ae==null?void 0:ae.field)!==null&&D!==void 0?D:Ft[$t],formatFun:(O=ae==null?void 0:ae.formatFun)!==null&&O!==void 0?O:(N=(W=this.indicators)===null||W===void 0?void 0:W.find(Ti=>typeof Ti!="string"&&Ti.indicatorKey===Ft[$t]))===null||N===void 0?void 0:N.format})),Ft[$t]in t&&((U=($=this.totalRecordsTree[Yt])===null||$===void 0?void 0:$[Nt])===null||U===void 0||U[$t].push(t))}return}Bt.length!==0&&(this.rowFlatKeys[Yt]||(this.rowKeys.push(Bt),this.rowFlatKeys[Yt]=1)),fe.length!==0&&(this.colFlatKeys[Nt]||(this.colKeys.push(fe),this.colFlatKeys[Nt]=1)),this.tree[Yt]||(this.tree[Yt]={}),!((Y=this.tree[Yt])===null||Y===void 0)&&Y[Nt]||(this.tree[Yt][Nt]=[]);const dt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Ft=0;Ft<dt.length;Ft++)if(this.calculatedFiledKeys.indexOf(dt[Ft])>=0){const $t=(j=this.calculatedFieldRules)===null||j===void 0?void 0:j.find(ae=>ae.key===dt[Ft]);!((Z=(G=this.tree[Yt])===null||G===void 0?void 0:G[Nt])===null||Z===void 0)&&Z[Ft]||(this.tree[Yt][Nt][Ft]=new this.aggregators[zt.RECALCULATE]({key:dt[Ft],dimension:dt[Ft],isRecord:!0,formatFun:(gt=(et=this.indicators)===null||et===void 0?void 0:et.find(ae=>typeof ae!="string"&&ae.indicatorKey===dt[Ft]))===null||gt===void 0?void 0:gt.format,calculateFun:$t==null?void 0:$t.calculateFun,dependAggregators:this.tree[Yt][Nt],dependIndicatorKeys:$t==null?void 0:$t.dependIndicatorKeys})),(it=(vt=this.tree[Yt])===null||vt===void 0?void 0:vt[Nt])===null||it===void 0||it[Ft].push(t)}else{const $t=this.getAggregatorRule(dt[Ft]);let ae=!1;Kt?e===Kt?dt[Ft]===Kt&&(ae=!0):dt[Ft]===Kt&&dt[Ft]in t&&(ae=!0):$t!=null&&$t.field?typeof($t==null?void 0:$t.field)=="string"?($t==null?void 0:$t.field)in t&&(ae=!0):$t!=null&&$t.field.find(Ti=>Ti in t)&&(ae=!0):dt[Ft]in t&&(ae=!0),!(!((bt=(nt=this.tree[Yt])===null||nt===void 0?void 0:nt[Nt])===null||bt===void 0)&&bt[Ft])&&ae&&(this.tree[Yt][Nt][Ft]=new this.aggregators[(Ct=$t==null?void 0:$t.aggregationType)!==null&&Ct!==void 0?Ct:zt.SUM]({key:dt[Ft],dimension:(at=$t==null?void 0:$t.field)!==null&&at!==void 0?at:dt[Ft],formatFun:(rt=$t==null?void 0:$t.formatFun)!==null&&rt!==void 0?rt:(ht=(ct=this.indicators)===null||ct===void 0?void 0:ct.find(Ti=>typeof Ti!="string"&&Ti.indicatorKey===dt[Ft]))===null||ht===void 0?void 0:ht.format})),ae&&((ut=(_t=this.tree[Yt])===null||_t===void 0?void 0:_t[Nt])===null||ut===void 0||ut[Ft].push(t))}if(this.mappingRules)for(let Ft=0;Ft<this.indicatorKeys.length;Ft++){if(!this.indicatorStatistics[Ft]){const $t=this.getAggregatorRule(this.indicatorKeys[Ft]);this.indicatorStatistics[Ft]={max:new this.aggregators[zt.MAX]({key:this.indicatorKeys[Ft],dimension:this.indicatorKeys[Ft]}),min:new this.aggregators[zt.MIN]({key:this.indicatorKeys[Ft],dimension:this.indicatorKeys[Ft]}),total:new this.aggregators[(It=$t==null?void 0:$t.aggregationType)!==null&&It!==void 0?It:zt.SUM]({key:this.indicatorKeys[Ft],dimension:(Ut=$t==null?void 0:$t.field)!==null&&Ut!==void 0?Ut:this.indicatorKeys[Ft],formatFun:(yt=$t==null?void 0:$t.formatFun)!==null&&yt!==void 0?yt:(kt=(Tt=this.indicators)===null||Tt===void 0?void 0:Tt.find(ae=>typeof ae!="string"&&ae.indicatorKey===this.indicatorKeys[Ft]))===null||kt===void 0?void 0:kt.format})}}this.indicatorStatistics[Ft].max.push((re=(oe=this.tree[Yt])===null||oe===void 0?void 0:oe[Nt])===null||re===void 0?void 0:re[Ft].value()),this.indicatorStatistics[Ft].min.push((Oe=(ye=this.tree[Yt])===null||ye===void 0?void 0:ye[Nt])===null||Oe===void 0?void 0:Oe[Ft].value()),this.indicatorStatistics[Ft].total.push(t)}}}}updateSortRules(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_;this.sorted=!1,this.sortRules=t,this.sortKeys(),this.customRowTree||(this.rowHierarchyType==="tree"?this.rowHeaderTree=this.ArrToTree1(this.rowKeys,this.rows.filter((w,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,((n=(e=this.totals)===null||e===void 0?void 0:e.row)===null||n===void 0?void 0:n.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel):this.rowHeaderTree=this.ArrToTree(this.rowKeys,this.rows.filter((w,y)=>this.rowsHasValue[y]),this.indicatorsAsCol?void 0:this.indicators,this.rowsIsTotal,((r=(o=this.totals)===null||o===void 0?void 0:o.row)===null||r===void 0?void 0:r.showGrandTotals)||this.indicatorsAsCol&&this.rows.length===0,this.rowGrandTotalLabel,this.rowSubTotalLabel,(a=(l=(s=this.totals)===null||s===void 0?void 0:s.row)===null||l===void 0?void 0:l.showGrandTotalsOnTop)!==null&&a!==void 0&&a,(u=(d=(h=this.totals)===null||h===void 0?void 0:h.row)===null||d===void 0?void 0:d.showSubTotalsOnTop)!==null&&u!==void 0&&u)),this.customColTree||(this.colHeaderTree=this.ArrToTree(this.colKeys,this.columns.filter((w,y)=>this.columnsHasValue[y]),this.indicatorsAsCol?this.indicators:void 0,this.colsIsTotal,((g=(c=this.totals)===null||c===void 0?void 0:c.column)===null||g===void 0?void 0:g.showGrandTotals)||!this.indicatorsAsCol&&this.columns.length===0,this.colGrandTotalLabel,this.colSubTotalLabel,(m=(p=(f=this.totals)===null||f===void 0?void 0:f.column)===null||p===void 0?void 0:p.showGrandTotalsOnLeft)!==null&&m!==void 0&&m,(_=(C=(b=this.totals)===null||b===void 0?void 0:b.column)===null||C===void 0?void 0:C.showSubTotalsOnLeft)!==null&&_!==void 0&&_))}updateFilterRules(t,e=!1){var n,o;if(this.filterRules=t,this.filteredRecords=void 0,e)this.tree={};else for(const r in this.tree)for(const s in this.tree[r])for(let l=0;l<this.tree[r][s].length;l++)(n=this.tree[r][s][l])===null||n===void 0||n.reset();this.collectedValues={},this.processRecords(),this.processCollectedValuesWithSumBy(),this.processCollectedValuesWithSortBy(),this.totalStatistics(),!((o=this.dataConfig)===null||o===void 0)&&o.isPivotChart&&this.cacheDeminsionCollectedValues()}getAggregatorRule(t){var e;return(e=this.aggregationRules)===null||e===void 0?void 0:e.find((n,o)=>t===n.indicatorKey)}getAggregator(t=[],e=[],n,o=!0,r){var s,l,a,h;const d=this.indicatorKeys.indexOf(n);let u,c;typeof t=="string"?u=t:(r&&r.position!=="row"||t.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||t.splice(p,1)}),u=HT(t,this.stringJoinChar)),typeof e=="string"?c=e:(r&&r.position!=="col"||e.map((f,p)=>{f!==n||z(r==null?void 0:r.index)&&p!==r.index||e.splice(p,1)}),c=HT(e,this.stringJoinChar));const g=(l=(s=this.tree[u])===null||s===void 0?void 0:s[c])===null||l===void 0?void 0:l[d];if(o&&z((h=(a=this.changedTree[u])===null||a===void 0?void 0:a[c])===null||h===void 0?void 0:h[d])){const f=this.changedTree[u][c][d];return g?{value:()=>f,formatValue:g.formatValue,formatFun:g.formatFun,records:g.records,className:"",recalculate(){},push(){},deleteRecord(){},updateRecord(){},clearCacheValue(){},reset(){}}:{value:()=>f,className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},formatValue:()=>f,clearCacheValue(){},reset(){}}}return g||{className:"",push(){},deleteRecord(){},updateRecord(){},recalculate(){},value:()=>null,clearCacheValue(){},reset(){}}}sortKeys(){if(this.colKeys=this.colKeys_normal.slice(),this.rowKeys=this.rowKeys_normal.slice(),!this.sorted){this.sorted=!0,this.rowKeys.sort(this.arrSort(this.rows,!0));const t=this.arrSort(this.columns,!1);this.colKeys.sort(t)}}arrSort(t,e){let n;const o=this,r=function(s){const l=[];for(let a=0,h=t.length;a<h;a++)if(n=t[a],o.sortRules)for(let d=0,u=o.sortRules.length;d<u;d++)o.sortRules[d].sortField===n&&l.push({field:n,fieldIndex:a,sortRule:o.sortRules[d],func:o.getSort(o.sortRules[d],e)});return l}.call(this);return function(s,l){var a,h,d,u;let c,g;for(let f=0;f<r.length;f++){if(g=r[f],(a=g.sortRule)===null||a===void 0?void 0:a.sortByIndicator){let p=s,m=l;g.fieldIndex<t.length-1&&(p=s.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?p.push(o.rowSubTotalLabel):e||p.push(o.colSubTotalLabel),m=l.slice(0,g.fieldIndex+1),o.rowHierarchyType==="grid"&&e?m.push(o.rowSubTotalLabel):e||m.push(o.colSubTotalLabel)),c=g.func(p,m,(h=g.sortRule)===null||h===void 0?void 0:h.sortType)}else c=(d=g.func)===null||d===void 0?void 0:d.call(g,s[g.fieldIndex],l[g.fieldIndex],(u=g.sortRule)===null||u===void 0?void 0:u.sortType);if(c!==0)return c}return 0}}getSort(t,e){const n=this;return t.sortByIndicator?(o,r,s)=>{const l=function(a,h){return n.rowHierarchyType==="grid"&&a.length<n.rows.length&&a[a.length-1]!==n.rowSubTotalLabel&&a[a.length-1]!==n.rowGrandTotalLabel&&a.push(n.rowSubTotalLabel),h.length<n.columns.length&&h[h.length-1]!==n.colSubTotalLabel&&h[h.length-1]!==n.colGrandTotalLabel&&h.push(n.colSubTotalLabel),n.getAggregator(a,h,t.sortByIndicator).value()};return e?yc(l(o,t.query),l(r,t.query),s):yc(l(t.query,o),l(t.query,r),s)}:t.sortBy?e6(t.sortBy):t.sortFunc?t.sortFunc:t.sortType?t6:yc}totalStatistics(){var t,e,n,o,r,s,l,a,h,d,u,c,g,f;const p=this,m=(b,C)=>{var _,w,y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt,bt,Ct,at,rt,ct,ht,_t,ut,It,Ut,yt,Tt,kt,oe,re,ye,Oe,Be;if(!((w=(_=this.totalRecordsTree)===null||_===void 0?void 0:_[b])===null||w===void 0)&&w[C])return this.tree[b]||(this.tree[b]={}),void(this.tree[b][C]=(S=(y=this.totalRecordsTree)===null||y===void 0?void 0:y[b])===null||S===void 0?void 0:S[C]);const Ee=C.split(this.stringJoinChar);if(!((A=(R=p.totals)===null||R===void 0?void 0:R.column)===null||A===void 0)&&A.subTotalsDimensions&&((M=(T=(x=p.totals)===null||x===void 0?void 0:x.column)===null||T===void 0?void 0:T.subTotalsDimensions)===null||M===void 0?void 0:M.length)>0&&p.totals.column.showSubTotals!==!1)for(let At=0,mt=(F=(P=(B=p.totals)===null||B===void 0?void 0:B.column)===null||P===void 0?void 0:P.subTotalsDimensions)===null||F===void 0?void 0:F.length;At<mt;At++){const Bt=p.totals.column.subTotalsDimensions[At],Kt=p.columns.indexOf(Bt);if(Kt>=0){const qt=Ee.slice(0,Kt+1);qt.push(p.colSubTotalLabel);const fe=qt.join(this.stringJoinChar);if(!((E=(H=this.totalRecordsTree)===null||H===void 0?void 0:H[b])===null||E===void 0)&&E[fe])return void(this.tree[b][fe]=(I=(k=this.totalRecordsTree)===null||k===void 0?void 0:k[b])===null||I===void 0?void 0:I[fe]);this.tree[b][fe]||(this.tree[b][fe]=[]);const Yt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Nt=0;Nt<Yt.length;Nt++)if(this.calculatedFiledKeys.indexOf(Yt[Nt])>=0){const dt=(L=this.calculatedFieldRules)===null||L===void 0?void 0:L.find(Ft=>Ft.key===Yt[Nt]);!((O=(D=this.tree[b])===null||D===void 0?void 0:D[fe])===null||O===void 0)&&O[Nt]||(this.tree[b][fe][Nt]=new this.aggregators[zt.RECALCULATE]({key:Yt[Nt],dimension:Yt[Nt],isRecord:!0,formatFun:(N=(W=this.indicators)===null||W===void 0?void 0:W.find(Ft=>typeof Ft!="string"&&Ft.indicatorKey===Yt[Nt]))===null||N===void 0?void 0:N.format,calculateFun:dt==null?void 0:dt.calculateFun,dependAggregators:this.tree[b][fe],dependIndicatorKeys:dt==null?void 0:dt.dependIndicatorKeys})),fe!==C&&this.tree[b][fe][Nt].push((U=($=p.tree[b])===null||$===void 0?void 0:$[C])===null||U===void 0?void 0:U[Nt])}else{if(!this.tree[b][fe][Nt]){const dt=this.getAggregatorRule(Yt[Nt]);this.tree[b][fe][Nt]=new this.aggregators[(Y=dt==null?void 0:dt.aggregationType)!==null&&Y!==void 0?Y:zt.SUM]({key:Yt[Nt],dimension:(j=dt==null?void 0:dt.field)!==null&&j!==void 0?j:Yt[Nt],formatFun:(G=dt==null?void 0:dt.formatFun)!==null&&G!==void 0?G:(et=(Z=this.indicators)===null||Z===void 0?void 0:Z.find(Ft=>typeof Ft!="string"&&Ft.indicatorKey===Yt[Nt]))===null||et===void 0?void 0:et.format})}fe!==C&&this.tree[b][fe][Nt].push((vt=(gt=p.tree[b])===null||gt===void 0?void 0:gt[C])===null||vt===void 0?void 0:vt[Nt])}}}if(!((nt=(it=p.totals)===null||it===void 0?void 0:it.column)===null||nt===void 0)&&nt.showGrandTotals||this.rows.length===0){const At=p.colGrandTotalLabel;if(!((Ct=(bt=this.totalRecordsTree)===null||bt===void 0?void 0:bt[b])===null||Ct===void 0)&&Ct[At])return void(this.tree[b][At]=(rt=(at=this.totalRecordsTree)===null||at===void 0?void 0:at[b])===null||rt===void 0?void 0:rt[At]);this.tree[b][At]||(this.tree[b][At]=[]);const mt=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let Bt=0;Bt<mt.length;Bt++)if(this.calculatedFiledKeys.indexOf(mt[Bt])>=0){const Kt=(ct=this.calculatedFieldRules)===null||ct===void 0?void 0:ct.find(qt=>qt.key===mt[Bt]);!((_t=(ht=this.tree[b])===null||ht===void 0?void 0:ht[At])===null||_t===void 0)&&_t[Bt]||(this.tree[b][At][Bt]=new this.aggregators[zt.RECALCULATE]({key:mt[Bt],dimension:mt[Bt],isRecord:!0,formatFun:(It=(ut=this.indicators)===null||ut===void 0?void 0:ut.find(qt=>typeof qt!="string"&&qt.indicatorKey===mt[Bt]))===null||It===void 0?void 0:It.format,calculateFun:Kt==null?void 0:Kt.calculateFun,dependAggregators:this.tree[b][At],dependIndicatorKeys:Kt==null?void 0:Kt.dependIndicatorKeys})),At!==C&&this.tree[b][At][Bt].push((yt=(Ut=p.tree[b])===null||Ut===void 0?void 0:Ut[C])===null||yt===void 0?void 0:yt[Bt])}else{if(!this.tree[b][At][Bt]){const Kt=this.getAggregatorRule(mt[Bt]);this.tree[b][At][Bt]=new this.aggregators[(Tt=Kt==null?void 0:Kt.aggregationType)!==null&&Tt!==void 0?Tt:zt.SUM]({key:mt[Bt],dimension:(kt=Kt==null?void 0:Kt.field)!==null&&kt!==void 0?kt:mt[Bt],formatFun:(oe=Kt==null?void 0:Kt.formatFun)!==null&&oe!==void 0?oe:(ye=(re=this.indicators)===null||re===void 0?void 0:re.find(qt=>typeof qt!="string"&&qt.indicatorKey===mt[Bt]))===null||ye===void 0?void 0:ye.format})}At!==C&&this.tree[b][At][Bt].push((Be=(Oe=p.tree[b])===null||Oe===void 0?void 0:Oe[C])===null||Be===void 0?void 0:Be[Bt])}}};if(!((e=(t=p==null?void 0:p.totals)===null||t===void 0?void 0:t.column)===null||e===void 0)&&e.subTotalsDimensions&&((r=(o=(n=p==null?void 0:p.totals)===null||n===void 0?void 0:n.column)===null||o===void 0?void 0:o.subTotalsDimensions)===null||r===void 0?void 0:r.length)>=1||!((l=(s=p==null?void 0:p.totals)===null||s===void 0?void 0:s.row)===null||l===void 0)&&l.subTotalsDimensions&&((d=(h=(a=p==null?void 0:p.totals)===null||a===void 0?void 0:a.row)===null||h===void 0?void 0:h.subTotalsDimensions)===null||d===void 0?void 0:d.length)>=1||!((c=(u=p==null?void 0:p.totals)===null||u===void 0?void 0:u.column)===null||c===void 0)&&c.showGrandTotals||!((f=(g=p==null?void 0:p.totals)===null||g===void 0?void 0:g.row)===null||f===void 0)&&f.showGrandTotals){const b=[];Object.keys(p.tree).forEach(C=>{const _=C.split(this.stringJoinChar);Object.keys(p.tree[C]).forEach(w=>{var y,S,R,A,x,T,M,B,P,F,H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et,gt,vt,it,nt;if(!((S=(y=p.totals)===null||y===void 0?void 0:y.row)===null||S===void 0)&&S.subTotalsDimensions&&((x=(A=(R=p.totals)===null||R===void 0?void 0:R.row)===null||A===void 0?void 0:A.subTotalsDimensions)===null||x===void 0?void 0:x.length)>0&&p.totals.row.showSubTotals!==!1)for(let bt=0,Ct=(B=(M=(T=p.totals)===null||T===void 0?void 0:T.row)===null||M===void 0?void 0:M.subTotalsDimensions)===null||B===void 0?void 0:B.length;bt<Ct;bt++){const at=p.totals.row.subTotalsDimensions[bt],rt=p.rows.indexOf(at);if(rt>=0&&rt<p.rows.length-1){const ct=_.slice(0,rt+1);this.rowHierarchyType==="grid"&&ct.push(p.rowSubTotalLabel);const ht=ct.join(this.stringJoinChar);this.tree[ht]||(this.tree[ht]={},b.push(ht)),this.tree[ht][w]||(this.tree[ht][w]=[]);const _t=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let ut=0;ut<_t.length;ut++){if(!this.tree[ht][w][ut])if(this.calculatedFiledKeys.indexOf(_t[ut])>=0){const It=(P=this.calculatedFieldRules)===null||P===void 0?void 0:P.find(Ut=>Ut.key===_t[ut]);this.tree[ht][w][ut]=new this.aggregators[zt.RECALCULATE]({key:_t[ut],dimension:_t[ut],isRecord:!0,formatFun:(H=(F=this.indicators)===null||F===void 0?void 0:F.find(Ut=>typeof Ut!="string"&&Ut.indicatorKey===_t[ut]))===null||H===void 0?void 0:H.format,calculateFun:It==null?void 0:It.calculateFun,dependAggregators:this.tree[ht][w],dependIndicatorKeys:It==null?void 0:It.dependIndicatorKeys})}else{const It=this.getAggregatorRule(_t[ut]);this.tree[ht][w][ut]=new this.aggregators[(E=It==null?void 0:It.aggregationType)!==null&&E!==void 0?E:zt.SUM]({key:_t[ut],dimension:(k=It==null?void 0:It.field)!==null&&k!==void 0?k:_t[ut],formatFun:(I=It==null?void 0:It.formatFun)!==null&&I!==void 0?I:(D=(L=this.indicators)===null||L===void 0?void 0:L.find(Ut=>typeof Ut!="string"&&Ut.indicatorKey===_t[ut]))===null||D===void 0?void 0:D.format})}ht!==C&&this.tree[ht][w][ut].push((W=(O=p.tree[C])===null||O===void 0?void 0:O[w])===null||W===void 0?void 0:W[ut])}}}if(!(($=(N=p.totals)===null||N===void 0?void 0:N.row)===null||$===void 0)&&$.showGrandTotals||this.columns.length===0){const bt=p.rowGrandTotalLabel;this.tree[bt]||(this.tree[bt]={},b.push(bt)),this.tree[bt][w]||(this.tree[bt][w]=[]);const Ct=this.indicatorKeysIncludeCalculatedFieldDependIndicatorKeys;for(let at=0;at<Ct.length;at++){if(!this.tree[bt][w][at])if(this.calculatedFiledKeys.indexOf(Ct[at])>=0){const rt=(U=this.calculatedFieldRules)===null||U===void 0?void 0:U.find(ct=>ct.key===Ct[at]);this.tree[bt][w][at]=new this.aggregators[zt.RECALCULATE]({key:Ct[at],dimension:Ct[at],isRecord:!0,formatFun:(j=(Y=this.indicators)===null||Y===void 0?void 0:Y.find(ct=>typeof ct!="string"&&ct.indicatorKey===Ct[at]))===null||j===void 0?void 0:j.format,calculateFun:rt==null?void 0:rt.calculateFun,dependAggregators:this.tree[bt][w],dependIndicatorKeys:rt==null?void 0:rt.dependIndicatorKeys})}else{const rt=this.getAggregatorRule(Ct[at]);this.tree[bt][w][at]=new this.aggregators[(G=rt==null?void 0:rt.aggregationType)!==null&&G!==void 0?G:zt.SUM]({key:Ct[at],dimension:(Z=rt==null?void 0:rt.field)!==null&&Z!==void 0?Z:Ct[at],formatFun:(et=rt==null?void 0:rt.formatFun)!==null&&et!==void 0?et:(vt=(gt=this.indicators)===null||gt===void 0?void 0:gt.find(ct=>typeof ct!="string"&&ct.indicatorKey===Ct[at]))===null||vt===void 0?void 0:vt.format})}bt!==C&&this.tree[bt][w][at].push((nt=(it=p.tree[C])===null||it===void 0?void 0:it[w])===null||nt===void 0?void 0:nt[at])}}m(C,w)})}),b.forEach(C=>{Object.keys(p.tree[C]).forEach(_=>{m(C,_)})})}for(const b in p.totalRecordsTree)for(const C in p.totalRecordsTree[b])m(b,C)}ArrToTree1(t,e,n,o,r){const s=[],l=this.stringJoinChar,a=new Map;function h(d){const u=[];let c;d.forEach((g,f)=>{var p;u.push(g);const m=u.join(l);let b=a.get(m);b||(b={value:g,dimensionKey:e[f],children:f===d.length-1&&((p=n==null?void 0:n.length)!==null&&p!==void 0?p:0)>=1?n==null?void 0:n.map(C=>typeof C=="string"?{indicatorKey:C,value:C}:{indicatorKey:C.indicatorKey,value:C.title}):[]},a.set(m,b),c?c.children.push(b):s.push(b)),c=b})}return t.forEach(d=>h(d)),o&&h([r]),s}ArrToTree(t,e,n,o,r,s,l,a,h){var d;let u=[];const c=this.stringJoinChar,g=new Map;if(t!=null&&t.length?t.forEach(f=>function(p){const m=[];let b;p.forEach((C,_)=>{var w,y,S,R;m.push(C);const A=m.join(c);let x=g.get(A);if(!x){if(x={value:C,dimensionKey:e[_],children:_===p.length-1&&((w=n==null?void 0:n.length)!==null&&w!==void 0?w:0)>=1?n==null?void 0:n.map(T=>typeof T=="string"?{indicatorKey:T,value:T}:{indicatorKey:T.indicatorKey,value:T.title}):[]},o[_]){let T=(y=x.children)!==null&&y!==void 0?y:[];const M={value:l,dimensionKey:e[_+1],levelSpan:o.length-_-1,children:((S=n==null?void 0:n.length)!==null&&S!==void 0?S:0)>=1?n==null?void 0:n.map(B=>typeof B=="string"?{indicatorKey:B,value:B}:{indicatorKey:B.indicatorKey,value:B.title}):[]};T.push(M),T=(R=M.children)!==null&&R!==void 0?R:[]}g.set(A,x),b?o[_-1]&&!h?b.children.splice(b.children.length-1,0,x):b.children.push(x):u.push(x)}b=x})}(f)):n&&(u=n==null?void 0:n.map(f=>{var p;return typeof f=="string"?{indicatorKey:f,value:f}:{indicatorKey:f.indicatorKey,value:(p=f.title)!==null&&p!==void 0?p:f.indicatorKey}})),r&&(t==null?void 0:t.length)){const f={value:s,dimensionKey:e[0],levelSpan:o.length,children:(d=n==null?void 0:n.map(p=>typeof p=="string"?{indicatorKey:p,value:p}:{indicatorKey:p.indicatorKey,value:p.title}))!==null&&d!==void 0?d:[]};a?u.unshift(f):u.push(f)}return u}cacheDeminsionCollectedValues(){for(const t in this.collectValuesBy)this.collectValuesBy[t].type!=="xField"&&this.collectValuesBy[t].type!=="yField"||(this.dataConfig.dimensionSortArray?this.cacheCollectedValues[t]=G9(this.collectedValues[t],this.dataConfig.dimensionSortArray):this.cacheCollectedValues[t]=this.collectedValues[t])}changeTreeNodeValue(t=[],e=[],n,o){var r,s,l;const a=this.indicatorKeys.indexOf(n);let h,d;h=typeof t=="string"?t:t.join(this.stringJoinChar),d=typeof e=="string"?e:e.join(this.stringJoinChar),!((r=this.changedTree[h])===null||r===void 0)&&r[d]?this.changedTree[h][d][a]=o:this.changedTree[h]?(this.changedTree[h][d]=[],this.changedTree[h][d][a]=o):(this.changedTree[h]={},this.changedTree[h][d]=[],this.changedTree[h][d][a]=o);const u=(l=(s=this.tree[h])===null||s===void 0?void 0:s[d])===null||l===void 0?void 0:l[a];(u==null?void 0:u.records.length)===1&&(u.records[0][this.indicatorKeys[a]]=o)}changeRecordFieldValue(t,e,n){let o=!1;for(let r=0;r<this.indicatorKeys.length;r++)this.indicatorKeys[r]===t&&(o=!0);if(!o){if(Array.isArray(this.records))for(let r=0,s=this.records.length;r<s;r++){const l=this.records[r];l[t]===e&&(l[t]=n)}else for(const r in this.records)for(let s=0,l=this.records[r].length;s<l;s++){const a=this.records[r][s];a[t]===e&&(a[t]=n)}this.rowFlatKeys={},this.colFlatKeys={},this.tree={},this.processRecords()}}_rowTreeHasChanged(){this.hasExtensionRowTree||(this.customRowTreeDimensionPaths=this.customTreeToDimensionPathArr(this.customRowTree,"row"))}changeDataConfig(t){this.rows=t.rows,this.columns=t.columns}addRecords(t){for(let e=0,n=t.length;e<n;e++){const o=t[e];this.processRecord(o)}Array.isArray(this.records)&&this.records.push(t)}customTreeToDimensionPathArr(t,e){const n=[],o=this;function r(s,l){var a,h,d;s.virtual||(!((a=l[l.length-1])===null||a===void 0)&&a.childKeys&&s.dimensionKey&&l[l.length-1].childKeys.indexOf(s.dimensionKey)===-1&&s.dimensionKey!==l[l.length-1].dimensionKey&&l[l.length-1].childKeys.push(s.dimensionKey),l.push({dimensionKey:z(s.indicatorKey)?void 0:s.dimensionKey,value:s.value,indicatorKey:s.indicatorKey,virtual:s.virtual})),((h=s.children)===null||h===void 0?void 0:h.length)>0?(o.rowHierarchyType==="tree"&&e==="row"&&(l[l.length-1].childKeys=[],n.push([...l])),(d=s.children)===null||d===void 0||d.forEach(u=>r(u,[...l]))):n.push(l)}return t==null||t.forEach(s=>r(s,[])),n}getFieldMatchColDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customColTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customColTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}}l&&o.push(s)}return o}getFieldMatchRowDimensionPaths(t){var e,n;const o=[];for(let r=0;(n=r<((e=this.customRowTreeDimensionPaths)===null||e===void 0?void 0:e.length))!==null&&n!==void 0&&n;r++){const s=this.customRowTreeDimensionPaths[r];let l=!0;for(let a=0;a<s.length;a++){const h=s[a];if(h.dimensionKey&&t[h.dimensionKey]!==h.value||h.indicatorKey&&t[h.indicatorKey]===void 0){l=!1;break}if(h.childKeys&&a===s.length-1&&h.childKeys.length>0&&h.childKeys.find(d=>z(t[d]))){l=!1;break}}l&&(this.indicatorsAsCol||this.rowHierarchyType!=="tree"||s.find(a=>a.indicatorKey)||(l=!1)),l&&o.push(s)}return o}}function G9(i,t){return i.sort((e,n)=>{const o=t.indexOf(e),r=t.indexOf(n);return o<r?-1:o>r?1:0})}let ET=class extends _g{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C;if(le.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},e){e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Le(e.columns),this.internalProps.rows=Le(e.rows),this.internalProps.indicators=go(e.indicators),(n=e.indicators)===null||n===void 0||n.forEach((w,y)=>{typeof w=="object"&&(w!=null&&w.editor)&&(this.internalProps.indicators[y].editor=w.editor)}),this.internalProps.columnTree=!e.indicatorsAsCol||!((o=e.columns)===null||o===void 0)&&o.length||e.columnTree?Le(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((r=e.rows)===null||r===void 0)&&r.length||e.rowTree?Le(e.rowTree):[],this.internalProps.records=e.records,this.pagination=e.pagination,this.internalProps.columnResizeType=(s=e.columnResizeType)!==null&&s!==void 0?s:"column",this.internalProps.rowResizeType=(l=e.rowResizeType)!==null&&l!==void 0?l:"row",this.internalProps.dataConfig=Le(e.dataConfig),this.internalProps.columnWidthConfig=e.columnWidthConfig;const _=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((a=_==null?void 0:_[0])===null||a===void 0?void 0:a.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((h=e.customConfig)===null||h===void 0?void 0:h.enableDataAnalysis)===!1){const w=new He((d=this.internalProps.columnTree)!==null&&d!==void 0?d:[],this.layoutNodeId),y=new He((u=this.internalProps.rowTree)!==null&&u!==void 0?u:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(c=this.options.rowExpandLevel)!==null&&c!==void 0?c:1:void 0);this.internalProps.layoutMap=new hr(this,null,w,y),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new mv({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey},_))}else{const w=YR(this,e),{rowKeys:y,columnKeys:S,indicatorKeys:R}=w;let{columnDimensionTree:A,rowDimensionTree:x}=w;this.dataset=new Oh(this.internalProps.dataConfig,y,S,R,this.internalProps.indicators,(g=e.indicatorsAsCol)===null||g===void 0||g,e.records,e.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!e.extensionRows,!!e.parseCustomTreeToMatchRecords),e.columnTree||(e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,e.indicators)),A=new He((f=this.dataset.colHeaderTree)!==null&&f!==void 0?f:[],this.layoutNodeId)),e.rowTree||(e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,e.indicators)),x=new He((p=this.dataset.rowHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(m=this.options.rowExpandLevel)!==null&&m!==void 0?m:1:void 0)),this.internalProps.layoutMap=new hr(this,this.dataset,A,x)}if(this._changePivotSortStateBySortRules(),((C=(b=e.pivotSortState)===null||b===void 0?void 0:b.length)!==null&&C!==void 0?C:0)>0&&(this.pivotSortState=[],this.pivotSortState=e.pivotSortState),le.mode!=="node"&&(this.editorManager=new mT(this)),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.stateManager.initCheckedState(_),this.scenegraph.createSceneGraph(),e.title){const w=Et.getComponent("title");this.internalProps.title=new w(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const w=Et.getComponent("emptyTip");this.internalProps.emptyTip=new w(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(lt.INITIALIZED,null)},0)}}static get EVENT_TYPE(){return lr}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!1}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n){if(this.internalProps.layoutMap.isSeriesNumber(t,e)&&this.internalProps.rowSeriesNumber.disableColumnResize===!0)return!1;if(!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_;const w=this.internalProps;if(super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Le(t.columns),this.internalProps.rows=Le(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?go(t.indicators):[],(n=t.indicators)===null||n===void 0||n.forEach((S,R)=>{typeof S=="object"&&(S!=null&&S.editor)&&(this.internalProps.indicators[R].editor=S.editor)}),this.internalProps.columnTree=!t.indicatorsAsCol||!((o=t.columns)===null||o===void 0)&&o.length||t.columnTree?Le(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((r=t.rows)===null||r===void 0)&&r.length||t.rowTree?Le(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.stateManager.initCheckedState(this.internalProps.records),this.stateManager.updateDrillState(void 0,void 0,!1,!1,-1,-1),this.pagination=t.pagination,w.columnResizeType=(s=t.columnResizeType)!==null&&s!==void 0?s:"column",w.rowResizeType=(l=t.rowResizeType)!==null&&l!==void 0?l:"row",w.dataConfig=Le(t.dataConfig),this.internalProps.columnWidthConfig=t.columnWidthConfig,(t==null?void 0:t.rowHierarchyType)==="tree"&&this.internalProps.layoutMap.rowHierarchyType==="tree"&&this.internalProps.layoutMap.rowExpandLevel===(t==null?void 0:t.rowExpandLevel)){const S=this.internalProps.layoutMap.rowDimensionTree.tree.children;(a=this.internalProps.rowTree)===null||a===void 0||a.forEach((R,A)=>{const x=S.find(T=>T.dimensionKey===R.dimensionKey&&T.value===R.value);x&&this._syncHierarchyState(x,R)})}const y=this.internalProps.records;if(this.internalProps.recordsIsTwoDimensionalArray=!1,((h=y==null?void 0:y[0])===null||h===void 0?void 0:h.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0),((d=t.customConfig)===null||d===void 0?void 0:d.enableDataAnalysis)===!1){let S,R;t.columnTree&&(S=new He((u=this.internalProps.columnTree)!==null&&u!==void 0?u:[],this.layoutNodeId)),t.rowTree&&(R=new He((c=this.internalProps.rowTree)!==null&&c!==void 0?c:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(g=this.options.rowExpandLevel)!==null&&g!==void 0?g:1:void 0)),w.layoutMap=new hr(this,null,S,R),this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new mv({rows:w.layoutMap.fullRowDimensionKeys,columns:w.layoutMap.colDimensionKeys,indicators:w.layoutMap.indicatorKeys,indicatorsAsCol:w.layoutMap.indicatorsAsCol,indicatorDimensionKey:w.layoutMap.indicatorDimensionKey},y))}else{const S=YR(this,t),{rowKeys:R,columnKeys:A,indicatorKeys:x}=S;let{columnDimensionTree:T,rowDimensionTree:M}=S;this.dataset=new Oh(w.dataConfig,R,A,x,this.internalProps.indicators,(f=t.indicatorsAsCol)===null||f===void 0||f,y,t.rowHierarchyType,this.internalProps.columnTree,this.internalProps.rowTree,!1,!!t.extensionRows,!!t.parseCustomTreeToMatchRecords),t.columnTree||(t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,t.indicators)),T=new He((p=this.dataset.colHeaderTree)!==null&&p!==void 0?p:[],this.layoutNodeId)),t.rowTree||(t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,t.indicators)),M=new He((m=this.dataset.rowHeaderTree)!==null&&m!==void 0?m:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(b=this.options.rowExpandLevel)!==null&&b!==void 0?b:1:void 0)),w.layoutMap=new hr(this,this.dataset,T,M)}if(this._changePivotSortStateBySortRules(),((_=(C=t.pivotSortState)===null||C===void 0?void 0:C.length)!==null&&_!==void 0?_:0)>0&&(this.pivotSortState=[],this.pivotSortState=t.pivotSortState),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,w.releaseList&&(w.releaseList.forEach(S=>{var R;return(R=S==null?void 0:S.release)===null||R===void 0?void 0:R.call(S)}),w.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const S=Et.getComponent("title");this.internalProps.title=new S(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const S=Et.getComponent("emptyTip");this.internalProps.emptyTip=new S(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(S=>{setTimeout(S,0)})}updatePagination(t){t?(this.pagination||(this.pagination={currentPage:0,perPageCount:0}),typeof t.currentPage=="number"&&t.currentPage>=0&&(this.pagination.currentPage=t.currentPage),t.perPageCount&&(this.pagination.perPageCount=t.perPageCount||this.pagination.perPageCount),this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(this.pagination),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render()):this.pagination&&(this.pagination=void 0,this.scenegraph.clearCells(),this.internalProps.layoutMap.setPagination(void 0),this.refreshRowColCount(),this.scenegraph.createSceneGraph(),this.render())}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a,h;const d=this,{layoutMap:u}=d.internalProps;u&&(d.colCount=(t=u.colCount)!==null&&t!==void 0?t:0,d.rowCount=(e=u.rowCount)!==null&&e!==void 0?e:0,this.internalProps.frozenColCount=Math.max(((n=u.rowHeaderLevelCount)!==null&&n!==void 0?n:0)+u.leftRowSeriesNumberColumnCount,(o=this.options.frozenColCount)!==null&&o!==void 0?o:0),d.frozenRowCount=Math.max(u.headerLevelCount,(r=this.options.frozenRowCount)!==null&&r!==void 0?r:0),d.bottomFrozenRowCount!==((s=this.options.bottomFrozenRowCount)!==null&&s!==void 0?s:0)&&(d.bottomFrozenRowCount=(l=this.options.bottomFrozenRowCount)!==null&&l!==void 0?l:0),d.rightFrozenColCount!==((a=this.options.rightFrozenColCount)!==null&&a!==void 0?a:0)&&(d.rightFrozenColCount=(h=this.options.rightFrozenColCount)!==null&&h!==void 0?h:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}get rowHierarchyType(){return this.internalProps.layoutMap.rowHierarchyType}_syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;if(!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r){const a=t.children.find(h=>h.dimensionKey===r.dimensionKey&&h.value===r.value);a&&this._syncHierarchyState(a,r)}}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getFieldData(t,e,n){var o,r,s;if(!this.internalProps.layoutMap.isHeader(e,n)){if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(n),a=this.getBodyIndexByCol(e);return(o=this.records[l])===null||o===void 0?void 0:o[a]}if(this.dataset){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n);if(l){let a;const h=(r=l.colHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(s=l.rowHeaderPaths)===null||s===void 0?void 0:s.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(a={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(e,n),!0,a);if(u.records&&u.records.length>=1)return u.records[0][t]}}else if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(e,n),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(e,n).indicatorKey,!1);if(d!=null&&d.record)return d==null?void 0:d.record[t]}}}getCellValue(t,e,n){var o,r,s,l,a,h,d;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isSeriesNumber(t,e)){if(this.internalProps.layoutMap.isSeriesNumberInHeader(t,e)){const{title:c}=this.internalProps.layoutMap.getSeriesNumberHeader(t,e);return c}const{format:u}=this.internalProps.layoutMap.getSeriesNumberBody(t,e);return typeof u=="function"?u(t,e,this):e-this.columnHeaderLevelCount+1}if(this.internalProps.layoutMap.isHeader(t,e)){const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.internalProps.recordsIsTwoDimensionalArray){const{fieldFormat:u}=this.internalProps.layoutMap.getBody(t,e),c=this.getBodyIndexByRow(e),g=this.getBodyIndexByCol(t),f=(o=this.records[c])===null||o===void 0?void 0:o[g];return typeof u=="function"?u(f,t,e,this):f}if(this.dataset){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e);let c;const g=(s=(r=u.colHeaderPaths)===null||r===void 0?void 0:r.filter(b=>!b.virtual))===null||s===void 0?void 0:s.map((b,C)=>{var _;return b.indicatorKey&&(c={position:"col",index:C}),(_=b.indicatorKey)!==null&&_!==void 0?_:b.value}),f=(a=(l=u.rowHeaderPaths)===null||l===void 0?void 0:l.filter(b=>!b.virtual))===null||a===void 0?void 0:a.map((b,C)=>{var _;return b.indicatorKey&&(c={position:"row",index:C}),(_=b.indicatorKey)!==null&&_!==void 0?_:b.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,c),{fieldFormat:m}=this.internalProps.layoutMap.getBody(t,e);return p.formatValue?p.formatValue(t,e,this):typeof m=="function"?m(p==null?void 0:p.value(),t,e,this):(h=p==null?void 0:p.value())!==null&&h!==void 0?h:""}if(this.flatDataToObjects){const u=this.internalProps.layoutMap.getCellHeaderPaths(t,e),c=u.colHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),g=u.rowHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),f=this.flatDataToObjects.getTreeNode(g,c,this.internalProps.layoutMap.getBody(t,e).indicatorKey),{fieldFormat:p}=this.internalProps.layoutMap.getBody(t,e);return typeof p=="function"?p(f==null?void 0:f.value,t,e,this):(d=f==null?void 0:f.value)!==null&&d!==void 0?d:""}}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return d==null?void 0:d.value}}getCellRawValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){const{title:l}=s.internalProps.layoutMap.getHeader(t,e);return typeof l=="function"?l():l}if(this.internalProps.recordsIsTwoDimensionalArray){const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(n=this.records[l])===null||n===void 0?void 0:n[a]}if(this.dataset){let l;const a=this.internalProps.layoutMap.getCellHeaderPaths(t,e),h=(o=a.colHeaderPaths)===null||o===void 0?void 0:o.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"col",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),d=(r=a.rowHeaderPaths)===null||r===void 0?void 0:r.filter(c=>!c.virtual).map((c,g)=>{var f;return c.indicatorKey&&(l={position:"row",index:g}),(f=c.indicatorKey)!==null&&f!==void 0?f:c.value}),u=this.dataset.getAggregator(d,h,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,l);return u.value?u.value():void 0}if(this.flatDataToObjects){const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=l.colHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),h=l.rowHeaderPaths.map(u=>{var c;return(c=u.indicatorKey)!==null&&c!==void 0?c:u.value}),d=this.flatDataToObjects.getTreeNode(h,a,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return d==null?void 0:d.value}}getCellOriginRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey);return h==null?void 0:h.record}}}getCellRawRecord(t,e){var n,o,r;if(!this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.getBodyIndexByRow(e),l=this.getBodyIndexByCol(t);return(n=this.records[s])===null||n===void 0?void 0:n[l]}if(this.dataset){let s;const l=this.internalProps.layoutMap.getCellHeaderPaths(t,e),a=(o=l.colHeaderPaths)===null||o===void 0?void 0:o.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"col",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value}),h=(r=l.rowHeaderPaths)===null||r===void 0?void 0:r.filter(d=>!d.virtual).map((d,u)=>{var c;return d.indicatorKey&&(s={position:"row",index:u}),(c=d.indicatorKey)!==null&&c!==void 0?c:d.value});return this.dataset.getAggregator(h,a,this.internalProps.layoutMap.getIndicatorKey(t,e),!1,s).records}if(this.flatDataToObjects){const s=this.internalProps.layoutMap.getCellHeaderPaths(t,e),l=s.colHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),a=s.rowHeaderPaths.map(d=>{var u;return(u=d.indicatorKey)!==null&&u!==void 0?u:d.value}),h=this.flatDataToObjects.getTreeNode(a,l,this.internalProps.layoutMap.getBody(t,e).indicatorKey,!1);return h==null?void 0:h.record}}}updateSortRules(t,e,n){this.internalProps.dataConfig?this.internalProps.dataConfig.sortRules=t:this.internalProps.dataConfig={sortRules:t},this.dataset.updateSortRules(t),this._changePivotSortStateBySortRules();const{layoutMap:o}=this.internalProps;o.resetHeaderTree(),this.scenegraph.clearCells(),pt(e)&&pt(n)?(this.isRowHeader(e,n)?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):this.isCornerHeader(e,n)?o.cornerSetting.titleOnDimension==="column"?(this.setMinMaxLimitWidth(!0),this.internalProps._widthResizedColMap.clear()):o.cornerSetting.titleOnDimension==="row"&&this.internalProps._heightResizedRowMap.clear():this.isColumnHeader(e,n)&&this.internalProps._heightResizedRowMap.clear(),this.refreshRowColCount()):this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(!0),this.render()}_changePivotSortStateBySortRules(){var t,e,n,o;this.pivotSortState=[];const r=(e=(t=this.internalProps.dataConfig)===null||t===void 0?void 0:t.sortRules)!==null&&e!==void 0?e:[];for(let s=0;s<r.length;s++){const l=r[s],a=[];if(l.sortByIndicator&&l.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])){for(let d=0;d<l.query.length;d++)a.push({dimensionKey:this.dataset.indicatorsAsCol?this.dataset.columns[d]:this.dataset.rows[d],value:l.query[d]});a.push({indicatorKey:l.sortByIndicator,value:(o=(n=this.internalProps.layoutMap.getIndicatorInfo(l.sortByIndicator))===null||n===void 0?void 0:n.title)!==null&&o!==void 0?o:l.sortByIndicator})}else a.push({dimensionKey:l.sortField,isPivotCorner:!0,value:l.sortField});const h=l.sortType?l.sortType.toUpperCase():"ASC";this.pivotSortState.push({dimensions:a,order:gi[h]})}}_parseColumnWidthConfig(t){for(let e=0;e<(t==null?void 0:t.length);e++){const n=t[e],o=n.dimensions,r=n.width,s=this.getCellAddressByHeaderPaths(o);s&&!this.internalProps._widthResizedColMap.has(s.col)&&(this._setColWidth(s.col,r),this.internalProps._widthResizedColMap.add(s.col))}}updatePivotSortState(t){this.pivotSortState=t}sort(t,e,n){var o;let r;if(this.isCornerHeader(t,e)){const a=this.getHeaderDefine(t,e);r=[];const h={isPivotCorner:!0,dimensionKey:a.value,value:a.value};r.push(h)}else r=this.isColumnHeader(t,e)?this.getCellHeaderPaths(t,e).colHeaderPaths:this.getCellHeaderPaths(t,e).rowHeaderPaths;const s=r[r.length-1].indicatorKey,l=this.getHeaderDefine(t,e);if(l.sort){if(this.dataset.sortRules){const a={};for(let h=this.dataset.sortRules.length-1;h>=0;h--){const d=this.dataset.sortRules[h];l.dimensionKey&&d.sortField===l.dimensionKey?(a[d.sortField]=d,this.dataset.sortRules.splice(h,1)):s&&d.sortField===(this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1])&&this.dataset.sortRules.splice(h,1)}s?this.dataset.sortRules.push({sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:gi[n],sortByIndicator:s,query:r.reduce((h,d)=>(d.dimensionKey&&h.push(d.value),h),[])}):this.dataset.sortRules.push(Object.assign((o=a[l.dimensionKey])!==null&&o!==void 0?o:{},{sortField:l.dimensionKey,sortType:gi[n]}))}else this.dataset.sortRules=s?[{sortField:this.dataset.indicatorsAsCol?this.dataset.rows[this.dataset.rows.length-1]:this.dataset.columns[this.dataset.columns.length-1],sortType:gi[n],sortByIndicator:s,query:r.reduce((a,h)=>(h.dimensionKey&&a.push(h.value),a),[])}]:[{sortField:l.dimensionKey,sortType:gi[n]}];this.updateSortRules(this.dataset.sortRules,t,e)}}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const r=this.pivotSortState[o],s=r.dimensions,l=this.getCellAddressByHeaderPaths(s),a=r.order;if(l&&qi(n,l.col,l.row))return a}}_moveHeaderPosition(t,e){const n=this.getCellRange(t.col,t.row),o=this.getCellRange(e.col,e.row),r=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(r){if(r.moveType==="column"){if(this.internalProps.recordsIsTwoDimensionalArray)for(let s=0;s<this.internalProps.records.length;s++){const l=this.internalProps.records[s].splice(r.sourceIndex-this.rowHeaderLevelCount,r.sourceSize);l.unshift(r.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[s],l)}this.colWidthsMap.exchangeOrder(n.start.col,n.end.col-n.start.col+1,o.start.col,o.end.col-o.start.col+1,r.targetIndex),this.setMinMaxLimitWidth()}else if(r.moveType==="row"){if(this.internalProps.recordsIsTwoDimensionalArray){const s=this.internalProps.records.splice(r.sourceIndex-this.columnHeaderLevelCount,r.sourceSize);s.unshift(r.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,s)}r.targetIndex>r.sourceIndex?this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex+r.sourceSize-r.targetSize,r.targetSize,r.targetIndex):this.rowHeightsMap.exchangeOrder(r.sourceIndex,r.sourceSize,r.targetIndex,r.targetSize,r.targetIndex)}return r}return null}toggleHierarchyState(t,e,n=!0){const o=this.getHierarchyState(t,e);if(o===Vt.expand)this._refreshHierarchyState(t,e,n),this.fireListeners(lr.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Vt.collapse});else if(o===Vt.collapse){const r=this.internalProps.layoutMap.getHeadNode(t,e);Array.isArray(r.children)&&this._refreshHierarchyState(t,e,n),this.fireListeners(lr.TREE_HIERARCHY_STATE_CHANGE,{col:t,row:e,hierarchyState:Vt.expand,originData:r})}}_refreshHierarchyState(t,e,n=!0,o){let r=!1,s=!1;this.stateManager.updateHoverIcon(t,e,void 0,void 0);const l=this.internalProps.layoutMap.checkHasChart();l&&(this.autoFillWidth&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight));const a=this.internalProps.layoutMap.toggleHierarchyState(t,e);o&&o(),this.refreshRowColCount(),this.clearCellStyleCache(),this.scenegraph.updateHierarchyIcon(t,e),this.scenegraph.updateRow(a.removeCellPositions,a.addCellPositions,a.updateCellPositions,n),l&&(this.autoFillWidth&&!r&&(r=this.getAllColsWidth()<=this.tableNoFrameWidth),this.autoFillHeight&&!s&&(s=this.getAllRowsHeight()<=this.tableNoFrameHeight),(this.widthMode==="adaptive"||r||this.heightMode==="adaptive"||s)&&this.scenegraph.updateChartSizeForResizeColWidth(-1))}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}setRecords(t){var e,n,o,r,s;const l={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t,this.internalProps.recordsIsTwoDimensionalArray=!1,((e=t==null?void 0:t[0])===null||e===void 0?void 0:e.constructor)===Array&&(this.internalProps.recordsIsTwoDimensionalArray=!0);const a=this.options,h=this.internalProps;if(((n=this.options.customConfig)===null||n===void 0?void 0:n.enableDataAnalysis)===!1)this.internalProps.recordsIsTwoDimensionalArray===!1&&(this.flatDataToObjects=new mv({rows:h.layoutMap.fullRowDimensionKeys,columns:h.layoutMap.colDimensionKeys,indicators:h.layoutMap.indicatorKeys,indicatorsAsCol:h.layoutMap.indicatorsAsCol,indicatorDimensionKey:h.layoutMap.indicatorDimensionKey},t));else{let d,u;this.dataset.setRecords(t),d=a.columnTree?h.layoutMap.columnDimensionTree:new He((o=this.dataset.colHeaderTree)!==null&&o!==void 0?o:[],this.layoutNodeId),u=a.rowTree?h.layoutMap.rowDimensionTree:new He((r=this.dataset.rowHeaderTree)!==null&&r!==void 0?r:[],this.layoutNodeId,this.options.rowHierarchyType,this.options.rowHierarchyType==="tree"?(s=this.options.rowExpandLevel)!==null&&s!==void 0?s:1:void 0),h.layoutMap=new hr(this,this.dataset,d,u),this.pivotSortState=[],a.pivotSortState&&(this.pivotSortState=a.pivotSortState)}if(this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(l.col,l.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder(),this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const d=Et.getComponent("emptyTip");this.internalProps.emptyTip=new d(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}}startEditCell(t,e,n){var o;if(z(t)&&z(e))this.eventManager.isDraging=!1,this.selectCell(t,e),this.editorManager.startEditCell(t,e,n);else if(!((o=this.stateManager.select)===null||o===void 0)&&o.cellPos){const{col:r,row:s}=this.stateManager.select.cellPos;z(r)&&z(s)&&this.editorManager.startEditCell(r,s,n)}}completeEditCell(){this.editorManager.completeEdit()}getEditor(t,e){var n,o,r;let s;if(this.isCornerHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(n=l==null?void 0:l.headerEditor)!==null&&n!==void 0?n:this.options.headerEditor}else if(this.isHeader(t,e)){const l=this.getHeaderDefine(t,e);s=(o=l==null?void 0:l.headerEditor)!==null&&o!==void 0?o:this.options.headerEditor}else{const l=this.getBodyColumnDefine(t,e);s=(r=l==null?void 0:l.editor)!==null&&r!==void 0?r:this.options.editor}return typeof s=="function"&&(s=s({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),typeof s=="string"?aT(s):s}isHasEditorDefine(t,e){var n;const o=this.getBodyColumnDefine(t,e);let r=(n=o==null?void 0:o.editor)!==null&&n!==void 0?n:this.options.editor;return typeof r=="function"&&(r=r({col:t,row:e,dataValue:this.getCellOriginValue(t,e),value:this.getCellValue(t,e)||"",table:this})),z(r)}changeCellValue(t,e,n,o=!1){if(o&&this.isHasEditorDefine(t,e)||o===!1){let r=n;const s=this.getCellOriginValue(t,e),l=this.getCellRawValue(t,e);typeof l=="number"&&am(n)&&(r=parseFloat(n)),this._changeCellValueToDataSet(t,e,s,r);const a=this.getCellRange(t,e);for(let h=a.start.col;h<=a.end.col;h++)for(let d=a.start.row;d<=a.end.row;d++)this.scenegraph.updateCellContent(h,d);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else if(!this.internalProps._widthResizedColMap.has(t)){const h=this.getColWidth(t),d=Dr(t,0,this.rowCount-1,this,!1);d!==h&&this.scenegraph.updateColWidth(t,d-h)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.internalProps._heightResizedRowMap.size===0&&this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"&&!this.internalProps._heightResizedRowMap.has(e)){const h=this.getRowHeight(e),d=rn(e,0,this.colCount-1,this);this.scenegraph.updateRowHeight(e,d-h)}this.fireListeners(lt.CHANGE_CELL_VALUE,{col:t,row:e,rawValue:l,currentValue:s,changedValue:r}),this.scenegraph.updateNextFrame()}}changeCellValues(t,e,n,o=!1){let r=t,s=e;const l=[],a=[];for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){const c=n[u],g=[],f=[];l.push(g),a.push(f);for(let p=0;p<c.length&&!(t+p>this.colCount-1);p++){const m=this.getCellRawValue(t+p,e+u);g.push(m);const b=this.getCellOriginValue(t+p,e+u);f.push(b)}}for(let u=0;u<n.length&&!(e+u>this.rowCount-1);u++){s=e+u;const c=n[u];let g=t;for(let f=0;f<c.length&&!(t+f>this.colCount-1);f++)if(g=t+f,o&&this.isHasEditorDefine(t+f,e+u)||o===!1){const p=c[f];let m=p;const b=a[u][f],C=l[u][f];typeof C=="number"&&am(p)&&(m=parseFloat(p)),this._changeCellValueToDataSet(t+f,e+u,b,m),this.fireListeners(lt.CHANGE_CELL_VALUE,{col:t+f,row:e+u,rawValue:C,currentValue:b,changedValue:this.getCellOriginValue(t+f,e+u)})}r=Math.max(r,g)}const h=this.getCellRange(t,e),d=this.getCellRange(r,s);for(let u=h.start.col;u<=d.end.col;u++)for(let c=h.start.row;c<=d.end.row;c++)this.scenegraph.updateCellContent(u,c);if(this.widthMode==="adaptive"||this.autoFillWidth&&this.getAllColsWidth()<=this.tableNoFrameWidth)this.internalProps._widthResizedColMap.size===0&&this.scenegraph.recalculateColWidths();else for(let u=t;u<=d.end.col;u++)if(!this.internalProps._widthResizedColMap.has(u)){const c=this.getColWidth(u),g=Dr(u,0,this.rowCount-1,this,!1);g!==c&&this.scenegraph.updateColWidth(u,g-c)}if(this.heightMode==="adaptive"||this.autoFillHeight&&this.getAllRowsHeight()<=this.tableNoFrameHeight)this.scenegraph.recalculateRowHeights();else if(this.heightMode==="autoHeight"){const u=[],c=[];for(let g=e;g<=d.end.row;g++)if(this.rowHeightsMap.get(g)){const f=this.getRowHeight(g),p=rn(g,0,this.colCount-1,this);u.push(g),c.push(p-f)}this.scenegraph.updateRowsHeight(u,c)}this.scenegraph.updateNextFrame()}_changeCellValueToDataSet(t,e,n,o){var r,s,l,a,h,d,u,c;if(this.internalProps.recordsIsTwoDimensionalArray){const g=this.getBodyIndexByRow(e),f=this.getBodyIndexByCol(t);this.records[g][f]=o}else if(this.dataset){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isCornerHeader(t,e))this.internalProps.layoutMap.changeCornerTitle(t,e,o);else if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.dataset.changeRecordFieldValue(!((r=g.colHeaderPaths)===null||r===void 0)&&r.length?(s=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&s!==void 0?s:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(l=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&l!==void 0?l:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=(a=g.colHeaderPaths)===null||a===void 0?void 0:a.filter(m=>!m.virtual).map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),p=(h=g.rowHeaderPaths)===null||h===void 0?void 0:h.filter(m=>!m.virtual).map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value});this.dataset.changeTreeNodeValue(this.internalProps.layoutMap.indicatorsAsCol?p:p.slice(0,-1),this.internalProps.layoutMap.indicatorsAsCol?f.slice(0,-1):f,this.internalProps.layoutMap.getIndicatorKey(t,e),o)}}else if(this.flatDataToObjects){const g=this.internalProps.layoutMap.getCellHeaderPaths(t,e);if(this.isHeader(t,e))this.internalProps.layoutMap.changeTreeNodeTitle(t,e,o),!this.isCornerHeader(t,e)&&this.flatDataToObjects.changeRecordFieldValue(!((d=g.colHeaderPaths)===null||d===void 0)&&d.length?(u=g.colHeaderPaths[g.colHeaderPaths.length-1].indicatorKey)!==null&&u!==void 0?u:g.colHeaderPaths[g.colHeaderPaths.length-1].dimensionKey:(c=g.rowHeaderPaths[g.rowHeaderPaths.length-1].indicatorKey)!==null&&c!==void 0?c:g.rowHeaderPaths[g.rowHeaderPaths.length-1].dimensionKey,n,o);else{const f=g.colHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value}),p=g.rowHeaderPaths.map(m=>{var b;return(b=m.indicatorKey)!==null&&b!==void 0?b:m.value});this.flatDataToObjects.changeTreeNodeValue(p,f,this.internalProps.layoutMap.getBody(t,e).indicatorKey,o)}}}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}setTreeNodeChildren(t,e,n,o){this.flatDataToObjects?(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.flatDataToObjects.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys,indicators:this.internalProps.layoutMap.indicatorKeys,indicatorsAsCol:this.internalProps.layoutMap.indicatorsAsCol,indicatorDimensionKey:this.internalProps.layoutMap.indicatorDimensionKey}),this.flatDataToObjects.addRecords(e)})):(this.internalProps.layoutMap.getHeadNode(n,o).children=t,this._refreshHierarchyState(n,o,!0,()=>{this.dataset._rowTreeHasChanged(),this.dataset.changeDataConfig({rows:this.internalProps.layoutMap.fullRowDimensionKeys,columns:this.internalProps.layoutMap.colDimensionKeys}),this.dataset.addRecords(e)}))}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),this.renderWithRecreateCells()}getFilteredRecords(){var t;return(t=this.dataset)===null||t===void 0?void 0:t.filterRules}};Pg(),Hg(),Eg(),Lg(),kg(),Fg(),Ig(),Dg(),Og(),zg(),Ng(),Wg(),Dl(),Vg();class LT extends ET{}Dl();class U9 extends ET{}Pg(),Hg(),Eg(),Lg(),kg(),Fg(),Ig(),Dg(),Og(),zg(),Ng(),Wg(),Dl(),Vg();let K9=class extends _g{constructor(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w;let y,S;le.mode==="node"?(e=t,t=null):t instanceof HTMLElement||(e=t,t=t.container?t.container:null),super(t,e),this.layoutNodeId={seqId:0},this._selectedDataItemsInChart=[],this._selectedDimensionInChart=[],this._chartEventMap={},e.layout&&Object.assign(e,e.layout),this.internalProps.columns=Le(e.columns),this.internalProps.rows=Le(e.rows),this.internalProps.indicators=go(e.indicators),this.internalProps.columnTree=!e.indicatorsAsCol||!((n=e.columns)===null||n===void 0)&&n.length||e.columnTree?Le(e.columnTree):[],this.internalProps.rowTree=e.indicatorsAsCol||!((o=e.rows)===null||o===void 0)&&o.length||e.rowTree?Le(e.rowTree):[],this.internalProps.records=e.records,this.setCustomStateNameToSpec(),this.internalProps.columnResizeType=(r=e.columnResizeType)!==null&&r!==void 0?r:"column",this.internalProps.rowResizeType=(s=e.rowResizeType)!==null&&s!==void 0?s:"row",this.internalProps.dataConfig={isPivotChart:!0},this._axes=st(e.axes)?e.axes:[],e.columnTree&&(e.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Vi(this.internalProps.columnTree,e.indicators)),y=new He((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),e.rowTree&&(e.indicatorsAsCol===!1&&(this.internalProps.rowTree=Vi(this.internalProps.rowTree,e.indicators)),S=new He((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const R=!((h=S==null?void 0:S.dimensionKeys)===null||h===void 0)&&h.count?S.dimensionKeys.valueArr():(u=(d=e.rows)===null||d===void 0?void 0:d.reduce((T,M)=>(typeof M=="string"?T.push(M):T.push(M.dimensionKey),T),[]))!==null&&u!==void 0?u:[],A=!((c=y==null?void 0:y.dimensionKeys)===null||c===void 0)&&c.count?y.dimensionKeys.valueArr():(f=(g=e.columns)===null||g===void 0?void 0:g.reduce((T,M)=>(typeof M=="string"?T.push(M):T.push(M.dimensionKey),T),[]))!==null&&f!==void 0?f:[],x=(m=(p=e.indicators)===null||p===void 0?void 0:p.reduce((T,M)=>(typeof M=="string"?T.push(M):T.push(M.indicatorKey),T),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(A,R),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new Oh(this.internalProps.dataConfig,R,A,x,this.internalProps.indicators,(b=e.indicatorsAsCol)===null||b===void 0||b,e.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&Fh(this.internalProps.indicators)){const T=M=>{M.forEach(B=>{var P;!((P=B.children)===null||P===void 0)&&P.length?T(B.children):B.children=[{dimensionKey:"axis",value:""}]})};!((C=this.dataset.rowHeaderTree)===null||C===void 0)&&C.length?T(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(e.columnTree||e.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,e.indicators)),e.rowTree||e.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,e.indicators)),y=new He((_=this.dataset.colHeaderTree)!==null&&_!==void 0?_:[],this.layoutNodeId),S=new He((w=this.dataset.rowHeaderTree)!==null&&w!==void 0?w:[],this.layoutNodeId),this.internalProps.layoutMap=new hr(this,this.dataset,y,S),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.createSceneGraph(),e.title){const T=Et.getComponent("title");this.internalProps.title=new T(e.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const T=Et.getComponent("emptyTip");this.internalProps.emptyTip=new T(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}setTimeout(()=>{this.fireListeners(lt.INITIALIZED,null)},0)}static get EVENT_TYPE(){return TR}get pivotChartAxes(){return this._axes}get recordsCount(){var t;return(t=this.records)===null||t===void 0?void 0:t.length}isListTable(){return!1}isPivotTable(){return!0}isPivotChart(){return!0}_canResizeColumn(t,e){const n=super._canResizeColumn(t,e);if(n&&!this.internalProps.layoutMap.indicatorsAsCol){const o=this.internalProps.layoutMap.getBody(t,this.columnHeaderLevelCount);if(o!=null&&o.disableColumnResize)return!1}return n}updateOption(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y;const S=this.internalProps;let R,A;super.updateOption(t),this.layoutNodeId={seqId:0},this.internalProps.columns=Le(t.columns),this.internalProps.rows=Le(t.rows),this.internalProps.indicators=!((e=t.indicators)===null||e===void 0)&&e.length?go(t.indicators):[],this.internalProps.columnTree=!t.indicatorsAsCol||!((n=t.columns)===null||n===void 0)&&n.length||t.columnTree?Le(t.columnTree):[],this.internalProps.rowTree=t.indicatorsAsCol||!((o=t.rows)===null||o===void 0)&&o.length||t.rowTree?Le(t.rowTree):[],t.records&&(this.internalProps.records=t.records),this.setCustomStateNameToSpec(),this._selectedDataItemsInChart=[],S.columnResizeType=(r=t.columnResizeType)!==null&&r!==void 0?r:"column",S.rowResizeType=(s=t.rowResizeType)!==null&&s!==void 0?s:"row",S.dataConfig={isPivotChart:!0},this._axes=st(t.axes)?t.axes:[],t.columnTree&&(t.indicatorsAsCol!==!1&&(this.internalProps.columnTree=Vi(this.internalProps.columnTree,t.indicators)),R=new He((l=this.internalProps.columnTree)!==null&&l!==void 0?l:[],this.layoutNodeId)),t.rowTree&&(t.indicatorsAsCol===!1&&(this.internalProps.rowTree=Vi(this.internalProps.rowTree,t.indicators)),A=new He((a=this.internalProps.rowTree)!==null&&a!==void 0?a:[],this.layoutNodeId));const x=!((h=A==null?void 0:A.dimensionKeys)===null||h===void 0)&&h.count?A.dimensionKeys.valueArr():(u=(d=t.rows)===null||d===void 0?void 0:d.reduce((B,P)=>(typeof P=="string"?B.push(P):B.push(P.dimensionKey),B),[]))!==null&&u!==void 0?u:[],T=!((c=R==null?void 0:R.dimensionKeys)===null||c===void 0)&&c.count?R.dimensionKeys.valueArr():(f=(g=t.columns)===null||g===void 0?void 0:g.reduce((B,P)=>(typeof P=="string"?B.push(P):B.push(P.dimensionKey),B),[]))!==null&&f!==void 0?f:[],M=(m=(p=t.indicators)===null||p===void 0?void 0:p.reduce((B,P)=>(typeof P=="string"?B.push(P):B.push(P.indicatorKey),B),[]))!==null&&m!==void 0?m:[];if(this.internalProps.dataConfig.collectValuesBy=this._generateCollectValuesConfig(T,x),this.internalProps.dataConfig.aggregationRules=this._generateAggregationRules(),this.internalProps.dataConfig.dimensionSortArray=this._getDimensionSortArray(),this.dataset=new Oh(this.internalProps.dataConfig,x,T,M,this.internalProps.indicators,(b=t.indicatorsAsCol)===null||b===void 0||b,(C=t.records)!==null&&C!==void 0?C:this.internalProps.records,void 0,this.internalProps.columnTree,this.internalProps.rowTree,!0),this.options.indicatorsAsCol&&Fh(this.internalProps.indicators)){const B=P=>{P.forEach(F=>{var H;!((H=F.children)===null||H===void 0)&&H.length?B(F.children):F.children=[{dimensionKey:"axis",value:""}]})};!((_=this.dataset.rowHeaderTree)===null||_===void 0)&&_.length?B(this.dataset.rowHeaderTree):this.dataset.rowHeaderTree=[{dimensionKey:"axis",value:""}]}if(t.columnTree||t.indicatorsAsCol!==!1&&(this.dataset.colHeaderTree=Vi(this.dataset.colHeaderTree,t.indicators)),t.rowTree||t.indicatorsAsCol===!1&&(this.dataset.rowHeaderTree=Vi(this.dataset.rowHeaderTree,t.indicators)),R=new He((w=this.dataset.colHeaderTree)!==null&&w!==void 0?w:[],this.layoutNodeId),A=new He((y=this.dataset.rowHeaderTree)!==null&&y!==void 0?y:[],this.layoutNodeId),S.layoutMap=new hr(this,this.dataset,R,A),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,S.releaseList&&(S.releaseList.forEach(B=>{var P;return(P=B==null?void 0:B.release)===null||P===void 0?void 0:P.call(B)}),S.releaseList=null),this.scenegraph.clearCells(),this.scenegraph.createSceneGraph(),t.title){const B=Et.getComponent("title");this.internalProps.title=new B(t.title,this),this.scenegraph.resize()}if(this.options.emptyTip)if(this.internalProps.emptyTip)this.internalProps.emptyTip.resetVisible();else{const B=Et.getComponent("emptyTip");this.internalProps.emptyTip=new B(this.options.emptyTip,this),this.internalProps.emptyTip.resetVisible()}return new Promise(B=>{setTimeout(B,0)})}updatePagination(){}refreshHeader(){this.setMinMaxLimitWidth(!0),this.refreshRowColCount()}refreshRowColCount(){var t,e,n,o,r,s,l,a;const h=this,{layoutMap:d}=h.internalProps;d&&(h.colCount=(t=d.colCount)!==null&&t!==void 0?t:0,h.rowCount=(e=d.rowCount)!==null&&e!==void 0?e:0,h.internalProps.frozenColCount=(n=d.rowHeaderLevelCount)!==null&&n!==void 0?n:0,h.frozenRowCount=Math.max(d.headerLevelCount,(o=this.options.frozenRowCount)!==null&&o!==void 0?o:0),h.bottomFrozenRowCount!==((r=d==null?void 0:d.bottomFrozenRowCount)!==null&&r!==void 0?r:0)&&(h.bottomFrozenRowCount=(s=d==null?void 0:d.bottomFrozenRowCount)!==null&&s!==void 0?s:0),h.rightFrozenColCount!==((l=d==null?void 0:d.rightFrozenColCount)!==null&&l!==void 0?l:0)&&(h.rightFrozenColCount=(a=d==null?void 0:d.rightFrozenColCount)!==null&&a!==void 0?a:0),this.stateManager.setFrozenCol(this.internalProps.frozenColCount))}_getSortFuncFromHeaderOption(t,e,n){}syncHierarchyState(t,e){var n,o;t.value===e.value&&t.dimensionKey===e.dimensionKey&&(e.hierarchyState=(n=e.hierarchyState)!==null&&n!==void 0?n:e!=null&&e.children?t.hierarchyState:void 0,(o=e==null?void 0:e.children)===null||o===void 0||o.forEach((r,s)=>{var l;!((l=t==null?void 0:t.children)===null||l===void 0)&&l[s]&&r&&this.syncHierarchyState(t.children[s],r)}))}getRecordShowIndexByCell(t,e){}getTableIndexByRecordIndex(t){}getTableIndexByField(t){}getCellAddrByFieldRecord(t,e){}getBodyIndexByRow(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByRow(t)}getBodyIndexByCol(t){const{layoutMap:e}=this.internalProps;return e.getBodyIndexByCol(t)}getCellValue(t,e,n){var o,r,s;if(!n){const u=this.getCustomMergeValue(t,e);if(u)return u}if(this.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const g=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let f;return g==null||g.forEach(p=>{const m=this.internalProps.layoutMap.getIndicatorInfo(p);m&&(f=m)}),(r=(o=f==null?void 0:f.title)!==null&&o!==void 0?o:f==null?void 0:f.indicatorKey)!==null&&r!==void 0?r:""}const{title:u,fieldFormat:c}=this.internalProps.layoutMap.getHeader(t,e);return typeof c=="function"?c(u,t,e,this):u}if(this.dataset){let u;const c=this.internalProps.layoutMap.getCellHeaderPaths(t,e),g=c.colHeaderPaths.map((m,b)=>{var C;return m.indicatorKey&&(u={position:"col",index:b}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),f=c.rowHeaderPaths.map((m,b)=>{var C;return m.indicatorKey&&(u={position:"row",index:b}),(C=m.indicatorKey)!==null&&C!==void 0?C:m.value}),p=this.dataset.getAggregator(f,g,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,u);return p.value?p.value():void 0}const{fieldFormat:l}=this.internalProps.layoutMap.getBody(t,e),a=this.getBodyIndexByRow(e),h=this.getBodyIndexByCol(t),d=(s=this.records[a])===null||s===void 0?void 0:s[h];return typeof l=="function"?l(d,t,e,this):d}getCellOriginValue(t,e){var n,o,r;const s=this;if(s.internalProps.layoutMap.isHeader(t,e)){if(this.internalProps.layoutMap.isBottomFrozenRow(t,e)||this.internalProps.layoutMap.isRightFrozenColumn(t,e)){const d=this.internalProps.layoutMap.getIndicatorKeyInChartSpec(t,e);let u;return d==null||d.forEach(c=>{const g=this.internalProps.layoutMap.getIndicatorInfo(c);g&&(u=g)}),(o=(n=u==null?void 0:u.title)!==null&&n!==void 0?n:u==null?void 0:u.indicatorKey)!==null&&o!==void 0?o:""}const{title:h}=s.internalProps.layoutMap.getHeader(t,e);return typeof h=="function"?h():h}if(this.dataset){let h;const d=this.internalProps.layoutMap.getCellHeaderPaths(t,e),u=d.colHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"col",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),c=d.rowHeaderPaths.map((f,p)=>{var m;return f.indicatorKey&&(h={position:"row",index:p}),(m=f.indicatorKey)!==null&&m!==void 0?m:f.value}),g=this.dataset.getAggregator(c,u,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,h);return g.value?g.value():void 0}const l=this.getBodyIndexByRow(e),a=this.getBodyIndexByCol(t);return(r=this.records[l])===null||r===void 0?void 0:r[a]}getCellRawValue(t,e){return this.getCellOriginValue(t,e)}getCellOriginRecord(t,e){if(!this.internalProps.layoutMap.isHeader(t,e)&&this.dataset){let n;const o=this.internalProps.layoutMap.getCellHeaderPaths(t,e),r=o.colHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"col",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value}),s=o.rowHeaderPaths.map((l,a)=>{var h;return l.indicatorKey&&(n={position:"row",index:a}),(h=l.indicatorKey)!==null&&h!==void 0?h:l.value});return this.dataset.getAggregator(s,r,this.internalProps.layoutMap.getIndicatorKey(t,e),!0,n).records}}getCellRawRecord(t,e){return this.getCellOriginRecord(t,e)}getPivotSortState(t,e){if(!this.pivotSortState)return;const n=this.getCellRange(t,e);for(let o=0;o<this.pivotSortState.length;o++){const{col:r,row:s,order:l}=this.pivotSortState[o];if(qi(n,r,s))return l}}_moveHeaderPosition(t,e){var n,o,r,s;const l=this.internalProps.layoutMap.moveHeaderPosition(t,e);if(l){if(l.moveType==="column"){if(((o=(n=this.options.records)===null||n===void 0?void 0:n[0])===null||o===void 0?void 0:o.constructor)===Array)for(let a=0;a<this.internalProps.records.length;a++){const h=this.internalProps.records[a].splice(l.sourceIndex-this.rowHeaderLevelCount,l.sourceSize);h.unshift(l.targetIndex-this.rowHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records[a],h)}this.colWidthsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize),this.setMinMaxLimitWidth()}else if(l.moveType==="row"){if(((s=(r=this.options.records)===null||r===void 0?void 0:r[0])===null||s===void 0?void 0:s.constructor)===Array){const a=this.internalProps.records.splice(l.sourceIndex-this.columnHeaderLevelCount,l.sourceSize);a.unshift(l.targetIndex-this.columnHeaderLevelCount,0),Array.prototype.splice.apply(this.internalProps.records,a)}this.rowHeightsMap.adjustOrder(l.sourceIndex,l.targetIndex,l.sourceSize)}return l}return null}toggleHierarchyState(t,e,n=!0){}getHeaderCellAddressByPath(t){return this.internalProps.layoutMap.getPivotCellAdress(t)}getCellAddressByHeaderPaths(t){return this.internalProps.layoutMap.getCellAdressByHeaderPath(t)}getHeaderPathByXY(t){let e;return e=t?this.getCellAt(t.x+this.getFrozenColsWidth()+this.scrollLeft+1,t.y+this.getFrozenRowsHeight()+this.scrollTop+1):this.getCellAt(this.getFrozenColsWidth()+this.scrollLeft+1,this.getFrozenRowsHeight()+this.scrollTop+1),this.internalProps.layoutMap.getCellHeaderPaths(e.col,e.row)}getHierarchyState(t,e){var n;return(n=this._getHeaderLayoutMap(t,e))===null||n===void 0?void 0:n.hierarchyState}_hasHierarchyTreeHeader(){return this.internalProps.layoutMap.rowHierarchyType==="tree"}getMenuInfo(t,e,n){const o=this.internalProps.layoutMap.getPivotDimensionInfo(t,e);return{dimensionKey:o[o.length-1].dimensionKey,value:this.getCellValue(t,e),cellLocation:this.getCellLocation(t,e),isPivotCorner:this.isCornerHeader(t,e),event:void 0}}_generateCollectValuesConfig(t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_;t=t.filter(S=>S!==Zi),e=e.filter(S=>S!==Zi);const w=this.internalProps.indicators,y={};for(let S=0,R=w==null?void 0:w.length;S<R;S++)if(typeof w[S]!="string"&&w[S].chartSpec){if(((n=w[S].chartSpec)===null||n===void 0?void 0:n.type)==="pie"||((o=w[S].chartSpec)===null||o===void 0?void 0:o.type)==="rose"||((r=w[S].chartSpec)===null||r===void 0?void 0:r.type)==="radar"||((s=w[S].chartSpec)===null||s===void 0?void 0:s.type)==="gauge"||((l=w[S].chartSpec)===null||l===void 0?void 0:l.type)==="wordCloud")continue;const A=w[S],x=A.chartSpec;if(this.options.indicatorsAsCol===!1)if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[A.indicatorKey]={by:e,range:!0,sumBy:(x==null?void 0:x.stack)&&t.concat(x==null?void 0:x.xField)},x.series)x.series.forEach(T=>{var M,B,P,F,H,E,k,I,L,D,O,W,N,$;const U=typeof T.xField=="string"?T.xField:T.xField[0];y[U]={by:t,type:T.direction!=="horizontal"?"xField":void 0,range:Ms(T,this._axes,T.direction==="horizontal",!0),sortBy:T.direction!=="horizontal"?(F=(P=(B=(M=T==null?void 0:T.data)===null||M===void 0?void 0:M.fields)===null||B===void 0?void 0:B[U])===null||P===void 0?void 0:P.domain)!==null&&F!==void 0?F:(k=(E=(H=x==null?void 0:x.data)===null||H===void 0?void 0:H.fields)===null||E===void 0?void 0:E[U])===null||k===void 0?void 0:k.domain:void 0};const Y=T.yField;T.stack!==!1&&(T.type==="bar"||T.type==="area")&&(T.stack=!0),y[Y]={by:e,range:Ms(T,this._axes,T.direction==="horizontal",!1),sumBy:T.stack&&t.concat(T==null?void 0:T.xField),sortBy:T.direction==="horizontal"?(O=(D=(L=(I=T==null?void 0:T.data)===null||I===void 0?void 0:I.fields)===null||L===void 0?void 0:L[Y])===null||D===void 0?void 0:D.domain)!==null&&O!==void 0?O:($=(N=(W=x==null?void 0:x.data)===null||W===void 0?void 0:W.fields)===null||N===void 0?void 0:N[Y])===null||$===void 0?void 0:$.domain:void 0,extendRange:Mc(x.markLine)}});else{const T=typeof x.xField=="string"?x.xField:x.xField[0];y[T]={by:t,type:x.direction!=="horizontal"?"xField":void 0,range:Ms(x,this._axes,x.direction==="horizontal",!0),sortBy:x.direction!=="horizontal"?(d=(h=(a=x==null?void 0:x.data)===null||a===void 0?void 0:a.fields)===null||h===void 0?void 0:h[T])===null||d===void 0?void 0:d.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const M=x.yField;y[M]={by:e,range:x.direction!=="horizontal",sumBy:x.stack&&t.concat(x==null?void 0:x.xField),sortBy:x.direction==="horizontal"?(g=(c=(u=x==null?void 0:x.data)===null||u===void 0?void 0:u.fields)===null||c===void 0?void 0:c[M])===null||g===void 0?void 0:g.domain:void 0,extendRange:Mc(x.markLine)}}else{const T=w[S];if((x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0),y[T.indicatorKey]={by:t,range:!0,sumBy:(x==null?void 0:x.stack)&&e.concat(x==null?void 0:x.yField)},x.series)x.series.forEach(M=>{var B,P,F,H,E,k,I,L,D,O,W,N,$,U;const Y=typeof M.yField=="string"?M.yField:M.yField[0];y[Y]={by:e,type:M.direction==="horizontal"?"yField":void 0,range:Ms(M,this._axes,M.direction==="horizontal",!1),sortBy:M.direction==="horizontal"?(H=(F=(P=(B=M==null?void 0:M.data)===null||B===void 0?void 0:B.fields)===null||P===void 0?void 0:P[Y])===null||F===void 0?void 0:F.domain)!==null&&H!==void 0?H:(I=(k=(E=x==null?void 0:x.data)===null||E===void 0?void 0:E.fields)===null||k===void 0?void 0:k[Y])===null||I===void 0?void 0:I.domain:void 0};const j=M.xField;M.stack!==!1&&(M.type==="bar"||M.type==="area")&&(M.stack=!0),y[j]={by:t,range:Ms(M,this._axes,M.direction==="horizontal",!0),sumBy:M.stack&&e.concat(M==null?void 0:M.yField),sortBy:M.direction!=="horizontal"?(W=(O=(D=(L=M==null?void 0:M.data)===null||L===void 0?void 0:L.fields)===null||D===void 0?void 0:D[j])===null||O===void 0?void 0:O.domain)!==null&&W!==void 0?W:(U=($=(N=x==null?void 0:x.data)===null||N===void 0?void 0:N.fields)===null||$===void 0?void 0:$[j])===null||U===void 0?void 0:U.domain:void 0,extendRange:Mc(x.markLine)}});else{const M=typeof x.yField=="string"?x.yField:x.yField[0];y[M]={by:e,type:x.direction==="horizontal"?"yField":void 0,range:Ms(x,this._axes,x.direction==="horizontal",!1),sortBy:x.direction==="horizontal"?(m=(p=(f=x==null?void 0:x.data)===null||f===void 0?void 0:f.fields)===null||p===void 0?void 0:p[M])===null||m===void 0?void 0:m.domain:void 0},(x==null?void 0:x.stack)!==!1&&((x==null?void 0:x.type)==="bar"||(x==null?void 0:x.type)==="area")&&(x.stack=!0);const B=x.xField;y[B]={by:t,range:Ms(x,this._axes,x.direction==="horizontal",!0),sumBy:x.stack&&e.concat(x==null?void 0:x.yField),sortBy:x.direction!=="horizontal"?(_=(C=(b=x==null?void 0:x.data)===null||b===void 0?void 0:b.fields)===null||C===void 0?void 0:C[B])===null||_===void 0?void 0:_.domain:void 0,extendRange:Mc(x.markLine)}}}}return y}_generateAggregationRules(){var t;const e=[];return(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:zt.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=this.options.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:zt.RECORD})}else{const s=this.options.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:zt.RECORD})}}),e}setCustomStateNameToSpec(){var t;const e=n=>{var o,r,s,l,a,h,d,u,c,g;!((r=(o=n.bar)===null||o===void 0?void 0:o.state)===null||r===void 0)&&r.selected&&(n.bar.state.vtable_selected=n.bar.state.selected,n.bar.state.vtable_selected_reverse=n.bar.state.selected_reverse,delete n.bar.state.selected,delete n.bar.state.selected_reverse),!((l=(s=n.point)===null||s===void 0?void 0:s.state)===null||l===void 0)&&l.selected&&(n.point.state.vtable_selected=n.point.state.selected,n.point.state.vtable_selected_reverse=n.point.state.selected_reverse,delete n.point.state.selected,delete n.point.state.selected_reverse),!((h=(a=n.line)===null||a===void 0?void 0:a.state)===null||h===void 0)&&h.selected&&(n.line.state.vtable_selected=n.line.state.selected,n.line.state.vtable_selected_reverse=n.line.state.selected_reverse,delete n.line.state.selected,delete n.line.state.selected_reverse),!((u=(d=n.area)===null||d===void 0?void 0:d.state)===null||u===void 0)&&u.selected&&(n.area.state.vtable_selected=n.area.state.selected,n.area.state.vtable_selected_reverse=n.area.state.selected_reverse,delete n.area.state.selected,delete n.area.state.selected_reverse),!((g=(c=n.pie)===null||c===void 0?void 0:c.state)===null||g===void 0)&&g.selected&&(n.pie.state.vtable_selected=n.pie.state.selected,n.pie.state.vtable_selected_reverse=n.pie.state.selected_reverse,delete n.pie.state.selected,delete n.pie.state.selected_reverse)};(t=this.internalProps.indicators)===null||t===void 0||t.forEach(n=>{if(n.chartSpec){const o=n.chartSpec;o.series?o.series.forEach(r=>{e(r)}):e(o)}})}updateFilterRules(t){this.internalProps.dataConfig.filterRules=t,this.dataset.updateFilterRules(t),Bh(this.scenegraph),IW(this.scenegraph),this.render()}clearChartCacheImage(t,e){pt(t)&&pt(e)?FW(t,e,this.scenegraph):Bh(this.scenegraph)}getLegendSelected(){var t;const e=[];return(t=this.internalProps.legends)===null||t===void 0||t.forEach(n=>{const o=n.legendComponent._getSelectedLegends().map(r=>r.label);e.push(...o)}),e}setLegendSelected(t){var e;(e=this.internalProps.legends)===null||e===void 0||e.forEach(n=>{n.legendComponent.setSelected(t)})}getChartDatumPosition(t,e){const{chartInstance:n,bounds:o}=this.getChartInstance(e);if(n){const r=n.convertDatumToPosition(t);return r?{x:Math.round(r.x+o.x1),y:Math.round(r.y+o.y1)}:null}return null}getCellAddressByRecord(t){const e=[],n=[],o={},r=[];this.dataset.dataConfig.aggregationRules.forEach(s=>{if(typeof s.field=="string")o[s.field]=s.indicatorKey,r.push(s.field);else for(let l=0;l<s.field.length;l++)o[s.field[l]]=s.indicatorKey,r.push(s.field[l])});for(const s in t)this.dataset.rows.indexOf(s)>=0&&e.push({dimensionKey:s,value:t[s]}),this.dataset.columns.indexOf(s)>=0&&n.push({dimensionKey:s,value:t[s]}),r.indexOf(s)>=0&&(this.dataset.indicatorsAsCol?n.push({indicatorKey:o[s]}):e.push({indicatorKey:o[s]}));return this.getCellAddressByHeaderPaths({rowHeaderPaths:e,colHeaderPaths:n,cellLocation:"body"})}getChartInstance(t){var e,n,o,r,s;const l=this.getCellAddressByHeaderPaths(t);if(l){const a=this.getCellRelativeRect(l.col,l.row),h=this.scenegraph.getCell(l.col,l.row);let d;const u=(e=h==null?void 0:h.getChildren())===null||e===void 0?void 0:e[0];if(u.attribute.chartInstance){d=u.attribute.chartInstance;const{dataId:c,data:g,axes:f,spec:p}=u.attribute,m=u.getViewBox();if(f==null||f.forEach((b,C)=>{var _,w,y,S;b.type==="linear"?d.updateModelSpecSync({type:"axes",index:C},{min:(w=(_=b.range)===null||_===void 0?void 0:_.min)!==null&&w!==void 0?w:0,max:(S=(y=b.range)===null||y===void 0?void 0:y.max)!==null&&S!==void 0?S:0},!0):b.type==="band"&&d.updateModelSpec({type:"axes",index:C},{domain:b.domain.slice(0)},!0)}),d.updateViewBox({x1:m.x1-u.getRootNode().table.scrollLeft,x2:m.x2-u.getRootNode().table.scrollLeft,y1:m.y1-u.getRootNode().table.scrollTop,y2:m.y2-u.getRootNode().table.scrollTop},!1,!1),typeof c=="string")d.updateDataSync(c,g??[]);else{const b=[];for(const C in c){const _=c[C],w=p.series.find(y=>{var S;return((S=y==null?void 0:y.data)===null||S===void 0?void 0:S.id)===C});b.push({id:C,values:_?(n=g==null?void 0:g.filter(y=>y.hasOwnProperty(_)))!==null&&n!==void 0?n:[]:g??[],fields:(o=w==null?void 0:w.data)===null||o===void 0?void 0:o.fields}),d.updateFullDataSync||d.updateDataSync(C,_?(r=g==null?void 0:g.filter(y=>y.hasOwnProperty(_)))!==null&&r!==void 0?r:[]:g??[])}(s=d.updateFullDataSync)===null||s===void 0||s.call(d,b)}this.renderAsync()}return{chartInstance:d,bounds:a.bounds}}return{}}_getDimensionSortArray(){var t,e;if(!((e=(t=this.options)===null||t===void 0?void 0:t.axes)===null||e===void 0)&&e.length){const n=this.options.indicatorsAsCol?"left":"bottom",o=this.options.axes.find(r=>r.orient===n);if(o&&st(o.domain))return o.domain}}setRecords(t){var e,n;const o={col:this.stateManager.hover.cellPos.col,row:this.stateManager.hover.cellPos.row};this.options.records=this.internalProps.records=t;const r=this.options,s=this.internalProps;let l,a;this.dataset.setRecords(t),l=r.columnTree?s.layoutMap.columnDimensionTree:new He((e=this.dataset.colHeaderTree)!==null&&e!==void 0?e:[],this.layoutNodeId),a=r.rowTree?s.layoutMap.rowDimensionTree:new He((n=this.dataset.rowHeaderTree)!==null&&n!==void 0?n:[],this.layoutNodeId),s.layoutMap=new hr(this,this.dataset,l,a),this.refreshHeader(),this.internalProps.useOneRowHeightFillAll=!1,this.scenegraph.clearCells(),this.clearCellStyleCache(),this.scenegraph.createSceneGraph(),this.stateManager.updateHoverPos(o.col,o.row),this.internalProps.title&&!this.internalProps.title.isReleased&&(this._updateSize(),this.internalProps.title.resize(),this.scenegraph.resize()),this.eventManager.updateEventBinder()}_hasCustomRenderOrLayout(){if(this.options.customRender)return!0;const{columnsDefine:t,rowsDefine:e,indicatorsDefine:n}=this.internalProps.layoutMap;for(let o=0;o<t.length;o++){const r=t[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<e.length;o++){const r=e[o];if(typeof r!="string"&&(r.headerCustomLayout||r.headerCustomRender))return!0}for(let o=0;o<n.length;o++){const r=n[o];if(typeof r!="string"&&(r.customLayout||r.headerCustomLayout||r.customRender||r.headerCustomRender))return!0}return!1}changeRecordOrder(t,e){}getLayoutColumnTree(){return this.internalProps.layoutMap.getLayoutColumnTree()}getLayoutColumnTreeCount(){return this.internalProps.layoutMap.getLayoutColumnTreeCount()}getLayoutRowTree(){return this.internalProps.layoutMap.getLayoutRowTree()}getLayoutRowTreeCount(){return this.internalProps.layoutMap.getLayoutRowTreeCount()}getCellHeaderTreeNodes(t,e){return this.internalProps.layoutMap.getCellHeaderPathsWithTreeNode(t,e)}};class Y9 extends Zp{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class kT extends fn{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g,f,p;t.direction&&(t.flexDirection=t.direction),!t.justifyContent||t.justifyContent!=="start"&&t.justifyContent!=="end"||(t.justifyContent="flex-"+t.justifyContent),!t.alignItems||t.alignItems!=="start"&&t.alignItems!=="end"||(t.alignItems="flex-"+t.alignItems),!t.alignContent||t.alignContent!=="start"&&t.alignContent!=="end"||(t.alignContent="flex-"+t.alignContent),t.display="flex",t.flexDirection||(t.flexDirection="row"),t.clip=!0,t.fill=(e=t==null?void 0:t.background)===null||e===void 0?void 0:e.fill,t.stroke=(n=t==null?void 0:t.background)===null||n===void 0?void 0:n.stroke,t.lineWidth=(o=t==null?void 0:t.background)===null||o===void 0?void 0:o.lineWidth,t.cornerRadius=(r=t==null?void 0:t.background)===null||r===void 0?void 0:r.cornerRadius;const m=st(t.boundsPadding),b=[(l=(s=t.marginTop)!==null&&s!==void 0?s:m?t.boundsPadding[0]:t.boundsPadding)!==null&&l!==void 0?l:0,(h=(a=t.marginRight)!==null&&a!==void 0?a:m?t.boundsPadding[1]:t.boundsPadding)!==null&&h!==void 0?h:0,(c=(d=t.marginBottom)!==null&&d!==void 0?d:m?(u=t.boundsPadding[2])!==null&&u!==void 0?u:t.boundsPadding[0]:t.boundsPadding)!==null&&c!==void 0?c:0,(p=(g=t.marginLeft)!==null&&g!==void 0?g:m?(f=t.boundsPadding[3])!==null&&f!==void 0?f:t.boundsPadding[1]:t.boundsPadding)!==null&&p!==void 0?p:0];t.boundsPadding=b,super(t)}}class X9 extends kT{constructor(t){t.flexWrap="nowrap",super(t)}}let q9=class extends Yo{constructor(t){var e,n,o,r,s,l,a,h,d,u,c,g;let f;ge(t.iconName)&&(f=Cn()[t.iconName],f&&(t.width=(e=t.width)!==null&&e!==void 0?e:f.width,t.height=(n=t.height)!==null&&n!==void 0?n:f.height,t.svg=f.svg,t.cursor=f.cursor)),t.svg&&(t.image=t.svg);const p=st(t.boundsPadding),m=[(r=(o=t.marginTop)!==null&&o!==void 0?o:p?t.boundsPadding[0]:t.boundsPadding)!==null&&r!==void 0?r:0,(l=(s=t.marginRight)!==null&&s!==void 0?s:p?t.boundsPadding[1]:t.boundsPadding)!==null&&l!==void 0?l:0,(d=(a=t.marginBottom)!==null&&a!==void 0?a:p?(h=t.boundsPadding[2])!==null&&h!==void 0?h:t.boundsPadding[0]:t.boundsPadding)!==null&&d!==void 0?d:0,(g=(u=t.marginLeft)!==null&&u!==void 0?u:p?(c=t.boundsPadding[3])!==null&&c!==void 0?c:t.boundsPadding[1]:t.boundsPadding)!==null&&g!==void 0?g:0];t.boundsPadding=m,super(t),this.cache=f}},Z9=class extends Yo{constructor(t){var e,n,o,r,s,l,a,h,d,u;t.src&&(t.image=t.src),t.shape==="circle"&&(t.cornerRadius=t.width/2);const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}};class J9 extends fu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class Q9 extends Hi{constructor(t){var e,n,o,r,s,l,a,h,d,u,c;t.textBaseline||(t.textBaseline="top");const g=st(t.boundsPadding),f=[(n=(e=t.marginTop)!==null&&e!==void 0?e:g?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:g?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:g?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:g?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=f,t.fill=(c=t.fill)!==null&&c!==void 0?c:"#000",super(t)}getSize(t){this.AABBBounds.width()}}function t7(i,t=0){return{percent:i,delta:t}}class e7 extends mu{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}class i7 extends $a{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}getSize(t){this.AABBBounds.width()}}class n7 extends fn{constructor(t){var e,n,o,r,s,l,a,h,d,u;const c=st(t.boundsPadding),g=[(n=(e=t.marginTop)!==null&&e!==void 0?e:c?t.boundsPadding[0]:t.boundsPadding)!==null&&n!==void 0?n:0,(r=(o=t.marginRight)!==null&&o!==void 0?o:c?t.boundsPadding[1]:t.boundsPadding)!==null&&r!==void 0?r:0,(a=(s=t.marginBottom)!==null&&s!==void 0?s:c?(l=t.boundsPadding[2])!==null&&l!==void 0?l:t.boundsPadding[0]:t.boundsPadding)!==null&&a!==void 0?a:0,(u=(h=t.marginLeft)!==null&&h!==void 0?h:c?(d=t.boundsPadding[3])!==null&&d!==void 0?d:t.boundsPadding[1]:t.boundsPadding)!==null&&u!==void 0?u:0];t.boundsPadding=g,super(t)}}const o7=Object.freeze(Object.defineProperty({__proto__:null,Arc:e7,CheckBox:Tr,Circle:Y9,Container:kT,Group:n7,GroupElement:X9,Icon:q9,Image:Z9,Line:n0,Radio:eh,Rect:J9,Tag:i7,Text:Q9,percentCalc:t7},Symbol.toStringTag,{value:"Module"}));function r7(i){var t,e,n,o,r,s,l,a,h,d,u;const c={seqId:0},g={isPivotChart:!0};let f,p,m,b;i.columnTree&&(i.indicatorsAsCol!==!1&&(m=Vi(i.columnTree,i.indicators)),f=new He((t=i.columnTree)!==null&&t!==void 0?t:[],c)),i.rowTree&&(i.indicatorsAsCol===!1&&(b=Vi(i.rowTree,i.indicators)),p=new He((e=i.rowTree)!==null&&e!==void 0?e:[],c));const C=!((n=p.dimensionKeys)===null||n===void 0)&&n.count?p.dimensionKeys.valueArr():(r=(o=i.rows)===null||o===void 0?void 0:o.reduce((y,S)=>(typeof S=="string"?y.push(S):y.push(S.dimensionKey),y),[]))!==null&&r!==void 0?r:[],_=!((s=f.dimensionKeys)===null||s===void 0)&&s.count?f.dimensionKeys.valueArr():(a=(l=i.columns)===null||l===void 0?void 0:l.reduce((y,S)=>(typeof S=="string"?y.push(S):y.push(S.dimensionKey),y),[]))!==null&&a!==void 0?a:[],w=(d=(h=i.indicators)===null||h===void 0?void 0:h.reduce((y,S)=>(typeof S=="string"?y.push(S):y.push(S.indicatorKey),y),[]))!==null&&d!==void 0?d:[];return g.collectValuesBy=s7(i,_,C),g.aggregationRules=l7(i),{dataset:new Oh(g,C,_,w,i.indicators,(u=i.indicatorsAsCol)===null||u===void 0||u,i.records,void 0,m||i.columnTree,b||i.rowTree,!0),columnDimensionTree:f,rowDimensionTree:p,layoutNodeId:c}}function s7(i,t,e){var n,o,r,s,l,a,h,d,u,c,g,f,p,m,b,C,_,w,y,S,R,A,x;const T={};for(let M=0,B=(n=i.indicators)===null||n===void 0?void 0:n.length;M<B;M++)if(typeof i.indicators[M]!="string"&&i.indicators[M].chartSpec)if(i.indicatorsAsCol===!1){const P=i.indicators[M];if(T[P.indicatorKey]={by:e,range:!0,sumBy:((o=P.chartSpec)===null||o===void 0?void 0:o.stack)!==!1&&t.concat((r=P.chartSpec)===null||r===void 0?void 0:r.xField)},P.chartSpec.series)P.chartSpec.series.forEach(F=>{var H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et;const gt=typeof F.xField=="string"?F.xField:F.xField[0];T[gt]={by:t,type:F.direction!=="horizontal"?"xField":void 0,range:F.direction==="horizontal",sortBy:F.direction!=="horizontal"?(I=(k=(E=(H=F==null?void 0:F.data)===null||H===void 0?void 0:H.fields)===null||E===void 0?void 0:E[gt])===null||k===void 0?void 0:k.domain)!==null&&I!==void 0?I:(W=(O=(D=(L=P.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[gt])===null||W===void 0?void 0:W.domain:void 0};const vt=F.yField;T[vt]={by:e,range:F.direction!=="horizontal",sumBy:F.stack!==!1&&t.concat(F==null?void 0:F.xField),sortBy:F.direction==="horizontal"?(Y=(U=($=(N=F==null?void 0:F.data)===null||N===void 0?void 0:N.fields)===null||$===void 0?void 0:$[vt])===null||U===void 0?void 0:U.domain)!==null&&Y!==void 0?Y:(et=(Z=(G=(j=P.chartSpec)===null||j===void 0?void 0:j.data)===null||G===void 0?void 0:G.fields)===null||Z===void 0?void 0:Z[vt])===null||et===void 0?void 0:et.domain:void 0}});else{const F=typeof P.chartSpec.xField=="string"?P.chartSpec.xField:P.chartSpec.xField[0];T[F]={by:t,type:P.chartSpec.direction!=="horizontal"?"xField":void 0,range:P.chartSpec.direction==="horizontal",sortBy:P.chartSpec.direction!=="horizontal"?(h=(a=(l=(s=P.chartSpec)===null||s===void 0?void 0:s.data)===null||l===void 0?void 0:l.fields)===null||a===void 0?void 0:a[F])===null||h===void 0?void 0:h.domain:void 0};const H=P.chartSpec.yField;T[H]={by:e,range:i.indicators[M].chartSpec.direction!=="horizontal",sumBy:P.chartSpec.stack!==!1&&t.concat((d=P.chartSpec)===null||d===void 0?void 0:d.xField),sortBy:P.chartSpec.direction==="horizontal"?(f=(g=(c=(u=P.chartSpec)===null||u===void 0?void 0:u.data)===null||c===void 0?void 0:c.fields)===null||g===void 0?void 0:g[H])===null||f===void 0?void 0:f.domain:void 0}}}else{const P=i.indicators[M];if(T[P.indicatorKey]={by:t,range:!0,sumBy:((p=P.chartSpec)===null||p===void 0?void 0:p.stack)!==!1&&e.concat((m=P.chartSpec)===null||m===void 0?void 0:m.yField)},P.chartSpec.series)P.chartSpec.series.forEach(F=>{var H,E,k,I,L,D,O,W,N,$,U,Y,j,G,Z,et;const gt=typeof F.yField=="string"?F.yField:F.yField[0];T[gt]={by:e,type:F.direction==="horizontal"?"yField":void 0,range:F.direction!=="horizontal",sortBy:F.direction==="horizontal"?(I=(k=(E=(H=F==null?void 0:F.data)===null||H===void 0?void 0:H.fields)===null||E===void 0?void 0:E[gt])===null||k===void 0?void 0:k.domain)!==null&&I!==void 0?I:(W=(O=(D=(L=P.chartSpec)===null||L===void 0?void 0:L.data)===null||D===void 0?void 0:D.fields)===null||O===void 0?void 0:O[gt])===null||W===void 0?void 0:W.domain:void 0};const vt=F.xField;T[vt]={by:t,range:F.direction==="horizontal",sumBy:F.stack!==!1&&e.concat(F==null?void 0:F.yField),sortBy:F.direction!=="horizontal"?(Y=(U=($=(N=F==null?void 0:F.data)===null||N===void 0?void 0:N.fields)===null||$===void 0?void 0:$[vt])===null||U===void 0?void 0:U.domain)!==null&&Y!==void 0?Y:(et=(Z=(G=(j=P.chartSpec)===null||j===void 0?void 0:j.data)===null||G===void 0?void 0:G.fields)===null||Z===void 0?void 0:Z[vt])===null||et===void 0?void 0:et.domain:void 0}});else{const F=typeof P.chartSpec.yField=="string"?P.chartSpec.yField:P.chartSpec.yField[0];T[F]={by:e,type:P.chartSpec.direction==="horizontal"?"yField":void 0,range:P.chartSpec.direction!=="horizontal",sortBy:P.chartSpec.direction==="horizontal"?(w=(_=(C=(b=P.chartSpec)===null||b===void 0?void 0:b.data)===null||C===void 0?void 0:C.fields)===null||_===void 0?void 0:_[F])===null||w===void 0?void 0:w.domain:void 0};const H=P.chartSpec.xField;T[H]={by:t,range:i.indicators[M].chartSpec.direction==="horizontal",sumBy:P.chartSpec.stack!==!1&&e.concat((y=P.chartSpec)===null||y===void 0?void 0:y.yField),sortBy:P.chartSpec.direction!=="horizontal"?(x=(A=(R=(S=P.chartSpec)===null||S===void 0?void 0:S.data)===null||R===void 0?void 0:R.fields)===null||A===void 0?void 0:A[H])===null||x===void 0?void 0:x.domain:void 0}}}return T}function l7(i){var t;const e=[];return(t=i.indicators)===null||t===void 0||t.forEach(n=>{var o,r;if(typeof n=="string")e.push({indicatorKey:n,field:n,aggregationType:zt.RECORD});else if(!((o=n.chartSpec)===null||o===void 0)&&o.series){const s=[];(r=n.chartSpec)===null||r===void 0||r.series.forEach(l=>{const a=i.indicatorsAsCol===!1?l.yField:l.xField;s.indexOf(a)===-1&&s.push(a)}),e.push({indicatorKey:n.indicatorKey,field:s,aggregationType:zt.RECORD})}else{const s=i.indicatorsAsCol===!1?n.chartSpec.yField:n.chartSpec.xField;e.push({indicatorKey:n.indicatorKey,field:s??n.indicatorKey,aggregationType:zt.RECORD})}}),e}function a7(i,t,e){var n,o;const r=r7(i);let s=r.columnDimensionTree,l=r.rowDimensionTree,a=!1,h=!1;i.columnTree&&i.indicatorsAsCol&&!s.dimensionKeys.contain(Zi)&&(a=!0),i.rowTree&&(i.indicatorsAsCol||l.dimensionKeys.contain(Zi)||(h=!0));const{dataset:d,layoutNodeId:u}=r,c={options:i,layoutNodeId:u,internalProps:i,isPivotChart:()=>!0,pivotChartAxes:[],_selectedDataItemsInChart:[],_getActiveChartInstance:()=>({updateState:()=>{}})};i.columnTree&&!a||(s=new He((n=d.colHeaderTree)!==null&&n!==void 0?n:[],u)),i.rowTree&&!h||(l=new He((o=d.rowHeaderTree)!==null&&o!==void 0?o:[],u));const g=new hr(c,d,s,l);for(let f=0;f<g.colCount;f++)for(let p=0;p<g.rowCount;p++){if(g.isHeader(f,p))continue;const m=g.getCellHeaderPaths(f,p),b=m.colHeaderPaths.map(y=>{var S;return(S=y.indicatorKey)!==null&&S!==void 0?S:y.value}),C=m.rowHeaderPaths.map(y=>{var S;return(S=y.indicatorKey)!==null&&S!==void 0?S:y.value}),_=d.getAggregator(g.indicatorsAsCol?C:C.slice(0,-1),g.indicatorsAsCol?b.slice(0,-1):b,g.getIndicatorKey(f,p)),w=h7(_.value?_.value():void 0,t,f,p,g,e);if(w)return w}}function h7(i,t,e,n,o,r){if(st(i)){for(let s=0;s<i.length;s++)if(r?r(i[s],t):d7(i[s],t))return o.getCellHeaderPaths(e,n)}}function d7(i,t){return JSON.stringify(i)===JSON.stringify(t)}function u7(i){return new $a(i?i.attribute:{})}function c7(i){return new Tr(i?i.attribute:{})}function g7(i){return new eh(i?i.attribute:{})}class f7{constructor(t,e){var n,o,r,s,l,a;this.willUpdateRow=!1,this.willUpdateCol=!1,this.table=t,this.rowCount=(n=e==null?void 0:e.rowCount)!==null&&n!==void 0?n:void 0,this.colCount=(o=e==null?void 0:e.colCount)!==null&&o!==void 0?o:void 0,this.animationDuration=(r=e==null?void 0:e.animationDuration)!==null&&r!==void 0?r:500,this.animationDelay=(s=e==null?void 0:e.animationDelay)!==null&&s!==void 0?s:1e3,this.animationEasing=(l=e==null?void 0:e.animationEasing)!==null&&l!==void 0?l:"linear",this.replaceScrollAction=(a=e==null?void 0:e.replaceScrollAction)!==null&&a!==void 0&&a,this.reset(),this.init()}init(){this.replaceScrollAction&&(this.table.disableScroll(),this.table.scenegraph.stage.addEventListener("wheel",this.onScrollEnd.bind(this)))}reset(){this.playing=!1,this.row=this.table.frozenRowCount,this.col=this.table.frozenColCount}onScrollEnd(t){this.rowCount?(t.deltaY>0?(this.row+=this.rowCount,this.row=Math.min(this.row,this.table.rowCount-this.table.frozenRowCount)):t.deltaY<0&&(this.row-=this.rowCount,this.row=Math.max(this.row,this.table.frozenRowCount)),this.table.scrollToRow(this.row,{duration:this.animationDuration,easing:this.animationEasing})):this.colCount&&(t.deltaX>0?(this.col+=this.colCount,this.col=Math.min(this.col,this.table.colCount-this.table.frozenColCount)):t.deltaX<0&&(this.col-=this.colCount,this.col=Math.max(this.col,this.table.frozenColCount)),this.table.scrollToCol(this.col,{duration:this.animationDuration,easing:this.animationEasing}))}play(){this.playing=!0,this.rowCount&&!this.willUpdateRow?this.updateRow():this.colCount&&!this.willUpdateCol&&this.updateCol()}pause(){this.playing=!1}updateRow(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenTopRow!==this.row?(this.row=this.table.frozenRowCount,t=!1):this.row+=this.rowCount,this.table.scrollToRow(this.row,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateRow=!0,setTimeout(()=>{this.willUpdateRow=!1,this.updateRow()},this.animationDuration+this.animationDelay)}updateCol(){if(!this.playing)return;let t=!0;this.table.scenegraph.proxy.screenLeftCol!==this.col?(this.col=this.table.frozenColCount,t=!1):this.col+=this.colCount,this.table.scrollToCol(this.col,t?{duration:this.animationDuration,easing:this.animationEasing}:void 0),this.willUpdateCol=!0,setTimeout(()=>{this.willUpdateCol=!1,this.updateCol()},this.animationDuration+this.animationDelay)}}class p7{constructor(t,e){this.table=t,this.options=e,this.registerStyle(),this.bindEvent()}registerStyle(){var t,e,n,o,r,s,l,a;this.table.registerCustomCellStyle("col-highlight",{bgColor:(e=(t=this.options)===null||t===void 0?void 0:t.colHighlightBGColor)!==null&&e!==void 0?e:"#82b2f5",color:(o=(n=this.options)===null||n===void 0?void 0:n.colHighlightColor)!==null&&o!==void 0?o:"#FFF"}),this.table.registerCustomCellStyle("row-highlight",{bgColor:(s=(r=this.options)===null||r===void 0?void 0:r.rowHighlightBGColor)!==null&&s!==void 0?s:"#82b2f5",color:(a=(l=this.options)===null||l===void 0?void 0:l.rowHighlightColor)!==null&&a!==void 0?a:"#FFF"})}bindEvent(){this.table.on("selected_cell",t=>{this.updateHighlight()}),this.table.on("selected_clear",()=>{this.clearHighlight()}),this.table.on("mousemove_table",()=>{this.table.stateManager.select.selecting&&this.updateHighlight()})}clearHighlight(){this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),this.colHeaderRange=void 0,this.rowHeaderRange=void 0}updateHighlight(){var t,e,n,o;if(((t=this.options)===null||t===void 0?void 0:t.colHighlight)===!1&&((e=this.options)===null||e===void 0?void 0:e.rowHighlight)===!1)return;const r=this.table.getSelectedCellRanges();if(r.length===0)return void this.clearHighlight();const s=r[0],l=[s.start.row,s.end.row];l.sort((u,c)=>u-c);const a=[s.start.col,s.end.col];let h,d;a.sort((u,c)=>u-c),this.table.isPivotTable()?(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}):this.table.internalProps.transpose?d={start:{col:0,row:l[0]},end:{col:this.table.rowHeaderLevelCount-1,row:l[1]}}:(h={start:{col:a[0],row:0},end:{col:a[1],row:this.table.columnHeaderLevelCount-1}},this.table.internalProps.rowSeriesNumber&&(d={start:{col:0,row:l[0]},end:{col:0,row:l[1]}})),((n=this.options)===null||n===void 0?void 0:n.colHighlight)===!1||FT(this.colHeaderRange,h)||(this.colHeaderRange&&this.table.arrangeCustomCellStyle({range:this.colHeaderRange},void 0),h&&this.table.arrangeCustomCellStyle({range:h},"col-highlight"),this.colHeaderRange=h),((o=this.options)===null||o===void 0?void 0:o.rowHighlight)===!1||FT(this.rowHeaderRange,d)||(this.rowHeaderRange&&this.table.arrangeCustomCellStyle({range:this.rowHeaderRange},void 0),d&&this.table.arrangeCustomCellStyle({range:d},"row-highlight"),this.rowHeaderRange=d)}}function FT(i,t){return i===void 0&&t===void 0||i!==void 0&&t!==void 0&&i.start.col===t.start.col&&i.start.row===t.start.row&&i.end.col===t.end.col&&i.end.row===t.end.row}sx();const m7="1.11.1";function v7(){return Cn()}function b7(){hT()}const C7=Object.freeze(Object.defineProperty({__proto__:null,CarouselAnimationPlugin:f7,CustomLayout:o7,DataStatistics:hV,EventTarget:ih,HeaderHighlightPlugin:p7,InvertHighlightPlugin:rN,ListTable:W9,ListTableSimple:V9,PIVOT_CHART_EVENT_TYPE:TR,PIVOT_TABLE_EVENT_TYPE:lr,PivotChart:K9,PivotTable:LT,PivotTableSimple:U9,TABLE_EVENT_TYPE:lt,TYPES:Xz,VArc:DI,VArea:OI,VCheckBox:c7,VCircle:zI,VGlyph:WI,VGroup:NI,VImage:VI,VLine:jI,VPath:$I,VPolygon:GI,VRadio:g7,VRect:UI,VSymbol:KI,VTag:u7,VText:YI,clearGlobal:b7,core:Q8,data:r6,getDataCellPath:a7,getIcons:v7,getTargetCell:Lr,graphicUtil:L1,jsx:qI,onBeforeAttributeUpdateForInvertHighlight:bA,register:oV,registerAxis:Pg,registerChartCell:Ig,registerCheckboxCell:Dg,registerEmptyTip:Hg,registerImageCell:Og,registerLegend:Eg,registerMenu:Lg,registerProgressBarCell:zg,registerRadioCell:Ng,registerSparkLineCell:Wg,registerTextCell:Dl,registerTitle:kg,registerTooltip:Fg,registerVideoCell:Vg,renderChart:jm,restoreMeasureText:pN,setCustomAlphabetCharSet:fN,themes:X4,updateCell:xo,version:m7},Symbol.toStringTag,{value:"Module"})),dr=DB.create({baseURL:"/",validateStatus(i){return i===200},timeout:1e3*60});dr.interceptors.request.use(i=>i,i=>Promise.reject(i)),dr.interceptors.response.use(i=>{var t,e;return+((t=i==null?void 0:i.data)==null?void 0:t.code)==500&&Gi.message.error({content:((e=i==null?void 0:i.data)==null?void 0:e.message)||"服务器异常",key:"SERVER_ERROR"}),i},i=>{if(i.message.includes("timeout"))Gi.message.error({content:"网络连接超时,请重试!",key:"TIMEOUT"});else{const{status:t}=i.response;t===401?Gi.message.error({content:"当前用户信息不正确",key:"REQUEST_ERROR"}):t>=500?Gi.message.error({content:"服务器异常",key:"REQUEST_ERROR"}):Gi.message.error({content:"请求异常",key:"REQUEST_ERROR"})}return Promise.reject(i)});var IT={},y7={get exports(){return IT},set exports(i){IT=i}};(function(i,t){(function(e,n){i.exports=n(Fo)})(cP,function(e){function n(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=n(e),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(s,l){return l==="W"?s+"周":s+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(s,l){var a=100*s+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return o.default.locale(r,null,!0),r})})(y7);const EX="",LX="",Ri=(i,t)=>{const e=i.__vccOpts||i;for(const[n,o]of t)e[n]=o;return e};Fo.locale("zh-cn");const _7=v.defineComponent({name:"PivotFilter",props:{data:{type:Object,default:()=>{}},customDimensions:{type:Array,default:()=>[]},dimensions:{type:Array,default:()=>[]},indicators:{type:Array,default:()=>[]}},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref(!1),r=v.ref(!1),s=v.ref([]),l=v.ref(""),a=v.ref(),h=v.ref(""),d=v.ref([]),u=v.ref(),c=v.ref("range"),g=v.ref(),f=v.ref({}),p=v.ref(),m=v.ref({}),b=v.inject("getContainer",()=>{}),C=v.inject("scaleValue",{}),_=v.inject("theme","light"),w=v.inject("pageId",""),y=v.inject("context",""),S=v.inject("indicatorUrl",""),R=v.inject("indicatorToken",""),A=v.inject("graphicConfig",{}),x=v.inject("theDateInfo",{}),T=[{label:"小于",value:"LESS"},{label:"小于等于",value:"LESS_EQUAL"},{label:"大于",value:"GREATER"},{label:"大于等于",value:"GREATER_EQUAL"},{label:"等于",value:"EQUAL"},{label:"不等于",value:"NOT_EQUAL"}],M=[{label:"单个日期",value:"date"},{label:"日期范围",value:"range"}],B=j=>{r.value=!1,s.value=j.target.checked?v.unref(d).map(G=>G.value):[]};v.watch(s,j=>{o.value=j.length===v.unref(d).length,r.value=!!j.length&&j.length<v.unref(d).length});const P=async j=>{var ht,_t;const{queryColumnList:G=[],edvDataSetId:Z="",source:et,dataSourceId:gt}=v.unref(A);let vt=G.find(ut=>ut.name===j||ut.label===j);vt||(vt=i.customDimensions.find(ut=>ut.name===j||ut.label===j));const it={},{search:nt}=(window==null?void 0:window.location)||{},Ct=nt.slice(1,nt.length).split("&");for(const ut of Ct)if(ut){const It=ut.split("=");if(It[0])if(It[0]==="userInfo")try{it.token=(_t=(ht=JSON.parse(decodeURIComponent(It[1])))==null?void 0:ht.baseInfo)==null?void 0:_t.hrpToken}catch(Ut){console.log(Ut)}else it[It[0]]=It[1]}const at=await dr.post(`${v.unref(S)}/diagram/groupvalue`,{source:et,groupColumn:j,hrpIndexTypeGuid:vt==null?void 0:vt.typeGuid,pageId:v.unref(w),pageFlag:!0,edvDataSetId:Z,dataSourceId:gt,extParam:it},{headers:{Authentication:v.unref(R),operateContext:v.unref(y)}}),{success:rt,data:ct=[]}=at.data;rt&&(d.value=ct.map(ut=>({value:ut})))},F=v.ref("");async function H(){const{filterData:j,type:G,key:Z}=i.data,gt=i.dimensions.concat(i.indicators).find(vt=>vt.label===Z);gt&&(F.value=gt.genericType),v.unref(F)==="DATE"?u.value="date":u.value="select",G==="dimension"?v.unref(u)==="select"?(await P(Z),Array.isArray(j)?s.value=j:s.value=(j==null?void 0:j.value)||[]):v.unref(u)==="date"&&(j==null?void 0:j.length)===2&&(a.value=[Fo(j[0].value),Fo(j[1].value)]):(l.value=(j==null?void 0:j.rule)||"",a.value=(j==null?void 0:j.value)||""),n.value=!0}const E=v.computed(()=>v.unref(x).dateFormat||"YYYY-MM-DD");function k(){var et;const{key:j,type:G}=i.data;let Z={};G==="dimension"?v.unref(u)==="select"?Z={rule:"IN",value:v.unref(s)}:v.unref(u)==="date"&&(v.unref(c)==="date"?Z={rule:"EQUAL",value:((et=v.unref(a))==null?void 0:et.format(v.unref(E)))||""}:v.unref(c)==="range"&&v.unref(a)&&(Z=[{rule:"GREATER_EQUAL",value:v.unref(a)[0].format(v.unref(E))},{rule:"LESS_EQUAL",value:v.unref(a)[1].format(v.unref(E))}])):Z={rule:v.unref(l),value:v.unref(a)},t("change",{checkKeys:Z,key:j,type:G}),n.value=!1}function I(){l.value="",a.value=null}const L=v.computed(()=>v.unref(_)==="darkBlue"?"#b2c3dd":""),D=()=>document.getElementsByClassName("filter-modal")[0]||document.body,O=j=>{var G,Z,et;if(j){const gt=(G=v.unref(g))==null?void 0:G.getBoundingClientRect();if(gt){const vt=gt.left/(((Z=v.unref(C))==null?void 0:Z.widthScale)||1)+"px",it=(gt.top+gt.height)/(((et=v.unref(C))==null?void 0:et.heightScale)||1)+"px";setTimeout(()=>{var Ct,at;const nt=document.querySelectorAll(".ant-select-dropdown"),bt=Array.from(nt).filter(rt=>window.getComputedStyle(rt).display!=="none");if(bt!=null&&bt.length){const rt=document.getElementsByClassName("filter-modal")[0];bt[0].classList.add("filter-select-dropdown"),(Ct=rt==null?void 0:rt.style)==null||Ct.setProperty("--drop-down-left",vt),(at=rt==null?void 0:rt.style)==null||at.setProperty("--drop-down-top",it),f.value={visibility:"visible"}}},200)}}else f.value={}},W=j=>{var G,Z,et;if(j){const gt=(G=v.unref(p))==null?void 0:G.getBoundingClientRect();if(gt){const vt=gt.left/(((Z=v.unref(C))==null?void 0:Z.widthScale)||1)+"px",it=(gt.top+gt.height)/(((et=v.unref(C))==null?void 0:et.heightScale)||1)+"px";setTimeout(()=>{var Ct,at;const nt=document.querySelectorAll(".pivot-table-range-date-dropdown"),bt=Array.from(nt).filter(rt=>window.getComputedStyle(rt).display!=="none");if(bt!=null&&bt.length){const rt=document.getElementsByClassName("filter-modal")[0];bt[0].classList.add("filter-range-picker-dropdown"),(Ct=rt==null?void 0:rt.style)==null||Ct.setProperty("--range-picker-dropdown-left",vt),(at=rt==null?void 0:rt.style)==null||at.setProperty("--range-picker-dropdown-top",it),m.value={visibility:"visible"}}},200)}}else m.value={}},N=v.computed(()=>{let j="270px";return v.unref(u)==="date"&&(j=""),{padding:"10px",height:j,maxHeight:"280px"}}),$=()=>{a.value=null};v.watch(n,j=>{window.modalShow&&window.modalShow(j)});const U=v.computed(()=>{let j="date";return v.unref(E).endsWith("MM")?j="month":v.unref(E).endsWith("YYYY")&&(j="year"),j}),Y=j=>{const{startTime:G,endTime:Z,rangeFormat:et}=v.unref(x);if(G&&Z){let gt="day";return et.endsWith("MM")?gt="month":et.endsWith("YYYY")&&(gt="year"),j&>&&(j<Fo(G).startOf(gt)||j>Fo(Z).endOf(gt))}else return!1};return e({showModal:H}),{visible:n,checkAllDimensions:o,dimIndeterminate:r,dimensionCheckKeys:s,ruleValue:l,ruleOptions:T,filterValue:a,searchDimName:h,fontColor:L,valueList:d,filterType:u,dateSelectType:c,bodyStyle:N,dateType:U,dateSelectOptions:M,formatStr:E,theme:_,handleOk:k,onCheckAllDimChange:B,handleClear:I,dropdownStyle:f,popupStyle:m,selectRef:g,rangePickerRef:p,getPopupContainer:D,onChangeSelectType:$,disabledDate:Y,getContainer:b,dropdownVisibleChange:O,openChange:W}}}),w7={class:"wrap-header"},S7={class:"wrap-body"},x7={style:{padding:"20px",display:"none"}},A7={ref:"selectRef",style:{display:"inline-block"}},R7={style:{padding:"10px 20px"}},T7={key:0,class:"ecan-date-picker"},M7={key:1,class:"ecan-range-picker",style:{display:"inline-block"},ref:"rangePickerRef"},B7={key:1},P7={style:{padding:"20px"}},H7={ref:"selectRef",style:{display:"inline-block"}},E7={style:{padding:"10px 20px"}};function L7(i,t,e,n,o,r){var p;const s=v.resolveComponent("a-checkbox"),l=v.resolveComponent("a-input"),a=v.resolveComponent("a-checkbox-group"),h=v.resolveComponent("a-select-option"),d=v.resolveComponent("a-select"),u=v.resolveComponent("a-date-picker"),c=v.resolveComponent("a-range-picker"),g=v.resolveComponent("a-button"),f=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(f,{wrapClassName:i.theme+" filter-modal",visible:i.visible,"onUpdate:visible":t[9]||(t[9]=m=>i.visible=m),title:((p=i.data)==null?void 0:p.fieldName)+"-筛选","ok-text":"确认","cancel-text":"取消",bodyStyle:i.bodyStyle,getContainer:i.getContainer,onOk:i.handleOk},{footer:v.withCtx(()=>[v.createVNode(g,{onClick:t[8]||(t[8]=m=>i.visible=!1)},{default:v.withCtx(()=>t[10]||(t[10]=[v.createTextVNode("取消")])),_:1}),i.data.type==="indicators"?(v.openBlock(),v.createBlock(g,{key:0,onClick:i.handleClear},{default:v.withCtx(()=>t[11]||(t[11]=[v.createTextVNode("清除筛选")])),_:1},8,["onClick"])):v.createCommentVNode("",!0),v.createVNode(g,{type:"primary",onClick:i.handleOk},{default:v.withCtx(()=>t[12]||(t[12]=[v.createTextVNode("确定")])),_:1},8,["onClick"])]),default:v.withCtx(()=>[i.data.type==="dimension"?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["dimension-wrap",i.filterType==="select"?"border":""])},[i.filterType==="select"?(v.openBlock(),v.createElementBlock(v.Fragment,{key:0},[v.createElementVNode("div",w7,[v.createVNode(s,{checked:i.checkAllDimensions,"onUpdate:checked":t[0]||(t[0]=m=>i.checkAllDimensions=m),indeterminate:i.dimIndeterminate,disabled:!!i.searchDimName,onChange:i.onCheckAllDimChange},{default:v.withCtx(()=>[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},"全选",4)]),_:1},8,["checked","indeterminate","disabled","onChange"]),v.createVNode(l,{value:i.searchDimName,"onUpdate:value":t[1]||(t[1]=m=>i.searchDimName=m),placeholder:"请输入关键字搜索",style:{width:"200px","margin-left":"15px"}},null,8,["value"])]),v.createElementVNode("div",S7,[v.createVNode(a,{value:i.dimensionCheckKeys,"onUpdate:value":t[2]||(t[2]=m=>i.dimensionCheckKeys=m),style:{width:"100%"}},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.valueList||[],(m,b)=>v.withDirectives((v.openBlock(),v.createElementBlock("div",{class:"body-item",key:b},[v.createVNode(s,{value:m.value},{default:v.withCtx(()=>[v.createElementVNode("span",{style:v.normalizeStyle({color:i.fontColor})},v.toDisplayString(m.value),5)]),_:2},1032,["value"])])),[[v.vShow,!i.searchDimName||m.value.includes(i.searchDimName)]])),128))]),_:1},8,["value"])])],64)):i.filterType==="date"?(v.openBlock(),v.createElementBlock(v.Fragment,{key:1},[v.createElementVNode("div",x7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选类型:",4),v.createElementVNode("div",A7,[v.createVNode(d,{value:i.dateSelectType,"onUpdate:value":t[3]||(t[3]=m=>i.dateSelectType=m),style:{width:"200px"},placeholder:"请选择",dropdownClassName:"pivot-table-select-dropdown",getPopupContainer:i.getPopupContainer,dropdownStyle:i.dropdownStyle,onDropdownVisibleChange:i.dropdownVisibleChange,onChange:i.onChangeSelectType},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.dateSelectOptions,m=>(v.openBlock(),v.createBlock(h,{key:m.value,value:m.value},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer","dropdownStyle","onDropdownVisibleChange","onChange"])],512)]),v.createElementVNode("div",R7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选值:",4),i.dateSelectType==="date"?(v.openBlock(),v.createElementBlock("span",T7,[v.createVNode(u,{dropdownClassName:"ecan-date-picker-dropdown",value:i.filterValue,"onUpdate:value":t[4]||(t[4]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,getPopupContainer:i.getPopupContainer},null,8,["value","picker","format","getPopupContainer"])])):i.dateSelectType==="range"?(v.openBlock(),v.createElementBlock("div",M7,[v.createVNode(c,{dropdownClassName:"ecan-range-picker-dropdown pivot-table-range-date-dropdown",value:i.filterValue,"onUpdate:value":t[5]||(t[5]=m=>i.filterValue=m),picker:i.dateType,format:i.formatStr,"disabled-date":i.disabledDate,getPopupContainer:i.getPopupContainer,popupStyle:i.popupStyle,onOpenChange:i.openChange},null,8,["value","picker","format","disabled-date","getPopupContainer","popupStyle","onOpenChange"])],512)):v.createCommentVNode("",!0)])],64)):v.createCommentVNode("",!0)],2)):i.data.type==="indicators"?(v.openBlock(),v.createElementBlock("div",B7,[v.createElementVNode("div",P7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选规则:",4),v.createElementVNode("div",H7,[v.createVNode(d,{value:i.ruleValue,"onUpdate:value":t[6]||(t[6]=m=>i.ruleValue=m),style:{width:"200px"},placeholder:"请选择",dropdownClassName:"pivot-table-select-dropdown",getPopupContainer:i.getPopupContainer,dropdownStyle:i.dropdownStyle,onDropdownVisibleChange:i.dropdownVisibleChange},{default:v.withCtx(()=>[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.ruleOptions,m=>(v.openBlock(),v.createBlock(h,{key:m.value,value:m.value},{default:v.withCtx(()=>[v.createTextVNode(v.toDisplayString(m.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value","getPopupContainer","dropdownStyle","onDropdownVisibleChange"])],512)]),v.createElementVNode("div",E7,[v.createElementVNode("span",{class:"filter-label",style:v.normalizeStyle({color:i.fontColor})},"筛选值:",4),v.createVNode(l,{value:i.filterValue,"onUpdate:value":t[7]||(t[7]=m=>i.filterValue=m),placeholder:"请输入",style:{width:"200px"}},null,8,["value"])])])):v.createCommentVNode("",!0)]),_:1},8,["wrapClassName","visible","title","bodyStyle","getContainer","onOk"])}const DT=Ri(_7,[["render",L7],["__scopeId","data-v-8f8e78da"]]),kX="",k7=v.defineComponent({name:"PivotProperty",props:{},setup(i,{emit:t,expose:e}){const n=v.ref(!1),o=v.ref({unit:"",format:"",floatLength:""}),r=v.ref(),s=v.ref({}),l=v.inject("theme","light"),a=v.inject("scaleValue",{}),h=v.inject("getContainer",()=>{}),d=[{label:"整数",value:"integer"},{label:"小数",value:"float"},{label:"百分比",value:"percent"}];function u(p){o.value=p,n.value=!0}function c(){t("change",v.unref(o)),n.value=!1}const g=()=>document.getElementsByClassName("property-modal")[0]||document.body,f=p=>{var m,b,C;if(p){const _=(m=v.unref(r))==null?void 0:m.getBoundingClientRect();if(_){const w=_.left/(((b=v.unref(a))==null?void 0:b.widthScale)||1)+"px",y=(_.top+_.height)/(((C=v.unref(a))==null?void 0:C.heightScale)||1)+"px";setTimeout(()=>{var A,x;const S=document.querySelectorAll(".ant-select-dropdown"),R=Array.from(S).filter(T=>window.getComputedStyle(T).display!=="none");if(R!=null&&R.length){const T=document.getElementsByClassName("property-modal")[0];R[0].classList.add("property-select-dropdown"),(A=T==null?void 0:T.style)==null||A.setProperty("--drop-down-left",w),(x=T==null?void 0:T.style)==null||x.setProperty("--drop-down-top",y),s.value={visibility:"visible"}}},200)}}else s.value={}};return v.watch(n,p=>{window.modalShow&&window.modalShow(p)}),e({showModal:u}),{theme:l,visible:n,formData:o,handleOk:c,getPopupContainer:g,formatOptions:d,getContainer:h,selectRef:r,dropdownStyle:s,dropdownVisibleChange:f}}}),F7={ref:"selectRef"};function I7(i,t,e,n,o,r){const s=v.resolveComponent("a-input"),l=v.resolveComponent("a-form-item"),a=v.resolveComponent("a-radio-button"),h=v.resolveComponent("a-radio-group"),d=v.resolveComponent("a-select"),u=v.resolveComponent("a-form"),c=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(c,{wrapClassName:i.theme+" property-modal",visible:i.visible,"onUpdate:visible":t[4]||(t[4]=g=>i.visible=g),"ok-text":"确认","cancel-text":"取消",title:i.formData.fieldName+"-度量属性",destroyOnClose:!1,getContainer:i.getContainer,onOk:i.handleOk},{default:v.withCtx(()=>[v.createVNode(u,null,{default:v.withCtx(()=>[v.createVNode(l,{label:"度量单位"},{default:v.withCtx(()=>[v.createVNode(s,{value:i.formData.unit,"onUpdate:value":t[0]||(t[0]=g=>i.formData.unit=g)},null,8,["value"])]),_:1}),i.formData.unit?(v.openBlock(),v.createBlock(l,{key:0,label:"度量单位位置"},{default:v.withCtx(()=>[v.createVNode(h,{value:i.formData.position,"onUpdate:value":t[1]||(t[1]=g=>i.formData.position=g),"button-style":"solid"},{default:v.withCtx(()=>[v.createVNode(a,{value:"left"},{default:v.withCtx(()=>t[5]||(t[5]=[v.createTextVNode("数据左侧")])),_:1}),v.createVNode(a,{value:"right"},{default:v.withCtx(()=>t[6]||(t[6]=[v.createTextVNode("数据右侧")])),_:1})]),_:1},8,["value"])]),_:1})):v.createCommentVNode("",!0),v.createVNode(l,{label:"格式化"},{default:v.withCtx(()=>[v.createElementVNode("div",F7,[v.createVNode(d,{value:i.formData.format,"onUpdate:value":t[2]||(t[2]=g=>i.formData.format=g),options:i.formatOptions,getPopupContainer:i.getPopupContainer,dropdownStyle:i.dropdownStyle,onDropdownVisibleChange:i.dropdownVisibleChange},null,8,["value","options","getPopupContainer","dropdownStyle","onDropdownVisibleChange"])],512)]),_:1}),["float","percent"].includes(i.formData.format)?(v.openBlock(),v.createBlock(l,{key:1,label:"小数位数"},{default:v.withCtx(()=>[v.createVNode(s,{type:"number",value:i.formData.floatLength,"onUpdate:value":t[3]||(t[3]=g=>i.formData.floatLength=g),min:0},null,8,["value"])]),_:1})):v.createCommentVNode("",!0)]),_:1})]),_:1},8,["wrapClassName","visible","title","getContainer","onOk"])}const D7=Ri(k7,[["render",I7]]);function $n(i,t){O7(i)&&(i="100%");var e=z7(i);return i=t===360?i:Math.min(t,Math.max(0,parseFloat(i))),e&&(i=parseInt(String(i*t),10)/100),Math.abs(i-t)<1e-6?1:(t===360?i=(i<0?i%t+t:i%t)/parseFloat(String(t)):i=i%t/parseFloat(String(t)),i)}function O7(i){return typeof i=="string"&&i.indexOf(".")!==-1&&parseFloat(i)===1}function z7(i){return typeof i=="string"&&i.indexOf("%")!==-1}function N7(i){return i=parseFloat(i),(isNaN(i)||i<0||i>1)&&(i=1),i}function jg(i){return i<=1?"".concat(Number(i)*100,"%"):i}function vv(i){return i.length===1?"0"+i:String(i)}function W7(i,t,e){return{r:$n(i,255)*255,g:$n(t,255)*255,b:$n(e,255)*255}}function bv(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?i+(t-i)*(6*e):e<1/2?t:e<2/3?i+(t-i)*(2/3-e)*6:i}function V7(i,t,e){var n,o,r;if(i=$n(i,360),t=$n(t,100),e=$n(e,100),t===0)o=e,r=e,n=e;else{var s=e<.5?e*(1+t):e+t-e*t,l=2*e-s;n=bv(l,s,i+1/3),o=bv(l,s,i),r=bv(l,s,i-1/3)}return{r:n*255,g:o*255,b:r*255}}function j7(i,t,e){i=$n(i,255),t=$n(t,255),e=$n(e,255);var n=Math.max(i,t,e),o=Math.min(i,t,e),r=0,s=n,l=n-o,a=n===0?0:l/n;if(n===o)r=0;else{switch(n){case i:r=(t-e)/l+(t<e?6:0);break;case t:r=(e-i)/l+2;break;case e:r=(i-t)/l+4;break}r/=6}return{h:r,s:a,v:s}}function $7(i,t,e){i=$n(i,360)*6,t=$n(t,100),e=$n(e,100);var n=Math.floor(i),o=i-n,r=e*(1-t),s=e*(1-o*t),l=e*(1-(1-o)*t),a=n%6,h=[e,s,r,r,l,e][a],d=[l,e,e,s,r,r][a],u=[r,r,l,e,e,s][a];return{r:h*255,g:d*255,b:u*255}}function G7(i,t,e,n){var o=[vv(Math.round(i).toString(16)),vv(Math.round(t).toString(16)),vv(Math.round(e).toString(16))];return n&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function OT(i){return Sn(i)/255}function Sn(i){return parseInt(i,16)}var zT={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function zh(i){var t={r:0,g:0,b:0},e=1,n=null,o=null,r=null,s=!1,l=!1;return typeof i=="string"&&(i=Y7(i)),typeof i=="object"&&(ur(i.r)&&ur(i.g)&&ur(i.b)?(t=W7(i.r,i.g,i.b),s=!0,l=String(i.r).substr(-1)==="%"?"prgb":"rgb"):ur(i.h)&&ur(i.s)&&ur(i.v)?(n=jg(i.s),o=jg(i.v),t=$7(i.h,n,o),s=!0,l="hsv"):ur(i.h)&&ur(i.s)&&ur(i.l)&&(n=jg(i.s),r=jg(i.l),t=V7(i.h,n,r),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(i,"a")&&(e=i.a)),e=N7(e),{ok:s,format:i.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:e}}var U7="[-\\+]?\\d+%?",K7="[-\\+]?\\d*\\.\\d+%?",Wr="(?:".concat(K7,")|(?:").concat(U7,")"),Cv="[\\s|\\(]+(".concat(Wr,")[,|\\s]+(").concat(Wr,")[,|\\s]+(").concat(Wr,")\\s*\\)?"),yv="[\\s|\\(]+(".concat(Wr,")[,|\\s]+(").concat(Wr,")[,|\\s]+(").concat(Wr,")[,|\\s]+(").concat(Wr,")\\s*\\)?"),po={CSS_UNIT:new RegExp(Wr),rgb:new RegExp("rgb"+Cv),rgba:new RegExp("rgba"+yv),hsl:new RegExp("hsl"+Cv),hsla:new RegExp("hsla"+yv),hsv:new RegExp("hsv"+Cv),hsva:new RegExp("hsva"+yv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Y7(i){if(i=i.trim().toLowerCase(),i.length===0)return!1;var t=!1;if(zT[i])i=zT[i],t=!0;else if(i==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var e=po.rgb.exec(i);return e?{r:e[1],g:e[2],b:e[3]}:(e=po.rgba.exec(i),e?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=po.hsl.exec(i),e?{h:e[1],s:e[2],l:e[3]}:(e=po.hsla.exec(i),e?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=po.hsv.exec(i),e?{h:e[1],s:e[2],v:e[3]}:(e=po.hsva.exec(i),e?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=po.hex8.exec(i),e?{r:Sn(e[1]),g:Sn(e[2]),b:Sn(e[3]),a:OT(e[4]),format:t?"name":"hex8"}:(e=po.hex6.exec(i),e?{r:Sn(e[1]),g:Sn(e[2]),b:Sn(e[3]),format:t?"name":"hex"}:(e=po.hex4.exec(i),e?{r:Sn(e[1]+e[1]),g:Sn(e[2]+e[2]),b:Sn(e[3]+e[3]),a:OT(e[4]+e[4]),format:t?"name":"hex8"}:(e=po.hex3.exec(i),e?{r:Sn(e[1]+e[1]),g:Sn(e[2]+e[2]),b:Sn(e[3]+e[3]),format:t?"name":"hex"}:!1)))))))))}function ur(i){return!!po.CSS_UNIT.exec(String(i))}var $g=2,NT=.16,X7=.05,q7=.05,Z7=.15,WT=5,VT=4,J7=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function jT(i){var t=i.r,e=i.g,n=i.b,o=j7(t,e,n);return{h:o.h*360,s:o.s,v:o.v}}function Gg(i){var t=i.r,e=i.g,n=i.b;return"#".concat(G7(t,e,n,!1))}function Q7(i,t,e){var n=e/100,o={r:(t.r-i.r)*n+i.r,g:(t.g-i.g)*n+i.g,b:(t.b-i.b)*n+i.b};return o}function $T(i,t,e){var n;return Math.round(i.h)>=60&&Math.round(i.h)<=240?n=e?Math.round(i.h)-$g*t:Math.round(i.h)+$g*t:n=e?Math.round(i.h)+$g*t:Math.round(i.h)-$g*t,n<0?n+=360:n>=360&&(n-=360),n}function GT(i,t,e){if(i.h===0&&i.s===0)return i.s;var n;return e?n=i.s-NT*t:t===VT?n=i.s+NT:n=i.s+X7*t,n>1&&(n=1),e&&t===WT&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function UT(i,t,e){var n;return e?n=i.v+q7*t:n=i.v-Z7*t,n>1&&(n=1),Number(n.toFixed(2))}function _v(i){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=[],n=zh(i),o=WT;o>0;o-=1){var r=jT(n),s=Gg(zh({h:$T(r,o,!0),s:GT(r,o,!0),v:UT(r,o,!0)}));e.push(s)}e.push(Gg(n));for(var l=1;l<=VT;l+=1){var a=jT(n),h=Gg(zh({h:$T(a,l),s:GT(a,l),v:UT(a,l)}));e.push(h)}return t.theme==="dark"?J7.map(function(d){var u=d.index,c=d.opacity,g=Gg(Q7(zh(t.backgroundColor||"#141414"),zh(e[u]),c*100));return g}):e}var wv={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Sv={},xv={};Object.keys(wv).forEach(function(i){Sv[i]=_v(wv[i]),Sv[i].primary=Sv[i][5],xv[i]=_v(wv[i],{theme:"dark",backgroundColor:"#141414"}),xv[i].primary=xv[i][5]});var KT=[],Nh=[],tj="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function ej(){var i=document.createElement("style");return i.setAttribute("type","text/css"),i}function ij(i,t){if(t=t||{},i===void 0)throw new Error(tj);var e=t.prepend===!0?"prepend":"append",n=t.container!==void 0?t.container:document.querySelector("head"),o=KT.indexOf(n);o===-1&&(o=KT.push(n)-1,Nh[o]={});var r;return Nh[o]!==void 0&&Nh[o][e]!==void 0?r=Nh[o][e]:(r=Nh[o][e]=ej(),e==="prepend"?n.insertBefore(r,n.childNodes[0]):n.appendChild(r)),i.charCodeAt(0)===65279&&(i=i.substr(1,i.length)),r.styleSheet?r.styleSheet.cssText+=i:r.textContent+=i,r}function YT(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(e);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(e).filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),n.forEach(function(o){nj(i,o,e[o])})}return i}function nj(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function oj(i,t){process.env.NODE_ENV!=="production"&&!i&&console!==void 0&&console.error("Warning: ".concat(t))}function rj(i,t){oj(i,"[@ant-design/icons-vue] ".concat(t))}function XT(i){return typeof i=="object"&&typeof i.name=="string"&&typeof i.theme=="string"&&(typeof i.icon=="object"||typeof i.icon=="function")}function Av(i,t,e){return e?v.h(i.tag,YT({key:t},e,i.attrs),(i.children||[]).map(function(n,o){return Av(n,"".concat(t,"-").concat(i.tag,"-").concat(o))})):v.h(i.tag,YT({key:t},i.attrs),(i.children||[]).map(function(n,o){return Av(n,"".concat(t,"-").concat(i.tag,"-").concat(o))}))}function qT(i){return _v(i)[0]}function ZT(i){return i?Array.isArray(i)?i:[i]:[]}var sj=`
|
|
310
310
|
.anticon {
|
|
311
311
|
display: inline-block;
|
|
312
312
|
color: inherit;
|
|
@@ -370,5 +370,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
370
370
|
}else{
|
|
371
371
|
return false
|
|
372
372
|
}
|
|
373
|
-
}`;return Function(`"use strict";return (${q})`)().call(this,K)}function $Y(V){A.value=!0;const{value:K,key:q}=V;v.unref(x)[q]=K,hn({type:"6",data:{key:q,value:K}}),yY()}function Zl(){return n==null?void 0:n.getDrawRange()}const ff=v.ref([]),HB=v.ref(""),EB=v.ref(),GY=(V,K)=>{var Ot,We,Rn,qn,ji;const q=K.dataViewColumns[V.oldIndex]||{},{scope:J}=q;let X=!1,Q=!1;["IDX","BUILT_IN_IDX"].includes(J)?X=!0:["DIM","BUILT_IN_DIM"].includes(J)&&(Q=!0);const tt=Zl(),{rows:ft,columns:Pt,indicators:Qt,records:Ht}=dt,{top:Lt,left:te}=tt;if(v.unref(Oe)){let Xe=i.height;i.isIframeMode&&(Xe=document.body.clientHeight+"px");let oi=v.unref(Be).width;oi.includes("calc")&&(oi=v.unref(Tt)-v.unref(E)+"px"),k.value.main={width:oi,height:Xe,top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)-ae*2+"px",top:0,left:0},k.value.columns={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)/3-ae*2+"px",top:0,left:parseFloat(oi)/2+"px"},k.value.indicators={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)*2/3-ae*2+"px",top:parseFloat(Xe)/3+"px",left:parseFloat(oi)/2+"px"}}else{let Xe=50;(Ot=v.unref(Kt))!=null&&Ot.length?Xe=v.unref($).clientHeight:Q&&(U.value=!0,v.unref(oe).height=Xe+"px");let oi=0,$i=1;const Wt=n.getRowHeight(0),ie={columnHeaderTitle:!0};if(Pt!=null&&Pt.length?$i+=Pt.length:ie.columns=[{dimensionKey:jr(6),title:"",width:"100px",type:"columns"}],ft!=null&&ft.length?ft.forEach((Ze,Ge)=>{oi+=n.getColWidth(Ge)}):(oi=100,ie.rows=[{dimensionKey:jr(6),title:"",width:"100px",type:"rows"}]),Qt!=null&&Qt.length||(ie.indicators=[{indicatorKey:jr(6),title:"",width:"20%",format:()=>""}]),(We=Object.keys(ie))!=null&&We.length){const{rows:Ze=[],columns:Ge=[]}=ie;let ze=[];Ht!=null&&Ht.length?ze=Ue.cloneDeep(Ht):(qn=(Rn=v.unref(O))==null?void 0:Rn.records)!=null&&qn.length&&(ze=Ue.cloneDeep((ji=v.unref(O))==null?void 0:ji.records));let Fi=Pt.map(Tn=>Tn.dimensionKey);if(!(Fi!=null&&Fi.length)&&(Ge!=null&&Ge.length)&&(Fi=[Ge[0].dimensionKey]),ze!=null&&ze.length)for(const Tn of ze){for(const Qh of Ze)Tn[Qh.dimensionKey]="";let Jh=!1;for(const Qh in Tn)if(Fi.includes(Qh)){Jh=!0;break}Q?Jh||($i=2,Tn[Fi[0]]=""):X&&(Jh||($i=1))}n.updateOption({...dt,...ie,records:ze})}v.nextTick(()=>{var Fi;const Ze=Zl(),Ge=Ze.width,ze=Ze.height;k.value.main={width:Ge+"px",height:ze+Xe+"px",top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:oi-ae*2+"px",height:ze-ae*2+"px",top:Xe+"px",left:0},k.value.columns={width:Ge-oi-ae*2+"px",height:$i*Wt-ae*2+"px",top:Xe+"px",left:oi+"px"},k.value.indicators={width:Ge-oi-ae*2+"px",height:ze-$i*Wt-ae*2+"px",top:$i*Wt+((Fi=v.unref(Kt))!=null&&Fi.length?Xe:0)+"px",left:oi+"px"},k.value.filters={width:Ge-ae*2+"px",height:Xe-ae*2+"px",top:0,left:0}})}I.value=q,X?ff.value=[0,1]:Q&&(ff.value=[2])},UY=()=>{var V;(V=v.unref(O).records)!=null&&V.length?n.updateOption({...dt,records:v.unref(O).records}):n.updateOption(dt),U.value=!1,v.unref(oe).height="",ff.value=[]},KY=()=>{var V;(V=v.unref(EB))==null||V.handleSearch(v.unref(HB))},LB=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:x.value,sortData:T.value,colSortData:M.value,indSortData:B.value,aggregateMap:P.value,subMenuLeft:F.value,subMenuTop:H.value,dragAreaStyle:k.value,showTreeData:L.value,largeVisible:D.value,temporaryData:O.value,splitSymbol:rt,sourceListStyle:ht.value,dimensionFieldList:At.value,indicatorFieldList:mt.value,computedIndKeys:qt.value,computedIndMap:fe.value,computedIndFieldMap:Yt.value,option:dt,loadingRect:Ti.value,calculateList:Lo.value,filterList:Xn.value,topNumMap:$r.value,sortMap:An.value,customDimensions:Fs.value,customIndicators:Kl.value,customRowKeys:Yl.value,customColKeys:Xl.value,cacheResData:Y.value,toolBoxStyle:Gr.value,scrollTop:W.value,scrollLeft:N.value}));let mb=null;v.watch(LB,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});function hn({type:V,data:K}){ct.value=V,e("tableChange",{type:V,data:K})}function YY(){!i.isAllowSaveConfig||!v.unref(ct)||["5"].includes(v.unref(ct))||(mb&&clearTimeout(mb),mb=setTimeout(()=>{hb("save",{keyName:i.relateKeyName||i.keyName,data:v.unref(LB)})},500))}const vb=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,x.value=V.topNumData,T.value=V.sortData,M.value=V.colSortData,B.value=V.indSortData,P.value=V.aggregateMap,F.value=V.subMenuLeft,H.value=V.subMenuTop,k.value=V.dragAreaStyle,L.value=V.showTreeData,D.value=V.largeVisible,O.value=V.temporaryData,rt=V.splitSymbol,ht.value=V.sourceListStyle,At.value=V.dimensionFieldList,mt.value=V.indicatorFieldList,qt.value=V.computedIndKeys,fe.value=V.computedIndMap,Yt.value=V.computedIndFieldMap,Ti.value=V.loadingRect,Lo.value=V.calculateList,Xn.value=V.filterList,$r.value=V.topNumMap,An.value=V.sortMap,Fs.value=V.customDimensions,Kl.value=V.customIndicators,Yl.value=V.customRowKeys,Xl.value=V.customColKeys,Y.value=V.cacheResData,Gr.value=V.toolBoxStyle,W.value=V.scrollTop,N.value=V.scrollLeft,Object.assign(dt,V.option),dt.theme=Nt};async function XY(V){var K,q,J;if(A.value=!0,V)vb(V);else if(i.isAllowSaveConfig){const X=await hb("get",{keyName:i.relateKeyName||i.keyName}),Q=((q=(K=X==null?void 0:X.data)==null?void 0:K.data)==null?void 0:q.searchMap)||{};Q!=null&&Q.data&&!Array.isArray(Q.data)&&((J=Object.keys(Q.data))!=null&&J.length)&&vb(Q.data)}gr()}function qY(){return{dimensions:v.unref(At),indicators:v.unref(mt)}}const ZY=V=>{const{scope:K,name:q,label:J}=V;let X=[];["IDX","BUILT_IN_IDX"].includes(K)?X=v.unref(mt):["DIM","BUILT_IN_DIM"].includes(K)&&(X=v.unref(At));const Q=X.findIndex(tt=>tt.name===q);if(Q!==-1){delete v.unref(a)[X[Q].label];const tt=v.unref(Xn).findIndex(ft=>ft.key===J);tt!==-1&&v.unref(Xn).splice(tt,1),X[Q].show?X[Q].isInnerFilter=!1:X.splice(Q,1)}A.value=!0,hn({type:"10",data:{dimensions:v.unref(At),indicators:v.unref(mt)}}),ql()},JY=V=>{const{scope:K,label:q,showTitle:J}=V,X=eP(K);X==="indicator"||X==="dimension"&&TB({dimensionKey:q,value:J})};t({option:dt,refreshData:XY,reRenderTable:vb,click:MB,getDrawRange:Zl,getSaveData:qY}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],()=>{kB()},{immediate:!0,deep:!0});function kB(){const{queryColumnList:V=[],indicators:K=[]}=i.graphicConfig,q=Ue.cloneDeep(V),J=Ue.cloneDeep(K);for(const X of q){const Q=i.dimensionList.find(tt=>tt.key===X.name);X.positionType=(Q==null?void 0:Q.position)||"rows",X.showTitle=X.title||X.label,Q&&(X.width=Q.width)}for(const X of J){const Q=i.indicatorList.find(tt=>tt.key===X.name);X.width=Q==null?void 0:Q.width,X.showTitle=X.label}At.value=q,mt.value=J}const QY=()=>{o.value=!1,L.value=!L.value},tX=()=>{o.value=!1,D.value=!D.value,window.enScale&&window.enScale(v.unref(D))},eX=V=>{const K=v.unref(At).find(Q=>Q.label===V),q=v.unref(mt).find(Q=>Q.label===V),J=K||q,X=v.unref(a)[V];return X?J.genericType==="DATE"?Array.isArray(X)?`${X[0].value}~${X[1].value}`:X.value:X.value&&Array.isArray(X.value)?X.value.join("、"):"":""},iX=V=>V.parentNode;return v.onMounted(()=>{ye()}),{showDefaultTableArea:Oe,maskList:ff,styleData:kt,subMenuLeft:F,subMenuTop:H,pivotWrapRef:S,pivotTableRef:_,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,drillModalRef:y,pivotAggregateRef:p,filterData:d,loadingRect:Ti,loading:A,isTableInit:o,toolBoxStyle:Gr,indSourceRef:EB,searchText:HB,dragAreaStyle:k,offsetWidth:Ft,showTreeData:L,dataIconStyle:Ee,largeVisible:D,sourceListStyle:ht,defaultTableStyle:Be,innerFilterStyle:oe,innerFilterFieldList:Kt,innerFilterRef:$,showFilterWrap:U,customDimensions:Fs,indicatorFieldList:mt,dimensionFieldList:At,pivotWrapStyle:R,fontSize:et,click:MB,onFilterChange:VY,pivotDetailRef:w,handleFormat:BB,handleCondition:jY,handleAggregate:SY,handleGetTop:$Y,handleConfig:DY,handleClearFilter:OY,handleGetConfig:zY,onDragStart:GY,onDragEnd:UY,onSearch:KY,handleAddField:NY,toggleShowData:QY,handleEnScale:tX,adjustHSL:EC,handleDelFilterTag:ZY,handleInnerFilter:JY,getFilterValue:eX,getPopupContainer:iX}}}),tY={key:0,class:"design-template"},eY=["id"],iY=["onClick"],nY=["title"],oY=["id"],rY={class:"box-tooltip"},sY={class:"box-tooltip"};function lY(i,t,e,n,o,r){var M,B;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),_=v.resolveComponent("pivot-property"),w=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),S=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config"),T=v.resolveComponent("drill-modal");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",tY," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),style:v.normalizeStyle(i.pivotWrapStyle),id:`pivotWrap_${i.id}`,ref:"pivotWrapRef"},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=P=>i.searchText=P),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((M=i.innerFilterFieldList)!=null&&M.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,P=>(v.openBlock(),v.createElementBlock("div",{key:P.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:F=>i.handleInnerFilter(P)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(P.showTitle),5),i.getFilterValue(P.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(P.label)},v.toDisplayString(i.getFilterValue(P.label)),13,nY)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor}),onClick:v.withModifiers(F=>i.handleDelFilterTag(P),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,iY))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,oY),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large",style:v.normalizeStyle({scale:i.scaleValue.widthScale})},null,8,["style"])],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0,getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",rY,v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...P)=>i.toggleShowData&&i.toggleShowData(...P))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])):v.createCommentVNode("",!0),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",sY,v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...P)=>i.handleEnScale&&i.handleEnScale(...P))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:v.normalizeStyle({fontSize:i.fontSize+"px",color:"#416EFF"})},null,8,["style"])):(v.openBlock(),v.createBlock(f,{key:1,style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"]))],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[6]||(t[6]=[v.createElementVNode("span",{class:"box-tooltip"},"设置",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...P)=>i.handleConfig&&i.handleConfig(...P))},[v.createVNode(p,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[7]||(t[7]=[v.createElementVNode("span",{class:"box-tooltip"},"清空状态",-1)])),default:v.withCtx(()=>[i.showClear?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...P)=>i.handleClearFilter&&i.handleClearFilter(...P))},[v.createVNode(m,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"])],4)):v.createCommentVNode("",!0),(B=i.maskList)!=null&&B.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],14,eY),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(_,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(w,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(S,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"]),v.createVNode(T,{ref:"drillModalRef",scaleValue:i.scaleValue,isIframeMode:i.isIframeMode},null,8,["scaleValue","isIframeMode"])],8,["to","disabled"]))}const ab=WB(Ri(QK,[["render",lY],["__scopeId","data-v-debfd767"]])),mB=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:ab},Symbol.toStringTag,{value:"Module"})),aY={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(mB).forEach(n=>{const o=mB[n];o.install&&i.use(o)})}},ZX="",JX="",hY=v.defineComponent({name:"DrillModal",props:{scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})},isIframeMode:{type:Boolean,default:!1}},components:{BorderOutlined:rM,SwitcherOutlined:PM,CloseOutlined:dM,EcanPivotTable:ab},setup(i,{expose:t}){const e={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},n=.37,o=.6,r=.97,s=.9,l=`dmodal_${jr(6)}`,a=()=>document.querySelector("#ProviderConfig > #container")||document.body,h=v.inject("theme","light"),d=v.ref({}),u=v.ref([]),c=v.inject("indicatorUrl",""),g=v.ref([]),f=v.ref(!1),p=v.ref({}),m=v.reactive({keyName:"",visible:!1,columns:[],title:""}),b=v.ref([]),C=v.ref(),_=v.computed(()=>{let B=`drill-modal ${l}`;return f.value&&(B+=" full"),v.unref(h)&&(B+=` ${v.unref(h)}`),B}),w=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);if(P)if(B)P.addEventListener("mousedown",S);else{const F=P.parentElement;F&&(F.style.left="",F.style.top=""),P.removeEventListener("mousedown",S)}},y=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);P&&(B?P.addEventListener("dblclick",R):P.removeEventListener("dblclick",R))},S=B=>{LC(B,`.${l} .ant-modal-header`)},R=()=>{f.value=!f.value,v.nextTick(()=>{f.value?(v.unref(p).width=parseFloat(v.unref(d).width)*r+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*s+"px",w(!1)):(v.unref(p).width=parseFloat(v.unref(d).width)*n+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*o+"px",w(!0))})},A=()=>{f.value=!1,y(!1),w(!1)},x=({drillDimension:B,drillFieldData:P,usedDimensionFields:F,tableProps:H,splitSymbol:E})=>{const k=Ue.cloneDeep(H),{graphicConfig:I,allDimensions:L,pageConfig:D}=k,O=jr(6),W=[];b.value=[...F,B.label],L.value=L,D.value=D;const N=I.indicators.filter($=>$.show).map($=>$.label);N!=null&&N.length&&(m.title=`下钻:${N.join("、")}`);for(const $ of P){const U=L.find(G=>[G.title,G.label].includes($.dimensionKey)),Y=$.value.split(E);let j=$.value;Y!=null&&Y.length&&(j=Y[Y.length-1]),W.push({conditionKey:U.label,conditionLabel:U.title||U.label,conditionName:U.name,conditionValueType:U.genericType,indexCode:U.indexCode,typeGuid:U.typeGuid,indexCodeNum:U.indexCodeNum,rule:"EQUAL",dataType:"",customValue:j})}I.queryColumnList=[B],W!=null&&W.length&&(I.controlList||(I.controlList=[]),I.controlList.push(...W),I.controlList=[{join:"&&",conditions:I.controlList}]),p.value={...k,id:O,keyName:`透视表_${O}`,position:"relative",top:0,left:0,width:parseFloat(v.unref(D).width)*n+"px",height:(i.isIframeMode?parseFloat(v.unref(D).height):window.screen.height)*o+"px",graphicConfig:I},m.visible=!0,v.nextTick(()=>{v.unref(C).refreshData(),y(!0),w(!0)})},T=({type:B,data:P})=>{if(B==="11"&&P){const{indicatorList:F=[],queryColumns:H=[]}=P,k=F.concat(H).filter(D=>D.conditions||D.filter),I=M(k,"conditions",!0),L=M(P.sqlConditions,"sqlConditions",!1);g.value=I.concat(L).map(D=>{const O=v.unref(u).find(N=>N.label===D.label);let W=D.fieldValue;if(W&&typeof W=="string"){const N=W.split(",");(N==null?void 0:N.length)>3&&(W=N.slice(0,3).join(",")+"等")}else W||(W='""');return`${(O==null?void 0:O.title)||D.label} ${e[D.rule]} ${W}`})||[]}};function M(B,P,F){const H=[];for(const E of B)E[P]?H.push(...M(E[P],P,F)):E.filter?H.push({...E.filter,label:E.label}):(!F||E.dataType!=="component"&&!(E.fieldValue.startsWith("${")&&E.fieldValue.endsWith("}")))&&H.push(E);return H}return v.watch(m.visible,B=>{window.modalShow&&window.modalShow(B)}),t({showModal:x}),{theme:h,wrapClassName:_,conditionInfo:g,drillInfo:m,pivotTableConfig:p,indicatorUrl:c,isIndFullScreen:f,usedDimensionFields:b,pivotTableRef:C,toggleFullScreen:R,onDetailCancel:A,onPivotTableChange:T,getContainer:a}}}),dY=["title"];function uY(i,t,e,n,o,r){const s=v.resolveComponent("close-outlined"),l=v.resolveComponent("switcher-outlined"),a=v.resolveComponent("border-outlined"),h=v.resolveComponent("ecan-pivot-table"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{"wrap-class-name":i.wrapClassName,visible:i.drillInfo.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.drillInfo.visible=u),width:"60%",footer:null,maskClosable:!1,destroyOnClose:!0,getContainer:i.getContainer,onCancel:i.onDetailCancel},{title:v.withCtx(()=>[v.createElementVNode("div",{class:"modal-title",title:i.conditionInfo.join("、")},v.toDisplayString(i.drillInfo.title)+" "+v.toDisplayString(i.conditionInfo.join("、")),9,dY)]),closeIcon:v.withCtx(()=>[v.createVNode(s,{class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])]),default:v.withCtx(()=>[v.createElementVNode("div",{class:"zoom-btn",onClick:t[0]||(t[0]=(...u)=>i.toggleFullScreen&&i.toggleFullScreen(...u))},[i.isIndFullScreen?(v.openBlock(),v.createBlock(l,{key:0,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])):(v.openBlock(),v.createBlock(a,{key:1,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"]))]),i.drillInfo.visible?(v.openBlock(),v.createElementBlock("div",{key:0,style:v.normalizeStyle({position:"relative",width:i.pivotTableConfig.width,height:i.pivotTableConfig.height})},[v.createVNode(h,v.mergeProps({ref:"pivotTableRef"},i.pivotTableConfig,{theme:i.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,showClear:!1,isAllowSaveConfig:!1,indicatorUrl:i.indicatorUrl,relateKeyName:i.drillInfo.keyName,usedDimensionFields:i.usedDimensionFields,scaleValue:i.scaleValue,onTableChange:i.onPivotTableChange}),null,16,["theme","indicatorUrl","relateKeyName","usedDimensionFields","scaleValue","onTableChange"])],4)):v.createCommentVNode("",!0)]),_:1},8,["wrap-class-name","visible","getContainer","onCancel"])}const cY=Object.freeze(Object.defineProperty({__proto__:null,default:Ri(hY,[["render",uY],["__scopeId","data-v-412e66d4"]])},Symbol.toStringTag,{value:"Module"}));Je.EcanPivotTable=ab,Je.default=aY,Object.defineProperties(Je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
373
|
+
}`;return Function(`"use strict";return (${q})`)().call(this,K)}function $Y(V){A.value=!0;const{value:K,key:q}=V;v.unref(x)[q]=K,hn({type:"6",data:{key:q,value:K}}),yY()}function Zl(){return n==null?void 0:n.getDrawRange()}const ff=v.ref([]),HB=v.ref(""),EB=v.ref(),GY=(V,K)=>{var Ot,We,Rn,qn,ji;const q=K.dataViewColumns[V.oldIndex]||{},{scope:J}=q;let X=!1,Q=!1;["IDX","BUILT_IN_IDX"].includes(J)?X=!0:["DIM","BUILT_IN_DIM"].includes(J)&&(Q=!0);const tt=Zl(),{rows:ft,columns:Pt,indicators:Qt,records:Ht}=dt,{top:Lt,left:te}=tt;if(v.unref(Oe)){let Xe=i.height;i.isIframeMode&&(Xe=document.body.clientHeight+"px");let oi=v.unref(Be).width;oi.includes("calc")&&(oi=v.unref(Tt)-v.unref(E)+"px"),k.value.main={width:oi,height:Xe,top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)-ae*2+"px",top:0,left:0},k.value.columns={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)/3-ae*2+"px",top:0,left:parseFloat(oi)/2+"px"},k.value.indicators={width:parseFloat(oi)/2-ae*2+"px",height:parseFloat(Xe)*2/3-ae*2+"px",top:parseFloat(Xe)/3+"px",left:parseFloat(oi)/2+"px"}}else{let Xe=50;(Ot=v.unref(Kt))!=null&&Ot.length?Xe=v.unref($).clientHeight:Q&&(U.value=!0,v.unref(oe).height=Xe+"px");let oi=0,$i=1;const Wt=n.getRowHeight(0),ie={columnHeaderTitle:!0};if(Pt!=null&&Pt.length?$i+=Pt.length:ie.columns=[{dimensionKey:jr(6),title:"",width:"100px",type:"columns"}],ft!=null&&ft.length?ft.forEach((Ze,Ge)=>{oi+=n.getColWidth(Ge)}):(oi=100,ie.rows=[{dimensionKey:jr(6),title:"",width:"100px",type:"rows"}]),Qt!=null&&Qt.length||(ie.indicators=[{indicatorKey:jr(6),title:"",width:"20%",format:()=>""}]),(We=Object.keys(ie))!=null&&We.length){const{rows:Ze=[],columns:Ge=[]}=ie;let ze=[];Ht!=null&&Ht.length?ze=Ue.cloneDeep(Ht):(qn=(Rn=v.unref(O))==null?void 0:Rn.records)!=null&&qn.length&&(ze=Ue.cloneDeep((ji=v.unref(O))==null?void 0:ji.records));let Fi=Pt.map(Tn=>Tn.dimensionKey);if(!(Fi!=null&&Fi.length)&&(Ge!=null&&Ge.length)&&(Fi=[Ge[0].dimensionKey]),ze!=null&&ze.length)for(const Tn of ze){for(const Qh of Ze)Tn[Qh.dimensionKey]="";let Jh=!1;for(const Qh in Tn)if(Fi.includes(Qh)){Jh=!0;break}Q?Jh||($i=2,Tn[Fi[0]]=""):X&&(Jh||($i=1))}n.updateOption({...dt,...ie,records:ze})}v.nextTick(()=>{var Fi;const Ze=Zl(),Ge=Ze.width,ze=Ze.height;k.value.main={width:Ge+"px",height:ze+Xe+"px",top:Lt+v.unref($t)+"px",left:te+v.unref(Ft)+v.unref($t)+v.unref(j)+"px"},k.value.rows={width:oi-ae*2+"px",height:ze-ae*2+"px",top:Xe+"px",left:0},k.value.columns={width:Ge-oi-ae*2+"px",height:$i*Wt-ae*2+"px",top:Xe+"px",left:oi+"px"},k.value.indicators={width:Ge-oi-ae*2+"px",height:ze-$i*Wt-ae*2+"px",top:$i*Wt+((Fi=v.unref(Kt))!=null&&Fi.length?Xe:0)+"px",left:oi+"px"},k.value.filters={width:Ge-ae*2+"px",height:Xe-ae*2+"px",top:0,left:0}})}I.value=q,X?ff.value=[0,1]:Q&&(ff.value=[2])},UY=()=>{var V;(V=v.unref(O).records)!=null&&V.length?n.updateOption({...dt,records:v.unref(O).records}):n.updateOption(dt),U.value=!1,v.unref(oe).height="",ff.value=[]},KY=()=>{var V;(V=v.unref(EB))==null||V.handleSearch(v.unref(HB))},LB=v.computed(()=>({defaultSortRule:r.value,dimensionData:s.value,currentClickCell:l.value,dimFilterData:a.value,indFilterData:h.value,filterData:d.value,indFilterConfig:c.value,topNumData:x.value,sortData:T.value,colSortData:M.value,indSortData:B.value,aggregateMap:P.value,subMenuLeft:F.value,subMenuTop:H.value,dragAreaStyle:k.value,showTreeData:L.value,largeVisible:D.value,temporaryData:O.value,splitSymbol:rt,sourceListStyle:ht.value,dimensionFieldList:At.value,indicatorFieldList:mt.value,computedIndKeys:qt.value,computedIndMap:fe.value,computedIndFieldMap:Yt.value,option:dt,loadingRect:Ti.value,calculateList:Lo.value,filterList:Xn.value,topNumMap:$r.value,sortMap:An.value,customDimensions:Fs.value,customIndicators:Kl.value,customRowKeys:Yl.value,customColKeys:Xl.value,toolBoxStyle:Gr.value,scrollTop:W.value,scrollLeft:N.value}));let mb=null;v.watch(LB,V=>{i.isIframeMode&&window.cacheTableData&&window.cacheTableData(V)},{deep:!0});function hn({type:V,data:K}){ct.value=V,e("tableChange",{type:V,data:K})}function YY(){!i.isAllowSaveConfig||!v.unref(ct)||["5"].includes(v.unref(ct))||(mb&&clearTimeout(mb),mb=setTimeout(()=>{hb("save",{keyName:i.relateKeyName||i.keyName,data:v.unref(LB)})},500))}const vb=V=>{r.value=V.defaultSortRule,s.value=V.dimensionData,l.value=V.currentClickCell,a.value=V.dimFilterData,h.value=V.indFilterData,d.value=V.filterData,c.value=V.indFilterConfig,x.value=V.topNumData,T.value=V.sortData,M.value=V.colSortData,B.value=V.indSortData,P.value=V.aggregateMap,F.value=V.subMenuLeft,H.value=V.subMenuTop,k.value=V.dragAreaStyle,L.value=V.showTreeData,D.value=V.largeVisible,O.value=V.temporaryData,rt=V.splitSymbol,ht.value=V.sourceListStyle,At.value=V.dimensionFieldList,mt.value=V.indicatorFieldList,qt.value=V.computedIndKeys,fe.value=V.computedIndMap,Yt.value=V.computedIndFieldMap,Ti.value=V.loadingRect,Lo.value=V.calculateList,Xn.value=V.filterList,$r.value=V.topNumMap,An.value=V.sortMap,Fs.value=V.customDimensions,Kl.value=V.customIndicators,Yl.value=V.customRowKeys,Xl.value=V.customColKeys,Gr.value=V.toolBoxStyle,W.value=V.scrollTop,N.value=V.scrollLeft,Object.assign(dt,V.option),dt.theme=Nt};async function XY(V){var K,q,J;if(A.value=!0,V)vb(V);else if(i.isAllowSaveConfig){const X=await hb("get",{keyName:i.relateKeyName||i.keyName}),Q=((q=(K=X==null?void 0:X.data)==null?void 0:K.data)==null?void 0:q.searchMap)||{};Q!=null&&Q.data&&!Array.isArray(Q.data)&&((J=Object.keys(Q.data))!=null&&J.length)&&vb(Q.data)}gr()}function qY(){return{dimensions:v.unref(At),indicators:v.unref(mt)}}const ZY=V=>{const{scope:K,name:q,label:J}=V;let X=[];["IDX","BUILT_IN_IDX"].includes(K)?X=v.unref(mt):["DIM","BUILT_IN_DIM"].includes(K)&&(X=v.unref(At));const Q=X.findIndex(tt=>tt.name===q);if(Q!==-1){delete v.unref(a)[X[Q].label];const tt=v.unref(Xn).findIndex(ft=>ft.key===J);tt!==-1&&v.unref(Xn).splice(tt,1),X[Q].show?X[Q].isInnerFilter=!1:X.splice(Q,1)}A.value=!0,hn({type:"10",data:{dimensions:v.unref(At),indicators:v.unref(mt)}}),ql()},JY=V=>{const{scope:K,label:q,showTitle:J}=V,X=eP(K);X==="indicator"||X==="dimension"&&TB({dimensionKey:q,value:J})};t({option:dt,refreshData:XY,reRenderTable:vb,click:MB,getDrawRange:Zl,getSaveData:qY}),v.watch(()=>[i.graphicConfig,i.dimensionList,i.indicatorList],()=>{kB()},{immediate:!0,deep:!0});function kB(){const{queryColumnList:V=[],indicators:K=[]}=i.graphicConfig,q=Ue.cloneDeep(V),J=Ue.cloneDeep(K);for(const X of q){const Q=i.dimensionList.find(tt=>tt.key===X.name);X.positionType=(Q==null?void 0:Q.position)||"rows",X.showTitle=X.title||X.label,Q&&(X.width=Q.width)}for(const X of J){const Q=i.indicatorList.find(tt=>tt.key===X.name);X.width=Q==null?void 0:Q.width,X.showTitle=X.label}At.value=q,mt.value=J}const QY=()=>{o.value=!1,L.value=!L.value},tX=()=>{o.value=!1,D.value=!D.value,window.enScale&&window.enScale(v.unref(D))},eX=V=>{const K=v.unref(At).find(Q=>Q.label===V),q=v.unref(mt).find(Q=>Q.label===V),J=K||q,X=v.unref(a)[V];return X?J.genericType==="DATE"?Array.isArray(X)?`${X[0].value}~${X[1].value}`:X.value:X.value&&Array.isArray(X.value)?X.value.join("、"):"":""},iX=V=>V.parentNode;return v.onMounted(()=>{ye()}),{showDefaultTableArea:Oe,maskList:ff,styleData:kt,subMenuLeft:F,subMenuTop:H,pivotWrapRef:S,pivotTableRef:_,pivotFilterRef:u,pivotPropertyRef:g,conditionalPropertyRef:f,chartModalRef:C,pivotTopRef:m,pivotConfigRef:b,drillModalRef:y,pivotAggregateRef:p,filterData:d,loadingRect:Ti,loading:A,isTableInit:o,toolBoxStyle:Gr,indSourceRef:EB,searchText:HB,dragAreaStyle:k,offsetWidth:Ft,showTreeData:L,dataIconStyle:Ee,largeVisible:D,sourceListStyle:ht,defaultTableStyle:Be,innerFilterStyle:oe,innerFilterFieldList:Kt,innerFilterRef:$,showFilterWrap:U,customDimensions:Fs,indicatorFieldList:mt,dimensionFieldList:At,pivotWrapStyle:R,fontSize:et,click:MB,onFilterChange:VY,pivotDetailRef:w,handleFormat:BB,handleCondition:jY,handleAggregate:SY,handleGetTop:$Y,handleConfig:DY,handleClearFilter:OY,handleGetConfig:zY,onDragStart:GY,onDragEnd:UY,onSearch:KY,handleAddField:NY,toggleShowData:QY,handleEnScale:tX,adjustHSL:EC,handleDelFilterTag:ZY,handleInnerFilter:JY,getFilterValue:eX,getPopupContainer:iX}}}),tY={key:0,class:"design-template"},eY=["id"],iY=["onClick"],nY=["title"],oY=["id"],rY={class:"box-tooltip"},sY={class:"box-tooltip"};function lY(i,t,e,n,o,r){var M,B;const s=v.resolveComponent("a-input-search"),l=v.resolveComponent("ind-source-list"),a=v.resolveComponent("filter-outlined"),h=v.resolveComponent("delete-outlined"),d=v.resolveComponent("a-tooltip"),u=v.resolveComponent("a-spin"),c=v.resolveComponent("database-outlined"),g=v.resolveComponent("shrink-outlined"),f=v.resolveComponent("arrows-alt-outlined"),p=v.resolveComponent("setting-outlined"),m=v.resolveComponent("clear-outlined"),b=v.resolveComponent("drag-area"),C=v.resolveComponent("pivot-filter"),_=v.resolveComponent("pivot-property"),w=v.resolveComponent("conditional-property"),y=v.resolveComponent("chart-modal"),S=v.resolveComponent("pivot-aggregate"),R=v.resolveComponent("pivot-top"),A=v.resolveComponent("pivot-detail"),x=v.resolveComponent("pivot-config"),T=v.resolveComponent("drill-modal");return i.pageMode==="design"?(v.openBlock(),v.createElementBlock("div",tY," 透视表格 ")):(v.openBlock(),v.createBlock(v.Teleport,{key:1,to:i.enlargeContainer,disabled:!i.largeVisible},[v.createElementVNode("div",{class:v.normalizeClass(["pivot-wrap",[i.largeVisible?"large":"",i.theme]]),style:v.normalizeStyle(i.pivotWrapStyle),id:`pivotWrap_${i.id}`,ref:"pivotWrapRef"},[i.fullMode?v.withDirectives((v.openBlock(),v.createElementBlock("div",{key:0,class:"data-source-list",style:v.normalizeStyle(i.sourceListStyle)},[v.createVNode(s,{value:i.searchText,"onUpdate:value":t[0]||(t[0]=P=>i.searchText=P),placeholder:"请输入关键字",onSearch:i.onSearch},null,8,["value","onSearch"]),v.createVNode(l,{ref:"indSourceRef",hasChildren:!0,isSub:!1,onOnDragStart:i.onDragStart,onOnDragEnd:i.onDragEnd,config:i.graphicConfig},null,8,["onOnDragStart","onOnDragEnd","config"])],4)),[[v.vShow,i.showTreeData]]):v.createCommentVNode("",!0),v.createElementVNode("div",{style:v.normalizeStyle({width:i.offsetWidth?`calc(100% - ${i.offsetWidth}px)`:"100%"})},[i.isTableInit&&(!i.showDefaultTableArea&&((M=i.innerFilterFieldList)!=null&&M.length)||i.showFilterWrap)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"inner-filter-wrap",style:v.normalizeStyle(i.innerFilterStyle),ref:"innerFilterRef"},[(v.openBlock(!0),v.createElementBlock(v.Fragment,null,v.renderList(i.innerFilterFieldList,P=>(v.openBlock(),v.createElementBlock("div",{key:P.name,class:"filter-tag",style:v.normalizeStyle({backgroundColor:i.adjustHSL(i.styleData.headerBgColor,-4)}),onClick:F=>i.handleInnerFilter(P)},[v.createElementVNode("div",{class:"tag-text",style:v.normalizeStyle({color:i.styleData.headerColor})},v.toDisplayString(P.showTitle),5),i.getFilterValue(P.label)?(v.openBlock(),v.createElementBlock("div",{key:0,class:"filter-value",style:v.normalizeStyle({color:i.adjustHSL(i.styleData.headerColor,8)}),title:i.getFilterValue(P.label)},v.toDisplayString(i.getFilterValue(P.label)),13,nY)):v.createCommentVNode("",!0),v.createElementVNode("span",{class:v.normalizeClass(i.fullMode?"hover-icon-wrap":"")},[v.createVNode(a,{class:"filter-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor})},null,8,["style"]),v.createVNode(d,{placement:"bottom"},{title:v.withCtx(()=>t[5]||(t[5]=[v.createElementVNode("span",null,"删除",-1)])),default:v.withCtx(()=>[v.createVNode(h,{class:"delete-icon",style:v.normalizeStyle({fontSize:i.fontSize+"px",color:i.styleData.headerColor}),onClick:v.withModifiers(F=>i.handleDelFilterTag(P),["stop"])},null,8,["style","onClick"])]),_:2},1024)],2)],12,iY))),128))],4)):v.createCommentVNode("",!0),i.isTableInit&&i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:1,class:"empty-table",style:v.normalizeStyle(i.defaultTableStyle)}," 拖拽左侧数据源到此处 ",4)):v.createCommentVNode("",!0),v.withDirectives(v.createElementVNode("div",{class:"table-instance",style:{width:"100%"},id:i.pageMode!=="design"?`pivotTableContainer_${i.id}`:"",ref:"pivotTableRef"},null,8,oY),[[v.vShow,!i.showDefaultTableArea]])],4),i.loading?(v.openBlock(),v.createElementBlock("div",{key:1,class:"pivot-loading",style:v.normalizeStyle(i.loadingRect)},[v.createVNode(u,{size:"large",style:v.normalizeStyle({scale:i.scaleValue.widthScale})},null,8,["style"])],4)):v.createCommentVNode("",!0),i.pageMode!=="design"&&!i.graphicConfig.preview&&i.isTableInit&&!i.maskList.length&&!i.showDefaultTableArea?(v.openBlock(),v.createElementBlock("div",{key:2,class:"tool-box",style:v.normalizeStyle(i.toolBoxStyle)},[i.fullMode?(v.openBlock(),v.createBlock(d,{key:0,getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",rY,v.toDisplayString(i.showTreeData?"隐藏数据源":"显示数据源"),1)]),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-data",i.theme]),onClick:t[1]||(t[1]=(...P)=>i.toggleShowData&&i.toggleShowData(...P))},[v.createVNode(c,{style:v.normalizeStyle(i.dataIconStyle)},null,8,["style"])],2)]),_:1},8,["getPopupContainer"])):v.createCommentVNode("",!0),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>[v.createElementVNode("span",sY,v.toDisplayString(i.largeVisible?"缩小":"放大"),1)]),default:v.withCtx(()=>[i.showFullScreen?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-large",i.theme]),onClick:t[2]||(t[2]=(...P)=>i.handleEnScale&&i.handleEnScale(...P))},[i.largeVisible?(v.openBlock(),v.createBlock(g,{key:0,style:v.normalizeStyle({fontSize:i.fontSize+"px",color:"#416EFF"})},null,8,["style"])):(v.openBlock(),v.createBlock(f,{key:1,style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"]))],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[6]||(t[6]=[v.createElementVNode("span",{class:"box-tooltip"},"设置",-1)])),default:v.withCtx(()=>[v.createElementVNode("div",{class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[3]||(t[3]=(...P)=>i.handleConfig&&i.handleConfig(...P))},[v.createVNode(p,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)]),_:1},8,["getPopupContainer"]),v.createVNode(d,{getPopupContainer:i.getPopupContainer},{title:v.withCtx(()=>t[7]||(t[7]=[v.createElementVNode("span",{class:"box-tooltip"},"清空状态",-1)])),default:v.withCtx(()=>[i.showClear?(v.openBlock(),v.createElementBlock("div",{key:0,class:v.normalizeClass(["box-item pivot-config",i.theme]),onClick:t[4]||(t[4]=(...P)=>i.handleClearFilter&&i.handleClearFilter(...P))},[v.createVNode(m,{style:v.normalizeStyle({fontSize:i.fontSize+"px"})},null,8,["style"])],2)):v.createCommentVNode("",!0)]),_:1},8,["getPopupContainer"])],4)):v.createCommentVNode("",!0),(B=i.maskList)!=null&&B.length?(v.openBlock(),v.createBlock(b,{key:3,style:v.normalizeStyle(i.dragAreaStyle),maskList:i.maskList,onAdd:i.handleAddField},null,8,["style","maskList","onAdd"])):v.createCommentVNode("",!0)],14,eY),v.createVNode(C,{ref:"pivotFilterRef",data:i.filterData,customDimensions:i.customDimensions,dimensions:i.dimensionFieldList,indicators:i.indicatorFieldList,onChange:i.onFilterChange},null,8,["data","customDimensions","dimensions","indicators","onChange"]),v.createVNode(_,{ref:"pivotPropertyRef",onChange:i.handleFormat},null,8,["onChange"]),v.createVNode(w,{ref:"conditionalPropertyRef",onChange:i.handleCondition},null,8,["onChange"]),v.createVNode(y,{ref:"chartModalRef"},null,512),v.createVNode(S,{ref:"pivotAggregateRef",onConfirm:i.handleAggregate},null,8,["onConfirm"]),v.createVNode(R,{ref:"pivotTopRef",onConfirm:i.handleGetTop},null,8,["onConfirm"]),v.createVNode(A,{ref:"pivotDetailRef"},null,512),v.createVNode(x,{ref:"pivotConfigRef",fullMode:i.fullMode,onConfirm:i.handleGetConfig},null,8,["fullMode","onConfirm"]),v.createVNode(T,{ref:"drillModalRef",scaleValue:i.scaleValue,isIframeMode:i.isIframeMode},null,8,["scaleValue","isIframeMode"])],8,["to","disabled"]))}const ab=WB(Ri(QK,[["render",lY],["__scopeId","data-v-6017afa1"]])),mB=Object.freeze(Object.defineProperty({__proto__:null,EcanPivotTable:ab},Symbol.toStringTag,{value:"Module"})),aY={install:(i,t)=>{const{request:e}=t;i.provide("$request",e),Object.keys(mB).forEach(n=>{const o=mB[n];o.install&&i.use(o)})}},ZX="",JX="",hY=v.defineComponent({name:"DrillModal",props:{scaleValue:{type:Object,default:()=>({widthScale:1,heightScale:1})},isIframeMode:{type:Boolean,default:!1}},components:{BorderOutlined:rM,SwitcherOutlined:PM,CloseOutlined:dM,EcanPivotTable:ab},setup(i,{expose:t}){const e={IN:"属于",NOT_IN:"不属于",LIKE:"包含",NOT_LIKE:"不包含","LIKE%":"开头是","%LIKE":"结尾是",EQUAL:"等于",LESS:"小于",LESS_EQUAL:"小于等于",GREATER:"大于",GREATER_EQUAL:"大于等于",NOT_EQUAL:"不等于"},n=.37,o=.6,r=.97,s=.9,l=`dmodal_${jr(6)}`,a=()=>document.querySelector("#ProviderConfig > #container")||document.body,h=v.inject("theme","light"),d=v.ref({}),u=v.ref([]),c=v.inject("indicatorUrl",""),g=v.ref([]),f=v.ref(!1),p=v.ref({}),m=v.reactive({keyName:"",visible:!1,columns:[],title:""}),b=v.ref([]),C=v.ref(),_=v.computed(()=>{let B=`drill-modal ${l}`;return f.value&&(B+=" full"),v.unref(h)&&(B+=` ${v.unref(h)}`),B}),w=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);if(P)if(B)P.addEventListener("mousedown",S);else{const F=P.parentElement;F&&(F.style.left="",F.style.top=""),P.removeEventListener("mousedown",S)}},y=B=>{const P=document.querySelector(`.${l} .ant-modal-header`);P&&(B?P.addEventListener("dblclick",R):P.removeEventListener("dblclick",R))},S=B=>{LC(B,`.${l} .ant-modal-header`)},R=()=>{f.value=!f.value,v.nextTick(()=>{f.value?(v.unref(p).width=parseFloat(v.unref(d).width)*r+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*s+"px",w(!1)):(v.unref(p).width=parseFloat(v.unref(d).width)*n+"px",v.unref(p).height=(i.isIframeMode?parseFloat(v.unref(d).height):window.screen.height)*o+"px",w(!0))})},A=()=>{f.value=!1,y(!1),w(!1)},x=({drillDimension:B,drillFieldData:P,usedDimensionFields:F,tableProps:H,splitSymbol:E})=>{const k=Ue.cloneDeep(H),{graphicConfig:I,allDimensions:L,pageConfig:D}=k,O=jr(6),W=[];b.value=[...F,B.label],L.value=L,D.value=D;const N=I.indicators.filter($=>$.show).map($=>$.label);N!=null&&N.length&&(m.title=`下钻:${N.join("、")}`);for(const $ of P){const U=L.find(G=>[G.title,G.label].includes($.dimensionKey)),Y=$.value.split(E);let j=$.value;Y!=null&&Y.length&&(j=Y[Y.length-1]),W.push({conditionKey:U.label,conditionLabel:U.title||U.label,conditionName:U.name,conditionValueType:U.genericType,indexCode:U.indexCode,typeGuid:U.typeGuid,indexCodeNum:U.indexCodeNum,rule:"EQUAL",dataType:"",customValue:j})}I.queryColumnList=[B],W!=null&&W.length&&(I.controlList||(I.controlList=[]),I.controlList.push(...W),I.controlList=[{join:"&&",conditions:I.controlList}]),p.value={...k,id:O,keyName:`透视表_${O}`,position:"relative",top:0,left:0,width:parseFloat(v.unref(D).width)*n+"px",height:(i.isIframeMode?parseFloat(v.unref(D).height):window.screen.height)*o+"px",graphicConfig:I},m.visible=!0,v.nextTick(()=>{v.unref(C).refreshData(),y(!0),w(!0)})},T=({type:B,data:P})=>{if(B==="11"&&P){const{indicatorList:F=[],queryColumns:H=[]}=P,k=F.concat(H).filter(D=>D.conditions||D.filter),I=M(k,"conditions",!0),L=M(P.sqlConditions,"sqlConditions",!1);g.value=I.concat(L).map(D=>{const O=v.unref(u).find(N=>N.label===D.label);let W=D.fieldValue;if(W&&typeof W=="string"){const N=W.split(",");(N==null?void 0:N.length)>3&&(W=N.slice(0,3).join(",")+"等")}else W||(W='""');return`${(O==null?void 0:O.title)||D.label} ${e[D.rule]} ${W}`})||[]}};function M(B,P,F){const H=[];for(const E of B)E[P]?H.push(...M(E[P],P,F)):E.filter?H.push({...E.filter,label:E.label}):(!F||E.dataType!=="component"&&!(E.fieldValue.startsWith("${")&&E.fieldValue.endsWith("}")))&&H.push(E);return H}return v.watch(m.visible,B=>{window.modalShow&&window.modalShow(B)}),t({showModal:x}),{theme:h,wrapClassName:_,conditionInfo:g,drillInfo:m,pivotTableConfig:p,indicatorUrl:c,isIndFullScreen:f,usedDimensionFields:b,pivotTableRef:C,toggleFullScreen:R,onDetailCancel:A,onPivotTableChange:T,getContainer:a}}}),dY=["title"];function uY(i,t,e,n,o,r){const s=v.resolveComponent("close-outlined"),l=v.resolveComponent("switcher-outlined"),a=v.resolveComponent("border-outlined"),h=v.resolveComponent("ecan-pivot-table"),d=v.resolveComponent("a-modal");return v.openBlock(),v.createBlock(d,{"wrap-class-name":i.wrapClassName,visible:i.drillInfo.visible,"onUpdate:visible":t[1]||(t[1]=u=>i.drillInfo.visible=u),width:"60%",footer:null,maskClosable:!1,destroyOnClose:!0,getContainer:i.getContainer,onCancel:i.onDetailCancel},{title:v.withCtx(()=>[v.createElementVNode("div",{class:"modal-title",title:i.conditionInfo.join("、")},v.toDisplayString(i.drillInfo.title)+" "+v.toDisplayString(i.conditionInfo.join("、")),9,dY)]),closeIcon:v.withCtx(()=>[v.createVNode(s,{class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])]),default:v.withCtx(()=>[v.createElementVNode("div",{class:"zoom-btn",onClick:t[0]||(t[0]=(...u)=>i.toggleFullScreen&&i.toggleFullScreen(...u))},[i.isIndFullScreen?(v.openBlock(),v.createBlock(l,{key:0,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"])):(v.openBlock(),v.createBlock(a,{key:1,class:v.normalizeClass(["modal-icon",i.theme])},null,8,["class"]))]),i.drillInfo.visible?(v.openBlock(),v.createElementBlock("div",{key:0,style:v.normalizeStyle({position:"relative",width:i.pivotTableConfig.width,height:i.pivotTableConfig.height})},[v.createVNode(h,v.mergeProps({ref:"pivotTableRef"},i.pivotTableConfig,{theme:i.theme,fullMode:!1,allowDrill:!0,showFullScreen:!1,showClear:!1,isAllowSaveConfig:!1,indicatorUrl:i.indicatorUrl,relateKeyName:i.drillInfo.keyName,usedDimensionFields:i.usedDimensionFields,scaleValue:i.scaleValue,onTableChange:i.onPivotTableChange}),null,16,["theme","indicatorUrl","relateKeyName","usedDimensionFields","scaleValue","onTableChange"])],4)):v.createCommentVNode("",!0)]),_:1},8,["wrap-class-name","visible","getContainer","onCancel"])}const cY=Object.freeze(Object.defineProperty({__proto__:null,default:Ri(hY,[["render",uY],["__scopeId","data-v-412e66d4"]])},Symbol.toStringTag,{value:"Module"}));Je.EcanPivotTable=ab,Je.default=aY,Object.defineProperties(Je,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
374
374
|
//# sourceMappingURL=index.umd.js.map
|