stimulsoft-dashboards-js-vuejs 2025.2.4 → 2025.2.5
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/package.json +1 -1
- package/stimulsoft.blockly.editor.mjs +2 -2
- package/stimulsoft.dashboards.mjs +3 -3
- package/stimulsoft.designer.mjs +9 -9
- package/stimulsoft.reports.chart.mjs +2 -2
- package/stimulsoft.reports.d.ts +5 -3
- package/stimulsoft.reports.engine.mjs +21 -21
- package/stimulsoft.reports.export.mjs +5 -5
- package/stimulsoft.reports.import.xlsx.mjs +2 -2
- package/stimulsoft.reports.maps.mjs +2 -2
- package/stimulsoft.viewer.mjs +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Stimulsoft.Dashboards.JS
|
|
3
|
-
Version: 2025.2.
|
|
4
|
-
Build date: 2025.
|
|
3
|
+
Version: 2025.2.5
|
|
4
|
+
Build date: 2025.06.02
|
|
5
5
|
License: https://www.stimulsoft.com/en/licensing/reports
|
|
6
6
|
*/
|
|
7
7
|
import{Stimulsoft}from"./stimulsoft.reports.engine.mjs";function defaultsDeep(t,e){for(var i in e)i in t?defaultsDeep(t[i],e[i]):t[i]=e[i];return t}defaultsDeep(Stimulsoft||{},{Dashboard:{Components:{Panel:{},Button:{},Cards:{},Helpers:{},Chart:{Design:{}},TreeViewBox:{},TreeView:{},Table:{Design:{}},RegionMap:{},Progress:{},PivotTable:{Design:{}},OnlineMap:{},ListBox:{},DatePicker:{},NumberBox:{},ComboBox:{},Gauge:{Design:{}},Indicator:{},Text:{Design:{}},Design:{},Image:{Design:{}},WebContent:{},Shape:{}},Export:{Settings:{},Tools:{},Helpers:{},Painters:{Table:{}}},Interactions:{Design:{}},Helpers:{},Render:{},Visuals:{Gauge:{},Cards:{},Indicator:{},Progress:{Helpers:{}}},Design:{Helpers:{}},Images:{},Options:{},Visualizers:{},Drawing:{Helpers:{},Painters:{}}},Designer:{Dashboards:{}},Reflection:{}});var __={};__.a=Stimulsoft.Dashboard,__.b=Stimulsoft.Designer,__.c=Stimulsoft.Reflection,__.d=__.b.Dashboards,__.e=__.a.Components,__.f=__.a.Export,__.g=__.a.Interactions,__.h=__.a.Helpers,__.i=__.a.Render,__.j=__.a.Visuals,__.k=__.a.Design,__.l=__.a.Images,__.m=__.a.Options,__.n=__.a.Visualizers,__.o=__.a.Drawing,__.p=__.o.Helpers,__.q=__.o.Painters,__.r=__.k.Helpers,__.s=__.j.Gauge,__.t=__.j.Cards,__.u=__.j.Indicator,__.v=__.j.Progress,__.w=__.v.Helpers,__.x=__.g.Design,__.y=__.f.Settings,__.z=__.f.Tools,__.A=__.f.Helpers,__.B=__.f.Painters,__.C=__.B.Table,__.D=__.e.Panel,__.E=__.e.Button,__.F=__.e.Cards,__.G=__.e.Helpers,__.H=__.e.Chart,__.I=__.e.TreeViewBox,__.J=__.e.TreeView,__.K=__.e.Table,__.L=__.e.RegionMap,__.M=__.e.Progress,__.N=__.e.PivotTable,__.O=__.e.OnlineMap,__.P=__.e.ListBox,__.Q=__.e.DatePicker,__.R=__.e.NumberBox,__.S=__.e.ComboBox,__.T=__.e.Gauge,__.U=__.e.Indicator,__.V=__.e.Text,__.W=__.e.Design,__.X=__.e.Image,__.Y=__.e.WebContent,__.Z=__.e.Shape,__._=__.X.Design,__.aa=__.V.Design,__.ab=__.T.Design,__.ac=__.N.Design,__.ad=__.K.Design,__.ae=__.H.Design;{let t;(t=>{t[t["None"]=0]="None",t[t["DecimalDigits"]=1]="DecimalDigits",t[t["DecimalSeparator"]=2]="DecimalSeparator",t[t["GroupSeparator"]=4]="GroupSeparator",t[t["GroupSize"]=8]="GroupSize",t[t["PositivePattern"]=16]="PositivePattern",t[t["NegativePattern"]=32]="NegativePattern",t[t["CurrencySymbol"]=64]="CurrencySymbol",t[t["PercentageSymbol"]=128]="PercentageSymbol",t[t["Abbreviation"]=256]="Abbreviation",t[t["NegativeInRed"]=512]="NegativeInRed"})(t=__.a.StiTextFormatState||(__.a.StiTextFormatState={}));let e;(t=>{t[t["EqualTo"]=0]="EqualTo",t[t["NotEqualTo"]=1]="NotEqualTo",t[t["GreaterThan"]=2]="GreaterThan",t[t["GreaterThanOrEqualTo"]=3]="GreaterThanOrEqualTo",t[t["LessThan"]=4]="LessThan",t[t["LessThanOrEqualTo"]=5]="LessThanOrEqualTo",t[t["Between"]=6]="Between",t[t["NotBetween"]=7]="NotBetween",t[t["Containing"]=8]="Containing",t[t["NotContaining"]=9]="NotContaining",t[t["BeginningWith"]=10]="BeginningWith",t[t["EndingWith"]=11]="EndingWith",t[t["IsNull"]=12]="IsNull",t[t["IsNotNull"]=13]="IsNotNull"})(e=__.a.StiFilterCondition||(__.a.StiFilterCondition={}));let i;(t=>{t[t["Argument"]=0]="Argument",t[t["Value"]=1]="Value",t[t["ValueEnd"]=2]="ValueEnd",t[t["Expression"]=3]="Expression",t[t["ValueOpen"]=4]="ValueOpen",t[t["ValueClose"]=5]="ValueClose",t[t["ValueLow"]=6]="ValueLow",t[t["ValueHigh"]=7]="ValueHigh"})(i=__.a.StiFilterItem||(__.a.StiFilterItem={}));let r;(t=>{t[t["String"]=0]="String",t[t["Numeric"]=1]="Numeric",t[t["DateTime"]=2]="DateTime",t[t["Boolean"]=3]="Boolean",t[t["Expression"]=4]="Expression"})(r=__.a.StiFilterDataType||(__.a.StiFilterDataType={}))}{let t;(t=>{t[t["ArgumentChartMeter"]=1]="ArgumentChartMeter",t[t["SeriesChartMeter"]=2]="SeriesChartMeter",t[t["SortByChartMeter"]=3]="SortByChartMeter",t[t["ValueChartMeter"]=4]="ValueChartMeter",t[t["StartValueChartMeter"]=5]="StartValueChartMeter",t[t["EndValueChartMeter"]=6]="EndValueChartMeter",t[t["OpenValueChartMeter"]=7]="OpenValueChartMeter",t[t["CloseValueChartMeter"]=8]="CloseValueChartMeter",t[t["LowValueChartMeter"]=9]="LowValueChartMeter",t[t["HighValueChartMeter"]=10]="HighValueChartMeter",t[t["WeightChartMeter"]=11]="WeightChartMeter",t[t["XChartMeter"]=12]="XChartMeter",t[t["YChartMeter"]=13]="YChartMeter",t[t["IndicatorValueChartMeter"]=14]="IndicatorValueChartMeter",t[t["MaxGaugeMeter"]=15]="MaxGaugeMeter",t[t["MinGaugeMeter"]=16]="MinGaugeMeter",t[t["SeriesGaugeMeter"]=17]="SeriesGaugeMeter",t[t["ValueGaugeMeter"]=18]="ValueGaugeMeter",t[t["TargetGaugeMeter"]=19]="TargetGaugeMeter",t[t["SeriesIndicatorMeter"]=20]="SeriesIndicatorMeter",t[t["TargetIndicatorMeter"]=21]="TargetIndicatorMeter",t[t["ValueIndicatorMeter"]=22]="ValueIndicatorMeter",t[t["SeriesProgressMeter"]=23]="SeriesProgressMeter",t[t["TargetProgressMeter"]=24]="TargetProgressMeter",t[t["ValueProgressMeter"]=25]="ValueProgressMeter",t[t["LatitudeMapMeter"]=26]="LatitudeMapMeter",t[t["LongitudeMapMeter"]=27]="LongitudeMapMeter",t[t["LocationMapMeter"]=28]="LocationMapMeter",t[t["LocationValueMapMeter"]=29]="LocationValueMapMeter",t[t["LocationColorMapMeter"]=30]="LocationColorMapMeter",t[t["LocationArgumentMapMeter"]=31]="LocationArgumentMapMeter",t[t["KeyMapMeter"]=32]="KeyMapMeter",t[t["NameMapMeter"]=33]="NameMapMeter",t[t["ValueMapMeter"]=34]="ValueMapMeter",t[t["GroupMapMeter"]=35]="GroupMapMeter",t[t["ColorMapMeter"]=36]="ColorMapMeter",t[t["ColorScaleColumn"]=37]="ColorScaleColumn",t[t["DataBarsColumn"]=38]="DataBarsColumn",t[t["DimensionColumn"]=39]="DimensionColumn",t[t["IndicatorColumn"]=40]="IndicatorColumn",t[t["MeasureColumn"]=41]="MeasureColumn",t[t["SparklinesColumn"]=42]="SparklinesColumn",t[t["BubbleColumn"]=43]="BubbleColumn",t[t["ColorScaleCardsColumn"]=44]="ColorScaleCardsColumn",t[t["DataBarsCardsColumn"]=45]="DataBarsCardsColumn",t[t["DimensionCardsColumn"]=46]="DimensionCardsColumn",t[t["IndicatorCardsColumn"]=47]="IndicatorCardsColumn",t[t["MeasureCardsColumn"]=48]="MeasureCardsColumn",t[t["SparklinesCardsColumn"]=49]="SparklinesCardsColumn",t[t["BubbleCardsColumn"]=50]="BubbleCardsColumn",t[t["PivotColumn"]=51]="PivotColumn",t[t["PivotRow"]=52]="PivotRow",t[t["PivotSummary"]=53]="PivotSummary",t[t["NameListBoxMeter"]=54]="NameListBoxMeter",t[t["KeyListBoxMeter"]=55]="KeyListBoxMeter",t[t["KeyTreeViewMeter"]=56]="KeyTreeViewMeter",t[t["KeyTreeViewBoxMeter"]=57]="KeyTreeViewBoxMeter",t[t["NameComboBoxMeter"]=58]="NameComboBoxMeter",t[t["KeyComboBoxMeter"]=59]="KeyComboBoxMeter",t[t["ValueDatePickerMeter"]=60]="ValueDatePickerMeter",t[t["ValueNumberBoxMeter"]=61]="ValueNumberBoxMeter",t[t["TextMeter"]=62]="TextMeter",t[t["TextMeasureMeter"]=63]="TextMeasureMeter",t[t["ImageMeter"]=64]="ImageMeter",t[t["WebContentMeter"]=65]="WebContentMeter"})(t=__.e.StiMeterIdent||(__.e.StiMeterIdent={}))}let StiFilterInclusionMode=Stimulsoft.Report.Dashboard.StiFilterInclusionMode,StiEventMeta=Stimulsoft.Base.Meta.StiEventMeta,StiBlocklyHelper=Stimulsoft.Report.Helpers.StiBlocklyHelper,EventArgs=Stimulsoft.System.EventArgs,StiContainer=Stimulsoft.Report.Components.StiContainer,StiBorder=Stimulsoft.Base.Drawing.StiBorder,StiColorMeta=Stimulsoft.Base.Meta.StiColorMeta,StiEnumMeta=Stimulsoft.Base.Meta.StiEnumMeta,StiNumberMeta=Stimulsoft.Base.Meta.StiNumberMeta,StiObjectMeta=Stimulsoft.Base.Meta.StiObjectMeta,StiStringMeta=Stimulsoft.Base.Meta.StiStringMeta,StiRemoveMeta=Stimulsoft.Base.Meta.StiRemoveMeta,StiStringNullOrEmptyMeta=Stimulsoft.Base.Meta.StiStringNullOrEmptyMeta,StiMath=Stimulsoft.System.StiMath,ImplementsIStiDashboardWatermark=Stimulsoft.Report.Dashboard.ImplementsIStiDashboardWatermark,IStiDashboardWatermark=Stimulsoft.Report.Dashboard.IStiDashboardWatermark,StiAdvancedWatermark=Stimulsoft.Base.Drawing.StiAdvancedWatermark,StiSurfaceViewMode=Stimulsoft.Report.Components.StiSurfaceViewMode,StiAppExpressionParser=Stimulsoft.Report.Helpers.StiAppExpressionParser,StiAppExpressionHelper=Stimulsoft.Base.StiAppExpressionHelper,StiString=Stimulsoft.System.StiString,IStiJsonReportObject=Stimulsoft.Base.JsonReportObject.IStiJsonReportObject,ImplementsIStiDashboard=Stimulsoft.Report.Dashboard.ImplementsIStiDashboard,StiJsonReportObjectHelper=Stimulsoft.Base.StiJsonReportObjectHelper,StiKeyHelper=Stimulsoft.Base.StiKeyHelper,StiSolidBrush=Stimulsoft.Base.Drawing.StiSolidBrush,StiBrush=Stimulsoft.Base.Drawing.StiBrush,StiUnit=Stimulsoft.Report.Units.StiUnit,StiMargins=Stimulsoft.Report.Components.StiMargins,StiDataSourcePicker=Stimulsoft.Data.Engine.StiDataSourcePicker,Color=Stimulsoft.System.Drawing.Color,IStiSkipOwnFilter=Stimulsoft.Report.Dashboard.IStiSkipOwnFilter,IStiUserFilters=Stimulsoft.Data.Engine.IStiUserFilters,StiCrossLinkedFilterHelper=Stimulsoft.Report.Dashboard.Helpers.StiCrossLinkedFilterHelper,IStiFilterElement=Stimulsoft.Report.Dashboard.IStiFilterElement,StiGroupElementHelper=Stimulsoft.Report.Dashboard.StiGroupElementHelper,IStiElement=Stimulsoft.Report.Dashboard.IStiElement,List=Stimulsoft.System.Collections.List,StiElementStyleIdent=Stimulsoft.Report.Dashboard.StiElementStyleIdent,Enum=Stimulsoft.System.Enum,IStiDashboard=Stimulsoft.Report.Dashboard.IStiDashboard,StiPage=Stimulsoft.Report.Components.StiPage,Loc=Stimulsoft.Base.Localization.StiLocalization,SizeD=Stimulsoft.System.Drawing.Size,StiDashboardViewMode=Stimulsoft.Report.Components.StiDashboardViewMode,IStiAltProperties=Stimulsoft.Report.Dashboard.IStiAltProperties,IStiTitleElement=Stimulsoft.Report.Dashboard.IStiTitleElement,RectangleD=Stimulsoft.System.Drawing.Rectangle,StiDashboardContentAlignment=Stimulsoft.Report.Dashboard.StiDashboardContentAlignment,IStiGlobalizationProvider=Stimulsoft.Report.IStiGlobalizationProvider,StiEvent=Stimulsoft.Report.Events.StiEvent,StiMetaHelper=(__.e.StiDashboard=class extends StiPage{implements(){let t=super.implements().concat([IStiDashboard,IStiDashboardWatermark,IStiGlobalizationProvider,...ImplementsIStiDashboard,...ImplementsIStiDashboardWatermark,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(){let t,e=super.clone();return e.dashboardWatermark=null==(t=this.dashboardWatermark)?void 0:t.clone(),e.beginRenderEvent=this.beginRenderEvent.clone(),e.refreshingEvent=this.refreshingEvent.clone(),e}meta(){return[...super.meta(),new StiRemoveMeta(["Margins","MirrorMargins","PrintHeadersFootersFromPreviousPage","PrintOnPreviousPage","StopBeforePrint","LargeHeight","LargeHeightFactor","ResetPageNumber","Watermark","ExcelSheet","CanBreak","Interaction","PaperSourceFirstPage","PaperSourceOfFirstPage","PaperSourceOtherPages","PaperSourceOfOtherPages","ShrinkToFit","UseParentStyles","Conditions","PaperSize","NumberOfCopies","BeginRenderEvent","RenderingEvent","EndRenderEvent","GetToolTipEvent","GetTagEvent","GetBookmarkEvent","GetHyperlinkEvent","BeforePrintEvent","AfterPrintEvent","MouseEnterEvent","MouseLeaveEvent","ClickEvent","DoubleEvent","ColumnBeginRenderEvent","ColumnEndRenderEvent","GetExcelSheetEvent","GetDrillDownReportEvent"]),new StiNumberMeta("Width","",1200),new StiNumberMeta("Height","",600),new StiNumberMeta("DeviceWidth","",480),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Blue),new StiStringNullOrEmptyMeta("Border").get(()=>StiJsonReportObjectHelper.Serialize.jBorder(this.border)).set(t=>this.border=StiJsonReportObjectHelper.Deserialize.border(t.value)).setXml(t=>this.border=StiBorder.loadFromXml(t.textContent)),new StiColorMeta("BackColor","",Color.transparent),new StiEnumMeta("DashboardViewMode","",StiDashboardViewMode,StiDashboardViewMode.Desktop),new StiStringMeta("AltSize","",StiJsonReportObjectHelper.Serialize.sizeD(SizeD.empty)).get(()=>StiJsonReportObjectHelper.Serialize.sizeD(this.altSize)).set(t=>this.altSize=StiJsonReportObjectHelper.Deserialize.sizeD(t.value.toString())).setXml(t=>this.altSize=Stimulsoft.System.Drawing.Size.convertFromXml(t.textContent)),new StiEnumMeta("ContentAlignment","",StiDashboardContentAlignment,StiDashboardContentAlignment.StretchXY),new StiEnumMeta("AltContentAlignment","",StiDashboardContentAlignment,StiDashboardContentAlignment.StretchXY),new StiObjectMeta("DashboardWatermark"),new StiEventMeta("BeginRenderEvent"),new StiEventMeta("RefreshingEvent")]}getMeters(t=!0,e=null){return this.getElements(t,e).selectMany(t=>t.getMeters())}getElements(e=!0,i=null){return null==i?(e?this.getComponentsList():this.components.list)[Stimulsoft.System.StiObject.stimulsoft]().toList().where(t=>t.is(IStiElement)).cast():StiString.isNullOrWhiteSpace(i)?(e?this.getComponentsList():this.components.list)[Stimulsoft.System.StiObject.stimulsoft]().toList().where(t=>t.is(IStiElement)).cast().where(t=>StiString.isNullOrWhiteSpace(StiGroupElementHelper.getGroup(t))).toList():this.report.pages.toList().where(t=>t.isDashboard).selectMany(t=>(e?t.getComponentsList():t.components.list)[Stimulsoft.System.StiObject.stimulsoft]().toList()).where(t=>t.is(IStiElement)).cast().where(t=>StiGroupElementHelper.getGroup(t)==i)}getUserFilters(e){if(null==e)return null;let t=StiGroupElementHelper.getGroup(e),r=this.getElements(!0,t),l=e.as(IStiFilterElement);if(null!=l){if(StiCrossLinkedFilterHelper.isCrossLinkedFilter(l))return null;let t=r.where(t=>t.is(IStiFilterElement)).cast().firstOrDefault(t=>t.getKey()==l.getParentKey());if(null==t)return null;let e=new List,i=t.is(IStiUserFilters)?t.userFilters:null;return null!=i&&e.addRange(i),null!=(i=this.as(IStiDashboard).getUserFilters(t.as(IStiElement)))&&e.addRange(i),e}return r.where(t=>t.is(IStiUserFilters)&&(t!=e||!(t.is(IStiSkipOwnFilter)&&t.allowSkipOwnFilter))).cast().selectMany(this.getUserFilters3)}getUserFilters3(e){if(e.is(IStiFilterElement)&&e.inclusionMode==StiFilterInclusionMode.Always&&(null==e.userFilters||!e.userFilters.any())){let t=e.getIdentityFilters();if(null!=t)return t}return e.userFilters.forEach(t=>t.elementKey=e.as(IStiElement).key),e.userFilters}getUnplacedElements(){return this.getComponents().toList().where(t=>0==t.width||0==t.height).cast()}switchSurfaceViewMode(t){let s,e=t==StiSurfaceViewMode.Desktop?StiDashboardViewMode.Desktop:StiDashboardViewMode.Mobile;if(this.dashboardViewMode==e)return;this.dashboardViewMode=e;let o=!1,a=(this.altSize.isEmpty&&t==StiSurfaceViewMode.Mobile&&(this.altSize=new SizeD(480,800),o=!0,this.altContentAlignment=this.contentAlignment),this.getComponents());for(let n of a.list){let l=n.as(IStiAltProperties);if(null!=l){let t=n.parent,e=(n.parent.components.remove(n),a.getComponentByGuid(l.altParentKey,this)||this),i=(null!=(s=e.as(StiContainer))&&s.components.add(n),l.altParentKey=t.guid,n.clientRectangle.clone()),r=(n.clientRectangle=l.altClientRectangle.clone(),l.altClientRectangle=i,n.as(IStiTitleElement));if(null!=(null==r?void 0:r.title)){let t=r.title.visible;o||(r.title.visible=l.altTitleVisible),l.altTitleVisible=t}}}let i=new SizeD(this.width,this.height),r=(this.width=this.altSize.width,this.height=this.altSize.height,this.altSize=i,this.contentAlignment);this.contentAlignment=this.altContentAlignment,this.altContentAlignment=r}removeMobileSurface(){this.altSize=SizeD.empty;let t=this.getComponents();for(let e of t.list){let t=e.as(IStiAltProperties);null!=t&&(t.altClientRectangle=RectangleD.empty)}this.altContentAlignment=StiDashboardContentAlignment.StretchXY}get isMobileSurfaceSelected(){return this.dashboardViewMode==StiDashboardViewMode.Mobile}get isDesktopSurfaceSelected(){return this.dashboardViewMode==StiDashboardViewMode.Desktop}fetchAllMeters(){return new List}getNestedPages(){return new List}get isEnabled(){return StiAppExpressionHelper.isExpressionSpecified(this,"enabled")?StiAppExpressionParser.parseBoolExpression(this,"enabled",!0):this.enabled}async isEnabledAsync(){return StiAppExpressionHelper.isExpressionSpecified(this,"enabled")?StiAppExpressionParser.parseBoolExpressionAsync(this,"enabled",!0):this.enabled}get isDefined(){return 0<this.components.count}get isQuerable(){return!0}retrieveUsedDataNames(e){return this.getElements(!0,e).selectMany(t=>t.retrieveUsedDataNames(e)).distinct()}getDictionary(){return null!=this.report?this.report.dictionary:null}getDataSources(t){return StiDataSourcePicker.fetch(this,null,t,null!=this.report?this.getDictionary().fetchDataSources():null)}setString(t,e){switch(t){case"Alias":this.alias=e;break}}getString(t){switch(t){case"Alias":return this.alias}throw new Error(`Property with name `+t)}getAllStrings(){return["Alias"]}get serviceCategory(){return Loc.get("Permissions","ItemDashboards")}get localizedName(){return Loc.get("Components","StiDashboard")}get gridSize(){return this.report.info.gridSizePoints}get unit(){return StiUnit.HundredthsOfInch}get brush(){return new StiSolidBrush(this.backColor)}set brush(t){this.backColor=StiBrush.toColor(t)}get skip(){return!0}set skip(t){}convert(t,e,i=!1){}getKey(){return this.key}get key(){return this.guid}set key(t){this.guid=t}get style(){return this._style}set style(t){if(this._style==t)return;t==StiElementStyleIdent.Auto&&(t=Enum.getValues(typeof StiElementStyleIdent).find(t=>t!=StiElementStyleIdent.Auto)),this._style=t}getApp(){return this.report}onRefreshing(t){}invokeRefreshing(){this.onRefreshing(EventArgs.empty),StiBlocklyHelper.invokeBlockly(this.report,this,this.refreshingEvent)}get width(){return this._width2}set width(t){this._width2=StiMath.round2(t,2)}get height(){return this._height2}set height(t){this._height2=StiMath.round2(t,2)}get altSize(){return this._altSize}set altSize(t){this._altSize=t}get dashboardViewMode(){return this._dashboardViewMode}set dashboardViewMode(t){this._dashboardViewMode=t}get contentAlignment(){return this._contentAlignment}set contentAlignment(t){this._contentAlignment=t}get altContentAlignment(){return this._altContentAlignment}set altContentAlignment(t){this._altContentAlignment=t}get deviceWidth(){return this._deviceWidth}set deviceWidth(t){this._deviceWidth=t}get isMobileSurfacePresent(){return!this.altSize.isEmpty}constructor(t=null){super(t),this.backColor=Color.transparent,this.margins=new StiMargins(10,10,10,10),this._style=StiElementStyleIdent.Blue,this.customStyleName="",this.dashboardWatermark=new StiAdvancedWatermark,this.refreshingEvent=new StiEvent,this._width2=1200,this._height2=600,this._altSize=SizeD.empty,this._dashboardViewMode=StiDashboardViewMode.Desktop,this._contentAlignment=StiDashboardContentAlignment.StretchXY,this._altContentAlignment=StiDashboardContentAlignment.StretchXY,this._deviceWidth=480,this.key=StiKeyHelper.generateKey(),this.width=1200,this.height=600}},Stimulsoft.Base.Meta.StiMetaHelper),Type=Stimulsoft.System.Type,IStiLocalizedMeter=Stimulsoft.Base.Meters.IStiLocalizedMeter,IStiMeter=Stimulsoft.Base.Meters.IStiMeter,StiJsonSaveMode=Stimulsoft.Base.StiJsonSaveMode,StiJson=Stimulsoft.Base.StiJson,IStiDimensionMeter=(__.e.StiMeter=class{is(t){if(t instanceof Stimulsoft.System.Interface)return-1!=this.implements().indexOf(t);if("function"==typeof t)return this instanceof t;if(null==t)throw new Error("Type for comparison is 'undefined'");return!1}is2(t){return this.is(t)}as(t){if(this.is(t))return this;return null}implements(){let t=[IStiMeter,IStiLocalizedMeter,IStiJsonReportObject];return(this.implements=()=>t)()}clone(t=!0,e=!0){let i=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return i.key=StiKeyHelper.generateKey(),i}saveToString(){return this.saveToJsonObject(StiJsonSaveMode.Report).serialize()}loadFromString(t){let e=new StiJson;e.deserialize(t),this.loadFromJsonObject(e)}meta(){return[new StiEnumMeta("Ident","",__.e.StiMeterIdent).set(()=>{}).setXml(()=>{}),new StiStringNullOrEmptyMeta("Key"),new StiStringNullOrEmptyMeta("Expression"),new StiStringNullOrEmptyMeta("Label")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}getUniqueCode(){let t=null!=this.expression?this.expression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0;return t=397*(t=397*(t=397*t^Type.getTypeName(this)[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^(null!=this.label?this.label[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.key?this.key[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0),Math.abs(t)}get localizedName(){return""}isDefault(){return null==this.key&&null!=this.expression&&0==this.expression.length&&null!=this.label&&0==this.label.length}toString(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName();return StiString.isNullOrWhiteSpace(this.expression)?t:`${t}-"${this.expression}"`}constructor(t,e,i){this.expression="",this.label="",null==t&&(t=StiKeyHelper.generateKey()),this.key=t,null!=e&&(this.expression=e),null!=i&&(this.label=i)}},Stimulsoft.Base.Meters.IStiDimensionMeter),Dictionary=(__.e.StiDimensionMeter=class extends __.e.StiMeter{implements(){let t=super.implements().concat([IStiDimensionMeter]);return(this.implements=()=>t)()}constructor(t,e,i){super(t,e,i)}},Stimulsoft.System.Collections.Dictionary),Attribute=Stimulsoft.System.Attribute;{class StiExportToolAttribute extends Attribute{constructor(t){super(),this.exportToolTypeName=t}static add(t,e){this.attributes.add(t,new StiExportToolAttribute(e))}}StiExportToolAttribute.attributes=new Dictionary,__.f.StiExportToolAttribute=StiExportToolAttribute}let ImplementsIStiPanelElement=Stimulsoft.Report.Dashboard.ImplementsIStiPanelElement,IStiPanelElement=Stimulsoft.Report.Dashboard.IStiPanelElement,StiBoolMeta=Stimulsoft.Base.Meta.StiBoolMeta,ImplementsIStiCornerRadius=Stimulsoft.Report.Components.ImplementsIStiCornerRadius,IStiCornerRadius=Stimulsoft.Report.Components.IStiCornerRadius,StiCornerRadius=Stimulsoft.Base.Drawing.StiCornerRadius,StiSimpleShadow=Stimulsoft.Base.Drawing.StiSimpleShadow,IStiSimpleShadow=Stimulsoft.Report.Components.IStiSimpleShadow,ImplementsIStiSimpleShadow=Stimulsoft.Report.Components.ImplementsIStiSimpleShadow,Rectangle=Stimulsoft.System.Drawing.Rectangle,ImplementsIStiMargin=Stimulsoft.Report.Dashboard.ImplementsIStiMargin,ImplementsIStiPadding=Stimulsoft.Report.Dashboard.ImplementsIStiPadding,ImplementsIStiPanel=Stimulsoft.Report.Dashboard.ImplementsIStiPanel,ImplementsIStiAltProperties=Stimulsoft.Report.Dashboard.ImplementsIStiAltProperties,StiComponentToolboxPosition=Stimulsoft.Report.Components.StiComponentToolboxPosition,StiEmptyBrush=Stimulsoft.Base.Drawing.StiEmptyBrush,StiToolboxCategory=Stimulsoft.Report.Components.StiToolboxCategory,StiLocalization=Stimulsoft.Base.Localization.StiLocalization,StiSimpleBorder=Stimulsoft.Base.Drawing.StiSimpleBorder,StiPadding=Stimulsoft.Report.Dashboard.StiPadding,StiMargin=Stimulsoft.Report.Dashboard.StiMargin,IStiGroupElement=Stimulsoft.Report.Dashboard.IStiGroupElement,IStiMargin=Stimulsoft.Report.Dashboard.IStiMargin,IStiPadding=Stimulsoft.Report.Dashboard.IStiPadding,IStiPanel=Stimulsoft.Report.Dashboard.IStiPanel,IStiSimpleBorder=Stimulsoft.Report.Components.IStiSimpleBorder,StiPanel=Stimulsoft.Report.Components.StiPanel,StiExportToolAttribute=__.f.StiExportToolAttribute,ImplementsIStiElement=(StiExportToolAttribute.add("StiPanelElement","Stimulsoft.Dashboard.Export.Tools.StiPanelElementExportTool"),__.D.StiPanelElement=class extends StiPanel{implements(){let t=super.implements().concat([IStiSimpleBorder,IStiCornerRadius,IStiSimpleShadow,IStiPanel,IStiPanelElement,IStiPadding,IStiMargin,IStiAltProperties,IStiDashboardWatermark,...ImplementsIStiPanel,...ImplementsIStiCornerRadius,...ImplementsIStiSimpleShadow,...ImplementsIStiPadding,...ImplementsIStiMargin,...ImplementsIStiAltProperties,...ImplementsIStiDashboardWatermark,...ImplementsIStiPanelElement,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r,l,n=super.clone(t);return n.margin=null==(e=this.margin)?void 0:e.clone(),n.padding=null==(i=this.padding)?void 0:i.clone(),n.border2=null==(r=this.border2)?void 0:r.clone(),n.dashboardWatermark=null==(l=this.dashboardWatermark)?void 0:l.clone()[Stimulsoft.System.StiObject.stimulsoft]().as(StiAdvancedWatermark),n}meta(){return[...super.meta(),new StiRemoveMeta(["Border","UseParentStyles","MinSize","MaxSize","Interaction","PrintOn","GrowToHeight","ShiftMode","CanShrink","CanGrow","Printable","Bookmark","Hyperlink","Conditions","GetBookmarkEvent","GetHyperlinkEvent","GetTagEvent","GetToolTipEvent","BeforePrintEvent","AfterPrintEvent","ClickEvent","DoubleEvent","MouseEnterEvent","MouseLeaveEvent","GetDrillDownReportEvent"]),new StiObjectMeta("Margin").get(t=>this.margin.saveToJsonObject(3,3,3,3)),new StiObjectMeta("Padding").get(t=>this.padding.saveToJsonObject(0,0,0,0)),new StiStringNullOrEmptyMeta("Border","border2").get(()=>StiJsonReportObjectHelper.Serialize.jBorder2(this.border2)).set(t=>this.border2=StiJsonReportObjectHelper.Deserialize.simpleBorder(t.value)).setXml(t=>this.border2=StiJsonReportObjectHelper.Deserialize.simpleBorder(t.textContent)),new StiColorMeta("BackColor","",Color.transparent),new StiStringMeta("AltClientRectangle","",StiJsonReportObjectHelper.Serialize.rectangleD(RectangleD.empty)).get(()=>StiJsonReportObjectHelper.Serialize.rectangleD(this.altClientRectangle)).set(t=>this.altClientRectangle=StiJsonReportObjectHelper.Deserialize.rectangleD(t.value)).setXml(t=>this.altClientRectangle=this.loadRectangleDFromXml(t.textContent)),new StiBoolMeta("AltTitleVisible","",!0),new StiStringNullOrEmptyMeta("AltParentKey"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("DashboardWatermark"),new StiStringNullOrEmptyMeta("Style"),new StiStringNullOrEmptyMeta("WatermarkStyle")]}getMeters(t=!0,e=null){return this.getElements(t,e).selectMany(t=>t.getMeters())}getElements(t=!0,e=null){let i=(t?this.getComponents():this.components).toList().where(t=>t.is(IStiElement)).cast();return(null==e?i.where(t=>!t.is(IStiGroupElement)||null==StiGroupElementHelper.getGroup(t)):i.where(t=>StiGroupElementHelper.getGroup(t)==e)).toList()}fetchAllMeters(){return new List}getMeters2(){return new List}getFilterRules(){return new List}getNestedPages(){return new List}get dashboard(){return this.page.as(IStiDashboard)}get isDefined(){return!0}get isQuerable(){return!1}async isEnabledAsync(){return StiAppExpressionHelper.isExpressionSpecified(this,"enabled")?StiAppExpressionParser.parseBoolExpressionAsync(this,"enabled",!0):this.enabled}get zoom(){return null==this.report||null==this.report.info?1:this.report.info.zoom}retrieveUsedDataNames(t){return new List}getDictionary(){return null!=this.report?this.report.dictionary:null}getDataSources(t){var e;return StiDataSourcePicker.fetch(this,null,t,null==(e=this.getDictionary())?void 0:e.fetchDataSources())}get watermarkStyle(){return this._watermarkStyle}set watermarkStyle(e){if(this._watermarkStyle!=e&&(this._watermarkStyle=e,null!=(null==this?void 0:this.report))&&null!=e){let t=this.report.styles.getByName(e);null!=t&&t.setStyleToComponent(this)}}getApp(){return this.report}get toolboxPosition(){return StiComponentToolboxPosition.TextElement}get localizedName(){return StiLocalization.get("Components","StiPanel")}get brush(){return new StiSolidBrush(this.backColor)}set brush(t){this.backColor=StiBrush.toColor(t)}get style(){return this.componentStyle}set style(t){this.componentStyle=t}get serviceCategory(){return Loc.get("Permissions","ItemDashboards")}get localizedCategory(){return this.serviceCategory}get toolboxCategory(){return StiToolboxCategory.Dashboards}canContainIn(t){return t.is(__.e.StiDashboard)}get key(){return this.guid}set key(t){this.guid=t}constructor(t=Rectangle.empty){super(t),this.margin=StiMargin.create(3),this.padding=StiPadding.create(0),this.border2=new StiSimpleBorder,this.backColor=Color.transparent,this.dashboardWatermark=new StiAdvancedWatermark,this._watermarkStyle="",this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.altTitleVisible=!0,this.altClientRectangle=RectangleD.empty,this.defaultClientRectangle=new Rectangle(0,0,300,300),this.helpUrl="user-manual/dashboards_panel.htm",this.key=StiKeyHelper.generateKey(),this.brush=new StiEmptyBrush,this.placeOnToolbox=!0}},Stimulsoft.Report.Dashboard.ImplementsIStiElement),ImplementsIStiBackColor=Stimulsoft.Report.Components.ImplementsIStiBackColor,StiPanelElement=__.D.StiPanelElement,IStiBackColor=Stimulsoft.Report.Components.IStiBackColor,StiComponent=Stimulsoft.Report.Components.StiComponent,StiDataSorter=(__.e.StiElement=class extends StiComponent{implements(){let t=super.implements().concat([IStiElement,IStiSimpleBorder,IStiBackColor,IStiPadding,IStiMargin,IStiAltProperties,...ImplementsIStiElement,...ImplementsIStiBackColor,...ImplementsIStiPadding,...ImplementsIStiMargin,...ImplementsIStiAltProperties,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiRemoveMeta(["UseParentStyles","MinSize","MaxSize","Interaction","PrintOn","GrowToHeight","ShiftMode","CanShrink","CanGrow","Printable","Bookmark","Hyperlink","Conditions","GetBookmarkEvent","GetHyperlinkEvent","GetTagEvent","GetToolTipEvent","BeforePrintEvent","AfterPrintEvent","ClickEvent","DoubleEvent","MouseEnterEvent","MouseLeaveEvent","GetDrillDownReportEvent"]),new StiObjectMeta("Margin").get(t=>this.margin.saveToJsonObject(3,3,3,3)),new StiObjectMeta("Padding").get(t=>this.padding.saveToJsonObject(5,5,5,5)),new StiStringNullOrEmptyMeta("Border","border2").get(()=>StiJsonReportObjectHelper.Serialize.jBorder2(this.border2)).set(t=>this.border2=StiJsonReportObjectHelper.Deserialize.simpleBorder(t.value)).setXml(t=>this.border2=StiJsonReportObjectHelper.Deserialize.simpleBorder(t.textContent)),new StiColorMeta("BackColor","",Color.transparent),new StiStringMeta("AltClientRectangle","",StiJsonReportObjectHelper.Serialize.rectangleD(RectangleD.empty)).get(()=>StiJsonReportObjectHelper.Serialize.rectangleD(this.altClientRectangle)).set(t=>this.altClientRectangle=StiJsonReportObjectHelper.Deserialize.rectangleD(t.value)).setXml(t=>this.altClientRectangle=this.loadRectangleDFromXml(t.textContent)),new StiBoolMeta("AltTitleVisible","",!0),new StiStringNullOrEmptyMeta("AltParentKey","")]}convert(t,e,i=!1){}fetchAllMeters(){return new List}getMeters(){return new List}get dashboard(){return this.page.as(IStiDashboard)}get isDefined(){return!0}get isQuerable(){return!0}async isEnabledAsync(){return StiAppExpressionHelper.isExpressionSpecified(this,"enabled")?StiAppExpressionParser.parseBoolExpressionAsync(this,"enabled",!0):this.enabled}get zoom(){return null!=this.page?this.page.zoom:1}retrieveUsedDataNames2(t){return this.retrieveUsedDataNames()}retrieveUsedDataNames(){return new List}getDictionary(){return null!=this.report?this.report.dictionary:null}getDataSources(t){var e;return StiDataSourcePicker.fetch(this,null,t,null==(e=this.getDictionary())?void 0:e.fetchDataSources())}clone(t){let e,i,r,l=super.clone(t);return l.border2=null==(e=this.border2)?void 0:e.clone(),l.margin=null==(i=this.margin)?void 0:i.clone(),l.padding=null==(r=this.padding)?void 0:r.clone(),l}get backColor(){return this._backColor}set backColor(t){this._backColor=t}get serviceCategory(){return Loc.get("Permissions","ItemDashboards")}canContainIn(t){return t.is(__.e.StiDashboard)||t.is(StiPanelElement)}get localizedCategory(){return this.serviceCategory}get localizedName(){return Loc.get("Components","StiDashboard")}get key(){return this.guid}set key(t){this.guid=t}getNestedPages(){return null}constructor(t=Rectangle.empty){super(t),this.border2=new StiSimpleBorder,this._backColor=Color.transparent,this.margin=StiMargin.create(3),this.padding=StiPadding.create(5),this.altTitleVisible=!0,this.altClientRectangle=RectangleD.empty,this.toolboxCategory=StiToolboxCategory.Dashboards,this.defaultClientRectangle=new Rectangle(0,0,280,280),this.key=StiKeyHelper.generateKey(),this.placeOnToolbox=!0}},Stimulsoft.Data.Engine.StiDataSorter),DataColumn=Stimulsoft.System.Data.DataColumn,StiEmptyCellsAs=Stimulsoft.Report.Dashboard.StiEmptyCellsAs,StiReportParser=Stimulsoft.Report.Dashboard.StiReportParser,StiValueHelper=Stimulsoft.Base.Helpers.StiValueHelper,StiDataGrouper=Stimulsoft.Data.Engine.StiDataGrouper,DataTable=Stimulsoft.System.Data.DataTable,StiDataTable=Stimulsoft.Data.Engine.StiDataTable,StiStringsTableHelper=Stimulsoft.Report.Helpers.StiStringsTableHelper;{class gb{static getIndicatorDataTable(t,e){let i=StiStringsTableHelper.loadStringRowsFromCache(e),r=(null==i&&(i=StiStringsTableHelper.loadStringRowsFromPackedString(t,[this.columnValue,this.columnTarget,this.columnSeries])),new List);if(r.add(new __.U.StiValueIndicatorMeter(null,null,StiLocalization.get("PropertyMain","Value"))),r.add(new __.U.StiTargetIndicatorMeter(null,null,StiLocalization.get("PropertyMain","Target"))),r.add(new __.U.StiSeriesIndicatorMeter(null,null,StiLocalization.get("Chart","Series"))),null==i)return new StiDataTable(r,new List);let l=i[Stimulsoft.System.StiObject.stimulsoft]().toList().groupBy(t=>t[2]).select(t=>[t.sum(t=>this.parseDecimal(t[0],e)),this.sumNullable(t.select(t=>this.parseNullableDecimal(t[1],e)).toList()),this.parseString(t.key,e)]);return new StiDataTable(r,l.toList())}static getProgressDataTable(t,e){let i=StiStringsTableHelper.loadStringRowsFromCache(e),r=(null==i&&(i=StiStringsTableHelper.loadStringRowsFromPackedString(t,[this.columnValue,this.columnTarget,this.columnSeries])),new List);if(r.add(new __.M.StiValueProgressMeter(null,null,StiLocalization.get("PropertyMain","Value"))),r.add(new __.M.StiTargetProgressMeter(null,null,StiLocalization.get("PropertyMain","Target"))),r.add(new __.M.StiSeriesProgressMeter(null,null,StiLocalization.get("Chart","Series"))),null==i)return new StiDataTable(r,new List);let l=i[Stimulsoft.System.StiObject.stimulsoft]().toList().groupBy(t=>t[2]).select(t=>[t.sum(t=>this.parseDecimal(t[0],e)),this.sumNullable(t.select(t=>this.parseNullableDecimal(t[1],e)).toList()),this.parseString(t.key,e)]);return new StiDataTable(r,l.toList())}static getGaugeDataTable(t,e,i){let r=StiStringsTableHelper.loadStringRowsFromCache(i),l=(null==r&&(r=StiStringsTableHelper.loadStringRowsFromPackedString(t,[this.columnValue,this.columnTarget,this.columnSeries])),new List);if(l.add(new __.T.StiValueGaugeMeter(null,null,StiLocalization.get("PropertyMain","Value"))),l.add(new __.T.StiTargetGaugeMeter(null,null,StiLocalization.get("PropertyMain","Target"))),l.add(new __.T.StiSeriesGaugeMeter(null,null,StiLocalization.get("Chart","Series"))),null==r)return new StiDataTable(l,new List);let n;if(e){n=new List;let t=r.find(t=>!0);null!=t&&n.add([this.parseDateTime(t[0],i),this.parseDateTime(t[1],i),this.parseDateTime(t[2],i)])}else n=r[Stimulsoft.System.StiObject.stimulsoft]().toList().groupBy(t=>t[2]).select(t=>[t.sum(t=>this.parseDecimal(t[0],i)),this.sumNullable(t.select(t=>this.parseNullableDecimal(t[1],i)).toList()),this.parseString(t.key,i)]);return new StiDataTable(l,n.toList())}static getChartDataTable(t,s){let e=s.as(__.H.StiChartElement),o={ref:[]},i=StiStringsTableHelper.loadColumnsAndStringRowsFromCache(s,o),a=(null==i&&(i=StiStringsTableHelper.loadColumnsAndStringRowsFromPackedString(t,o)),e.isBubbleChart),r=e.isScatterChart,l=e.isRange,n=e.isFinancial,u=e.isHeatmapChart,S=e.manuallyEnteredChartMeter,m=new List,h=new List;for(let e of o.ref){let t=h.length;switch(e){case this.columnValue:if(a)h.add(new __.H.StiYChartMeter("Value","T.Value","Y"));else if(u)h.add(new __.H.StiValueChartMeter("Value","T.Value",StiLocalization.get("PropertyMain","Values"),S.seriesType));else if(l)h.add(new __.H.StiStartValueChartMeter("Value","Sum(T.Value)",StiLocalization.get("PropertyMain","Values"),S.seriesType));else if(n)h.add(new __.H.StiOpenValueChartMeter("Value","Sum(T.Value)",StiLocalization.get("PropertyMain","OpenValues"),S.seriesType));else{let t=S.clone().as(__.H.StiValueChartMeter);t.expression="Sum(T.Value)",t.label=StiLocalization.get("PropertyMain","Values"),t.key="Value",t.showNulls=StiEmptyCellsAs.ConnectPointsWithLine,t.showZeros=StiEmptyCellsAs.ConnectPointsWithLine,h.add(t)}break;case this.columnEndValue:l&&h.add(new __.H.StiEndValueChartMeter("EndValue","Sum(T.EndValue)",StiLocalization.get("PropertyMain","EndValues")));break;case this.columnCloseValue:n&&h.add(new __.H.StiCloseValueChartMeter("CloseValue","Sum(T.CloseValue)",StiLocalization.get("PropertyMain","CloseValues")));break;case this.columnLowValue:n&&h.add(new __.H.StiLowValueChartMeter("LowValue","Sum(T.LowValue)",StiLocalization.get("PropertyMain","LowValues")));break;case this.columnHighValue:n&&h.add(new __.H.StiHighValueChartMeter("HighValue","Sum(T.HighValue)",StiLocalization.get("PropertyMain","HighValues")));break;case this.columnArgument:a?h.add(new __.H.StiXChartMeter("Argument","T.Argument","X")):u||h.add(new __.H.StiArgumentChartMeter("Argument","T.Argument",StiLocalization.get("PropertyMain","Arguments")));break;case this.columnWeight:a&&h.add(new __.H.StiWeightChartMeter("Weight","Sum(T.Weight)",StiLocalization.get("PropertyMain","Weights")));break;case this.columnSeries:u||h.add(new __.H.StiSeriesChartMeter("Series","T.Series",StiLocalization.get("PropertyMain","Series")));break;case this.columnX:h.add(new __.H.StiXChartMeter("X","T.X","X"));break;case this.columnY:h.add(new __.H.StiYChartMeter("Y","T.Y","Y"));break}h.length!=t&&m.add(e)}if(null==i||!i.some(t=>!0))return new StiDataTable(h,new List);let c=new DataTable;c.tableName="T";for(let n of i){let r=c.newRow(),l=0;for(let i of o.ref){let e=null;switch(i){case this.columnValue:e=this.parseDecimal(n[l],s);break;case this.columnEndValue:e=this.parseDecimal(n[l],s);break;case this.columnCloseValue:e=this.parseDecimal(n[l],s);break;case this.columnLowValue:e=this.parseDecimal(n[l],s);break;case this.columnHighValue:e=this.parseDecimal(n[l],s);break;case this.columnArgument:e=a?this.parseDecimal(n[l],s):this.parseString(n[l],s);break;case this.columnWeight:e=this.parseDecimal(n[l],s);break;case this.columnSeries:e=this.parseString(n[l],s);break;case this.columnX:e=this.parseString(n[l],s);break;case this.columnY:e=this.parseString(n[l],s);break}let t=m.indexOf(i);if(-1!=t){if(!c.columns.contains("T."+i)){let t=new DataColumn("T."+i,"string"==typeof e?String:Number);c.columns.add(t)}r.sett(t,e)}l++}c.rows.add(r)}if(a||r||u){let t=c.rows.toList().select(t=>t.itemArray);return new StiDataTable(h,t)}{let t=StiDataGrouper.group(s.getDictionary(),c,h.toList());return StiDataSorter.sort(t,e.userSorts,e.report,0)}}static sumNullable(t){if(null==t)return null;if(!(t=null==t?void 0:t.where(t=>null!=t)).any())return null;return t.sum()}static parseDateTime(t,e){return null!=t&&t.includes("{")?StiValueHelper.tryToDateTime(StiReportParser.parse2(t,e.report)):StiValueHelper.tryToDateTime(t)}static parseDecimal(t,e){return null!=t&&0<=t.indexOf("{")?StiValueHelper.tryToNumber(StiReportParser.parse2(t,e.report)):StiValueHelper.tryToNumber(t)}static parseNullableDecimal(t,e){return null!=t&&0<=t.indexOf("{")&&(t=StiReportParser.parse2(t,e.report)),StiString.isNullOrWhiteSpace(t)?null:StiValueHelper.tryToNumber(t)}static parseString(t,e){if(null==t)return"";let i="string"==typeof t?t:null==t?void 0:t[Stimulsoft.System.StiObject.stimulsoft]().toString();return null!=i&&0<=i.indexOf("{")?StiReportParser.parse2(i,e.report):i}}gb.columnValue="Value",gb.columnEndValue="EndValue",gb.columnTarget="Target",gb.columnCloseValue="CloseValue",gb.columnLowValue="LowValue",gb.columnHighValue="HighValue",gb.columnArgument="Argument",gb.columnX="X",gb.columnY="Y",gb.columnWeight="Weight",gb.columnSeries="Series",__.e.StiManuallyEnteredDataParser=gb}let IStiMeasureMeter=Stimulsoft.Base.Meters.IStiMeasureMeter,StiTitlePadding=(__.e.StiMeasureMeter=class extends __.e.StiMeter{implements(){let t=super.implements().concat([IStiMeasureMeter]);return(this.implements=()=>t)()}constructor(t,e,i){super(t,e,i)}},Stimulsoft.Report.Dashboard.StiTitlePadding),IStiTitlePadding=Stimulsoft.Report.Dashboard.IStiTitlePadding,StiTextSizeMode=Stimulsoft.Report.Dashboard.StiTextSizeMode,StiFontMeta=Stimulsoft.Base.Meta.StiFontMeta,ImplementsIStiTitle=Stimulsoft.Report.Dashboard.ImplementsIStiTitle,IStiTitle=Stimulsoft.Report.Dashboard.IStiTitle,ICloneable=Stimulsoft.System.ICloneable,Font=Stimulsoft.System.Drawing.Font,StiHorAlignment=Stimulsoft.Base.Drawing.StiHorAlignment;{class StiTitle{implements(){let t=[ICloneable,IStiJsonReportObject,IStiTitle,IStiTitlePadding,...ImplementsIStiTitle];return(this.implements=()=>t)()}meta(){return[new StiStringMeta("Text"),new StiColorMeta("ForeColor","",Color.transparent),new StiColorMeta("BackColor","",Color.transparent),new StiBoolMeta("Visible","",!0),new StiFontMeta("Font","","Arial",11),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Left),new StiEnumMeta("SizeMode","",StiTextSizeMode,StiTextSizeMode.Fit),new StiObjectMeta("Padding").get(t=>this.padding.saveToJsonObject(0,0,0,0))]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new StiTitle;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new StiTitle;return e.loadFromXml(t),e}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}constructor(t,e,i,r,l,n,s,o){this.padding=StiTitlePadding.create(0),this.horAlignment=StiHorAlignment.Left,this.font=new Font("Arial",11),this.backColor=Color.transparent,this.foreColor=Color.transparent,this.text="",this.visible=!0,this.sizeMode=StiTextSizeMode.Fit,null!=t&&(this.text=t),null!=e&&(this.foreColor=e),null!=i&&(this.backColor=i),null!=r&&(this.font=r),null!=l&&(this.horAlignment=l),null!=n&&(this.visible=n),null!=s&&(this.sizeMode=s),null!=o&&(this.padding=o)}}__.e.StiTitle=StiTitle}let StiFontIcons=Stimulsoft.Report.Helpers.StiFontIcons,IStiButtonElementIconSet=Stimulsoft.Report.Dashboard.IStiButtonElementIconSet;{class StiButtonElementIconSet{implements(){let t=[IStiButtonElementIconSet,ICloneable];return(this.implements=()=>t)()}meta(){return[new StiEnumMeta("Icon","",StiFontIcons).check(()=>null!=this.icon),new StiEnumMeta("CheckedIcon","",StiFontIcons).check(()=>null!=this.checkedIcon),new StiEnumMeta("UncheckedIcon","",StiFontIcons).check(()=>null!=this.uncheckedIcon)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new StiButtonElementIconSet;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new StiButtonElementIconSet;return e.loadFromXml(t),e}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}isDefault(){return null==this.icon&&null==this.checkedIcon&&null==this.uncheckedIcon}constructor(t,e){this.icon=null,this.checkedIcon=null,this.uncheckedIcon=null,null!=t&&(this.checkedIcon=t),null!=e&&(this.uncheckedIcon=e)}}__.E.StiButtonElementIconSet=StiButtonElementIconSet}let StiDataFilterCondition=Stimulsoft.Data.Engine.StiDataFilterCondition,StiBrushMeta=Stimulsoft.Base.Meta.StiBrushMeta,StiButtonElementIconSet=__.E.StiButtonElementIconSet,StiIconAlignment=Stimulsoft.Report.Dashboard.StiIconAlignment,StiAlignValue=Stimulsoft.Base.StiAlignValue,StiCopyStyleExtHub=Stimulsoft.Report.Design.StiCopyStyleExtHub,StiStyleBrush=Stimulsoft.Base.Drawing.StiStyleBrush,StiVertAlignment=Stimulsoft.Base.Drawing.StiVertAlignment,StiBorderSides=Stimulsoft.Base.Drawing.StiBorderSides,StiTextHorAlignment=Stimulsoft.Base.Drawing.StiTextHorAlignment,StiGeneralFormatService=Stimulsoft.Report.Components.TextFormats.StiGeneralFormatService,StiDataFilterRule=Stimulsoft.Data.Engine.StiDataFilterRule,StiButtonType=Stimulsoft.Report.Dashboard.StiButtonType,StiNumber=Stimulsoft.System.StiNumber,StiButtonShapeType=Stimulsoft.Base.Drawing.StiButtonShapeType,StiButtonStretch=Stimulsoft.Report.Dashboard.StiButtonStretch,ImplementsIStiButtonElement=Stimulsoft.Report.Dashboard.ImplementsIStiButtonElement,IStiCopyStyleExt=Stimulsoft.Report.Design.IStiCopyStyleExt,IStiWordWrap=Stimulsoft.Report.Components.IStiWordWrap,IStiTextBrush=Stimulsoft.Report.Components.IStiTextBrush,IStiButtonElement=Stimulsoft.Report.Dashboard.IStiButtonElement,ImplementsIStiFixedHeightElement=Stimulsoft.Report.Dashboard.ImplementsIStiFixedHeightElement,ImplementsIStiFont=Stimulsoft.Report.Components.ImplementsIStiFont,ImplementsIStiVertAlignment=Stimulsoft.Report.Components.ImplementsIStiVertAlignment,ImplementsIStiTextHorAlignment=Stimulsoft.Report.Components.ImplementsIStiTextHorAlignment,IStiBrush=Stimulsoft.Report.Components.IStiBrush,IStiFixedHeightElement=Stimulsoft.Report.Dashboard.IStiFixedHeightElement,IStiFont=Stimulsoft.Report.Components.IStiFont,IStiVertAlignment=Stimulsoft.Report.Components.IStiVertAlignment,IStiTextHorAlignment=Stimulsoft.Report.Components.IStiTextHorAlignment;{let e=Stimulsoft.Base.Drawing.SizeD,i=Stimulsoft.Base.Drawing.RectangleD;__.E.StiButtonElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiButtonElement,IStiCopyStyleExt,IStiTextHorAlignment,IStiVertAlignment,IStiWordWrap,IStiFont,IStiFixedHeightElement,IStiBrush,IStiTextBrush,IStiJsonReportObject,...ImplementsIStiButtonElement,...ImplementsIStiTextHorAlignment,...ImplementsIStiVertAlignment,...ImplementsIStiFont,...ImplementsIStiFixedHeightElement]);return(this.implements=()=>t)()}clone(t){let e,i,r,l,n,s,o,a=super.clone(t);return a.brush=null==(e=this.brush)?void 0:e.clone(),a.textBrush=null==(i=this.textBrush)?void 0:i.clone(),a.iconBrush=null==(r=this.iconBrush)?void 0:r.clone(),a.iconSet=null==(l=this.iconSet)?void 0:l.clone(),a.shadow=null==(n=this.shadow)?void 0:n.clone(),a.font=null==(s=this.font)?void 0:s.clone(),a.cornerRadius=null==(o=this.cornerRadius)?void 0:o.clone(),a.visualStates=this.visualStates.clone(),a.clickEvent=this.clickEvent.clone(),a.checkedChangedEvent=this.checkedChangedEvent.clone(),a}meta(){return[...super.meta(),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiStringMeta("Text","","Button"),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiEnumMeta("Type","",StiButtonType,StiButtonType.Button),new StiEnumMeta("ShapeType","",StiButtonShapeType,StiButtonShapeType.Rectangle),new StiEnumMeta("Stretch","",StiButtonStretch,StiButtonStretch.StretchXY),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("Group"),new StiEnumMeta("HorAlignment","",StiTextHorAlignment,StiTextHorAlignment.Center),new StiEnumMeta("VertAlignment","",StiVertAlignment,StiVertAlignment.Center),new StiEnumMeta("IconAlignment","",StiIconAlignment,StiIconAlignment.Left),new StiBoolMeta("WordWrap","",!0),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiBrushMeta("Brush"),new StiBrushMeta("TextBrush"),new StiBrushMeta("IconBrush"),new StiFontMeta("Font","","Arial",10),new StiBoolMeta("Checked"),new StiObjectMeta("IconSet").check(()=>null!=this.iconSet&&!this.iconSet.isDefault()).get(()=>this.iconSet.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.iconSet=StiButtonElementIconSet.createFromJsonObject(t.value)).setXml(t=>this.iconSet=StiButtonElementIconSet.createFromXml(t)),new StiObjectMeta("VisualStates").check(()=>null!=this.visualStates).get(()=>this.visualStates.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.visualStates=__.E.StiButtonVisualStates.createFromJsonObject(t.value)).setXml(t=>this.visualStates=__.E.StiButtonVisualStates.createFromXml(t)),new StiEventMeta("ClickEvent"),new StiEventMeta("CheckedChangedEvent"),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly)]}get isFixedHeight(){return this.stretch==StiButtonStretch.StretchX}get checked(){return this.checkedValue}set checked(t){this.checkedValue!=t&&(this.checkedValue=t)}get stretch(){return this._stretch}set stretch(t){if(this._stretch!=t&&(this._stretch=t)==StiButtonStretch.StretchX&&this.isDesigning){let t=this.getFixedHeight();null!=t&&(this.height=StiNumber.getValueOrDefault(t))}}getIconSet(){return this.iconSet}getVisualStates(){return this.visualStates}get style(){return this._style}set style(t){this._style!=t&&(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}get customStyleName(){return this._customStyleName}set customStyleName(t){this._customStyleName!=t&&(this._customStyleName=t,StiString.isNullOrWhiteSpace(t)||(this._style=StiElementStyleIdent.Custom))}convertFrom(t){}getParentKey(){return""}setParentKey(t){}async applyDefaultFilters(){}getIdentityFilters(){let t=new StiDataFilterRule;return t.condition=StiDataFilterCondition.Any,t.elementKey=this.key,t.toList()}getFonts(){let t=super.getFonts();return t.push(new Font(this.font.name,this.font.size,this.font.style,this.font.unit)),t.push(...this.visualStates.getFonts()),t.filter((t,e,i)=>i.indexOf(t)===e)}get backColor(){return StiBrush.toColor(this.brush)}set backColor(t){this.brush=new StiSolidBrush(t)}get foreColor(){return StiBrush.toColor(this.textBrush)}set foreColor(t){this.textBrush=new StiSolidBrush(t)}invokeSetCopyStyle(){null!=StiCopyStyleExtHub.visualStateDefault&&this.loadFromJsonObject(StiCopyStyleExtHub.visualStateDefault),this.visualStates.invokeSetCopyStyle()}invokeGetCopyStyle(){StiCopyStyleExtHub.visualStateDefault=this.saveToJsonObject(StiJsonSaveMode.Report),this.visualStates.invokeGetCopyStyle()}get toolboxPosition(){return StiComponentToolboxPosition.ButtonElement}get localizedName(){return StiLocalization.get("Components","StiButton")}getFixedHeight(){let t,e=null==(t=this.report)?void 0:t.getCurrentPage();if(null==e)return null;return StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,e.gridSize,!0)}get visualStates(){return this._visualStates}set visualStates(t){t!=this._visualStates&&null!=(this._visualStates=t)&&(t.parent=this)}get isChecked(){return StiAppExpressionHelper.isExpressionSpecified(this,"checked")?StiAppExpressionParser.parseBoolExpression(this,"checked",!0):this.checked}getMinSize(){if(!this.isFixedHeight)return super.getMinSize();let t=this.getFixedHeight();if(null==t)return e.empty;return new e(0,StiNumber.getValueOrDefault(t))}setMinSize(t){this.isFixedHeight||super.setMinSize(t)}getMaxSize(){if(!this.isFixedHeight)return super.getMaxSize();let t=this.getFixedHeight();if(null==t)return e.empty;return new e(0,StiNumber.getValueOrDefault(t))}setMaxSize(t){this.isFixedHeight||super.setMaxSize(t)}invokeCheckedChanged(t,e){}constructor(t=Rectangle.empty){super(t),this.checkedValue=!1,this.shapeType=StiButtonShapeType.Rectangle,this._stretch=StiButtonStretch.StretchXY,this.type=StiButtonType.Button,this.shadow=new StiSimpleShadow,this._style=StiElementStyleIdent.Auto,this._customStyleName="",this.userFilters=new List,this.textFormat=new StiGeneralFormatService,this.font=new Font("Arial",10),this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.cornerRadius=new StiCornerRadius,this.horAlignment=StiTextHorAlignment.Center,this.vertAlignment=StiVertAlignment.Center,this.wordWrap=!0,this.brush=new StiStyleBrush,this.textBrush=new StiStyleBrush,this.defaultClientRectangle=new i(0,0,140,40),this.helpUrl="user-manual/dashboards_data_filtering_button.htm",this.text="Button",this.group="",this.iconAlignment=StiIconAlignment.Left,this.iconBrush=new StiStyleBrush,this.checkedChangedEvent=new StiEvent,this.iconSet=new StiButtonElementIconSet,this.visualStates=new __.E.StiButtonVisualStates,this.border2.side=StiBorderSides.All,this.border2.size=2}}}let StiDefaultBrush=Stimulsoft.Base.Drawing.StiDefaultBrush,IStiButtonVisualState=Stimulsoft.Report.Dashboard.IStiButtonVisualState;{class Wc{constructor(){this.font=null,this.brush=new StiDefaultBrush,this.textBrush=new StiDefaultBrush,this.border=null,this.iconSet=new __.E.StiButtonElementIconSet,this.iconBrush=new StiDefaultBrush}implements(){let t=[IStiButtonVisualState,ICloneable];return(this.implements=()=>t)()}meta(){return[new StiBrushMeta("Brush").check(()=>null!=this.brush),new StiBrushMeta("TextBrush").check(()=>null!=this.textBrush),new StiBrushMeta("IconBrush").check(()=>null!=this.iconBrush),new StiStringNullOrEmptyMeta("Font").check(()=>null!=this.font).get(()=>StiJsonReportObjectHelper.Serialize.font(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,null)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiStringNullOrEmptyMeta("Border").check(()=>null!=this.border).get(()=>StiJsonReportObjectHelper.Serialize.jBorder2(this.border)).set(t=>this.border=StiJsonReportObjectHelper.Deserialize.simpleBorder(t.value)).setXml(t=>this.border=StiJsonReportObjectHelper.Deserialize.simpleBorder(t.textContent)),new StiObjectMeta("IconSet").check(()=>null!=this.iconSet&&!this.iconSet.isDefault()).get(()=>this.iconSet.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.iconSet=__.E.StiButtonElementIconSet.createFromJsonObject(t.value)).setXml(t=>this.iconSet=__.E.StiButtonElementIconSet.createFromXml(t))]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new Wc;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new Wc;return e.loadFromXml(t),e}clone(){let t,e,i,r,l,n,s=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return s.border=null==(t=this.border)?void 0:t.clone(),s.brush=null==(e=this.brush)?void 0:e.clone(),s.textBrush=null==(i=this.textBrush)?void 0:i.clone(),s.iconBrush=null==(r=this.iconBrush)?void 0:r.clone(),s.font=null==(l=this.font)?void 0:l.clone(),s.iconSet=null==(n=this.iconSet)?void 0:n.clone(),s}getIconSet(){return this.iconSet}}__.E.StiButtonVisualState=Wc}let IStiGetFonts=Stimulsoft.Base.IStiGetFonts,IStiButtonVisualStates=Stimulsoft.Report.Dashboard.IStiButtonVisualStates;{class q2{implements(){let t=[IStiButtonVisualStates,ICloneable,IStiGetFonts,IStiCopyStyleExt];return(this.implements=()=>t)()}meta(){return[new StiObjectMeta("Hover").check(()=>null!=this.hover).get(()=>this.hover.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.hover=__.E.StiButtonVisualState.createFromJsonObject(t.value)).setXml(t=>this.hover=__.E.StiButtonVisualState.createFromXml(t)),new StiObjectMeta("Pressed").check(()=>null!=this.pressed).get(()=>this.pressed.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.pressed=__.E.StiButtonVisualState.createFromJsonObject(t.value)).setXml(t=>this.pressed=__.E.StiButtonVisualState.createFromXml(t)),new StiObjectMeta("Checked").check(()=>null!=this.checked).get(()=>this.checked.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.checked=__.E.StiButtonVisualState.createFromJsonObject(t.value)).setXml(t=>this.checked=__.E.StiButtonVisualState.createFromXml(t))]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new q2;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new q2;return e.loadFromXml(t),e}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.hover=this.hover.clone(),t.pressed=this.pressed.clone(),t.checked=this.checked.clone(),t}getFonts(){let t=new List;return t.add(this.hover.font),t.add(this.pressed.font),t.add(this.checked.font),t.distinct().toList()}invokeSetCopyStyle(){null!=StiCopyStyleExtHub.visualStateHover&&(this.hover=new __.E.StiButtonVisualState,this.hover.loadFromJsonObject(StiCopyStyleExtHub.visualStateHover)),null!=StiCopyStyleExtHub.visualStatePressed&&(this.pressed=new __.E.StiButtonVisualState,this.pressed.loadFromJsonObject(StiCopyStyleExtHub.visualStatePressed)),null!=StiCopyStyleExtHub.visualStateChecked&&(this.checked=new __.E.StiButtonVisualState,this.checked.loadFromJsonObject(StiCopyStyleExtHub.visualStateDisabled))}invokeGetCopyStyle(){StiCopyStyleExtHub.visualStateHover=this.hover.saveToJsonObject(StiJsonSaveMode.Report),StiCopyStyleExtHub.visualStatePressed=this.pressed.saveToJsonObject(StiJsonSaveMode.Report),StiCopyStyleExtHub.visualStateChecked=this.checked.saveToJsonObject(StiJsonSaveMode.Report)}getHoverState(){return this.hover}getPressedState(){return this.pressed}getCheckedState(){return this.checked}get hover(){return this._hover}set hover(t){this._hover!=t&&null!=(this._hover=t)&&(t.parent=this.parent)}get pressed(){return this._pressed}set pressed(t){this._pressed!=t&&null!=(this._pressed=t)&&(t.parent=this.parent)}get checked(){return this._checked}set checked(t){this._checked!=t&&null!=(this._checked=t)&&(t.parent=this.parent)}constructor(){this.hover=new __.E.StiButtonVisualState,this.pressed=new __.E.StiButtonVisualState,this.checked=new __.E.StiButtonVisualState}}__.E.StiButtonVisualStates=q2}let StiActivator=Stimulsoft.Base.StiActivator,IStiDashboardInteraction=(__.x.StiDashboardInteractionLoader=class{static loadInteractionFromJsonObject(t){let e=t.properties().firstOrDefault(t=>"Ident"==t.name).value.toString(),i=__.x.StiDashboardInteractionCreator.new2(e);return i.loadFromJsonObject(t),i}static loadInteractionFromXml(i){let t=i.attributes.getNamedItem("type");if(null!=t){let e=i.attributes.getNamedItem("type").value;if(!StiString.isNullOrEmpty(e)){let t=StiActivator.createObject2(e);if(null!=t)return t.loadFromXml(i),t}}return null}},Stimulsoft.Report.Dashboard.IStiDashboardInteraction),StiInteractionOnHover=Stimulsoft.Report.Dashboard.StiInteractionOnHover,StiInteractionOnClick=Stimulsoft.Report.Dashboard.StiInteractionOnClick,StiInteractionOpenHyperlinkDestination=Stimulsoft.Report.Dashboard.StiInteractionOpenHyperlinkDestination,StiInteractionIdent=Stimulsoft.Report.Dashboard.StiInteractionIdent,StiAvailableInteractionOnClick=Stimulsoft.Report.Dashboard.StiAvailableInteractionOnClick,StiAvailableInteractionOnHover=Stimulsoft.Report.Dashboard.StiAvailableInteractionOnHover,StiAvailableInteractionOnDataManipulation=Stimulsoft.Report.Dashboard.StiAvailableInteractionOnDataManipulation,StiDashboardInteractionLoader=(__.g.StiDashboardInteraction=class{implements(){let t=[IStiDashboardInteraction,IStiJsonReportObject];return(this.implements=()=>t)()}is(t){if(t instanceof Stimulsoft.System.Interface)return-1!=this.implements().indexOf(t);if("function"==typeof t)return this instanceof t;if(null==t)throw new Error("Type for comparison is 'undefined'");return!1}is2(t){return this.is(t)}as(t){if(this.is(t))return this;return null}clone(t=!0,e=!0){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}meta(){return[new StiEnumMeta("Ident","",StiInteractionIdent),new StiEnumMeta("OnHover","",StiInteractionOnHover),new StiEnumMeta("OnClick","",StiInteractionOnClick),new StiEnumMeta("HyperlinkDestination","",StiInteractionOpenHyperlinkDestination),new StiStringNullOrEmptyMeta("ToolTip"),new StiStringNullOrEmptyMeta("DrillDownPageKey"),new StiStringNullOrEmptyMeta("Hyperlink"),new StiObjectMeta("DrillDownParameters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.drillDownParameters,t)).set(t=>this.drillDownParameters.addRange(t.value.properties().select(t=>__.g.StiDashboardDrillDownParameter.loadFromJson(t.value)))).setXml(t=>this.drillDownParameters.addRange(t.childNodes.map(t=>__.g.StiDashboardDrillDownParameter.loadFromXml(t))))]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}isDefault(){return this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.ApplyFilter&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)}getDrillDownParameters(){return this.drillDownParameters.cast().toList()}setDrillDownParameters(t){this.drillDownParameters=new List,null!=t&&t.forEach(t=>{let e=new __.g.StiDashboardDrillDownParameter;e.name=t["name"],e.expression=t["expression"],this.drillDownParameters.add(e)})}constructor(t,e,i,r,l,n,s){this.availableOnClick=StiAvailableInteractionOnClick.All,this.availableOnHover=StiAvailableInteractionOnHover.All,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.None,this.onHover=StiInteractionOnHover.ShowToolTip,this.onClick=StiInteractionOnClick.ApplyFilter,this.hyperlinkDestination=StiInteractionOpenHyperlinkDestination.NewTab,this.toolTip="",this.hyperlink="",this.drillDownPageKey="",this.drillDownParameters=new List,null!=t&&(this.onHover=t),null!=e&&(this.onClick=e),null!=i&&(this.hyperlinkDestination=i),null!=r&&(this.toolTip=r),null!=l&&(this.hyperlink=l),null!=n&&(this.drillDownPageKey=n),null!=s&&(this.drillDownParameters=s)}},__.g.StiCardsColumnDashboardInteraction=class extends __.g.StiDashboardInteraction{isDefault(){return this.onHover==StiInteractionOnHover.None&&this.onClick==StiInteractionOnClick.None&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)}constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.CardsColumn,this.availableOnClick=StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.onHover=StiInteractionOnHover.None,this.onClick=StiInteractionOnClick.None}},__.x.StiDashboardInteractionLoader),StiCardsColumnDashboardInteraction=__.g.StiCardsColumnDashboardInteraction,IStiElementInteraction=Stimulsoft.Report.Dashboard.IStiElementInteraction,IStiCardsColumn=Stimulsoft.Base.Meters.IStiCardsColumn,StiCardsColumnVisibility=Stimulsoft.Base.Drawing.StiCardsColumnVisibility,ImplementsIStiForeColor=Stimulsoft.Report.Components.ImplementsIStiForeColor,ImplementsIStiHorAlignment=Stimulsoft.Report.Components.ImplementsIStiHorAlignment,StiFormatService=Stimulsoft.Report.Components.TextFormats.StiFormatService,IStiForeColor=Stimulsoft.Report.Components.IStiForeColor,IStiTextFormat=Stimulsoft.Report.Components.IStiTextFormat,IStiHorAlignment=Stimulsoft.Report.Components.IStiHorAlignment,IStiDataTopN=Stimulsoft.Data.Engine.IStiDataTopN,StiDataTopN=Stimulsoft.Data.Engine.StiDataTopN,IStiMeasureCardsColumn=(__.F.StiCardsColumn=class extends __.e.StiMeter{implements(){let t=super.implements().concat([IStiCardsColumn,IStiHorAlignment,IStiVertAlignment,IStiForeColor,IStiTextFormat,IStiFont,IStiWordWrap,IStiDataTopN,IStiElementInteraction,...ImplementsIStiHorAlignment,...ImplementsIStiForeColor,...ImplementsIStiFont]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiEnumMeta("VertAlignment","",StiVertAlignment,StiVertAlignment.Center),new StiNumberMeta("Height",""),new StiBoolMeta("WrapLine","",!0),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>{let e=StiFormatService.loadFormatFromXml(t);null!=e&&(this.textFormat=e)}),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiColorMeta("ForeColor","",Color.transparent),new StiEnumMeta("Visibility","",StiCardsColumnVisibility,StiCardsColumnVisibility.True),new StiFontMeta("Font","","Arial",10),new StiStringNullOrEmptyMeta("VisibilityExpression").check(()=>null!=this.visibilityExpression),new StiBoolMeta("WordWrap",""),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiCardsColumnDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiCardsColumnDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiCardsColumnDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}clone(){let t=super.clone();return t.textFormat=this.textFormat.clone(),t.dashboardInteraction=this.dashboardInteraction.clone(),t.topN=this.topN.clone(),t}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.horAlignment)^this.vertAlignment)^(null!=this.textFormat?this.textFormat[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^this.visibility[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.wrapLine[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.wordWrap[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.height[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^(null!=this.topN?this.topN[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0),null!=this.visibilityExpression&&(t=397*t^this.visibilityExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode()),Math.abs(t)}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){super(t,e,i),this.horAlignment=StiHorAlignment.Center,this.vertAlignment=StiVertAlignment.Center,this.textFormat=new StiGeneralFormatService,this.topN=new StiDataTopN,this.font=new Font("Arial",10),this.foreColor=Color.transparent,this.dashboardInteraction=new StiCardsColumnDashboardInteraction,this.wrapLine=!0,this.height=0,this.wordWrap=!1,this.visibility=StiCardsColumnVisibility.True,this.visibilityExpression=null,null!=r&&(this.horAlignment=r),null!=l&&(this.vertAlignment=l),null!=s&&(this.textFormat=s),null!=o&&(this.visibility=o),null!=a&&(this.visibilityExpression=a),null!=u&&(this.foreColor=u),null!=n&&(this.height=n),null!=S&&(this.wrapLine=S),null!=m&&(this.wordWrap=m),null!=h&&(this.dashboardInteraction=h),null!=c&&(this.topN=c)}},Stimulsoft.Base.Meters.IStiMeasureCardsColumn),StiCardsColumn=__.F.StiCardsColumn,IStiMeasureColumn=Stimulsoft.Base.Meters.IStiMeasureColumn,StiMeasureCardsColumn=(__.F.StiMeasureCardsColumn=class extends StiCardsColumn{implements(){let t=super.implements().concat([IStiMeasureMeter,IStiMeasureColumn,IStiMeasureCardsColumn]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("Dashboard","Measure")}constructor(t,e,i,r,l,n,s,o,a,u,S){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.MeasureCardsColumn}},__.F.StiMeasureCardsColumn),StiColor=Stimulsoft.Base.Drawing.StiColor,IStiBubbleColumn=Stimulsoft.Base.Meters.IStiBubbleColumn,IStiDimensionCardsColumn=(__.F.StiBubbleCardsColumn=class extends StiMeasureCardsColumn{implements(){let t=super.implements().concat([IStiBubbleColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiBoolMeta("AllowCustomColors"),new StiColorMeta("PositiveColor","",StiColor.get("537eb6")),new StiColorMeta("NegativeColor","",StiColor.get("ff0000"))]}getUniqueCode(){let t=super.getUniqueCode();return t=397*t^this.horAlignment[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}get localizedName(){return Loc.get("Chart","Bubble")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){super(t,e,i,r,l,n,s,o,a,u,c),this.ident=__.e.StiMeterIdent.BubbleCardsColumn,this.allowCustomColors=!1,this.positiveColor=StiColor.get("537eb6"),this.negativeColor=StiColor.get("ff0000"),this.horAlignment=StiHorAlignment.Center,null!=S&&(this.allowCustomColors=S),null!=m&&(this.positiveColor=m),null!=h&&(this.negativeColor=h)}},Stimulsoft.Base.Meters.IStiDimensionCardsColumn),IStiArgumentMeter=(__.F.StiDimensionCardsColumn=class extends StiCardsColumn{implements(){let t=super.implements().concat([IStiDimensionMeter,IStiDimensionCardsColumn]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("Dashboard","Dimension")}constructor(t,e,i,r,l,n,s,o,a,u,S){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.DimensionCardsColumn}},__.G.StiMeterLoader=class{static loadFromJson2(t){let e=new List;return t.forEach(t=>e.add(this.loadFromJson(t))),e.where(t=>null!=t)}static loadFromJson(i){let r=i.properties().firstOrDefault(t=>"Ident"==t.name);if(null!=r){let t=r.value.toString(),e=__.G.StiMeterCreator.neww(t);if(null!=e)return e.loadFromJsonObject(i),e}return null}static loadFromXml(i){let t=i.attributes.getNamedItem("type");if(null!=t){let e=i.attributes.getNamedItem("type").value;if(!StiString.isNullOrEmpty(e)){let t=StiActivator.createObject2(e);if(null!=t)return t.loadFromXml(i),t}}return null}},__.H.StiIndicatorValueChartMeter=class extends __.e.StiMeasureMeter{get localizedName(){return Loc.get("PropertyMain","IndicatorValue")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.IndicatorValueChartMeter}},Stimulsoft.Base.Meters.IStiArgumentMeter),IStiValueMeter=(__.H.StiArgumentChartMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiArgumentMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Argument")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ArgumentChartMeter}},Stimulsoft.Base.Meters.IStiValueMeter),StiTableColumnVisibility=(__.I.StiKeyTreeViewBoxMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Key")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.KeyTreeViewBoxMeter}},__.J.StiKeyTreeViewMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Key")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.KeyTreeViewMeter}},__.g.StiTableColumnDashboardInteraction=class extends __.g.StiDashboardInteraction{isDefault(){return this.onHover==StiInteractionOnHover.None&&this.onClick==StiInteractionOnClick.None&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)}constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.TableColumn,this.availableOnClick=StiAvailableInteractionOnClick.ApplyFilter|StiAvailableInteractionOnClick.ShowDashboard,this.onHover=StiInteractionOnHover.None,this.onClick=StiInteractionOnClick.None}},Stimulsoft.Base.Drawing.StiTableColumnVisibility),IStiDataFormat=Stimulsoft.Data.Engine.IStiDataFormat,StiTimeFormatService=Stimulsoft.Report.Components.TextFormats.StiTimeFormatService,StiDateFormatService=Stimulsoft.Report.Components.TextFormats.StiDateFormatService,StiNumberFormatService=Stimulsoft.Report.Components.TextFormats.StiNumberFormatService,StiCurrencyFormatService=Stimulsoft.Report.Components.TextFormats.StiCurrencyFormatService,StiPercentageFormatService=Stimulsoft.Report.Components.TextFormats.StiPercentageFormatService,StiBooleanFormatService=Stimulsoft.Report.Components.TextFormats.StiBooleanFormatService,StiDataFormatKind=Stimulsoft.Data.Engine.StiDataFormatKind,StiSummaryColumnType=Stimulsoft.Base.StiSummaryColumnType,StiTableColumnDashboardInteraction=__.g.StiTableColumnDashboardInteraction,ImplementsIStiTextFormat=Stimulsoft.Report.Components.ImplementsIStiTextFormat,IStiTableColumn=Stimulsoft.Base.Meters.IStiTableColumn,IStiIndicatorColumn=(__.K.StiTableColumn=class extends __.e.StiMeter{implements(){let t=super.implements().concat([IStiHorAlignment,IStiTextFormat,IStiTableColumn,IStiDataFormat,IStiForeColor,IStiDataTopN,...ImplementsIStiHorAlignment,...ImplementsIStiTextFormat,...ImplementsIStiForeColor,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Left),new StiEnumMeta("SummaryAlignment","",StiHorAlignment,StiHorAlignment.Right),new StiEnumMeta("HeaderAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>{let e=StiFormatService.loadFormatFromXml(t);null!=e&&(this.textFormat=e)}),new StiColorMeta("ForeColor","",Color.transparent),new StiBoolMeta("ShowTotalSummary"),new StiEnumMeta("SummaryType","",StiSummaryColumnType,StiSummaryColumnType.Sum),new StiBoolMeta("Visible","",!0).check(()=>!1),new StiEnumMeta("Visibility","",StiTableColumnVisibility,StiTableColumnVisibility.True),new StiStringNullOrEmptyMeta("VisibilityExpression").check(()=>null!=this.visibilityExpression),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiTableColumnDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiTableColumnDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiTableColumnDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}clone(){let t=super.clone();return t.textFormat=this.textFormat.clone(),t.dashboardInteraction=this.dashboardInteraction.clone(),t.topN=this.topN.clone(),t}getDataFormat(){if(this.textFormat.is(StiBooleanFormatService))return StiDataFormatKind.Boolean;if(this.textFormat.is(StiPercentageFormatService))return StiDataFormatKind.Percentage;if(this.textFormat.is(StiCurrencyFormatService))return StiDataFormatKind.Currency;if(this.textFormat.is(StiNumberFormatService))return StiDataFormatKind.Number;if(this.textFormat.is(StiDateFormatService))return StiDataFormatKind.Date;if(this.textFormat.is(StiTimeFormatService))return StiDataFormatKind.Time;return StiDataFormatKind.General}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.horAlignment)^this.summaryAlignment)^this.headerAlignment)^this.summaryType)^(null!=this.textFormat?this.textFormat[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^this.visibility[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^(null!=this.topN?this.topN[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0),null!=this.visibilityExpression&&(t=397*t^this.visibilityExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode()),Math.abs(t)}get visible(){return this.visibility==StiTableColumnVisibility.True}set visible(t){this.visibility=t?StiTableColumnVisibility.True:StiTableColumnVisibility.False}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){super(t,e,i),this.horAlignment=StiHorAlignment.Left,this.textFormat=new StiGeneralFormatService,this.topN=new StiDataTopN,this.foreColor=Color.transparent,this.dashboardInteraction=new StiTableColumnDashboardInteraction,this.visibility=StiTableColumnVisibility.True,this.visibilityExpression=null,this.showTotalSummary=!1,this.summaryType=StiSummaryColumnType.Sum,this.summaryAlignment=StiHorAlignment.Right,this.headerAlignment=StiHorAlignment.Center,null!=r&&(this.horAlignment=r),null!=l&&(this.textFormat=l),null!=n&&(this.visibility=n),null!=s&&(this.visibilityExpression=s),null!=a&&(this.showTotalSummary=a),null!=S&&(this.summaryAlignment=S),null!=m&&(this.headerAlignment=m),null!=u&&(this.summaryType=u),null!=o&&(this.foreColor=o),null!=h&&(this.dashboardInteraction=h),null!=c&&(this.topN=c)}},__.K.StiMeasureColumn=class extends __.K.StiTableColumn{implements(){let t=super.implements().concat([IStiMeasureMeter,IStiMeasureColumn]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("Dashboard","Indicator")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h){super(t,e,i,r,l,n,s,o,a,u,S,m,h),this.ident=__.e.StiMeterIdent.MeasureColumn}},Stimulsoft.Base.Meters.IStiIndicatorColumn),IStiColorScaleColumn=(__.K.StiIndicatorColumn=class extends __.K.StiMeasureColumn{implements(){let t=super.implements().concat([IStiIndicatorColumn]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("Dashboard","Dimension")}constructor(t,e,i,r,l,n,s,o,a,u,S){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.IndicatorColumn}},Stimulsoft.Base.Meters.IStiColorScaleColumn),IStiDataBarsColumn=(__.K.StiColorScaleColumn=class extends __.K.StiMeasureColumn{implements(){let t=super.implements().concat([IStiColorScaleColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiColorMeta("MinimumColor","",Color.red),new StiColorMeta("MaximumColor","",Color.green)]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*t^this.minimumColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.maximumColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}get localizedName(){return Loc.get("Dashboard","ColorScale")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.ColorScaleColumn,this.minimumColor=Color.red,this.maximumColor=Color.green,null!=m&&(this.minimumColor=m),null!=h&&(this.maximumColor=h)}},Stimulsoft.Base.Meters.IStiDataBarsColumn),IStiSparklinesColumn=(__.K.StiDataBarsColumn=class extends __.K.StiMeasureColumn{implements(){let t=super.implements().concat([IStiDataBarsColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiNumberMeta("Width","",0),new StiStringMeta("Minimum"),new StiStringMeta("Maximum"),new StiColorMeta("PositiveColor","",Color.transparent),new StiColorMeta("NegativeColor","",Color.transparent),new StiColorMeta("OverlappedColor","",Color.transparent),new StiColorMeta("FillColor","",Color.transparent)]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.width[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.horAlignment)^this.positiveColor.getHashCode())^this.negativeColor.getHashCode())^this.overlappedColor.getHashCode())^this.fillColor.getHashCode())^(null!=this.minimum?this.minimum[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.maximum?this.maximum[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0)}get localizedName(){return Loc.get("Dashboard","DataBars")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p,C,b){super(t,e,i,r,l,n,s,o,h,c,d),this.ident=__.e.StiMeterIdent.DataBarsColumn,this.width=0,this.positiveColor=Color.transparent,this.negativeColor=Color.transparent,this.overlappedColor=Color.transparent,this.fillColor=Color.transparent,this.minimum="",this.maximum="",null!=g&&(this.headerAlignment=g),null!=a&&(this.positiveColor=a),null!=u&&(this.negativeColor=u),null!=S&&(this.overlappedColor=S),null!=m&&(this.fillColor=m),null!=p&&(this.width=p),null!=C&&(this.minimum=C),null!=b&&(this.maximum=b)}},Stimulsoft.Base.Meters.IStiSparklinesColumn),CultureInfo=(__.K.StiSparklinesColumn=class extends __.K.StiMeasureColumn{implements(){let t=super.implements().concat([IStiSparklinesColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("Type","",__.K.StiSparklinesType,__.K.StiSparklinesType.Area),new StiBoolMeta("ShowHighLowPoints"),new StiBoolMeta("ShowFirstLastPoints","",!0),new StiBoolMeta("AllowCustomColors"),new StiColorMeta("PositiveColor","",StiColor.get("537eb6")),new StiColorMeta("NegativeColor","",StiColor.get("ff0000"))]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.type[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.showHighLowPoints[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.showFirstLastPoints[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.allowCustomColors[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.positiveColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.negativeColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}get localizedName(){return Loc.get("Dashboard","Sparklines")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p){super(t,e,i,r,l,a,u,S,m,h,c),this.type=__.K.StiSparklinesType.Area,this.showHighLowPoints=!1,this.showFirstLastPoints=!0,this.allowCustomColors=!1,this.positiveColor=StiColor.get("537eb6"),this.negativeColor=StiColor.get("ff0000"),this.ident=__.e.StiMeterIdent.SparklinesColumn,null!=n&&(this.type=n),null!=s&&(this.showHighLowPoints=s),null!=o&&(this.showFirstLastPoints=o),null!=d&&(this.allowCustomColors=d),null!=g&&(this.positiveColor=g),null!=p&&(this.negativeColor=p)}},__.K.StiBubbleColumn=class extends __.K.StiMeasureColumn{implements(){let t=super.implements().concat([IStiBubbleColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiBoolMeta("AllowCustomColors"),new StiColorMeta("PositiveColor","",StiColor.get("537eb6")),new StiColorMeta("NegativeColor","",StiColor.get("ff0000"))]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*t^this.allowCustomColors[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.positiveColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.negativeColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}get localizedName(){return Loc.get("Chart","Bubble")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.BubbleColumn,this.allowCustomColors=!1,this.positiveColor=StiColor.get("537eb6"),this.negativeColor=StiColor.get("ff0000"),this.horAlignment=StiHorAlignment.Center,null!=m&&(this.allowCustomColors=m),null!=h&&(this.positiveColor=h),null!=c&&(this.negativeColor=c)}},Stimulsoft.System.Globalization.CultureInfo),StiTextFormatState=(__.h.StiCultureHelper=class{static set(t){let e=null==t?void 0:t.getParsedCulture();if(StiString.isNullOrWhiteSpace(e))return null;let i=CultureInfo.currentCulture;try{StiString.isNullOrEmpty(e)||null==CultureInfo.cultures[e]||(CultureInfo.currentCulture=CultureInfo.cultures[e])}catch(t){}return i}static restore(t){if(null==t)return;CultureInfo.currentCulture=t}},__.a.StiTextFormatState),StiExtValueConverter=Stimulsoft.Data.Functions.StiExtValueConverter,StiCultureHelper=__.h.StiCultureHelper,StiDataColumn=Stimulsoft.Report.Dictionary.StiDataColumn,StiMoneyNameHelper=Stimulsoft.Data.Helpers.StiMoneyNameHelper,TimeSpan=Stimulsoft.System.TimeSpan;{class StiTextFormatHelper{static get defaultGeneralFormat(){return null==this._defaultGeneralFormat&&(this._defaultGeneralFormat=new StiGeneralFormatService),this._defaultGeneralFormat}static get defaultCurrencyFormat(){return null==this._defaultCurrencyFormat&&(this._defaultCurrencyFormat=new StiCurrencyFormatService),this._defaultCurrencyFormat}static get defaultPercentageFormat(){return null==this._defaultPercentageFormat&&(this._defaultPercentageFormat=new StiPercentageFormatService,this._defaultPercentageFormat.positivePattern=1,this._defaultPercentageFormat.negativePattern=1,this._defaultPercentageFormat.decimalDigits=0,this._defaultPercentageFormat.groupSize=100,this._defaultPercentageFormat.state=StiTextFormatState.DecimalDigits|StiTextFormatState.GroupSize|StiTextFormatState.PositivePattern|StiTextFormatState.NegativePattern),this._defaultPercentageFormat}static get defaultNumberFormat(){return null==this._defaultNumberFormat&&(this._defaultNumberFormat=new StiNumberFormatService),this._defaultNumberFormat}static get defaultIntegerFormat(){return null==this._defaultIntegerFormat&&(this._defaultIntegerFormat=new StiNumberFormatService,this._defaultIntegerFormat.decimalDigits=0,this._defaultIntegerFormat.useGroupSeparator=!1,this._defaultIntegerFormat.useLocalSetting=!1),this._defaultIntegerFormat}static get defaultDateFormat(){return null==this._defaultDateFormat&&(this._defaultDateFormat=new StiDateFormatService),this._defaultDateFormat}static get defaultBooleanFormat(){return null==this._defaultBooleanFormat&&(this._defaultBooleanFormat=new StiBooleanFormatService),this._defaultBooleanFormat}static formatBasedOnColumnType(t,e,i){let r=e.cache[i];return null==r&&(r=StiTextFormatHelper.formatBasedOnColumnType2(t,e.textFormat,e,i),e.cache[i]=r),r}static formatBasedOnColumnType2(e,i,r,l){var n;this.storedCulture=StiCultureHelper.set(e.report);try{if(null==l)return"";if(null==r)return l.toString();let t=null==(n=null==e?void 0:e.report)?void 0:n.getParsedCulture();if(StiExtValueConverter.isEligable(l,t))return StiExtValueConverter.convert(l,t);if(null==i||i instanceof StiGeneralFormatService){let t=typeof l;if("number"==t&&StiMoneyNameHelper.isMoneyName(r.label))return this.defaultCurrencyFormat.format(l);if("number"==t)return this.defaultNumberFormat.format(l);if("boolean"==t)return this.defaultBooleanFormat.format(l);if("object"==t){let t=Type.getType(l);if(Type.isDateType(t))return this.defaultDateFormat.format(l)}}if(null!=i&&i instanceof StiTimeFormatService){if(l instanceof TimeSpan)return i.format(l);let t=typeof l;if("number"==t){let t=TimeSpan.fromMilliseconds(l);return i.format(t)}if("string"==t){let{successfully:t,result:e}=StiNumber.tryParse(l);if(t){let t=TimeSpan.fromMilliseconds(e);return i.format(t)}}}return i.format(l)}catch(t){return l.toString()}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}static format(t,e,i){this.storedCulture=StiCultureHelper.set(t);try{if(null==i)return"";return null!=e?e.format(i):i.toString()}catch(t){return i.toString()}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}static formatAsPercentage(t,e){this.storedCulture=StiCultureHelper.set(t);try{if(null==e)return"";return this.defaultPercentageFormat.format(e)}catch(t){return e.toString()}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}static formatAsPercentage2(t,e,i){this.storedCulture=StiCultureHelper.set(t);try{if(null==i)return"";if(null==e||e.is(StiGeneralFormatService))return this.defaultPercentageFormat.format(i);return e.format(i)}catch(t){return i.toString()}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}static getDefaultFormatForColumn(t){let e=__.h.StiMeterHelper.toDataType(t);if(null==e)return this.defaultGeneralFormat;if(Type.isNumericType(e)){if(StiMoneyNameHelper.isMoneyName(t.as(StiDataColumn).nameInSource))return this.defaultCurrencyFormat;if(Type.isIntegerType(e))return this.defaultIntegerFormat;return this.defaultNumberFormat}if(Type.isDateType(e))return this.defaultDateFormat;if(e==Boolean)return this.defaultBooleanFormat;return this.defaultGeneralFormat}}__.h.StiTextFormatHelper=StiTextFormatHelper}let StiTableColumnSize=Stimulsoft.Report.Dashboard.StiTableColumnSize,IStiTableColumnSize=Stimulsoft.Report.Dashboard.IStiTableColumnSize,IStiDimensionColumn=Stimulsoft.Base.Meters.IStiDimensionColumn,IStiColorMapMeter=(__.K.StiDimensionColumn=class extends __.K.StiTableColumn{implements(){let t=super.implements().concat([IStiDimensionMeter,IStiDimensionColumn,IStiTableColumnSize]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("ShowHyperlink"),new StiStringNullOrEmptyMeta("HyperlinkPattern"),new StiObjectMeta("Size").check(()=>null!=this.size).set(t=>this.size=StiTableColumnSize.createFromJsonObject(t.value)).setXml(t=>this.size=StiTableColumnSize.createFromXml(t))]}clone(){let t,e=super.clone();return e.size=null==(t=this.size)?void 0:t.clone(),e}get localizedName(){return Loc.get("Dashboard","Dimension")}checkRules(){var t;null!=(t=this.size)&&t.checkRules()}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*t^this.showHyperlink[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.hyperlinkPattern[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.size[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d){super(t,e,i,r,l,n,s,a,m,h,c),this.ident=__.e.StiMeterIdent.DimensionColumn,this.showHyperlink=!1,this.hyperlinkPattern="",this.size=new StiTableColumnSize,null!=u&&(this.showHyperlink=u),null!=S&&(this.hyperlinkPattern=S),null!=d&&(this.size=d)}},Stimulsoft.Base.Meters.IStiColorMapMeter),IStiValueMapMeter=(__.L.StiColorMapMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiColorMapMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Color")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ColorMapMeter}},Stimulsoft.Base.Meters.IStiValueMapMeter),IStiGroupMapMeter=(__.L.StiValueMapMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMapMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ValueMapMeter}},Stimulsoft.Base.Meters.IStiGroupMapMeter),IStiNameMapMeter=(__.L.StiGroupMapMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiGroupMapMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Group")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.GroupMapMeter}},Stimulsoft.Base.Meters.IStiNameMapMeter),IStiKeyMapMeter=(__.L.StiNameMapMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiNameMapMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Name")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.NameMapMeter}},Stimulsoft.Base.Meters.IStiKeyMapMeter),StiPivotTableItemDashboardInteraction=(__.L.StiKeyMapMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiKeyMapMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Key")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.KeyMapMeter}},__.M.StiValueProgressMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ValueProgressMeter}},__.M.StiTargetProgressMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Target")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.TargetProgressMeter}},__.M.StiSeriesProgressMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Series")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.SeriesProgressMeter}},__.g.StiPivotTableItemDashboardInteraction=class extends __.g.StiDashboardInteraction{isDefault(){return this.onHover==StiInteractionOnHover.None&&this.onClick==StiInteractionOnClick.None&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)}constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.PivotTableItem,this.availableOnClick=StiAvailableInteractionOnClick.ShowDashboard,this.availableOnHover=StiAvailableInteractionOnHover.None,this.onHover=StiInteractionOnHover.None,this.onClick=StiInteractionOnClick.None}},__.g.StiPivotTableItemDashboardInteraction),ImplementsIStiPivotItem=Stimulsoft.Report.Dashboard.ImplementsIStiPivotItem,IStiPivotItem=Stimulsoft.Report.Dashboard.IStiPivotItem,StiSortDirection=Stimulsoft.Report.CrossTab.Core.StiSortDirection,IStiMeterRules=Stimulsoft.Report.Dashboard.IStiMeterRules,ImplementsIStiTableColumnSize=Stimulsoft.Report.Dashboard.ImplementsIStiTableColumnSize,IStiPivotColumn=Stimulsoft.Base.Meters.IStiPivotColumn,IStiPivotRow=(__.N.StiPivotColumn=class extends __.e.StiMeter{implements(){let t=super.implements().concat([IStiDimensionMeter,IStiHorAlignment,IStiTextFormat,IStiTableColumnSize,IStiPivotColumn,IStiPivotItem,IStiDataTopN,IStiMeterRules,...ImplementsIStiHorAlignment,...ImplementsIStiTextFormat,...ImplementsIStiTableColumnSize,...ImplementsIStiPivotItem,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}clone(){let t,e=super.clone();return e.textFormat=this.textFormat.clone(),e.topN=this.topN.clone(),e.size=null==(t=this.size)?void 0:t.clone(),e.horAlignment=this.horAlignment,e.showTotal=this.showTotal,e.totalLabel=this.totalLabel,e.sortDirection=this.sortDirection,e.expandExpression=this.expandExpression,e.visibility=this.visibility,e.visibilityExpression=this.visibilityExpression,e.dashboardInteraction=this.dashboardInteraction.clone(),e}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiBoolMeta("ShowTotal","",!0),new StiStringNullOrEmptyMeta("TotalLabel"),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t)),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiObjectMeta("Size").check(()=>null!=this.size).set(t=>this.size=StiTableColumnSize.createFromJsonObject(t.value)).setXml(t=>this.size=StiTableColumnSize.createFromXml(t)),new StiEnumMeta("SortDirection","",StiSortDirection,StiSortDirection.Asc),new StiStringNullOrEmptyMeta("ExpandExpression"),new StiEnumMeta("Visibility","",StiTableColumnVisibility,StiTableColumnVisibility.True),new StiStringNullOrEmptyMeta("VisibilityExpression").check(()=>null!=this.visibilityExpression),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiPivotTableItemDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiPivotTableItemDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiPivotTableItemDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}checkRules(){var t;null!=(t=this.size)&&t.checkRules()}get strSortDirection(){return``+Enum.getName(StiSortDirection,this.sortDirection)+(this.sortDirection!=StiSortDirection.None?"ending":"")}set strSortDirection(t){this.sortDirection=Enum.parse(StiSortDirection,t.replace("ending",""))}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.horAlignment)^this.sortDirection)^(null!=this.textFormat?this.textFormat[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.topN?this.topN[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.size?this.size[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.showTotal?this.showTotal[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.totalLabel?this.totalLabel[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.expandExpression?this.expandExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.visibility?this.visibility[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.visibilityExpression?this.visibilityExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0),Math.abs(t)}get localizedName(){return Loc.get("Components","StiPivotColumn")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){super(t,e,i),this.horAlignment=StiHorAlignment.Center,this.showTotal=!0,this.totalLabel="",this.textFormat=new StiGeneralFormatService,this.size=new StiTableColumnSize,this.visibility=StiTableColumnVisibility.True,this.visibilityExpression="",this.expandExpression="",this.dashboardInteraction=new StiPivotTableItemDashboardInteraction,this.topN=new StiDataTopN,this.sortDirection=StiSortDirection.Asc,this.ident=__.e.StiMeterIdent.PivotColumn,null!=r&&(this.horAlignment=r),null!=l&&(this.textFormat=l),null!=n&&(this.topN=n),null!=a&&(this.size=a),null!=s&&(this.showTotal=s),null!=o&&(this.totalLabel=o),null!=u&&(this.sortDirection=u),null!=S&&(this.expandExpression=S),null!=m&&(this.visibility=m),null!=h&&(this.visibilityExpression=h),null!=c&&(this.dashboardInteraction=c)}},Stimulsoft.Base.Meters.IStiPivotRow),IStiPivotSummary=(__.N.StiPivotRow=class extends __.e.StiMeter{implements(){let t=super.implements().concat([IStiDimensionMeter,IStiHorAlignment,IStiTextFormat,IStiTableColumnSize,IStiPivotRow,IStiPivotItem,IStiDataTopN,IStiMeterRules,...ImplementsIStiHorAlignment,...ImplementsIStiTextFormat,...ImplementsIStiTableColumnSize,...ImplementsIStiPivotItem,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}clone(){let t,e=super.clone();return e.textFormat=this.textFormat.clone(),e.topN=this.topN.clone(),e.size=null==(t=this.size)?void 0:t.clone(),e.horAlignment=this.horAlignment,e.showTotal=this.showTotal,e.totalLabel=this.totalLabel,e.sortDirection=this.sortDirection,e.expandExpression=this.expandExpression,e.visibility=this.visibility,e.visibilityExpression=this.visibilityExpression,e.dashboardInteraction=this.dashboardInteraction.clone(),e}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiBoolMeta("ShowTotal","",!0),new StiStringNullOrEmptyMeta("TotalLabel"),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t)),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiObjectMeta("Size").check(()=>null!=this.size).set(t=>this.size=StiTableColumnSize.createFromJsonObject(t.value)).setXml(t=>this.size=StiTableColumnSize.createFromXml(t)),new StiEnumMeta("SortDirection","",StiSortDirection,StiSortDirection.Asc),new StiStringNullOrEmptyMeta("ExpandExpression"),new StiEnumMeta("Visibility","",StiTableColumnVisibility,StiTableColumnVisibility.True),new StiStringNullOrEmptyMeta("VisibilityExpression").check(()=>null!=this.visibilityExpression),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiPivotTableItemDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiPivotTableItemDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiPivotTableItemDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}checkRules(){var t;null!=(t=this.size)&&t.checkRules()}get strSortDirection(){return``+Enum.getName(StiSortDirection,this.sortDirection)+(this.sortDirection!=StiSortDirection.None?"ending":"")}set strSortDirection(t){this.sortDirection=Enum.parse(StiSortDirection,t.replace("ending",""))}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.horAlignment)^this.sortDirection)^(null!=this.textFormat?this.textFormat[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.topN?this.topN[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.size?this.size[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.showTotal?this.showTotal[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.totalLabel?this.totalLabel[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.expandExpression?this.expandExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.visibility?this.visibility[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.visibilityExpression?this.visibilityExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0),Math.abs(t)}get localizedName(){return Loc.get("Components","StiPivotRow")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){super(t,e,i),this.horAlignment=StiHorAlignment.Center,this.showTotal=!0,this.totalLabel="",this.textFormat=new StiGeneralFormatService,this.size=new StiTableColumnSize,this.visibility=StiTableColumnVisibility.True,this.visibilityExpression="",this.expandExpression="",this.dashboardInteraction=new StiPivotTableItemDashboardInteraction,this.topN=new StiDataTopN,this.sortDirection=StiSortDirection.Asc,this.ident=__.e.StiMeterIdent.PivotRow,null!=r&&(this.horAlignment=r),null!=l&&(this.textFormat=l),null!=n&&(this.topN=n),null!=a&&(this.size=a),null!=s&&(this.showTotal=s),null!=o&&(this.totalLabel=o),null!=u&&(this.sortDirection=u),null!=S&&(this.expandExpression=S),null!=m&&(this.visibility=m),null!=h&&(this.visibilityExpression=h),null!=c&&(this.dashboardInteraction=c)}},Stimulsoft.Base.Meters.IStiPivotSummary),IStiSeriesMeter=(__.N.StiPivotSummary=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiHorAlignment,IStiTextFormat,IStiTableColumnSize,IStiPivotSummary,IStiPivotItem,IStiMeterRules,...ImplementsIStiHorAlignment,...ImplementsIStiTextFormat,...ImplementsIStiTableColumnSize,...ImplementsIStiPivotItem,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}clone(){let t,e=super.clone();return e.textFormat=this.textFormat.clone(),e.size=null==(t=this.size)?void 0:t.clone(),e.hideZeros=this.hideZeros,e.horAlignment=this.horAlignment,e.visibility=this.visibility,e.visibilityExpression=this.visibilityExpression,e.dashboardInteraction=this.dashboardInteraction.clone(),e}meta(){return[...super.meta(),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t)),new StiObjectMeta("Size").check(()=>null!=this.size).set(t=>this.size=StiTableColumnSize.createFromJsonObject(t.value)).setXml(t=>this.size=StiTableColumnSize.createFromXml(t)),new StiBoolMeta("HideZeros","",!0),new StiEnumMeta("Visibility","",StiTableColumnVisibility,StiTableColumnVisibility.True),new StiStringNullOrEmptyMeta("VisibilityExpression").check(()=>null!=this.visibilityExpression),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiPivotTableItemDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiPivotTableItemDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiPivotTableItemDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}checkRules(){var t;null!=(t=this.size)&&t.checkRules()}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.horAlignment)^(null!=this.textFormat?this.textFormat[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.size?this.size[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.hideZeros?this.hideZeros[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.visibility?this.visibility[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0))^(null!=this.visibilityExpression?this.visibilityExpression[Stimulsoft.System.StiObject.stimulsoft]().getHashCode():0),Math.abs(t)}get localizedName(){return Loc.get("Components","StiPivotSummary")}constructor(t,e,i,r,l,n,s,o,a,u){super(t,e,i),this.horAlignment=StiHorAlignment.Center,this.textFormat=new StiGeneralFormatService,this.size=new StiTableColumnSize,this.visibility=StiTableColumnVisibility.True,this.visibilityExpression="",this.hideZeros=!0,this.dashboardInteraction=new StiPivotTableItemDashboardInteraction,this.ident=__.e.StiMeterIdent.PivotSummary,null!=r&&(this.horAlignment=r),null!=l&&(this.textFormat=l),null!=n&&(this.size=n),null!=s&&(this.hideZeros=s),null!=o&&(this.visibility=o),null!=a&&(this.visibilityExpression=a),null!=u&&(this.dashboardInteraction=u)}},__.O.StiLatitudeMapMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("PropertyMain","Latitude")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LatitudeMapMeter}},__.O.StiLongitudeMapMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("PropertyMain","Longitude")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LongitudeMapMeter}},__.P.StiKeyListBoxMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Key")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.KeyListBoxMeter}},__.P.StiNameListBoxMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiArgumentMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Name")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.NameListBoxMeter}},__.Q.StiValueDatePickerMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ValueDatePickerMeter}},__.R.StiValueNumberBoxMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ValueNumberBoxMeter}},__.H.StiEndValueChartMeter=class extends __.e.StiMeasureMeter{get localizedName(){return Loc.get("PropertyMain","ValueEnd")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.EndValueChartMeter}},__.S.StiNameComboBoxMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiArgumentMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Name")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.NameComboBoxMeter}},__.S.StiKeyComboBoxMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Key")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.KeyComboBoxMeter}},Stimulsoft.Base.Meters.IStiSeriesMeter),IStiTargetMeter=(__.T.StiSeriesGaugeMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiSeriesMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Series")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.SeriesGaugeMeter}},__.T.StiValueGaugeMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ValueGaugeMeter}},Stimulsoft.Base.Meters.IStiTargetMeter),StiChartSeriesType=(__.T.StiTargetGaugeMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiTargetMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Target")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.TargetGaugeMeter}},__.U.StiSeriesIndicatorMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiSeriesMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Series")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.SeriesIndicatorMeter}},__.U.StiValueIndicatorMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ValueIndicatorMeter}},__.U.StiTargetIndicatorMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiTargetMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Target")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.TargetIndicatorMeter}},__.H.StiWeightChartMeter=class extends __.e.StiMeasureMeter{get localizedName(){return Loc.get("PropertyMain","Weight")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.WeightChartMeter}},Stimulsoft.Report.Dashboard.StiChartSeriesType),StiPenStyle=Stimulsoft.Base.Drawing.StiPenStyle,StiSeriesYAxis=Stimulsoft.Report.Chart.StiSeriesYAxis,StiNameValidator=(__.H.StiValueChartMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMeter,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("SeriesType","",StiChartSeriesType,StiChartSeriesType.ClusteredColumn),new StiEnumMeta("YAxis","",StiSeriesYAxis,StiSeriesYAxis.LeftYAxis),new StiEnumMeta("LineStyle","",StiPenStyle,StiPenStyle.Solid),new StiNumberMeta("LineWidth","",2),new StiEnumMeta("ShowZeros","",StiEmptyCellsAs,StiEmptyCellsAs.Zero),new StiEnumMeta("ShowNulls","",StiEmptyCellsAs,StiEmptyCellsAs.Zero)]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.seriesType)^this.yAxis)^this.lineStyle)^this.lineWidth)^this.showNulls)^this.showZeros,Math.abs(t)}get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i,r,l,n,s,o,a){super(t,e,i),this.seriesType=StiChartSeriesType.ClusteredColumn,this.yAxis=StiSeriesYAxis.LeftYAxis,this.lineStyle=StiPenStyle.Solid,this.lineWidth=2,this.showZeros=StiEmptyCellsAs.Zero,this.showNulls=StiEmptyCellsAs.Zero,this.ident=__.e.StiMeterIdent.ValueChartMeter,null!=r&&(this.seriesType=r),null!=l&&(this.yAxis=l),null!=n&&(this.lineStyle=n),null!=s&&(this.lineWidth=s),null!=a&&(this.showNulls=a),null!=o&&(this.showZeros=o)}},__.H.StiOpenValueChartMeter=class extends __.H.StiValueChartMeter{get localizedName(){return Loc.get("PropertyMain","ValueOpen")}constructor(t,e,i,r){super(t,e,i,r),this.ident=__.e.StiMeterIdent.OpenValueChartMeter,this.seriesType=StiChartSeriesType.Candlestick,null!=r&&(this.seriesType=r)}},__.H.StiCloseValueChartMeter=class extends __.e.StiMeasureMeter{get localizedName(){return Loc.get("PropertyMain","ValueClose")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.CloseValueChartMeter}},__.H.StiLowValueChartMeter=class extends __.e.StiMeasureMeter{get localizedName(){return Loc.get("PropertyMain","ValueLow")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LowValueChartMeter}},__.H.StiHighValueChartMeter=class extends __.e.StiMeasureMeter{get localizedName(){return Loc.get("PropertyMain","ValueHigh")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.HighValueChartMeter}},__.H.StiSeriesChartMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiSeriesMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Series")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.SeriesChartMeter}},__.H.StiSortByChartMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiSeriesMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","SortBy")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.SortByChartMeter}},__.H.StiXChartMeter=class extends __.e.StiDimensionMeter{get localizedName(){return`X`+Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.XChartMeter}},__.H.StiYChartMeter=class extends __.e.StiDimensionMeter{get localizedName(){return`Y`+Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.YChartMeter}},__.O.StiLocationMapMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("PropertyMain","Location")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LocationMapMeter}},__.O.StiLocationColorMapMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("PropertyMain","Group")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LocationColorMapMeter}},__.O.StiLocationValueMapMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("PropertyMain","Value")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LocationValueMapMeter}},__.O.StiLocationArgumentMapMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("PropertyMain","Argument")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.LocationArgumentMapMeter}},__.F.StiIndicatorCardsColumn=class extends __.F.StiMeasureCardsColumn{implements(){let t=super.implements().concat([IStiIndicatorColumn]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("Dashboard","Dimension")}constructor(t,e,i,r,l,n,s,o,a,u,S){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.IndicatorCardsColumn}},__.F.StiColorScaleCardsColumn=class extends __.F.StiMeasureCardsColumn{implements(){let t=super.implements().concat([IStiColorScaleColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiColorMeta("MinimumColor","",Color.red),new StiColorMeta("MaximumColor","",Color.green)]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*t^this.minimumColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.maximumColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}get localizedName(){return Loc.get("Dashboard","ColorScale")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h){super(t,e,i,r,l,n,s,o,a,u,h),this.ident=__.e.StiMeterIdent.ColorScaleCardsColumn,this.minimumColor=Color.red,this.maximumColor=Color.green,null!=S&&(this.minimumColor=S),null!=m&&(this.maximumColor=m)}},__.F.StiDataBarsCardsColumn=class extends __.F.StiMeasureCardsColumn{implements(){let t=super.implements().concat([IStiDataBarsColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiNumberMeta("Width"),new StiStringMeta("Minimum"),new StiStringMeta("Maximum"),new StiColorMeta("PositiveColor","",Color.transparent),new StiColorMeta("NegativeColor","",Color.transparent),new StiColorMeta("OverlappedColor","",Color.transparent),new StiColorMeta("FillColor","",Color.transparent)]}get localizedName(){return Loc.get("Dashboard","DataBars")}constructor(t,e,i,r,l,n,s,o,a,u,S){super(t,e,i,r,l,n,s,o,a,u,S),this.ident=__.e.StiMeterIdent.DataBarsCardsColumn,this.width=0,this.positiveColor=Color.transparent,this.negativeColor=Color.transparent,this.overlappedColor=Color.transparent,this.fillColor=Color.transparent,this.minimum="",this.maximum=""}},__.F.StiSparklinesCardsColumn=class extends __.F.StiMeasureCardsColumn{implements(){let t=super.implements().concat([IStiSparklinesColumn,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiEnumMeta("Type","",__.K.StiSparklinesType,__.K.StiSparklinesType.Area),new StiBoolMeta("ShowHighLowPoints"),new StiBoolMeta("ShowFirstLastPoints","",!0),new StiBoolMeta("AllowCustomColors"),new StiNumberMeta("Height"),new StiColorMeta("PositiveColor","",StiColor.get("537eb6")),new StiColorMeta("NegativeColor","",StiColor.get("ff0000"))]}getUniqueCode(){let t=super.getUniqueCode();return t=397*(t=397*(t=397*(t=397*(t=397*(t=397*t^this.type[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.showHighLowPoints[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.showFirstLastPoints[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.allowCustomColors[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.positiveColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode())^this.negativeColor[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}get localizedName(){return Loc.get("Dashboard","Sparklines")}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p){super(t,e,i,r,l,n,s,S,m,h,p),this.type=__.K.StiSparklinesType.Area,this.showHighLowPoints=!1,this.showFirstLastPoints=!0,this.allowCustomColors=!1,this.positiveColor=StiColor.get("537eb6"),this.negativeColor=StiColor.get("ff0000"),this.height=0,this.ident=__.e.StiMeterIdent.SparklinesCardsColumn,null!=o&&(this.type=o),null!=a&&(this.showHighLowPoints=a),null!=u&&(this.showFirstLastPoints=u),null!=c&&(this.allowCustomColors=c),null!=d&&(this.positiveColor=d),null!=g&&(this.negativeColor=g)}},Stimulsoft.Report.StiNameValidator),StiExpressionHelper=Stimulsoft.Data.Helpers.StiExpressionHelper,StiTextMeasureMeter=(__.V.StiTextMeasureMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}getUniqueName(){if(!StiString.isNullOrWhiteSpace(this.label))return StiNameValidator.correctName(this.label,!0,null);if(!StiString.isNullOrWhiteSpace(this.expression)){let t=this.expression,e=StiExpressionHelper.getFirstArgumentFromExpression(this.expression);return null!=e&&e.includes(".")&&(t=e.substring(e.indexOf(".")+1)),StiNameValidator.correctName(t,!0,null)}return"Measure"}static getUniqueNames(t){let l=new Dictionary;for(let r of t){let t=r.getUniqueName(),e=t,i=2;while(1){if(!l.containsKey(e)){l.add(e,r);break}e=t+i,i++}}return l}get localizedName(){return Loc.get("PropertyMain","Text")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.TextMeasureMeter}},__.V.StiTextMeasureMeter),StiYChartMeter=__.H.StiYChartMeter,StiXChartMeter=__.H.StiXChartMeter,StiValueNumberBoxMeter=__.R.StiValueNumberBoxMeter,StiIndicatorValueChartMeter=__.H.StiIndicatorValueChartMeter,StiSortByChartMeter=__.H.StiSortByChartMeter,StiIndicatorCardsColumn=__.F.StiIndicatorCardsColumn,StiBubbleCardsColumn=__.F.StiBubbleCardsColumn,StiColorScaleCardsColumn=__.F.StiColorScaleCardsColumn,StiDataBarsCardsColumn=__.F.StiDataBarsCardsColumn,StiSparklinesCardsColumn=__.F.StiSparklinesCardsColumn,StiDimensionCardsColumn=__.F.StiDimensionCardsColumn,StiDataColumnExt=Stimulsoft.Report.Dictionary.StiDataColumnExt,StiBubbleColumn=__.K.StiBubbleColumn,StiLocationArgumentMapMeter=__.O.StiLocationArgumentMapMeter,StiLocationMapMeter=__.O.StiLocationMapMeter,StiLocationColorMapMeter=__.O.StiLocationColorMapMeter,StiLocationValueMapMeter=__.O.StiLocationValueMapMeter,StiKeyTreeViewBoxMeter=__.I.StiKeyTreeViewBoxMeter,StiKeyTreeViewMeter=__.J.StiKeyTreeViewMeter,StiIndicatorColumn=__.K.StiIndicatorColumn,StiColorScaleColumn=__.K.StiColorScaleColumn,StiDataBarsColumn=__.K.StiDataBarsColumn,StiSparklinesColumn=__.K.StiSparklinesColumn,Funcs=Stimulsoft.Data.Functions.Funcs,StiTextFormatHelper=__.h.StiTextFormatHelper,StiDimensionColumn=__.K.StiDimensionColumn,StiMeasureColumn=__.K.StiMeasureColumn,StiColorMapMeter=__.L.StiColorMapMeter,StiValueMapMeter=__.L.StiValueMapMeter,StiGroupMapMeter=__.L.StiGroupMapMeter,StiNameMapMeter=__.L.StiNameMapMeter,StiKeyMapMeter=__.L.StiKeyMapMeter,StiValueProgressMeter=__.M.StiValueProgressMeter,StiTargetProgressMeter=__.M.StiTargetProgressMeter,StiSeriesProgressMeter=__.M.StiSeriesProgressMeter,StiPivotColumn=__.N.StiPivotColumn,StiPivotRow=__.N.StiPivotRow,StiPivotSummary=__.N.StiPivotSummary,StiLatitudeMapMeter=__.O.StiLatitudeMapMeter,StiLongitudeMapMeter=__.O.StiLongitudeMapMeter,StiKeyListBoxMeter=__.P.StiKeyListBoxMeter,StiNameListBoxMeter=__.P.StiNameListBoxMeter,StiValueDatePickerMeter=__.Q.StiValueDatePickerMeter,StiDataExpressionHelper=Stimulsoft.Data.Engine.StiDataExpressionHelper,StiTableColumn=__.K.StiTableColumn,DateTime=Stimulsoft.System.DateTime,StiNameComboBoxMeter=__.S.StiNameComboBoxMeter,StiKeyComboBoxMeter=__.S.StiKeyComboBoxMeter,StiSeriesGaugeMeter=__.T.StiSeriesGaugeMeter,StiValueGaugeMeter=__.T.StiValueGaugeMeter,StiTargetGaugeMeter=__.T.StiTargetGaugeMeter,StiSeriesIndicatorMeter=__.U.StiSeriesIndicatorMeter,StiValueIndicatorMeter=__.U.StiValueIndicatorMeter,StiTargetIndicatorMeter=__.U.StiTargetIndicatorMeter,StiWeightChartMeter=__.H.StiWeightChartMeter,StiOpenValueChartMeter=__.H.StiOpenValueChartMeter,StiCloseValueChartMeter=__.H.StiCloseValueChartMeter,StiLowValueChartMeter=__.H.StiLowValueChartMeter,StiHighValueChartMeter=__.H.StiHighValueChartMeter,StiArgumentChartMeter=__.H.StiArgumentChartMeter,StiValueChartMeter=__.H.StiValueChartMeter,StiSeriesChartMeter=__.H.StiSeriesChartMeter,StiEndValueChartMeter=__.H.StiEndValueChartMeter,IStiAppAlias=Stimulsoft.Base.IStiAppAlias,StiVariable=Stimulsoft.Report.Dictionary.StiVariable;{class x8{static getValue(t){if(t.is(StiValueChartMeter))return t;let e=new StiValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getGanttStartValue(t){let e=new StiValueChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e.seriesType=StiChartSeriesType.Gantt,e}static getGanttEndValue(t){let e=new StiEndValueChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getEndValue(t){if(t.is2(StiEndValueChartMeter))return t;let e=new StiEndValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getOpenValue(t){if(t.is(StiOpenValueChartMeter))return t;let e=new StiOpenValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getCloseValue(t){if(t.is2(StiCloseValueChartMeter))return t;let e=new StiCloseValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getLowValue(t){if(t.is2(StiLowValueChartMeter))return t;let e=new StiLowValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getHighValue(t){if(t.is2(StiHighValueChartMeter))return t;let e=new StiHighValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getValue2(t,e){let i=new StiValueChartMeter;return i.expression=StiMeterHelper.toTotalExpression2(t),i.seriesType=null!=e.values&&0<e.values.length?e.values.firstOrDefault().seriesType:StiChartSeriesType.ClusteredColumn,i.label=StiMeterHelper.toAlias(t),i}static getEndValue2(t){let e=new StiEndValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getCloseValue2(t){let e=new StiCloseValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getLowValue2(t){let e=new StiLowValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getHighValue2(t){let e=new StiHighValueChartMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getWeight(t){if(t.is2(StiWeightChartMeter))return t;let e=new StiWeightChartMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getWeight2(t){let e=new StiWeightChartMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getArgument(t){if(t.is2(StiArgumentChartMeter))return t;let e=new StiArgumentChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getArgument2(t){let e=new StiArgumentChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getX2(t){let e=new StiArgumentChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getXValue2(t){let e=new StiXChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getX(t){if(t.is2(StiArgumentChartMeter))return t;let e=new StiArgumentChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getXValue(t){if(t.is2(StiXChartMeter))return t;let e=new StiXChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getY2(t){let e=new StiValueChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getYValue2(t){let e=new StiYChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getY(t){if(t.is(StiValueChartMeter))return t;let e=new StiValueChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getYValue(t){if(t.is2(StiYChartMeter))return t;let e=new StiYChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getSeries(t){if(t.is2(StiSeriesChartMeter))return t;let e=new StiSeriesChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getSortBy(t){if(t.is2(StiSortByChartMeter))return t;let e=new StiSortByChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getSeries2(t){let e=new StiSeriesChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getSortBy2(t){let e=new StiSortByChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getIndicatorValue(t){if(t.is2(StiIndicatorValueChartMeter))return t;let e=new StiIndicatorValueChartMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getIndicatorValue2(t){let e=new StiIndicatorValueChartMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.Chart=x8;class y8{static getName(t){if(t.is2(StiNameComboBoxMeter))return t;let e=new StiNameComboBoxMeter;return e.expression=t.expression,e.label=t.label,e}static getName2(t){let e=new StiNameComboBoxMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getKey(t){if(t.is2(StiKeyComboBoxMeter))return t;let e=new StiKeyComboBoxMeter;return e.expression=t.expression,e.label=t.label,e}static getKey2(t){let e=new StiKeyComboBoxMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.ComboBox=y8;class z8{static getFilter2(t){let e="",i=(null!=t&&null!=t.type&&(Type.isDateType(t.type)?e=DateTime.now.toString("MM/dd/yyyy"):Type.isNumericType(t.type)&&(e="0")),new StiDataFilterRule);return i.key=StiKeyHelper.generateKey(),i.condition=StiDataFilterCondition.EqualTo,i.path=StiMeterHelper.toExpression(t),i.value=e,i.value2=e,i}static getFilter(t,e){let i=StiDataExpressionHelper.getDataColumnFromExpression(e.page.as(__.e.StiDashboard),t.expression),r="",l=(null!=i&&null!=i.getDataType()&&(Type.isDateType(i.getDataType())?r=DateTime.now.toString("MM/dd/yyyy"):Type.isNumericType(i.getDataType())&&(r="0")),new StiDataFilterRule);return l.key=StiKeyHelper.generateKey(),l.condition=StiDataFilterCondition.EqualTo,l.path=StiExpressionHelper.removeFunction(t.expression),l.value=r,l.value2=r,l}}__.h.DataFilter=z8;class A8{static getValue(t){if(t.is2(StiValueDatePickerMeter))return t;let e=new StiValueDatePickerMeter;return e.expression=t.expression,e.label=t.label,e}static getValue2(t){let e=new StiValueDatePickerMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.DatePicker=A8;class B8{static getValue(t){if(t.is2(StiValueNumberBoxMeter))return t;let e=new StiValueNumberBoxMeter;return e.expression=t.expression,e.label=t.label,e}static getValue2(t){let e=new StiValueNumberBoxMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.NumberBox=B8;class C8{static getSeries(t){if(t.is2(StiSeriesGaugeMeter))return t;let e=new StiSeriesGaugeMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getSeries2(t){let e=new StiSeriesGaugeMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getValue(t){if(t.is2(StiValueGaugeMeter))return t;let e=new StiValueGaugeMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getValue2(t){let e=new StiValueGaugeMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getTarget(t){if(t.is2(StiTargetGaugeMeter))return t;let e=new StiTargetGaugeMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getTarget2(t){let e=new StiTargetGaugeMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.Gauge=C8;class D8{static getSeries(t){if(t.is2(StiSeriesIndicatorMeter))return t;let e=new StiSeriesIndicatorMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getSeries2(t){let e=new StiSeriesIndicatorMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getValue(t){if(t.is2(StiValueIndicatorMeter))return t;let e=new StiValueIndicatorMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getValue2(t){let e=new StiValueIndicatorMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getTarget(t){if(t.is2(StiTargetIndicatorMeter))return t;let e=new StiTargetIndicatorMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getTarget2(t){let e=new StiTargetIndicatorMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.Indicator=D8;class E8{static getName(t){if(t.is2(StiNameListBoxMeter))return t;let e=new StiNameListBoxMeter;return e.expression=t.expression,e.label=t.label,e}static getName2(t){let e=new StiNameListBoxMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getKey(t){if(t.is2(StiKeyListBoxMeter))return t;let e=new StiKeyListBoxMeter;return e.expression=t.expression,e.label=t.label,e}static getKey2(t){let e=new StiKeyListBoxMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.ListBox=E8;class F8{static getLatitude(t){if(t.is2(StiLatitudeMapMeter))return t;let e=new StiLatitudeMapMeter;return e.expression=t.expression,e.label=t.label,e}static getLongitude(t){if(t.is2(StiLongitudeMapMeter))return t;let e=new StiLongitudeMapMeter;return e.expression=t.expression,e.label=t.label,e}static getLocation(t){if(t.is2(StiLocationMapMeter))return t;return new StiLocationMapMeter(null,t.expression,t.label)}static getLocationColor(t){if(t.is2(StiLocationColorMapMeter))return t;return new StiLocationColorMapMeter(null,t.expression,t.label)}static getLocationValue(t){if(t.is2(StiLocationValueMapMeter))return t;return new StiLocationValueMapMeter(null,t.expression,t.label)}static getLocationArgument(t){if(t.is2(StiLocationArgumentMapMeter))return t;return new StiLocationArgumentMapMeter(null,t.expression,t.label)}static getLatitude2(t){let e=new StiLatitudeMapMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getLongitude2(t){let e=new StiLongitudeMapMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getLocation2(t){return new StiLocationMapMeter(null,StiMeterHelper.toExpression(t),StiMeterHelper.toAlias(t))}static getLocationColor2(t){return new StiLocationColorMapMeter(null,StiMeterHelper.toExpression(t),StiMeterHelper.toAlias(t))}static getLocationValue2(t){return new StiLocationValueMapMeter(null,StiMeterHelper.toExpression(t),StiMeterHelper.toAlias(t))}static getLocationArgument2(t){return new StiLocationArgumentMapMeter(null,StiMeterHelper.toExpression(t),StiMeterHelper.toAlias(t))}}__.h.OnlineMap=F8;class G8{static getColumn(t){if(t.is(StiPivotColumn))return t;let e=new StiPivotColumn;return e.key=t.key,e.expression=t.expression,e.label=t.label,e.textFormat=this.getFormat(t),e.topN=this.getTopN(t),e.horAlignment=t.is(IStiHorAlignment)?t.as(IStiHorAlignment).horAlignment:StiHorAlignment.Center,e.size=t.is(IStiTableColumnSize)?t.size:new StiTableColumnSize,e.totalLabel=this.getTotalLabel(t),e.showTotal=this.getShowTotal(t),e.sortDirection=this.getSortDirection(t),e.expandExpression=this.getExpandExpression(t),e}static getRow(t){if(t.is(StiPivotRow))return t;let e=new StiPivotRow;return e.key=t.key,e.expression=t.expression,e.label=t.label,e.textFormat=this.getFormat(t),e.topN=this.getTopN(t),e.horAlignment=t.is(IStiHorAlignment)?t.as(IStiHorAlignment).horAlignment:StiHorAlignment.Center,e.size=t.is(IStiTableColumnSize)?t.size:new StiTableColumnSize,e.totalLabel=this.getTotalLabel(t),e.showTotal=this.getShowTotal(t),e.sortDirection=this.getSortDirection(t),e.expandExpression=this.getExpandExpression(t),e}static getShowTotal(t){return t.is(IStiPivotRow)?t.as(IStiPivotRow).showTotal:!t.is(IStiPivotColumn)||t.as(IStiPivotColumn).showTotal}static getTotalLabel(t){return t.is(IStiPivotRow)?t.as(IStiPivotRow).totalLabel:t.is(IStiPivotColumn)?t.as(IStiPivotColumn).totalLabel:""}static getSortDirection(t){return t.is(IStiPivotRow)?t.as(IStiPivotRow).strSortDirection:t.is(IStiPivotColumn)?t.as(IStiPivotColumn).strSortDirection:"None"}static getExpandExpression(t){return t.is(IStiPivotRow)?t.as(IStiPivotRow).expandExpression:t.is(IStiPivotColumn)?t.as(IStiPivotColumn).expandExpression:""}static getSummary(t){if(t.is(StiPivotSummary))return t;let e=new StiPivotSummary;return e.key=t.key,e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e.textFormat=this.getFormat(t),e}static getSummary3(t,e){if(t.is(StiPivotSummary))return t;let i=new StiPivotSummary;return i.expression=StiMeterHelper.toTotalExpression3(t,e),i.label=t.label,i.textFormat=this.getFormat(t),i}static getColumn2(t){let e=new StiPivotColumn;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getRow2(t){let e=new StiPivotRow;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getSummary2(t){let e=new StiPivotSummary;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getFormat(t){if(t.is(StiPivotColumn))return t.textFormat;if(t.is(StiPivotRow))return t.textFormat;if(t.is(StiPivotSummary))return t.textFormat;return new StiGeneralFormatService}static getTopN(t){if(t.is(StiPivotColumn))return t.topN;if(t.is(StiPivotRow))return t.topN;return new StiDataTopN}}__.h.Pivot=G8;class H8{static getSeries(t){if(t.is2(StiSeriesProgressMeter))return t;let e=new StiSeriesProgressMeter;return e.expression=StiExpressionHelper.removeFunction(t.expression),e.label=t.label,e}static getSeries2(t){let e=new StiSeriesProgressMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getValue(t){if(t.is2(StiValueProgressMeter))return t;let e=new StiValueProgressMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getValue2(t){let e=new StiValueProgressMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getTarget(t){if(t.is2(StiTargetProgressMeter))return t;let e=new StiTargetProgressMeter;return e.expression=StiMeterHelper.toTotalExpression(t),e.label=t.label,e}static getTarget2(t){let e=new StiTargetProgressMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.Progress=H8;class I8{static getKey(t){if(t.is2(StiKeyMapMeter))return t;let e=new StiKeyMapMeter;return e.expression=t.expression,e.label=t.label,e}static getName(t){if(t.is2(StiNameMapMeter))return t;let e=new StiNameMapMeter;return e.expression=t.expression,e.label=t.label,e}static getGroup(t){if(t.is2(StiGroupMapMeter))return t;let e=new StiGroupMapMeter;return e.expression=t.expression,e.label=t.label,e}static getValue(t,e){let i=new StiValueMapMeter,r=(i.loadFromString(t.saveToString()),StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count");return i.expression=StiExpressionHelper.replaceFunction(i.expression,r),i}static getColor(t){if(t.is2(StiColorMapMeter))return t;let e=new StiColorMapMeter;return e.expression=t.expression,e.label=t.label,e}static getKey2(t){let e=new StiKeyMapMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getName2(t){let e=new StiNameMapMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getValue2(t){let e=new StiValueMapMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}static getGroup2(t){let e=new StiGroupMapMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}static getColor2(t){let e=new StiColorMapMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.RegionMap=I8;class J8{static getColumn(t){let e=t.as(StiTableColumn);return(e=null==e?new(t.is(IStiMeasureMeter)?StiMeasureColumn:StiDimensionColumn):e).loadFromString(t.saveToString()),e}static getDimension(t){let e=new StiDimensionColumn;return e.loadFromString(t.saveToString()),Funcs.isMeasureFunction(e.expression)&&(e.expression=StiExpressionHelper.removeFunction(e.expression)),e}static getDimension2(t){let e=new StiDimensionColumn;return e.textFormat=StiTextFormatHelper.getDefaultFormatForColumn(t),e.expression=StiMeterHelper.toExpression(t),e.horAlignment=__.h.StiTableAlignmentHelper.getHorAlign(t),e.label=StiMeterHelper.toAlias(t),e}static getMeasure(t,e){let i=new StiMeasureColumn;if(i.loadFromString(t.saveToString()),t.is(StiDimensionColumn)||t.is(StiSparklinesColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getMeasure2(t){let e=new StiMeasureColumn;return e.textFormat=StiTextFormatHelper.getDefaultFormatForColumn(t),e.expression=StiMeterHelper.toTotalExpression2(t),e.horAlignment=__.h.StiTableAlignmentHelper.getHorAlign(t),e.label=StiMeterHelper.toAlias(t),e}static getDataBars(t,e){let i=new StiDataBarsColumn;if(i.loadFromString(t.saveToString()),t.is(StiDimensionColumn)||t.is(StiSparklinesColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"First";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getColorScale(t,e){let i=new StiColorScaleColumn;if(i.loadFromString(t.saveToString()),t.is(StiDimensionColumn)||t.is(StiSparklinesColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getSparklines(t){let e=new StiSparklinesColumn;return e.loadFromString(t.saveToString()),Funcs.isMeasureFunction(e.expression)&&(e.expression=StiExpressionHelper.removeFunction(e.expression)),e}static getBubble(t,e){let i=new StiBubbleColumn;if(i.loadFromString(t.saveToString()),t.is(StiDimensionColumn)||t.is(StiSparklinesColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getIndicator(t,e){let i=new StiIndicatorColumn;if(i.loadFromString(t.saveToString()),t.is(StiDimensionColumn)||t.is(StiSparklinesColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i.horAlignment=StiHorAlignment.Right,i}}__.h.Table=J8;class K8{static getMeter(t){let e=new StiTextMeasureMeter;return e.loadFromJsonObject(t.saveToJsonObject(StiJsonSaveMode.Report)),e}static getMeter2(t){let e=new StiTextMeasureMeter;return e.expression=StiMeterHelper.toTotalExpression2(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.Text=K8;class L8{static getColumn(t){let e=t.as(StiCardsColumn);return(e=null==e?new(t.is(IStiMeasureMeter)?StiMeasureCardsColumn:StiDimensionCardsColumn):e).loadFromString(t.saveToString()),e}static getDimension(t){let e=new StiDimensionCardsColumn;return e.loadFromString(t.saveToString()),Funcs.isMeasureFunction(e.expression)&&(e.expression=StiExpressionHelper.removeFunction(e.expression)),e}static getDimension2(t){let e=new StiDimensionCardsColumn;return e.textFormat=StiTextFormatHelper.getDefaultFormatForColumn(t),e.expression=StiMeterHelper.toExpression(t),e.horAlignment=__.h.StiTableAlignmentHelper.getHorAlign(t),e.label=StiMeterHelper.toAlias(t),e}static getMeasure(t,e){let i=new StiMeasureCardsColumn;if(i.loadFromString(t.saveToString()),t.is2(StiDimensionCardsColumn)||t.is2(StiSparklinesCardsColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getMeasure2(t){let e=new StiMeasureCardsColumn;return e.textFormat=StiTextFormatHelper.getDefaultFormatForColumn(t),e.expression=StiMeterHelper.toTotalExpression2(t),e.horAlignment=__.h.StiTableAlignmentHelper.getHorAlign(t),e.label=StiMeterHelper.toAlias(t),e}static getDataBars(t,e){let i=new StiDataBarsCardsColumn;if(i.loadFromString(t.saveToString()),t.is2(StiDimensionCardsColumn)||t.is2(StiSparklinesCardsColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"First";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getColorScale(t,e){let i=new StiColorScaleCardsColumn;if(i.loadFromString(t.saveToString()),t.is2(StiDimensionCardsColumn)||t.is2(StiSparklinesCardsColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getSparklines(t){let e=new StiSparklinesCardsColumn;return e.loadFromString(t.saveToString()),Funcs.isMeasureFunction(e.expression)&&(e.expression=StiExpressionHelper.removeFunction(e.expression)),e}static getBubble(t,e){let i=new StiBubbleCardsColumn;if(i.loadFromString(t.saveToString()),t.is2(StiDimensionCardsColumn)||t.is2(StiSparklinesCardsColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i}static getIndicator(t,e){let i=new StiIndicatorCardsColumn;if(i.loadFromString(t.saveToString()),t.is2(StiDimensionCardsColumn)||t.is2(StiSparklinesCardsColumn)){let t=StiDataExpressionHelper.isNumericDataColumnInExpression(e,i.expression)?"Sum":"Count";i.expression=StiExpressionHelper.replaceFunction(i.expression,t)}return i.horAlignment=StiHorAlignment.Right,i}}__.h.Cards=L8;class M8{static getKey(t){if(t.is2(StiKeyTreeViewMeter))return t;let e=new StiKeyTreeViewMeter;return e.expression=t.expression,e.label=t.label,e}static getKey2(t){let e=new StiKeyTreeViewMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.TreeView=M8;class N8{static getKey(t){if(t.is2(StiKeyTreeViewBoxMeter))return t;let e=new StiKeyTreeViewBoxMeter;return e.expression=t.expression,e.label=t.label,e}static getKey2(t){let e=new StiKeyTreeViewBoxMeter;return e.expression=StiMeterHelper.toExpression(t),e.label=StiMeterHelper.toAlias(t),e}}__.h.TreeViewBox=N8;class StiMeterHelper{static toTotalExpression2(t){let e=null==t?void 0:t.as(StiDataColumn);if(null!=e)return StiDataColumnExt.isNumericType(e)?this.toSumExpression2(e):this.toCountExpression2(e);return null==t?void 0:t.getName()}static toTotalExpression(t){if(StiExpressionHelper.isFunctionPresent(t.expression))return t.expression;return this.toCountExpression(t.expression)}static toTotalExpression3(t,e){if(StiExpressionHelper.isFunctionPresent(t.expression))return t.expression;return StiDataExpressionHelper.isNumericDataColumnInExpression(e,t.expression)?this.toSumExpression(t.expression):this.toCountExpression(t.expression)}static toSumExpression2(t){return`Sum(${this.toExpression(t)})`}static toSumExpression(t){return`Sum(${t})`}static toCountExpression2(t){return`Count(${this.toExpression(t)})`}static toCountExpression(t){return`Count(${t})`}static toExpression(t){let e=null==t?void 0:t.as(StiDataColumn);if(null!=e)return Funcs.toExpression2(e.dataSource.name,e.name);return Funcs.toExpression(null==t?void 0:t.getName())}static toAlias(t){let e=t.as(IStiAppAlias);if(null!=e)return e.getAlias();return null==t?void 0:t.getName()}static toDataType(t){let e,i,r=null==(e=null==t?void 0:t.as(StiDataColumn))?void 0:e.type;if(null!=r)return r;return null==(i=null==t?void 0:t.as(StiVariable))?void 0:i.type}}StiMeterHelper.Chart=x8,StiMeterHelper.ComboBox=y8,StiMeterHelper.DataFilter=z8,StiMeterHelper.DatePicker=A8,StiMeterHelper.NumberBox=B8,StiMeterHelper.Gauge=C8,StiMeterHelper.Indicator=D8,StiMeterHelper.ListBox=E8,StiMeterHelper.OnlineMap=F8,StiMeterHelper.Pivot=G8,StiMeterHelper.Progress=H8,StiMeterHelper.RegionMap=I8,StiMeterHelper.Table=J8,StiMeterHelper.Cards=L8,StiMeterHelper.TreeView=M8,StiMeterHelper.TreeViewBox=N8,StiMeterHelper.Text=K8,__.h.StiMeterHelper=StiMeterHelper}__.F.StiCardsItem=class{constructor(){this.cornerRadius=new StiCornerRadius(0),this.margin=new StiMargin(12,12,12,12),this.padding=new StiPadding(12,12,12,12),this.colorEach=!1}meta(){return[new StiObjectMeta("Margin").get(t=>this.margin.saveToJsonObject(12,12,12,12)),new StiObjectMeta("Padding").get(t=>this.padding.saveToJsonObject(12,12,12,12)),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiBoolMeta("ColorEach")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}isDefaultMargin(){return 12==this.margin.left&&12==this.margin.top&&12==this.margin.right&&12==this.margin.bottom}isDefaultPadding(){return 12==this.padding.left&&12==this.padding.top&&12==this.padding.right&&12==this.padding.bottom}};let IStiInteractionLayout=Stimulsoft.Report.Dashboard.IStiInteractionLayout,IStiShowBlanks=(__.g.StiCardsDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0)]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.isDefaultLayout}constructor(t,e,i){super(),this.ident=StiInteractionIdent.Cards,this.availableOnClick=StiAvailableInteractionOnClick.None,this.availableOnHover=StiAvailableInteractionOnHover.None,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=t&&(this.showFullScreenButton=t),null!=e&&(this.showSaveButton=e),null!=i&&(this.showViewDataButton=i)}},Stimulsoft.Report.Components.IStiShowBlanks),StiCardsDashboardInteraction=__.g.StiCardsDashboardInteraction,StiMeterHelper=__.h.StiMeterHelper,StiReportObjectStringConverter=Stimulsoft.System.Text.StiReportObjectStringConverter,IStiSeriesColors=Stimulsoft.Report.Dashboard.IStiSeriesColors,StiCardsItem=__.F.StiCardsItem,StiMeterLoader=__.G.StiMeterLoader,StiItemOrientation=Stimulsoft.Report.Dashboard.StiItemOrientation,ImplementsIStiCardsElement=Stimulsoft.Report.Dashboard.ImplementsIStiCardsElement,ImplementsIStiElementLayout=Stimulsoft.Report.Dashboard.ImplementsIStiElementLayout,IStiElementLayout=Stimulsoft.Report.Dashboard.IStiElementLayout,StiElementLayout=Stimulsoft.Report.Dashboard.StiElementLayout,ImplementsIStiTitleElement=Stimulsoft.Report.Dashboard.ImplementsIStiTitleElement,StiUsedDataHelper=Stimulsoft.Data.Helpers.StiUsedDataHelper,IStiCardsElement=Stimulsoft.Report.Dashboard.IStiCardsElement,StiDataSortRule=Stimulsoft.Data.Engine.StiDataSortRule,StiDataActionRule=Stimulsoft.Data.Engine.StiDataActionRule;{class StiCardsElement extends __.e.StiElement{implements(){let t=super.implements().concat([IStiCardsElement,IStiSimpleShadow,IStiTitleElement,IStiElementLayout,IStiElementInteraction,IStiCornerRadius,IStiSeriesColors,IStiGlobalizationProvider,IStiShowBlanks,...ImplementsIStiCardsElement,...ImplementsIStiTitleElement,...ImplementsIStiElementLayout,...ImplementsIStiCornerRadius,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r,l=super.clone(t);return l.transformActions=this.transformActions.select(t=>t.clone()).toList(),l.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),l.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),l.columns=this.columns.select(t=>t.clone()).toList(),l.dashboardInteraction=null==(e=this.dashboardInteraction)?void 0:e.clone(),l.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),l.title=null!=this.title?this.title.clone():null,l.seriesColors=null!=this.seriesColors?this.seriesColors.slice():null,l.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),l.shadow=null==(r=this.shadow)?void 0:r.clone(),l}meta(){return[...super.meta(),new StiObjectMeta("Columns").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.columns,t)).set(t=>this.columns.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value).as(StiCardsColumn)).where(t=>null!=t))).setXml(t=>this.columns.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)).filter(t=>null!=t))),new StiEnumMeta("Orientation","",StiItemOrientation,StiItemOrientation.Horizontal),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiNumberMeta("ColumnCount","",0),new StiStringNullOrEmptyMeta("Group"),new StiBoolMeta("CrossFiltering","",!0),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("Cards").get(t=>this.cards.saveToJsonObject(t)),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("SeriesColors").get(()=>StiJsonReportObjectHelper.Serialize.colorArray(this.seriesColors)).set(t=>this.seriesColors=StiJsonReportObjectHelper.Deserialize.colorArray(t.value)).setXml(t=>this.seriesColors=StiReportObjectStringConverter.convertStringToColorArray(t.textContent)),new StiBoolMeta("ShowBlanks"),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiCardsDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiCardsDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiCardsDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}get toolboxPosition(){return StiComponentToolboxPosition.CardsElement}get localizedName(){return StiLocalization.get("Components","StiCards")}convertFrom(t){let e=t.fetchAllMeters();if(this.columns.clear(),null==e)return;e.cast().forEach(t=>{let e=null;t.is2(IStiDimensionMeter)?e=new StiDimensionCardsColumn:t.is2(IStiSparklinesColumn)?e=new __.F.StiSparklinesCardsColumn:t.is2(IStiDataBarsColumn)?e=new __.F.StiDataBarsCardsColumn:t.is2(IStiIndicatorColumn)?e=new __.F.StiIndicatorCardsColumn:t.is2(IStiColorScaleColumn)?e=new __.F.StiColorScaleCardsColumn:t.is2(IStiBubbleColumn)?e=new __.F.StiBubbleCardsColumn:t.is2(IStiMeasureMeter)&&((e=new StiMeasureCardsColumn).horAlignment=StiHorAlignment.Right),null!=e&&(e.loadFromJsonObject(t.saveToJsonObject(StiJsonSaveMode.Report)),this.columns.add(e))},this),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiCardsDashboardInteraction)}createMeters(t){let e=t.as(StiCardsElement);this.columns.clear();for(let t of e.columns)this.columns.add(t)}createMeters2(e){this.columns.clear();for(let t of e.columns.list)null!=t&&null!=t.type&&Type.isNumericType(t.type)?this.columns.add(StiMeterHelper.Cards.getMeasure2(t)):this.columns.add(StiMeterHelper.Cards.getDimension2(t))}createMeter(t){let e=t.as(StiDataColumn),i=t.as(StiVariable),r=null!=e?e.type:null==i?void 0:i.type;if(null!=r&&Type.isNumericType(r)){let t=StiMeterHelper.Cards.getMeasure2(e);this.columns.add(t)}else this.columns.add(StiMeterHelper.Cards.getDimension2(t))}removeMeter(t){t<this.columns.length&&this.columns.removeAt(t)}removeAllMeters(){this.columns.clear()}insertMeter(t,e){let i=e.as(StiCardsColumn);if(null==i)return;0<=t&&t<this.columns.length?this.columns.insert(t,i):this.columns.add(i)}insertNewDimension(t){let e=new StiDimensionCardsColumn;e.horAlignment=StiHorAlignment.Left,this.insertMeter(t,e)}insertNewMeasure(t){let e=new StiMeasureCardsColumn;e.expression="Sum()",e.horAlignment=StiHorAlignment.Right,this.insertMeter(t,e)}getMeasure(t){return StiMeterHelper.Cards.getMeasure2(t)}getDimension(t){return StiMeterHelper.Cards.getDimension2(t)}getCards(){return this.cards}fetchAllMeters(){return this.columns.cast()}getMeters(){return this.columns.cast()}retrieveUsedDataNames(){return StiUsedDataHelper.getMany2(this.columns)}get isDefined(){return null!=this.columns&&0<this.columns.length}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){let t=["Title.Text"];return t}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}getNestedPages(){let t,e,i=new List,r="";if(null!=this.dashboardInteraction&&this.dashboardInteraction.onClick!=StiInteractionOnClick.None&&(r=null==(t=this.dashboardInteraction)?void 0:t.drillDownPageKey,StiKeyHelper.isKey(r))){let t=this.report.pages.toList().firstOrDefault(t=>t.guid==r);null!=t&&i.add(t)}for(let t of this.columns)if(null!=(null==t?void 0:t.dashboardInteraction)&&t.dashboardInteraction.onClick!=StiInteractionOnClick.None&&(r=null==(e=null==t?void 0:t.dashboardInteraction)?void 0:e.drillDownPageKey,StiKeyHelper.isKey(r))){let t=this.report.pages.toList().firstOrDefault(t=>t.guid==r);null!=t&&i.add(t)}return 0==i.length?null:i.distinct()}constructor(t=Rectangle.empty){super(t),this.helpUrl="user-manual/dashboards_cards.htm",this.dataFilters=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.group="",this.title=new __.e.StiTitle,this.crossFiltering=!0,this.shadow=new StiSimpleShadow,this.layout=new StiElementLayout,this.cornerRadius=new StiCornerRadius(0),this.showBlanks=!1,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.seriesColors=[],this.orientation=StiItemOrientation.Horizontal,this.columns=new List,this.cards=new StiCardsItem,this.columnCount=0,this.title.text=this.localizedName,this.dashboardInteraction=new StiCardsDashboardInteraction}}__.F.StiCardsElement=StiCardsElement}{let t;(t=>{t[t["Value"]=0]="Value",t[t["PercentOfTotal"]=1]="PercentOfTotal",t[t["Category"]=2]="Category",t[t["CategoryValue"]=3]="CategoryValue",t[t["CategoryPercentOfTotal"]=4]="CategoryPercentOfTotal"})(t=__.H.StiChartLabelsStyle||(__.H.StiChartLabelsStyle={}));let e;(t=>{t[t["False"]=0]="False",t[t["Auto"]=1]="Auto",t[t["Always"]=2]="Always"})(e=__.H.StiLegendVisibility||(__.H.StiLegendVisibility={}))}__.H.StiChartAreaIndicator=class{implements(){let t=[IStiJsonReportObject,ICloneable];return(this.implements=()=>t)()}meta(){return[new StiObjectMeta("Value"),new StiObjectMeta("Title")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.value=this.value.clone(),t.title=this.title.clone(),t}constructor(){this.value=new __.H.StiChartAreaIndicatorValue,this.title=new __.H.StiChartAreaIndicatorTitle}};let StiChartAreaIndicator=__.H.StiChartAreaIndicator,IStiChartArea=Stimulsoft.Report.Dashboard.IStiChartArea,StiLabelsPlacement=(__.H.StiChartArea=class{implements(){let t=[IStiChartArea,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiBoolMeta("ColorEach"),new StiBoolMeta("SideBySide","",!1,!0),new StiObjectMeta("GridLinesHor"),new StiObjectMeta("GridLinesVert"),new StiObjectMeta("InterlacingHor"),new StiObjectMeta("InterlacingVert"),new StiBoolMeta("ReverseHor"),new StiBoolMeta("ReverseVert"),new StiObjectMeta("XAxis").check(()=>!1),new StiObjectMeta("XTopAxis").check(()=>!1),new StiObjectMeta("YAxis").check(()=>!1),new StiObjectMeta("YRightAxis").check(()=>!1),new StiObjectMeta("Indicator"),new StiNumberMeta("HorSpacing","",6),new StiNumberMeta("VertSpacing","",6)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.gridLinesHor=null!=this.gridLinesHor?this.gridLinesHor.clone():null,t.gridLinesVert=null!=this.gridLinesVert?this.gridLinesVert.clone():null,t.interlacingHor=null!=this.interlacingHor?this.interlacingHor.clone():null,t.interlacingVert=null!=this.interlacingVert?this.interlacingVert.clone():null,t.indicator=null!=this.indicator?this.indicator.clone():null,t}get horSpacing(){return this._horSpacing}set horSpacing(t){0<=t&&(this._horSpacing=t)}get vertSpacing(){return this._vertSpacing}set vertSpacing(t){0<=t&&(this._vertSpacing=t)}constructor(t,e,i,r,l,n,s,o,a,u,S,m){this.sideBySide=!0,this.colorEach=!1,this.reverseHor=!1,this.reverseVert=!1,this.interlacingHor=new __.H.StiHorChartInterlacing,this.interlacingVert=new __.H.StiVertChartInterlacing,this.gridLinesHor=new __.H.StiHorChartGridLines,this.gridLinesVert=new __.H.StiVertChartGridLines,this.xAxis=new __.H.StiXChartAxis,this.xTopAxis=new __.H.StiXTopChartAxis,this.yAxis=new __.H.StiYChartAxis,this.yRightAxis=new __.H.StiYRightChartAxis,this.indicator=new StiChartAreaIndicator,this._horSpacing=6,this._vertSpacing=6,null!=t&&(this.colorEach=t),null!=e&&(this.reverseHor=e),null!=i&&(this.reverseVert=i),null!=r&&(this.gridLinesHor=r),null!=l&&(this.gridLinesVert=l),null!=l&&(this.interlacingHor=n),null!=s&&(this.interlacingVert=s),null!=o&&(this.xAxis=o),null!=a&&(this.yAxis=a),null!=u&&(this.xTopAxis=u),null!=S&&(this.yRightAxis=S),null!=m&&(this.indicator=m)}},__.H.StiChartAreaIndicatorTitle=class{constructor(){this.text="",this.color=Color.transparent}implements(){let t=[IStiJsonReportObject,ICloneable];return(this.implements=()=>t)()}meta(){return[new StiStringMeta("Text"),new StiColorMeta("Color","",Color.transparent)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t}},__.H.StiChartAreaIndicatorValue=class{constructor(){this.color=Color.transparent}implements(){let t=[IStiJsonReportObject,ICloneable];return(this.implements=()=>t)()}meta(){return[new StiColorMeta("Color","",Color.transparent)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t}},Stimulsoft.Report.Chart.StiLabelsPlacement),StiChartAxisLabels=(__.H.StiChartAxisLabels=class{implements(){let t=[ICloneable,IStiFont,...ImplementsIStiFont,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiNumberMeta("Angle","",0),new StiStringNullOrEmptyMeta("TextBefore"),new StiStringNullOrEmptyMeta("TextAfter"),new StiFontMeta("Font","","Arial",8),new StiEnumMeta("Placement","",StiLabelsPlacement,StiLabelsPlacement.AutoRotation),new StiColorMeta("Color","",Color.transparent),new StiEnumMeta("TextAlignment","",StiHorAlignment,StiHorAlignment.Right),new StiNumberMeta("Step","",0),new StiBoolMeta("WordWrap"),new StiNumberMeta("Width")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.font=this.font.clone(),t}constructor(t,e,i,r,l,n,s,o,a){this.angle=0,this.color=Color.transparent,this.font=new Font("Arial",8),this.placement=StiLabelsPlacement.AutoRotation,this.textAlignment=StiHorAlignment.Right,this.textAfter="",this.textBefore="",this.step=0,this.wordWrap=!1,this.width=0,null!=t&&(this.textBefore=t),null!=e&&(this.textAfter=e),null!=i&&(this.angle=i),null!=r&&(this.font=r),null!=l&&(this.placement=l),null!=n&&(this.color=n),null!=s&&(this.textAlignment=s),null!=o&&(this.width=o),null!=a&&(this.wordWrap=a)}},__.H.StiChartAxisLabels),StiTitlePosition=(__.H.StiChartAxis=class{implements(){let t=[IStiJsonReportObject,ICloneable];return(this.implements=()=>t)()}is(t){if(t instanceof Stimulsoft.System.Interface)return-1!=this.implements().indexOf(t);if("function"==typeof t)return this instanceof t;if(null==t)throw new Error("Type for comparison is 'undefined'");return!1}is2(t){return this.is(t)}as(t){if(this.is(t))return this;return null}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.labels=this.labels.clone(),t.range=this.range.clone(),t}meta(){return[new StiObjectMeta("Labels").check(()=>null!=this.labels),new StiObjectMeta("Range").check(()=>null!=this.range),new StiBoolMeta("Visible","",!0)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}constructor(t,e,i){this.labels=new StiChartAxisLabels,this.range=new __.H.StiChartAxisRange,this.visible=!0,null!=t&&(this.labels=t),null!=e&&(this.range=e),null!=i&&(this.visible=i)}},__.H.StiChartAxisRange=class{implements(){let t=[IStiJsonReportObject,ICloneable];return(this.implements=()=>t)()}meta(){return[new StiNumberMeta("Minimum","",0),new StiNumberMeta("Maximum","",0),new StiBoolMeta("Auto","",!0)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}get minimum(){return this._minimum}set minimum(t){this._minimum=t}constructor(t,e,i){this._minimum=0,this.maximum=0,this.auto=!0,null!=t&&(this.auto=t),null!=e&&(this.minimum=e),null!=i&&(this.maximum=i)}},Stimulsoft.Report.Chart.StiTitlePosition),FontStyle=Stimulsoft.System.Drawing.FontStyle,StringAlignment=Stimulsoft.System.Drawing.StringAlignment;{let t;(t=>{t[t["Alignment"]=1]="Alignment",t[t["Color"]=2]="Color",t[t["Direction"]=3]="Direction",t[t["Font"]=4]="Font",t[t["Placement"]=5]="Placement",t[t["Position"]=6]="Position",t[t["Text"]=7]="Text",t[t["Visible"]=8]="Visible"})(t=__.H.Order||(__.H.Order={})),__.H.StiChartAxisTitle=class{implements(){let t=[IStiJsonReportObject];return(this.implements=()=>t)()}is(t){if(t instanceof Stimulsoft.System.Interface)return-1!=this.implements().indexOf(t);if("function"==typeof t)return this instanceof t;if(null==t)throw new Error("Type for comparison is 'undefined'");return!1}is2(t){return this.is(t)}as(t){if(this.is(t))return this;return null}meta(){return[new StiFontMeta("Font","","Arial",12,FontStyle.Bold),new StiStringNullOrEmptyMeta("Text"),new StiColorMeta("Color","",Color.transparent),new StiEnumMeta("Alignment","",StringAlignment,StringAlignment.Center),new StiEnumMeta("Position","",StiTitlePosition,StiTitlePosition.Outside),new StiBoolMeta("Visible","",!0)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.font=this.font.clone(),t}constructor(t,e,i,r,l,n){this.visible=!0,this.alignment=StringAlignment.Center,this.color=Color.transparent,this.font=new Font("Arial",12,FontStyle.Bold),this.position=StiTitlePosition.Outside,this.text="",null!=t&&(this.font=t),null!=e&&(this.text=e),null!=i&&(this.color=i),null!=r&&(this.alignment=r),null!=l&&(this.position=l),null!=n&&(this.visible=n)}}}let StiConstantLines_StiTextPosition=Stimulsoft.Report.Chart.StiConstantLines_StiTextPosition,IStiChartConstantLines=Stimulsoft.Report.Dashboard.IStiChartConstantLines;{class Bq{implements(){let t=[ICloneable,IStiChartConstantLines,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiStringNullOrEmptyMeta("Text"),new StiColorMeta("LineColor"),new StiEnumMeta("LineStyle","",StiPenStyle,StiPenStyle.Solid),new StiNumberMeta("LineWidth","",1),new StiStringMeta("AxisValue","","1"),new StiEnumMeta("Position","",StiConstantLines_StiTextPosition,StiConstantLines_StiTextPosition.LeftTop)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}static createFromJson(t){let e=new Bq;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new Bq;return e.loadFromXml(t),e}constructor(t,e,i,r,l,n){this.text="",this.lineStyle=StiPenStyle.Solid,this.lineColor=Color.black,this.axisValue="1",this.lineWidth=1,this.position=StiConstantLines_StiTextPosition.LeftTop,null!=t&&(this.text=t),null!=e&&(this.axisValue=e),null!=i&&(this.lineColor=i),null!=r&&(this.lineStyle=r),null!=l&&(this.lineWidth=l),null!=n&&(this.position=n)}}__.H.StiChartConstantLines=Bq}let StiMarkerType=Stimulsoft.Report.Chart.StiMarkerType,StiExtendedStyleBool=Stimulsoft.Report.Chart.StiExtendedStyleBool,StiSeriesLabelsValueType=(__.H.StiChartMarker=class{implements(){let t=[ICloneable,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiNumberMeta("Size","",7),new StiNumberMeta("Angle","",0),new StiEnumMeta("Type","",StiMarkerType,StiMarkerType.Circle),new StiEnumMeta("Visible","",StiExtendedStyleBool,StiExtendedStyleBool.FromStyle)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}static createFromJson(t){let e=new __.H.StiChartConstantLines;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new __.H.StiChartConstantLines;return e.loadFromXml(t),e}constructor(t){this.size=7,this.angle=0,this.type=StiMarkerType.Circle,this.visible=StiExtendedStyleBool.FromStyle,null!=t&&(this.size=t)}},__.H.StiChartLegendTitle=class{meta(){return[new StiFontMeta("Font","","Arial",12,FontStyle.Bold),new StiStringNullOrEmptyMeta("Text"),new StiColorMeta("Color","",Color.transparent)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.font=this.font.clone(),t}constructor(t,e,i){this.color=Color.transparent,this.font=new Font("Arial",12,FontStyle.Bold),this.text="",null!=t&&(this.font=t),null!=e&&(this.text=e),null!=i&&(this.color=i)}},Stimulsoft.Report.Chart.StiSeriesLabelsValueType),StiLegendDirection=(__.H.StiChartLegendLabels=class{implements(){let t=[ICloneable,IStiFont,...ImplementsIStiFont,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiFontMeta("Font","","Arial",8),new StiColorMeta("Color","",Color.transparent),new StiEnumMeta("ValueType","",StiSeriesLabelsValueType)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.font=this.font.clone(),t}constructor(t,e,i){this.color=Color.transparent,this.font=new Font("Arial",8),this.valueType=null,null!=t&&(this.font=t),null!=e&&(this.color=e),null!=i&&(this.valueType=i)}},Stimulsoft.Report.Chart.StiLegendDirection),StiChartLegendTitle=__.H.StiChartLegendTitle,StiChartLegendLabels=__.H.StiChartLegendLabels,StiLegendVertAlignment=Stimulsoft.Report.Chart.StiLegendVertAlignment,StiLegendHorAlignment=Stimulsoft.Report.Chart.StiLegendHorAlignment;{let t;(t=>{t[t["HorAlignment"]=1]="HorAlignment",t[t["Labels"]=2]="Labels",t[t["Title"]=3]="Title",t[t["VertAlignment"]=4]="VertAlignment"})(t=__.H.Order||(__.H.Order={})),__.H.StiChartLegend=class{implements(){let t=[IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiObjectMeta("Title"),new StiObjectMeta("Labels"),new StiEnumMeta("HorAlignment","",StiLegendHorAlignment,StiLegendHorAlignment.Left),new StiEnumMeta("VertAlignment","",StiLegendVertAlignment,StiLegendVertAlignment.TopOutside),new StiBoolMeta("Visible","",!0),new StiEnumMeta("Visibility","",__.H.StiLegendVisibility,__.H.StiLegendVisibility.Auto),new StiEnumMeta("Direction","",StiLegendDirection,StiLegendDirection.TopToBottom),new StiNumberMeta("Columns")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.title=this.title.clone(),t.labels=this.labels.clone(),t.horAlignment=this.horAlignment,t.vertAlignment=this.vertAlignment,t.visible=this.visible,t.direction=this.direction,t.columns=this.columns,t.visibility=this.visibility,t}get visible(){return this.visibility==__.H.StiLegendVisibility.Auto}set visible(t){this.visibility=t?__.H.StiLegendVisibility.Auto:__.H.StiLegendVisibility.False}constructor(t,e,i,r,l,n,s){this.horAlignment=StiLegendHorAlignment.Left,this.vertAlignment=StiLegendVertAlignment.TopOutside,this.visibility=__.H.StiLegendVisibility.Auto,this.direction=StiLegendDirection.TopToBottom,this.columns=0,this.labels=new StiChartLegendLabels,this.title=new StiChartLegendTitle,null!=t&&(this.title=t),null!=e&&(this.labels=e),null!=i&&(this.horAlignment=i),null!=r&&(this.vertAlignment=r),null!=l&&(this.visibility=l),null!=n&&(this.direction=n),null!=s&&(this.columns=s)}}}let StiDirection=Stimulsoft.Report.Chart.StiDirection,StiYChartAxisTitle=(__.H.StiYChartAxisTitle=class extends __.H.StiChartAxisTitle{meta(){return[...super.meta(),new StiEnumMeta("Direction","",StiDirection,StiDirection.BottomToTop)]}constructor(t,e,i,r,l,n,s){super(t,e,i,r,n,s),this.direction=StiDirection.BottomToTop,null!=l&&(this.direction=l)}},__.H.StiYChartAxisTitle),StiAutoBool=(__.H.StiYChartAxis=class extends __.H.StiChartAxis{clone(){let t,e=super.clone();return e.title=this.title.clone(),e.range=null==(t=this.range)?void 0:t.clone(),e}meta(){return[...super.meta(),new StiObjectMeta("Title"),new StiBoolMeta("StartFromZero","",!0)]}constructor(t,e,i,r){super(t),this.title=new StiYChartAxisTitle,this.startFromZero=!0,null!=t&&(this.labels=t),null!=e&&(this.title=e),null!=i&&(this.visible=i),null!=r&&(this.startFromZero=r)}},Stimulsoft.Base.StiAutoBool),IStiChartDashboardInteraction=(__.H.StiXChartAxis=class extends __.H.StiChartAxis{clone(){let t=super.clone();return t.title=this.title.clone(),t}meta(){return[...super.meta(),new StiObjectMeta("Title").check(()=>null!=this.title),new StiEnumMeta("ShowEdgeValues","",StiAutoBool,StiAutoBool.Auto),new StiEnumMeta("StartFromZero","",StiAutoBool,StiAutoBool.Auto)]}constructor(t,e,i,r,l){super(t),this.title=new __.H.StiXChartAxisTitle,this.showEdgeValues=StiAutoBool.Auto,this.startFromZero=StiAutoBool.Auto,null!=t&&(this.labels=t),null!=e&&(this.title=e),null!=i&&(this.visible=i),null!=r&&(this.startFromZero=r),null!=l&&(this.showEdgeValues=l)}},Stimulsoft.Report.Dashboard.IStiChartDashboardInteraction),StiInteractionViewsState=Stimulsoft.Report.Dashboard.StiInteractionViewsState,IStiAllowUserSortingDashboardInteraction=Stimulsoft.Report.Dashboard.IStiAllowUserSortingDashboardInteraction,IStiAllowUserDrillDownDashboardInteraction=Stimulsoft.Report.Dashboard.IStiAllowUserDrillDownDashboardInteraction,IStiDrillDownElement=(__.g.StiChartDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiChartDashboardInteraction,IStiAllowUserDrillDownDashboardInteraction,IStiAllowUserSortingDashboardInteraction,IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("AllowUserDrillDown"),new StiBoolMeta("AllowUserSorting","",!0),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText"),new StiEnumMeta("ViewsState","",StiInteractionViewsState,StiInteractionViewsState.OnHover)]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.ApplyFilter&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)&&!this.allowUserDrillDown&&this.allowUserSorting&&this.isDefaultLayout}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.Chart,this.allowUserDrillDown=!1,this.allowUserSorting=!0,this.availableOnClick=StiAvailableInteractionOnClick.ApplyFilter|StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard|StiAvailableInteractionOnClick.DrillDown,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.AllowDrillDown|StiAvailableInteractionOnDataManipulation.AllowSorting,this.viewsState=StiInteractionViewsState.OnHover,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=o&&(this.allowUserDrillDown=o),null!=a&&(this.fileName=a),null!=u&&(this.headerText=u),null!=S&&(this.footerText=S),null!=m&&(this.showFullScreenButton=m),null!=h&&(this.showSaveButton=h),null!=c&&(this.showViewDataButton=c),null!=d&&(this.viewsState=d)}},Stimulsoft.Data.Engine.IStiDrillDownElement),StiChartTrendLineType=(__.g.StiDrillDownHelper=class{static isDrillAvailable(t){let e=t.is(IStiElementInteraction)?t.dashboardInteraction.as(IStiAllowUserDrillDownDashboardInteraction):null;if(null==e||!e.allowUserDrillDown)return!1;let i=t.as(IStiDrillDownElement);return null!=i}static isDrillUpAvailable(t){if(!this.isDrillAvailable(t))return!1;let e=t.as(IStiDrillDownElement);return 0<e.drillDownCurrentLevel}static isDrillDownAvailable(t){if(!this.isDrillAvailable(t))return!1;let e=t.as(IStiDrillDownElement);return e.drillDownCurrentLevel<e.drillDownLevelCount-1}static drillUp(t){let e=t.as(IStiDrillDownElement);e.drillDownCurrentLevel--,e.drillDownFilters=e.drillDownFiltersList[e.drillDownCurrentLevel],e.drillDownFiltersList.removeAt(e.drillDownFiltersList.length-1)}static drillDown(t,e=null){let i=t.as(IStiDrillDownElement);i.drillDownFiltersList.add(i.drillDownFilters),i.drillDownFilters=e,i.drillDownCurrentLevel++}},Stimulsoft.Report.Dashboard.StiChartTrendLineType);{class StiChartTrendLine{implements(){let t=[ICloneable,IStiChartConstantLines,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiStringNullOrEmptyMeta("KeyValueMeter"),new StiEnumMeta("Type","",StiChartTrendLineType,StiChartTrendLineType.None),new StiEnumMeta("LineStyle","",StiPenStyle,StiPenStyle.Solid),new StiColorMeta("LineColor","",Color.black),new StiNumberMeta("LineWidth","",1)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}static createFromJson(t){let e=new StiChartTrendLine;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new StiChartTrendLine;return e.loadFromXml(t),e}constructor(t,e,i,r,l){this.type=StiChartTrendLineType.None,this.lineStyle=StiPenStyle.Solid,this.lineColor=Color.black,this.lineWidth=1,null!=t&&(this.keyValueMeter=t),null!=e&&(this.type=e),null!=i&&(this.lineColor=i),null!=r&&(this.lineStyle=r),null!=l&&(this.lineWidth=l)}}__.H.StiChartTrendLine=StiChartTrendLine}let StiColumnShape3D=Stimulsoft.Report.Chart.StiColumnShape3D,StiPie3dOptions=Stimulsoft.Report.Chart.StiPie3dOptions,StiDataMode=Stimulsoft.Report.StiDataMode,StiUserViewState=Stimulsoft.Report.Dashboard.StiUserViewState,IStiUserViewStates=Stimulsoft.Report.Dashboard.IStiUserViewStates,StiArray=Stimulsoft.System.StiArray,StiChartSeriesCreator=Stimulsoft.Report.Dashboard.StiChartSeriesCreator,StiChartMarker=__.H.StiChartMarker,StiDrillDownHelper=__.g.StiDrillDownHelper,StiChartDashboardInteraction=__.g.StiChartDashboardInteraction,IStiNegativeSeriesColors=Stimulsoft.Report.Dashboard.IStiNegativeSeriesColors,IStiParetoSeriesColors=Stimulsoft.Report.Dashboard.IStiParetoSeriesColors,ImplementsIStiSeriesColors=Stimulsoft.Report.Dashboard.ImplementsIStiSeriesColors,ImplementsIStiNegativeSeriesColors=Stimulsoft.Report.Dashboard.ImplementsIStiNegativeSeriesColors,ImplementsIStiParetoSeriesColors=Stimulsoft.Report.Dashboard.ImplementsIStiParetoSeriesColors,ImplementsIStiUserViewStates=Stimulsoft.Report.Dashboard.ImplementsIStiUserViewStates,ImplementsIStiSkipOwnFilter=Stimulsoft.Report.Dashboard.ImplementsIStiSkipOwnFilter,ImplementsIStiChartElement=Stimulsoft.Report.Dashboard.ImplementsIStiChartElement,StiChartLegend=__.H.StiChartLegend,StiTitle=__.e.StiTitle,StiChartGroups=Stimulsoft.Report.Dashboard.StiChartGroups,IStiChartElement=Stimulsoft.Report.Dashboard.IStiChartElement,ImplementsIStiDrillDownElement=Stimulsoft.Data.Engine.ImplementsIStiDrillDownElement,StiChartTrendLine=__.H.StiChartTrendLine,IStiShowNullsSeries=Stimulsoft.Report.Chart.IStiShowNullsSeries;{let e=Stimulsoft.Report.Components.StiTextFormatState;StiExportToolAttribute.add("StiChartElement","Stimulsoft.Dashboard.Export.Tools.StiChartElementExportTool");class StiChartElement extends __.e.StiElement{implements(){let t=super.implements().concat([IStiChartElement,IStiSimpleShadow,IStiCornerRadius,IStiUserViewStates,IStiSkipOwnFilter,IStiTitleElement,IStiElementLayout,IStiGlobalizationProvider,IStiSeriesColors,IStiNegativeSeriesColors,IStiParetoSeriesColors,IStiShowBlanks,...ImplementsIStiChartElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiUserViewStates,...ImplementsIStiSkipOwnFilter,...ImplementsIStiTitleElement,...ImplementsIStiElementLayout,...ImplementsIStiSeriesColors,...ImplementsIStiNegativeSeriesColors,...ImplementsIStiParetoSeriesColors,...ImplementsIStiDrillDownElement,IStiJsonReportObject,IStiElementInteraction,IStiDrillDownElement]);return(this.implements=()=>t)()}clone(t){let e,i,r,l,n,s=super.clone(t),o=(s.values=this.values.select(t=>t.clone()).toList(),s.endValues=this.endValues.select(t=>t.clone()).toList(),s.closeValues=this.closeValues.select(t=>t.clone()).toList(),s.lowValues=this.lowValues.select(t=>t.clone()).toList(),s.highValues=this.highValues.select(t=>t.clone()).toList(),s.arguments=this.arguments.select(t=>t.clone()).toList(),s.weights=this.weights.select(t=>t.clone()).toList(),s.xValues=this.xValues.select(t=>t.clone()).toList(),s.yValues=this.yValues.select(t=>t.clone()).toList(),s.series=null!=this.series?this.series.clone():null,s.sortBy=null!=this.sortBy?this.sortBy.clone():null,s.indicatorValue=null==(e=this.indicatorValue)?void 0:e.clone(),s.userFilters=this.userFilters.select(t=>t.clone()).toList(),s.userSorts=this.userSorts.select(t=>t.clone()).toList(),s.userViewStates=this.userViewStates.select(t=>t.clone()).toList(),s.transformActions=this.transformActions.select(t=>t.clone()).toList(),s.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),s.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),s.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),s.topN=this.topN.clone(),s.argumentFormat=null!=this.argumentFormat?this.argumentFormat.clone():null,s.valueFormat=null!=this.valueFormat?this.valueFormat.clone():null,s.title=null!=this.title?this.title.clone():null,s.layout=null!=this.layout?this.layout.clone():null,s.dashboardInteraction=this.dashboardInteraction.clone(),s.xAxis=null!=this.xAxis?this.xAxis.clone():null,s.xTopAxis=null==(i=this.xTopAxis)?void 0:i.clone(),s.yAxis=null!=this.yAxis?this.yAxis.clone():null,s.yRightAxis=null==(r=this.yRightAxis)?void 0:r.clone(),s.legend=null!=this.legend?this.legend.clone():null,s.area=null!=this.area?this.area.clone():null,s.seriesColors=null!=this.seriesColors?this.seriesColors.slice():null,s.negativeSeriesColors=null!=this.negativeSeriesColors?this.negativeSeriesColors.slice():null,s.paretoSeriesColors=null!=this.paretoSeriesColors?this.paretoSeriesColors.slice():null,s.marker=null!=this.marker?this.marker.clone():null,s.constantLines=this.constantLines.select(t=>t.clone()).toList(),s.trendLines=this.trendLines.select(t=>t.clone()).toList(),s.chartConditions=this.chartConditions.select(t=>t.clone()).toList(),{}),a=this.getMeters(),u=s.getMeters();for(let i=0;i<a.length;i++){let t=a[i].key,e=u[i].key;o[t]=e}for(let t of s.chartConditions)t.keyValueMeter in o.hasOwnProperty&&(t.keyValueMeter=o[t.keyValueMeter]);return s.shadow=null==(l=this.shadow)?void 0:l.clone(),s.cornerRadius=null==(n=this.cornerRadius)?void 0:n.clone(),s}meta(){return[...super.meta(),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("UserSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userSorts,t)).set(t=>this.userSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.userSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("Values").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.values,t)).set(t=>this.values.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.values.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("EndValues").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.endValues,t)).set(t=>this.endValues.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.endValues.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("CloseValues").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.closeValues,t)).set(t=>this.closeValues.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.closeValues.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("LowValues").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.lowValues,t)).set(t=>this.lowValues.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.lowValues.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("HighValues").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.highValues,t)).set(t=>this.highValues.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.highValues.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("Arguments").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.arguments,t)).set(t=>this.arguments.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.arguments.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("Weights").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.weights,t)).set(t=>this.weights.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.weights.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("XValues").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.xValues,t)).set(t=>this.xValues.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.xValues.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("YValues").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.yValues,t)).set(t=>this.yValues.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.yValues.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("UserViewStates").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userViewStates,t)).set(t=>this.userViewStates.addRange(t.value.properties().select(t=>StiUserViewState.loadFromJson(t.value)))).setXml(t=>this.userViewStates.addRange(t.childNodes.map(t=>StiUserViewState.loadFromXml(t)))),new StiBoolMeta("ColorEach"),new StiBoolMeta("ShowViewTitle"),new StiBoolMeta("CrossFiltering","",!0),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiChartDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiChartDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiChartDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiObjectMeta("ManuallyEnteredChartMeter").check(()=>null!=this.manuallyEnteredChartMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.H.StiValueChartMeter);null!=e&&(this.manuallyEnteredChartMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.H.StiValueChartMeter);null!=e&&(this.manuallyEnteredChartMeter=e)}),new StiObjectMeta("Series").check(()=>null!=this.series).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiSeriesChartMeter);null!=e&&(this.series=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiSeriesChartMeter);null!=e&&(this.series=e)}),new StiObjectMeta("SortBy").check(()=>null!=this.sortBy).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.H.StiSortByChartMeter);null!=e&&(this.sortBy=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.H.StiSortByChartMeter);null!=e&&(this.sortBy=e)}),new StiObjectMeta("IndicatorValue").check(()=>null!=this.indicatorValue).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.H.StiIndicatorValueChartMeter);null!=e&&(this.indicatorValue=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.H.StiIndicatorValueChartMeter);null!=e&&(this.indicatorValue=e)}),new StiObjectMeta("ArgumentFormat").check(()=>null!=this.argumentFormat).set(t=>this.argumentFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.argumentFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiObjectMeta("ValueFormat").check(()=>null!=this.valueFormat).set(t=>this.valueFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.valueFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiObjectMeta("XAxis").check(()=>null!=this.xAxis),new StiObjectMeta("XTopAxis").check(()=>null!=this.xTopAxis),new StiObjectMeta("YAxis").check(()=>null!=this.yAxis),new StiObjectMeta("YRightAxis").check(()=>null!=this.yRightAxis),new StiObjectMeta("Legend").check(()=>null!=this.legend),new StiObjectMeta("Area").check(()=>null!=this.area),new StiObjectMeta("Marker").check(()=>null!=this.marker),new StiObjectMeta("Labels").check(()=>null!=this.labels),new StiObjectMeta("Options3D").check(()=>null!=this.options3D),new StiObjectMeta("SeriesColors").get(()=>StiJsonReportObjectHelper.Serialize.colorArray(this.seriesColors)).set(t=>this.seriesColors=StiJsonReportObjectHelper.Deserialize.colorArray(t.value)).setXml(t=>this.seriesColors=StiReportObjectStringConverter.convertStringToColorArray(t.textContent)),new StiObjectMeta("NegativeSeriesColors").get(()=>StiJsonReportObjectHelper.Serialize.colorArray(this.negativeSeriesColors)).set(t=>this.negativeSeriesColors=StiJsonReportObjectHelper.Deserialize.colorArray(t.value)).setXml(t=>this.negativeSeriesColors=StiReportObjectStringConverter.convertStringToColorArray(t.textContent)),new StiObjectMeta("ParetoSeriesColors").get(()=>StiJsonReportObjectHelper.Serialize.colorArray(this.paretoSeriesColors)).set(t=>this.paretoSeriesColors=StiJsonReportObjectHelper.Deserialize.colorArray(t.value)).setXml(t=>this.paretoSeriesColors=StiReportObjectStringConverter.convertStringToColorArray(t.textContent)),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiObjectMeta("ConstantLines").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.constantLines,t)).set(t=>this.constantLines.addRange(t.value.properties().select(t=>__.H.StiChartConstantLines.createFromJson(t.value)))).setXml(t=>this.constantLines.addRange(t.childNodes.map(t=>__.H.StiChartConstantLines.createFromXml(t)))),new StiObjectMeta("TrendLines").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.trendLines,t)).set(t=>this.trendLines.addRange(t.value.properties().select(t=>StiChartTrendLine.createFromJson(t.value)))).setXml(t=>this.trendLines.addRange(t.childNodes.map(t=>StiChartTrendLine.createFromXml(t)))),new StiObjectMeta("ChartConditions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.chartConditions,t)).set(t=>this.chartConditions.addRange(t.value.properties().select(t=>__.H.StiChartElementCondition.createFromJson(t.value)))).setXml(t=>this.chartConditions.addRange(t.childNodes.map(t=>__.H.StiChartElementCondition.createFromXml(t)))),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiEnumMeta("DataMode","",StiDataMode,StiDataMode.UsingDataFields),new StiStringNullOrEmptyMeta("ManuallyEnteredData"),new StiEnumMeta("Icon","",StiFontIcons).check(()=>null!=this.icon),new StiBoolMeta("RoundValues","",!0),new StiStringNullOrEmptyMeta("SelectedViewStateKey").check(()=>null!=this.selectedViewStateKey),new StiEnumMeta("ColumnShape","",StiColumnShape3D,StiColumnShape3D.Box),new StiBoolMeta("ShowBlanks")]}convertToBubble(){null!=this.arguments&&this.arguments.where(t=>null!=t).toList().forEach(t=>{t.expression=StiExpressionHelper.replaceFunction(t.expression,"Sum")})}convertFromBubble(){null!=this.arguments&&this.arguments.where(t=>null!=t).toList().forEach(t=>{t.expression=StiExpressionHelper.removeFunction(t.expression)}),null!=this.weights&&this.weights.clear()}convertToGantt(){var t;null!=this.values&&null!=(t=this.values)&&t.where(t=>null!=t).toList().forEach(t=>{t.expression=StiExpressionHelper.removeFunction(t.expression)})}getChartSeriesTypes(i){let r=new List;if(1<this.values.length){let t=Enum.parse(StiChartSeriesType,i),e=StiChartGroups.getGroup(t);if(null!=e)for(let t of e)r.add(Enum.getName(StiChartSeriesType,t))}return r}getManuallyEnteredChartMeter(){return this.manuallyEnteredChartMeter}addValue(t){null!=t&&this.values.add(StiMeterHelper.Chart.getValue2(t,this))}getValue2(t){return null!=t?StiMeterHelper.Chart.getValue2(t,this):null}getValue(t){return null!=t?StiMeterHelper.Chart.getValue(t.as(__.e.StiMeter)):null}getGanttStartValue(t){return null!=t?StiMeterHelper.Chart.getGanttStartValue(t):null}getGanttEndValue(t){return null!=t?StiMeterHelper.Chart.getGanttEndValue(t):null}getY(t){return null!=t?StiMeterHelper.Chart.getY2(t):null}getX(t){return null!=t?StiMeterHelper.Chart.getX2(t):null}fetchAllValues(){return this.values.cast().toList()}fetchAllXValues(){return this.xValues.cast().toList()}fetchAllYValues(){return this.yValues.cast().toList()}getValueByIndex(t){return t<this.values.length?this.values[t]:null}insertValue(t,e){let i=e.as(__.H.StiValueChartMeter);null!=i&&(0<=t&&t<this.values.length?this.values.insert(t,i):this.values.add(i))}removeValue(t){t<this.values.length&&this.values.removeAt(t)}removeAllValues(){this.values.clear()}createNewValue(){let t=new __.H.StiValueChartMeter;return t.expression="Sum()",this.values.add(t),t}addEndValue(t){null!=t&&this.endValues.add(StiMeterHelper.Chart.getEndValue2(t))}getEndValue2(t){return null!=t?StiMeterHelper.Chart.getEndValue2(t):null}getEndValue(t){return null!=t?StiMeterHelper.Chart.getEndValue(t.as(__.e.StiMeter)):null}getEndValueByIndex(t){return t<this.endValues.length?this.endValues[t]:null}insertEndValue(t,e){let i=e.as(StiEndValueChartMeter);null!=i&&(0<=t&&t<this.endValues.length?this.endValues.insert(t,i):this.endValues.add(i))}removeEndValue(t){t<this.endValues.length&&this.endValues.removeAt(t)}removeAllEndValues(){this.endValues.clear()}createNewEndValue(){let t=new StiEndValueChartMeter;return t.expression="Sum()",this.endValues.add(t),t}addCloseValue(t){null!=t&&this.closeValues.add(StiMeterHelper.Chart.getCloseValue2(t))}getCloseValue2(t){return null!=t?StiMeterHelper.Chart.getCloseValue2(t):null}getCloseValue(t){return null!=t?StiMeterHelper.Chart.getCloseValue(t.as(__.e.StiMeter)):null}getCloseValueByIndex(t){return t<this.closeValues.length?this.closeValues[t]:null}insertCloseValue(t,e){let i=e.as(StiCloseValueChartMeter);null!=i&&(0<=t&&t<this.closeValues.length?this.closeValues.insert(t,i):this.closeValues.add(i))}removeCloseValue(t){t<this.closeValues.length&&this.closeValues.removeAt(t)}removeAllCloseValues(){this.closeValues.clear()}createNewCloseValue(){let t=new StiCloseValueChartMeter;return t.expression="Sum()",this.closeValues.add(t),t}addLowValue(t){null!=t&&this.lowValues.add(StiMeterHelper.Chart.getLowValue2(t))}getLowValue2(t){return null!=t?StiMeterHelper.Chart.getLowValue2(t):null}getLowValue(t){return null!=t?StiMeterHelper.Chart.getLowValue(t.as(__.e.StiMeter)):null}getLowValueByIndex(t){return t<this.lowValues.length?this.lowValues[t]:null}insertLowValue(t,e){let i=e.as(StiLowValueChartMeter);null!=i&&(0<=t&&t<this.lowValues.length?this.lowValues.insert(t,i):this.lowValues.add(i))}removeLowValue(t){t<this.lowValues.length&&this.lowValues.removeAt(t)}removeAllLowValues(){this.lowValues.clear()}createNewLowValue(){let t=new StiLowValueChartMeter;return t.expression="Sum()",this.lowValues.add(t),t}addHighalue(t){null!=t&&this.highValues.add(StiMeterHelper.Chart.getHighValue2(t))}getHighValue2(t){return null!=t?StiMeterHelper.Chart.getHighValue2(t):null}getHighValue(t){return null!=t?StiMeterHelper.Chart.getHighValue(t.as(__.e.StiMeter)):null}getHighValueByIndex(t){return t<this.highValues.length?this.highValues[t]:null}insertHighValue(t,e){let i=e.as(StiHighValueChartMeter);null!=i&&(0<=t&&t<this.highValues.length?this.highValues.insert(t,i):this.highValues.add(i))}removeHighValue(t){t<this.highValues.length&&this.highValues.removeAt(t)}removeAllHighValues(){this.highValues.clear()}createNewHighValue(){let t=new StiHighValueChartMeter;return t.expression="Sum()",this.highValues.add(t),t}addXValue(t){null!=t&&this.xValues.add(StiMeterHelper.Chart.getXValue2(t))}getXValue2(t){return null!=t?StiMeterHelper.Chart.getXValue2(t):null}getXValue(t){return null!=t?StiMeterHelper.Chart.getXValue(t.as(__.e.StiMeter)):null}getXValueByIndex(t){return t<this.xValues.length?this.xValues[t]:null}insertXValue(t,e){let i=e.as(__.H.StiXChartMeter);null!=i&&(0<=t&&t<this.xValues.length?this.xValues.insert(t,i):this.xValues.add(i))}removeXValue(t){t<this.xValues.length&&this.xValues.removeAt(t)}removeAllXValues(){this.xValues.clear()}createNewXValue(){let t=new __.H.StiXChartMeter;return this.xValues.add(t),t}addYValue(t){null!=t&&this.xValues.add(StiMeterHelper.Chart.getYValue2(t))}getYValue2(t){return null!=t?StiMeterHelper.Chart.getYValue2(t):null}getYValue(t){return null!=t?StiMeterHelper.Chart.getYValue(t.as(__.e.StiMeter)):null}getYValueByIndex(t){return t<this.yValues.length?this.yValues[t]:null}insertYValue(t,e){let i=e.as(StiYChartMeter);null!=i&&(0<=t&&t<this.yValues.length?this.yValues.insert(t,i):this.yValues.add(i))}removeYValue(t){t<this.yValues.length&&this.yValues.removeAt(t)}removeAllYValues(){this.yValues.clear()}createNewYValue(){let t=new StiYChartMeter;return this.yValues.add(t),t}addArgument(t){null!=t&&this.arguments.add(StiMeterHelper.Chart.getArgument2(t))}getArgument2(t){return null!=t?StiMeterHelper.Chart.getArgument2(t):null}getArgument(t){return null!=t?StiMeterHelper.Chart.getArgument(t.as(__.e.StiMeter)):null}fetchAllArguments(){return this.arguments.cast().toList()}getArgumentByIndex(t){return t<this.arguments.length?this.arguments[t]:null}insertArgument(t,e){let i=e.as(StiArgumentChartMeter);null!=i&&(0<=t&&t<this.arguments.length?this.arguments.insert(t,i):this.arguments.add(i))}removeArgument(t){t<this.arguments.length&&this.arguments.removeAt(t)}removeAllArguments(){this.arguments.clear()}createNewArgument(){this.arguments.add(new StiArgumentChartMeter)}addWeight(t){null!=t&&this.weights.add(StiMeterHelper.Chart.getWeight2(t))}getWeight2(t){return null!=t?StiMeterHelper.Chart.getWeight2(t):null}getWeight(t){return null!=t?StiMeterHelper.Chart.getWeight(t.as(__.e.StiMeter)):null}getWeightByIndex(t){return t<this.weights.length?this.weights[t]:null}insertWeight(t,e){let i=e.as(StiWeightChartMeter);null!=i&&(0<=t&&t<this.weights.length?this.weights.insert(t,i):this.weights.add(i))}removeWeight(t){t<this.weights.length&&this.weights.removeAt(t)}removeAllWeights(){this.weights.clear()}createNewWeight(){let t=new StiWeightChartMeter;t.expression="Sum()",this.weights.add(t)}addSeries(t){this.series=null!=t?StiMeterHelper.Chart.getSeries2(t):null}getSeries2(t){return null!=t?StiMeterHelper.Chart.getSeries2(t):null}getSeries(t){return null!=t?StiMeterHelper.Chart.getSeries(t.as(__.e.StiMeter)):null}getSeries3(){return this.series}insertSeries(t){this.series=t.as(StiSeriesChartMeter)}removeSeries(){this.series=null}createNewSeries(){this.series=new StiSeriesChartMeter}addSortBy(t){this.sortBy=null!=t?StiMeterHelper.Chart.getSortBy2(t):null}getSortBy2(t){return null!=t?StiMeterHelper.Chart.getSortBy2(t):null}getSortBy(t){return null!=t?StiMeterHelper.Chart.getSortBy(t.as(__.e.StiMeter)):null}getSortBy3(){return this.sortBy}insertSortBy(t){this.sortBy=t.as(__.H.StiSortByChartMeter)}removeSortBy(){this.sortBy=null}createNewSortBy(){this.sortBy=new __.H.StiSortByChartMeter}addIndicatorValue(t){this.indicatorValue=null!=t?StiMeterHelper.Chart.getIndicatorValue2(t):null}getIndicatorValue2(t){return null!=t?StiMeterHelper.Chart.getIndicatorValue2(t):null}getIndicatorValue(t){return null!=t?StiMeterHelper.Chart.getIndicatorValue(t.as(__.e.StiMeter)):null}getIndicatorValue3(){return this.indicatorValue}insertIndicatorValue(t){this.indicatorValue=t.as(__.H.StiIndicatorValueChartMeter)}removeIndicatorValue(){this.indicatorValue=null}createNewIndicatorValue(){this.indicatorValue=new __.H.StiIndicatorValueChartMeter}fetchConstantLines(){let t=new List;return null!=this.constantLines&&t.addRange(this.constantLines),t}addConstantLine(){this.constantLines.add(new __.H.StiChartConstantLines)}removeConstantLine(t){0<=t&&t<this.constantLines.length&&this.constantLines.removeAt(t)}moveConstantLine(e,i){if(0<=e&&e<this.constantLines.length){let t=this.constantLines[e];this.constantLines.removeAt(e),this.constantLines.insert(i,t)}}addTrendLines(t,e,i,r,l){this.trendLines.add(new StiChartTrendLine(t,e,i,r,l))}fetchTrendLines(){let t=new List;return null!=t&&t.addRange(this.trendLines),t}clearTrendLines(){this.trendLines.clear()}addChartCondition(t,e,i,r,l,n,s,o,a){this.chartConditions.add(new __.H.StiChartElementCondition(t,l,e,i,r,n,s,o,a))}fetchChartConditions(){let t=new List;return null!=this.chartConditions&&t.addRange(this.chartConditions),t}clearChartConditions(){this.chartConditions.clear()}convertFrom(t){let e=t.fetchAllMeters();if(this.values.clear(),this.arguments.clear(),null==e)return;e.where(t=>(t.is2(IStiValueMeter)||t.is2(IStiMeasureMeter))&&!t.is2(IStiSeriesMeter)).cast().forEach(t=>{let e=new __.H.StiValueChartMeter;e.loadFromJsonObject(t.saveToJsonObject(StiJsonSaveMode.Report)),this.values.add(e)},this),e.where(t=>t.is(IStiSeriesMeter)).cast().forEach(t=>{let e=new StiArgumentChartMeter;e.loadFromJsonObject(t.saveToJsonObject(StiJsonSaveMode.Report)),this.arguments.add(e)},this),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiChartDashboardInteraction)}fetchAllMeters(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(null!=this.values&&t.addRange(this.values),null!=this.endValues&&t.addRange(this.endValues),null!=this.closeValues&&t.addRange(this.closeValues),null!=this.lowValues&&t.addRange(this.lowValues),null!=this.highValues&&t.addRange(this.highValues),null!=this.arguments&&t.addRange(this.arguments),null!=this.weights&&t.addRange(this.weights),null!=this.series&&t.add(this.series),null!=this.sortBy&&t.add(this.sortBy),null!=this.indicatorValue&&t.add(this.indicatorValue),null!=this.xValues&&t.addRange(this.xValues),null!=this.yValues)&&t.addRange(this.yValues),t}getMeters(){let r=new List;if(this.dataMode==StiDataMode.UsingDataFields){for(let i of this.values)if(this.isBubbleChart){let t=new StiYChartMeter;t.key=i.key,t.expression=i.expression,t.label=i.label,r.add(t)}else if(this.isFinancial){let t=new __.H.StiOpenValueChartMeter;t.seriesType=i.seriesType,t.key=i.key,t.expression=i.expression,t.label=i.label,r.add(t)}else if(this.isRange){let t=new __.H.StiStartValueChartMeter;t.seriesType=i.seriesType,t.key=i.key,t.expression=i.expression,t.label=i.label,t.lineStyle=i.lineStyle,t.showNulls=i.showNulls,r.add(t)}else if(i.showZeros==StiEmptyCellsAs.Zero&&i.showNulls==StiEmptyCellsAs.Zero||!StiChartSeriesCreator.neww2(i.seriesType).is(IStiShowNullsSeries))r.add(i);else{let t=StiExpressionHelper.getFunction(i.expression),e=null;if("sum"==(t=null!=t?t.toLowerCase():t)?e="sumnulls":"avg"==t&&(e="avgnulls"),null!=e){let t=i.clone();t.key=i.key,t.expression=StiExpressionHelper.replaceFunction(i.expression,e),r.add(t)}else r.add(i)}if(this.isRange)for(let t of this.endValues)r.add(t);if(this.isFinancial)for(let t of this.closeValues)r.add(t);if(this.isFinancial)for(let t of this.lowValues)r.add(t);if(this.isFinancial)for(let t of this.highValues)r.add(t);let t=StiDrillDownHelper.isDrillAvailable(this)&&this.drillDownCurrentLevel<this.drillDownLevelCount?this.arguments.getRange(this.drillDownCurrentLevel,1):this.arguments;for(let e of t)if(this.isBubbleChart){let t=new __.H.StiXChartMeter;t.key=e.key,t.expression=e.expression,t.label=e.label,r.add(t)}else r.add(e);if(this.isBubbleChart)for(let t of this.weights)r.add(t);if(null!=this.series&&r.add(this.series),null!=this.sortBy&&r.add(this.sortBy),null!=this.indicatorValue&&r.add(this.indicatorValue),this.isHeatmapChart)for(let t of this.xValues)r.add(t);if(this.isHeatmapChart)for(let t of this.yValues)r.add(t)}return r}retrieveUsedDataNames(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(t.addRange(StiUsedDataHelper.getMany2(this.values)),t.addRange(StiUsedDataHelper.getMany2(this.arguments)),t.addRange(StiUsedDataHelper.getMany2(this.weights)),t.addRange(StiUsedDataHelper.getMany(this.series)),t.addRange(StiUsedDataHelper.getMany(this.sortBy)),t.addRange(StiUsedDataHelper.getMany(this.indicatorValue)),t.addRange(StiUsedDataHelper.getMany2(this.xValues)),t.addRange(StiUsedDataHelper.getMany2(this.yValues))),t.distinct()}get isDefined(){return null!=this.values&&0<this.values.length||null!=this.weights&&0<this.weights.length&&this.isBubbleChart||null!=this.arguments&&0<this.arguments.length||null!=this.series||this.dataMode==StiDataMode.ManuallyEnteringData}get allowSkipOwnFilter(){return!0}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}get customStyleName(){return this._customStyleName}set customStyleName(t){this._customStyleName!=t&&(this._customStyleName=t,StiString.isNullOrWhiteSpace(t)||(this.style=StiElementStyleIdent.Custom))}switchSelectedViewState(t){__.H.StiChartUserViewStatesHelper.switchSelectedViewState(this,t)}saveToJsonForViewState(){return __.H.StiChartUserViewStatesHelper.saveToJsonObject(this)}loadFromJsonForViewState(t){__.H.StiChartUserViewStatesHelper.loadFromJsonObject(this,t)}setString(i,r){switch(i){case"Title.Text":this.title.text=r;break;case"Legend.Title.Text":this.legend.title.text=r;break;case"XAxis.Labels.TextAfter":this.xAxis.labels.textAfter=r;break;case"XAxis.Labels.TextBefore":this.xAxis.labels.textBefore=r;break;case"XAxis.Title.Text":this.xAxis.title.text=r;break;case"XTopAxis.Labels.TextAfter":this.xTopAxis.labels.textAfter=r;break;case"XTopAxis.Labels.TextBefore":this.xTopAxis.labels.textBefore=r;break;case"XTopAxis.Title.Text":this.xTopAxis.title.text=r;break;case"YAxis.Labels.TextAfter":this.yAxis.labels.textAfter=r;break;case"YAxis.Labels.TextBefore":this.yAxis.labels.textBefore=r;break;case"YAxis.Title.Text":this.yAxis.title.text=r;break;case"YRightAxis.Labels.TextAfter":this.yRightAxis.labels.textAfter=r;break;case"YRightAxis.Labels.TextBefore":this.yRightAxis.labels.textBefore=r;break;case"YRightAxis.Title.Text":this.yRightAxis.title.text=r;break}let l=0;for(let e of this.values){let t=`Value${l++}.Label`;i==t&&(e.label=r)}l=0;for(let e of this.arguments){let t=`Argument${l++}.Label`;i==t&&(e.label=r)}}getString(i){switch(i){case"Title.Text":return this.title.text;case"Legend.Title.Text":return this.legend.title.text;case"XAxis.Labels.TextAfter":return this.xAxis.labels.textAfter;case"XAxis.Labels.TextBefore":return this.xAxis.labels.textBefore;case"XAxis.Title.Text":return this.xAxis.title.text;case"XTopAxis.Labels.TextAfter":return this.xTopAxis.labels.textAfter;case"XTopAxis.Labels.TextBefore":return this.xTopAxis.labels.textBefore;case"XTopAxis.Title.Text":return this.xTopAxis.title.text;case"YAxis.Labels.TextAfter":return this.yAxis.labels.textAfter;case"YAxis.Labels.TextBefore":return this.yAxis.labels.textBefore;case"YAxis.Title.Text":return this.yAxis.title.text;case"YRightAxis.Labels.TextAfter":return this.yRightAxis.labels.textAfter;case"YRightAxis.Labels.TextBefore":return this.yRightAxis.labels.textBefore;case"YRightAxis.Title.Text":return this.yRightAxis.title.text}let r=0;for(let e of this.values){let t=`Value${r++}.Label`;if(i==t)return e.label}r=0;for(let e of this.arguments){let t=`Argument${r++}.Label`;if(i==t)return e.label}throw new Error(`Property with name `+i)}getAllStrings(){let e=["Title.Text","Legend.Title.Text"],i=(this.isAxisAreaChart&&(e.push("XAxis.Labels.TextAfter"),e.push("XAxis.Labels.TextBefore"),e.push("XAxis.Title.Text"),e.push("XTopAxis.Labels.TextAfter"),e.push("XTopAxis.Labels.TextBefore"),e.push("XTopAxis.Title.Text"),e.push("YAxis.Labels.TextAfter"),e.push("YAxis.Labels.TextBefore"),e.push("YAxis.Title.Text"),e.push("YRightAxis.Labels.TextAfter"),e.push("YRightAxis.Labels.TextBefore"),e.push("YRightAxis.Title.Text")),0);return this.values.forEach(t=>e.push(`Value${i++}.Label`)),i=0,this.arguments.forEach(t=>e.push(`Argument${i++}.Label`)),e}getFonts(){let t=super.getFonts();return t.push(this.title.font),t.push(this.labels.font),t.push(this.legend.labels.font),t.push(this.legend.title.font),t.push(this.xAxis.labels.font),t.push(this.xAxis.title.font),t.push(this.xTopAxis.labels.font),t.push(this.xTopAxis.title.font),t.push(this.yAxis.labels.font),t.push(this.yAxis.title.font),t.push(this.yRightAxis.labels.font),t.push(this.yRightAxis.title.font),StiArray.distinct(t)}get toolboxPosition(){return StiComponentToolboxPosition.ChartElement}get localizedName(){return StiLocalization.get("Components","StiChart")}get colorEach(){return null!=this.area&&this.area.colorEach}set colorEach(t){null!=this.area&&(this.area.colorEach=t)}get xAxis(){var t;return null==(t=this.area)?void 0:t.xAxis}set xAxis(t){null!=this.area&&(this.area.xAxis=t)}get xTopAxis(){var t;return null==(t=this.area)?void 0:t.xTopAxis}set xTopAxis(t){null!=this.area&&(this.area.xTopAxis=t)}get yAxis(){var t;return null==(t=this.area)?void 0:t.yAxis}set yAxis(t){null!=this.area&&(this.area.yAxis=t)}get yRightAxis(){var t;return null==(t=this.area)?void 0:t.yRightAxis}set yRightAxis(t){null!=this.area&&(this.area.yRightAxis=t)}get labels(){return this._labels}set labels(t){null!=t&&(t.element=this),this._labels=t}static getValueFormatDefault(){let t=new StiNumberFormatService;return t.decimalDigits=0,t.state=e.DecimalDigits|e.Abbreviation,t}getManuallyEnteredDataTable(){if(this.dataMode!=StiDataMode.ManuallyEnteringData)return null;return __.e.StiManuallyEnteredDataParser.getChartDataTable(this.manuallyEnteredData,this)}get isAxisAreaChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.ClusteredBar||t.seriesType==StiChartSeriesType.ClusteredColumn||t.seriesType==StiChartSeriesType.Ribbon||t.seriesType==StiChartSeriesType.Pareto||t.seriesType==StiChartSeriesType.Histogram||t.seriesType==StiChartSeriesType.FullStackedArea||t.seriesType==StiChartSeriesType.FullStackedBar||t.seriesType==StiChartSeriesType.FullStackedColumn||t.seriesType==StiChartSeriesType.FullStackedLine||t.seriesType==StiChartSeriesType.FullStackedSpline||t.seriesType==StiChartSeriesType.FullStackedSplineArea||t.seriesType==StiChartSeriesType.StackedBar||t.seriesType==StiChartSeriesType.StackedColumn||t.seriesType==StiChartSeriesType.StackedLine||t.seriesType==StiChartSeriesType.StackedSpline||t.seriesType==StiChartSeriesType.StackedArea||t.seriesType==StiChartSeriesType.StackedSplineArea||t.seriesType==StiChartSeriesType.Scatter||t.seriesType==StiChartSeriesType.ScatterLine||t.seriesType==StiChartSeriesType.ScatterSpline||t.seriesType==StiChartSeriesType.Candlestick||t.seriesType==StiChartSeriesType.Stock||t.seriesType==StiChartSeriesType.Gantt||t.seriesType==StiChartSeriesType.Bubble||t.seriesType==StiChartSeriesType.Area||t.seriesType==StiChartSeriesType.Line||t.seriesType==StiChartSeriesType.Spline||t.seriesType==StiChartSeriesType.SplineArea||t.seriesType==StiChartSeriesType.SplineRange||t.seriesType==StiChartSeriesType.Range||t.seriesType==StiChartSeriesType.RangeBar||t.seriesType==StiChartSeriesType.SteppedArea||t.seriesType==StiChartSeriesType.SteppedLine||t.seriesType==StiChartSeriesType.SteppedRange||t.seriesType==StiChartSeriesType.BoxAndWhisker||t.seriesType==StiChartSeriesType.Heatmap))}get isStackedChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.StackedBar||t.seriesType==StiChartSeriesType.StackedColumn||t.seriesType==StiChartSeriesType.StackedLine||t.seriesType==StiChartSeriesType.StackedSpline||t.seriesType==StiChartSeriesType.StackedArea||t.seriesType==StiChartSeriesType.StackedSplineArea))}get isScatterChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.Scatter||t.seriesType==StiChartSeriesType.ScatterLine||t.seriesType==StiChartSeriesType.ScatterSpline||t.seriesType==StiChartSeriesType.Bubble))}get isLinesChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.FullStackedArea||t.seriesType==StiChartSeriesType.FullStackedLine||t.seriesType==StiChartSeriesType.FullStackedSpline||t.seriesType==StiChartSeriesType.FullStackedSplineArea||t.seriesType==StiChartSeriesType.StackedLine||t.seriesType==StiChartSeriesType.StackedSpline||t.seriesType==StiChartSeriesType.StackedArea||t.seriesType==StiChartSeriesType.StackedSplineArea||t.seriesType==StiChartSeriesType.Scatter||t.seriesType==StiChartSeriesType.ScatterLine||t.seriesType==StiChartSeriesType.ScatterSpline||t.seriesType==StiChartSeriesType.Area||t.seriesType==StiChartSeriesType.Line||t.seriesType==StiChartSeriesType.Spline||t.seriesType==StiChartSeriesType.SplineArea||t.seriesType==StiChartSeriesType.SplineRange||t.seriesType==StiChartSeriesType.Range||t.seriesType==StiChartSeriesType.SteppedArea||t.seriesType==StiChartSeriesType.SteppedLine||t.seriesType==StiChartSeriesType.SteppedRange))}get isBubbleChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Bubble)}get isBarChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.ClusteredBar||t.seriesType==StiChartSeriesType.FullStackedBar||t.seriesType==StiChartSeriesType.StackedBar||t.seriesType==StiChartSeriesType.Gantt))}get isRange(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.Range||t.seriesType==StiChartSeriesType.RangeBar||t.seriesType==StiChartSeriesType.SteppedRange||t.seriesType==StiChartSeriesType.SplineRange||t.seriesType==StiChartSeriesType.Gantt))}get isFinancial(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.Candlestick||t.seriesType==StiChartSeriesType.Stock))}get isPieChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Pie)}get isPie3dChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Pie3d)}get isDoughnutChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Doughnut)}get isFunnelChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.Funnel||t.seriesType==StiChartSeriesType.FunnelWeightedSlices))}get isPictorialStackedChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.PictorialStacked)}get isPictorialChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Pictorial)}get isHeatmapChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Heatmap)}get isTreemapChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Treemap)}get isParetoChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Pareto)}get isRibbonChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Ribbon)}get isSunburstChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Sunburst)}get isFullStackedChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.FullStackedArea||t.seriesType==StiChartSeriesType.FullStackedBar||t.seriesType==StiChartSeriesType.FullStackedColumn||t.seriesType==StiChartSeriesType.FullStackedLine||t.seriesType==StiChartSeriesType.FullStackedSpline||t.seriesType==StiChartSeriesType.FullStackedSplineArea))}get isWaterfallChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Waterfall)}get isRadarChart(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.RadarPoint||t.seriesType==StiChartSeriesType.RadarArea||t.seriesType==StiChartSeriesType.RadarLine))}get isAxisAreaChart3D(){return this.chartValuesList().any(t=>null!=t&&(t.seriesType==StiChartSeriesType.ClusteredColumn3D||t.seriesType==StiChartSeriesType.StackedColumn3D||t.seriesType==StiChartSeriesType.FullStackedColumn3D||t.seriesType==StiChartSeriesType.Line3D))}get isClusteredColumnChart3D(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.ClusteredColumn3D)}get isClusteredColumnChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.ClusteredColumn)}get isClusteredBarChart(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.ClusteredBar)}get isLineChart3D(){return this.chartValuesList().any(t=>null!=t&&t.seriesType==StiChartSeriesType.Line3D)}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}get drillDownLevelCount(){return null!=this.arguments?this.arguments.length:0}checkBrowsableProperties(){this.isRange?(this.setBrowsableProperty("Weights",!1),this.setBrowsableProperty("EndValues",!0),this.setBrowsableProperty("CloseValues",!1),this.setBrowsableProperty("LowValues",!1),this.setBrowsableProperty("HighValues",!1)):this.isFinancial?(this.setBrowsableProperty("Weights",!1),this.setBrowsableProperty("EndValues",!1),this.setBrowsableProperty("CloseValues",!0),this.setBrowsableProperty("LowValues",!0),this.setBrowsableProperty("HighValues",!0)):(this.isBubbleChart?this.setBrowsableProperty("Weights",!0):this.setBrowsableProperty("Weights",!1),this.setBrowsableProperty("EndValues",!1),this.setBrowsableProperty("CloseValues",!1),this.setBrowsableProperty("LowValues",!1),this.setBrowsableProperty("HighValues",!1))}setBrowsableProperty(t,e){}getChartSeries(){let t=StiChartSeriesType.ClusteredColumn;return this.chartValuesList().any()&&(t=this.chartValuesList().first().seriesType),StiChartSeriesCreator.neww2(t)}chartValuesList(){if(this.dataMode==StiDataMode.UsingDataFields)return null==this.values?new List:this.values.where(t=>null!=t).toList();{let t=new List;return null!=this.manuallyEnteredChartMeter&&t.add(this.manuallyEnteredChartMeter),t}}constructor(t=Rectangle.empty){super(t),this.title=new StiTitle,this.layout=new StiElementLayout,this.group="",this.crossFiltering=!0,this._style=StiElementStyleIdent.Auto,this._customStyleName="",this.userFilters=new List,this.userSorts=new List,this.userViewStates=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.topN=new StiDataTopN,this.dataTransformation={},this.dataFilters=new List,this.seriesColors=[],this.negativeSeriesColors=[],this.paretoSeriesColors=[],this.cornerRadius=new StiCornerRadius(0),this.showBlanks=!1,this.shadow=new StiSimpleShadow,this.helpUrl="user-manual/dashboards_chart.htm",this.manuallyEnteredChartMeter=new __.H.StiValueChartMeter,this.showViewTitle=!1,this.values=new List,this.endValues=new List,this.closeValues=new List,this.lowValues=new List,this.highValues=new List,this.arguments=new List,this.weights=new List,this.xValues=new List,this.yValues=new List,this.legend=new StiChartLegend,this.area=new __.H.StiChartArea,this._labels=new __.H.StiChartLabels,this.argumentFormat=new StiGeneralFormatService,this.valueFormat=StiChartElement.getValueFormatDefault(),this.trendLines=new List,this.constantLines=new List,this.chartConditions=new List,this.marker=new StiChartMarker,this.icon=null,this.roundValues=!0,this.columnShape=StiColumnShape3D.Box,this.dataMode=StiDataMode.UsingDataFields,this.drillDownFiltersList=new List,this.drillDownFilters=new List,this.drillDownCurrentLevel=0,this.title.text=this.localizedName,this.dashboardInteraction=new StiChartDashboardInteraction,this.labels=new __.H.StiChartLabels,this.previousAnimations=new List,this.options3D=new StiPie3dOptions}}__.H.StiChartElement=StiChartElement}let IStiChartElementCondition=Stimulsoft.Report.Dashboard.IStiChartElementCondition,StiFilterCondition=Stimulsoft.Report.Components.StiFilterCondition,StiFilterDataType=Stimulsoft.Report.Components.StiFilterDataType,StiChartConditionalField=Stimulsoft.Report.Chart.StiChartConditionalField;{class _z{implements(){let t=[ICloneable,IStiChartElementCondition,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiStringMeta("Ident").get(()=>this[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName()),new StiStringNullOrEmptyMeta("KeyValueMeter"),new StiEnumMeta("Condition","",StiFilterCondition,StiFilterCondition.EqualTo),new StiEnumMeta("DataType","",StiFilterDataType,StiFilterDataType.Numeric),new StiEnumMeta("Field","",StiChartConditionalField,StiChartConditionalField.Value),new StiStringNullOrEmptyMeta("Value"),new StiColorMeta("Color","",Color.white),new StiEnumMeta("MarkerType","",StiMarkerType,StiMarkerType.Circle),new StiNumberMeta("MarkerAngle","",0),new StiBoolMeta("IsExpression")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}static createFromJson(t){let e=new _z;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new _z;return e.loadFromXml(t),e}constructor(t,e,i,r,l,n,s,o,a){this.color=Color.white,this.markerAngle=0,this.markerType=StiMarkerType.Circle,this.condition=StiFilterCondition.EqualTo,this.dataType=StiFilterDataType.Numeric,this.value="",this.keyValueMeter="",this.field=StiChartConditionalField.Value,this.isExpression=!1,null!=t&&(this.keyValueMeter=t),null!=e&&(this.color=e),null!=i&&(this.dataType=i),null!=r&&(this.condition=r),null!=l&&(this.value=l),null!=n&&(this.markerType=n),null!=s&&(this.markerAngle=s),null!=o&&(this.field=o),null!=a&&(this.isExpression=a)}}__.H.StiChartElementCondition=_z}__.H.StiChartGridLines=class{constructor(){this.color=Color.transparent}implements(){let t=[ICloneable,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiColorMeta("Color"),new StiBoolMeta("Visible")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}},__.H.StiChartInterlacing=class{meta(){return[new StiColorMeta("Color"),new StiBoolMeta("Visible")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}constructor(t,e){this.color=Color.transparent,this.visible=!1,null!=t&&(this.color=t),null!=t&&(this.visible=e)}};let IStiChartLabels=Stimulsoft.Report.Dashboard.IStiChartLabels,StiChartLabelsPosition=Stimulsoft.Report.Dashboard.StiChartLabelsPosition,Encoding=(__.H.StiChartLabels=class{implements(){let t=[IStiChartLabels,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiFontMeta("Font","","Arial",8),new StiStringNullOrEmptyMeta("TextAfter"),new StiStringNullOrEmptyMeta("TextBefore"),new StiColorMeta("ForeColor","",Color.transparent),new StiEnumMeta("AxisPosition","",StiChartLabelsPosition,StiChartLabelsPosition.None),new StiEnumMeta("PiePosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("Pie3dPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("DoughnutPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("FunnelPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("PictorialStackedPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Right),new StiEnumMeta("TreemapPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("HeatmapPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("RadarPosition","",StiChartLabelsPosition,StiChartLabelsPosition.None),new StiEnumMeta("ClusteredColumn3dPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("Line3dPosition","",StiChartLabelsPosition,StiChartLabelsPosition.Center),new StiEnumMeta("Position","",StiChartLabelsPosition),new StiEnumMeta("Style","",__.H.StiChartLabelsStyle,__.H.StiChartLabelsStyle.CategoryValue),new StiBoolMeta("AutoRotate"),new StiBoolMeta("WordWrap"),new StiNumberMeta("Width")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.font=this.font.clone(),t}get position(){return this.element.isStackedChart||this.axisPosition!=StiChartLabelsPosition.Total||(this.axisPosition=StiChartLabelsPosition.None),this.element.isPieChart?this.piePosition:this.element.isPie3dChart?this.pie3dPosition:this.element.isDoughnutChart||this.element.isSunburstChart?this.doughnutPosition:this.element.isFunnelChart?this.funnelPosition:this.element.isPictorialStackedChart?this.pictorialStackedPosition:this.element.isHeatmapChart?this.heatmapPosition:this.element.isTreemapChart?this.treemapPosition:this.element.isRadarChart?this.radarPosition:this.element.isAxisAreaChart3D?this.clusteredColumn3dPosition:this.element.isLineChart3D?this.line3dPosition:this.axisPosition}set position(t){this.element.isPieChart?this.piePosition=t:this.element.isPie3dChart?this.pie3dPosition=t:this.element.isDoughnutChart||this.element.isSunburstChart?this.doughnutPosition=t:this.element.isFunnelChart?this.funnelPosition=t:this.element.isPictorialStackedChart?this.pictorialStackedPosition=t:this.element.isHeatmapChart?this.heatmapPosition=t:this.element.isTreemapChart?this.treemapPosition=t:this.element.isRadarChart?this.radarPosition=t:this.element.isAxisAreaChart3D?this.clusteredColumn3dPosition=t:this.element.isLineChart3D?this.line3dPosition=t:this.axisPosition=t}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g){this.axisPosition=StiChartLabelsPosition.None,this.piePosition=StiChartLabelsPosition.Center,this.pie3dPosition=StiChartLabelsPosition.Center,this.clusteredColumn3dPosition=StiChartLabelsPosition.Center,this.line3dPosition=StiChartLabelsPosition.Center,this.doughnutPosition=StiChartLabelsPosition.Center,this.funnelPosition=StiChartLabelsPosition.Center,this.pictorialStackedPosition=StiChartLabelsPosition.Right,this.heatmapPosition=StiChartLabelsPosition.Center,this.treemapPosition=StiChartLabelsPosition.Center,this.radarPosition=StiChartLabelsPosition.None,this.foreColor=Color.transparent,this.font=new Font("Arial",8),this.autoRotate=!1,this.style=__.H.StiChartLabelsStyle.CategoryValue,this.textAfter="",this.textBefore="",this.wordWrap=!1,this.width=0,null!=t&&(this.axisPosition=t),null!=e&&(this.piePosition=e),null!=i&&(this.doughnutPosition=i),null!=r&&(this.funnelPosition=r),null!=l&&(this.treemapPosition=l),null!=n&&(this.heatmapPosition=n),null!=s&&(this.radarPosition=s),null!=o&&(this.clusteredColumn3dPosition=o),null!=a&&(this.style=a),null!=u&&(this.font=u),null!=S&&(this.foreColor=S),null!=m&&(this.textBefore=m),null!=h&&(this.textAfter=h),null!=c&&(this.autoRotate=c),null!=d&&(this.width=d),null!=g&&(this.wordWrap=g)}},Stimulsoft.System.Text.Encoding),StiPacker=Stimulsoft.Base.StiPacker,StiMeterConverter=(__.H.StiChartUserViewStatesHelper=class{static saveToJsonObject(t){let e=new StiJson,i=StiJsonSaveMode.Report;return e.addPropertyJObject("UserFilters",StiJsonReportObjectHelper.Serialize.objectArray(t.userFilters,i)),e.addPropertyJObject("UserSorts",StiJsonReportObjectHelper.Serialize.objectArray(t.userSorts,i)),e.addPropertyJObject("Values",StiJsonReportObjectHelper.Serialize.objectArray(t.values,i)),e.addPropertyJObject("EndValues",StiJsonReportObjectHelper.Serialize.objectArray(t.endValues,i)),e.addPropertyJObject("CloseValues",StiJsonReportObjectHelper.Serialize.objectArray(t.closeValues,i)),e.addPropertyJObject("LowValues",StiJsonReportObjectHelper.Serialize.objectArray(t.lowValues,i)),e.addPropertyJObject("HighValues",StiJsonReportObjectHelper.Serialize.objectArray(t.highValues,i)),e.addPropertyJObject("Arguments",StiJsonReportObjectHelper.Serialize.objectArray(t.arguments,i)),e.addPropertyJObject("XValues",StiJsonReportObjectHelper.Serialize.objectArray(t.xValues,i)),e.addPropertyJObject("YValues",StiJsonReportObjectHelper.Serialize.objectArray(t.yValues,i)),e.addPropertyJObject("Weights",StiJsonReportObjectHelper.Serialize.objectArray(t.weights,i)),null!=t.series&&e.addPropertyJObject("Series",t.series.saveToJsonObject(i)),null!=t.sortBy&&e.addPropertyJObject("SortBy",t.sortBy.saveToJsonObject(i)),null!=t.indicatorValue&&e.addPropertyJObject("IndicatorValue",t.indicatorValue.saveToJsonObject(i)),null!=t.icon&&e.addPropertyEnum("Icon",StiFontIcons,t.icon),e.addPropertyBool("RoundValues",t.roundValues,!0),e.addPropertyEnum("ColumnShape",StiColumnShape3D,t.columnShape,StiColumnShape3D.Box),e}static loadFromJsonObject(i,t){for(let e of t.properties())switch(e.name){case"UserFilters":i.userFilters.clear(),i.userFilters.addRange(e.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)));break;case"UserSorts":i.userSorts.clear(),i.userSorts.addRange(e.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)));break;case"Values":i.values.clear(),i.values.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"EndValues":i.endValues.clear(),i.endValues.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"CloseValues":i.closeValues.clear(),i.closeValues.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"LowValues":i.lowValues.clear(),i.lowValues.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"HighValues":i.highValues.clear(),i.highValues.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"Arguments":i.arguments.clear(),i.arguments.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"Weights":i.weights.clear(),i.weights.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"XValues":i.xValues.clear(),i.xValues.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"YValues":i.yValues.clear(),i.yValues.addRange(e.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)));break;case"Series":{let t=StiMeterLoader.loadFromJson(e.value).as(__.H.StiSeriesChartMeter);null!=t&&(i.series=t);break}case"SortBy":{let t=StiMeterLoader.loadFromJson(e.value).as(__.H.StiSortByChartMeter);null!=t&&(i.sortBy=t);break}case"IndicatorValue":{let t=StiMeterLoader.loadFromJson(e.value).as(StiIndicatorValueChartMeter);null!=t&&(i.indicatorValue=t);break}case"Icon":i.icon=Enum.parse(StiFontIcons,e.value.toString());break;case"RoundValues":i.roundValues=e.value[Stimulsoft.System.StiObject.stimulsoft]().toBoolean();break;case"ColumnShape":i.columnShape=Enum.parse(StiColumnShape3D,e.value.toString());break}}static clearVisualState(t){t.values.clear(),t.endValues.clear(),t.closeValues.clear(),t.lowValues.clear(),t.highValues.clear(),t.arguments.clear(),t.xValues.clear(),t.yValues.clear(),t.weights.clear(),t.series=null,t.sortBy=null,t.icon=null}static switchSelectedViewState(t,e){let i,r=t.selectedViewStateKey;StiString.isNullOrWhiteSpace(r)&&(r=null==(i=t.userViewStates.firstOrDefault())?void 0:i.key),this.saveVisualState(t,r),this.loadVisualState(t,e),t.selectedViewStateKey=e}static saveVisualState(t,e){if(StiString.isNullOrWhiteSpace(e))return;let i=t.userViewStates.firstOrDefault(t=>t.key==e);if(null==i)return;let r=this.saveToJsonObject(t);i.state=StiPacker.packToString(Encoding.UTF8.getBytes(r.serialize()))}static loadVisualState(t,e){if(this.clearVisualState(t),StiString.isNullOrWhiteSpace(e))return;let i=t.userViewStates.firstOrDefault(t=>t.key==e);if(StiString.isNullOrWhiteSpace(null==i?void 0:i.state))return;let r=Encoding.UTF8.getString(StiPacker.unpackFromString(i.state)),l=new StiJson;l.deserialize(r),this.loadFromJsonObject(t,l)}},__.H.StiChartYRightAxisLabels=class extends __.H.StiChartAxisLabels{meta(){return[...super.meta(),new StiRemoveMeta("TextAlignment"),new StiEnumMeta("TextAlignment","",StiHorAlignment,StiHorAlignment.Left)]}constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.textAlignment=StiHorAlignment.Left}},__.H.StiHorChartGridLines=class extends __.H.StiChartGridLines{meta(){return[...super.meta(),new StiColorMeta("Color"),new StiBoolMeta("Visible","",!0)]}constructor(t,e){super(),this.visible=!0,null!=t&&(this.color=t),null!=e&&(this.visible=e)}},__.H.StiHorChartInterlacing=class extends __.H.StiChartInterlacing{constructor(t,e){super(t,e)}},__.H.StiStartValueChartMeter=class extends __.H.StiValueChartMeter{get localizedName(){return Loc.get("PropertyMain","StartValue")}constructor(t,e,i,r){super(t,e,i,r),this.seriesType=StiChartSeriesType.Gantt,this.ident=__.e.StiMeterIdent.StartValueChartMeter,null!=r&&(this.seriesType=r)}},__.H.StiVertChartGridLines=class extends __.H.StiChartGridLines{meta(){return[...super.meta(),new StiColorMeta("Color"),new StiBoolMeta("Visible")]}constructor(t,e){super(),this.visible=!1,null!=t&&(this.color=t),null!=e&&(this.visible=e)}},__.H.StiVertChartInterlacing=class extends __.H.StiChartInterlacing{constructor(t,e){super(t,e)}},__.H.StiXChartAxisTitle=class extends __.H.StiChartAxisTitle{meta(){return[...super.meta(),new StiEnumMeta("Direction","",StiDirection,StiDirection.LeftToRight)]}constructor(t,e,i,r,l,n,s){super(t,e,i,r,n,s),this.direction=StiDirection.LeftToRight,null!=l&&(this.direction=l)}},__.H.StiXTopChartAxis=class extends __.H.StiXChartAxis{meta(){return[...super.meta(),new StiRemoveMeta(["Range","Visible"]),new StiBoolMeta("Visible")]}constructor(t,e,i){super(t,e,i),this.visible=!1}},__.H.StiYRightChartAxis=class extends __.H.StiYChartAxis{meta(){return[...super.meta(),new StiRemoveMeta(["Range","Visible"]),new StiBoolMeta("Visible")]}constructor(t,e,i){super(t,e,i),this.visible=!1,this.labels=new __.H.StiChartYRightAxisLabels}},__.W.StiMeterConverter=class{},__.W.StiMeterConverter),StiFilterDashboardInteraction=(__.ae.StiValueChartMeterConverter=class extends StiMeterConverter{},__.ae.StiXChartAxisConverter=class{},__.ae.StiYChartAxisConverter=class{},__.g.StiFilterDashboardInteraction=class extends __.g.StiDashboardInteraction{constructor(t,e,i,r){super(),this.ident=StiInteractionIdent.Filter,this.availableOnHover=StiAvailableInteractionOnHover.ShowToolTip,this.availableOnClick=StiAvailableInteractionOnClick.ApplyFilter,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.None,null!=t&&(this.onHover=t),null!=e&&(this.onClick=e),null!=i&&(this.toolTip=i),null!=r&&(this.drillDownParameters=r)}},__.g.StiFilterDashboardInteraction),ImplementsIStiComboBoxElement=Stimulsoft.Report.Dashboard.ImplementsIStiComboBoxElement,Size=Stimulsoft.System.Drawing.Size,StiItemSelectionMode=Stimulsoft.Report.Dashboard.StiItemSelectionMode,IStiComboBoxElement=Stimulsoft.Report.Dashboard.IStiComboBoxElement,StiDataFilterCreator=(StiExportToolAttribute.add("StiComboBoxElement","Stimulsoft.Dashboard.Export.Tools.StiComboBoxElementExportTool"),__.S.StiComboBoxElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiComboBoxElement,IStiSimpleShadow,IStiCornerRadius,IStiFixedHeightElement,IStiElementInteraction,...ImplementsIStiComboBoxElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiFixedHeightElement,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[new StiBoolMeta("FixedHeight","",!0),...super.meta(),new StiStringNullOrEmptyMeta("ParentKey"),new StiStringNullOrEmptyMeta("InitialValue"),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiBoolMeta("ShowAllValue"),new StiBoolMeta("ShowBlanks"),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly),new StiEnumMeta("SelectionMode","",StiItemSelectionMode,StiItemSelectionMode.One).set(t=>{let e=Enum.parse(StiItemSelectionMode,t.value);null!=e&&(this.selectionMode=e)}).setXml(t=>{let e=Enum.parse(StiItemSelectionMode,t.textContent);null!=e&&(this.selectionMode=e)}),new StiObjectMeta("NameMeter").check(()=>null!=this.nameMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.S.StiNameComboBoxMeter);null!=e&&(this.nameMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.S.StiNameComboBoxMeter);null!=e&&(this.nameMeter=e)}),new StiObjectMeta("KeyMeter").check(()=>null!=this.keyMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.S.StiKeyComboBoxMeter);null!=e&&(this.keyMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.S.StiKeyComboBoxMeter);null!=e&&(this.keyMeter=e)}),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiRemoveMeta("MinSize"),new StiRemoveMeta("MaxSize"),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiFilterDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiFilterDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}clone(t){let e,i,r,l=super.clone(t);return l.nameMeter=null!=this.nameMeter?this.nameMeter.clone():null,l.keyMeter=null!=this.keyMeter?this.keyMeter.clone():null,l.userFilters=this.userFilters.select(t=>t.clone()).toList(),l.transformActions=this.transformActions.select(t=>t.clone()).toList(),l.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),l.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),l.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),l.textFormat=this.textFormat.clone(),l.shadow=null==(e=this.shadow)?void 0:e.clone(),l.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),l.dashboardInteraction=null==(r=this.dashboardInteraction)?void 0:r.clone(),l}get isFixedHeight(){return this.fixedHeight}getParentKey(){return this.parentKey}setParentKey(t){this.parentKey=t}async applyDefaultFilters(){let t=await __.S.StiComboBoxHelper.fetchDefaultUserFilters(this);null!=t&&(this.userFilters=t)}getIdentityFilters(){let t=new StiDataFilterRule;return t.condition=StiDataFilterCondition.Any,t.elementKey=this.key,t.path=__.S.StiComboBoxHelper.getKeyMeterExpression(this),t.toList()}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}fetchAllMeters(){let t=new List;return null!=this.nameMeter&&t.add(this.nameMeter),null!=this.keyMeter&&t.add(this.keyMeter),t}getMeters(){let t=new List;return null!=this.nameMeter&&t.add(this.nameMeter),null!=this.keyMeter&&t.add(this.keyMeter),t}retrieveUsedDataNames(){return StiUsedDataHelper.getMany(this.nameMeter,this.keyMeter)}get isDefined(){return null!=this.nameMeter||null!=this.keyMeter}addKeyMeter2(t){this.keyMeter=null!=t?StiMeterHelper.ComboBox.getKey2(t):null}addKeyMeter(t){this.keyMeter=null!=t?StiMeterHelper.ComboBox.getKey(t.as(__.e.StiMeter)):null}getKeyMeter(){return this.keyMeter}removeKeyMeter(){this.keyMeter=null}createNewKeyMeter(){this.keyMeter=new __.S.StiKeyComboBoxMeter}addNameMeter2(t){this.nameMeter=null!=t?StiMeterHelper.ComboBox.getName2(t):null}addNameMeter(t){this.nameMeter=null!=t?StiMeterHelper.ComboBox.getName(t.as(__.e.StiMeter)):null}getNameMeter(){return this.nameMeter}removeNameMeter(){this.nameMeter=null}createNewNameMeter(){this.nameMeter=new __.S.StiNameComboBoxMeter}createNextMeter(t){null!=this.keyMeter&&null==this.nameMeter?this.nameMeter=StiMeterHelper.ComboBox.getName2(t):this.keyMeter=StiMeterHelper.ComboBox.getKey2(t)}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter)),r=(null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.keyMeter=null==this.keyMeter?new __.S.StiKeyComboBoxMeter:this.keyMeter,this.keyMeter.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiValueMeter)));null!=(r=null==r?e.firstOrDefault(t=>t.is(IStiDimensionMeter)):r)&&(this.nameMeter=null==this.nameMeter?new __.S.StiNameComboBoxMeter:this.nameMeter,this.nameMeter.loadFromJsonObject(r.saveToJsonObject(StiJsonSaveMode.Report)))}get toolboxPosition(){return StiComponentToolboxPosition.ComboBoxElement}get localizedName(){return StiLocalization.get("Components","StiComboBox")}getMinSize(){let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMinSize(t){}getMaxSize(){if(!this.fixedHeight)return super.getMaxSize();let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMaxSize(t){this.fixedHeight||super.setMaxSize(t)}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){var e;this._fixedHeight!=t&&(this._fixedHeight=t)&&(this.height=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,null==(e=this.page)?void 0:e.gridSize,!0))}constructor(t=Rectangle.empty){super(t),this.group="",this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.userFilters=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.font=new Font("Arial",8),this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.foreColor=Color.transparent,this.showAllValue=!1,this.showBlanks=!1,this.selectionMode=StiItemSelectionMode.One,this.textFormat=new StiGeneralFormatService,this.defaultClientRectangle=new Rectangle(0,0,200,40),this.helpUrl="user-manual/dashboards_data_filtering_combo_box.htm",this._fixedHeight=!0,this.dashboardInteraction=new StiFilterDashboardInteraction}},Stimulsoft.Report.Dashboard.StiDataFilterCreator),DBNull=Stimulsoft.System.Data.DBNull,StiElementDataCache=Stimulsoft.Report.Dashboard.StiElementDataCache,ImplementsIStiGroupElement=(__.S.StiComboBoxHelper=class{static fetchItems(r,t,l){if(null==t||t==StiDataTable.nullTable||0==t.rows.length)return null;let n=this.getNameMeterIndex(t),s=this.getKeyMeterIndex(t);if(-1==n&&1==s)return null;-1==s&&(s=n),-1==n&&(n=s);let o=new List;for(let i of t.rows){let t=i[s];if(null==t)continue;let e=i[n];!l&&this.isBlank(e)||o.add(new __.S.StiComboBoxItem(this.format(r,e),t))}return o}static isBlank(t){return null==t||t==DBNull.value||"string"==typeof t&&StiString.isNullOrEmpty(t)}static async fetchDefaultUserFilters(e){let t=!StiString.isNullOrEmpty(e.initialValue);if(e.showAllValue&&!t)return null;if(e.selectionMode==StiItemSelectionMode.Multi&&!t)return null;let i=this.getKeyMeterExpression(e);if(null==i)return null;let r=await StiElementDataCache.getOrCreate(e),l=this.fetchItems(e,r,e.showBlanks);if(null==l||0==l.length)return null;return this.fetchInitialValues(e,l).select(t=>StiDataFilterCreator.createEqualBasedOnValue(t.value,i,e)).toList()}static fetchInitialValues(t,r){if(!StiString.isNullOrEmpty(t.initialValue)){let i=this.getInitialValues(t),e=r[Stimulsoft.System.StiObject.stimulsoft]().toList().where(t=>{var e;return i.contains(null==(e=t.value)?void 0:e.toString())});if(t.selectionMode==StiItemSelectionMode.One&&e.any()){let t=new List;return t.add(e.firstOrDefault()),t}return e.toList()}let e=new List;return e.add(r[Stimulsoft.System.StiObject.stimulsoft]().toList().firstOrDefault()),e}static getInitialValues(t){if(StiString.isNullOrEmpty(t.initialValue))return new List;let e=StiReportParser.parse2(t.initialValue,t.report);return e.split(";")[Stimulsoft.System.StiObject.stimulsoft]().toList().select(t=>t.trim()).toList()}static getNameMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(__.S.StiNameComboBoxMeter));return null!=e?t.meters.indexOf(e):-1}static getKeyMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(__.S.StiKeyComboBoxMeter));return null!=e?t.meters.indexOf(e):-1}static getKeyMeterExpression(t){if(null!=t.keyMeter)return t.keyMeter.expression;if(null!=t.nameMeter)return t.nameMeter.expression;return null}static format(t,e){let i,r=t.as(IStiTextFormat);if(e instanceof DateTime&&!r.textFormat.is(StiDateFormatService))return e.toShortDateString();let l=null==(i=null==t?void 0:t.report)?void 0:i.culture;if(StiExtValueConverter.isEligable(e,l))return StiExtValueConverter.convert(e,l);return r.textFormat.format(e)}},__.S.StiComboBoxItem=class{toString(){return null!=this.label?this.label:this.value.toString()}constructor(t,e=t){this.label=t,this.value=e}},Stimulsoft.Report.Dashboard.ImplementsIStiGroupElement),ImplementsIStiDatePickerElement=Stimulsoft.Report.Dashboard.ImplementsIStiDatePickerElement,StiInitialDateRangeSelection=Stimulsoft.Report.Dashboard.StiInitialDateRangeSelection,StiInitialDateRangeSelectionSource=Stimulsoft.Report.Dashboard.StiInitialDateRangeSelectionSource,StiDateSelectionMode=Stimulsoft.Report.Dashboard.StiDateSelectionMode,StiDateCondition=Stimulsoft.Report.Dashboard.StiDateCondition,IStiDatePickerElement=Stimulsoft.Report.Dashboard.IStiDatePickerElement,DateTimeRange=Stimulsoft.Report.DateTimeRange,Range=Stimulsoft.Report.Range,StiVariableHelper=Stimulsoft.Report.Engine.StiVariableHelper,StiParser=(StiExportToolAttribute.add("StiDatePickerElement","Stimulsoft.Dashboard.Export.Tools.StiDatePickerElementExportTool"),__.Q.StiDatePickerElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiDatePickerElement,IStiSimpleShadow,IStiCornerRadius,IStiFixedHeightElement,IStiGroupElement,...ImplementsIStiDatePickerElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiFixedHeightElement,...ImplementsIStiGroupElement,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[new StiBoolMeta("FixedHeight","",!0),...super.meta(),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiEnumMeta("Condition","",StiDateCondition,StiDateCondition.GreaterThanOrEqualTo),new StiEnumMeta("SelectionMode","",StiDateSelectionMode,StiDateSelectionMode.Single).set(t=>{let e=Enum.parse(StiDateSelectionMode,t.value);null!=e&&(this.selectionMode=e)}).setXml(t=>{let e=Enum.parse(StiDateSelectionMode,t.textContent);null!=e&&(this.selectionMode=e)}),new StiEnumMeta("InitialRangeSelection","",StiInitialDateRangeSelection,StiInitialDateRangeSelection.MonthPrevious),new StiEnumMeta("InitialRangeSelectionSource","",StiInitialDateRangeSelectionSource,StiInitialDateRangeSelectionSource.Variable),new StiObjectMeta("ValueMeter").check(()=>null!=this.valueMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiValueDatePickerMeter);null!=e&&(this.valueMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiValueDatePickerMeter);null!=e&&(this.valueMeter=e)}),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiRemoveMeta("MinSize"),new StiRemoveMeta("MaxSize"),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly)]}clone(t){let e,i,r=super.clone(t);return r.valueMeter=null!=this.valueMeter?this.valueMeter.clone():null,r.userFilters=this.userFilters.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.textFormat=this.textFormat.clone(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}get isFixedHeight(){return this.fixedHeight}getParentKey(){return null}setParentKey(t){}async applyDefaultFilters(){let t,r=null==(t=__.Q.StiDatePickerHelper.getVariableSpecifiedAsValue(this.as(IStiDatePickerElement)))?void 0:t.as(StiVariable);if(null==r){let t=await __.Q.StiDatePickerHelper.fetchDefaultUserFilters(this);null!=t&&(this.userFilters=t)}else if(Range.isRangeType(r.type)&&this.initialRangeSelectionSource==StiInitialDateRangeSelectionSource.Selection){let t={ref:null},e={ref:null},i=(__.Q.StiDatePickerHelper.calculateRangeFromInitial(this.initialRangeSelection,t,e),new DateTimeRange(t.ref,e.ref));StiVariableHelper.setVariableValue(this.report,r,i),r.valueObject=i}}getIdentityFilters(){let t=new StiDataFilterRule;return t.condition=StiDataFilterCondition.Any,t.elementKey=this.key,t.path=__.Q.StiDatePickerHelper.getValueMeterExpression(this),t.toList()}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}fetchAllMeters(){let t=new List;return null!=this.valueMeter&&t.add(this.valueMeter),t}getMeters(){let t=new List;return(__.Q.StiDatePickerHelper.isVariableSpecifiedAsValue(this)||null!=this.valueMeter&&this.selectionMode==StiDateSelectionMode.AutoRange)&&t.add(this.valueMeter),t}retrieveUsedDataNames(){return null!=this.valueMeter&&this.selectionMode==StiDateSelectionMode.AutoRange?StiUsedDataHelper.getMany(this.valueMeter):super.retrieveUsedDataNames()}get isDefined(){return null!=this.valueMeter}addValueMeter2(t){this.valueMeter=null!=t?StiMeterHelper.DatePicker.getValue2(t):null}addValueMeter(t){this.valueMeter=null!=t?StiMeterHelper.DatePicker.getValue(t.as(__.e.StiMeter)):null}getValueMeter(){return this.valueMeter}removeValueMeter(){this.valueMeter=null}createNewValueMeter(){this.valueMeter=new StiValueDatePickerMeter}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter));null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.valueMeter=null==this.valueMeter?new StiValueDatePickerMeter:this.valueMeter,this.valueMeter.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report)))}get toolboxPosition(){return StiComponentToolboxPosition.DatePickerElement}get localizedName(){return StiLocalization.get("Components","StiDatePicker")}getMinSize(){let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMinSize(t){}getMaxSize(){if(!this.fixedHeight)return super.getMaxSize();let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMaxSize(t){this.fixedHeight||super.setMaxSize(t)}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){var e;this._fixedHeight!=t&&(this._fixedHeight=t)&&(this.height=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,null==(e=this.page)?void 0:e.gridSize,!0))}constructor(t=Rectangle.empty){super(t),this.group="",this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.userFilters=new List,this.dataFilters=new List,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.font=new Font("Arial",8),this.foreColor=Color.transparent,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.textFormat=new StiDateFormatService,this.defaultClientRectangle=new Rectangle(0,0,200,40),this.helpUrl="user-manual/dashboards_data_filtering_date_picker.htm",this._fixedHeight=!0,this.condition=StiDateCondition.GreaterThanOrEqualTo,this.selectionMode=StiDateSelectionMode.Single,this.initialRangeSelection=StiInitialDateRangeSelection.MonthPrevious,this.initialRangeSelectionSource=StiInitialDateRangeSelectionSource.Variable}},Stimulsoft.Report.Engine.StiParser.StiParser),StiVariableInitBy=Stimulsoft.Report.Dictionary.StiVariableInitBy,StiVariableExpressionHelper=Stimulsoft.Report.StiVariableExpressionHelper,StimulsoftDateTimeRange=Stimulsoft.System.StimulsoftDateTimeRange,NullableDateTime=Stimulsoft.System.NullableDateTime,StiAbbreviationNumberFormatHelper=(__.Q.StiDatePickerHelper=class{static calculateRangeFromInitial(t,e,i){switch(t){case StiInitialDateRangeSelection.DayTomorrow:e.ref=DateTime.today.addDays(1),i.ref=DateTime.today.addDays(1);break;case StiInitialDateRangeSelection.DayToday:e.ref=DateTime.today,i.ref=DateTime.today;break;case StiInitialDateRangeSelection.DayYesterday:e.ref=DateTime.today.addDays(-1),i.ref=DateTime.today.addDays(-1);break;case StiInitialDateRangeSelection.Last7Days:e.ref=DateTime.today.addDays(-7),i.ref=DateTime.today;break;case StiInitialDateRangeSelection.Last14Days:e.ref=DateTime.today.addDays(-14),i.ref=DateTime.today;break;case StiInitialDateRangeSelection.Last30Days:e.ref=DateTime.today.addDays(-30),i.ref=DateTime.today;break;case StiInitialDateRangeSelection.WeekNext:e.ref=DateTime.today.addDays(7).firstDayOfWeek(),i.ref=DateTime.today.addDays(7).lastDayOfWeek();break;case StiInitialDateRangeSelection.WeekCurrent:e.ref=DateTime.today.firstDayOfWeek(),i.ref=DateTime.today.lastDayOfWeek();break;case StiInitialDateRangeSelection.WeekPrevious:e.ref=DateTime.today.addDays(-7).firstDayOfWeek(),i.ref=DateTime.today.addDays(-7).lastDayOfWeek();break;case StiInitialDateRangeSelection.MonthNext:e.ref=DateTime.today.addMonths(1).firstDayOfMonth(),i.ref=DateTime.today.addMonths(1).lastDayOfMonth();break;case StiInitialDateRangeSelection.MonthCurrent:e.ref=DateTime.today.firstDayOfMonth(),i.ref=DateTime.today.lastDayOfMonth();break;case StiInitialDateRangeSelection.MonthPrevious:e.ref=DateTime.today.addMonths(-1).firstDayOfMonth(),i.ref=DateTime.today.addMonths(-1).lastDayOfMonth();break;case StiInitialDateRangeSelection.QuarterNext:e.ref=DateTime.today.addMonths(3).firstDayOfQuarter(),i.ref=DateTime.today.addMonths(3).lastDayOfQuarter();break;case StiInitialDateRangeSelection.QuarterCurrent:e.ref=DateTime.today.firstDayOfQuarter(),i.ref=DateTime.today.lastDayOfQuarter();break;case StiInitialDateRangeSelection.QuarterPrevious:e.ref=DateTime.today.addMonths(-3).firstDayOfQuarter(),i.ref=DateTime.today.addMonths(-3).lastDayOfQuarter();break;case StiInitialDateRangeSelection.QuarterFirst:e.ref=DateTime.today.firstDayOfFirthQuarter(),i.ref=DateTime.today.lastDayOfFirthQuarter();break;case StiInitialDateRangeSelection.QuarterSecond:e.ref=DateTime.today.firstDayOfSecondQuarter(),i.ref=DateTime.today.lastDayOfSecondQuarter();break;case StiInitialDateRangeSelection.QuarterThird:e.ref=DateTime.today.firstDayOfThirdQuarter(),i.ref=DateTime.today.lastDayOfThirdQuarter();break;case StiInitialDateRangeSelection.QuarterFourth:e.ref=DateTime.today.firstDayOfFourthQuarter(),i.ref=DateTime.today.lastDayOfFourthQuarter();break;case StiInitialDateRangeSelection.YearNext:e.ref=DateTime.today.addYears(1).firstDayOfYear(),i.ref=DateTime.today.addYears(1).lastDayOfYear();break;case StiInitialDateRangeSelection.YearCurrent:e.ref=DateTime.today.firstDayOfYear(),i.ref=DateTime.today.lastDayOfYear();break;case StiInitialDateRangeSelection.YearPrevious:e.ref=DateTime.today.addYears(-1).firstDayOfYear(),i.ref=DateTime.today.addYears(-1).lastDayOfYear();break;case StiInitialDateRangeSelection.DateToWeek:e.ref=DateTime.today.firstDayOfWeek(),i.ref=DateTime.today;break;case StiInitialDateRangeSelection.DateToMonth:e.ref=DateTime.today.firstDayOfMonth(),i.ref=DateTime.today;break;case StiInitialDateRangeSelection.DateToQuarter:e.ref=DateTime.today.firstDayOfQuarter(),i.ref=DateTime.today;break;case StiInitialDateRangeSelection.DateToYear:e.ref=DateTime.today.firstDayOfYear(),i.ref=DateTime.today;break;default:e.ref=DateTime.now,i.ref=DateTime.now;break}}static async fetchDefaultUserFilters(t){let e=this.getValueMeterExpression(t);if(t.selectionMode==StiDateSelectionMode.Single)return this.getSingleDefaultUserFilters(t,e);if(t.selectionMode==StiDateSelectionMode.Range)return this.getRangeDefaultUserFilters(t.initialRangeSelection,e);if(t.selectionMode==StiDateSelectionMode.AutoRange)return this.getAutoRangeDefaultUserFilters(t,e);return null}static getSingleDefaultUserFilters(t,e){let i=this.getFormatedDate(DateTime.now);return new StiDataFilterRule(null,e,this.getCondition(t),i).toList()}static getRangeDefaultUserFilters(t,e){let i={ref:null},r={ref:null},l=(this.calculateRangeFromInitial(t,i,r),this.getFormatedDate(i.ref)),n=this.getFormatedDate(r.ref);return new StiDataFilterRule("",e,StiDataFilterCondition.Between,l,n,!0,!1).toList()}static async getAutoRangeDefaultUserFilters(t,e){let i=await StiElementDataCache.getOrCreate(t);if(null==i)return null;let r=i.rows.select(t=>t[0]).where(t=>t instanceof DateTime);if(null==r||!r.any())return null;let l=r.where(t=>t instanceof DateTime).cast().min(),n=r.where(t=>t instanceof DateTime).cast().max(),s=this.getFormatedDate(l),o=this.getFormatedDate(n);return new StiDataFilterRule("",e,StiDataFilterCondition.Between,s,o,!0,!1).toList()}static getValueMeterExpression(t){return null!=t.valueMeter?t.valueMeter.expression:null}static getCondition(t){switch(t.condition){case StiDateCondition.EqualTo:return StiDataFilterCondition.EqualTo;case StiDateCondition.NotEqualTo:return StiDataFilterCondition.NotEqualTo;case StiDateCondition.GreaterThan:return StiDataFilterCondition.GreaterThan;case StiDateCondition.GreaterThanOrEqualTo:return StiDataFilterCondition.GreaterThanOrEqualTo;case StiDateCondition.LessThan:return StiDataFilterCondition.LessThan;case StiDateCondition.LessThanOrEqualTo:return StiDataFilterCondition.LessThanOrEqualTo;default:return StiDataFilterCondition.EqualTo}}static getFormatedDate(t){return t.toString("MM/dd/yyyy")}static getVariableSpecifiedAsValue(t){var e;return StiVariableExpressionHelper.getVariableSpecifiedAsExpression(t,null==(e=t.getValueMeter())?void 0:e.expression)}static isVariableSpecifiedAsValue(t){var e;return StiVariableExpressionHelper.isVariableSpecifiedAsExpression(t,null==(e=t.getValueMeter())?void 0:e.expression)}static getDefaultValue(e){let t,i=null==(t=this.getVariableSpecifiedAsValue(e))?void 0:t.as(StiVariable);if(null!=i){let t=e.report.dictionary.getVariableValueByName(i.name);if(i.initBy!=StiVariableInitBy.Expression||StiString.isNullOrEmpty(t)||(t=StiParser.parseTextValue(`{${t}}`,e)),i.type==DateTime||i.type==NullableDateTime)return StiValueHelper.tryToDateTime(t);if(i.type==DateTimeRange||i.type==StimulsoftDateTimeRange)return t[Stimulsoft.System.StiObject.stimulsoft]().is(DateTimeRange)?t:new DateTimeRange}return DateTime.now}},__.W.StiElementEditorConsts=class{constructor(){this.elementEditor="Stimulsoft.Dashboard.Design.Components.StiElementEditor, Stimulsoft.Dashboard.Design, "+Stimulsoft.StiVersion.versionInfo,this.textFormatEditor="Stimulsoft.Report.Components.TextFormats.Design.StiTextFormatEditor, Stimulsoft.Report.Design, "+Stimulsoft.StiVersion.versionInfo}},__.W.StiElementLayoutConverter=class{},__.W.StiElementStyleConverter=class{},__.W.StiMeterListConverter=class{},__.W.StiTitleConverter=class{},Stimulsoft.Report.StiAbbreviationNumberFormatHelper),IStiMinGaugeMeter=(__.i.StiElementBuilder=class{getSeriesKeysLimitCount(t){let e=null;return e=t.isDesigning?100:e}getSeries(t,e,i,r,l=!1){if(null==t||-1==e)return null;let n=t.rows.whereFirstOrDefaultArrayItemStringEqualsTo(e,i),s=null!=n&&0<n.length?n[e]:null;if(null!=s&&s instanceof DateTime)return s.toShortDateString();if(l&&null!=s){if("number"==typeof s)return StiAbbreviationNumberFormatHelper.format(s,null==r?void 0:r.culture);if("string"==typeof s){let t=StiNumber.tryParse(s);if(t.successfully)return StiAbbreviationNumberFormatHelper.format(t.result,null==r?void 0:r.culture)}}return this.toString(s)}getValue(e,i,t,r,l,n=!1){if(null==e||-1==i)return 0;if(r<2){if(n){let t=e.rows.getArrayItem(i).firstOrDefaultAsNullableDateTime();if(null!=t)return t.ticks;return 0}return e.rows.getArrayItem(i).firstOrDefaultAsNumber()}let s=e.rows.whereFirstOrDefaultArrayItemStringEqualsTo(t,l);if(null!=s&&0<s.length){if(n)return StiValueHelper.tryToDateTime(s[i]).ticks;return StiValueHelper.tryToNumber(s[i])}return 0}getTarget(e,i,t,r,l,n=!1){if(null==e||-1==i)return null;if(r<2){if(n){let t=e.rows.getArrayItem(i).firstOrDefaultAsNullableDateTime();if(null!=t)return t.ticks;return null}return e.rows.getArrayItem(i).firstOrDefaultAsNumber()}let s=e.rows.whereFirstOrDefaultArrayItemStringEqualsTo(t,l);if(null!=s&&0<s.length){if(n)return StiValueHelper.tryToDateTime(s[i]).ticks;return StiValueHelper.tryToNumber(s[i])}return 0}getNullableTarget(e,i,t,r,l,n=!1){if(null==e||-1==i)return null;if(r<2){if(n){let t=e.rows.getArrayItem(i).firstOrDefaultAsNullableDateTime();if(null!=t)return t.ticks;return 0}return e.rows.getArrayItem(i).firstOrDefaultAsNullableNumber()}let s=e.rows.whereFirstOrDefaultArrayItemStringEqualsTo(t,l);if(null!=s&&0<s.length){if(n){if(n)return StiValueHelper.tryToDateTime(s[i]).ticks;return 0}return StiValueHelper.tryToNumber(s[i])}return null}getNullableValue(t,e,i,r,l){if(null==t||-1==e)return null;if(r<2)return t.rows.getArrayItem(e).firstOrDefaultAsNullableNumber();let n=t.rows.whereFirstOrDefaultArrayItemStringEqualsTo(i,l);return null!=n&&0<n.length?StiValueHelper.tryToNullableNumber(n[e]):null}getSeriesKeyValues(t,e,i){if(null==t||-1==e)return new List([""]);let r=null!=i?t.rows.getArrayItem(e).distinct().select(this.replaceDbNull).where(t=>null!=t).take(i):t.rows.getArrayItem(e).distinct().select(this.replaceDbNull).where(t=>null!=t);return r.any()?r:new List([""])}getSeriesKeys(t,e,i){let r=this.getSeriesKeyValues(t,e,i);return null==r?new List([""]):r.select(this.toString)}replaceDbNull(t){return t}toString(t){return null==t?"":t.toString()}toReadableString(t,e){let i=null==e?void 0:e.getParsedCulture();if(StiExtValueConverter.isEligable(t,i))return StiExtValueConverter.convert(t,i);return this.toString(t)}},Stimulsoft.Base.Meters.IStiMinGaugeMeter),IStiMaxGaugeMeter=(__.T.StiMinGaugeMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiMinGaugeMeter]);return(this.implements=()=>t)()}get localizedName(){return"Min"}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.MinGaugeMeter}},Stimulsoft.Base.Meters.IStiMaxGaugeMeter),StiFontUtils=(__.T.StiMaxGaugeMeter=class extends __.e.StiMeasureMeter{implements(){let t=super.implements().concat([IStiMaxGaugeMeter]);return(this.implements=()=>t)()}get localizedName(){return"Max"}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.MaxGaugeMeter}},__.s.StiGaugeIteration=class{},Stimulsoft.Base.Drawing.StiFontUtils),StiLinearTickLabelCustom=Stimulsoft.Report.Components.Gauge.StiLinearTickLabelCustom,StiRadialTickLabelCustom=Stimulsoft.Report.Components.Gauge.StiRadialTickLabelCustom,StiDashboardExpressionHelper=Stimulsoft.Report.Dashboard.Helpers.StiDashboardExpressionHelper,StiLabelRotationMode=Stimulsoft.Report.Gauge.StiLabelRotationMode,StiIndicatorBase=Stimulsoft.Report.Components.Gauge.Primitives.StiIndicatorBase,StiRadialRange=Stimulsoft.Report.Components.Gauge.StiRadialRange,StiRadialRangeList=Stimulsoft.Report.Components.Gauge.StiRadialRangeList,StiLinearMarker=Stimulsoft.Report.Components.Gauge.StiLinearMarker,StiLinearTickMarkMajor=Stimulsoft.Report.Components.Gauge.StiLinearTickMarkMajor,StiLinearTickLabelMajor=Stimulsoft.Report.Components.Gauge.StiLinearTickLabelMajor,StiRadiusMode=Stimulsoft.Report.Gauge.StiRadiusMode,Point=Stimulsoft.System.Drawing.Point,StiNeedle=Stimulsoft.Report.Components.Gauge.StiNeedle,StiRadialBar=Stimulsoft.Report.Components.Gauge.StiRadialBar,StiTickMarkSkin=Stimulsoft.Report.Gauge.StiTickMarkSkin,StiGaugeType=Stimulsoft.Report.Gauge.StiGaugeType,StiGauge=Stimulsoft.Report.Components.StiGauge,StiPlacement=Stimulsoft.Report.Gauge.StiPlacement,StiLinearRange=Stimulsoft.Report.Components.Gauge.StiLinearRange,StiLinearRangeList=Stimulsoft.Report.Components.Gauge.StiLinearRangeList,StiGaugeRangeMode=Stimulsoft.Report.Gauge.StiGaugeRangeMode,StiLinearScale=Stimulsoft.Report.Components.Gauge.StiLinearScale,StiGaugeRangeType=Stimulsoft.Report.Gauge.StiGaugeRangeType,StiGaugeCalculationMode=Stimulsoft.Report.Gauge.StiGaugeCalculationMode,StiMinGaugeMeter=__.T.StiMinGaugeMeter,StiMaxGaugeMeter=__.T.StiMaxGaugeMeter,StiRadialTickLabelMajor=Stimulsoft.Report.Components.Gauge.StiRadialTickLabelMajor,StiRadialTickMarkMajor=Stimulsoft.Report.Components.Gauge.StiRadialTickMarkMajor,StiRadialScale=Stimulsoft.Report.Components.Gauge.StiRadialScale,StiTypeNotRecognizedException=Stimulsoft.Data.Exceptions.StiTypeNotRecognizedException,StiDashboardStyleHelper=Stimulsoft.Report.Dashboard.Styles.StiDashboardStyleHelper,StiGaugeIteration=__.s.StiGaugeIteration,StiMarkerSkin=Stimulsoft.Report.Gauge.StiMarkerSkin,StiLinearTickMarkCustom=Stimulsoft.Report.Components.Gauge.StiLinearTickMarkCustom,StiLinearBar=Stimulsoft.Report.Components.Gauge.StiLinearBar,StiRadialTickMarkCustom=Stimulsoft.Report.Components.Gauge.StiRadialTickMarkCustom,StiLabelPlacement=Stimulsoft.Report.Dashboard.StiLabelPlacement;{class StiGaugeElementBuilder extends __.i.StiElementBuilder{findMinMaxValues(e,i,r,l,h,c,d,g,p,C,b,t,n){let w,f,y,M,I=!1;for(let t of r){let n=this.getValue(l,c,d,g,this.toString(t),h),s=this.getTarget(l,p,d,g,this.toString(t),h),o=0,a=0;if(h){let t=new DateTime(n);if(0==n&&(t=DateTime.now),null!=s){let t=Math.min(n,StiNumber.getValueOrDefault(s)),e=Math.max(n,StiNumber.getValueOrDefault(s)),i=.4*(e-t);o=new DateTime(t).addTicks(-i).ticks,a=new DateTime(e).addTicks(i).ticks}else o=t.addMonths(-1).ticks,a=t.addMonths(1).ticks}else n==C&&n==b&&(a=0==n?(o=-50,50):(o=n-n,n+n));let u=5;switch(e.type){case StiGaugeType.FullCircular:case StiGaugeType.HalfCircular:{let t=Math.min(i.width,i.height);u=t<330?2:t<450?5:t<650?7:10}break;case StiGaugeType.Linear:{let t=i.height;u=t<330?2:t<450?5:t<650?7:10}break;case StiGaugeType.HorizontalLinear:{let t=i.width;u=t<330?2:t<500?5:t<650?8:10}break;case StiGaugeType.Bullet:{let t=i.width;u=t<330?2:5}break}let S=0,m=0;if(e.calculationMode==StiGaugeCalculationMode.Auto){n<0&&(I=!0);let e=this.getSummary(n,o,a,h);if(n<=o&&(o=Math.round(n-.3*e)),n>=a&&(a=Math.round(n+.3*e)),null!=s){let t=s;t<o&&(o=Math.round(t-.3*e)),t>a&&(a=Math.round(t+.3*e))}if(S=o,m=a,-1<n&&n<1){(null==y||S<y)&&(y=S),(null==M||m>M)&&(M=m);continue}let t=S%5,i=(0!=t&&(S-=t),m-S),r=i/u,l=(0<r-r&&(r+=1),r%5);0!=l&&(r+=5-l),i=r*u,m=S+i}else m=e.dateTimeMode?(S=null==(w=e.minimumDateTime)?void 0:w.ticks,null==(f=e.maximumDateTime)?void 0:f.ticks):(S=e.getMinimumValue(),e.getMaximumValue());(null==y||S<y)&&(y=S),(null==M||m>M)&&(M=m)}t.ref=y,n.ref=M,t.ref<0&&e.calculationMode==StiGaugeCalculationMode.Auto&&!I&&(t.ref=0)}async render(t,e,i){return this.render2(t,e,i)()}render2(y,M,I){this.storedCulture=StiCultureHelper.set(y.report);try{let c=this.getValueMeterIndex(I),d=this.getSeriesMeterIndex(I),g=this.getTargetMeterIndex(I),t=this.getMinMeterIndex(I),e=this.getMaxMeterIndex(I),i=this.getSeriesKeyValues(I,d,this.getSeriesKeysLimitCount(y)),p=i.count2(),C=y.dateTimeMode,r=this.getMinValue(y,C,I,t),l=this.getMaxValue(y,C,I,e),b={ref:null},n={ref:null},w=(this.findMinMaxValues(y,M,i,I,C,c,d,p,g,r,l,b,n),b.ref),f=n.ref;return async()=>i.selectAsync(async t=>{let e=this.getValue(I,c,d,p,this.toString(t),C),i=this.getNullableTarget(I,g,d,p,this.toString(t),C),r={ref:null},l={ref:null},n={ref:null},s=(this.fundActualValues(y,M,C,e,w,f,r,l,n),r.ref),o=b.ref,a=n.ref,u=await this.createScale(y,C,a,M,w,f,i),S=(u.seriesKey=t,u.items.toList().where(t=>t.is(StiIndicatorBase)).cast());for(let t of S)t.valueObj=e;if(u.minimum=w,u.maximum=f,u.majorInterval=s,u.minorInterval=o,y.type==StiGaugeType.Linear||y.type==StiGaugeType.HorizontalLinear||y.type==StiGaugeType.Bullet){let t=u.items.toList().where(t=>t.is(StiLinearRangeList)).cast().firstOrDefault();null!=t&&1==t.ranges.length&&(t.ranges.getByIndex(0).startValue=u.minimum,t.ranges.getByIndex(0).endValue=u.maximum)}let m=new StiGauge(y.clientRectangle),h=(m.allowApplyStyle=!0,m.shortValue=y.shortValue,m.previousAnimations=y.previousAnimations,StiGaugeElementBuilder.setStyle(y,m),m.scales.add(u),m.applyStyle(m.style),new StiGaugeIteration);return h.gauge=m,h.value=e,h.series=this.getSeries(I,d,t,y.report,y.shortValue),h},this)}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}fundActualValues(t,e,i,r,l,n,s,o,a){let u=s.ref,S=o.ref,m=a.ref,h=5;switch(m=!1,t.type){case StiGaugeType.FullCircular:case StiGaugeType.HalfCircular:{let t=Math.min(e.width,e.height);t<330?(h=2,m=!0):h=t<450?5:t<650?7:10}break;case StiGaugeType.Linear:{let t=e.height;t<330?(h=2,m=!0):h=t<450?5:t<650?7:10}break;case StiGaugeType.HorizontalLinear:{let t=e.width;t<330?(h=2,m=!0):h=t<500?5:t<650?8:10}break;case StiGaugeType.Bullet:{let t=e.width;t<330?(h=2,m=!0):h=5}break}if(t.calculationMode!=StiGaugeCalculationMode.Auto)return 0==(u=Math.abs(Math.round((n-l)/h)))&&(u=1),S=u/2,s.ref=u,o.ref=S,void(a.ref=m);{let t=this.getSummary(r,l,n,i);u=Math.abs(Math.round(t/h)),S=u/2,s.ref=u,o.ref=S}if(-1<r&&r<1)return;let c=n-l,d=c/h,g=(0<d-d&&(d+=1),d%5);0!=g&&(d+=5-g),c=d*h,u=Math.abs(c/h),S=u/2,s.ref=u,o.ref=S,a.ref=m}getSummary(i,r,l,t){if(t){let t=l-r;return t=0==t?new DateTime(1,1,1).ticks:t}{let t=Math.round(l-r),e=Math.max(i,t);return e=Math.max(e,r),e=0==(e=Math.max(e,l))?100:e}}static setStyle(t,e){if(t.style!=StiElementStyleIdent.Custom)return void(e.style=StiDashboardStyleHelper.getGaugeStyle(t));let i=t.report.styles.getCustomGaugeStyle(t.customStyleName);if(null!=i)return e.style=i,e.customStyleName=t.customStyleName,e.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t)),void(e.allowApplyStyle=!1);e.style=StiDashboardStyleHelper.getGaugeStyle2(StiElementStyleIdent.Blue)}static getTargetBrush(t){if(t.style!=StiElementStyleIdent.Custom)return new StiSolidBrush(StiDashboardStyleHelper.getGaugeStyle(t).core.targetColor);let e=t.report.styles.getCustomGaugeStyle(t.customStyleName);if(null!=e&&null!=e.core)return new StiSolidBrush(e.core.targetColor);return new StiSolidBrush(StiDashboardStyleHelper.getGaugeStyle2(StiElementStyleIdent.Blue).core.targetColor)}static getTickMarkBrush(t){if(t.style!=StiElementStyleIdent.Custom)return StiDashboardStyleHelper.getGaugeStyle(t).core.tickMarkMajorBrush;let e=t.report.styles.getCustomGaugeStyle(t.customStyleName);if(null!=e&&null!=e.core)return e.core.tickMarkMajorBrush;return StiDashboardStyleHelper.getGaugeStyle2(StiElementStyleIdent.Blue).core.tickMarkMajorBrush}static getTickLabelBrush(t){if(t.style!=StiElementStyleIdent.Custom)return StiDashboardStyleHelper.getGaugeStyle(t).core.tickLabelMajorTextBrush;let e=t.report.styles.getCustomGaugeStyle(t.customStyleName);if(null!=e&&null!=e.core)return e.core.tickLabelMajorTextBrush;return StiDashboardStyleHelper.getGaugeStyle2(StiElementStyleIdent.Blue).core.tickLabelMajorTextBrush}async createScale(t,e,i,r,l,n,s=null){switch(t.type){case StiGaugeType.FullCircular:return this.createFullCircularScale(t,e,i,r,l,n,s);case StiGaugeType.HalfCircular:return this.createHalfCircularScale(t,e,i,r,l,n,s);case StiGaugeType.Linear:return this.createLinearScale(t,e,l,n,!1,s);case StiGaugeType.HorizontalLinear:return this.createLinearScale(t,e,l,n,!0,s);case StiGaugeType.Bullet:return this.createBullet(t,e,l,n,s);default:throw new StiTypeNotRecognizedException(t.type)}}static calculateMinorInterval(t,e){if(t<0&&e<0)return Math.abs((t-e)/5);if(t<0)return(e+Math.abs(t))/5;return(e-t)/5}async createFullCircularScale(e,t,i,r,l,n,s=null){let o=Math.min(r.width,r.height),a=o<150,u=o<75,S=new StiRadialScale,m=(S.dateTimeMode=t,S.allowApplyStyle=!1,S.radius=!e.labels.visible||e.labels.placement==StiLabelPlacement.Inside?.8:.63,S.startAngle=120,S.sweepAngle=300,S.startWidth=.05,S.endWidth=.05,S.minimum=0,S.maximum=180,S.majorInterval=StiGaugeElementBuilder.calculateMinorInterval(l,n),S.borderBrush=new StiEmptyBrush,S.brush=new StiEmptyBrush,await StiGaugeElementBuilder.addRadialRanges(e,l,n,S)),h=new StiRadialBar,c=(h.startWidth=.1,h.endWidth=.1,h.offset=.1,h.placement=StiPlacement.Outside,h.valueObj=90,S.items.add(h),new StiNeedle);if(c.relativeHeight=.3,c.relativeWidth=.4,c.startWidth=.1,c.endWidth=1,c.capBrush=new StiEmptyBrush,c.brush=new StiEmptyBrush,c.valueObj=90,S.items.add(c),e.labels.visible&&!u){let t=new StiRadialTickMarkMajor;t.relativeWidth=.03,t.relativeHeight=.006,t.skin=StiTickMarkSkin.Rectangle,t.brush=StiGaugeElementBuilder.getTickMarkBrush(e),e.labels.placement==StiLabelPlacement.Inside?(t.placement=StiPlacement.Inside,t.offset=m?0:-.1):(t.placement=StiPlacement.Outside,t.offset=.2),S.items.add(t)}if(e.labels.visible&&!a){let t=new StiRadialTickLabelMajor;t.allowApplyStyle=!1,t.textBrush=StiGaugeElementBuilder.getTickLabelBrush(e),t.labelRotationMode=i?StiLabelRotationMode.None:e.labels.rotationMode,t.formatService=e.valueFormat,null!=s&&(t.skipValuesObj=[StiNumber.getValueOrDefault(s)]),u&&(t.font=StiGaugeElementBuilder.getSmallElementFont(e)),e.labels.placement==StiLabelPlacement.Inside?(t.placement=StiPlacement.Inside,t.offset=m?.07:-.03):(t.placement=StiPlacement.Outside,t.offset=.27),S.items.add(t)}if(null!=s){let t=new StiRadialTickMarkCustom;if(t.placement=StiPlacement.Overlay,t.offset=-.15,t.relativeWidth=.1,t.relativeHeight=.02,t.borderWidth=0,t.brush=StiGaugeElementBuilder.getTargetBrush(e),t.valueObj=s[Stimulsoft.System.StiObject.stimulsoft]().toNumber(),S.items.add(t),e.targetSettings.showLabel){let t=new StiRadialTickLabelCustom;switch(t.allowApplyStyle=!1,t.formatService=e.valueFormat,t.textBrush=StiGaugeElementBuilder.getTargetBrush(e),t.labelRotationMode=i?StiLabelRotationMode.None:e.labels.rotationMode,t.placement=e.targetSettings.placement,t.valueObj=StiNumber.getValueOrDefault(s),t.textObj=StiNumber.getValueOrDefault(s).toString(),t.font=StiGaugeElementBuilder.getSmallElementFont(e),e.targetSettings.placement){case StiPlacement.Overlay:t.offset=-.12;break;case StiPlacement.Outside:t.offset=.18;break}S.items.add(t)}}return S}async createHalfCircularScale(e,t,i,r,l,n,s=null){let o=Math.min(r.width,r.height),a=o<150,u=o<75,S=new StiRadialScale,m=(S.dateTimeMode=t,S.startAngle=180,S.sweepAngle=180,S.startWidth=.05,S.endWidth=.05,S.minimum=0,S.maximum=180,S.radius=.92,S.majorInterval=StiGaugeElementBuilder.calculateMinorInterval(l,n),S.center=new Point(.5,.7),S.radiusMode=StiRadiusMode.Auto,S.brush=new StiSolidBrush(Color.fromArgb2(238,238,238)),new StiRadialBar);if(m.startWidth=.05,m.endWidth=.05,m.offset=.1,m.valueObj=135,m.placement=StiPlacement.Overlay,m.brush=new StiSolidBrush(Color.red),S.items.add(m),await StiGaugeElementBuilder.addRadialRanges(e,l,n,S),e.labels.visible){if(!u){let t=new StiRadialTickMarkMajor;t.offset=.05,t.relativeWidth=.03,t.relativeHeight=.006,t.skin=StiTickMarkSkin.Rectangle,t.brush=StiGaugeElementBuilder.getTickMarkBrush(e),e.labels.placement==StiLabelPlacement.Inside?t.placement=StiPlacement.Inside:t.placement=StiPlacement.Outside,S.items.add(t)}if(!a){let t=new StiRadialTickLabelMajor;t.allowApplyStyle=!1,t.textBrush=StiGaugeElementBuilder.getTickLabelBrush(e),t.labelRotationMode=i?StiLabelRotationMode.None:e.labels.rotationMode,t.formatService=e.valueFormat,t.font=StiGaugeElementBuilder.getSmallElementFont(e),null!=s&&(t.skipValuesObj=[StiNumber.getValueOrDefault(s)]),e.labels.placement==StiLabelPlacement.Inside?(t.placement=StiPlacement.Inside,t.offset=.12):(t.placement=StiPlacement.Outside,t.offset=.1),S.items.add(t)}}if(null!=s){let t=new StiRadialTickMarkCustom;if(t.placement=StiPlacement.Overlay,t.relativeWidth=.1,t.relativeHeight=.02,t.borderWidth=0,t.brush=StiGaugeElementBuilder.getTargetBrush(e),t.valueObj=s[Stimulsoft.System.StiObject.stimulsoft]().toNumber(),S.items.add(t),e.targetSettings.showLabel){let t=new StiRadialTickLabelCustom;switch(t.allowApplyStyle=!1,t.formatService=e.valueFormat,t.textBrush=StiGaugeElementBuilder.getTargetBrush(e),t.labelRotationMode=i?StiLabelRotationMode.None:e.labels.rotationMode,t.placement=e.targetSettings.placement,t.valueObj=StiNumber.getValueOrDefault(s),t.textObj=StiNumber.getValueOrDefault(s).toString(),e.targetSettings.placement){case StiPlacement.Inside:t.offset=.12;break;case StiPlacement.Outside:t.offset=.05;break}S.items.add(t)}}let h=new StiNeedle;return h.relativeHeight=.05,h.relativeWidth=.4,h.startWidth=.1,h.endWidth=.2,h.capBrush=new StiSolidBrush(Color.white),h.capBorderBrush=new StiSolidBrush(Color.fromArgb2(0,150,136)),h.capBorderWidth=2,h.brush=new StiSolidBrush(Color.fromArgb2(0,150,136)),h.borderWidth=0,h.textBrush=new StiSolidBrush(Color.fromArgb2(0,150,136)),h.valueObj=135,S.items.add(h),S}async createLinearScale(r,t,e,i,l,n){let s=StiDashboardStyleHelper.getGaugeStyle(r),o=new StiLinearScale;if(o.dateTimeMode=t,o.relativeHeight=l?.9:.92,o.orientation=l?Stimulsoft.System.Drawing.Orientation.Horizontal:Stimulsoft.System.Drawing.Orientation.Vertical,o.startWidth=.1,o.endWidth=.1,o.maximum=100,o.majorInterval=StiGaugeElementBuilder.calculateMinorInterval(e,i),o.borderBrush=new StiEmptyBrush,o.brush=s.core.linearScaleBrush,r.labels.visible){let t=new StiLinearTickLabelMajor,e=(t.formatService=r.valueFormat,t.font=StiGaugeElementBuilder.getSmallElementFont(r),t.allowApplyStyle=!1,t.textBrush=StiGaugeElementBuilder.getTickLabelBrush(r),null!=n&&(t.skipValuesObj=[StiNumber.getValueOrDefault(n)]),StiDashboardExpressionHelper.getForeColor(r,r.foreColor)),i=(Color.transparent.equals(e)||(t.allowApplyStyle=!1,t.textBrush=new StiSolidBrush(e)),new StiLinearTickMarkMajor);i.relativeHeight=l?.03:.003,i.relativeWidth=l?.003:.03,i.borderBrush=new StiEmptyBrush,i.borderWidth=0,i.brush=StiGaugeElementBuilder.getTickMarkBrush(r),r.labels.placement==StiLabelPlacement.Inside?(i.placement=StiPlacement.Inside,t.placement=StiPlacement.Inside):(i.placement=StiPlacement.Outside,t.placement=StiPlacement.Outside),t.offset=.04,o.items.add(t),o.items.add(i)}if(await StiGaugeElementBuilder.addLinearRanges(r,e,i,o),null!=n){let t=new StiLinearTickMarkCustom;if(t.placement=StiPlacement.Overlay,t.relativeWidth=l?.012:.1,t.relativeHeight=l?.1:.012,t.borderWidth=0,t.brush=StiGaugeElementBuilder.getTargetBrush(r),t.valueObj=null!=n?n[Stimulsoft.System.StiObject.stimulsoft]().toNumber():0,o.items.add(t),r.targetSettings.showLabel){let t=new StiLinearTickLabelCustom;t.allowApplyStyle=!1,t.formatService=r.valueFormat,t.textBrush=StiGaugeElementBuilder.getTargetBrush(r),t.placement=r.targetSettings.placement,t.offset=.04,t.valueObj=StiNumber.getValueOrDefault(n),t.textObj=StiNumber.getValueOrDefault(n).toString(),o.items.add(t)}}let a=new StiLinearMarker;return a.skin=l?StiMarkerSkin.TriangleBottom:StiMarkerSkin.TriangleRight,a.relativeWidth=l?.04:.1,a.relativeHeight=l?.1:.04,a.placement=StiPlacement.Overlay,a.valueObj=60,a.brush=new StiSolidBrush(Color.fromArgb2(205,220,57)),o.items.add(a),o}static async addRadialRanges(o,a,u,t){if(0<o.ranges.length&&o.rangeType==StiGaugeRangeType.Color){let s=new StiRadialRangeList;if(o.rangeMode==StiGaugeRangeMode.Percentage)for(let n of o.ranges){let t=StiValueHelper.parseNumber(await StiReportParser.parseAsync(n.startExpression,o)),e=StiValueHelper.parseNumber(await StiReportParser.parseAsync(n.endExpression,o)),i=a+(u-a)/100*t,r=a+(u-a)/100*e,l=new StiRadialRange;l.placement=StiPlacement.Overlay,l.startValue=i,l.endValue=r,l.startWidth=.05,l.endWidth=.05,l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(n.color),s.ranges.add(l)}else for(let r of o.ranges){let t=StiValueHelper.parseNumber(await StiReportParser.parseAsync(r.startExpression,o)),e=StiValueHelper.parseNumber(await StiReportParser.parseAsync(r.endExpression,o)),i=new StiRadialRange;i.placement=StiPlacement.Overlay,i.startValue=t,i.endValue=e,i.startWidth=.05,i.endWidth=.05,i.borderBrush=new StiEmptyBrush,i.brush=new StiSolidBrush(r.color),s.ranges.add(i)}return t.items.add(s),0<s.ranges.length}return!1}async createBullet(i,t,e,r,l=null){let n=new StiLinearScale;if(n.dateTimeMode=t,n.orientation=Stimulsoft.System.Drawing.Orientation.Horizontal,n.relativeHeight=.85,n.startWidth=.01,n.endWidth=.01,n.maximum=100,n.majorInterval=StiGaugeElementBuilder.calculateMinorInterval(e,r),n.borderBrush=new StiEmptyBrush,n.brush=new StiEmptyBrush,await StiGaugeElementBuilder.addLinearRanges(i,e,r,n),i.labels.visible){let t=new StiLinearTickLabelMajor,e=(t.formatService=i.valueFormat,t.textBrush=StiGaugeElementBuilder.getTickLabelBrush(i),t.font=StiGaugeElementBuilder.getSmallElementFont(i),null!=l&&(t.skipValuesObj=[StiNumber.getValueOrDefault(l)]),new StiLinearTickMarkMajor);e.relativeHeight=.03,e.relativeWidth=.003,e.borderBrush=new StiEmptyBrush,e.borderWidth=0,e.brush=StiGaugeElementBuilder.getTickMarkBrush(i),i.labels.placement==StiLabelPlacement.Inside?(t.placement=StiPlacement.Inside,t.offset=.2,e.placement=StiPlacement.Inside):(t.placement=StiPlacement.Outside,t.offset=.2,e.placement=StiPlacement.Outside),e.offset=.15,n.items.add(e),n.items.add(t)}if(null!=l){let t=new StiLinearTickMarkCustom;if(t.placement=StiPlacement.Overlay,t.relativeWidth=.008,t.relativeHeight=.1,t.borderWidth=0,t.brush=StiGaugeElementBuilder.getTargetBrush(i),t.valueObj=l[Stimulsoft.System.StiObject.stimulsoft]().toNumber(),n.items.add(t),i.targetSettings.showLabel){let t=new StiLinearTickLabelCustom;t.allowApplyStyle=!1,t.formatService=i.valueFormat,t.textBrush=StiGaugeElementBuilder.getTargetBrush(i),t.placement=i.targetSettings.placement,t.offset=.25,t.valueObj=StiNumber.getValueOrDefault(l),t.textObj=StiNumber.getValueOrDefault(l).toString(),n.items.add(t)}}let s=new StiLinearBar;return s.valueObj=60,s.startWidth=.15,s.endWidth=.15,s.brush=new StiSolidBrush(Color.fromArgb2(205,220,57)),n.items.add(s),n}static async addLinearRanges(a,u,S,t,m=!1){if(0<a.ranges.length&&a.rangeType==StiGaugeRangeType.Color){let s=new StiLinearRangeList,o=a.type==StiGaugeType.Bullet?.3:.05;if(a.rangeMode==StiGaugeRangeMode.Percentage)for(let n of a.ranges){let t=StiValueHelper.parseNumber(await StiReportParser.parseAsync(n.startExpression,a)),e=StiValueHelper.parseNumber(await StiReportParser.parseAsync(n.endExpression,a)),i=u+(S-u)/100*t,r=u+(S-u)/100*e,l=new StiLinearRange;l.placement=StiPlacement.Overlay,l.startValue=i,l.endValue=r,l.startWidth=o,l.endWidth=o,l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(n.color),m&&(l.borderBrush=new StiSolidBrush(Color.fromArgb(150,139,138,135))),s.ranges.add(l)}else for(let r of a.ranges){let t=StiValueHelper.parseNumber(await StiReportParser.parseAsync(r.startExpression,a)),e=StiValueHelper.parseNumber(await StiReportParser.parseAsync(r.endExpression,a)),i=new StiLinearRange;i.placement=StiPlacement.Overlay,i.startValue=t,i.endValue=e,i.startWidth=o,i.endWidth=o,i.borderBrush=new StiEmptyBrush,i.brush=new StiSolidBrush(r.color),m&&(i.borderBrush=new StiSolidBrush(Color.fromArgb(150,139,138,135))),s.ranges.add(i)}t.items.add(s)}}getMinValue(e,t,i,r){if(-1==r)return t?e.minimumDateTime.ticks:e.getMinimumValue();if(t){let t;return null==(t=e.calculationMode==StiGaugeCalculationMode.Auto?i.rows.getArrayItem(r).firstOrDefaultAsNullableDateTime():e.minimumDateTime)?e.minimumDateTime.ticks:null==t?void 0:t.ticks}{let t=e.calculationMode==StiGaugeCalculationMode.Auto?i.rows.getArrayItem(r).firstOrDefaultAsNullableNumber():e.getMinimumValue();return null!=t?t:e.getMinimumValue()}}getMaxValue(e,t,i,r){if(-1==r)return t?e.maximumDateTime.ticks:e.getMaximumValue();if(t){let t;return null==(t=e.calculationMode==StiGaugeCalculationMode.Auto?i.rows.getArrayItem(r).firstOrDefaultAsNullableDateTime():e.maximumDateTime)?e.maximumDateTime.ticks:null==t?void 0:t.ticks}{let t=e.calculationMode==StiGaugeCalculationMode.Auto?i.rows.getArrayItem(r).firstOrDefaultAsNullableNumber():e.getMaximumValue();return null!=t?t:e.getMaximumValue()}}getValueMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiValueGaugeMeter));return null!=e?t.meters.indexOf(e):-1}getMinMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiMinGaugeMeter));return null!=e?t.meters.indexOf(e):-1}getMaxMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiMaxGaugeMeter));return null!=e?t.meters.indexOf(e):-1}getSeriesMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiSeriesGaugeMeter));return null!=e?t.meters.indexOf(e):-1}getTargetMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiTargetGaugeMeter));return null!=e?t.meters.indexOf(e):-1}static getSmallElementFont(t){let e=StiDashboardStyleHelper.getElementFontFromStyle(t);if(null==e)return t.font;let i=StiDashboardStyleHelper.getElementFontFromStyle(t),r=8*i.size/13,l=t.cachedSmallFont;if(null!=l&&l.name==i.name&&l.style==i.style&&l.size==r)return l;return t.cachedSmallFont=StiFontUtils.changeFontSize(i,r),t.cachedSmallFont}}__.i.StiGaugeElementBuilder=StiGaugeElementBuilder}let ImplementsIStiGaugeRange=Stimulsoft.Report.Dashboard.ImplementsIStiGaugeRange,IStiGaugeRange=Stimulsoft.Report.Dashboard.IStiGaugeRange;{class StiGaugeRange{implements(){let t=[IStiJsonReportObject,IStiGaugeRange,...ImplementsIStiGaugeRange,ICloneable];return(this.implements=()=>t)()}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}meta(){return[new StiColorMeta("Color","",Color.red),new StiStringNullOrEmptyMeta("StartExpression"),new StiStringNullOrEmptyMeta("EndExpression")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}get start(){return StiValueHelper.tryToNumber(this.startExpression)}set start(t){this.currentCulture=CultureInfo.currentCulture;try{CultureInfo.currentCulture=CultureInfo.cultures["en-US"],this.startExpression=t.toString()}finally{CultureInfo.currentCulture=this.currentCulture}}get end(){return StiValueHelper.tryToNumber(this.endExpression)}set end(t){this.currentCulture=CultureInfo.currentCulture;try{CultureInfo.currentCulture=CultureInfo.cultures["en-US"],this.endExpression=t.toString()}finally{CultureInfo.currentCulture=this.currentCulture}}static loadFromJson(t){let e=new StiGaugeRange;return e.loadFromJsonObject(t),e}static loadFromXml(t){let e=new StiGaugeRange;return e.loadFromXml(t),e}saveToString(){return this.saveToJsonObject(StiJsonSaveMode.Report).serialize()}getStringRepresentation(){return this.start+` - `+this.end}constructor(t,e,i){this.color=Color.red,this.startExpression="0",this.endExpression="100",null!=t&&(this.color=t),null!=e&&(this.startExpression=e),null!=i&&(this.endExpression=i)}}__.T.StiGaugeRange=StiGaugeRange}__.g.StiGaugeDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiAllowUserSortingDashboardInteraction,IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("AllowUserSorting","",!0),new StiBoolMeta("AllowUserDrillDown"),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.isDefaultLayout&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)&&!this.allowUserDrillDown&&this.allowUserSorting}constructor(t,e,i,r,l,n,s){super(),this.ident=StiInteractionIdent.Gauge,this.availableOnClick=StiAvailableInteractionOnClick.None,this.availableOnHover=StiAvailableInteractionOnHover.None,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.AllowSorting,this.allowUserSorting=!0,this.allowUserDrillDown=!1,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=t&&(this.fileName=t),null!=e&&(this.headerText=e),null!=i&&(this.footerText=i),null!=r&&(this.showFullScreenButton=r),null!=l&&(this.showSaveButton=l),null!=n&&(this.allowUserSorting=n),null!=s&&(this.showViewDataButton=s)}};let IStiGaugeLabels=Stimulsoft.Report.Dashboard.IStiGaugeLabels,IStiGaugeTarget=(__.T.StiGaugeLabels=class{implements(){let t=[IStiGaugeLabels,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiBoolMeta("Visible","",!0),new StiEnumMeta("Placement","",StiLabelPlacement,StiLabelPlacement.Inside),new StiEnumMeta("RotationMode","",StiLabelRotationMode,StiLabelRotationMode.Automatic)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}constructor(t,e,i){this.visible=!0,this.placement=StiLabelPlacement.Inside,this.rotationMode=StiLabelRotationMode.Automatic,null!=t&&(this.visible=t),null!=e&&(this.placement=e),null!=i&&(this.rotationMode=i)}},Stimulsoft.Report.Dashboard.IStiGaugeTarget),StiGaugeTarget=(__.T.StiGaugeTarget=class{implements(){let t=[IStiGaugeTarget,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiBoolMeta("ShowLabel","",!0),new StiEnumMeta("Placement","",StiPlacement,StiPlacement.Inside)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){
|
|
8
8
|
StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}constructor(t,e){this.showLabel=!0,this.placement=StiPlacement.Inside,null!=t&&(this.showLabel=t),null!=e&&(this.placement=e)}},__.T.StiGaugeTarget),StiGaugeDashboardInteraction=__.g.StiGaugeDashboardInteraction,StiGaugeRange=__.T.StiGaugeRange,ImplementsIStiGaugeElement=Stimulsoft.Report.Dashboard.ImplementsIStiGaugeElement,StiGaugeElementBuilder=__.i.StiGaugeElementBuilder,IStiGaugeElement=Stimulsoft.Report.Dashboard.IStiGaugeElement,StiGaugeLabels=__.T.StiGaugeLabels,IStiNumberFormat=Stimulsoft.Report.Components.IStiNumberFormat;{StiExportToolAttribute.add("StiGaugeElement","Stimulsoft.Dashboard.Export.Tools.StiGaugeElementExportTool");class StiGaugeElement extends __.e.StiElement{implements(){let t=super.implements().concat([IStiGaugeElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiFont,IStiForeColor,IStiElementLayout,IStiElementInteraction,IStiGlobalizationProvider,...ImplementsIStiGaugeElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,...ImplementsIStiFont,...ImplementsIStiForeColor,...ImplementsIStiElementLayout,IStiJsonReportObject,IStiShowBlanks,IStiNumberFormat]);return(this.implements=()=>t)()}clone(t){let e,i,r,l,n=super.clone(t);return n.value=null!=this.value?this.value.clone():null,n.series=null!=this.series?this.series.clone():null,n.target=null!=this.target?this.target.clone():null,n.valueFormat=null!=this.valueFormat?this.valueFormat.clone():null,n.userSorts=this.userSorts.select(t=>t.clone()).toList(),n.transformActions=this.transformActions.select(t=>t.clone()).toList(),n.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),n.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),n.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),n.title=null!=this.title?this.title.clone():null,n.layout=null!=this.layout?this.layout.clone():null,n.dashboardInteraction=this.dashboardInteraction.clone(),n.labels=null==(e=this.labels)?void 0:e.clone(),n.targetSettings=null==(i=this.targetSettings)?void 0:i.clone(),n.shadow=null==(r=this.shadow)?void 0:r.clone(),n.cornerRadius=null==(l=this.cornerRadius)?void 0:l.clone(),n}meta(){return[...super.meta(),new StiObjectMeta("UserSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userSorts,t)).set(t=>this.userSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.userSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("Ranges").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.ranges,t)).set(t=>this.ranges.addRange(t.value.properties().select(t=>StiGaugeRange.loadFromJson(t.value)))).setXml(t=>this.ranges.addRange(t.childNodes.map(t=>StiGaugeRange.loadFromXml(t)))),new StiNumberMeta("Minimum","",0),new StiNumberMeta("Maximum","",100),new StiStringMeta("MinimumValue","","0"),new StiStringMeta("MaximumValue","","100"),new StiStringNullOrEmptyMeta("MinimumDateTime").get(()=>this.minimumDateTime.toString()).set(t=>this.minimumDateTime=StiJson.jsonDateFormatToDate(t.value)).setXml(t=>this.minimumDateTime=DateTime.tryParse(t.textContent).result),new StiStringNullOrEmptyMeta("MaximumDateTime").get(()=>this.maximumDateTime.toString()).set(t=>this.maximumDateTime=StiJson.jsonDateFormatToDate(t.value)).setXml(t=>this.maximumDateTime=DateTime.tryParse(t.textContent).result),new StiEnumMeta("CalculationMode","",Stimulsoft.Report["Gauge"].StiGaugeCalculationMode,Stimulsoft.Report["Gauge"].StiGaugeCalculationMode.Auto),new StiEnumMeta("RangeMode","",Stimulsoft.Report["Gauge"].StiGaugeRangeMode,Stimulsoft.Report["Gauge"].StiGaugeRangeMode.Percentage),new StiEnumMeta("Type","",Stimulsoft.Report["Gauge"].StiGaugeType,Stimulsoft.Report["Gauge"].StiGaugeType.FullCircular),new StiEnumMeta("RangeType","",Stimulsoft.Report["Gauge"].StiGaugeRangeType,Stimulsoft.Report["Gauge"].StiGaugeRangeType.None),new StiBoolMeta("ShortValue","",!0),new StiBoolMeta("CrossFiltering","",!0),new StiBoolMeta("ShowBlanks"),new StiBoolMeta("DateTimeMode"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiObjectMeta("Labels").check(()=>null!=this.labels),new StiObjectMeta("TargetSettings").check(()=>null!=this.targetSettings),new StiObjectMeta("Value").check(()=>null!=this.value).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.T.StiValueGaugeMeter);null!=e&&(this.value=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.T.StiValueGaugeMeter);null!=e&&(this.value=e)}),new StiObjectMeta("Series").check(()=>null!=this.series).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiSeriesGaugeMeter);null!=e&&(this.series=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiSeriesGaugeMeter);null!=e&&(this.series=e)}),new StiObjectMeta("Target").check(()=>null!=this.target).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.T.StiTargetGaugeMeter);null!=e&&(this.target=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.T.StiTargetGaugeMeter);null!=e&&(this.target=e)}),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiEnumMeta("DataMode","",StiDataMode,StiDataMode.UsingDataFields),new StiStringNullOrEmptyMeta("ManuallyEnteredData"),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("ValueFormat").check(()=>null!=this.valueFormat).set(t=>this.valueFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.valueFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiGaugeDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiGaugeDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiGaugeDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}addValue2(t){this.value=null!=t?StiMeterHelper.Gauge.getValue2(t):null}addValue(t){this.value=StiMeterHelper.Gauge.getValue(t.as(__.e.StiMeter))}removeValue(){this.value=null}getValue(){return this.value}getValue2(t){return null!=t?StiMeterHelper.Gauge.getValue(t.as(__.e.StiMeter)):null}createNewValue(){this.value=new __.T.StiValueGaugeMeter,this.value.expression="Sum()"}addSeries2(t){this.series=null!=t?StiMeterHelper.Gauge.getSeries2(t):null}addSeries(t){this.series=StiMeterHelper.Gauge.getSeries(t.as(__.e.StiMeter))}removeSeries(){this.series=null}getSeries(){return this.series}getSeries2(t){return null!=t?StiMeterHelper.Gauge.getSeries(t.as(__.e.StiMeter)):null}createNewSeries(){this.series=new StiSeriesGaugeMeter}addTarget2(t){this.target=null!=t?StiMeterHelper.Gauge.getTarget2(t):null}addTarget(t){this.target=StiMeterHelper.Gauge.getTarget(t.as(__.e.StiMeter))}removeTarget(){this.target=null}getTarget(){return this.target}getTarget2(t){return null!=t?StiMeterHelper.Gauge.getTarget(t.as(__.e.StiMeter)):null}createNewTarget(){this.target=new __.T.StiTargetGaugeMeter}getRanges(){let t=new List;return t.addRange(this.ranges),t}getPreferedColor(){if(this.ranges.all(t=>!Color.green.equals(t.color)))return Color.green;if(this.ranges.all(t=>!Color.yellow.equals(t.color)))return Color.yellow;if(this.ranges.all(t=>!Color.red.equals(t.color)))return Color.red;return Color.orange}addRange(){let t=new StiGaugeRange;return t.color=this.getPreferedColor(),this.ranges.add(t),t}removeRange(t){t<this.ranges.length&&this.ranges.removeAt(t)}createdDefaultRanges(){this.ranges.clear(),this.ranges.add(new StiGaugeRange(Color.red,"0","33")),this.ranges.add(new StiGaugeRange(Color.yellow,"33","66")),this.ranges.add(new StiGaugeRange(Color.green,"66","100"))}getManuallyEnteredDataTable(){if(this.dataMode!=StiDataMode.ManuallyEnteringData)return null;return __.e.StiManuallyEnteredDataParser.getGaugeDataTable(this.manuallyEnteredData,this.dateTimeMode,this)}async getGaugeComponent(t=null){let e=await StiElementDataCache.getOrCreate(this),i=(new StiGaugeElementBuilder).render2(this,null!=t?t:this.clientRectangle.size,e),r=new Stimulsoft.Report.Components.StiGauge;return 1==(await i()).count2()&&((r=(await i()).firstOrDefault().gauge).report=this.report,r.page=this.page,r.name=this.name+`_Content`,r.clientRectangle=null!=t?new Rectangle(0,0,t.width,t.height):this.clientRectangle.clone(),r.brush=new StiSolidBrush(this.backColor)),r}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter)),r=(null!=(i=null==i?i=e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.value=null==this.value?new __.T.StiValueGaugeMeter:this.value,this.value.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiSeriesMeter))),l=(null!=(r=null==r?e.firstOrDefault(t=>t.is(IStiDimensionMeter)):r)&&(this.series=null==this.series?new StiSeriesGaugeMeter:this.series,this.series.loadFromJsonObject(r.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiTargetMeter)));null!=l&&(this.target=null==this.target?new __.T.StiTargetGaugeMeter:this.target,this.target.loadFromJsonObject(l.saveToJsonObject(StiJsonSaveMode.Report))),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiGaugeDashboardInteraction)}fetchAllMeters(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(null!=this.value&&t.add(this.value),null!=this.series&&t.add(this.series),null!=this.target)&&t.add(this.target),t}getMeters(){let i=new List;if(this.dataMode==StiDataMode.UsingDataFields){if(null!=this.value&&(this.value.key=StiKeyHelper.getOrGeneratedKey(this.value.key),i.add(this.value),this.calculationMode==Stimulsoft.Report["Gauge"].StiGaugeCalculationMode.Auto)){let t=new __.T.StiMinGaugeMeter,e=(t.key=this.value.key,t.expression=StiExpressionHelper.replaceFunction(this.value.expression,"Min"),i.add(t),new __.T.StiMaxGaugeMeter);e.key=this.value.key,e.expression=StiExpressionHelper.replaceFunction(this.value.expression,"Max"),i.add(e)}null!=this.series&&i.add(this.series),null!=this.target&&i.add(this.target)}return i}retrieveUsedDataNames(){return this.dataMode==StiDataMode.UsingDataFields?StiUsedDataHelper.getMany(this.value,this.series,this.target):null}get isDefined(){return null!=this.value||null!=this.series||null!=this.target||this.dataMode==StiDataMode.ManuallyEnteringData}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.GaugeElement}get localizedName(){return StiLocalization.get("Components","StiGauge")}static getValueFormatDefault(){let t=new StiNumberFormatService;return t.decimalDigits=0,t.state=__.a.StiTextFormatState.DecimalDigits|__.a.StiTextFormatState.Abbreviation,t}get minimum(){return StiValueHelper.tryToNumber(this.minimumValue)}set minimum(t){let e=CultureInfo.currentCulture;CultureInfo.currentCulture=CultureInfo.getCultureInfo("en-US"),this.minimumValue=StiValueHelper.tryToString(t),CultureInfo.currentCulture=e}get maximum(){return StiValueHelper.tryToNumber(this.maximumValue)}set maximum(t){let e=CultureInfo.currentCulture;CultureInfo.currentCulture=CultureInfo.getCultureInfo("en-US"),this.maximumValue=StiValueHelper.tryToString(t),CultureInfo.currentCulture=e}getMinimumValue(){return StiReportParser.parseNumber(this.minimumValue,this.report,!0,null,!0,!0)}getMaximumValue(){return StiReportParser.parseNumber(this.maximumValue,this.report,!0,null,!0,!0)}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}constructor(t=Rectangle.empty){super(t),this.dataMode=StiDataMode.UsingDataFields,this.group="",this.title=new StiTitle,this.layout=new StiElementLayout,this.crossFiltering=!0,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.showBlanks=!1,this.dateTimeMode=!1,this.font=new Font("Arial",13),this.foreColor=Color.transparent,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.userSorts=new List,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.helpUrl="user-manual/dashboards_gauge.htm",this.valueFormat=StiGaugeElement.getValueFormatDefault(),this.shortValue=!0,this.labels=new StiGaugeLabels,this.targetSettings=new StiGaugeTarget,this.minimumValue="0",this.maximumValue="100",this.minimumDateTime=DateTime.now,this.maximumDateTime=DateTime.now.addYears(1),this.calculationMode=Stimulsoft.Report["Gauge"].StiGaugeCalculationMode.Auto,this.rangeMode=Stimulsoft.Report["Gauge"].StiGaugeRangeMode.Percentage,this.rangeType=Stimulsoft.Report["Gauge"].StiGaugeRangeType.None,this.type=Stimulsoft.Report["Gauge"].StiGaugeType.FullCircular,this.ranges=new List,this.isSampleForStyles=!1,this.title.text=this.localizedName,this.dashboardInteraction=new StiGaugeDashboardInteraction,this.previousAnimations=new List}}__.T.StiGaugeElement=StiGaugeElement}__.ab.StiGaugeRangeConverter=class{},__.V.StiTextMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Text")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.TextMeter}},__.X.StiImageMeter=class extends __.e.StiDimensionMeter{implements(){let t=super.implements().concat([IStiValueMeter]);return(this.implements=()=>t)()}get localizedName(){return Loc.get("PropertyMain","Image")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.ImageMeter}},__.Y.StiWebContentMeter=class extends __.e.StiDimensionMeter{get localizedName(){return Loc.get("Components","StiWebContent")}constructor(t,e,i){super(t,e,i),this.ident=__.e.StiMeterIdent.WebContentMeter}};let StiImageMeter=__.X.StiImageMeter,StiWebContentMeter=__.Y.StiWebContentMeter,StiTextMeter=__.V.StiTextMeter,StiStartValueChartMeter=__.H.StiStartValueChartMeter,StiHyperlinkProcessor=(__.G.StiMeterCreator=class{static neww(t){if(StiString.isNullOrEmpty(t))return null;let e,i=StiNumber.tryParse(t);return null!=(e=i.successfully?Enum.parse(__.e.StiMeterIdent,i.result):Enum.parse(__.e.StiMeterIdent,t))?this.neww2(e):null}static neww2(t){switch(t){case __.e.StiMeterIdent.ArgumentChartMeter:return new StiArgumentChartMeter;case __.e.StiMeterIdent.SeriesChartMeter:return new StiSeriesChartMeter;case __.e.StiMeterIdent.SortByChartMeter:return new StiSortByChartMeter;case __.e.StiMeterIdent.IndicatorValueChartMeter:return new StiIndicatorValueChartMeter;case __.e.StiMeterIdent.ValueChartMeter:return new StiValueChartMeter;case __.e.StiMeterIdent.StartValueChartMeter:return new StiStartValueChartMeter;case __.e.StiMeterIdent.EndValueChartMeter:return new StiEndValueChartMeter;case __.e.StiMeterIdent.OpenValueChartMeter:return new StiOpenValueChartMeter;case __.e.StiMeterIdent.CloseValueChartMeter:return new StiCloseValueChartMeter;case __.e.StiMeterIdent.LowValueChartMeter:return new StiLowValueChartMeter;case __.e.StiMeterIdent.HighValueChartMeter:return new StiHighValueChartMeter;case __.e.StiMeterIdent.WeightChartMeter:return new StiWeightChartMeter;case __.e.StiMeterIdent.XChartMeter:return new StiXChartMeter;case __.e.StiMeterIdent.YChartMeter:return new StiYChartMeter;case __.e.StiMeterIdent.KeyComboBoxMeter:return new StiKeyComboBoxMeter;case __.e.StiMeterIdent.NameComboBoxMeter:return new StiNameComboBoxMeter;case __.e.StiMeterIdent.MaxGaugeMeter:return new StiMaxGaugeMeter;case __.e.StiMeterIdent.MinGaugeMeter:return new StiMinGaugeMeter;case __.e.StiMeterIdent.SeriesGaugeMeter:return new StiSeriesGaugeMeter;case __.e.StiMeterIdent.ValueGaugeMeter:return new StiValueGaugeMeter;case __.e.StiMeterIdent.TargetGaugeMeter:return new StiTargetGaugeMeter;case __.e.StiMeterIdent.SeriesIndicatorMeter:return new StiSeriesIndicatorMeter;case __.e.StiMeterIdent.TargetIndicatorMeter:return new StiTargetIndicatorMeter;case __.e.StiMeterIdent.ValueIndicatorMeter:return new StiValueIndicatorMeter;case __.e.StiMeterIdent.KeyListBoxMeter:return new StiKeyListBoxMeter;case __.e.StiMeterIdent.NameListBoxMeter:return new StiNameListBoxMeter;case __.e.StiMeterIdent.LatitudeMapMeter:return new StiLatitudeMapMeter;case __.e.StiMeterIdent.LongitudeMapMeter:return new StiLongitudeMapMeter;case __.e.StiMeterIdent.LocationMapMeter:return new StiLocationMapMeter;case __.e.StiMeterIdent.LocationValueMapMeter:return new StiLocationValueMapMeter;case __.e.StiMeterIdent.LocationArgumentMapMeter:return new StiLocationArgumentMapMeter;case __.e.StiMeterIdent.LocationColorMapMeter:return new StiLocationColorMapMeter;case __.e.StiMeterIdent.KeyMapMeter:return new StiKeyMapMeter;case __.e.StiMeterIdent.NameMapMeter:return new StiNameMapMeter;case __.e.StiMeterIdent.GroupMapMeter:return new StiGroupMapMeter;case __.e.StiMeterIdent.ColorMapMeter:return new StiColorMapMeter;case __.e.StiMeterIdent.ValueMapMeter:return new StiValueMapMeter;case __.e.StiMeterIdent.PivotColumn:return new StiPivotColumn;case __.e.StiMeterIdent.PivotRow:return new StiPivotRow;case __.e.StiMeterIdent.PivotSummary:return new StiPivotSummary;case __.e.StiMeterIdent.SeriesProgressMeter:return new StiSeriesProgressMeter;case __.e.StiMeterIdent.TargetProgressMeter:return new StiTargetProgressMeter;case __.e.StiMeterIdent.ValueProgressMeter:return new StiValueProgressMeter;case __.e.StiMeterIdent.ColorScaleColumn:return new StiColorScaleColumn;case __.e.StiMeterIdent.DataBarsColumn:return new StiDataBarsColumn;case __.e.StiMeterIdent.DimensionColumn:return new StiDimensionColumn;case __.e.StiMeterIdent.IndicatorColumn:return new StiIndicatorColumn;case __.e.StiMeterIdent.MeasureColumn:return new StiMeasureColumn;case __.e.StiMeterIdent.SparklinesColumn:return new StiSparklinesColumn;case __.e.StiMeterIdent.BubbleColumn:return new StiBubbleColumn;case __.e.StiMeterIdent.ColorScaleCardsColumn:return new StiColorScaleCardsColumn;case __.e.StiMeterIdent.DataBarsCardsColumn:return new StiDataBarsCardsColumn;case __.e.StiMeterIdent.DimensionCardsColumn:return new StiDimensionCardsColumn;case __.e.StiMeterIdent.IndicatorCardsColumn:return new StiIndicatorCardsColumn;case __.e.StiMeterIdent.MeasureCardsColumn:return new StiMeasureCardsColumn;case __.e.StiMeterIdent.SparklinesCardsColumn:return new StiSparklinesCardsColumn;case __.e.StiMeterIdent.BubbleCardsColumn:return new StiBubbleCardsColumn;case __.e.StiMeterIdent.KeyTreeViewMeter:return new StiKeyTreeViewMeter;case __.e.StiMeterIdent.KeyTreeViewBoxMeter:return new StiKeyTreeViewBoxMeter;case __.e.StiMeterIdent.ValueDatePickerMeter:return new StiValueDatePickerMeter;case __.e.StiMeterIdent.ValueNumberBoxMeter:return new StiValueNumberBoxMeter;case __.e.StiMeterIdent.TextMeasureMeter:return new StiTextMeasureMeter;case __.e.StiMeterIdent.TextMeter:return new StiTextMeter;case __.e.StiMeterIdent.ImageMeter:return new StiImageMeter;case __.e.StiMeterIdent.WebContentMeter:return new StiWebContentMeter;default:throw new StiTypeNotRecognizedException(t)}}},__.G.StiMeterJsonConverter=class{},__.g.StiImageDashboardInteraction=class extends __.g.StiDashboardInteraction{isDefault(){return this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.OpenHyperlink&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)}constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.Image,this.availableOnClick=StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.onClick=StiInteractionOnClick.OpenHyperlink}},Stimulsoft.Report.Helpers.StiHyperlinkProcessor),StiImageDashboardInteraction=__.g.StiImageDashboardInteraction,Image=Stimulsoft.System.Drawing.Image,ImplementsIStiImageElement=Stimulsoft.Report.Dashboard.ImplementsIStiImageElement,StiImageConverter=Stimulsoft.Base.Drawing.StiImageConverter,StiDashboardImageHyperlinkCache=Stimulsoft.Report.Dashboard.Helpers.StiDashboardImageHyperlinkCache,IStiImageElement=Stimulsoft.Report.Dashboard.IStiImageElement,StiFontIconsHelper=Stimulsoft.Report.StiFontIconsHelper,StiIndicatorIconRangeMode=(StiExportToolAttribute.add("StiImageElement","Stimulsoft.Dashboard.Export.Tools.StiImageElementExportTool"),__.X.StiImageElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiHorAlignment,IStiVertAlignment,IStiImageElement,IStiCornerRadius,IStiSimpleShadow,IStiTitleElement,IStiGlobalizationProvider,...ImplementsIStiHorAlignment,...ImplementsIStiVertAlignment,...ImplementsIStiImageElement,...ImplementsIStiCornerRadius,...ImplementsIStiSimpleShadow,...ImplementsIStiTitleElement,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.title=null!=this.title?this.title.clone():null,r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiImageDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiImageDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiImageDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiBoolMeta("AspectRatio","",!0),new StiStringNullOrEmptyMeta("ImageHyperlink"),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiEnumMeta("VertAlignment","",StiVertAlignment,StiVertAlignment.Center),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("Style"),new StiBoolMeta("CrossFiltering","",!0),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiObjectMeta("Padding").get(t=>this.padding.saveToJsonObject(0,0,0,0)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiStringMeta("Image").check(()=>null!=this.image).get(()=>StiImageConverter.imageToString(this.image)).set(t=>this.image=StiImageConverter.stringToImage(t.value.toString())).setXml(t=>this.image=StiImageConverter.stringToImage(t.textContent)),new StiEnumMeta("Icon","",StiFontIcons).check(()=>null!=this.icon),new StiColorMeta("IconColor","",Color.fromArgb2(68,114,196))]}get isDefined(){return this.isImageDefined||this.isImageHyperlinkDefined||this.isImageIconDefined}get isQuerable(){return this.isImageHyperlinkDataColumnDefined}fetchAllMeters(){return this.getMeters()}getMeters(){if(!this.isHyperlinkExpressionOrHyperlinkDataColumnDefined)return new List;if(this.isImageHyperlinkExpressionDefined)return StiExpressionHelper.fetchBlocksFromExpression(this.imageHyperlink).select(t=>new StiImageMeter(t,t,t)).cast().toList();{let t=StiHyperlinkProcessor.getRealDataColumnFromHyperlink(this.report,this.imageHyperlink),e=new List;return e.add(new StiImageMeter(t,t,t)),e}}retrieveUsedDataNames(){return StiUsedDataHelper.getMany2(this.getMeters()).distinct().toList()}get imageToDraw(){if(this.isImageDefined)return new Promise(t=>{t(this.image)});if(this.isImageIconDefined){let t=this.getPaintRectangle(!0,!1);return StiFontIconsHelper.convertFontIconToImageAsync(this.icon,this.iconColor,t.width,t.height,null,this.horAlignment)}if(this.isImageHyperlinkDefined)return new Promise(r=>{setTimeout(async()=>{if(this.isImageHyperlinkDataColumnDefined){let i=await StiElementDataCache.getOrCreate(this);if(null!=i){let t=i.rows.find(t=>!0),e=null!=t?t.find(t=>!0):null;if(StiArray.isArray(e)){let t=new Stimulsoft.System.Drawing.Image;t.bytes=e,r(t)}else if("string"==typeof e&&!StiString.isNullOrEmpty(e)){if(e[Stimulsoft.System.StiObject.stimulsoft]().isBase64String()){let t=new Stimulsoft.System.Drawing.Image;t.base64=e,r(t)}r(StiDashboardImageHyperlinkCache.get(e,this.report))}}r(null)}else if(this.isImageHyperlinkExpressionDefined){let t=await StiElementDataCache.getOrCreate(this);if(null!=t){let i=t.rows.firstOrDefault();if(null!=i)if(StiArray.isArray(i[Stimulsoft.System.StiObject.stimulsoft]().toList().firstOrDefault())){let t=new Stimulsoft.System.Drawing.Image;t.bytes=i,r(t)}else{let t=i[Stimulsoft.System.StiObject.stimulsoft]().toList().select(t=>null!=(null==t?void 0:t.toString())?t.toString():"").toList(),e=Stimulsoft.Data.Helpers.StiExpressionHelper.replaceExpressionBlocksByValues(this.imageHyperlink,t);r(StiHyperlinkProcessor.getImage(this.report,e))}}}r(StiDashboardImageHyperlinkCache.get(this.imageHyperlink,this.report))})});return new Promise(t=>{t(null)})}copyAllImageProperties(t){if(null==t)return;this.image=t.image,this.imageHyperlink=t.imageHyperlink,this.icon=t.icon,this.iconColor=t.iconColor}get style(){return this.componentStyle}set style(t){this.componentStyle=t}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.ImageElement}get localizedName(){return StiLocalization.get("Components","StiImage")}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}resetAllImageProperties(){this.image=new Image,this.imageHyperlink=null,this.icon=null}get isHyperlinkExpressionOrHyperlinkDataColumnDefined(){return this.isImageHyperlinkExpressionDefined||this.isImageHyperlinkDataColumnDefined}get isImageDefined(){return null!=this.image&&(null!=this.image.bytes||!StiString.isNullOrEmpty(this.image.url))}get isImageIconDefined(){return null!=this.icon}get isImageHyperlinkDefined(){return!StiString.isNullOrWhiteSpace(this.imageHyperlink)}get isImageHyperlinkExpressionDefined(){var t,e;return(null==(t=this.imageHyperlink)?void 0:t[Stimulsoft.System.StiObject.stimulsoft]().contains("{"))&&(null==(e=this.imageHyperlink)?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().contains("}"))}get isImageHyperlinkDataColumnDefined(){return!this.isImageDefined&&!this.isImageIconDefined&&this.isImageHyperlinkDefined&&!StiString.isNullOrWhiteSpace(StiHyperlinkProcessor.getRealDataColumnFromHyperlink(this.report,this.imageHyperlink))}constructor(t=Rectangle.empty){super(t),this.group="",this.title=new __.e.StiTitle,this.image=null,this.aspectRatio=!0,this.icon=null,this.iconColor=Color.fromArgb2(68,114,196),this.crossFiltering=!0,this.horAlignment=StiHorAlignment.Center,this.vertAlignment=StiVertAlignment.Center,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.defaultClientRectangle=new Rectangle(0,0,120,120),this.helpUrl="user-manual/dashboards_image.htm",this.title.text=this.localizedName,this.title.visible=!1,this.padding=StiPadding.create(0),this.dashboardInteraction=new StiImageDashboardInteraction}},__._.StiImageBytesConverter=class{},__.g.StiIndicatorDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiAllowUserSortingDashboardInteraction,IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("AllowUserDrillDown"),new StiBoolMeta("AllowUserSorting","",!0),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&!this.allowUserDrillDown&&null==this.footerText}isDefault(){return this.isDefaultLayout&&this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.None&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)&&!this.allowUserDrillDown&&this.allowUserSorting}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d){super(),this.ident=StiInteractionIdent.Indicator,this.availableOnClick=StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.AllowDrillDown|StiAvailableInteractionOnDataManipulation.AllowSorting,this.allowUserDrillDown=!1,this.allowUserSorting=!0,this.onClick=StiInteractionOnClick.None,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=t&&(this.onHover=t),null!=e&&(this.onClick=e),null!=i&&(this.hyperlinkDestination=i),null!=r&&(this.toolTip=r),null!=l&&(this.hyperlink=l),null!=n&&(this.drillDownPageKey=n),null!=s&&(this.drillDownParameters=s),null!=o&&(this.allowUserDrillDown=o),null!=u&&(this.fileName=u),null!=S&&(this.headerText=S),null!=m&&(this.footerText=m),null!=h&&(this.showFullScreenButton=h),null!=c&&(this.showSaveButton=c),null!=a&&(this.allowUserSorting=a),null!=d&&(this.showViewDataButton=d)}},Stimulsoft.Report.Dashboard.StiIndicatorIconRangeMode),StiIndicatorIconMode=Stimulsoft.Report.Dashboard.StiIndicatorIconMode,IStiAllowSortByVariation=Stimulsoft.Data.Engine.IStiAllowSortByVariation,StiTargetMode=Stimulsoft.Report.Dashboard.StiTargetMode,StiIndicatorDashboardInteraction=__.g.StiIndicatorDashboardInteraction,ImplementsIStiIndicatorElement=Stimulsoft.Report.Dashboard.ImplementsIStiIndicatorElement,ImplementsIStiAllowSortByVariation=Stimulsoft.Data.Engine.ImplementsIStiAllowSortByVariation,StiFontIconSet=Stimulsoft.Report.Helpers.StiFontIconSet,IStiIndicatorElement=Stimulsoft.Report.Dashboard.IStiIndicatorElement,Convert=Stimulsoft.System.Convert,StiFontSizeMode=Stimulsoft.Report.Dashboard.StiFontSizeMode,IStiIndicatorElementCondition=(__.U.StiIndicatorElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiTextFormat,IStiIndicatorElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiFont,IStiForeColor,IStiElementLayout,IStiElementInteraction,IStiGlobalizationProvider,IStiAllowSortByVariation,IStiShowBlanks,...ImplementsIStiTextFormat,...ImplementsIStiIndicatorElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,...ImplementsIStiFont,...ImplementsIStiForeColor,...ImplementsIStiElementLayout,...ImplementsIStiAllowSortByVariation,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.value=null!=this.value?this.value.clone():null,r.target=null!=this.target?this.target.clone():null,r.series=null!=this.series?this.series.clone():null,r.userSorts=this.userSorts.select(t=>t.clone()).toList(),r.transformActions=this.transformActions.select(t=>t.clone()).toList(),r.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),r.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.topN=this.topN.clone(),r.textFormat=this.textFormat.clone(),r.targetFormat=this.targetFormat.clone(),r.title=null!=this.title?this.title.clone():null,r.layout=null!=this.layout?this.layout.clone():null,r.indicatorConditions=this.indicatorConditions.select(t=>t.clone()).toList(),r.dashboardInteraction=this.dashboardInteraction.clone(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiObjectMeta("UserSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userSorts,t)).set(t=>this.userSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.userSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("IconRanges").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.iconRanges,t)).set(t=>this.iconRanges.addRange(t.value.properties().select(t=>__.U.StiIndicatorIconRange.loadFromJson(t.value)))).setXml(t=>this.iconRanges.addRange(t.childNodes.map(t=>__.U.StiIndicatorIconRange.loadFromXml(t)))),new StiBoolMeta("CrossFiltering","",!0),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiObjectMeta("TextFormat").check(()=>null!=this.textFormat).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiObjectMeta("TargetFormat").check(()=>null!=this.targetFormat).set(t=>this.targetFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.targetFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiObjectMeta("Value").check(()=>null!=this.value).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiValueIndicatorMeter);null!=e&&(this.value=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiValueIndicatorMeter);null!=e&&(this.value=e)}),new StiObjectMeta("Target").check(()=>null!=this.target).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.U.StiTargetIndicatorMeter);null!=e&&(this.target=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.U.StiTargetIndicatorMeter);null!=e&&(this.target=e)}),new StiObjectMeta("Series").check(()=>null!=this.series).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.U.StiSeriesIndicatorMeter);null!=e&&(this.series=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.U.StiSeriesIndicatorMeter);null!=e&&(this.series=e)}),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiColorMeta("ForeColor","",Color.transparent),new StiColorMeta("GlyphColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial13(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiEnumMeta("DataMode","",StiDataMode,StiDataMode.UsingDataFields),new StiStringNullOrEmptyMeta("ManuallyEnteredData"),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiEnumMeta("Icon","",StiFontIcons,StiFontIcons.Rating4),new StiEnumMeta("IconSet","",StiFontIconSet,StiFontIconSet.Rating),new StiEnumMeta("IconMode","",StiIndicatorIconMode,StiIndicatorIconMode.Auto),new StiEnumMeta("IconRangeMode","",StiIndicatorIconRangeMode,StiIndicatorIconRangeMode.Percentage),new StiStringMeta("CustomIcon").check(()=>null!=this.customIcon).get(()=>Convert.toBase64String(this.customIcon)).set(t=>this.customIcon=Convert.fromBase64String(t.value.toString())).setXml(t=>this.customIcon=Convert.fromBase64String(t.textContent)),new StiEnumMeta("IconAlignment","",StiIconAlignment,StiIconAlignment.Right),new StiEnumMeta("TargetMode","",StiTargetMode,StiTargetMode.Variation),new StiEnumMeta("FontSizeMode","",StiFontSizeMode,StiFontSizeMode.Auto),new StiObjectMeta("IndicatorConditions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.indicatorConditions,t)).set(t=>this.indicatorConditions.addRange(t.value.properties().select(t=>__.U.StiIndicatorElementCondition.createFromJson(t.value)))).setXml(t=>this.indicatorConditions.addRange(t.childNodes.map(t=>__.U.StiIndicatorElementCondition.createFromXml(t)))),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiIndicatorDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiIndicatorDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiIndicatorDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiBoolMeta("ShowBlanks")]}addValue2(t){this.value=null!=t?StiMeterHelper.Indicator.getValue2(t):null}addValue(t){this.value=StiMeterHelper.Indicator.getValue(t.as(__.e.StiMeter))}removeValue(){this.value=null}getValue(){return this.value}getValue2(t){return null!=t?StiMeterHelper.Indicator.getValue(t.as(__.e.StiMeter)):null}createNewValue(){this.value=new StiValueIndicatorMeter,this.value.expression="Sum()"}addTarget2(t){this.target=null!=t?StiMeterHelper.Indicator.getTarget2(t):null}addTarget(t){this.target=StiMeterHelper.Indicator.getTarget(t.as(__.e.StiMeter))}removeTarget(){this.target=null}getTarget(){return this.target}getTarget2(t){return null!=t?StiMeterHelper.Indicator.getTarget(t.as(__.e.StiMeter)):null}createNewTarget(){this.target=new __.U.StiTargetIndicatorMeter,this.target.expression="Sum()"}addSeries2(t){this.series=null!=t?StiMeterHelper.Indicator.getSeries2(t):null}addSeries(t){this.series=StiMeterHelper.Indicator.getSeries(t.as(__.e.StiMeter))}removeSeries(){this.series=null}getSeries(){return this.series}getSeries2(t){return null!=t?StiMeterHelper.Indicator.getSeries(t.as(__.e.StiMeter)):null}createNewSeries(){this.series=new __.U.StiSeriesIndicatorMeter}getIconRanges(){let t=new List;return t.addRange(this.iconRanges),t}addRange(){let t=new __.U.StiIndicatorIconRange;return this.iconRanges.add(t),t}removeRange(t){t<this.iconRanges.length&&this.iconRanges.removeAt(t)}createdDefaultRanges(){this.iconRanges.clear(),this.iconRanges.add(new __.U.StiIndicatorIconRange(StiFontIcons.Rating1,"0","25")),this.iconRanges.add(new __.U.StiIndicatorIconRange(StiFontIcons.Rating2,"25","50")),this.iconRanges.add(new __.U.StiIndicatorIconRange(StiFontIcons.Rating3,"50","75")),this.iconRanges.add(new __.U.StiIndicatorIconRange(StiFontIcons.Rating4,"75","100"))}getManuallyEnteredDataTable(){if(this.dataMode!=StiDataMode.ManuallyEnteringData)return null;return __.e.StiManuallyEnteredDataParser.getIndicatorDataTable(this.manuallyEnteredData,this)}addIndicatorCondition(t,e,i,r,l,n,s,o,a,u,S,m,h,c){this.indicatorConditions.add(new __.U.StiIndicatorElementCondition(t,e,i,r,l,n,s,o,a,u,S,m,h,c))}fetchIndicatorConditions(){let t=new List;return null!=this.indicatorConditions&&t.addRange(this.indicatorConditions),t}clearIndicatorConditions(){this.indicatorConditions.clear()}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter)),r=(null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.value=null==this.value?new StiValueIndicatorMeter:this.value,this.value.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiTargetMeter))),l=(null!=r&&(this.target=null==this.target?new __.U.StiTargetIndicatorMeter:this.target,this.target.loadFromJsonObject(r.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiSeriesMeter)));null!=(l=null==l?e.firstOrDefault(t=>t.is(IStiDimensionMeter)):l)&&(this.series=null==this.series?new __.U.StiSeriesIndicatorMeter:this.series,this.series.loadFromJsonObject(l.saveToJsonObject(StiJsonSaveMode.Report))),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiIndicatorDashboardInteraction)}fetchAllMeters(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(null!=this.value&&t.add(this.value),null!=this.target&&t.add(this.target),null!=this.series)&&t.add(this.series),t}getMeters(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(null!=this.value&&t.add(this.value),null!=this.target&&t.add(this.target),null!=this.series)&&t.add(this.series),t}retrieveUsedDataNames(){return this.dataMode==StiDataMode.UsingDataFields?StiUsedDataHelper.getMany(this.value,this.target,this.series):null}get isDefined(){return null!=this.value||null!=this.target||null!=this.series||this.dataMode==StiDataMode.ManuallyEnteringData}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.IndicatorElement}get localizedName(){return Loc.get("Components","StiIndicator")}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}constructor(t=Rectangle.empty){super(t),this.group="",this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.dataMode=StiDataMode.UsingDataFields,this.textFormat=new StiGeneralFormatService,this.font=new Font("Arial",13),this.foreColor=Color.transparent,this.showBlanks=!1,this.title=new __.e.StiTitle,this.layout=new StiElementLayout,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.topN=new StiDataTopN,this.dataTransformation={},this.dataFilters=new List,this.userSorts=new List,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.defaultClientRectangle=new Rectangle(0,0,160,160),this.helpUrl="user-manual/dashboards_indicator.htm",this.glyphColor=Color.transparent,this.targetFormat=new StiPercentageFormatService,this.icon=StiFontIcons.Rating4,this.iconSet=StiFontIconSet.Rating,this.iconAlignment=StiIconAlignment.Right,this.targetMode=StiTargetMode.Variation,this.fontSizeMode=StiFontSizeMode.Auto,this.iconMode=StiIndicatorIconMode.Auto,this.iconRangeMode=StiIndicatorIconRangeMode.Percentage,this.iconRanges=new List,this.indicatorConditions=new List,this.crossFiltering=!0,this.isSampleForStyles=!1,this.title.text=this.localizedName,this.dashboardInteraction=new StiIndicatorDashboardInteraction}},Stimulsoft.Report.Dashboard.IStiIndicatorElementCondition),StiIndicatorFieldCondition=Stimulsoft.Report.Dashboard.StiIndicatorFieldCondition,StiIndicatorConditionPermissions=Stimulsoft.Report.Dashboard.StiIndicatorConditionPermissions;{class gT{implements(){let t=[ICloneable,IStiIndicatorElementCondition,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiStringMeta("Ident").get(()=>this[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName()),new StiEnumMeta("Condition","",StiFilterCondition,StiFilterCondition.EqualTo),new StiEnumMeta("Field","",StiIndicatorFieldCondition,StiIndicatorFieldCondition.Value),new StiStringNullOrEmptyMeta("Value"),new StiColorMeta("IconColor","",Color.fromArgb2(68,114,196)),new StiEnumMeta("Icon","",StiFontIcons,StiFontIcons.Rating4),new StiColorMeta("TargetIconColor","",Color.fromArgb2(68,114,196)),new StiEnumMeta("TargetIcon","",StiFontIcons,StiFontIcons.Rating4),new StiStringMeta("CustomIcon").check(()=>null!=this.customIcon).get(()=>Convert.toBase64String(this.customIcon)).set(t=>this.customIcon=Convert.fromBase64String(t.value.toString())).setXml(t=>this.customIcon=Convert.fromBase64String(t.textContent)),new StiEnumMeta("Permissions","",StiIndicatorConditionPermissions,StiIndicatorConditionPermissions.All),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiColorMeta("TextColor","",Color.black),new StiColorMeta("BackColor","",Color.transparent),new StiEnumMeta("IconAlignment","",StiIconAlignment,StiIconAlignment.Right),new StiEnumMeta("TargetIconAlignment","",StiIconAlignment,StiIconAlignment.Right)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}static createFromJson(t){let e=new gT;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new gT;return e.loadFromXml(t),e}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){this.iconColor=Color.fromArgb2(68,114,196),this.icon=StiFontIcons.Rating4,this.targetIconColor=Color.fromArgb2(68,114,196),this.targetIcon=StiFontIcons.Rating4,this.condition=StiFilterCondition.EqualTo,this.field=StiIndicatorFieldCondition.Value,this.permissions=StiIndicatorConditionPermissions.All,this.textColor=Color.black,this.backColor=Color.transparent,this.font=new Font("Arial",8),this.iconAlignment=StiIconAlignment.Right,this.targetIconAlignment=StiIconAlignment.Right,null!=t&&(this.field=t),null!=e&&(this.condition=e),null!=i&&(this.value=i),null!=n&&(this.targetIcon=n),null!=s&&(this.targetIconColor=s),null!=r&&(this.icon=r),null!=l&&(this.iconColor=l),null!=o&&(this.customIcon=o),null!=a&&(this.iconAlignment=a),null!=u&&(this.targetIconAlignment=u),null!=S&&(this.permissions=S),null!=m&&(this.font=m),null!=h&&(this.textColor=h),null!=c&&(this.backColor=c)}}__.U.StiIndicatorElementCondition=gT}let ImplementsStiIndicatorIconRange=Stimulsoft.Report.Dashboard.ImplementsStiIndicatorIconRange,IStiIndicatorIconRange=Stimulsoft.Report.Dashboard.IStiIndicatorIconRange;{class HT{implements(){let t=[IStiJsonReportObject,IStiIndicatorIconRange,...ImplementsStiIndicatorIconRange,ICloneable];return(this.implements=()=>t)()}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}meta(){return[new StiStringNullOrEmptyMeta("StartExpression"),new StiStringNullOrEmptyMeta("EndExpression"),new StiEnumMeta("Icon","",StiFontIcons)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static loadFromJson(t){let e=new HT;return e.loadFromJsonObject(t),e}static loadFromXml(t){let e=new HT;return e.loadFromXml(t),e}saveToString(){return this.saveToJsonObject(StiJsonSaveMode.Report).serialize()}getStringRepresentation(){return this.startExpression+` - `+this.endExpression}constructor(t,e,i){this.icon=StiFontIcons.Rating4,this.startExpression="0",this.endExpression="100",null!=t&&(this.icon=t),null!=e&&(this.startExpression=e),null!=i&&(this.endExpression=i)}}__.U.StiIndicatorIconRange=HT}let StiListBoxSelectionType=Stimulsoft.Report.Dashboard.StiListBoxSelectionType,ImplementsIStiListBoxElement=Stimulsoft.Report.Dashboard.ImplementsIStiListBoxElement,IStiListBoxElement=Stimulsoft.Report.Dashboard.IStiListBoxElement,DecimalRange=(StiExportToolAttribute.add("StiListBoxElement","Stimulsoft.Dashboard.Export.Tools.StiListBoxElementExportTool"),__.P.StiListBoxElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiListBoxElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiGlobalizationProvider,...ImplementsIStiListBoxElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}clone(t){let e,i,r,l=super.clone(t);return l.keyMeter=null!=this.keyMeter?this.keyMeter.clone():null,l.nameMeter=null!=this.nameMeter?this.nameMeter.clone():null,l.userFilters=this.userFilters.select(t=>t.clone()).toList(),l.transformActions=this.transformActions.select(t=>t.clone()).toList(),l.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),l.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),l.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),l.textFormat=this.textFormat.clone(),l.title=null!=this.title?this.title.clone():null,l.shadow=null==(e=this.shadow)?void 0:e.clone(),l.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),l.dashboardInteraction=null==(r=this.dashboardInteraction)?void 0:r.clone(),l}meta(){return[...super.meta(),new StiStringNullOrEmptyMeta("ParentKey"),new StiStringNullOrEmptyMeta("InitialValue"),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiBoolMeta("ShowAllValue"),new StiBoolMeta("ShowBlanks"),new StiEnumMeta("SelectionMode","",StiItemSelectionMode,StiItemSelectionMode.One).set(t=>{let e=Enum.parse(StiItemSelectionMode,t.value);null!=e&&(this.selectionMode=e)}).setXml(t=>{let e=Enum.parse(StiItemSelectionMode,t.textContent);null!=e&&(this.selectionMode=e)}),new StiEnumMeta("Orientation","",StiItemOrientation,StiItemOrientation.Vertical),new StiEnumMeta("SelectionType","",StiListBoxSelectionType,StiListBoxSelectionType.ListBox),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly),new StiObjectMeta("NameMeter").check(()=>null!=this.nameMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiNameListBoxMeter);null!=e&&(this.nameMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiNameListBoxMeter);null!=e&&(this.nameMeter=e)}),new StiObjectMeta("KeyMeter").check(()=>null!=this.keyMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.P.StiKeyListBoxMeter);null!=e&&(this.keyMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.P.StiKeyListBoxMeter);null!=e&&(this.keyMeter=e)}),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("TextFormat").check(()=>!(this.textFormat.is(StiGeneralFormatService)||null==this.textFormat)).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiFilterDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiFilterDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}fetchAllMeters(){let t=new List;return null!=this.nameMeter&&t.add(this.nameMeter),null!=this.keyMeter&&t.add(this.keyMeter),t}getMeters(){let t=new List;return null!=this.nameMeter&&t.add(this.nameMeter),null!=this.keyMeter&&t.add(this.keyMeter),t}retrieveUsedDataNames(){return StiUsedDataHelper.getMany(this.nameMeter,this.keyMeter)}get isDefined(){return null!=this.nameMeter||null!=this.keyMeter}getParentKey(){return this.parentKey}setParentKey(t){this.parentKey=t}async applyDefaultFilters(){let t=await __.P.StiListBoxHelper.fetchDefaultUserFilters(this);null!=t&&(this.userFilters=t)}getIdentityFilters(){let t=new StiDataFilterRule;return t.condition=StiDataFilterCondition.Any,t.elementKey=this.key,t.path=__.P.StiListBoxHelper.getKeyMeterExpression(this),t.toList()}addKeyMeter2(t){this.keyMeter=null!=t?StiMeterHelper.ListBox.getKey2(t):null}addKeyMeter(t){this.keyMeter=null!=t?StiMeterHelper.ListBox.getKey(t.as(__.e.StiMeter)):null}getKeyMeter(){return this.keyMeter}removeKeyMeter(){this.keyMeter=null}createNewKeyMeter(){this.keyMeter=new __.P.StiKeyListBoxMeter}addNameMeter2(t){this.nameMeter=null!=t?StiMeterHelper.ListBox.getName2(t):null}addNameMeter(t){this.nameMeter=null!=t?StiMeterHelper.ListBox.getName(t.as(__.e.StiMeter)):null}getNameMeter(){return this.nameMeter}removeNameMeter(){this.nameMeter=null}createNewNameMeter(){this.nameMeter=new StiNameListBoxMeter}createNextMeter(t){null!=this.keyMeter&&null==this.nameMeter?this.nameMeter=StiMeterHelper.ListBox.getName2(t):this.keyMeter=StiMeterHelper.ListBox.getKey2(t)}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter)),r=(null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.keyMeter=null==this.keyMeter?new __.P.StiKeyListBoxMeter:this.keyMeter,this.keyMeter.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiValueMeter)));null!=(r=null==r?e.firstOrDefault(t=>t.is(IStiDimensionMeter)):r)&&(this.nameMeter=null==this.nameMeter?new StiNameListBoxMeter:this.nameMeter,this.nameMeter.loadFromJsonObject(r.saveToJsonObject(StiJsonSaveMode.Report)))}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.ListBoxElement}get localizedName(){return StiLocalization.get("Components","StiListBox")}constructor(t=Rectangle.empty){super(t),this.group="",this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.showAllValue=!1,this.showBlanks=!1,this.selectionMode=StiItemSelectionMode.One,this.orientation=StiItemOrientation.Vertical,this.selectionType=StiListBoxSelectionType.ListBox,this.title=new __.e.StiTitle,this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.userFilters=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.font=new Font("Arial",8),this.foreColor=Color.transparent,this.textFormat=new StiGeneralFormatService,this.defaultClientRectangle=new Rectangle(0,0,200,300),this.helpUrl="user-manual/dashboards_data_filtering_list_box.htm",this.title.text=this.localizedName,this.title.visible=!1,this.dashboardInteraction=new StiFilterDashboardInteraction}},__.P.StiListBoxHelper=class{static fetchItems(r,t,l){if(null==t||t==StiDataTable.nullTable||0==t.rows.length)return null;let n=this.getNameMeterIndex(t),s=this.getKeyMeterIndex(t);if(-1==n&&1==s)return null;-1==s&&(s=n),-1==n&&(n=s);let o=new List;for(let i of t.rows){let t=i[s];if(null==t)continue;let e=i[n];!l&&this.isBlank(e)||o.add(new __.P.StiListBoxItem(this.format(r,i[n]),i[s]))}return o}static isBlank(t){return null==t||t==DBNull.value||"string"==typeof t&&StiString.isNullOrEmpty(t)}static async fetchDefaultUserFilters(e){let t=!StiString.isNullOrEmpty(e.initialValue);if(e.showAllValue&&!t)return null;if(e.selectionMode==StiItemSelectionMode.Multi&&!t)return null;let i=this.getKeyMeterExpression(e);if(null==i)return null;let r=await StiElementDataCache.getOrCreate(e),l=this.fetchItems(e,r,e.showBlanks);if(null==l)return null;return this.fetchInitialValues(e,l).select(t=>StiDataFilterCreator.createEqualBasedOnValue(t.value,i,e)).toList()}static fetchInitialValues(t,r){if(!StiString.isNullOrEmpty(t.initialValue)){let i=this.getInitialValues(t),e=r[Stimulsoft.System.StiObject.stimulsoft]().toList().where(t=>{var e;return i.contains(null==(e=t.value)?void 0:e.toString())});if(t.selectionMode==StiItemSelectionMode.One&&e.any()){let t=new List;return t.add(e.firstOrDefault()),t}return e.toList()}let e=new List;return e.add(r[Stimulsoft.System.StiObject.stimulsoft]().toList().firstOrDefault()),e}static getInitialValues(t){if(StiString.isNullOrEmpty(t.initialValue))return new List;let e=StiReportParser.parse2(t.initialValue,t.report);return e.split(";")[Stimulsoft.System.StiObject.stimulsoft]().toList().select(t=>t.trim()).toList()}static getNameMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(__.P.StiNameListBoxMeter));return null!=e?t.meters.indexOf(e):-1}static getKeyMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(__.P.StiKeyListBoxMeter));return null!=e?t.meters.indexOf(e):-1}static getKeyMeterExpression(t){if(null!=t.keyMeter)return t.keyMeter.expression;if(null!=t.nameMeter)return t.nameMeter.expression;return null}static format(t,e){var i;if(e instanceof DateTime&&!t.textFormat.is(StiDateFormatService))return e.toShortDateString();let r=null==(i=null==t?void 0:t.report)?void 0:i.culture;if(StiExtValueConverter.isEligable(e,r))return StiExtValueConverter.convert(e,r);return t.textFormat.format(e)}},__.P.StiListBoxItem=class{toString(){return null!=this.label?this.label:this.value.toString()}constructor(t,e=t){this.label=t,this.value=e}},Stimulsoft.Report.DecimalRange),StiNumberSelectionMode=Stimulsoft.Report.Dashboard.StiNumberSelectionMode,StiNumberCondition=Stimulsoft.Report.Dashboard.StiNumberCondition,StiNumberMinMaxMode=Stimulsoft.Report.Dashboard.StiNumberMinMaxMode,StiNumberBoxHelper=(__.R.StiNumberBoxHelper=class{static getInitialValue(t){return this.isRange(t)?this.getRangeInitialValue(t):this.getSingleInitialValue(t)}static async getRangeInitialValue(t){let e=StiValueHelper.tryToNumber(StiReportParser.parse2(t.initialValue,t.report)),i=StiValueHelper.tryToNumber(StiReportParser.parse2(t.initialToValue,t.report)),r=await this.getMinMaxRange(t);return e=Math.max(e,r.from),e=Math.min(e,r.to),i=Math.max(i,r.from),i=Math.min(i,r.to),new DecimalRange(e,i)}static async getSingleInitialValue(e){let t,i=null,r=null==(t=this.getVariableSpecifiedAsValue(e))?void 0:t.as(StiVariable);if(null!=r){let t=e.report.dictionary.getVariableValueByName(r.name);r.initBy!=StiVariableInitBy.Expression||StiString.isNullOrEmpty(t)||(t=StiParser.parseTextValue(`{${t}}`,e)),Stimulsoft.System.Type.isNumericType(r.type)&&(i=StiValueHelper.tryToNullableNumber(t))}else StiString.isNullOrEmpty(e.initialValue)||(i=StiValueHelper.tryToNullableNumber(StiReportParser.parse2(e.initialValue,e.report,!0)));let l=await this.getMinMaxRange(e);return i=null!=i?(i=Math.max(StiNumber.getValueOrDefault(i),l.from),Math.min(StiNumber.getValueOrDefault(i),l.to)):l.from,StiNumber.getValueOrDefault(i)}static async fetchDefaultUserFilters(t){let e=this.getValueMeterExpression(t);return t.selectionMode==StiNumberSelectionMode.Single?this.getSingleDefaultUserFilters(t,e):this.getRangeDefaultUserFilters(t,e)}static async getSingleDefaultUserFilters(t,e){let i=await this.getSingleInitialValue(t);return new StiDataFilterRule("",e,this.getCondition(t),t.textFormat.format(i)).toList()}static async getRangeDefaultUserFilters(t,e){let i=await this.getRangeInitialValue(t);return new StiDataFilterRule("",e,StiDataFilterCondition.Between,t.textFormat.format(i.from),t.textFormat.format(i.to),!0,!1).toList()}static async getAutoRange(t){let e=this.getValueMeterExpression(t);if(!StiString.isNullOrEmpty(e)){let e=await StiElementDataCache.getOrCreate(t);if(null!=e){let t=e.rows.select(t=>t[0]).where(t=>null!=t&&Stimulsoft.System.Type.isNumericType(Stimulsoft.System.Type.getType(t))).select(t=>StiValueHelper.tryToNumber(t));if(null!=t&&t.any())return new DecimalRange(t.min(),t.max())}}return new DecimalRange(0,65535)}static getValueMeterExpression(t){var e;return null==(e=t.valueMeter)?void 0:e.expression}static getCondition(t){switch(t.condition){case StiNumberCondition.EqualTo:return StiDataFilterCondition.EqualTo;case StiNumberCondition.NotEqualTo:return StiDataFilterCondition.NotEqualTo;case StiNumberCondition.GreaterThan:return StiDataFilterCondition.GreaterThan;case StiNumberCondition.GreaterThanOrEqualTo:return StiDataFilterCondition.GreaterThanOrEqualTo;case StiNumberCondition.LessThan:return StiDataFilterCondition.LessThan;case StiNumberCondition.LessThanOrEqualTo:return StiDataFilterCondition.LessThanOrEqualTo;default:return StiDataFilterCondition.EqualTo}}static getVariableSpecifiedAsValue(t){var e;return StiVariableExpressionHelper.getVariableSpecifiedAsExpression(t,null==(e=t.getValueMeter())?void 0:e.expression)}static isRange(e){if(this.isVariableSpecifiedAsValue(e)){let t=this.getVariableSpecifiedAsValue(e).as(StiVariable);return null!=t&&Range.isNumericRangeType(t.type)}return e.selectionMode==StiNumberSelectionMode.Range}static isVariableSpecifiedAsValue(t){var e;return StiVariableExpressionHelper.isVariableSpecifiedAsExpression(t,null==(e=t.getValueMeter())?void 0:e.expression)}static async getMinMaxRange(i){if(i.minMaxMode==StiNumberMinMaxMode.Auto)return this.getAutoRange(i);{let t=0,e=(StiString.isNullOrWhiteSpace(i.min)||(t=StiValueHelper.tryToNumber(StiReportParser.parse2(i.min,i.report,!0))),65535);return StiString.isNullOrWhiteSpace(i.max)||(e=StiValueHelper.tryToNumber(StiReportParser.parse2(i.max,i.report,!0))),new DecimalRange(t,e)}}},__.R.StiNumberBoxHelper),IStiNumberBoxElement=Stimulsoft.Report.Dashboard.IStiNumberBoxElement,ImplementsIStiNumberBoxElement=Stimulsoft.Report.Dashboard.ImplementsIStiNumberBoxElement,StiOnlineMapDashboardInteraction=(StiExportToolAttribute.add("StiNumberBoxElement","Stimulsoft.Dashboard.Export.Tools.StiNumberBoxElementExportTool"),__.R.StiNumberBoxElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiNumberBoxElement,IStiSimpleShadow,IStiCornerRadius,IStiFixedHeightElement,IStiGroupElement,IStiHorAlignment,...ImplementsIStiNumberBoxElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiFixedHeightElement,...ImplementsIStiGroupElement,...ImplementsIStiHorAlignment,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiEnumMeta("Condition","",StiNumberCondition,StiNumberCondition.GreaterThanOrEqualTo),new StiEnumMeta("MinMaxMode","",StiNumberMinMaxMode,StiNumberMinMaxMode.Auto),new StiEnumMeta("SelectionMode","",StiNumberSelectionMode,StiNumberSelectionMode.Single).set(t=>{let e=Enum.parse(StiNumberSelectionMode,t.value);null!=e&&(this.selectionMode=e)}).setXml(t=>{let e=Enum.parse(StiNumberSelectionMode,t.textContent);null!=e&&(this.selectionMode=e)}),new StiStringNullOrEmptyMeta("InitialValue"),new StiStringNullOrEmptyMeta("InitialToValue"),new StiStringNullOrEmptyMeta("Min"),new StiStringNullOrEmptyMeta("Max"),new StiNumberMeta("DecimalDigits","",0),new StiEnumMeta("HorAlignment","",StiHorAlignment,StiHorAlignment.Center),new StiObjectMeta("ValueMeter").check(()=>null!=this.valueMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiValueNumberBoxMeter);null!=e&&(this.valueMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiValueNumberBoxMeter);null!=e&&(this.valueMeter=e)}),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiRemoveMeta("MinSize"),new StiRemoveMeta("MaxSize"),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly)]}clone(t){let e,i,r=super.clone(t);return r.valueMeter=null!=this.valueMeter?this.valueMeter.clone():null,r.userFilters=this.userFilters.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}getParentKey(){return null}setParentKey(t){}async applyDefaultFilters(){let t,r=null==(t=StiNumberBoxHelper.getVariableSpecifiedAsValue(this))?void 0:t.as(StiVariable);if(null==r){let t=await StiNumberBoxHelper.fetchDefaultUserFilters(this);null!=t&&(this.userFilters=t)}else if(Range.isRangeType(r.type)){let t=0,e=0,i=new Stimulsoft.Report.DecimalRange(t,e);StiVariableHelper.setVariableValue(this.report,r,i),r.initBy==StiVariableInitBy.Value&&(r.valueObject=i)}}getIdentityFilters(){let t=new StiDataFilterRule;return t.condition=StiDataFilterCondition.Any,t.elementKey=this.key,t.path=StiNumberBoxHelper.getValueMeterExpression(this),t.toList()}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}fetchAllMeters(){let t=new List;return null!=this.valueMeter&&t.add(this.valueMeter),t}getMeters(){let t=new List;return t.add(this.valueMeter),t}retrieveUsedDataNames(){return StiUsedDataHelper.getMany(this.valueMeter)}get isDefined(){return null!=this.valueMeter}addValueMeter2(t){this.valueMeter=null!=t?StiMeterHelper.NumberBox.getValue2(t):null}addValueMeter(t){this.valueMeter=null!=t?StiMeterHelper.NumberBox.getValue(t.as(__.e.StiMeter)):null}getValueMeter(){return this.valueMeter}removeValueMeter(){this.valueMeter=null}createNewValueMeter(){this.valueMeter=new StiValueNumberBoxMeter}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter));null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.valueMeter=null==this.valueMeter?new StiValueNumberBoxMeter:this.valueMeter,this.valueMeter.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report)))}get textFormat(){let t=new StiNumberFormatService;return t.decimalDigits=this.decimalDigits,t.state=Stimulsoft.Report.Components.StiTextFormatState.DecimalDigits,t}getFonts(){let t=super.getFonts();return t.push(this.font),t}get toolboxPosition(){return StiComponentToolboxPosition.NumberBoxElement}get localizedName(){return StiLocalization.get("Components","StiNumberBox")}getMinSize(){let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMinSize(t){}getMaxSize(){let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMaxSize(t){}constructor(t=Rectangle.empty){super(t),this.group="",this.isFixedHeight=!0,this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.userFilters=new List,this.dataFilters=new List,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.font=new Font("Arial",8),this.foreColor=Color.transparent,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.horAlignment=StiHorAlignment.Center,this.defaultClientRectangle=new Rectangle(0,0,200,40),this.helpUrl="user-manual/dashboards_data_filtering_number_box.htm",this.decimalDigits=0,this.condition=StiNumberCondition.GreaterThanOrEqualTo,this.selectionMode=StiNumberSelectionMode.Single,this.minMaxMode=StiNumberMinMaxMode.Auto,this.initialValue="",this.initialToValue="",this.min="",this.max=""}},__.g.StiOnlineMapDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.isDefaultLayout}constructor(t,e,i,r,l,n){super(),this.ident=StiInteractionIdent.OnlineMap,this.availableOnClick=StiAvailableInteractionOnClick.None,this.availableOnHover=StiAvailableInteractionOnHover.None,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.None,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=t&&(this.fileName=t),null!=e&&(this.headerText=e),null!=i&&(this.footerText=i),null!=r&&(this.showFullScreenButton=r),null!=l&&(this.showSaveButton=l),null!=n&&(this.showViewDataButton=n)}},__.g.StiOnlineMapDashboardInteraction),ImplementsIStiOnlineMapElement=Stimulsoft.Report.Dashboard.ImplementsIStiOnlineMapElement,IStiOnlineMapElement=Stimulsoft.Report.Dashboard.IStiOnlineMapElement,StiOnlineMapLocationType=Stimulsoft.Report.Dashboard.StiOnlineMapLocationType,StiOnlineMapCulture=Stimulsoft.Report.Dashboard.StiOnlineMapCulture,StiOnlineMapLocationColorType=Stimulsoft.Report.Dashboard.StiOnlineMapLocationColorType,StiOnlineMapValueViewMode=Stimulsoft.Report.Dashboard.StiOnlineMapValueViewMode,IStiTableCells=(StiExportToolAttribute.add("StiOnlineMapElement","Stimulsoft.Dashboard.Export.Tools.StiOnlineMapElementExportTool"),__.O.StiOnlineMapElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiOnlineMapElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiElementLayout,IStiElementInteraction,IStiGlobalizationProvider,...ImplementsIStiOnlineMapElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,...ImplementsIStiElementLayout,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.latitude=null!=this.latitude?this.latitude.clone():null,r.longitude=null!=this.longitude?this.longitude.clone():null,r.location=null!=this.location?this.location.clone():null,r.locationColorMeter=null!=this.locationColorMeter?this.locationColorMeter.clone():null,r.locationValue=null!=this.locationValue?this.locationValue.clone():null,r.locationArgument=null!=this.locationArgument?this.locationArgument.clone():null,r.transformActions=this.transformActions.select(t=>t.clone()).toList(),r.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),r.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.title=null!=this.title?this.title.clone():null,r.layout=null!=this.layout?this.layout.clone():null,r.locationType=this.locationType,r.culture=this.culture,r.locationColorType=this.locationColorType,r.locationColor=this.locationColor,r.iconColor=this.iconColor,r.icon=this.icon,r.customIcon=null!=this.customIcon?Convert.fromBase64String(Convert.toBase64String(this.customIcon)):null,r.dashboardInteraction=this.dashboardInteraction.clone(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r.onePointZoom=this.onePointZoom,r.userBingKey=this.userBingKey,r}meta(){return[...super.meta(),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiObjectMeta("Latitude").check(()=>null!=this.latitude).set(t=>this.latitude=StiMeterLoader.loadFromJson(t.value).as(__.O.StiLatitudeMapMeter)).setXml(t=>this.latitude=StiMeterLoader.loadFromXml(t).as(__.O.StiLatitudeMapMeter)),new StiObjectMeta("Longitude").check(()=>null!=this.longitude).set(t=>this.longitude=StiMeterLoader.loadFromJson(t.value).as(__.O.StiLongitudeMapMeter)).setXml(t=>this.longitude=StiMeterLoader.loadFromXml(t).as(__.O.StiLongitudeMapMeter)),new StiObjectMeta("Location").check(()=>null!=this.location).set(t=>this.location=StiMeterLoader.loadFromJson(t.value).as(__.O.StiLocationMapMeter)).setXml(t=>this.location=StiMeterLoader.loadFromXml(t).as(__.O.StiLocationMapMeter)),new StiObjectMeta("LocationColorMeter").check(()=>null!=this.locationColorMeter).set(t=>this.locationColorMeter=StiMeterLoader.loadFromJson(t.value).as(__.O.StiLocationColorMapMeter)).setXml(t=>this.locationColorMeter=StiMeterLoader.loadFromXml(t).as(__.O.StiLocationColorMapMeter)),new StiObjectMeta("LocationArgument").check(()=>null!=this.locationArgument).set(t=>this.locationArgument=StiMeterLoader.loadFromJson(t.value).as(__.O.StiLocationArgumentMapMeter)).setXml(t=>this.locationArgument=StiMeterLoader.loadFromXml(t).as(__.O.StiLocationArgumentMapMeter)),new StiObjectMeta("LocationValue").check(()=>null!=this.locationValue).set(t=>this.locationValue=StiMeterLoader.loadFromJson(t.value).as(__.O.StiLocationValueMapMeter)).setXml(t=>this.locationValue=StiMeterLoader.loadFromXml(t).as(__.O.StiLocationValueMapMeter)),new StiStringNullOrEmptyMeta("Group"),new StiEnumMeta("Culture","",StiOnlineMapCulture).set(t=>this.culture=Enum.parse(StiOnlineMapCulture,t.value,!1)).setXml(t=>this.culture=Enum.parse(StiOnlineMapCulture,t.textContent,!1)),new StiEnumMeta("LocationType","",StiOnlineMapLocationType),new StiColorMeta("LocationColor","",Color.limeGreen),new StiEnumMeta("LocationColorType","",StiOnlineMapLocationColorType),new StiEnumMeta("ValueViewMode","",StiOnlineMapValueViewMode),new StiEnumMeta("Icon","",StiFontIcons),new StiColorMeta("IconColor","",Color.limeGreen),new StiBoolMeta("CrossFiltering","",!0),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiStringMeta("CustomIcon").check(()=>null!=this.customIcon).get(()=>Convert.toBase64String(this.customIcon)).set(t=>this.customIcon=Convert.fromBase64String(t.value.toString())).setXml(t=>this.customIcon=Convert.fromBase64String(t.textContent)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiOnlineMapDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiOnlineMapDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiOnlineMapDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiNumberMeta("OnePointZoom","",1),new StiStringMeta("UserBingKey","")]}fetchAllMeters(){let t=new List;return null!=this.latitude&&t.add(this.latitude),null!=this.longitude&&t.add(this.longitude),null!=this.location&&t.add(this.location),null!=this.locationColorMeter&&t.add(this.locationColorMeter),null!=this.locationValue&&t.add(this.locationValue),null!=this.locationArgument&&t.add(this.locationArgument),t}getMeters(){let t=new List;return this.isDefined&&(null!=this.latitude&&t.add(this.latitude),null!=this.longitude&&t.add(this.longitude),null!=this.location&&t.add(this.location),null!=this.locationColorMeter&&t.add(this.locationColorMeter),null!=this.locationValue&&t.add(this.locationValue),null!=this.locationArgument)&&t.add(this.locationArgument),t}retrieveUsedDataNames(){let t=new List;return t.addRange(StiUsedDataHelper.getMany(this.latitude)),t.addRange(StiUsedDataHelper.getMany(this.longitude)),t.addRange(StiUsedDataHelper.getMany(this.location)),t.addRange(StiUsedDataHelper.getMany(this.locationColorMeter)),t.addRange(StiUsedDataHelper.getMany(this.locationValue)),t.addRange(StiUsedDataHelper.getMany(this.locationArgument)),t.distinct().toList()}get isDefined(){return null!=this.latitude||null!=this.longitude||null!=Location||null!=this.locationValue||null!=this.locationColorMeter||null!=this.locationArgument}createNextMeter(t){this.location=StiMeterHelper.OnlineMap.getLocation2(t)}addLatitudeMeter2(t){this.latitude=null!=t?StiMeterHelper.OnlineMap.getLatitude2(t):null}addLatitudeMeter(t){this.latitude=null!=t?StiMeterHelper.OnlineMap.getLatitude(t.as(__.e.StiMeter)):null}getLatitudeMeter(){return this.latitude}removeLatitudeMeter(){this.latitude=null}createNewLatitudeMeter(){this.latitude=new __.O.StiLatitudeMapMeter}addLongitudeMeter2(t){this.longitude=null!=t?StiMeterHelper.OnlineMap.getLongitude2(t):null}addLongitudeMeter(t){this.longitude=null!=t?StiMeterHelper.OnlineMap.getLongitude(t.as(__.e.StiMeter)):null}getLongitudeMeter(){return this.longitude}removeLongitudeMeter(){this.longitude=null}createNewLongitudeMeter(){this.longitude=new __.O.StiLongitudeMapMeter}addLocationMeter2(t){this.location=null!=t?StiMeterHelper.OnlineMap.getLocation2(t):null}addLocationMeter(t){this.location=null!=t?StiMeterHelper.OnlineMap.getLocation(t):null}getLocationMeter(){return this.location}removeLocationMeter(){this.location=null}createNewLocationMeter(){this.location=new __.O.StiLocationMapMeter}addLocationColorMeter2(t){this.locationColorMeter=null!=t?StiMeterHelper.OnlineMap.getLocationColor2(t):null}addLocationColorMeter(t){this.locationColorMeter=null!=t?StiMeterHelper.OnlineMap.getLocationColor(t.as(__.e.StiMeter)):null}getLocationColorMeter(){return this.locationColorMeter}removeLocationColorMeter(){this.locationColor=null}createNewLocationColorMeter(){this.locationColorMeter=new __.O.StiLocationColorMapMeter}addLocationValueMeter2(t){this.locationValue=null!=t?StiMeterHelper.OnlineMap.getLocationValue2(t):null}addLocationValueMeter(t){this.locationValue=null!=t?StiMeterHelper.OnlineMap.getLocationValue(t.as(__.e.StiMeter)):null}getLocationValueMeter(){return this.locationValue}removeLocationValueMeter(){this.locationValue=null}createNewLocationValueMeter(){this.locationValue=new __.O.StiLocationValueMapMeter}addLocationArgumentMeter(t){this.locationArgument=null!=t?StiMeterHelper.OnlineMap.getLocationArgument2(t):null}addLocationArgumentMeter2(t){this.locationArgument=null!=t?StiMeterHelper.OnlineMap.getLocationArgument(t):null}getLocationArgumentMeter(){return this.locationArgument}removeLocationArgumentMeter(){this.locationArgument=null}createNewLocationArgumentMeter(){this.locationArgument=new __.O.StiLocationArgumentMapMeter}convertFrom(t){let e=t.as(__.L.StiRegionMapElement);null==e||null==e.keyMeter||e.keyMeter.isDefault()||(this.location=new __.O.StiLocationMapMeter,this.location.label=e.keyMeter.label,this.location.expression=e.keyMeter.expression),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiOnlineMapDashboardInteraction)}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.OnlineMapElement}get localizedName(){return StiLocalization.get("Components","StiOnlineMap")}get onePointZoom(){return this._onePointZoom}set onePointZoom(t){this._onePointZoom=Math.max(Math.min(t,20),1)}constructor(t=Rectangle.empty){super(t),this.group="",this.title=new __.e.StiTitle,this.layout=new StiElementLayout,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.helpUrl="user-manual/dashboards_maps_online_map.htm",this._onePointZoom=1,this.userBingKey="",this.locationType=StiOnlineMapLocationType.Auto,this.culture=StiOnlineMapCulture.en_US,this.locationColorType=StiOnlineMapLocationColorType.Single,this.valueViewMode=StiOnlineMapValueViewMode.Bubble,this.locationColor=Color.limeGreen,this.icon=StiFontIcons.MapMarker,this.iconColor=Color.maroon,this.crossFiltering=!0,this.title.text=this.localizedName,this.dashboardInteraction=new StiOnlineMapDashboardInteraction}},Stimulsoft.Report.Dashboard.IStiTableCells);{class StiTableCells{implements(){let t=[IStiTableCells,ICloneable,IStiJsonReportObject,IStiGetFonts];return(this.implements=()=>t)()}meta(){return[new StiObjectMeta("Columns").check(()=>null!=this.columns&&!this.columns.isDefault()).get(()=>this.columns.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.columns=__.K.StiTableSection.createFromJsonObject(t.value)).setXml(t=>this.columns=__.K.StiTableSection.createFromXml(t)),new StiObjectMeta("Data").check(()=>null!=this.data&&!this.data.isDefault()).get(()=>this.data.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.data=__.K.StiTableSection.createFromJsonObject(t.value)).setXml(t=>this.data=__.K.StiTableSection.createFromXml(t)),new StiObjectMeta("Totals").check(()=>null!=this.totals&&!this.totals.isDefault()).get(()=>this.totals.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.totals=__.K.StiTableSection.createFromJsonObject(t.value)).setXml(t=>this.totals=__.K.StiTableSection.createFromXml(t))]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new StiTableCells;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new StiTableCells;return e.loadFromXml(t),e}clone(){let t,e,i,r=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return r.columns=null==(t=this.columns)?void 0:t.clone(),r.data=null==(e=this.data)?void 0:e.clone(),r.totals=null==(i=this.totals)?void 0:i.clone(),r}isDefault(){return!this.shouldSerializeColumns()&&!this.shouldSerializeData()&&!this.shouldSerializeTotals()}getFonts(){let t=[];return t.push(this.columns.font),t.push(this.data.font),t.push(this.totals.font),t}getColumns(){return this.columns}getData(){return this.data}getTotals(){return this.totals}get columns(){return this._columns}set columns(t){this._columns!=t&&null!=(this._columns=t)&&(t.element=this.element)}shouldSerializeColumns(){return null==this.columns||!this.columns.isDefault()}get data(){return this._data}set data(t){this._data!=t&&null!=(this._data=t)&&(t.element=this.element)}shouldSerializeData(){return null==this.data||!this.data.isDefault()}get totals(){return this._totals}set totals(t){this._totals!=t&&null!=(this._totals=t)&&(t.element=this.element)}shouldSerializeTotals(){return null==this.totals||!this.totals.isDefault()}get element(){return this.getElement()}set element(t){this.setElement(t)}getElement(){return this._element}setElement(t){this._element!=t&&(this._element=t,this.columns.element=t,this.totals.element=t,this.data.element=t)}constructor(){this.columns=new __.K.StiTableSection,this.data=new __.K.StiTableSection,this.totals=new __.K.StiTableSection}}__.K.StiTableCells=StiTableCells}let IStiPivotTableCells=Stimulsoft.Report.Dashboard.IStiPivotTableCells;{class StiPivotTableCells extends __.K.StiTableCells{implements(){let t=[IStiPivotTableCells,ICloneable,IStiJsonReportObject,IStiGetFonts];return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiObjectMeta("Rows").check(()=>null!=this.rows&&!this.rows.isDefault()).get(()=>this.rows.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.rows=__.K.StiTableSection.createFromJsonObject(t.value)).setXml(t=>this.rows=__.K.StiTableSection.createFromXml(t))]}saveToJsonObject(t){let e=super.saveToJsonObject(t);return StiMetaHelper.saveToJsonObject(t,this,e)}loadFromJsonObject(t){super.loadFromJsonObject(t),StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){super.loadFromXml(t),StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new StiPivotTableCells;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new StiPivotTableCells;return e.loadFromXml(t),e}clone(){let t,e=super.clone();return e.rows=null==(t=this.rows)?void 0:t.clone(),e}isDefault(){return super.isDefault()&&!this.shouldSerializeRows()}getFonts(){let t=super.getFonts();return t.push(this.rows.font),t}getRows(){return this.rows}get rows(){return this._rows}set rows(t){this._rows!=t&&null!=(this._rows=t)&&(t.element=this.element)}shouldSerializeRows(){return null==this.rows||!this.rows.isDefault()}setElement(t){super.getElement()!=t&&(super.setElement(t),this.rows.element=t)}constructor(){super(),this.rows=new __.K.StiTableSection}}__.K.StiPivotTableCells=StiPivotTableCells}__.N.StiPivotTableColumnVisibilityHelper=class{static getVisible(t,e){if(t.visibility==StiTableColumnVisibility.True)return!0;if(t.visibility==StiTableColumnVisibility.False)return!1;if(StiString.isNullOrWhiteSpace(t.visibilityExpression))return!1;let i=StiReportParser.parse2(t.visibilityExpression,e);return StiValueHelper.tryToBool(i)}};let Hashtable=Stimulsoft.System.Collections.Hashtable;{class StiPivotTableElementSelection{static getSelected(t){let e=this.hash.get(t.key);if(null==e)return null;return e.keys.toList()}static getSelectedObjects(t){let e=this.getSelected(t);return null!=e?e.toList():null}static isSelected(t,e){let i=this.hash.get(t.key);return null==i&&(i=new Hashtable,this.hash.set(t.key,i)),null!=i.get(e)}static select(t,e){let i=this.hash.get(t.key);null==i&&(i=new Hashtable,this.hash.set(t.key,i)),i.set(e,e)}static resetSelection(t){this.hash.containsKey(t.key)&&this.hash.remove(t.key)}}StiPivotTableElementSelection.hash=new Hashtable,__.h.StiPivotTableElementSelection=StiPivotTableElementSelection}let IStiInteractionPivotLayout=Stimulsoft.Report.Dashboard.IStiInteractionPivotLayout,StiPivotTableCells=(__.g.StiPivotTableDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiJsonReportObject,IStiInteractionLayout,IStiInteractionPivotLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiBoolMeta("ShowExpandAllButton","",!0),new StiBoolMeta("ShowCollapseAllButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&this.showExpandAllButton&&this.showCollapseAllButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.isDefaultLayout}constructor(t,e,i,r,l,n,s,o){super(),this.ident=StiInteractionIdent.PivotTable,this.availableOnClick=StiAvailableInteractionOnClick.None,this.availableOnHover=StiAvailableInteractionOnHover.None,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.None,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.showExpandAllButton=!0,this.showCollapseAllButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=t&&(this.fileName=t),null!=e&&(this.headerText=e),null!=i&&(this.footerText=i),null!=r&&(this.showFullScreenButton=r),null!=l&&(this.showSaveButton=l),null!=n&&(this.showViewDataButton=n),null!=s&&(this.showExpandAllButton=s),null!=o&&(this.showCollapseAllButton=o)}},__.K.StiPivotTableCells),StiSummaryDirection=Stimulsoft.Report.CrossTab.Core.StiSummaryDirection,StiPivotTableDashboardInteraction=__.g.StiPivotTableDashboardInteraction,ImplementsIStiPivotTableElement=Stimulsoft.Report.Dashboard.ImplementsIStiPivotTableElement,StiPivotTableElementSelection=__.h.StiPivotTableElementSelection,IStiPivotTableElement=Stimulsoft.Report.Dashboard.IStiPivotTableElement,StiParserParameters=Stimulsoft.Report.Engine.StiParserParameters,StiText=Stimulsoft.Report.Components.StiText,StiAsmCommandType=Stimulsoft.Report.Engine.StiAsmCommandType,StiPivotTableConditionType=(StiExportToolAttribute.add("StiPivotTableElement","Stimulsoft.Dashboard.Export.Tools.StiPivotTableElementExportTool"),__.N.StiPivotTableElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiPivotTableElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiElementLayout,IStiElementInteraction,IStiGlobalizationProvider,...ImplementsIStiPivotTableElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,...ImplementsIStiElementLayout,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t),l={};return r.columns=this.columns.select(t=>this.cloneMeter(t,l)).toList(),r.rows=this.rows.select(t=>this.cloneMeter(t,l)).toList(),r.summaries=this.summaries.select(t=>this.cloneMeter(t,l)).toList(),r.transformActions=this.transformActions.select(t=>t.clone()).toList(),r.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),r.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.cells=this.cells.clone(),r.title=null!=this.title?this.title.clone():null,r.layout=null!=this.layout?this.layout.clone():null,r.dashboardInteraction=this.dashboardInteraction.clone(),r.pivotTableConditions=this.pivotTableConditions.select(t=>t.clone()).toList(),r.totalLabel=this.totalLabel,r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r.pivotTableConditions.forEach(t=>{t.destinationValueMeter=this.findKey(t.destinationValueMeter,l),t.keyValueMeter=this.findKey(t.keyValueMeter,l),t.measureField=this.findKey(t.measureField,l)}),r}meta(){return[...super.meta(),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("Cells").check(()=>null!=this.cells&&!this.cells.isDefault()).get(()=>this.cells.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.cells=StiPivotTableCells.createFromJsonObject(t.value)).setXml(t=>this.cells=StiPivotTableCells.createFromXml(t)),new StiObjectMeta("Columns").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.columns,t)).set(t=>this.columns.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value).as(StiPivotColumn)).where(t=>null!=t))).setXml(t=>this.columns.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("Rows").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.rows,t)).set(t=>this.rows.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value).as(__.N.StiPivotRow)).where(t=>null!=t))).setXml(t=>this.rows.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("Summaries").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.summaries,t)).set(t=>this.summaries.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value).as(StiPivotSummary)).where(t=>null!=t))).setXml(t=>this.summaries.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiBoolMeta("CrossFiltering","",!0),new StiColorMeta("ForeColor","",Color.transparent),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("TotalLabel"),new StiObjectMeta("PivotTableConditions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.pivotTableConditions,t)).set(t=>this.pivotTableConditions.addRange(t.value.properties().select(t=>__.N.StiPivotTableElementCondition.loadFromJson(t.value).as(__.N.StiPivotTableElementCondition)).where(t=>null!=t))).setXml(t=>this.pivotTableConditions.addRange(t.childNodes.map(t=>__.N.StiPivotTableElementCondition.loadFromXml(t)))),new StiEnumMeta("SummaryDirection","",StiSummaryDirection,StiSummaryDirection.UpToDown),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiPivotTableDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiPivotTableDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiPivotTableDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}retrieveUsedDataNames(){let t=StiUsedDataHelper.getMany2(this.columns);return t.addRange(StiUsedDataHelper.getMany2(this.rows)),t.addRange(StiUsedDataHelper.getMany2(this.summaries)),t}fetchAllMeters(){let t=this.columns.cast();return t.addRange(this.rows.cast()),t.addRange(this.summaries.cast()),t}getMeters(){let t=this.columns.cast();return t.addRange(this.rows.cast()),t.addRange(this.summaries.cast()),t}getUsedMeters(){let i=this.getMeters();try{this.summaries.forEach(t=>{let e=this.getPushCommands(t.expression);1<e.length&&e.forEach(t=>{let e=new StiPivotSummary(StiKeyHelper.generateKey(),t,"label");i.add(e)})})}catch(t){}return i}get isDefined(){return null!=this.columns&&0<this.columns.length||null!=this.rows&&0<this.rows.length||null!=this.summaries&&0<this.summaries.length}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}createNextMeter(t){0==this.columns.length?this.columns.add(StiMeterHelper.Pivot.getColumn2(t)):0==this.rows.length?this.rows.add(StiMeterHelper.Pivot.getRow2(t)):0==this.summaries.length?this.summaries.add(StiMeterHelper.Pivot.getSummary2(t)):this.columns.add(StiMeterHelper.Pivot.getColumn2(t))}createNewColumn(){this.columns.add(new StiPivotColumn)}getColumn2(t){return null!=t?StiMeterHelper.Pivot.getColumn2(t):null}getColumn(t){return null!=t?StiMeterHelper.Pivot.getColumn(t.as(__.e.StiMeter)):null}getColumnByIndex(t){return t<this.columns.length?this.columns[t]:null}insertColumn(t,e){let i=e.as(StiPivotColumn);null!=i&&(0<=t&&t<this.columns.length?this.columns.insert(t,i):this.columns.add(i))}removeColumn(t){t<this.columns.length&&this.columns.removeAt(t)}removeAllColumns(){this.columns.clear()}createNewRow(){this.rows.add(new __.N.StiPivotRow)}getRow2(t){return null!=t?StiMeterHelper.Pivot.getRow2(t):null}getRow(t){return null!=t?StiMeterHelper.Pivot.getRow(t.as(__.e.StiMeter)):null}getRowByIndex(t){return t<this.rows.length?this.rows[t]:null}insertRow(t,e){let i=e.as(__.N.StiPivotRow);null!=i&&(0<=t&&t<this.rows.length?this.rows.insert(t,i):this.rows.add(i))}removeRow(t){t<this.rows.length&&this.rows.removeAt(t)}removeAllRows(){this.rows.clear()}createNewSummary(){let t=new StiPivotSummary;t.expression="Sum()",this.summaries.add(t)}getSummary2(t){return null!=t?StiMeterHelper.Pivot.getSummary2(t):null}getSummary(t){return null!=t?StiMeterHelper.Pivot.getSummary(t.as(__.e.StiMeter)):null}getSummaryByIndex(t){return t<this.summaries.length?this.summaries[t]:null}insertSummary(t,e){let i=e.as(StiPivotSummary);null!=i&&(0<=t&&t<this.summaries.length?this.summaries.insert(t,i):this.summaries.add(i))}removeSummary(t){t<this.summaries.length&&this.summaries.removeAt(t)}removeAllSummaries(){this.summaries.clear()}addPivotTableCondition(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p,C,b,w){this.pivotTableConditions.add(new __.N.StiPivotTableElementCondition(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p,C,b,w))}getAllMeters(){let t=new List;return t.addRange(this.columns),t.addRange(this.rows),t.addRange(this.summaries),t}fetchPivotTableConditions(){let t=new List;return null!=this.pivotTableConditions&&t.addRange(this.pivotTableConditions),t}clearPivotTableConditions(){this.pivotTableConditions.clear()}getFonts(){let t=super.getFonts();return t.push(this.title.font),t=t.concat(this.cells.getFonts())}convertFrom(t){let e=t.fetchAllMeters();if(this.columns.clear(),this.rows.clear(),this.summaries.clear(),null==e)return;let i=0;e.cast().forEach(e=>{if(e.is2(IStiDimensionMeter))if(0==(1&i)){let t=new StiPivotColumn;t.loadFromJsonObject(e.saveToJsonObject(StiJsonSaveMode.Report)),this.columns.add(t)}else{let t=new __.N.StiPivotRow;t.loadFromJsonObject(e.saveToJsonObject(StiJsonSaveMode.Report)),this.rows.add(t)}else if(e.is2(IStiMeasureMeter)){let t=new StiPivotSummary;t.loadFromJsonObject(e.saveToJsonObject(StiJsonSaveMode.Report)),this.summaries.add(t)}},this),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiPivotTableDashboardInteraction)}setString(i,r){switch(i){case"Title.Text":this.title.text=r;break;case"TotalLabel":this.totalLabel=r;break}let l=0;for(let e of this.columns){let t=`Column${l++}.Label`;i==t&&(e.label=r)}l=0;for(let e of this.rows){let t=`Row${l++}.Label`;i==t&&(e.label=r)}}cloneMeter(t,e){let i=t.clone();return e[t.key]=i.key,i}findKey(t,e){return!StiString.isNullOrEmpty(t)&&t in e?e[t]:t}getString(i){switch(i){case"Title.Text":return this.title.text;case"TotalLabel":return this.totalLabel}let r=0;for(let e of this.columns){let t=`Column${r++}.Label`;if(i==t)return e.label}r=0;for(let e of this.rows){let t=`Row${r++}.Label`;if(i==t)return e.label}throw new Error(`Property with name `+i)}getAllStrings(){let e=["Title.Text","TotalLabel"],i=0;return this.columns.forEach(t=>e.push(`Column${i++}.Label`)),i=0,this.rows.forEach(t=>e.push(`Row${i++}.Label`)),e}getCells(){return this.cells}get toolboxPosition(){return StiComponentToolboxPosition.PivotTableElement}get localizedName(){return Loc.get("Components","StiPivotTable")}get foreColor(){return this.cells.data.foreColor}set foreColor(t){this.cells.data.foreColor=t}get cells(){return this._cells}set cells(t){null!=t&&(t.element=this),this._cells=t}shouldSerializeCells(){return null==this.cells||!this.cells.isDefault()}getColumnFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.columns.font)}getRowFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.rows.font)}getDataFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.data.font)}getTotalFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.totals.font)}getFormatObjects(){return StiPivotTableElementSelection.getSelectedObjects(this)}getNestedPages(){let t,r,l=new List,e=new List;e.add(this),e.addRange(this.columns),e.addRange(this.rows),e.addRange(this.summaries);for(let i of e)if(null!=(null==i?void 0:i.dashboardInteraction)&&i.dashboardInteraction.onClick!=StiInteractionOnClick.None&&StiKeyHelper.isKey(null==(t=i.dashboardInteraction)?void 0:t.drillDownPageKey)){let e=null==(r=i.dashboardInteraction)?void 0:r.drillDownPageKey,t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);null!=t&&l.add(t)}return 0==l.length?null:l.distinct()}getPushCommands(t){let e=new StiPage,i=(e.report=this.report,new StiParserParameters),r=(i.returnAsmList=!0,new StiText),l=(r.report=this.report,r.page=e,new List),n=[];try{n=StiParser.parseTextValue2(`{${t}}`,r,null,i)}catch(t){}let s=0;while(s<n.length){try{n[s].type==StiAsmCommandType.PushValue&&s+1<n.length&&n[s+1].type==StiAsmCommandType.PushFunction&&l.add(`${Enum.getName(Stimulsoft.Report.Engine.StiFunctionType,n[s+1].parameter1)}(${n[s].parameter1[0].parameter1})`)}catch(t){}s++}return l}constructor(t=Rectangle.empty){super(t),this.maxIconSize=50,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.group="",this.title=new __.e.StiTitle,this.layout=new StiElementLayout,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.crossFiltering=!0,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.summaryDirection=StiSummaryDirection.UpToDown,this.helpUrl="user-manual/dashboards_pivot_table.htm",this.columns=new List,this.rows=new List,this.summaries=new List,this.totalLabel="",this.pivotTableConditions=new List,this.cells=new StiPivotTableCells,this.title.text=this.localizedName,this.dashboardInteraction=new StiPivotTableDashboardInteraction}},Stimulsoft.Report.Dashboard.StiPivotTableConditionType),StiDataTopNMode=Stimulsoft.Data.Engine.StiDataTopNMode,StiConditionPermissions=Stimulsoft.Report.Components.StiConditionPermissions,StiScale=Stimulsoft.Base.StiScale,IStiPivotTableElementCondition=Stimulsoft.Report.Dashboard.IStiPivotTableElementCondition;{let f=__.a.StiFilterDataType,y=__.a.StiFilterCondition;class eba{implements(){let t=[IStiPivotTableElementCondition,IStiJsonReportObject];return(this.implements=()=>t)()}is(t){if(t instanceof Stimulsoft.System.Interface)return-1!=this.implements().indexOf(t);if("function"==typeof t)return this instanceof t;if(null==t)throw new Error("Type for comparison is 'undefined'");return!1}is2(t){return this.is(t)}as(t){if(this.is(t))return this;return null}clone(){let t=this.saveToJsonObject(null),e=new eba;return e.loadFromJsonObject(t),e}meta(){return[new StiStringMeta("Ident").get(()=>"StiPivotTableElementCondition"),new StiStringNullOrEmptyMeta("KeyValueMeter"),new StiStringNullOrEmptyMeta("DestinationValueMeter"),new StiEnumMeta("Condition","",y),new StiEnumMeta("DataType","",f),new StiStringNullOrEmptyMeta("Value"),new StiColorMeta("TextColor","",Color.black),new StiColorMeta("BackColor","",Color.transparent),new StiFontMeta("Font"),new StiEnumMeta("Permissions","",StiConditionPermissions),new StiEnumMeta("IconAlignment","",StiIconAlignment),new StiColorMeta("IconColor","",Color.maroon),new StiEnumMeta("Icon","",StiFontIcons),new StiStringMeta("CustomIcon").check(()=>null!=this.customIcon).get(()=>Convert.toBase64String(this.customIcon)).set(t=>this.customIcon=Convert.fromBase64String(t.value.toString())).setXml(t=>this.customIcon=Convert.fromBase64String(t.textContent)),new StiEnumMeta("ConditionType","",StiPivotTableConditionType),new StiEnumMeta("TopNMode","",StiDataTopNMode),new StiNumberMeta("TopNCount"),new StiStringNullOrEmptyMeta("MeasureField"),new StiBoolMeta("TopNConditionCell"),new StiBoolMeta("TopNConditionHeader"),new StiBoolMeta("TopNConditionTotal","",!0)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static loadFromJson(t){let e=new eba;return e.loadFromJsonObject(t),e}static loadFromXml(t){let e=new eba;return e.loadFromXml(t),e}get iconFontSize(){return 18*StiScale.factor}get customIcon(){return this._customIcon}set customIcon(t){this._customIcon=t,this._iconSize=null}get destinationValueMeter(){return StiString.isNullOrEmpty(this._destinationValueMeter)?this.keyValueMeter:this._destinationValueMeter}set destinationValueMeter(t){this._destinationValueMeter=t}get iconSize(){try{if(null==this._iconSize&&null!=this.customIcon){let t=new Image;t.bytes=this.customIcon,this._iconSize=new Size(t.width,t.height)}else null==this._iconSize&&(this._iconSize=new Size(this.iconFontSize,this.iconFontSize))}catch(t){}return this._iconSize}async getIcon(){if(null!=this.customIcon)return this.customIcon;{let t=await StiFontIconsHelper.convertFontIconToImageAsync(this.icon,this.iconColor,this.iconFontSize,this.iconFontSize,"0.9em");return t.bytes}}getUniqueCode(){return 0}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p,C,b,w){this.textColor=Color.black,this.backColor=Color.transparent,this.font=new Font("Arial",8),this.permissions=StiConditionPermissions.All,this.icon=StiFontIcons.Adjust,this.iconAlignment=StiIconAlignment.None,this.condition=y.EqualTo,this.dataType=f.Numeric,this._destinationValueMeter="",this.iconColor=Color.maroon,this.conditionType=StiPivotTableConditionType.Condition,this.topNMode=StiDataTopNMode.Top,this.topNCount=5,this.topNConditionCell=!1,this.topNConditionHeader=!1,this.topNConditionTotal=!0,null!=t&&(this.keyValueMeter=t),null!=e&&(this.destinationValueMeter=e),null!=i&&(this.dataType=i),null!=r&&(this.condition=r),null!=l&&(this.value=l),null!=n&&(this.font=n),null!=s&&(this.textColor=s),null!=o&&(this.backColor=o),null!=a&&(this.permissions=a),null!=u&&(this.icon=u),null!=S&&(this.iconAlignment=S),null!=m&&(this.customIcon=m),null!=h&&(this.iconColor=h),null!=c&&(this.conditionType=c),null!=d&&(this.topNMode=d),null!=g&&(this.topNCount=g),null!=p&&(this.measureField=p),null!=C&&(this.topNConditionCell=C),null!=b&&(this.topNConditionHeader=b),null!=w&&(this.topNConditionTotal=w)}}__.N.StiPivotTableElementCondition=eba}__.ac.StiPivotColumnConverter=class extends StiMeterConverter{},__.ac.StiPivotRowConverter=class extends StiMeterConverter{},__.ac.StiPivotSummaryConverter=class extends StiMeterConverter{},__.g.StiProgressDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiAllowUserDrillDownDashboardInteraction,IStiAllowUserSortingDashboardInteraction,IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("AllowUserDrillDown"),new StiBoolMeta("AllowUserSorting","",!0),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&!this.allowUserDrillDown&&null==this.footerText}isDefault(){return this.isDefaultLayout&&this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.None&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)&&!this.allowUserDrillDown&&this.allowUserSorting}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d){super(),this.ident=StiInteractionIdent.Progress,this.availableOnClick=StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.AllowDrillDown|StiAvailableInteractionOnDataManipulation.AllowSorting,this.allowUserDrillDown=!1,this.allowUserSorting=!0,this.onClick=StiInteractionOnClick.None,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=t&&(this.onHover=t),null!=e&&(this.onClick=e),null!=i&&(this.hyperlinkDestination=i),null!=r&&(this.toolTip=r),null!=l&&(this.hyperlink=l),null!=n&&(this.drillDownPageKey=n),null!=s&&(this.drillDownParameters=s),null!=o&&(this.allowUserDrillDown=o),null!=u&&(this.fileName=u),null!=S&&(this.headerText=S),null!=m&&(this.footerText=m),null!=h&&(this.showFullScreenButton=h),null!=c&&(this.showSaveButton=c),null!=a&&(this.allowUserSorting=a),null!=d&&(this.showViewDataButton=d)}};let StiProgressDashboardInteraction=__.g.StiProgressDashboardInteraction,ImplementsIStiProgressElement=Stimulsoft.Report.Dashboard.ImplementsIStiProgressElement,StiProgressElementMode=Stimulsoft.Report.Dashboard.StiProgressElementMode,IStiProgressElement=Stimulsoft.Report.Dashboard.IStiProgressElement,IStiProgressElementCondition=(__.M.StiProgressElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiTextFormat,IStiSimpleShadow,IStiCornerRadius,IStiProgressElement,IStiTitleElement,IStiFont,IStiForeColor,IStiElementLayout,IStiElementInteraction,IStiGlobalizationProvider,IStiSeriesColors,IStiAllowSortByVariation,IStiShowBlanks,...ImplementsIStiTextFormat,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiProgressElement,...ImplementsIStiTitleElement,...ImplementsIStiFont,...ImplementsIStiForeColor,...ImplementsIStiElementLayout,...ImplementsIStiSeriesColors,...ImplementsIStiAllowSortByVariation,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.value=null!=this.value?this.value.clone():null,r.target=null!=this.target?this.target.clone():null,r.series=null!=this.series?this.series.clone():null,r.userSorts=this.userSorts.select(t=>t.clone()).toList(),r.transformActions=this.transformActions.select(t=>t.clone()),r.transformFilters=this.transformFilters.select(t=>t.clone()),r.transformSorts=this.transformSorts.select(t=>t.clone()),r.dataFilters=this.dataFilters.select(t=>t.clone()),r.topN=this.topN.clone(),r.textFormat=this.textFormat.clone(),r.title=null!=this.title?this.title.clone():null,r.layout=null!=this.layout?this.layout.clone():null,r.seriesColors=null!=this.seriesColors?this.seriesColors.slice():null,r.progressConditions=this.progressConditions.select(t=>t.clone()).toList(),r.dashboardInteraction=this.dashboardInteraction.clone(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiObjectMeta("UserSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userSorts,t)).set(t=>this.userSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.userSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TopN").check(()=>null!=this.topN).set(t=>this.topN=StiDataTopN.createFromJsonObject(t.value)).setXml(t=>this.topN=StiDataTopN.createFromXml(t)),new StiObjectMeta("TextFormat").check(()=>null!=this.textFormat).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiObjectMeta("Value").check(()=>null!=this.value).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.M.StiValueProgressMeter);null!=e&&(this.value=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.M.StiValueProgressMeter);null!=e&&(this.value=e)}),new StiObjectMeta("Target").check(()=>null!=this.target).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiTargetProgressMeter);null!=e&&(this.target=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiTargetProgressMeter);null!=e&&(this.target=e)}),new StiObjectMeta("Series").check(()=>null!=this.series).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.M.StiSeriesProgressMeter);null!=e&&(this.series=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.M.StiSeriesProgressMeter);null!=e&&(this.series=e)}),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiEnumMeta("DataMode","",StiDataMode,StiDataMode.UsingDataFields),new StiStringNullOrEmptyMeta("ManuallyEnteredData"),new StiObjectMeta("SeriesColors").get(t=>StiJsonReportObjectHelper.Serialize.colorArray(this.seriesColors)).set(t=>this.seriesColors=StiJsonReportObjectHelper.Deserialize.colorArray(t)).setXml(t=>this.seriesColors=StiReportObjectStringConverter.convertStringToColorArray(t.textContent)),new StiEnumMeta("Mode","",StiProgressElementMode,StiProgressElementMode.Circle),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("Group"),new StiBoolMeta("ColorEach","",!0),new StiObjectMeta("ProgressConditions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.progressConditions,t)).set(t=>this.progressConditions.addRange(t.value.properties().select(t=>__.M.StiProgressElementCondition.createFromJson(t.value)))).setXml(t=>this.progressConditions.addRange(t.childNodes.map(t=>__.M.StiProgressElementCondition.createFromXml(t)))),new StiBoolMeta("CrossFiltering","",!0),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiProgressDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiProgressDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiProgressDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiBoolMeta("ShowBlanks")]}addValue2(t){this.value=null!=t?StiMeterHelper.Progress.getValue2(t):null}addValue(t){this.value=StiMeterHelper.Progress.getValue(t.as(__.e.StiMeter))}removeValue(){this.value=null}getValue(){return this.value}getValue2(t){return null!=t?StiMeterHelper.Progress.getValue(t.as(__.e.StiMeter)):null}createNewValue(){this.value=new __.M.StiValueProgressMeter,this.value.expression="Sum()"}addTarget2(t){this.target=null!=t?StiMeterHelper.Progress.getTarget2(t):null}addTarget(t){this.target=StiMeterHelper.Progress.getTarget(t.as(__.e.StiMeter))}removeTarget(){this.target=null}getTarget(){return this.target}getTarget2(t){return null!=t?StiMeterHelper.Progress.getTarget(t.as(__.e.StiMeter)):null}createNewTarget(){this.target=new StiTargetProgressMeter,this.target.expression="Sum()"}addSeries2(t){this.series=null!=t?StiMeterHelper.Progress.getSeries2(t):null}addSeries(t){this.series=StiMeterHelper.Progress.getSeries(t.as(__.e.StiMeter))}removeSeries(){this.series=null}getSeries(){return this.series}getSeries2(t){return null!=t?StiMeterHelper.Progress.getSeries(t.as(__.e.StiMeter)):null}createNewSeries(){this.series=new __.M.StiSeriesProgressMeter}getManuallyEnteredDataTable(){if(this.dataMode!=StiDataMode.ManuallyEnteringData)return null;return __.e.StiManuallyEnteredDataParser.getProgressDataTable(this.manuallyEnteredData,this)}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter)),r=(null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)&&(this.value=null==this.value?new __.M.StiValueProgressMeter:this.value,this.value.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiTargetMeter))),l=(null!=r&&(this.target=null==this.target?new StiTargetProgressMeter:this.target,this.target.loadFromJsonObject(r.saveToJsonObject(StiJsonSaveMode.Report))),e.firstOrDefault(t=>t.is(IStiSeriesMeter)));null!=(l=null==l?e.firstOrDefault(t=>t.is(IStiDimensionMeter)):l)&&(this.series=null==this.series?new __.M.StiSeriesProgressMeter:this.series,this.series.loadFromJsonObject(l.saveToJsonObject(StiJsonSaveMode.Report))),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiProgressDashboardInteraction)}fetchAllMeters(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(null!=this.value&&t.add(this.value),null!=this.target&&t.add(this.target),null!=this.series)&&t.add(this.series),t}getMeters(){let t=new List;return this.dataMode==StiDataMode.UsingDataFields&&(null!=this.value&&t.add(this.value),null!=this.target&&t.add(this.target),null!=this.series)&&t.add(this.series),t}retrieveUsedDataNames(){return this.dataMode==StiDataMode.UsingDataFields?StiUsedDataHelper.getMany(this.value,this.target,this.series):null}get isDefined(){return null!=this.value||null!=this.target||null!=this.series||this.dataMode==StiDataMode.ManuallyEnteringData}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.ProgressElement}get localizedName(){return StiLocalization.get("Components","StiProgress")}addProgressCondition(t,e,i,r,l,n,s,o){this.progressConditions.add(new __.M.StiProgressElementCondition(t,e,i,r,l,n,s,o))}fetchProgressConditions(){let t=new List;return null!=this.progressConditions&&t.addRange(this.progressConditions),t}clearProgressConditions(){this.progressConditions.clear()}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}constructor(t=Rectangle.empty){super(t),this.group="",this.dataMode=StiDataMode.UsingDataFields,this.textFormat=new StiGeneralFormatService,this.font=new Font("Arial",13),this.foreColor=Color.transparent,this.title=new __.e.StiTitle,this.layout=new StiElementLayout,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.showBlanks=!1,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.topN=new StiDataTopN,this.dataTransformation={},this.crossFiltering=!0,this.dataFilters=new List,this.userSorts=new List,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.seriesColors=[],this.defaultClientRectangle=new Rectangle(0,0,160,160),this.helpUrl="user-manual/dashboards_progress.htm",this.colorEach=!0,this.mode=StiProgressElementMode.Circle,this.progressConditions=new List,this.isSampleForStyles=!1,this.title.text=this.localizedName,this.dashboardInteraction=new StiProgressDashboardInteraction}},Stimulsoft.Report.Dashboard.IStiProgressElementCondition),StiProgressFieldCondition=Stimulsoft.Report.Dashboard.StiProgressFieldCondition,StiProgressConditionPermissions=Stimulsoft.Report.Dashboard.StiProgressConditionPermissions;{class n2a{implements(){let t=[ICloneable,IStiJsonReportObject,IStiProgressElementCondition];return(this.implements=()=>t)()}meta(){return[new StiStringMeta("Ident").get(()=>this[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName()),new StiEnumMeta("Condition","",StiFilterCondition,StiFilterCondition.EqualTo),new StiEnumMeta("Field","",StiProgressFieldCondition,StiProgressFieldCondition.Value),new StiStringNullOrEmptyMeta("Value"),new StiColorMeta("Color","",Color.transparent),new StiEnumMeta("Permissions","",StiProgressConditionPermissions,StiProgressConditionPermissions.All),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiColorMeta("TextColor","",Color.black),new StiColorMeta("TrackColor","",Color.transparent)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}static createFromJson(t){let e=new n2a;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new n2a;return e.loadFromXml(t),e}constructor(t,e,i,r,l,n,s,o){this.condition=StiFilterCondition.EqualTo,this.field=StiProgressFieldCondition.Value,this.permissions=StiProgressConditionPermissions.All,this.textColor=Color.black,this.color=Color.transparent,this.trackColor=Color.transparent,this.font=new Font("Arial",8),null!=t&&(this.field=t),null!=e&&(this.condition=e),null!=i&&(this.value=i),null!=r&&(this.permissions=r),null!=l&&(this.font=l),null!=n&&(this.textColor=n),null!=s&&(this.color=s),null!=o&&(this.trackColor=o)}}__.M.StiProgressElementCondition=n2a}__.g.StiRegionMapDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.ApplyFilter&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)&&this.isDefaultLayout}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.RegionMap,this.availableOnClick=StiAvailableInteractionOnClick.ApplyFilter|StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=o&&(this.fileName=o),null!=a&&(this.headerText=a),null!=u&&(this.footerText=u),null!=S&&(this.showFullScreenButton=S),null!=m&&(this.showSaveButton=m),null!=h&&(this.showViewDataButton=h)}};let StiMapLabels=Stimulsoft.Report.Maps.StiMapLabels,StiRegionMapDashboardInteraction=__.g.StiRegionMapDashboardInteraction,ImplementsIStiRegionMapElement=Stimulsoft.Report.Dashboard.ImplementsIStiRegionMapElement,StiMap=Stimulsoft.Report.Maps.StiMap,StiDisplayNameType=Stimulsoft.Report.Maps.StiDisplayNameType,StiMapType=Stimulsoft.Report.Maps.StiMapType,StiMapSource=Stimulsoft.Report.Maps.StiMapSource,IStiRegionMapElement=Stimulsoft.Report.Dashboard.IStiRegionMapElement;{StiExportToolAttribute.add("StiRegionMapElement","Stimulsoft.Dashboard.Export.Tools.StiRegionMapElementExportTool");class StiRegionMapElement extends __.e.StiElement{implements(){let t=super.implements().concat([IStiRegionMapElement,IStiSimpleShadow,IStiCornerRadius,IStiSkipOwnFilter,IStiTitleElement,IStiElementLayout,IStiFont,IStiGlobalizationProvider,...ImplementsIStiRegionMapElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiSkipOwnFilter,...ImplementsIStiTitleElement,...ImplementsIStiElementLayout,...ImplementsIStiFont,IStiJsonReportObject,IStiElementInteraction,IStiNumberFormat]);return(this.implements=()=>t)()}clone(t){let e,i,r,l,n=super.clone(t);return n.keyMeter=null!=this.keyMeter?this.keyMeter.clone():null,n.nameMeter=null!=this.nameMeter?this.nameMeter.clone():null,n.valueMeter=null!=this.valueMeter?this.valueMeter.clone():null,n.groupMeter=null!=this.groupMeter?this.groupMeter.clone():null,n.colorMeter=null!=this.colorMeter?this.colorMeter.clone():null,n.userFilters=this.userFilters.select(t=>t.clone()).toList(),n.transformActions=this.transformActions.select(t=>t.clone()).toList(),n.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),n.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),n.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),n.valueFormat=null==(e=this.valueFormat)?void 0:e.clone(),n.labels=null==(i=this.labels)?void 0:i.clone(),n.title=null!=this.title?this.title.clone():null,n.layout=null!=this.layout?this.layout.clone():null,n.dashboardInteraction=this.dashboardInteraction.clone(),n.shadow=null==(r=this.shadow)?void 0:r.clone(),n.cornerRadius=null==(l=this.cornerRadius)?void 0:l.clone(),n}meta(){return[...super.meta(),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiRegionMapDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiRegionMapDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiRegionMapDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiObjectMeta("Labels").check(()=>null!=this.labels).set(t=>this.labels=StiMapLabels.createFromJsonObject(t.value)).setXml(t=>this.labels=StiMapLabels.createFromXml(t)),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiObjectMeta("Layout").check(()=>null!=this.layout).set(t=>this.layout=StiElementLayout.createFromJsonObject(t.value)).setXml(t=>this.layout=StiElementLayout.createFromXml(t)),new StiObjectMeta("KeyMeter").check(()=>null!=this.keyMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(StiKeyMapMeter);null!=e&&(this.keyMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(StiKeyMapMeter);null!=e&&(this.keyMeter=e)}),new StiObjectMeta("NameMeter").check(()=>null!=this.nameMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.L.StiNameMapMeter);null!=e&&(this.nameMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.L.StiNameMapMeter);null!=e&&(this.nameMeter=e)}),new StiObjectMeta("ValueMeter").check(()=>null!=this.valueMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.L.StiValueMapMeter);null!=e&&(this.valueMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.L.StiValueMapMeter);null!=e&&(this.valueMeter=e)}),new StiObjectMeta("GroupMeter").check(()=>null!=this.groupMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.L.StiGroupMapMeter);null!=e&&(this.groupMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.L.StiGroupMapMeter);null!=e&&(this.groupMeter=e)}),new StiObjectMeta("ColorMeter").check(()=>null!=this.colorMeter).set(t=>{let e=StiMeterLoader.loadFromJson(t.value).as(__.L.StiColorMapMeter);null!=e&&(this.colorMeter=e)}).setXml(t=>{let e=StiMeterLoader.loadFromXml(t).as(__.L.StiColorMapMeter);null!=e&&(this.colorMeter=e)}),new StiEnumMeta("DataFrom","",StiMapSource,StiMapSource.Manual),new StiEnumMeta("MapType","",StiMapType,StiMapType.Individual),new StiStringNullOrEmptyMeta("MapData"),new StiBoolMeta("ShowValue","",!0),new StiBoolMeta("ShortValue","",!0),new StiBoolMeta("ShowZeros","",!0),new StiBoolMeta("ColorEach"),new StiBoolMeta("ShowBubble"),new StiBoolMeta("Show3D"),new StiEnumMeta("ShowName","",StiDisplayNameType,StiDisplayNameType.Full),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("Language"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta(["MapIdent","MapID"]),new StiBoolMeta("CrossFiltering","",!0),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiStringNullOrEmptyMeta("ManuallyEnteredData"),new StiObjectMeta("ValueFormat").check(()=>null!=this.valueFormat).set(t=>this.valueFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.valueFormat=StiFormatService.loadFormatFromXml(t))]}get allowSkipOwnFilter(){return!0}fetchAllMeters(){let t=new List;return null!=this.keyMeter&&t.add(this.keyMeter),null!=this.nameMeter&&t.add(this.nameMeter),null!=this.valueMeter&&t.add(this.valueMeter),null!=this.groupMeter&&t.add(this.groupMeter),null!=this.colorMeter&&t.add(this.colorMeter),t}getMeters(){let t=new List;return this.isDefined&&this.dataFrom==StiMapSource.DataColumns&&(null!=this.keyMeter&&t.add(this.keyMeter),null!=this.nameMeter&&t.add(this.nameMeter),null!=this.valueMeter&&(StiExpressionHelper.isAggregationFunctionPresent(this.valueMeter.expression)?t.add(this.valueMeter):t.add(new __.L.StiValueMapMeter(this.valueMeter.key,`First(${this.valueMeter.expression})`))),null!=this.groupMeter&&t.add(this.groupMeter),null!=this.colorMeter)&&t.add(this.colorMeter),t}retrieveUsedDataNames(){let t=new List;return this.dataFrom==StiMapSource.DataColumns&&(t.addRange(StiUsedDataHelper.getMany(this.keyMeter)),t.addRange(StiUsedDataHelper.getMany(this.nameMeter)),t.addRange(StiUsedDataHelper.getMany(this.valueMeter)),t.addRange(StiUsedDataHelper.getMany(this.groupMeter)),t.addRange(StiUsedDataHelper.getMany(this.colorMeter))),t.distinct()}get isDefined(){return this.dataFrom!=StiMapSource.DataColumns||null!=this.keyMeter||null!=this.nameMeter||null!=this.valueMeter||null!=this.groupMeter||null!=this.colorMeter}get isQuerable(){return this.dataFrom==StiMapSource.DataColumns}get font(){return this.labels.font}set font(t){this.labels.font=t}static getValueFormatDefault(){let t=new StiNumberFormatService;return t.decimalDigits=1,t.state=__.a.StiTextFormatState.DecimalDigits|__.a.StiTextFormatState.Abbreviation,t}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}createNextMeter(t){null==this.keyMeter?this.keyMeter=StiMeterHelper.RegionMap.getKey2(t):null==this.nameMeter?this.nameMeter=StiMeterHelper.RegionMap.getName2(t):null==this.valueMeter?this.valueMeter=StiMeterHelper.RegionMap.getValue2(t):null==this.groupMeter?this.groupMeter=StiMeterHelper.RegionMap.getGroup2(t):null==this.colorMeter?this.colorMeter=StiMeterHelper.RegionMap.getColor2(t):this.keyMeter=StiMeterHelper.RegionMap.getKey2(t)}addKeyMeter2(t){this.keyMeter=null!=t?StiMeterHelper.RegionMap.getKey2(t):null}addKeyMeter(t){this.keyMeter=null!=t?StiMeterHelper.RegionMap.getKey(t.as(__.e.StiMeter)):null}getKeyMeter(){return this.keyMeter}removeKeyMeter(){this.keyMeter=null}createNewKeyMeter(){this.keyMeter=new StiKeyMapMeter}addNameMeter2(t){this.nameMeter=null!=t?StiMeterHelper.RegionMap.getName2(t):null}addNameMeter(t){this.nameMeter=null!=t?StiMeterHelper.RegionMap.getName(t.as(__.e.StiMeter)):null}getNameMeter(){return this.nameMeter}removeNameMeter(){this.nameMeter=null}createNewNameMeter(){this.nameMeter=new __.L.StiNameMapMeter}addValueMeter2(t){this.valueMeter=null!=t?StiMeterHelper.RegionMap.getValue2(t):null}addValueMeter(t){this.valueMeter=null!=t?StiMeterHelper.RegionMap.getValue(t.as(__.e.StiMeter),this.dashboard):null}getValueMeter(){return this.valueMeter}removeValueMeter(){this.valueMeter=null}createNewValueMeter(){this.valueMeter=new __.L.StiValueMapMeter}addGroupMeter2(t){this.groupMeter=null!=t?StiMeterHelper.RegionMap.getGroup2(t):null}addGroupMeter(t){this.groupMeter=null!=t?StiMeterHelper.RegionMap.getGroup(t.as(__.e.StiMeter)):null}getGroupMeter(){return this.groupMeter}removeGroupMeter(){this.groupMeter=null}createNewGroupMeter(){this.groupMeter=new __.L.StiGroupMapMeter}addColorMeter2(t){this.colorMeter=null!=t?StiMeterHelper.RegionMap.getColor2(t):null}addColorMeter(t){this.colorMeter=null!=t?StiMeterHelper.RegionMap.getColor(t.as(__.e.StiMeter)):null}getColorMeter(){return this.colorMeter}removeColorMeter(){this.colorMeter=null}createNewColorMeter(){this.colorMeter=new __.L.StiColorMapMeter}convertFrom(t){let e=t.as(__.O.StiOnlineMapElement);null==e||null==e.location||e.location.isDefault()||(this.keyMeter=new StiKeyMapMeter,this.keyMeter.label=e.location.label,this.keyMeter.expression=e.location.expression),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiRegionMapDashboardInteraction)}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.RegionMapElement}get localizedName(){return StiLocalization.get("Components","StiRegionMap")}get dashboardInteraction(){return this._dashboardInteraction}set dashboardInteraction(t){this._dashboardInteraction=t}getManuallyEnteredDataTable(){if(this.dataFrom==StiMapSource.Manual){let t=this.getMapData().orderBy(t=>t.key).toList(),i=new StiDataTable;i.meters.add(new StiKeyMapMeter("Key","Key")),i.meters.add(new __.L.StiNameMapMeter("Name","Name")),i.meters.add(new __.L.StiValueMapMeter("Value","Value"));for(let e of t){let t=[];t[0]=e.key,t[1]=e.name,t[2]=e.value,i.rows.add(t)}return i}return null}get language(){return this._language}set language(t){this._language!=t&&(this._language="EN"!=t?t:null)}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}getMapData(){let t=new StiMap;return t.mapData=this.mapData,t.mapIdent=this.mapIdent,t.language=this.language,t.page=this.page,t.getMapData()}constructor(t=Rectangle.empty){super(t),this.group="",this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.title=new __.e.StiTitle,this.valueFormat=StiRegionMapElement.getValueFormatDefault(),this.layout=new StiElementLayout,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.userFilters=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.helpUrl="user-manual/dashboards_maps_region_map.htm",this.dataMode=StiDataMode.UsingDataFields,this.labels=new StiMapLabels,this.mapIdent="USA",this.dataFrom=StiMapSource.Manual,this.mapType=StiMapType.Individual,this.showValue=!0,this.showZeros=!0,this.shortValue=!0,this.colorEach=!1,this.showBubble=!1,this.show3D=!1,this.showName=StiDisplayNameType.Full,this.crossFiltering=!0,this.title.text=this.localizedName,this.dashboardInteraction=new StiRegionMapDashboardInteraction}}__.L.StiRegionMapElement=StiRegionMapElement}__.g.StiShapeDashboardInteraction=class extends __.g.StiDashboardInteraction{constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.Shape,this.availableOnClick=StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.onClick=StiInteractionOnClick.OpenHyperlink}};let StiShapeTypeService=Stimulsoft.Report.Components.StiShapeTypeService,ImplementsIStiShapeElement=Stimulsoft.Report.Dashboard.ImplementsIStiShapeElement,StiRectangleShapeType=Stimulsoft.Report.Components.StiRectangleShapeType,IStiShapeElement=Stimulsoft.Report.Dashboard.IStiShapeElement,StiShapeDashboardInteraction=__.g.StiShapeDashboardInteraction;StiExportToolAttribute.add("StiShapeElement","Stimulsoft.Dashboard.Export.Tools.StiShapeElementExportTool"),__.Z.StiShapeElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiShapeElement,IStiTitleElement,IStiElementInteraction,IStiGlobalizationProvider,...ImplementsIStiShapeElement,...ImplementsIStiTitleElement,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.title=null!=this.title?this.title.clone():null,r.shapeType=null==(e=this.shapeType)?void 0:e.clone(),r.dashboardInteraction=null==(i=this.dashboardInteraction)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>{this.title=new StiTitle,this.title.loadFromJsonObject(t)}).setXml(t=>{this.title=new StiTitle,this.title.loadFromXml(t)}),new StiBrushMeta("Fill"),new StiColorMeta("Stroke","",Color.black),new StiNumberMeta("Size","",1),new StiObjectMeta("ShapeType").set(t=>this.shapeType=StiShapeTypeService.createFromJsonObject(t.value)).setXml(t=>{this.shapeType=StiShapeTypeService.convertFromXml(t),this.shapeType.loadFromXml(t)}),new StiObjectMeta("Padding").get(t=>this.padding.saveToJsonObject(0,0,0,0)),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiShapeDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiShapeDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiShapeDashboardInteraction);null!=i&&(this.dashboardInteraction=i)})]}get toolboxPosition(){return StiComponentToolboxPosition.ShapeElement}get localizedName(){return StiLocalization.get("Components","StiShape")}get isDefined(){return!0}get isQuerable(){return!1}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get size(){return this._size}set size(t){t!=this._size&&(this._size=t<1?1:t)}getNestedPages(){var t;if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=null==(t=this.dashboardInteraction)?void 0:t.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;super.getNestedPages;let i=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==i)return null;return new List([i])}constructor(t=Rectangle.empty){super(t),this.helpUrl="user-manual/dashboards_shape.htm",this.title=new StiTitle,this.shapeType=new StiRectangleShapeType,this._size=1,this.fill=new StiSolidBrush,this.stroke=Color.black,this.title.text=this.localizedName,this.title.visible=!1,this.padding=StiPadding.create(0),this.dashboardInteraction=new StiShapeDashboardInteraction}};{let t;(t=>{t[t["LeftToRight"]=0]="LeftToRight",t[t["RighToLeft"]=1]="RighToLeft"})(t=__.K.StiDataBarsDirection||(__.K.StiDataBarsDirection={}));let e;(t=>{t[t["Solid"]=0]="Solid",t[t["Gradient"]=1]="Gradient"})(e=__.K.StiDataBarsBrushType||(__.K.StiDataBarsBrushType={}));let i;(t=>{t[t["Line"]=0]="Line",t[t["Area"]=1]="Area",t[t["Column"]=2]="Column",t[t["WinLoss"]=3]="WinLoss"})(i=__.K.StiSparklinesType||(__.K.StiSparklinesType={}))}{class StiTableElementSelection{static getSelected(t){let e=this.hash.get(t.key);if(null==e)return null;return e.keys.cast().toList()}static getSelectedObjects(t){let e=this.getSelected(t);return null!=e?e.cast():null}static isSelected(t,e){let i=this.hash.get(t.key);return null==i&&(i=new Hashtable,this.hash.set(t.key,i)),null!=i.get(e)}static select(t,e){let i=this.hash.get(t.key);null==i&&(i=new Hashtable,this.hash.set(t.key,i)),i.set(e,e)}static resetSelection(t){this.hash.containsKey(t.key)&&this.hash.remove(t.key)}}StiTableElementSelection.hash=new Hashtable,__.h.StiTableElementSelection=StiTableElementSelection}let IStiAllowUserColumnSelectionDashboardInteraction=Stimulsoft.Report.Dashboard.IStiAllowUserColumnSelectionDashboardInteraction,IStiTableDashboardInteraction=Stimulsoft.Report.Dashboard.IStiTableDashboardInteraction,IStiAllowUserFilteringDashboardInteraction=Stimulsoft.Report.Dashboard.IStiAllowUserFilteringDashboardInteraction,IStiTableElementCondition=(__.g.StiTableDashboardInteraction=class extends __.g.StiDashboardInteraction{implements(){let t=super.implements().concat([IStiTableDashboardInteraction,IStiAllowUserSortingDashboardInteraction,IStiAllowUserColumnSelectionDashboardInteraction,IStiAllowUserFilteringDashboardInteraction,IStiJsonReportObject,IStiInteractionLayout]);return(this.implements=()=>t)()}meta(){return[...super.meta(),new StiBoolMeta("AllowUserColumnSelection","",!0),new StiBoolMeta("AllowUserSorting","",!0),new StiBoolMeta("AllowUserFiltering","",!0),new StiBoolMeta("DrillDownFiltered","",!0),new StiBoolMeta("FullRowSelect"),new StiBoolMeta("ShowFullScreenButton","",!0),new StiBoolMeta("ShowSaveButton","",!0),new StiBoolMeta("ShowViewDataButton","",!0),new StiStringNullOrEmptyMeta("FileName"),new StiStringNullOrEmptyMeta("HeaderText"),new StiStringNullOrEmptyMeta("FooterText")]}get isDefaultLayout(){return this.showFullScreenButton&&this.showSaveButton&&this.showViewDataButton&&null==this.fileName&&null==this.headerText&&null==this.footerText}isDefault(){return this.isDefaultLayout&&this.allowUserColumnSelection&&this.allowUserFiltering&&this.allowUserSorting&&this.drillDownFiltered&&!this.fullRowSelect&&super.isDefault()}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c,d,g,p,C){super(t,e,i,r,l,n,s),this.allowUserColumnSelection=!0,this.allowUserSorting=!0,this.allowUserFiltering=!0,this.drillDownFiltered=!0,this.fullRowSelect=!1,this.ident=StiInteractionIdent.Table,this.availableOnClick=StiAvailableInteractionOnClick.None,this.availableOnHover=StiAvailableInteractionOnHover.None,this.availableOnDataManipulation=StiAvailableInteractionOnDataManipulation.AllowFiltering|StiAvailableInteractionOnDataManipulation.AllowSorting,this.showFullScreenButton=!0,this.showSaveButton=!0,this.showViewDataButton=!0,this.fileName=null,this.headerText=null,this.footerText=null,null!=u&&(this.allowUserColumnSelection=u),null!=o&&(this.allowUserFiltering=o),null!=a&&(this.allowUserSorting=a),null!=S&&(this.drillDownFiltered=S),null!=m&&(this.fullRowSelect=m),null!=h&&(this.fileName=h),null!=c&&(this.headerText=c),null!=d&&(this.footerText=d),null!=g&&(this.showFullScreenButton=g),null!=p&&(this.showSaveButton=p),null!=C&&(this.showViewDataButton=C)}},Stimulsoft.Report.Dashboard.IStiTableElementCondition),StiTableConditionPermissions=Stimulsoft.Report.Dashboard.StiTableConditionPermissions;{class StiTableElementCondition{implements(){let t=[ICloneable,IStiTableElementCondition,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiStringMeta("Ident").get(()=>this[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName()),new StiObjectMeta("KeyValueMeters").get(()=>StiJsonReportObjectHelper.Serialize.stringArray(this.keyValueMeters)).set(t=>this.keyValueMeters=StiJsonReportObjectHelper.Deserialize.stringArray(t.value)).setXml(t=>this.keyValueMeters=this.parseStringArray(t)),new StiObjectMeta("KeyDataFieldMeters").get(()=>StiJsonReportObjectHelper.Serialize.stringArray(this.keyDataFieldMeters)).set(t=>this.keyValueMeters=StiJsonReportObjectHelper.Deserialize.stringArray(t.value)).setXml(t=>this.keyValueMeters=this.parseStringArray(t)),new StiObjectMeta("KeyDestinationMeters").get(()=>StiJsonReportObjectHelper.Serialize.stringArray(this.keyDestinationMeters)).set(t=>this.keyDestinationMeters=StiJsonReportObjectHelper.Deserialize.stringArray(t.value)).setXml(t=>this.keyDestinationMeters=this.parseStringArray(t)),new StiEnumMeta("DataType","",__.a.StiFilterDataType,__.a.StiFilterDataType.Numeric),new StiEnumMeta("Condition","",StiFilterCondition,StiFilterCondition.EqualTo),new StiStringNullOrEmptyMeta("Value"),new StiBoolMeta("IsExpression"),new StiEnumMeta("Permissions","",StiTableConditionPermissions,StiTableConditionPermissions.All),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiColorMeta("ForeColor","",Color.black),new StiColorMeta("BackColor","",Color.transparent),new StiEnumMeta("IconAlignment","",StiIconAlignment),new StiColorMeta("IconColor","",Color.maroon),new StiEnumMeta("Icon","",StiFontIcons),new StiStringMeta("CustomIcon").check(()=>null!=this.customIcon).get(()=>Convert.toBase64String(this.customIcon)).set(t=>this.customIcon=Convert.fromBase64String(t.value.toString())).setXml(t=>this.customIcon=Convert.fromBase64String(t.textContent))]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}parseStringArray(i){let r=[];for(let e=0;e<i.childNodes.length;e++){let t=i.childNodes[e];"value"==t.nodeName&&(r[e]=t.textContent)}return r}clone(){let t=this.saveToJsonObject(null),e=new StiTableElementCondition;return e.loadFromJsonObject(t),e}get keyValueMeters(){return this.keyDataFieldMeters}set keyValueMeters(t){this.keyDataFieldMeters=t,this.keyDestinationMeters=t}static createFromJson(t){let e=new StiTableElementCondition;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new StiTableElementCondition;return e.loadFromXml(t),e}constructor(t,e,i,r,l,n,s,o,a,u,S,m,h,c){this.keyDataFieldMeters=[],this.keyDestinationMeters=[],this.dataType=Stimulsoft.Report.Components.StiFilterDataType.Numeric,this.condition=Stimulsoft.Report.Components.StiFilterCondition.EqualTo,this.permissions=StiTableConditionPermissions.All,this.font=new Font("Arial",8),this.foreColor=Color.black,this.backColor=Color.transparent,this.isExpression=!1,this.icon=StiFontIcons.Adjust,this.iconAlignment=StiIconAlignment.None,this.iconColor=Color.maroon,null!=t&&(this.keyDataFieldMeters=t),null!=e&&(this.keyDestinationMeters=e),null!=i&&(this.dataType=i),null!=r&&(this.condition=r),null!=l&&(this.value=l),null!=n&&(this.permissions=n),null!=s&&(this.font=s),null!=o&&(this.foreColor=o),null!=a&&(this.backColor=a),null!=u&&(this.isExpression=u),null!=S&&(this.icon=S),null!=m&&(this.iconAlignment=m),null!=h&&(this.customIcon=h),null!=c&&(this.iconColor=c)}}__.K.StiTableElementCondition=StiTableElementCondition}let StiTableCells=__.K.StiTableCells,StiTableDashboardInteraction=__.g.StiTableDashboardInteraction,StiTableSizeMode=Stimulsoft.Report.Dashboard.StiTableSizeMode,ImplementsIStiTableElement=Stimulsoft.Report.Dashboard.ImplementsIStiTableElement,StiTableElementSelection=__.h.StiTableElementSelection,IStiTableElement=Stimulsoft.Report.Dashboard.IStiTableElement,StiTableElementCondition=__.K.StiTableElementCondition;{StiExportToolAttribute.add("StiTableElement","Stimulsoft.Dashboard.Export.Tools.StiTableElementExportTool");class StiTableElement extends __.e.StiElement{implements(){let t=super.implements().concat([IStiTableElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiElementLayout,IStiGlobalizationProvider,...ImplementsIStiTableElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,...ImplementsIStiElementLayout,IStiJsonReportObject,IStiElementInteraction,IStiSkipOwnFilter]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t),l=(r.columns=this.columns.select(t=>t.clone()).toList(),r.userFilters=this.userFilters.select(t=>t.clone()).toList(),r.userSorts=this.userSorts.select(t=>t.clone()).toList(),r.transformActions=this.transformActions.select(t=>t.clone()).toList(),r.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),r.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.cells=this.cells.clone(),r.title=null!=this.title?this.title.clone():null,r.layout=null!=this.layout?this.layout.clone():null,r.tableConditions=this.tableConditions.select(t=>t.clone()).toList(),new Dictionary);for(let i=0;i<this.columns.length;i++){let t=this.columns[i].key,e=r.columns[i].key;l.set(t,e)}for(let i of r.tableConditions){for(let e=0;e<i.keyDataFieldMeters.length;e++){let t={ref:""};l.tryGetValue(i.keyDataFieldMeters[e],t)&&(i.keyDataFieldMeters[e]=t.ref)}for(let e=0;e<i.keyDestinationMeters.length;e++){let t={ref:""};l.tryGetValue(i.keyDestinationMeters[e],t)&&(i.keyDestinationMeters[e]=t.ref)}}return r.dashboardInteraction=this.dashboardInteraction.clone(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiObjectMeta("Columns").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.columns,t)).set(t=>this.columns.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value).as(StiTableColumn)).where(t=>null!=t))).setXml(t=>this.columns.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)).filter(t=>null!=t))),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("UserSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userSorts,t)).set(t=>this.userSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.userSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("Cells").check(()=>null!=this.cells&&!this.cells.isDefault()).get(()=>this.cells.saveToJsonObject(StiJsonSaveMode.Report)).set(t=>this.cells=StiTableCells.createFromJsonObject(t.value)).setXml(t=>this.cells=StiTableCells.createFromXml(t)),new StiColorMeta("HeaderForeColor","",Color.transparent),new StiColorMeta("FooterForeColor","",Color.transparent),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("HeaderFont").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.headerFont)).set(t=>this.headerFont=StiJsonReportObjectHelper.Deserialize.font(t.value,this.headerFont)).setXml(t=>this.headerFont=Stimulsoft.System.Convert.toFont(t.textContent)),new StiStringNullOrEmptyMeta("FooterFont").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.footerFont)).set(t=>this.footerFont=StiJsonReportObjectHelper.Deserialize.font(t.value,this.footerFont)).setXml(t=>this.footerFont=Stimulsoft.System.Convert.toFont(t.textContent)),new StiFontMeta("Font","","Arial",10),new StiBoolMeta("CrossFiltering","",!0),new StiObjectMeta("TableConditions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.tableConditions.select(t=>t[Stimulsoft.System.StiObject.stimulsoft]().as(StiTableElementCondition)),t)).set(t=>this.tableConditions.addRange(t.value.properties().select(t=>StiTableElementCondition.createFromJson(t.value)))).setXml(t=>this.tableConditions.addRange(t.childNodes.map(t=>StiTableElementCondition.createFromXml(t)))),new StiObjectMeta("Title").check(()=>null!=this.title),new StiObjectMeta("Layout").check(()=>null!=this.layout),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction.as(StiTableDashboardInteraction)).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiTableDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiTableDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiEnumMeta("SizeMode","",StiTableSizeMode,StiTableSizeMode.AutoSize),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiNumberMeta("RowsPerPage","",0),new StiNumberMeta("PageTurnTime","",0)]}createMeters(t){let e=t.as(StiTableElement);this.columns.clear();for(let t of e.columns)this.columns.add(t)}createMeters2(e){this.columns.clear();for(let t of e.columns.list)null!=t&&null!=t.type&&Type.isNumericType(t.type)?this.columns.add(StiMeterHelper.Table.getMeasure2(t)):this.columns.add(StiMeterHelper.Table.getDimension2(t))}createMeter3(t){let e=t.as(StiDataColumn),i=t.as(StiVariable),r=null!=e?e.type:null==i?void 0:i.type;if(null!=r&&Type.isNumericType(r)){let t=StiMeterHelper.Table.getMeasure2(e);t.showTotalSummary=!0,t.summaryType=StiSummaryColumnType.Sum,this.columns.add(t)}else this.columns.add(StiMeterHelper.Table.getDimension2(t))}removeMeter(t){t<this.columns.length&&this.columns.removeAt(t)}removeAllMeters(){this.columns.clear()}insertMeter(t,e){let i=e.as(StiTableColumn);if(null==i)return;0<=t&&t<this.columns.length?this.columns.insert(t,i):this.columns.add(i)}insertNewDimension(t){let e=new __.K.StiDimensionColumn;e.horAlignment=StiHorAlignment.Left,this.insertMeter(t,e)}insertNewMeasure(t){let e=new __.K.StiMeasureColumn;e.expression="Sum()",e.horAlignment=StiHorAlignment.Right,this.insertMeter(t,e)}getMeasure(t){return StiMeterHelper.Table.getMeasure2(t)}getDimension(t){return StiMeterHelper.Table.getDimension2(t)}getFonts(){let t=super.getFonts();return t.push(this.font),t=t.concat(this.cells.getFonts())}getCells(){return this.cells}convertFrom(t){let e=t.fetchAllMeters();if(this.columns.clear(),null==e)return;e.cast().forEach(t=>{let e=null;t.is2(IStiDimensionMeter)?e=new __.K.StiDimensionColumn:t.is2(IStiSparklinesColumn)?e=new __.K.StiSparklinesColumn:t.is2(IStiDataBarsColumn)?e=new __.K.StiDataBarsColumn:t.is2(IStiIndicatorColumn)?e=new __.K.StiIndicatorColumn:t.is2(IStiColorScaleColumn)?e=new __.K.StiColorScaleColumn:t.is2(IStiBubbleColumn)?e=new __.K.StiBubbleColumn:t.is2(IStiMeasureMeter)&&((e=new __.K.StiMeasureColumn).horAlignment=StiHorAlignment.Right),null!=e&&(e.loadFromJsonObject(t.saveToJsonObject(StiJsonSaveMode.Report)),this.columns.add(e))},this),null==this.dashboardInteraction&&(this.dashboardInteraction=new StiTableDashboardInteraction)}fetchAllMeters(){return this.columns.cast()}getMeters(){return this.columns.cast()}retrieveUsedDataNames(){return StiUsedDataHelper.getMany2(this.columns)}get isDefined(){return null!=this.columns&&0<this.columns.length}get allowSkipOwnFilter(){return!this.dashboardInteraction.drillDownFiltered}get foreColor(){return this.cells.data.foreColor}set foreColor(t){this.cells.data.foreColor=t}get font(){return this.cells.data.font}set font(t){this.cells.data.font=t}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}get cells(){return this._cells}set cells(t){null!=t&&(t.element=this),this._cells=t}shouldSerializeCells(){return null==this.cells||!this.cells.isDefault()}setString(i,r){switch(i){case"Title.Text":this.title.text=r;break}let l=0;for(let e of this.columns){let t=`Column${l++}.Label`;i==t&&(e.label=r)}}getString(i){switch(i){case"Title.Text":return this.title.text}let r=0;for(let e of this.columns){let t=`Column${r++}.Label`;if(i==t)return e.label}throw new Error(`Property with name `+i)}getAllStrings(){let e=["Title.Text"],i=0;return this.columns.forEach(t=>e.push(`Column${i++}.Label`)),e}addTableCondition(t,e,i,r,l,n,s,o,a,u,S,m,h,c){null==this.tableConditions&&(this.tableConditions=new List),this.tableConditions.add(new StiTableElementCondition(t,e,i,r,l,n,s,o,a,u,S,m,h,c))}get toolboxPosition(){return StiComponentToolboxPosition.TableElement}get localizedName(){return StiLocalization.get("Components","StiTable")}get headerForeColor(){return this.cells.columns.foreColor}set headerForeColor(t){this.cells.columns.foreColor=t}get headerFont(){return this.cells.columns.font}set headerFont(t){this.cells.columns.font=t}get footerForeColor(){return this.cells.totals.foreColor}set footerForeColor(t){this.cells.totals.foreColor=t}get footerFont(){return this.cells.totals.font}set footerFont(t){this.cells.totals.font=t}getColumnFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.columns.font)}getDataFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.data.font)}getTotalFont(){return StiDashboardStyleHelper.getElementFontFromStyle(this,this.cells.totals.font)}getNestedPages(){let t,e,i=new List,r="";if(null!=this.dashboardInteraction&&this.dashboardInteraction.onClick!=StiInteractionOnClick.None&&(r=null==(t=this.dashboardInteraction)?void 0:t.drillDownPageKey,StiKeyHelper.isKey(r))){let t=this.report.pages.toList().firstOrDefault(t=>t.guid==r);null!=t&&i.add(t)}for(let t of this.columns)if(null!=(null==t?void 0:t.dashboardInteraction)&&t.dashboardInteraction.onClick!=StiInteractionOnClick.None&&(r=null==(e=null==t?void 0:t.dashboardInteraction)?void 0:e.drillDownPageKey,StiKeyHelper.isKey(r))){let t=this.report.pages.toList().firstOrDefault(t=>t.guid==r);null!=t&&i.add(t)}return 0==i.length?null:i.distinct()}getFormatObjects(){return StiTableElementSelection.getSelectedObjects(this)}constructor(t=Rectangle.empty){super(t),this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.title=new __.e.StiTitle,this.layout=new StiElementLayout,this.group="",this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.userFilters=new List,this.userSorts=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.tableConditions=new List,this.crossFiltering=!0,this.helpUrl="user-manual/dashboards_table.htm",this.columns=new List,this.sizeMode=StiTableSizeMode.AutoSize,this.rowsPerPage=0,this.pageTurnTime=0,this.currentPageIndex=-1,this.cells=new StiTableCells,this.title.text=this.localizedName,this.dashboardInteraction=new StiTableDashboardInteraction}}__.K.StiTableElement=StiTableElement}let Exception=Stimulsoft.System.Exception,IStiTableSection=(__.K.StiTableElementConditionHelper=class{static async getConditionResult(r,e,l){let t=!1;if(null!=r){try{if(e.dataType==__.a.StiFilterDataType.Numeric){let t=StiNumber.tryParse(r);t.successfully&&(r=t.result)}else if(e.dataType==__.a.StiFilterDataType.DateTime){let t=DateTime.fromString(r.toString(),!1);r=null!=t?t:DateTime.fromOADate(r[Stimulsoft.System.StiObject.stimulsoft]().toNumber())}}catch(t){}let i=await this.getConditionValue(e,l),t=r;if(null!=t&&null!=i){r[Stimulsoft.System.StiObject.stimulsoft]().getType()!=i[Stimulsoft.System.StiObject.stimulsoft]().getType()&&(r=r.toString(),i=i[Stimulsoft.System.StiObject.stimulsoft]().toString(),t=r);try{switch(e.condition){case __.a.StiFilterCondition.EqualTo:return 0==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case __.a.StiFilterCondition.NotEqualTo:return 0!=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case __.a.StiFilterCondition.GreaterThan:return 1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case __.a.StiFilterCondition.GreaterThanOrEqualTo:return 0<=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case __.a.StiFilterCondition.LessThan:return-1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case __.a.StiFilterCondition.LessThanOrEqualTo:return t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i)<=0;case __.a.StiFilterCondition.Containing:{let t=r.toString(),e=i.toString();return-1!=t.indexOf(e)}case __.a.StiFilterCondition.NotContaining:{let t=r.toString(),e=i.toString();return-1==t.indexOf(e)}case __.a.StiFilterCondition.BeginningWith:{let t=r.toString(),e=i.toString();return t.startsWith(e)}case __.a.StiFilterCondition.EndingWith:{let t=r.toString(),e=i.toString();return t.endsWith(e)}}}catch(t){}}}return t}static async getConditionValue(i,r){try{let e=i.isExpression?await StiReportParser.parseAsync(`{${i.value}}`,r):i.value;switch(i.dataType){case __.a.StiFilterDataType.String:return e;case __.a.StiFilterDataType.Numeric:return null!=e?e[Stimulsoft.System.StiObject.stimulsoft]().toNumber():0;case __.a.StiFilterDataType.DateTime:{let t=DateTime.fromString(e,!1);if(null!=t)return t;break}case __.a.StiFilterDataType.Boolean:return"true"==e.toLowerCase()}}catch(t){let e=`Problem when parsing Table Element ${i} value
|
|
9
9
|
`;throw Exception.log(t,r,e),t}return null}static async processBackColor(t,e,r,l,n){for(let i of r.tableConditions.where(t=>t.keyDestinationMeters.includes(e)))for(let e=0;e<n.length;e++){let t=n[e];if(0<=i.keyDataFieldMeters.indexOf(t)&&0<(i.permissions&StiTableConditionPermissions.BackColor)){let t=l[e];if(await this.getConditionResult(t,i,r))return i.backColor}}return t}static async processForeColor(t,e,r,l,n){for(let i of r.tableConditions.where(t=>t.keyDestinationMeters.includes(e)))for(let e=0;e<n.length;e++){let t=n[e];if(i.keyDataFieldMeters.includes(t)&&0<(i.permissions&StiTableConditionPermissions.ForeColor)){let t=l[e];if(await this.getConditionResult(t,i,r))return i.foreColor}}return t}static async processForeAndBackColor(t,e,i,l,n,s){let o={foreColor:null,backColor:null};for(let r of l.tableConditions.where(t=>0<=t.keyDestinationMeters.indexOf(i)))for(let i=0;i<s.length;i++){let t=s[i],e=n[i];if((null==o.foreColor||null==o.backColor)&&0<=r.keyDataFieldMeters.indexOf(t)&&await this.getConditionResult(e,r,l)&&(0<(r.permissions&StiTableConditionPermissions.ForeColor)&&(o.foreColor=r.foreColor),0<(r.permissions&StiTableConditionPermissions.BackColor))&&(o.backColor=r.backColor),null!=o.backColor&&null!=o.foreColor)return o}return null==o.foreColor&&(o.foreColor=t),null==o.backColor&&(o.backColor=e),o}static async processFontStyle(t,e,i,r,l){let n=0<i.tableConditions.length?await this.processFontBold(t.bold,e,i,r,l):t.bold,s=0<i.tableConditions.length?await this.processFontItalic(t.italic,e,i,r,l):t.italic,o=0<i.tableConditions.length?await this.processFontUnderline(t.underline,e,i,r,l):t.underline,a=0<i.tableConditions.length?await this.processFontStrikeout(t.strikeout,e,i,r,l):t.strikeout,u=FontStyle.Regular;return n&&(u^=FontStyle.Bold),s&&(u^=FontStyle.Italic),o&&(u^=FontStyle.Underline),a&&(u^=FontStyle.Strikeout),u}static async processFontStrikeout(t,e,l,n,s){for(let r of l.tableConditions.where(t=>t.keyDestinationMeters.includes(e)))for(let i=0;i<s.length;i++){let t=s[i],e=n[i];if(r.keyDataFieldMeters.includes(t)&&0<(r.permissions&StiTableConditionPermissions.FontStyleStrikeout)&&await this.getConditionResult(e,r,l))return r.font.strikeout}return t}static async processFontUnderline(t,e,l,n,s){for(let r of l.tableConditions.where(t=>t.keyDestinationMeters.includes(e)))for(let i=0;i<s.length;i++){let t=s[i],e=n[i];if(r.keyDataFieldMeters.includes(t)&&0<(r.permissions&StiTableConditionPermissions.FontStyleUnderline)&&await this.getConditionResult(e,r,l))return r.font.underline}return t}static async processFontItalic(t,e,l,n,s){for(let r of l.tableConditions.where(t=>t.keyDestinationMeters.includes(e)))for(let i=0;i<s.length;i++){let t=s[i],e=n[i];if(r.keyDataFieldMeters.includes(t)&&0<(r.permissions&StiTableConditionPermissions.FontStyleItalic)&&await this.getConditionResult(e,r,l))return r.font.italic}return t}static async processFontBold(t,e,l,n,s){for(let r of l.tableConditions.where(t=>t.keyDestinationMeters.includes(e)))for(let i=0;i<s.length;i++){let t=s[i],e=n[i];if(r.keyDataFieldMeters.includes(t)&&0<(r.permissions&StiTableConditionPermissions.FontStyleBold)&&await this.getConditionResult(e,r,l))return r.font.bold}return t}static async getIconCondition(e,l,n,s){for(let r of l.tableConditions.filter(t=>t.keyDestinationMeters&&0<=t.keyDestinationMeters.indexOf(e)))for(let i=0;i<s.length;i++){let t=s[i],e=n[i];if(0<=r.keyDataFieldMeters.indexOf(t)&&await this.getConditionResult(e,r,l))return r}return null}},Stimulsoft.Report.Dashboard.IStiTableSection),StiPivotTableElement=__.N.StiPivotTableElement,StiPivotToContainerCache=Stimulsoft.Report.Dashboard.StiPivotToContainerCache;{class Pha{implements(){let t=[IStiTableSection,IStiJsonReportObject];return(this.implements=()=>t)()}meta(){return[new StiColorMeta("BackColor","",Color.transparent),new StiColorMeta("ForeColor","",Color.transparent),new StiFontMeta("Font","","Arial",10)]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static createFromJsonObject(t){let e=new Pha;return e.loadFromJsonObject(t),e}static createFromXml(t){let e=new Pha;return e.loadFromXml(t),e}clone(){let t=this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone();return t.font=this.font.clone(),t}isDefault(){return!this.shouldSerializeBackColor()&&!this.shouldSerializeForeColor()&&!this.shouldSerializeFont()}get backColor(){return this._backColor}set backColor(t){t.equals(this._backColor)||(this._backColor=t,this.clearElementCache())}shouldSerializeBackColor(){return!this.backColor.equals(Color.transparent)}get foreColor(){return this._foreColor}set foreColor(t){t.equals(this._foreColor)||(this._foreColor=t,this.clearElementCache())}shouldSerializeForeColor(){return!this.foreColor.equals(Color.transparent)}get font(){return this._font}set font(t){this._font!=t&&(this._font=t,this.clearElementCache())}shouldSerializeFont(){return!(null!=this.font&&"Arial"==this.font.name&&10==this.font.sizeInPoints&&this.font.style==FontStyle.Regular)}clearElementCache(){var t;null!=(t=this.element)&&t.is(StiPivotTableElement)&&this.element.isDesigning&&StiPivotToContainerCache.remove(this.element.as(StiPivotTableElement))}constructor(t,e,i){this._backColor=Color.transparent,this._foreColor=Color.transparent,this._font=new Font("Arial",10),null!=t&&(this.font=t),null!=e&&(this.foreColor=e),null!=i&&(this.backColor=i)}}__.K.StiTableSection=Pha}__.ad.StiDataBarsColumnConverter=class extends StiMeterConverter{},__.ad.StiDimensionColumnConverter=class extends StiMeterConverter{},__.ad.StiSparklinesColumnConverter=class extends StiMeterConverter{},__.ad.StiTableColumnConverter=class extends StiMeterConverter{},__.g.StiTextDashboardInteraction=class extends __.g.StiDashboardInteraction{isDefault(){return this.onHover==StiInteractionOnHover.ShowToolTip&&this.onClick==StiInteractionOnClick.OpenHyperlink&&this.hyperlinkDestination==StiInteractionOpenHyperlinkDestination.NewTab&&StiString.isNullOrEmpty(this.hyperlink)&&StiString.isNullOrEmpty(this.drillDownPageKey)&&null!=this.drillDownParameters&&0==this.drillDownParameters.length&&StiString.isNullOrEmpty(this.toolTip)}constructor(t,e,i,r,l,n,s){super(t,e,i,r,l,n,s),this.ident=StiInteractionIdent.Text,this.availableOnClick=StiAvailableInteractionOnClick.OpenHyperlink|StiAvailableInteractionOnClick.ShowDashboard,this.onClick=StiInteractionOnClick.OpenHyperlink}};let StiParserType=Stimulsoft.Report.StiParserType,StiTextDashboardInteraction=__.g.StiTextDashboardInteraction,StiDashboardDesignAssembly=Stimulsoft.Report.Dashboard.StiDashboardDesignAssembly,ImplementsIStiTextElement=Stimulsoft.Report.Dashboard.ImplementsIStiTextElement,IStiTextElement=Stimulsoft.Report.Dashboard.IStiTextElement,IStiTextFont=Stimulsoft.Report.Components.IStiTextFont,ImplementsIStiTreeViewElement=(StiExportToolAttribute.add("StiTextElement","Stimulsoft.Dashboard.Export.Tools.StiTextElementExportTool"),__.V.StiTextElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiTextFont,IStiSimpleShadow,IStiCornerRadius,IStiForeColor,IStiTextHorAlignment,IStiVertAlignment,IStiTextElement,IStiTitleElement,IStiGlobalizationProvider,...ImplementsIStiTextFormat,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiForeColor,...ImplementsIStiTextHorAlignment,...ImplementsIStiVertAlignment,...ImplementsIStiTextElement,...ImplementsIStiTitleElement,IStiJsonReportObject,IStiElementInteraction]);return(this.implements=()=>t)()}clone(t){let e,i,r,l=super.clone(t);return l.title=null!=this.title?this.title.clone():null,l.shadow=null==(e=this.shadow)?void 0:e.clone(),l.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),l.dashboardInteraction=null==(r=this.dashboardInteraction)?void 0:r.clone(),l.measures=this.measures.select(t=>t.clone()).toList(),l}meta(){return[...super.meta(),new StiRemoveMeta("HorAlignment"),new StiRemoveMeta("Padding"),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("Style"),new StiObjectMeta("DashboardInteraction").check(()=>null!=this.dashboardInteraction).set(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromJsonObject(t.value))?void 0:e.as(StiTextDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}).setXml(t=>{let e,i=null==(e=StiDashboardInteractionLoader.loadInteractionFromXml(t))?void 0:e.as(StiTextDashboardInteraction);null!=i&&(this.dashboardInteraction=i)}),new StiObjectMeta("Padding").get(()=>this.padding.saveToJsonObject(0,0,0,0)),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Text"),new StiEnumMeta("VertAlignment","",StiVertAlignment,StiVertAlignment.Center),new StiEnumMeta("SizeMode","",StiTextSizeMode,StiTextSizeMode.Fit),new StiBoolMeta("CrossFiltering","",!0),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiBoolMeta("RightToLeft","",!1),new StiObjectMeta("Measures").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.measures,t)).set(t=>this.measures.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value).as(StiTextMeasureMeter)).where(t=>null!=t))).setXml(t=>this.measures.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)).filter(t=>null!=t)))]}get isDefined(){return!StiString.isNullOrWhiteSpace(this.text)}get isQuerable(){return Stimulsoft.StiOptions.Engine.dashboardTextElementExpressionParser==StiParserType.DataParser&&!StiString.isNullOrEmpty(this.text)&&this.text.includes("{")}fetchAllMeters(){return this.getMeters()}getMeters(){if(Stimulsoft.StiOptions.Engine.dashboardTextElementExpressionParser==StiParserType.ReportParser)return new List;{if(StiString.isNullOrEmpty(this.text))return null;let e=new List,i=StiExpressionHelper.fetchBlocksFromExpression(this.text),r=StiTextMeasureMeter.getUniqueNames(this.measures);for(let t of i)r.containsKey(t)?e.add(r.get(t)):e.add(new __.V.StiTextMeter(t,t,t));return e.cast().toList()}}retrieveUsedDataNames(){return Stimulsoft.StiOptions.Engine.dashboardTextElementExpressionParser==StiParserType.ReportParser?super.retrieveUsedDataNames():StiUsedDataHelper.getMany2(this.getMeters()).distinct().toList()}getSimpleText(){return this.getHtmlTextHelper().getSimpleText(this.text,StiDashboardStyleHelper.getForeColor(this))}getMeasures(){return this.measures.cast().toList()}addMeasure(){let t=new StiTextMeasureMeter;t.expression="Sum(DataSource.Field)",this.measures.add(t)}getMeasure(t){return StiMeterHelper.Text.getMeter2(t)}removeMeasure(t){t<this.measures.length&&this.measures.removeAt(t)}removeAllMeasures(){this.measures.clear()}insertMeasure(t,e){let i=e.as(StiTextMeasureMeter);0<=t&&t<this.measures.length?this.measures.insert(t,i):this.measures.add(i)}getFont(){let t=this.getHtmlTextHelper();if(null==t)return null;return t.getFont(this,this.text,StiDashboardStyleHelper.getForeColor(this))}setFontName(t){let e=this.getHtmlTextHelper();null!=e&&(this.text=e.setFontName(this,this.text,t,StiDashboardStyleHelper.getForeColor(this)))}setFontSize(t){let e=this.getHtmlTextHelper();null!=e&&(this.text=e.setFontSize(this,this.text,t,StiDashboardStyleHelper.getForeColor(this)))}growFontSize(){let t=this.getHtmlTextHelper();null!=t&&(this.text=t.growFontSize(this,this.text,StiDashboardStyleHelper.getForeColor(this)))}shrinkFontSize(){let t=this.getHtmlTextHelper();null!=t&&(this.text=t.shrinkFontSize(this,this.text,StiDashboardStyleHelper.getForeColor(this)))}setFontBoldStyle(t){let e=this.getHtmlTextHelper();null!=e&&(this.text=e.setFontBoldStyle(this,this.text,t,StiDashboardStyleHelper.getForeColor(this)))}setFontItalicStyle(t){let e=this.getHtmlTextHelper();null!=e&&(this.text=e.setFontItalicStyle(this,this.text,t,StiDashboardStyleHelper.getForeColor(this)))}setFontUnderlineStyle(t){let e=this.getHtmlTextHelper();null!=e&&(this.text=e.setFontUnderlineStyle(this,this.text,t,StiDashboardStyleHelper.getForeColor(this)))}get horAlignment(){let t=this.getHtmlTextHelper();return t.getHorAlign(this,this.text,StiDashboardStyleHelper.getForeColor(this))}set horAlignment(t){this.text=this.getHtmlTextHelper().setHorAlignment(this,this.text,t,StiDashboardStyleHelper.getForeColor(this))}get style(){return this.componentStyle}set style(t){this.componentStyle=t}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break;case"Text":this.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text;case"Text":return this.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text","Text"]}get toolboxPosition(){return StiComponentToolboxPosition.TextElement}get localizedName(){return StiLocalization.get("Components","StiText")}getNestedPages(){if(null==this.dashboardInteraction||this.dashboardInteraction.onClick==StiInteractionOnClick.None)return null;let e=this.dashboardInteraction.drillDownPageKey;if(StiKeyHelper.isEmptyKey(e))return null;let t=this.report.pages.toList().firstOrDefault(t=>t.guid==e);if(null==t)return null;return new List([t])}getHtmlTextHelper(){return StiDashboardDesignAssembly.getHtmlTextHelper()}constructor(t=Rectangle.empty){super(t),this.title=new __.e.StiTitle,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.text="",this.rightToLeft=!1,this.group="",this.foreColor=Color.transparent,this.crossFiltering=!0,this.vertAlignment=StiVertAlignment.Center,this.defaultClientRectangle=new Rectangle(0,0,100,40),this.helpUrl="user-manual/dashboards_text.htm",this.sizeMode=StiTextSizeMode.Fit,this.measures=new List,this.title.text=this.localizedName,this.title.visible=!1,this.padding=StiPadding.create(0),this.dashboardInteraction=new StiTextDashboardInteraction}},__.aa.StiTextConverter=class{},__.J.StiTreeItem=class{toString(){return null==this.key?"":this.key.toString()}constructor(t,e){this.key=t,this.meter=e}},Stimulsoft.Report.Dashboard.ImplementsIStiTreeViewElement),IStiTreeViewElement=Stimulsoft.Report.Dashboard.IStiTreeViewElement,StiItemFilterMode=Stimulsoft.Report.Dashboard.StiItemFilterMode,StiTreeItem=(StiExportToolAttribute.add("StiTreeViewElement","Stimulsoft.Dashboard.Export.Tools.StiTreeViewElementExportTool"),__.J.StiTreeViewElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiTreeViewElement,IStiSimpleShadow,IStiCornerRadius,IStiTitleElement,IStiGlobalizationProvider,...ImplementsIStiTreeViewElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiTitleElement,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.keyMeters=this.keyMeters.select(t=>t.clone()).toList(),r.userFilters=this.userFilters.select(t=>t.clone()).toList(),r.transformActions=this.transformActions.select(t=>t.clone()).toList(),r.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),r.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.textFormat=this.textFormat.clone(),r.title=null!=this.title?this.title.clone():null,r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiStringNullOrEmptyMeta("ParentKey"),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiBoolMeta("ShowAllValue"),new StiBoolMeta("ShowBlanks"),new StiObjectMeta("KeyMeters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.keyMeters,t)).set(t=>this.keyMeters.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.keyMeters.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t)),new StiEnumMeta("SelectionMode","",StiItemSelectionMode,StiItemSelectionMode.Multi),new StiEnumMeta("FilterMode","",StiItemFilterMode,StiItemFilterMode.SelectedOnly),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("TextFormat").check(()=>null!=this.textFormat).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report))]}getParentKey(){return this.parentKey}setParentKey(t){this.parentKey=t}async applyDefaultFilters(){let t=await __.J.StiTreeViewHelper.fetchDefaultUserFilters(this);null!=t&&(this.userFilters=t)}getIdentityFilters(){return __.J.StiTreeViewHelper.getValueMeterExpressions(this).select(t=>{let e=new StiDataFilterRule;e.condition=StiDataFilterCondition.Any,e.elementKey=this.key,e.path=t}).toList().cast()}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}fetchAllMeters(){let t=new List;return t.addRange(this.keyMeters),t}getMeters(){let t=new List;return t.addRange(this.keyMeters),t}retrieveUsedDataNames(){return StiUsedDataHelper.getMany2(this.keyMeters)}get isDefined(){return null!=this.keyMeters&&0<this.keyMeters.length}getKeyMeter(t){return null!=t?StiMeterHelper.TreeView.getKey2(t):null}getKeyMeterByIndex(t){return t<this.keyMeters.length?this.keyMeters[t]:null}insertKeyMeter(t,e){let i=e.as(__.J.StiKeyTreeViewMeter);null!=i&&(0<=t&&t<this.keyMeters.length?this.keyMeters.insert(t,i):this.keyMeters.add(i))}removeKeyMeter(t){t<this.keyMeters.length&&this.keyMeters.removeAt(t)}removeAllKeyMeters(){this.keyMeters.clear()}addNewKeyMeter(){let t=new __.J.StiKeyTreeViewMeter;return this.keyMeters.add(t),t}addKey(t){null==this.keyMeters&&(this.keyMeters=new List),this.keyMeters.add(StiMeterHelper.TreeView.getKey2(t))}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter));if(null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)){let t=new __.J.StiKeyTreeViewMeter;t.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report)),this.keyMeters.clear(),this.keyMeters.add(t)}}setString(t,e){switch(t){case"Title.Text":this.title.text=e;break}}getString(t){switch(t){case"Title.Text":return this.title.text}throw new Error(`Property with name `+t)}getAllStrings(){return["Title.Text"]}get toolboxPosition(){return StiComponentToolboxPosition.TreeViewElement}get localizedName(){return StiLocalization.get("Components","StiTreeView")}constructor(t=Rectangle.empty){super(t),this.group="",this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.title=new __.e.StiTitle,this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.userFilters=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.font=new Font("Arial",8),this.foreColor=Color.transparent,this.showAllValue=!1,this.showBlanks=!1,this.selectionMode=StiItemSelectionMode.Multi,this.filterMode=StiItemFilterMode.SelectedOnly,this.textFormat=new StiGeneralFormatService,this.defaultClientRectangle=new Rectangle(0,0,200,300),this.helpUrl="user-manual/dashboards_data_filtering_tree_view.htm",this.keyMeters=new List,this.title.text=this.localizedName,this.title.visible=!1}},__.J.StiTreeItem),ImplementsIStiTreeViewBoxElement=(__.J.StiTreeViewHelper=class{static fetchItems(s,o){let e=new StiTreeItem;for(let t of s.rows){let l=0,n=e;for(let r of t){let t=null==r,e="string"==typeof r?StiString.isNullOrEmpty(r):null==r,i=t||e;if(o||!i){let t=null!=n.items?n.items.firstOrDefault(t=>t.key==r):null;null==t&&(t=new StiTreeItem(r,s.meters[l]),null==n.items&&(n.items=new List),n.items.add(t)),n=t}l++}}return e.items}static async fetchDefaultUserFilters(t){if(t.showAllValue)return null;if(t.selectionMode==StiItemSelectionMode.Multi)return null;let e=await StiElementDataCache.getOrCreate(t),i=this.fetchItems(e,t.showBlanks);if(null==i)return null;let r=i.firstOrDefault();if(null==r)return null;let l=r.meter,n=l.expression;return StiDataFilterCreator.createEqualBasedOnValue(r.key,n,t).toList()}static format(t,e){var i;if(e instanceof DateTime&&!t.textFormat.is(StiDateFormatService))return e.toShortDateString();let r=null==(i=null==t?void 0:t.report)?void 0:i.getParsedCulture();if(StiExtValueConverter.isEligable(e,r))return StiExtValueConverter.convert(e,r);return t.textFormat.format(e)}static getValueMeterExpressions(t){var e,i;return null==(i=null==(e=t.keyMeters)?void 0:e.select(t=>t.expression))?void 0:i.toList()}},Stimulsoft.Report.Dashboard.ImplementsIStiTreeViewBoxElement),IStiTreeViewBoxElement=Stimulsoft.Report.Dashboard.IStiTreeViewBoxElement,StiTreeViewHelper=(StiExportToolAttribute.add("StiTreeViewBoxElement","Stimulsoft.Dashboard.Export.Tools.StiTreeViewBoxElementExportTool"),__.I.StiTreeViewBoxElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiTreeViewBoxElement,IStiSimpleShadow,IStiCornerRadius,IStiFixedHeightElement,...ImplementsIStiTreeViewBoxElement,...ImplementsIStiSimpleShadow,...ImplementsIStiCornerRadius,...ImplementsIStiFixedHeightElement,IStiJsonReportObject]);return(this.implements=()=>t)()}meta(){return[new StiBoolMeta("FixedHeight","",!0),...super.meta(),new StiStringNullOrEmptyMeta("ParentKey"),new StiObjectMeta("UserFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.userFilters,t)).set(t=>this.userFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.userFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformActions").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformActions,t)).set(t=>this.transformActions.addRange(t.value.properties().select(t=>StiDataActionRule.loadFromJson(t.value)))).setXml(t=>this.transformActions.addRange(t.childNodes.map(t=>StiDataActionRule.loadFromXml(t)))),new StiObjectMeta("TransformFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformFilters,t)).set(t=>this.transformFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.transformFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiObjectMeta("TransformSorts").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.transformSorts,t)).set(t=>this.transformSorts.addRange(t.value.properties().select(t=>StiDataSortRule.loadFromJson(t.value)))).setXml(t=>this.transformSorts.addRange(t.childNodes.map(t=>StiDataSortRule.loadFromXml(t)))),new StiObjectMeta("DataFilters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.dataFilters,t)).set(t=>this.dataFilters.addRange(t.value.properties().select(t=>StiDataFilterRule.loadFromJson(t.value)))).setXml(t=>this.dataFilters.addRange(t.childNodes.map(t=>StiDataFilterRule.loadFromXml(t)))),new StiColorMeta("ForeColor","",Color.transparent),new StiStringNullOrEmptyMeta("Font").get(()=>StiJsonReportObjectHelper.Serialize.fontArial8(this.font)).set(t=>this.font=StiJsonReportObjectHelper.Deserialize.font(t.value,this.font)).setXml(t=>this.font=Stimulsoft.System.Convert.toFont(t.textContent)),new StiBoolMeta("ShowAllValue"),new StiBoolMeta("ShowBlanks"),new StiEnumMeta("SelectionMode","",StiItemSelectionMode,StiItemSelectionMode.Multi),new StiEnumMeta("FilterMode","",StiItemFilterMode,StiItemFilterMode.SelectedOnly),new StiObjectMeta("KeyMeters").get(t=>StiJsonReportObjectHelper.Serialize.objectArray(this.keyMeters,t)).set(t=>this.keyMeters.addRange(t.value.properties().select(t=>StiMeterLoader.loadFromJson(t.value)))).setXml(t=>this.keyMeters.addRange(t.childNodes.map(t=>StiMeterLoader.loadFromXml(t)))),new StiEnumMeta("Style","",StiElementStyleIdent,StiElementStyleIdent.Auto),new StiStringNullOrEmptyMeta("Group"),new StiStringNullOrEmptyMeta("CustomStyleName"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("TextFormat").check(()=>null!=this.textFormat).set(t=>this.textFormat=StiFormatService.createFromJsonObject(t.value)).setXml(t=>this.textFormat=StiFormatService.loadFormatFromXml(t,this.report)),new StiRemoveMeta("MinSize"),new StiRemoveMeta("MaxSize"),new StiEnumMeta("InclusionMode","",StiFilterInclusionMode,StiFilterInclusionMode.SelectionOnly)]}clone(t){let e,i,r=super.clone(t);return r.keyMeters=this.keyMeters.select(t=>t.clone()).toList(),r.userFilters=this.userFilters.select(t=>t.clone()).toList(),r.transformActions=this.transformActions.select(t=>t.clone()).toList(),r.transformFilters=this.transformFilters.select(t=>t.clone()).toList(),r.transformSorts=this.transformSorts.select(t=>t.clone()).toList(),r.dataFilters=this.dataFilters.select(t=>t.clone()).toList(),r.textFormat=this.textFormat.clone(),r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}get isFixedHeight(){return this.fixedHeight}getParentKey(){return this.parentKey}setParentKey(t){this.parentKey=t}async applyDefaultFilters(){let t=await __.I.StiTreeViewBoxHelper.fetchDefaultUserFilters(this);null!=t&&(this.userFilters=t)}getIdentityFilters(){return __.I.StiTreeViewBoxHelper.getValueMeterExpressions(this).select(t=>{let e=new StiDataFilterRule;e.condition=StiDataFilterCondition.Any,e.elementKey=this.key,e.path=t}).toList().cast()}get style(){return this._style}set style(t){(this._style=t)!=StiElementStyleIdent.Custom&&(this.customStyleName="")}fetchAllMeters(){let t=new List;return t.addRange(this.keyMeters),t}getMeters(){let t=new List;return t.addRange(this.keyMeters),t}retrieveUsedDataNames(){return StiUsedDataHelper.getMany2(this.keyMeters)}get isDefined(){return null!=this.keyMeters&&0<this.keyMeters.length}getKeyMeter(t){return null!=t?StiMeterHelper.TreeViewBox.getKey2(t):null}getKeyMeterByIndex(t){return t<this.keyMeters.length?this.keyMeters[t]:null}insertKeyMeter(t,e){let i=e.as(__.I.StiKeyTreeViewBoxMeter);null!=i&&(0<=t&&t<this.keyMeters.length?this.keyMeters.insert(t,i):this.keyMeters.add(i))}removeKeyMeter(t){t<this.keyMeters.length&&this.keyMeters.removeAt(t)}removeAllKeyMeters(){this.keyMeters.clear()}addNewKeyMeter(){let t=new __.I.StiKeyTreeViewBoxMeter;return this.keyMeters.add(t),t}addKey(t){null==this.keyMeters&&(this.keyMeters=new List),this.keyMeters.add(StiMeterHelper.TreeViewBox.getKey2(t))}convertFrom(t){let e=t.fetchAllMeters();if(null==e)return;let i=e.firstOrDefault(t=>t.is(IStiValueMeter));if(null!=(i=null==i?e.firstOrDefault(t=>t.is(IStiMeasureMeter)):i)){let t=new __.I.StiKeyTreeViewBoxMeter;t.loadFromJsonObject(i.saveToJsonObject(StiJsonSaveMode.Report)),this.keyMeters.clear(),this.keyMeters.add(t)}}get toolboxPosition(){return StiComponentToolboxPosition.TreeViewBoxElement}get localizedName(){return StiLocalization.get("Components","StiTreeViewBox")}getMinSize(){let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMinSize(t){}getMaxSize(){if(!this.fixedHeight)return super.getMaxSize();let t=null!=this.report?this.report.getCurrentPage():null;if(null==t)return Size.empty;let e=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,t.gridSize,!0);return new Size(0,e)}setMaxSize(t){this.fixedHeight||super.setMaxSize(t)}get fixedHeight(){return this._fixedHeight}set fixedHeight(t){var e;this._fixedHeight!=t&&(this._fixedHeight=t)&&(this.height=StiAlignValue.alignToMaxGrid(this.defaultClientRectangle.height,null==(e=this.page)?void 0:e.gridSize,!0))}constructor(t=Rectangle.empty){super(t),this.group="",this.inclusionMode=StiFilterInclusionMode.SelectionOnly,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this._style=StiElementStyleIdent.Auto,this.customStyleName="",this.userFilters=new List,this.transformActions=new List,this.transformFilters=new List,this.transformSorts=new List,this.dataTransformation={},this.dataFilters=new List,this.font=new Font("Arial",8),this.foreColor=Color.transparent,this.showAllValue=!1,this.showBlanks=!1,this.selectionMode=StiItemSelectionMode.Multi,this.filterMode=StiItemFilterMode.SelectedOnly,this.textFormat=new StiGeneralFormatService,this.defaultClientRectangle=new Rectangle(0,0,200,40),this.helpUrl="user-manual/dashboards_data_filtering_tree_view_box.htm",this._fixedHeight=!0,this.keyMeters=new List}},__.J.StiTreeViewHelper),ImplementsIStiWebContentElement=(__.I.StiTreeViewBoxHelper=class{static async fetchDefaultUserFilters(t){if(t.showAllValue)return null;if(t.selectionMode==StiItemSelectionMode.Multi)return null;let e=await StiElementDataCache.getOrCreate(t),i=StiTreeViewHelper.fetchItems(e,t.showBlanks);if(null==i)return null;let r=i.firstOrDefault();if(null==r)return null;let l=r.meter,n=l.expression;return StiDataFilterCreator.createEqualBasedOnValue(r.key,n,t).toList()}static format(t,e){var i,r;return e instanceof DateTime&&!t.textFormat.is(StiDateFormatService)?e.toShortDateString():StiExtValueConverter.isEligable(e,null==(i=null==t?void 0:t.report)?void 0:i.culture)?StiExtValueConverter.convert(e,null==(r=null==t?void 0:t.report)?void 0:r.culture):t.textFormat.format(e)}static getValueMeterExpressions(t){var e,i;return null==(i=null==(e=t.keyMeters)?void 0:e.select(t=>t.expression))?void 0:i.toList()}},Stimulsoft.Report.Dashboard.ImplementsIStiWebContentElement),IStiWebContentElement=Stimulsoft.Report.Dashboard.IStiWebContentElement;StiExportToolAttribute.add("StiWebContentElement","Stimulsoft.Dashboard.Export.Tools.StiWebContentElementExportTool"),__.Y.StiWebContentElement=class extends __.e.StiElement{implements(){let t=super.implements().concat([IStiWebContentElement,IStiCornerRadius,IStiSimpleShadow,IStiTitleElement,...ImplementsIStiWebContentElement,...ImplementsIStiCornerRadius,...ImplementsIStiSimpleShadow,...ImplementsIStiTitleElement,IStiJsonReportObject]);return(this.implements=()=>t)()}clone(t){let e,i,r=super.clone(t);return r.title=null!=this.title?this.title.clone():null,r.shadow=null==(e=this.shadow)?void 0:e.clone(),r.cornerRadius=null==(i=this.cornerRadius)?void 0:i.clone(),r}meta(){return[...super.meta(),new StiStringNullOrEmptyMeta("URL","url"),new StiStringNullOrEmptyMeta("EmbedCode"),new StiStringNullOrEmptyMeta("CornerRadius").get(()=>this.cornerRadius.toString()).set(t=>this.cornerRadius=StiCornerRadius.tryParse(t.value.toString())).setXml(t=>this.cornerRadius=StiCornerRadius.tryParse(t.textContent)),new StiStringNullOrEmptyMeta("Shadow").get(()=>StiJsonReportObjectHelper.Serialize.jShadow(this.shadow)).set(t=>this.shadow=StiJsonReportObjectHelper.Deserialize.simpleSahdow(t.value)).setXml(t=>this.shadow=StiSimpleShadow.loadFromXml(t.textContent)),new StiObjectMeta("Title").check(()=>null!=this.title).set(t=>this.title=__.e.StiTitle.createFromJsonObject(t.value)).setXml(t=>this.title=__.e.StiTitle.createFromXml(t))]}get isDefined(){return!StiString.isNullOrWhiteSpace(this.url)||!StiString.isNullOrWhiteSpace(this.embedCode)}get isQuerable(){return this.isDefined}fetchAllMeters(){return null}getMeters(){if(!this.isURLExpressionOrHyperlinkDataColumnDefined)return new List;if(this.isURLExpressionDefined)return StiExpressionHelper.fetchBlocksFromExpression(this.url).select(t=>new StiWebContentMeter(t,t,t)).cast().toList();{let t=StiHyperlinkProcessor.getRealDataColumnFromHyperlink(this.report,this.url),e=new List;return e.add(new StiWebContentMeter(t,t,t)),e}}retrieveUsedDataNames(){return StiUsedDataHelper.getMany2(this.getMeters()).distinct().toList()}get toolboxPosition(){return StiComponentToolboxPosition.WebContentElement}get localizedName(){return StiLocalization.get("Components","StiWebContent")}get isURLExpressionOrHyperlinkDataColumnDefined(){return this.isURLExpressionDefined||this.isHyperlinkDataColumnDefined}get isURLExpressionDefined(){var t,e;return(null==(t=this.url)?void 0:t[Stimulsoft.System.StiObject.stimulsoft]().contains("{"))&&(null==(e=this.url)?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().contains("}"))}get isHyperlinkDataColumnDefined(){return!StiString.isNullOrWhiteSpace(StiHyperlinkProcessor.getRealDataColumnFromHyperlink(this.report,this.url))}constructor(t=Rectangle.empty){super(t),this.title=new __.e.StiTitle,this.shadow=new StiSimpleShadow,this.cornerRadius=new StiCornerRadius(0),this.defaultClientRectangle=new Rectangle(0,0,120,120),this.helpUrl="user-manual/dashboards_image.htm",this.title.text=this.localizedName,this.title.visible=!1,this.padding=StiPadding.create(0)}},__.k.StiInplaceDesigner=class{};{let t;(t=>{t[t["Left"]=1]="Left",t[t["Right"]=2]="Right",t[t["Center"]=3]="Center",t[t["Justify"]=4]="Justify"})(t=__.r.StiRichTextAlignment||(__.r.StiRichTextAlignment={}))}__.r.StiRichBoxControl=class{selectAll(){this.selectedText=this.text}select(t,e){!StiString.isNullOrEmpty(this.text)&&t<this.text.length&&(this.selectedText=this.text.substr(t,e))}beginUpdate(){}endUpdate(){}setSelectionFont(t){return this.selectionFont=StiFontUtils.changeFontName(this.selectionFont,t),!0}setSelectionSize(t){return this.selectionFont=StiFontUtils.changeFontSize(this.selectionFont,t),!0}setSelectionBold(t){return this.selectionFont=StiFontUtils.changeFontStyleBold(this.selectionFont,t),!0}setSelectionItalic(t){return this.selectionFont=StiFontUtils.changeFontStyleItalic(this.selectionFont,t),!0}setSelectionUnderlined(t){return this.selectionFont=StiFontUtils.changeFontStyleUnderline(this.selectionFont,t),!0}constructor(){this.selectionFont=new Font("Arial",12),this.selectionColor=Color.black,this.font=new Font("Arial",12),this.text="",this.selectedText=""}};let StiTextRenderer=Stimulsoft.Base.Drawing.StiTextRenderer,StiRichTextAlignment=__.r.StiRichTextAlignment,ColorTranslator=Stimulsoft.System.Drawing.ColorTranslator,StiHtmlState=Stimulsoft.Base.Drawing.StiHtmlState,StiHtmlTagsState=Stimulsoft.Base.Drawing.StiHtmlTagsState,StiRichBoxControl=__.r.StiRichBoxControl,StiHtmlTextRender=(__.r.StiHtmlTextHelper=class{setFontName(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.setSelectionFont(i),this.getHtmlText(l,r)}setFontSize(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.setSelectionSize(Math.round(i)),this.getHtmlText(l,r)}growFontSize(t,e,i){let r=new StiRichBoxControl;return this.setHtmlText(e,t,r,i),r.selectAll(),r.setSelectionSize(Math.round(r.selectionFont.size+1)),this.getHtmlText(r,i)}shrinkFontSize(t,e,i){let r=new StiRichBoxControl;return this.setHtmlText(e,t,r,i),r.selectAll(),0<r.selectionFont.size-1&&r.setSelectionSize(Math.round(r.selectionFont.size-1)),this.getHtmlText(r,i)}setFontBoldStyle(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.setSelectionBold(i),this.getHtmlText(l,r)}setFontItalicStyle(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.setSelectionItalic(i),this.getHtmlText(l,r)}setFontUnderlineStyle(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.setSelectionUnderlined(i),this.getHtmlText(l,r)}setColor(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.selectionColor=i,this.getHtmlText(l,r)}setHorAlignment(t,e,i,r){let l=new StiRichBoxControl;return this.setHtmlText(e,t,l,r),l.selectAll(),l.selectionAlignment=this.getAlignment(i),this.getHtmlText(l,r)}getFont(t,e,i){let r=new StiRichBoxControl;return this.setHtmlText(e,t,r,i),r.selectAll(),r.selectionFont}getColor(t,e,i){let r=new StiRichBoxControl;return this.setHtmlText(e,t,r,i),r.selectAll(),r.selectionColor}getHorAlign(t,e,i){let r=new StiRichBoxControl;return this.setHtmlText(e,t,r,i),r.selectAll(),this.getAlignment2(r.selectionAlignment)}setHtmlText(t,e,s,i){let r="Arial",l=12,n=(s.selectAll(),s.setSelectionFont(r),s.setSelectionSize(l),new StiHtmlTagsState(!1,!1,!1,!1,l,r,i,Color.white,!1,!1,0,0,0,StiTextHorAlignment.Center)),o=null,a=new StiHtmlState(n,0),u=StiTextRenderer.parseHtmlToStates(t,a,!1);for(let n of u){let t=s.text.length,e=(s.select(t,0),null),i=(e=StiString.isNullOrEmpty(n.ts.href)?n.text.toString():`<a href="${n.ts.href}">${n.text.toString()}</a>`,s.text+=e,s.select(t,n.text.length),FontStyle.Regular),r=(n.ts.bold&&(i|=FontStyle.Bold),n.ts.italic&&(i|=FontStyle.Italic),n.ts.underline&&(i|=FontStyle.Underline),n.ts.fontName),l=n.ts.fontSize;null==o&&(o=s.font=new Font(r,l)),s.selectionFont=StiFontUtils.changeFontStyle2(r,l,i),s.selectionColor=n.ts.fontColor,s.selectionAlignment=this.getAlignment(n.ts.textAlign)}s.select(0,0)}getHtmlText(o,a){let u=!1,S=!1,m=!1,h=a,c="",t=(o.selectAll(),null!=o.selectionFont?o.selectionFont.name:"Arial"),e=null!=o.selectionFont?o.selectionFont.sizeInPoints:12,i=Enum.getName(StiRichTextAlignment,o.selectionAlignment);c=c+`<font face="${t}" size="${e}">`+`<text-align="${i}">`;for(let s=0;s<o.text.length;s++){o.select(s,1);let t=o.selectionFont,e=null!=t&&t.style&FontStyle.Bold,i=null!=t&&t.style&FontStyle.Italic,r=null!=t&&t.style&FontStyle.Underline,l=o.selectionColor,n="\n"==o.text[s];n&&(c+="<br />"),e&&!u&&(u=!0,c+="<b>"),!e&&u&&(u=!1,c+="</b>"),i&&!S&&(S=!0,c+="<i>"),!i&&S&&(S=!1,c+="</i>"),r&&!m&&(m=!0,c+="<u>"),!r&&m&&(m=!1,c+="</u>"),h.equals(l)||(h=(h.equals(a)?c+=`<font-color="${ColorTranslator.toHtml(l)}">`:l.equals(a)?c+="</font-color>":c=(c+="</font-color>")+`<font-color="${ColorTranslator.toHtml(l)}">`,l)),c+=o.text[s]}return h.equals(a)||(c+="</font-color>"),m&&(c+="</u>"),S&&(c+="</i>"),u&&(c+="</b>"),(c=c+"</text-align>"+"</font>").toString()}getAlignment(t){switch(t){case StiTextHorAlignment.Left:return StiRichTextAlignment.Left;case StiTextHorAlignment.Center:return StiRichTextAlignment.Center;case StiTextHorAlignment.Right:return StiRichTextAlignment.Right;case StiTextHorAlignment.Width:return StiRichTextAlignment.Justify;default:throw new Error("NotSupportedException")}}getAlignment2(t){switch(t){case StiRichTextAlignment.Left:return StiTextHorAlignment.Left;case StiRichTextAlignment.Center:return StiTextHorAlignment.Center;case StiRichTextAlignment.Right:return StiTextHorAlignment.Right;case StiRichTextAlignment.Justify:return StiTextHorAlignment.Width;default:throw new Error("NotSupportedException")}}getSimpleText(t,e){let i=new StiRichBoxControl;return this.setHtmlText(t,null,i,e),i.text}},Stimulsoft.Report.Components.StiHtmlTextRender),StringTrimming=Stimulsoft.System.Drawing.StringTrimming,HotkeyPrefix=Stimulsoft.System.Drawing.Text.HotkeyPrefix,StiTextElement=__.V.StiTextElement,StiTextOptions=Stimulsoft.Base.Drawing.StiTextOptions,StiTextDrawing=(__.h.StiAutoSizeHtmlTextHelper=class{static measure(t,e,i,r,l=null){let n=this.getTextScale(l,r),s=(e.height=1e3,new Font("Arial",12)),o=new StiText,a=(o.font=s,o.clientRectangle=e.clone(),o.text=i,r.as(StiTextElement)),u=(null==a||a.sizeMode!=StiTextSizeMode.WordWrap&&a.sizeMode!=StiTextSizeMode.FitAndWordWrap||(o.wordWrap=!0),StiHtmlTextRender.measureString(o));return new Size(u.width*n,u.height*n)}static getDefaultTextOptions(){return new StiTextOptions(!1,!1,!1,0,HotkeyPrefix.None,StringTrimming.None)}static getTextScale(t,e){if(null!=t)return t;let i=e[Stimulsoft.System.StiObject.stimulsoft]().as(IStiElement);return null!=i&&i.isDesigning?e.zoom:1}},Stimulsoft.Base.Drawing.StiTextDrawing),StiLinesSegmentGeom=(__.h.StiAutoSizeTextHelper=class{static toAlignment(t){switch(t){case StiHorAlignment.Left:return StiTextHorAlignment.Left;case StiHorAlignment.Center:return StiTextHorAlignment.Center;case StiHorAlignment.Right:return StiTextHorAlignment.Right;default:throw new StiTypeNotRecognizedException(t)}}static measure(t,e,i){let r=StiTextDrawing.measureString(t,e,i);return new Size(r.width,r.height)}static measure2(t,e,i,r){let l=new StiTextOptions,n=(l.angle=0,l.wordWrap=!0,StiTextDrawing.measureString(t,e,i,r,l));return new Size(n.width,n.height)}static measureFontSize(t,e,i,r){let l=this.measure(t,e,r),n=l.width>i.width?i.width/l.width:1,s=i.height<l.height?i.height/l.height:1,o=Math.min(Math.abs(n),Math.abs(s));return r.size*o}},__.h.StiCardsElementHelper=class{static minDataColumnValue(t,e,i){if(!(t.is2(StiDataBarsCardsColumn)||t.is2(StiColorScaleCardsColumn)||t.is2(StiBubbleCardsColumn)))return 0;return e.any()?e.min(t=>StiValueHelper.tryToNumber(t[i])):0}static maxDataColumnValue(t,e,i){if(!(t.is2(StiDataBarsCardsColumn)||t.is2(StiColorScaleCardsColumn)||t.is2(StiBubbleCardsColumn)))return 0;return e.any()?e.max(t=>StiValueHelper.tryToNumber(t[i])):0}},Stimulsoft.Base.Context.StiLinesSegmentGeom),StiFontGeom=(__.j.StiVisual=class{async draw(t,e){}drawArrowMore(t,e,i){let r=[],l=(r[0]=new Point(e.right-5*i,e.bottom-5*i),r[1]=new Point(e.right-5*i,e.bottom-15*i),r[2]=new Point(e.right-15*i,e.bottom-5*i),new List([new StiLinesSegmentGeom(r)]));t.fillPath(Color.fromArgb2(140,140,140),l,e.clone(),null)}},Stimulsoft.Base.Context.StiFontGeom),StiRotationMode=Stimulsoft.Base.Drawing.StiRotationMode,StiImageHelper=(__.h.StiStringFormatHelper=class{static getStringFormatGeom(t){let e=t.getGenericStringFormat();return e.trimming=StringTrimming.None,e.alignment=StringAlignment.Center,e.lineAlignment=StringAlignment.Center,e}static measureAlignmentParameters(t,e,i,r){switch(t){case StiHorAlignment.Left:i.ref=StiRotationMode.LeftCenter,r.ref.x=e.x,r.ref.y=e.y+e.height/2;break;case StiHorAlignment.Center:i.ref=StiRotationMode.CenterCenter,r.ref.x=e.x+e.width/2,r.ref.y=e.y+e.height/2;break;case StiHorAlignment.Right:i.ref=StiRotationMode.RightCenter,r.ref.x=e.x+e.width,r.ref.y=e.y+e.height/2;break}}static getFontSize(t,e,i,r){let l=new Font(r.fontFamily.name,25,r.style,r.unit),n=t.measureString(i,StiFontGeom.create(l));if(0==n.width||0==n.height)return 0;let s=e.width/n.width,o=e.height/n.height,a=o<s?o:s;return 25*a}},Stimulsoft.Report.Components.StiImageHelper),StiLineSegmentGeom=Stimulsoft.Base.Context.StiLineSegmentGeom,StiWinLossSparklinesCellPainter=Stimulsoft.Report.Painters.StiWinLossSparklinesCellPainter,StiLineSparklinesCellPainter=Stimulsoft.Report.Painters.StiLineSparklinesCellPainter,StiColumnSparklinesCellPainter=Stimulsoft.Report.Painters.StiColumnSparklinesCellPainter,StiSparklinesType=__.K.StiSparklinesType,StiStringFormatHelper=__.h.StiStringFormatHelper;{class StiCardsCellDrawer{static dataBarsDraw(e,t,i,r,l,n,s,o,a,u){let S,m=StiTextFormatHelper.formatBasedOnColumnType2(i,n.textFormat,n,o);if(null==o||0==o)return;0<a&&(a=0),u<0&&(u=0);let h=t.clone(),c=(h.inflate(-1*s,-1*s),e.fillRectangle(Color.fromArgb3(40,r.cellDataBarsPositive),h.clone(),null),u+Math.abs(a)),d=h.width*Math.abs(a)/c,g=h.width*u/c,p=h.width*Math.abs(o)/c,C=p>g;if(C&&(p=g),h.x+=o<0?d-p:d,h.width=p,0<h.width&&0<h.height){let t=o<0?r.cellDataBarsNegative:r.cellDataBarsPositive;if(e.fillRectangle(t,h,null),C){let t=new Rectangle(h.right-6*s,h.y,6*s,h.height);e.fillRectangle(r.cellDataBarsOverlapped,t,null)}}let b=null!=(S=StiDashboardStyleHelper.getFont(i))?S:n.font,w=new Font(b.fontFamily.name,b.size*s),f=e.measureString(m,new StiFontGeom(w.fontFamily.name,w.size,w.style,Stimulsoft.System.Drawing.GraphicsUnit.Point));StiCardsCellDrawer.drawText(e,m,b,l,n.horAlignment,n.vertAlignment,t,f,s)}static colorScaleDraw(t,e,i,r,l,n,s,o,a,u){let S,m=StiTextFormatHelper.formatBasedOnColumnType2(i,n.textFormat,n,o),h=this.getScaleColor(StiValueHelper.tryToNumber(o),a,u,r.cellBackColor,n.minimumColor,n.maximumColor),c=e.clone(),d=(c.inflate(-1*s,-1*s),t.fillRectangle(h,c,null),null!=(S=StiDashboardStyleHelper.getFont(i))?S:n.font),g=new Font(d.fontFamily.name,d.size*s),p=t.measureString(m,new StiFontGeom(g.fontFamily.name,g.size,g.style,Stimulsoft.System.Drawing.GraphicsUnit.Point));this.drawText(t,m,d,l,n.horAlignment,n.vertAlignment,e,p,s)}static getScaleColor(e,i,r,l,n,s){let o=(r-i)/2,a=(e=Math.min(e,r),0),u,S;if(o<(e=Math.max(e,i))){let t=r-o;S=0!=t?(a=(e-o)/t,u=Color.fromArgb3(255,l),Color.fromArgb3(255,s)):(u=Color.lightGray,Color.lightGray)}else{let t=o-i;S=0!=t?(a=e/t,u=Color.fromArgb3(255,n),Color.fromArgb3(255,l)):(u=Color.lightGray,Color.lightGray)}let t=(S.a-u.a)*a+u.a,m=(S.r-u.r)*a+u.r,h=(S.g-u.g)*a+u.g,c=(S.b-u.b)*a+u.b;return t=Math.min(t,255),m=Math.min(m,255),h=Math.min(h,255),c=Math.min(c,255),t=Math.max(t,0),m=Math.max(m,0),h=Math.max(h,0),c=Math.max(c,0),Color.fromArgb(Math.round(t),Math.round(m),Math.round(h),Math.round(c))}static sparklinesDraw(e,i,r,t,l){let n=this.castToArray(t);if(null!=n){let t=n;switch(r.type){case StiSparklinesType.Column:StiColumnSparklinesCellPainter.draw(e,i,t,r.allowCustomColors?r.positiveColor:l.cellSparkline,r.allowCustomColors?r.negativeColor:l.cellSparkline);break;case StiSparklinesType.Line:StiLineSparklinesCellPainter.draw(e,i,t,r.allowCustomColors?r.positiveColor:l.cellSparkline,!1,r.showFirstLastPoints,r.showHighLowPoints);break;case StiSparklinesType.Area:StiLineSparklinesCellPainter.draw(e,i,t,r.allowCustomColors?r.positiveColor:l.cellSparkline,!0,r.showFirstLastPoints,r.showHighLowPoints);break;case StiSparklinesType.WinLoss:StiWinLossSparklinesCellPainter.draw(e,i,t,r.allowCustomColors?r.positiveColor:l.cellWinLossPositive,r.allowCustomColors?r.negativeColor:l.cellWinLossNegative);break;default:throw new StiTypeNotRecognizedException(r.type)}}}static castToArray(t){return StiArray.isArray(t)?t:null}static bubbleDraw(l,n,s,r,o,a,u,S,t,e,i=!0){var m;if(0==S)return;let h=StiTextFormatHelper.formatBasedOnColumnType2(s,a.textFormat,a,S),c=(0<t&&(t=0),e<0&&(e=0),a.horAlignment),d=n.clone();if(d.inflate(-1,-1),d=this.calculateBubbleRect(d,a,Math.abs(S),t,e,u),i&&c!=StiHorAlignment.Center){let t=a.horAlignment==StiHorAlignment.Left?StiHorAlignment.Right:StiHorAlignment.Left,e=null!=(m=StiDashboardStyleHelper.getFont(s))?m:a.font,i=new Font(e.fontFamily.name,e.size*u),r=l.measureString(h,new StiFontGeom(i.fontFamily.name,i.size,i.style,Stimulsoft.System.Drawing.GraphicsUnit.Point));this.drawText(l,h,e,o,t,a.vertAlignment,n,r,u)}if(0<d.width&&0<d.height){let t=a.allowCustomColors?a.positiveColor:r.cellDataBarsPositive,e=a.allowCustomColors?a.negativeColor:r.cellDataBarsNegative,i=S<0?e:t;l.fillEllipse(i,d.x,d.y,d.width,d.height,null)}}static calculateBubbleRect(t,e,i,r,l,n){let s=e.as(IStiHorAlignment);if(null==s)return t;let o=t.height,a=Math.max(Math.abs(r),Math.abs(l)),u=Math.abs(o*i/a);switch(s.horAlignment){case StiHorAlignment.Right:return new Rectangle(t.right-o+(o-u)/2,t.y+(t.height-u)/2,u,u);case StiHorAlignment.Center:return new Rectangle(t.x+(t.width-u)/2,t.y+(t.height-u)/2,u,u);case StiHorAlignment.Left:return new Rectangle(t.x+(o-u)/2,t.y+(t.height-u)/2,u,u)}return t}static indicatorDraw(t,e,i,r,l,n,s){let o,a=this.getCellText(i,l,s),u=null!=(o=StiDashboardStyleHelper.getFont(i))?o:l.font,S=__.t.StiCardsVisual.getFontGeom(u,n),m=t.measureString(a,S).width,h=this.calculateIndicatorRect(e,l,n,m,i.isExporting),c=(this.drawIndicator(t,h,s,r,i.isExporting),this.getColor(l.foreColor,s,r)),d=StiCardsCellDrawer.calculateTextRect(e,l,n,m,i.isExporting),g=new Font(u.fontFamily.name,u.size*n),p=t.measureString(a,new StiFontGeom(g.fontFamily.name,g.size,g.style,Stimulsoft.System.Drawing.GraphicsUnit.Point));this.drawText(t,a,u,c,l.horAlignment,l.vertAlignment,d,p,n)}static calculateTextRect(t,e,i,r,l){let n=this.calculateIndicatorRect(t,e,i,r,l),s=2*n.width;switch(this.getHorAlignment(e)){case StiHorAlignment.Left:return new Rectangle(t.x+s,t.y,t.width-s,t.height);case StiHorAlignment.Right:return new Rectangle(t.x,t.y,t.width-s,t.height);case StiHorAlignment.Center:return new Rectangle(t.x,t.y,t.width,t.height)}return t}static getColor(t,e,i){if(!t.equals(Color.transparent))return t;if(0<e)return i.cellIndicatorPositive;if(e<0)return i.cellIndicatorNegative;return i.cellIndicatorNeutral}static calculateIndicatorRect(e,t,i,r,l){let n=16*i;switch(this.getHorAlignment(t)){case StiHorAlignment.Left:e=new Rectangle(e.x,e.y,n,e.height);break;case StiHorAlignment.Right:e=new Rectangle(e.right-n,e.y,n,e.height);break;case StiHorAlignment.Center:{let t=r+n;e=new Rectangle(e.right-(e.width-t)/2-n,e.y,n,e.height);break}}return e.inflate(-4*i,-4*i),e}static getHorAlignment(t){let e=t.as(IStiHorAlignment);return null!=e?e.horAlignment:StiHorAlignment.Right}static getCellText(t,e,i){if(null==i)return"";return StiTextFormatHelper.formatAsPercentage2(null==t?void 0:t.report,e.textFormat,i)}static drawIndicator(S,m,h,c,t){let d=Math.min(m.width,m.height);if(null==h||0==h)S.fillRectangle(c.cellIndicatorNeutral,new Rectangle(m.x+(m.width-d)/2,m.y+(m.height-4)/2,d,5),null);else{let t=.75*d,e=(m=new Rectangle(m.x+(m.width-d)/2,m.y+(m.height-t)/2,d,t)).width/2,i,r,l,n=(l=0<h?(i=new Point(m.left+e,m.top),r=new Point(m.left,m.bottom),new Point(m.right,m.bottom)):(i=new Point(m.left+e,m.bottom),r=new Point(m.left,m.top),new Point(m.right,m.top)),0<h?c.cellIndicatorPositive:c.cellIndicatorNegative),s=new List,o=new StiLineSegmentGeom(i,r),a=new StiLineSegmentGeom(r,l),u=new StiLineSegmentGeom(l,i);s.add(o),s.add(a),s.add(u),S.fillPath(n,s,m,null)}}static imageDraw(t,e,i){let r=StiImageHelper.getImageBytesFromObject(i);t.drawImage(r,e)}static drawWordWrapText(t,e,i,r,l,n,s,o,a){let u=t.getGenericStringFormat();switch(u.trimming=StringTrimming.None,u.lineAlignment=StringAlignment.Center,l){case StiHorAlignment.Left:u.alignment=StringAlignment.Near;break;case StiHorAlignment.Center:u.alignment=StringAlignment.Center;break;case StiHorAlignment.Right:u.alignment=StringAlignment.Far;break}let S=0,m=(s.width<o.width?s:o).width,h=StiRotationMode.CenterCenter;switch(l){case StiHorAlignment.Left:S=s.x;break;case StiHorAlignment.Center:S=s.x+s.width/2-m/2;break;case StiHorAlignment.Right:S=s.x+s.width-m;break}let c=0;switch(n){case StiVertAlignment.Top:c=s.y;break;case StiVertAlignment.Center:c=s.y+s.height/2-o.height/2;break;case StiVertAlignment.Bottom:c=s.y+s.height-o.height;break}let d=new Rectangle(S,c,m,o.height),g=__.t.StiCardsVisual.getFontGeom(i,a);t.drawRotatedString6(e,g,r,d,u,h,0,!0,s.width)}static drawText(t,e,i,r,l,n,s,o,a){let u=StiStringFormatHelper.getStringFormatGeom(t),S=(u.alignment=StringAlignment.Far,0),m=(s.width<o.width?s:o).width;switch(l){case StiHorAlignment.Left:S=s.x;break;case StiHorAlignment.Center:S=s.x+s.width/2-m/2;break;case StiHorAlignment.Right:S=s.x+s.width-m;break}let h=0;switch(n){case StiVertAlignment.Top:h=s.y;break;case StiVertAlignment.Center:h=s.y+s.height/2-o.height/2;break;case StiVertAlignment.Bottom:h=s.y+s.height-o.height;break}let c=new Rectangle(S,h,m,o.height),d=__.t.StiCardsVisual.getFontGeom(i,a),g=this.getMeasureText(t,e,d,s.width);t.drawString(g,d,r,c,u)}static getMeasureText(i,r,l,n){if(!StiString.isNullOrEmpty(r))for(let e=0;r.length>e;e++){let t=r.substring(0,e);if(n<i.measureString(t,l).width){if(4<t.length)return t.substring(0,t.length-3)+"...";if(1<t.length)return t.substring(0,1)+"..."}}return r}}__.t.StiCardsCellDrawer=StiCardsCellDrawer}let StiInteractionDataGeom=Stimulsoft.Base.Context.StiInteractionDataGeom,StiCardInteractionData=Stimulsoft.Base.Context.StiCardInteractionData,ListExt=Stimulsoft.Data.Extensions.ListExt,StiMeterIdent=__.e.StiMeterIdent,StiContextRoundedRectangleCreator=Stimulsoft.Report.Painters.StiContextRoundedRectangleCreator,StiContextPainter=Stimulsoft.Base.Context.StiContextPainter,StiElementScale=Stimulsoft.Report.Dashboard.Helpers.StiElementScale,StiElementConsts=Stimulsoft.Base.Dashboard.StiElementConsts,StiCardsCellDrawer=__.t.StiCardsCellDrawer,StiPenGeom=Stimulsoft.Base.Context.StiPenGeom,StiCardsColumnVisibilityHelper=Stimulsoft.Report.Dashboard.StiCardsColumnVisibilityHelper,StiCardsElementHelper=__.h.StiCardsElementHelper,StiContext=Stimulsoft.Base.Context.StiContext;{class StiCardsVisual extends __.j.StiVisual{async draw(t,e){this.paintCards(t,e)}paintCards(n,s){let o=n.options.zoom,a=this.dataTable.meters.where(t=>t.is(StiCardsColumn)).cast().toList(),u=StiDashboardStyleHelper.getCardsStyle(this.element),t={},e={},S=this.processColumnsWithTopN(a),m=(this.getCardRectanglesList(a,S,s,o,t,e),t.ref),h=e.ref,c=new List,d=new List;for(let r=0;r<a.length;r++){let t=a[r],e=StiCardsElementHelper.minDataColumnValue(t,S,r),i=StiCardsElementHelper.maxDataColumnValue(t,S,r);c.add(e),d.add(i)}let g,p=1==h.length;for(let e=0;e<S.length;e++){let t=S[e],i=m[e],r=h[e],l=(g||p||!(1<i.right-s.right||1<i.bottom-s.bottom)||(g=!0),1);if(p){let t=this.unionRectangles(r),e=(s.height-this.element.cards.margin.top*o-this.element.cards.margin.bottom*o)/t.height;e<1&&(l=e,r=this.zoomAndMoveUp(r,l),i=new Rectangle(i.x,i.y,i.width,s.height))}this.paintCardItem(n,i,this.element,e,r,a,t,c,d,u,o,l)}if(g){let t=StiElementScale.factor(this.element);this.drawArrowMore(n,s,t)}}static processTopNElements(t,e,i){if(e.mode==StiDataTopNMode.None)return t;let r=new List;for(let e of t){let t=StiValueHelper.tryToNumber(e[i]);r.add({key:t,value:e})}e.mode==StiDataTopNMode.Bottom?r.sort((t,e)=>t.key[Stimulsoft.System.StiObject.stimulsoft]().compareTo(e.key)):r.sort((t,e)=>e.key[Stimulsoft.System.StiObject.stimulsoft]().compareTo(t.key));let l=r.take(e.count).select(t=>t.value).toList();return l}processColumnsWithTopN(t){let r=this.dataTable.rows,l=0;for(let i of t){let t=i.topN,e=StiCardsVisual.processTopNElements(r,t,l);r=e.select(t=>t).toList(),l++}return r}unionRectangles(t){let e=Math.min(...t.map(t=>t.x)),i=Math.min(...t.map(t=>t.y)),r=Math.max(...t.map(t=>t.right)),l=Math.max(...t.map(t=>t.bottom)),n=r-e,s=l-i;return new Rectangle(e,i,n,s)}zoomAndMoveUp(t,l){let n=[];for(let r of t){let t=r.height*l,e=r.y*l,i=new Rectangle(r.x,e,r.width,t);n.push(i)}return n}getCardRectanglesList(l,t,e,n,i,r){let s=new List,o=new List,a=new StiContextPainter,u=new StiContext(a,!0,!1,!1,n),S=0,m=0;for(let r of t){let t={ref:new List},e=StiCardsVisual.measureCards(u,this.element,l,r,t,n),i=t.ref;S=Math.max(S,e.width),m=Math.max(m,e.height),o.add(i)}if(0<this.element.columnCount&&this.element.orientation==Stimulsoft.Report.Dashboard.StiItemOrientation.Horizontal?S=e.width/this.element.columnCount:0<this.element.columnCount&&this.element.orientation==Stimulsoft.Report.Dashboard.StiItemOrientation.Vertical&&(m=e.height/this.element.columnCount),0==this.element.columnCount&&this.element.orientation==Stimulsoft.Report.Dashboard.StiItemOrientation.Horizontal&&(S=Math.max(S,e.width/t.length)),l.any(t=>t.wordWrap)){o.clear();for(let r of t){let t={ref:new List},e=S-this.element.cards.margin.left*n-this.element.cards.margin.right*n-this.element.cards.padding.left*n-this.element.cards.padding.right*n,i=StiCardsVisual.measureCards2(u,this.element,l,r,t,n,e);m=Math.max(m,i.height),o.add(t.ref)}}s=this.element.orientation==Stimulsoft.Report.Dashboard.StiItemOrientation.Horizontal?this.getRectanglesHorizontalOrientation(t,e,S,m):this.getRectanglesVerticalOrientation(t,e,S,m),i.ref=s,r.ref=o}getRectanglesHorizontalOrientation(e,i,r,l){let n=new List,s=Math.floor(i.width/r),o=(0==s&&(s=1),r=i.width/s,i.x),a=i.y,u=0;for(let t=0;t<e.length;t++){let t=new Rectangle(o,a,r,l);n.add(t),o+=t.width,++u>=s&&(o=i.x,a+=t.height,u=0)}return n}getRectanglesVerticalOrientation(e,i,r,l){let n=new List,s=Math.floor(i.height/l),o=(1<s&&(l=i.height/s),i.x),a=i.y,u=0;for(let t=0;t<e.length;t++){let t=new Rectangle(o,a,r,l);n.add(t),a+=t.height,++u>=s&&(a=i.y,o+=t.width,u=0)}return n}getContentRectangle(t){if(null==this.dataTable||this.dataTable.rows.length<=1)return t;let e=this.dataTable.meters.where(t=>t.is(StiCardsColumn)).cast().toList(),i=this.processColumnsWithTopN(e),r={},l={},n=(this.getCardRectanglesList(e,i,t,1,r,l),r.ref),s=Rectangle.empty;for(let t of n)s=Rectangle.union(t,s);return s}paintCardItem(g,p,C,e,n,b,w,f,y,M,I,T){let i=new Rectangle(p.x+C.cards.margin.left*I,p.y+C.cards.margin.top*I,p.width-C.cards.margin.left*I-C.cards.margin.right*I,p.height-C.cards.margin.top*I-C.cards.margin.bottom*I);if(g.pushClip(i),null==C.cards.cornerRadius||C.cards.cornerRadius.isEmpty)g.fillRectangle(this.getColor(e),i,null);else{let t=StiContextRoundedRectangleCreator.create(i,C.cards.cornerRadius,I);g.fillPath(this.getColor(e),t,i,null)}let r=new List,l=new List;for(let e=0;e<b.length;e++){let t=b[e];l.add(e),!t.wrapLine&&e!=b.length-1||(r.add(l),l=new List)}let x=new List;for(let l of r){let r=(p.width-C.cards.margin.left*I-C.cards.margin.right*I-C.cards.padding.left*I-C.cards.padding.right*I)/l.length;for(let i=0;i<l.length;++i){let t=l[i],e=n[t];x.add(new Rectangle(r*i,e.y,r,e.height))}}for(let d=0;d<w.length;d++){let n=b[d],t=StiCardsColumnVisibilityHelper.getVisible(n,C.report);if(!t)continue;let s=w[d],e=f[d],i=y[d],o=StiCardsVisual.getForeColor(C,b[d],M),r=StiDashboardStyleHelper.getFont(C),a=null!=r?r:n.font,l=x[d],u=p.x+C.cards.margin.left*I+C.cards.padding.left*I+l.x,S=p.y+C.cards.margin.top*I+C.cards.padding.top*I+l.y,m=l.width,h=l.height-C.cards.padding.top*I-C.cards.padding.bottom*I,c=new Rectangle(u,S,m,h);if(!this.element.isDesigning){let t=Color.transparent,e=StiDashboardStyleHelper.getHotBackColor(this.element);g.fillRectangle3(new StiSolidBrush(t),new StiSolidBrush(e),c,this.getInteractionDataGeom(s?s.toString():"",n,d))}if(n.is2(StiDataBarsCardsColumn)){let t=n.as(StiDataBarsCardsColumn);StiCardsCellDrawer.dataBarsDraw(g,c,C,M,o,t,I,StiValueHelper.tryToNumber(s),e,i)}else if(n.is2(StiColorScaleCardsColumn)){let t=n.as(StiColorScaleCardsColumn);StiCardsCellDrawer.colorScaleDraw(g,c,C,M,o,t,I,StiValueHelper.tryToNumber(s),e,i)}else if(n.is2(StiSparklinesCardsColumn)){let t=n.as(StiSparklinesCardsColumn);StiCardsCellDrawer.sparklinesDraw(g,c,t,s,M)}else if(n.is2(StiBubbleCardsColumn)){let t=n.as(StiBubbleCardsColumn);StiCardsCellDrawer.bubbleDraw(g,c,C,M,o,t,I,StiValueHelper.tryToNumber(s),e,i)}else if(n.is2(StiIndicatorCardsColumn)){let t=n.as(StiIndicatorCardsColumn);StiCardsCellDrawer.indicatorDraw(g,c,C,M,t,I,StiValueHelper.tryToNullableNumber(s))}else{let l=StiImageHelper.getImageFromObject(s);if(null!=l&&null!=l.height){let t=c.height/l.height,e=l.width*t,i=0;switch(n.horAlignment){case StiHorAlignment.Left:i=c.x;break;case StiHorAlignment.Center:i=c.x+(c.width-e)/2;break;case StiHorAlignment.Right:i=c.x+c.width-e;break}let r=new Rectangle(i,c.y,e,c.height);StiCardsCellDrawer.imageDraw(g,r,s)}else{let t=this.processRowValue(s,n),i=StiTextFormatHelper.formatBasedOnColumnType2(C,n.textFormat,n,t),e=n.as(IStiWordWrap),r=new StiFontGeom(a.fontFamily.name,a.size*T,a.style,Stimulsoft.System.Drawing.GraphicsUnit.Point);if(null!=e&&e.wordWrap){let t=g.getGenericStringFormat(),e=(t.trimming=StringTrimming.None,t.alignment=StringAlignment.Center,t.lineAlignment=StringAlignment.Center,g.measureString2(i,r,c.width,t));StiCardsCellDrawer.drawWordWrapText(g,i,a,o,n.horAlignment,n.vertAlignment,c,e,I*T)}else{let t=g.measureString(i,r);StiCardsCellDrawer.drawText(g,i,a,o,n.horAlignment,n.vertAlignment,c,t,I*T)}}}}g.popClip();let s=new StiPenGeom(M.lineColor,1);if(null==C.cards.cornerRadius||C.cards.cornerRadius.isEmpty)g.drawRectangle(s,i);else{let t=StiContextRoundedRectangleCreator.create(i,C.cards.cornerRadius,I);g.drawPath(s,t,i)}}processRowValue(t,e){let i,r=e.ident==StiMeterIdent.SparklinesColumn;return t=ListExt.isList(t)?r?ListExt.toList(t):null==(i=ListExt.toList(t))?void 0:i.firstOrDefault():t}static measureItem(l,n,s,o,a,u){let S;if(s.is2(StiDataBarsCardsColumn)||s.is2(StiColorScaleCardsColumn))S=this.measureDataBarsCell(l,n,s,o,a);else if(s.is2(StiSparklinesCardsColumn)){let t=s.as(StiSparklinesCardsColumn);S=this.measureSparklinesCell(t,a)}else if(s.is2(StiIndicatorCardsColumn)){let t=s.as(StiIndicatorCardsColumn);S=this.measureIndicatorCell(l,n,t,o,a)}else if(s.is2(StiBubbleCardsColumn)){let t=s.as(StiBubbleCardsColumn);S=this.measureBubbleCell(l,n,t,o,a)}else if(StiImageHelper.isImage(o)){let t=StiImageHelper.getImageFromObject(o),e=50*a,i=e/t.height,r=t.width*i;S=new Size(r,e)}else{let e=StiTextFormatHelper.formatBasedOnColumnType2(n,s.textFormat,s,o),t=StiDashboardStyleHelper.getFont(n),i=this.getFontGeom(null!=t?t:s.font,a),r=s.as(IStiWordWrap);if(null!=r&&r.wordWrap){let t=l.getGenericStringFormat();S=l.measureString2(e,i,u,t),S=new Size(u,S.height)}else S=l.measureString(e,i)}let t=Math.max(S.height,s.height*a);return new Size(S.width,t)}static measureCards(t,e,i,r,l,n){return this.measureCards2(t,e,i,r,l,n,0)}static measureCards2(l,a,n,s,t,u,o){let S=t.ref,e=0,m=0,i=new List,r=new List;for(let e=0;e<s.length;e++){let t=n[e];r.add(e),!t.wrapLine&&e!=s.length-1||(i.add(r),r=new List)}let h=new List;for(let r=0;r<s.length;r++){let t=n[r],e=s[r],i=StiCardsColumnVisibilityHelper.getVisible(t,a.report);i||h.add(Size.empty),h.add(this.measureItem(l,a,t,e,u,o))}for(let t=0;t<i.length;t++){let l=i[t],r=0,n=0;for(let i=0;i<l.length;i++){let t=l[i],e=h[t];r=Math.max(e.height,r),n+=e.width}let s=new Size(n,r),o=0;for(let r=0;r<l.length;r++){let t=l[r],e=h[t],i=new Rectangle(o,m,e.width+a.cards.padding.left*u+a.cards.padding.right*u,s.height+a.cards.padding.top*u+a.cards.padding.bottom*u);o+=e.width,S.add(i)}e=Math.max(e,s.width+a.cards.padding.left*u+a.cards.padding.right*u),m+=s.height}return t.ref=S,new Size(e,m+a.cards.padding.top*u+a.cards.padding.bottom*u+a.cards.margin.top*u+a.cards.margin.bottom*u)}static measureDataBarsCell(t,e,i,r,l){let n=StiCardsCellDrawer.getCellText(e,i,StiValueHelper.tryToNullableNumber(r)),s=StiDashboardStyleHelper.getFont(e),o=this.getFontGeom(null!=s?s:i.font,l),a=t.measureString(n,o);return new Size(a.width,1.5*a.height)}static measureSparklinesCell(t,e){let i=0==t.height?20:t.height;return new Size(0,i*e)}static measureIndicatorCell(t,e,i,r,l){let n=i.as(StiIndicatorCardsColumn),s=StiCardsCellDrawer.getCellText(e,n,StiValueHelper.tryToNullableNumber(r)),o=StiDashboardStyleHelper.getFont(e),a=this.getFontGeom(null!=o?o:i.font,l),u=t.measureString(s,a);return new Size(u.width,1.5*u.height)}static measureBubbleCell(t,e,i,r,l){let n=StiTextFormatHelper.formatBasedOnColumnType2(e,i.textFormat,i,r),s=StiDashboardStyleHelper.getFont(e),o=this.getFontGeom(null!=s?s:i.font,l),a=t.measureString(n,o);return a.width+=4,a=new Size(a.width+a.height,1.5*a.height)}static getForeColor(t,e,i){if(!e.foreColor.equals(Color.transparent))return e.foreColor;let r=StiDashboardStyleHelper.getForeColor(t);if(!r.equals(Color.transparent))return r;if(null!=i)return i.cellForeColor;return StiElementConsts.Table.Font.Color}static getFontGeom(t,e){let i=StiFontGeom.changeFontSize(t,t.size*e);return i}getColor(t){return this.element.cards.colorEach?this.getStyleColor(t):this.style.cellBackColor}getStyleColor(t){let e=(null!=this.element.seriesColors&&0<this.element.seriesColors.length?this.element:StiDashboardStyleHelper.getCardsStyle(this.element)).seriesColors;return e[t%=e.length]}getInteractionDataGeom(t,e,i){if(this.element.isDesigning)return null;let r=new StiCardInteractionData,l=(r.valueText=t,new StiInteractionDataGeom);return l.interactionToolTip=this.getToolTip(e),l.interactionHyperlink=this.getHyperlink(e),l.interactionData=r,l.elementIndex=i.toString(),l}getToolTip(t){let e=this.getConstants(),i=this.getInteraction(t);return StiReportParser.parse(null==i?void 0:i.toolTip,this.element,!1,e)}getHyperlink(t){let e=this.getConstants(),i=this.getInteraction(t);return StiReportParser.parse(null==i?void 0:i.hyperlink,this.element,!1,e)}getInteraction(t){return null==t?void 0:t.dashboardInteraction.as(StiCardsColumnDashboardInteraction)}getConstants(){return null}constructor(t,e){super(),this.element=t,this.dataTable=e,this.style=StiDashboardStyleHelper.getCardsStyle(this.element)}}__.t.StiCardsVisual=StiCardsVisual}let StiCardsVisual=__.t.StiCardsVisual,IStiCardsVisualSvgHelper=Stimulsoft.Report.Dashboard.Visuals.IStiCardsVisualSvgHelper,IStiManuallyEnteredData=Stimulsoft.Report.Dashboard.IStiManuallyEnteredData,StiContextSvgHelper=Stimulsoft.Report.Export.Services.Helpers.StiContextSvgHelper;{class swa{implements(){let t=[IStiCardsVisualSvgHelper];return(this.implements=()=>t)()}async writeCards(t,e,i,r,l){let n=new Rectangle(0,0,e.width,e.height),s=e.component.as(__.F.StiCardsElement),o=await swa.getDataTable(s);if(null==o)return;let a=new StiContextPainter,u=new StiContext(a,!0,!1,!1,1),S=new StiCardsVisual(s,o);if(i&&(i.needToVertScroll||i.needToHorScroll)){let t=S.getContentRectangle(n);i.needToVertScroll=t.height>n.height+5,i.needToHorScroll=t.width>n.width+5,i.needToVertScroll&&(n.width-=15,t=S.getContentRectangle(n),n=t,i.needToHorScroll||(n.height+=10),r.ref=Stimulsoft.System.Convert.toInt32(n.height)),i.needToHorScroll&&(n.height-=15,t=S.getContentRectangle(n),n=t,i.needToVertScroll||(n.height+=10),l.ref=Stimulsoft.System.Convert.toInt32(n.width))}await S.draw(u,n.clone()),t.writeStartElement("g");let m=i&&(i.needToVertScroll||i.needToHorScroll)?0:e.x,h=i&&(i.needToVertScroll||i.needToHorScroll)?0:e.y;t.writeAttributeString("transform",`translate(${m},${h})`),StiContextSvgHelper.writeGeoms(t,u,!1),t.writeEndElement()}static async getDataTable(t){let e,i=null==(e=t.as(IStiManuallyEnteredData))?void 0:e.getManuallyEnteredDataTable();if(null!=i)return i;return StiElementDataCache.tryToGetOrCreate(t)}}__.h.StiCardsVisualSvgHelper=swa}{class StiElementLocationHelper{static getSumRectangle(e){let i=new Rectangle(0,0,0,0);for(let t of e)t.right>i.right&&(i=new Rectangle(i.x,i.y,t.right-i.x,i.height)),t.bottom>i.bottom&&(i=new Rectangle(i.x,i.y,i.width,t.bottom-i.y));return i}static getLocationRectangles(e,i,t){if(1==i)return new List([e.clone()]);let r=e.toString()+" "+i.toString();if(this.hashLocations.contains(r))return this.hashLocations.get(r);let l=this.getSimpleRect(e.clone(),i,t),n=this.getSimpleRect(new Rectangle(e.x,e.y,e.height,e.width),i,t),s=l.width*l.height,o=n.width*n.height,a=(s<o&&(l=new Rectangle(n.x,n.y,n.height,n.width)),new List),u=l.x,S=l.y;for(let t=0;t<i;t++){let t=new Rectangle(u,S,l.width,l.height);a.add(t),u=Math.floor(t.right+t.width)<=e.right?t.right:(S=t.bottom,e.x)}this.hashLocations.add(r,a);let m=this.getSumRectangle(a),h=m.toString()+" "+i.toString();return this.hashLocations.contains(h)||this.hashLocations.add(h,a),a}static getMinRectangle(t,e){let i=t.width*t.height/e,r=t;while(r.width*r.height>i||r.isEmpty)r=r.width>r.height?new Rectangle(r.x,r.y,r.width/2,r.height):new Rectangle(r.x,r.y,r.width,r.height/2);return r}static prepareColumnRow(e,i,r,l,n){e.ref=1,i.ref=1;let s=l.x,o=l.y;for(let t=0;t<n-1;t++){let t=new Rectangle(s,o,l.width,l.height);s=t.right+t.width<=r.right?(1==i.ref&&e.ref++,t.right):(i.ref++,o=t.bottom,r.x)}}static getUsingRect(e,i,r){let l=i,n=i.x,s=i.y,o=i.width,a=i.height;for(let t=0;t<r;t++){let t=new Rectangle(n,s,i.width,i.height);o<t.right-e.x&&(o=t.right-e.x),a<t.bottom-e.y&&(a=t.bottom-e.y),l=new Rectangle(e.x,e.y,o,a),n=t.right+t.width<=e.right?t.right:(s=t.bottom,e.x)}return l}static checkMinRect(t,e){let i=StiElementScale.factor(e);return t.width<80*i&&(t.width=80*i),t.height<50*i&&(t.height=50*i),t}static getSimpleRect(t,e,i){let r=this.getMinRectangle(t.clone(),e),l=(r=this.checkMinRect(r,i),{ref:0}),n={ref:0},s=(this.prepareColumnRow(l,n,t.clone(),r,e),this.getUsingRect(t.clone(),r,e));return s.width<t.width&&(r=new Rectangle(t.x,t.y,r.width+(t.width-s.width)/l.ref,r.height)),r=s.height<t.height?new Rectangle(t.x,t.y,r.width,r.height+(t.height-s.height)/n.ref):r}}StiElementLocationHelper.hashLocations=new Hashtable,__.h.StiElementLocationHelper=StiElementLocationHelper}let StiGaugeInteractionData=Stimulsoft.Base.Context.StiGaugeInteractionData,StiRadialTickLabelCustomValue=Stimulsoft.Report.Components.Gauge.StiRadialTickLabelCustomValue,StiLinearTickLabelCustomValue=Stimulsoft.Report.Components.Gauge.StiLinearTickLabelCustomValue,Orientation=Stimulsoft.System.Drawing.Orientation,StiGaugeSvgHelper=Stimulsoft.Report.Export.StiGaugeSvgHelper,Graphics=Stimulsoft.System.Drawing.Graphics,StiSvgData=Stimulsoft.Report.Export.StiSvgData,IStiGaugeVisualSvgHelper=Stimulsoft.Report.Dashboard.Visuals.IStiGaugeVisualSvgHelper;{class StiGaugeVisualSvgHelper{implements(){let t=[IStiGaugeVisualSvgHelper];return(this.implements=()=>t)()}async writeGauge(n,t,s,e,i){let r=new Rectangle(t.x,t.y,t.width,t.height),o=t.component,a=await StiGaugeVisualSvgHelper.getDataTable(o);if(null==a)return;let l=new Size(t.width,t.height),u=(new __.i.StiGaugeElementBuilder).render2(o,l,a),S=__.h.StiElementLocationHelper.getLocationRectangles(r.clone(),(await u()).count2(),o);if(null==(u=1<(await u()).count2()?(new __.i.StiGaugeElementBuilder).render2(o,new Size(S[0].width,S[0].height),a):u)||!(await u()).any())return;let m=await StiGaugeVisualSvgHelper.getTitleHeight(null,u,r.clone(),o,null),h=null!=m?m:0,c=StiDashboardStyleHelper.getElementFontFromStyle(o),d=S[0].clone(),g=await StiGaugeVisualSvgHelper.getTitleMinFontSize(null,u,c,d.width,d.height),p=(g<o.font.size&&(m=await StiGaugeVisualSvgHelper.getTitleHeight(null,u,r.clone(),o,g),h=null!=m?m:0),0);if(e&&e.needToVertScroll){let t=__.h.StiElementLocationHelper.getSumRectangle(S);e.needToVertScroll=t.height>r.height+r.top+5,e.needToVertScroll&&(r.width-=15,S=__.h.StiElementLocationHelper.getLocationRectangles(r.clone(),(await u()).count2(),o),u=(new __.i.StiGaugeElementBuilder).render2(o,new Size(S[0].width,S[0].height),a),r=__.h.StiElementLocationHelper.getSumRectangle(S),i.ref=Stimulsoft.System.Convert.toInt32(r.height),h=0)}for(let l of await u()){let e=S[p].clone();if(null!=m){let t=new Rectangle(e.x,e.y,e.width,h);this.paintTitle(o,null,n,t,l.series,g)}let i=new StiSvgData;if(i.x=e.x/2,i.y=(e.y+h)/2,i.width=e.width,i.height=e.height-h,i.component=l.gauge,this.isEmptyData(o,a)&&!o["isSampleForStyles"]){let t=this.getEmptyDataGauge(o);null!=t&&(i.component=t)}let t=this.getInteractionDataGeom(o,l),r=new StiSolidBrush(StiDashboardStyleHelper.getHotBackColor(o));StiGaugeSvgHelper.writeGauge(n,i,1,s,o["isSampleForStyles"],!1,t,r),o.previousAnimations=i.component.previousAnimations,p++}}paintTitle(l,t,n,s,o,a){if(StiString.isNullOrEmpty(o))return;let e=StiDashboardStyleHelper.getElementFontFromStyle(l),u=StiFontUtils.changeFontSize(e,a),i=__.h.StiTitleMeasureHelper.measureTitle4(t,s.clone(),e,o),S=new Rectangle(s.x,s.y,s.width,i.height);if(!StiString.isNullOrWhiteSpace(o)){let t=StiDashboardExpressionHelper.getForeColor(l,l.foreColor),e=Color.transparent.equals(t)?StiDashboardStyleHelper.getForeColor(l):t,i=Graphics.measureString(o,u),r=new Point(S.x+s.width/2-.39*i.width,S.y+i.height/2);StiGaugeSvgHelper.writeText(n,o,u,new StiSolidBrush(e),r,a)}s.y+=S.height,s.height-=S.height}static async getTitleMinFontSize(i,t,r,e,l){let n=null,s=new Rectangle(0,0,e,l);for(let e of await t()){let t=__.h.StiAutoSizeTextHelper.measureFontSize(i,e.series,s,r);n=null==n?t:Math.min(n,t)}return n}static async getTitleHeight(t,e,i,r,l){let n=(await e()).firstOrDefault(t=>!StiString.isNullOrEmpty(t.series));if(null==n)return null;let s=StiDashboardStyleHelper.getElementFontFromStyle(r),o=s,a=(null!=l&&(o=new Font(o.name,l,o.style)),__.h.StiTitleMeasureHelper.measureTitle4(t,i.clone(),o,n.series).height);if(a>i.height/2)return null;return a}getInteractionDataGeom(t,e){if(t.isDesigning)return null;let i=new StiGaugeInteractionData,r=(i.value=e.value,i.seriesText=e.series,i.target=e.target,new StiInteractionDataGeom);return r.interactionToolTip=this.getToolTip(t,i),r.interactionHyperlink=this.getHyperlink(t,i),r.interactionData=i,r}getToolTip(t,e){let i,r=null==(i=t.dashboardInteraction)?void 0:i.toolTip;return StiString.isNullOrEmpty(r)?r:this.parseConstants(t,r,e)}getHyperlink(t,e){let i,r=null==(i=t.dashboardInteraction)?void 0:i.hyperlink;return StiString.isNullOrEmpty(r)?r:this.parseConstants(t,r,e)}parseConstants(e,i,r){if(!StiString.isNullOrEmpty(i)){let t=new Hashtable;return t.set("Value",r.value),t.set("Series",r.seriesText),t.set("Target",r.target),StiReportParser.parse(i,e,!1,t)}return i}isEmptyData(t,e){return null!=e&&e.isEmpty&&t.isQuerable}static async getDataTable(t){let e,i=null==(e=t.as(IStiManuallyEnteredData))?void 0:e.getManuallyEnteredDataTable();if(null!=i)return i;return StiElementDataCache.tryToGetOrCreate(t)}getEmptyDataGauge(t){switch(t.type){case StiGaugeType.FullCircular:return this.getFullCircularEmptyDataGauge(t);case StiGaugeType.HalfCircular:return this.getHalfCircularEmptyDataGauge(t);case StiGaugeType.Linear:return this.getLinearEmptyDataGauge(t);case StiGaugeType.HorizontalLinear:return this.getHorizontalLinearEmptyDataGauge(t);case StiGaugeType.Bullet:return this.getBulletEmptyDataGauge(t)}return null}getBulletEmptyDataGauge(t){let e=StiDashboardStyleHelper.getDataEmptyColor(t),i=StiDashboardStyleHelper.getDataEmptyForeColor(t),r=new StiGauge,l=new StiLinearScale,n=(l.allowApplyStyle=!1,l.relativeHeight=.85,l.orientation=Orientation.Horizontal,l.startWidth=.1,l.endWidth=.1,l.maximum=1,l.majorInterval=1,l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(e),new StiLinearTickLabelMajor);if(n.allowApplyStyle=!1,n.textBrush=new StiSolidBrush(i),l.items.add(n),t.showBlanks){let t=new StiLinearTickLabelCustom;t.offset=.1,t.font=new Font("Arial",14),t.textBrush=new StiSolidBrush(i),t.placement=StiPlacement.Inside,t.textObj=StiLocalization.get("Dashboard","Blank"),t.values.add(new StiLinearTickLabelCustomValue(.5,StiLocalization.get("Dashboard","Blank"))),l.items.add(t)}return r.scales.add(l),r}getHorizontalLinearEmptyDataGauge(t){let e=StiDashboardStyleHelper.getDataEmptyColor(t),i=StiDashboardStyleHelper.getDataEmptyForeColor(t),r=new StiGauge,l=new StiLinearScale,n=(l.allowApplyStyle=!1,l.relativeHeight=.92,l.orientation=Orientation.Horizontal,l.startWidth=.1,l.endWidth=.1,l.maximum=1,l.majorInterval=1,l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(e),new StiLinearTickLabelMajor);if(n.allowApplyStyle=!1,n.textBrush=new StiSolidBrush(i),l.items.add(n),t.showBlanks){let t=new StiLinearTickLabelCustom;t.offset=.1,t.font=new Font("Arial",14),t.textBrush=new StiSolidBrush(i),t.placement=StiPlacement.Inside,t.textObj=StiLocalization.get("Dashboard","Blank"),t.values.add(new StiLinearTickLabelCustomValue(.5,StiLocalization.get("Dashboard","Blank"))),l.items.add(t)}return r.scales.add(l),r}getLinearEmptyDataGauge(t){let e=StiDashboardStyleHelper.getDataEmptyColor(t),i=StiDashboardStyleHelper.getDataEmptyForeColor(t),r=new StiGauge,l=new StiLinearScale,n=(l.allowApplyStyle=!1,l.relativeHeight=.84,l.orientation=Orientation.Vertical,l.startWidth=.1,l.endWidth=.1,l.maximum=1,l.majorInterval=1,l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(e),new StiLinearTickLabelMajor);if(n.allowApplyStyle=!1,n.textBrush=new StiSolidBrush(i),l.items.add(n),t.showBlanks){let t=new StiLinearTickLabelCustom;t.font=new Font("Arial",14),t.textBrush=new StiSolidBrush(i),t.placement=StiPlacement.Overlay,t.textObj=StiLocalization.get("Dashboard","Blank"),t.values.add(new StiLinearTickLabelCustomValue(.5,StiLocalization.get("Dashboard","Blank"))),l.items.add(t)}return r.scales.add(l),r}getHalfCircularEmptyDataGauge(t){let e=StiDashboardStyleHelper.getDataEmptyColor(t),i=StiDashboardStyleHelper.getDataEmptyForeColor(t),r=new StiGauge,l=new StiRadialScale,n=(l.allowApplyStyle=!1,l.startAngle=180,l.sweepAngle=180,l.startWidth=.13,l.endWidth=.13,l.minimum=0,l.maximum=1,l.radius=.92,l.majorInterval=1,l.center=new Point(.5,.7),l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(e),new StiRadialTickLabelMajor);if(n.allowApplyStyle=!1,n.textBrush=new StiSolidBrush(i),l.items.add(n),t.showBlanks){let t=new StiRadialTickLabelCustom;t.offset=.8,t.font=new Font("Arial",14),t.textBrush=new StiSolidBrush(i),t.placement=StiPlacement.Overlay,t.values.add(new StiRadialTickLabelCustomValue(.5,StiLocalization.get("Dashboard","Blank"))),l.items.add(t)}return r.scales.add(l),r}getFullCircularEmptyDataGauge(t){let e=StiDashboardStyleHelper.getDataEmptyColor(t),i=StiDashboardStyleHelper.getDataEmptyForeColor(t),r=new StiGauge,l=new StiRadialScale,n=(l.allowApplyStyle=!1,l.startAngle=120,l.sweepAngle=300,l.startWidth=.13,l.endWidth=.13,l.minimum=0,l.maximum=1,l.majorInterval=1,l.borderBrush=new StiEmptyBrush,l.brush=new StiSolidBrush(e),new StiRadialTickLabelMajor);if(n.allowApplyStyle=!1,n.textBrush=new StiSolidBrush(i),l.items.add(n),r.scales.add(l),t.showBlanks){let t=new StiRadialTickLabelCustom;t.offset=.8,t.font=new Font("Arial",14),t.textBrush=new StiSolidBrush(i),t.placement=StiPlacement.Overlay,t.values.add(new StiRadialTickLabelCustomValue(.5,StiLocalization.get("Dashboard","Blank"))),l.items.add(t)}return r.scales.add(l),r}}__.h.StiGaugeVisualSvgHelper=StiGaugeVisualSvgHelper}__.u.StiIndicatorIteration=class{constructor(t,e,i){this.series=t,this.value=e,this.target=i}};let StiDataSortDirection=Stimulsoft.Data.Engine.StiDataSortDirection,StiDataSortVariation=Stimulsoft.Data.Engine.StiDataSortVariation,StiIndicatorIteration=__.u.StiIndicatorIteration;{class StiIndicatorElementBuilder extends __.i.StiElementBuilder{async render(s,o){this.storedCulture=StiCultureHelper.set(s.report);try{let e=this.getValueMeterIndex(o),i=this.getTargetMeterIndex(o),r=this.getSeriesMeterIndex(o),t=this.getSeriesKeys(o,r,this.getSeriesKeysLimitCount(s)),l=t.count2(),n=t.select(t=>new StiIndicatorIteration(this.getSeries(o,r,t,s.report),this.getValue(o,e,r,l,t),this.getNullableValue(o,i,r,l,t)));return n=StiIndicatorElementBuilder.processVariationSort(s,n),await StiIndicatorElementBuilder.processTopNElements(s,n)}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}static processVariationSort(t,e){let i=t.userSorts;return e=null!=i&&i.any(t=>t.key==StiDataSortVariation.ident)?i.firstOrDefault().direction==StiDataSortDirection.Ascending?e.orderBy(t=>0!=t.target?t.value/t.target:0):e.orderByDescending(t=>0!=t.target?t.value/t.target:0):e}static async processTopNElements(l,n){if(l.topN.mode==StiDataTopNMode.None)return n;let s=(n=l.topN.mode==StiDataTopNMode.Bottom?n.orderBy(t=>t.value):n.orderByDescending(t=>t.value)).take(l.topN.count);if(n.count2()>l.topN.count&&l.topN.showOthers){let t=n.skip(l.topN.count).sum(t=>StiValueHelper.tryToNumber(t.value)),e=n.skip(l.topN.count),i=e.all(t=>null!=t?null==t.target:null)?null:e.sum(t=>StiValueHelper.tryToNullableNumber(t.target)),r=StiString.isNullOrEmpty(l.topN.othersText)?Loc.get("FormDesigner","Others"):await StiReportParser.parseAsync(l.topN.othersText,l);s.add(new StiIndicatorIteration(r,t,i))}return s}getValueMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiValueIndicatorMeter));return null!=e?t.meters.indexOf(e):-1}getTargetMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiTargetIndicatorMeter));return null!=e?t.meters.indexOf(e):-1}getSeriesMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiSeriesIndicatorMeter));return null!=e?t.meters.indexOf(e):-1}}__.i.StiIndicatorElementBuilder=StiIndicatorElementBuilder}let StiNegativeColorChecker=Stimulsoft.Report.Components.TextFormats.StiNegativeColorChecker,GraphicsUnit=Stimulsoft.System.Drawing.GraphicsUnit,StiIndicatorInteractionData=Stimulsoft.Base.Context.StiIndicatorInteractionData,StiIndicatorElement=(__.u.StiIndicatorVisual=class extends __.j.StiVisual{async draw(t,e){let i=.06*e.width,r=(12<(i=i<4?4:i)&&(i=12),new Rectangle(e.x+i/2,e.y+i/2,e.width-i,e.height-i));try{t.pushClip(e),1==this.iterations.length?this.drawSingleMode(t,e,r):1<this.iterations.length&&await this.drawMultiMode(t,r),t.popClip()}finally{}}getContentRectangle(e){if(1<this.iterations.length){let t=e.height/this.iterations.length;return t<this.minSide&&(t=this.minSide),new Rectangle(e.x,e.y,e.width,t*this.iterations.length)}return e}drawSingleMode(o,e,t){if(0==this.iterations.length)return;let i=null!=this.iterations[0].target,r=null,a=null,l=null,n={ref:r},s={ref:a},u={ref:l},S=StiTextFormatHelper.format(this.element.report,this.element.textFormat,this.iterations[0].value),m=(this.getRectanglesSingleMode(o,S,t,n,s,u),r=n.ref,a=s.ref,l=u.ref,StiDashboardStyleHelper.getElementFontFromStyle(this.element)),h=this.processFontName(m.fontFamily.name,this.iterations[0]),c=this.processFontStyle(m,this.iterations[0]),d=new Font(h,8,c),g=this.processBackColor(this.iterations[0]),p=this.processForeColor(this.iterations[0]),C=this.processGlyphColor(this.iterations[0]),b=this.processIcon(this.element.icon,this.iterations[0]),w=this.processIconAlignment(this.iterations[0]),f=this.processCustomIcon(this.iterations[0]);if(null!=g&&o.fillRectangle(g,e,null),!this.element.report.isDesigning){let t=StiDashboardStyleHelper.getHotBackColor(this.element);null==g&&(g=Color.transparent),o.fillRectangle3(g,t,e,this.getInteractionDataGeom(this.iterations[0]))}let y=p;if(this.iterations[0].value<0&&StiNegativeColorChecker.isNegativeInRed(this.element.textFormat)&&(y=Stimulsoft.StiOptions.Engine.negativeColor),this.drawTextIcon(o,S,d,StiFontIconsHelper.getContent(b),y,C,r,w,f),i){let t=this.getVariation(this.iterations[0]),e=StiDashboardStyleHelper.getIndicatorStyle(this.element),i=0<=t?e.positiveColor:e.negativeColor,r=(i=this.processTargetIconColor(i,this.iterations[0]),0<=t?StiFontIcons.ArrowUp:StiFontIcons.ArrowDown),l=(r=this.processTargetIcon(r,this.iterations[0]),StiTextFormatHelper.formatAsPercentage2(this.element.report,this.element.targetFormat,t)),n=0==t?StiIconAlignment.None:StiIconAlignment.Right,s=this.processTargetIconAlignment(n,this.iterations[0]);this.drawTextIcon(o,l,d,StiFontIconsHelper.getContent(r),i,i,a,s,null)}let M=null,I={ref:M};if(this.measureFontSize(o,l,this.iterations[0].series,I),null!=(M=.88*I.ref)&&0<M){let t=new Font(h,M,c),e=StiFontGeom.create(t);o.drawRotatedString5(this.iterations[0].series,e,p,l,StiStringFormatHelper.getStringFormatGeom(o),StiRotationMode.CenterCenter,0,!0)}}getVariation(t){let e=t.value,i=StiValueHelper.tryToNumber(t.target),r=0;if(0!=i)switch(this.element.targetMode){case StiTargetMode.Variation:r=e/i-1,i<0&&(r=-r);break;case StiTargetMode.Percentage:r=e/i;break}return r}getFactorByFontSize(i,r,l,n){switch(l.fontSizeMode){case StiFontSizeMode.Auto:return.7;case StiFontSizeMode.Value:case StiFontSizeMode.Target:{let t=StiDashboardStyleHelper.getElementFontFromStyle(l),e=i.measureString(r,StiFontGeom.create(t));return e.height/n.height}}return 0}getRectanglesSingleMode(t,e,i,r,l,n){let s=this.iterations[0].target,o=null!=s,a=!StiString.isNullOrEmpty(this.iterations[0].series),u=.7,S=(1-u)/2,m=1-S-u,h=i.y;!a&&o?(this.element.fontSizeMode==StiFontSizeMode.Value?(u=this.getFactorByFontSize(t,e,this.element,i),S=1-u):this.element.fontSizeMode==StiFontSizeMode.Target&&(S=this.getFactorByFontSize(t,e,this.element,i),u=1-S),m=0):a&&!o?(S=0,m=1-u):a||o||(this.element.fontSizeMode!=StiFontSizeMode.Value?u=1:(u=this.getFactorByFontSize(t,e,this.element,i),h=i.y+(i.height-i.height*u)/2),S=0,m=0),r.ref=new Rectangle(i.x,h,i.width,i.height*u),l.ref=new Rectangle(r.ref.x,r.ref.bottom,i.width,i.height*S),n.ref=new Rectangle(r.ref.x,l.ref.bottom,i.width,i.height*m)}processFontStyle(t,e){let i=this.processFontBold(t.bold,e),r=this.processFontItalic(t.italic,e),l=this.processFontUnderline(t.underline,e),n=this.processFontStrikeout(t.strikeout,e),s=FontStyle.Regular;return i&&(s^=FontStyle.Bold),r&&(s^=FontStyle.Italic),l&&(s^=FontStyle.Underline),n&&(s^=FontStyle.Strikeout),s}processFontStrikeout(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.FontStyleStrikeout)&&this.getConditionResult(e,t))return t.font.strikeout;return t}processFontUnderline(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.FontStyleUnderline)&&this.getConditionResult(e,t))return t.font.underline;return t}processFontItalic(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.FontStyleItalic)&&this.getConditionResult(e,t))return t.font.italic;return t}processFontBold(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.FontStyleBold)&&this.getConditionResult(e,t))return t.font.bold;return t}processFontName(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.Font)&&this.getConditionResult(e,t))return t.font.name;return t}processIcon(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.Icon)&&this.getConditionResult(e,t))return t.icon;return t}processTargetIcon(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.TargetIcon)&&this.getConditionResult(e,t))return t.targetIcon;return t}processCustomIcon(e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.Icon)&&this.getConditionResult(e,t))return t.customIcon;return this.element.customIcon}processIconAlignment(e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.Icon)&&this.getConditionResult(e,t))return t.iconAlignment;return this.element.iconAlignment}processTargetIconAlignment(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.TargetIcon)&&this.getConditionResult(e,t))return t.targetIconAlignment;return t}processBackColor(e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.BackColor)&&this.getConditionResult(e,t))return t.backColor;return null}processForeColor(e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.TextColor)&&this.getConditionResult(e,t))return t.textColor;return StiDashboardStyleHelper.getForeColor(this.element)}processGlyphColor(e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.Icon)&&this.getConditionResult(e,t))return t.iconColor;return StiDashboardStyleHelper.getGlyphColor(this.element)}processTargetIconColor(t,e){for(let t of this.element.indicatorConditions)if(0<(t.permissions&StiIndicatorConditionPermissions.TargetIcon)&&this.getConditionResult(e,t))return t.targetIconColor;return t}getConditionResult(r,e){let l=null;switch(e.field){case StiIndicatorFieldCondition.Value:l=r.value;break;case StiIndicatorFieldCondition.Series:l=r.series;break;case StiIndicatorFieldCondition.Target:l=r.target;break;case StiIndicatorFieldCondition.Variation:{let t=this.getVariation(r),e=new StiPercentageFormatService,i=(e.decimalDigits=3,StiTextFormatHelper.formatAsPercentage2(this.element.report,e,t));l=i.replace("%","")[Stimulsoft.System.StiObject.stimulsoft]().toNumber();break}}let t=!1,i=this.getConditionValue(e);if(null!=l){let t=l=e.field!=StiIndicatorFieldCondition.Value&&e.field!=StiIndicatorFieldCondition.Target&&e.field!=StiIndicatorFieldCondition.Variation?l:null==l?0:l[Stimulsoft.System.StiObject.stimulsoft]().toNumber();if(null!=t&&null!=i){l[Stimulsoft.System.StiObject.stimulsoft]().getType()!=i[Stimulsoft.System.StiObject.stimulsoft]().getType()&&(l=l.toString(),i=i[Stimulsoft.System.StiObject.stimulsoft]().toString(),t=l);try{switch(e.condition){case Stimulsoft.Report.Components.StiFilterCondition.EqualTo:return 0==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.NotEqualTo:return 0!=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.GreaterThan:return 1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.GreaterThanOrEqualTo:return 0<=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.LessThan:return-1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.LessThanOrEqualTo:return t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i)<=0;case Stimulsoft.Report.Components.StiFilterCondition.Containing:{let t=l.toString(),e=i.toString();return-1!=t.indexOf(e)}case Stimulsoft.Report.Components.StiFilterCondition.NotContaining:{let t=l.toString(),e=i.toString();return-1==t.indexOf(e)}case Stimulsoft.Report.Components.StiFilterCondition.BeginningWith:{let t=l.toString(),e=i.toString();return t.startsWith(e)}case Stimulsoft.Report.Components.StiFilterCondition.EndingWith:{let t=l.toString(),e=i.toString();return t.endsWith(e)}}}catch(t){}}}return t}getConditionValue(t){if(StiString.isNullOrEmpty(t.value))return null;switch(t.field){case StiIndicatorFieldCondition.Value:case StiIndicatorFieldCondition.Target:case StiIndicatorFieldCondition.Variation:return t.value[Stimulsoft.System.StiObject.stimulsoft]().toNumber();default:return t.value.toString()}}async drawMultiMode(t,e){if(0==this.iterations.length)return;let i=this.getTargetValues();i.any(t=>null!=t)?this.drawMultiModeWithTarget(t,e.clone(),i):await this.drawMultiModePresent(t,e.clone())}async drawMultiModePresent(c,d){let t=this.iterations.select(t=>t.value),e=t.max(),l=t.min(),n=e-l,h=d.height/this.iterations.length,g=(h<this.minSide&&(h=this.minSide),new List),p=new List,C=new List,s=StiFontIconsHelper.getFontIcons(this.element.iconSet),o=new List;if(this.element.iconMode==StiIndicatorIconMode.Auto){let r=1/s.length;for(let i=0;i<s.length;i++){let t=l+i*r*n,e=l+(1+i)*r*n;o.add(new __.u.StiIndicatorIconRangeValue(t,e,s[i]))}}else for(let i of this.element.iconRanges){let t=StiValueHelper.tryToNumber(await StiReportParser.parseAsync(i.startExpression,this.element)),e=StiValueHelper.tryToNumber(await StiReportParser.parseAsync(i.endExpression,this.element));this.element.iconRangeMode==StiIndicatorIconRangeMode.Percentage&&(t=l+t/100*n,e=l+e/100*n),o.add(new __.u.StiIndicatorIconRangeValue(t,e,i.icon))}for(let e of this.iterations){g.add(e.series),p.add(StiTextFormatHelper.format(this.element.report,this.element.textFormat,e.value));let t=o.where(t=>t.isBetween(e.value)).firstOrDefault();null!=t?C.add(t.icon):C.add(null)}let b=StiDashboardStyleHelper.getElementFontFromStyle(this.element),a=null,u=new Font(b.fontFamily.name,1,b.style,b.unit);for(let r=0;r<this.iterations.length;r++){let t=g[r]+p[r]+"Icon",e=new Rectangle(d.x,d.y,d.width,h),i=StiStringFormatHelper.getFontSize(c,e,t,u);(null==a||a>i)&&(a=i)}let w=StiStringFormatHelper.getStringFormatGeom(c),i=StiDashboardStyleHelper.getElementFontFromStyle(this.element),f=i.size/13*a;if((f=f>a?a:f)<1)return;let y=new List,M=null,I=new StiFontGeom("Stimulsoft",.6*f,Stimulsoft.System.Drawing.FontStyle.Regular,Stimulsoft.System.Drawing.GraphicsUnit.Point);for(let m=0;m<this.iterations.length;m++){let t=this.processFontName(b.fontFamily.name,this.iterations[m]),e=this.processFontStyle(b,this.iterations[m]),i=new Font(t,f,e),r=StiFontGeom.create(i),l=new List,n=d.y+h*m,s=new Rectangle(d.x,n,d.width,h),o=(l.add(s),c.measureString(g[m],r)),a=new Rectangle(s.x,s.y,o.width,h),u=(l.add(a),c.measureString(StiFontIconsHelper.getContent(C[m]),I)),S=((null==M||M>d.right-u.width-this.indent)&&(M=d.right-u.width-this.indent),new Rectangle(M,s.y,u.width,h));l.add(S),y.add(l)}for(let h=0;h<this.iterations.length;h++){let t=this.processFontName(b.fontFamily.name,this.iterations[h]),e=this.processFontStyle(b,this.iterations[h]),i=new Font(t,f,e),r=StiFontGeom.create(i),l=y[h],n=l[0];if(!n.intersectsWith(d))return;let s=this.processBackColor(this.iterations[h]);if(null!=s&&c.fillRectangle(s,n,null),!this.element.report.isDesigning){let t=StiDashboardStyleHelper.getHotBackColor(this.element);null==s&&(s=Color.transparent),c.fillRectangle3(s,t,n,this.getInteractionDataGeom(this.iterations[h]))}let o=new Rectangle(l[1].x+this.indent,l[1].y,l[1].width,l[1].height),a=this.processForeColor(this.iterations[h]),u=(c.drawRotatedString5(g[h],r,a,o,w,StiRotationMode.CenterCenter,0,!0),l[2]),S=this.processGlyphColor(this.iterations[h]),m=C[h];if(null!=m){let t=this.processIcon(m,this.iterations[h]);c.drawRotatedString5(StiFontIconsHelper.getContent(t),I,S,u,StiStringFormatHelper.getStringFormatGeom(c),StiRotationMode.CenterCenter,0,!0)}c.drawRotatedString4(p[h],r,a,new Point(M-4,u.y+u.height/2),w,StiRotationMode.RightCenter,0,!0)}}drawMultiModeWithTarget(w,f,t){let y=f.height/this.iterations.length,M=(y<this.minSide&&(y=this.minSide),new List),I=new List,T=new List,x=new List,D=new List;for(let l=0;l<this.iterations.length;l++){let t=this.iterations[l],e=(M.add(t.series),I.add(StiTextFormatHelper.format(this.element.report,this.element.textFormat,t.value)),this.getVariation(this.iterations[l])),i=StiTextFormatHelper.formatAsPercentage2(this.element.report,this.element.targetFormat,e),r=0<=e?StiFontIcons.ArrowUp:StiFontIcons.ArrowDown;T.add(i),x.add(r),D.add(0==e?StiIconAlignment.None:StiIconAlignment.Right)}let l=null,F=StiDashboardStyleHelper.getIndicatorStyle(this.element),A=StiDashboardStyleHelper.getElementFontFromStyle(this.element),n=new Font(A.fontFamily.name,1,A.style,A.unit);for(let r=0;r<this.iterations.length;r++){let t=M[r]+I[r]+T[r]+"DeltaIcon",e=new Rectangle(f.x,f.y,f.width,y),i=StiStringFormatHelper.getFontSize(w,e,t,n);(null==l||l>i)&&(l=i)}let v=StiStringFormatHelper.getStringFormatGeom(w),E=this.element.font.size/13*l;if((E=E>l?l:E)<1)return;let R=new StiFontGeom(A.fontFamily.name,E,A.style,A.unit),O=new StiFontGeom("Stimulsoft",.99*E,Stimulsoft.System.Drawing.FontStyle.Regular,Stimulsoft.System.Drawing.GraphicsUnit.Point),H=null;for(let t=0;t<this.iterations.length;t++){let e=x[t];if(null!=e){let t=w.measureString(StiFontIconsHelper.getContent(e),O);(null==H||H>f.right-t.width-+this.indent)&&(H=f.right-t.width-+this.indent)}}let L=null;for(let e=0;e<this.iterations.length;e++){let t=w.measureString(T[e],R);(null==L||L>H-t.width)&&(L=H-t.width)}for(let b=0;b<this.iterations.length;b++){let t=this.processForeColor(this.iterations[b]),e=this.processFontName(A.fontFamily.name,this.iterations[b]),i=this.processFontStyle(A,this.iterations[b]),r=new Font(e,E,i),l=(R=StiFontGeom.create(r),f.y+y*b),n=new Rectangle(f.x,l,f.width,y);if(!n.intersectsWith(f))return;let s=this.processBackColor(this.iterations[b]);if(null!=s&&w.fillRectangle(s,n,null),!this.element.report.isDesigning){let t=StiDashboardStyleHelper.getHotBackColor(this.element);null==s&&(s=Color.transparent),w.fillRectangle3(s,t,n,this.getInteractionDataGeom(this.iterations[b]))}let o=w.measureString(M[b],R),a=new Rectangle(n.x+this.indent,n.y,o.width,y),u=(w.drawString(M[b],R,t,a,v),x[b]==StiFontIcons.ArrowUp?F.positiveColor:F.negativeColor),S=(u=this.processTargetIconColor(u,this.iterations[b]),w.measureString(StiFontIconsHelper.getContent(x[b]),O)),m=new Rectangle(H,n.y,S.width,y),h=w.measureString(T[b],R),c=new Rectangle(H-h.width,n.y,h.width,y),d=x[b],g=(d=this.processTargetIcon(d,this.iterations[b]),w.drawRotatedString5(T[b],R,u,c,v,StiRotationMode.CenterCenter,0,!0),this.processTargetIconAlignment(D[b],this.iterations[b])),p=(g!=StiIconAlignment.None&&w.drawRotatedString5(StiFontIconsHelper.getContent(d),O,u,m,StiStringFormatHelper.getStringFormatGeom(w),StiRotationMode.CenterCenter,0,!0),this.iterations[b].value<0&&StiNegativeColorChecker.isNegativeInRed(this.element.textFormat)&&(t=Stimulsoft.StiOptions.Engine.negativeColor),w.measureString(I[b],R)),C=new Rectangle(L-p.width,l,p.width,y);w.drawRotatedString4(I[b],R,t,new Point(C.right,C.y+C.height/2),v,StiRotationMode.RightCenter,0,!0)}}getInteractionDataGeom(t){if(this.element.isDesigning)return null;let e=new StiIndicatorInteractionData,i=(e.value=t.value,e.seriesText=t.series,e.target=t.target,new StiInteractionDataGeom);return i.interactionToolTip=this.getToolTip(e),i.interactionHyperlink=this.getHyperlink(e),i.interactionData=e,i}getToolTip(t){let e,i=null==(e=this.element.dashboardInteraction)?void 0:e.toolTip;return StiString.isNullOrEmpty(i)?i:this.parseConstants(i,t)}getHyperlink(t){let e,i=null==(e=this.element.dashboardInteraction)?void 0:e.hyperlink;return StiString.isNullOrEmpty(i)?i:this.parseConstants(i,t)}parseConstants(e,i){if(!StiString.isNullOrEmpty(e)){let t=new Hashtable;return t.set("Value",i.value),t.set("Series",i.seriesText),t.set("Target",i.target),StiReportParser.parse(e,this.element,!1,t)}return e}getMaxValue(){let e=0;for(let t of this.iterations)e<t.value&&(e=t.value);return e}getTargetValues(){let e=new List;for(let t of this.iterations)e.add(t.target);return e}drawTextIcon(h,c,d,g,e,i,p,C,t){let b,w,f=null;if(C==StiIconAlignment.None){b=Rectangle.empty,w=new Rectangle(p.x,p.y,p.width,p.height);let t={ref:f};this.measureFontSize(h,w.clone(),c,t),f=t.ref}else if(C==StiIconAlignment.Right||C==StiIconAlignment.Left){let t={ref:f};if(this.measureFontSize(h,p.clone(),c,t),null==(f=t.ref)&&f<=0)return;let e=new StiFontGeom("Stimulsoft",f,Stimulsoft.System.Drawing.FontStyle.Regular,Stimulsoft.System.Drawing.GraphicsUnit.Point),i=new StiFontGeom(d.fontFamily.name,f,d.style,Stimulsoft.System.Drawing.GraphicsUnit.Point),r=h.measureString(c,i),l=h.measureString(g,e),n=r.width+l.width>p.width?p.width/(r.width+l.width):1,s=(f*=n,new Size(r.width*n,r.height*n)),o=new Size(l.width*n,l.height*n),a=C==StiIconAlignment.Right?p.x+(p.width-s.width-o.width)/2:p.x+(p.width-s.width-o.width)/2+o.width,u=p.y+(p.height-s.height)/2,S=(w=new Rectangle(a,u,s.width,s.height),C==StiIconAlignment.Right?w.right:w.x-o.width),m=p.y+(p.height-o.height)/2;b=new Rectangle(S,m,o.width,o.height)}else{w=C==StiIconAlignment.Bottom?new Rectangle(p.x,p.y,p.width,p.height/2):new Rectangle(p.x,p.y+p.height/2,p.width,p.height/2),b=C==StiIconAlignment.Bottom?new Rectangle(p.x,p.y+p.height/2,p.width,p.height/2):new Rectangle(p.x,p.y,p.width,p.height/2);let t={ref:f};this.measureFontSize(h,w,c,t),f=t.ref}if(null!=f&&0<f){let t=new StiFontGeom(d.fontFamily.name,f,d.style,GraphicsUnit.Pixel);h.drawRotatedString5(c,t,e,w,StiStringFormatHelper.getStringFormatGeom(h),StiRotationMode.CenterCenter,0,!0)}if(null!=f&&0<f&&C!=StiIconAlignment.None)if(null==t||0==t.length){let t=new StiFontGeom("Stimulsoft",.6*f,Stimulsoft.System.Drawing.FontStyle.Regular,Stimulsoft.System.Drawing.GraphicsUnit.Point);h.drawRotatedString5(g,t,i,b,StiStringFormatHelper.getStringFormatGeom(h),StiRotationMode.CenterCenter,0,!0)}else h.drawImage(t,b)}getFontGeom(t){return new StiFontGeom("Arial",t,FontStyle.Bold,GraphicsUnit.Point)}measureFontSize(t,e,i,r){let l=t.measureString(i,this.getFontGeom(1e3));if(0==l.width||0==l.height)return void(r.ref=0);let n=e.width/l.width*1e3,s=e.height/l.height*1e3,o=s<n?s:n;(null==r.ref||r.ref>o)&&(r.ref=o)}getElementSide(t,e){let i=t?e.height:e.width,r=t?e.width:e.height,l=i/this.iterations.length;return l=l>r?r:l}constructor(t,e){super(),this.indent=4,this.minSide=20,this.element=t,this.iterations=e}},__.U.StiIndicatorElement),IStiIndicatorVisualSvgHelper=Stimulsoft.Report.Dashboard.Visuals.IStiIndicatorVisualSvgHelper,StiIndicatorElementBuilder=__.i.StiIndicatorElementBuilder,StiIndicatorVisual=__.u.StiIndicatorVisual;{class jGa{implements(){let t=[IStiIndicatorVisualSvgHelper];return(this.implements=()=>t)()}async writeIndicator(t,e,i,r){let l=new Rectangle(0,0,e.width,e.height),n=e.component.as(__.U.StiIndicatorElement),s=await jGa.getDataTable(n);if(null==s)return;let o=await(new StiIndicatorElementBuilder).render(n,s);if(n["isSampleForStyles"]?o=this.getStyleSampleIterations():this.isEmptyData(n,s)&&(o=this.getEmptyDataIterations(n),n=this.getEmptyDataIndicatorElement(n)),null==o||!o.any())return;let a=new StiContextPainter,u=new StiContext(a,!0,!1,!1,1),S=new StiIndicatorVisual(n,o.toList());if(i&&i.needToVertScroll){let t=S.getContentRectangle(l);i.needToVertScroll=t.height>l.height+5,i.needToVertScroll&&(l.width-=15,t=S.getContentRectangle(l),(l=t).height+=10,r.ref=Stimulsoft.System.Convert.toInt32(l.height))}await S.draw(u,l.clone()),t.writeStartElement("g");let m=i&&i.needToVertScroll?0:e.x,h=i&&i.needToVertScroll?0:e.y;t.writeAttributeString("transform",StiString.format("translate({0},{1})",this.p(m),this.p(h))),StiContextSvgHelper.writeGeoms(t,u,!1),t.writeEndElement()}p(t){return t.toString().split(",").join(".")}isEmptyData(t,e){return null!=e&&e.isEmpty&&t.isQuerable}getStyleSampleIterations(){let t=new List,e=new StiIndicatorIteration;return e.value=100,t.add(e),t}getEmptyDataIterations(t){let e=new List,i=new StiIndicatorIteration;return i.value=0,t.showBlanks&&(i.series=StiLocalization.get("Dashboard","Blank")),e.add(i),e}getEmptyDataIndicatorElement(t){let e=t.clone(!0).as(StiIndicatorElement);return e.glyphColor=Color.fromArgb2(240,240,240),e}static async getDataTable(t){let e,i=null==(e=t.as(IStiManuallyEnteredData))?void 0:e.getManuallyEnteredDataTable();if(null!=i)return i;return StiElementDataCache.tryToGetOrCreate(t)}}__.h.StiIndicatorVisualSvgHelper=jGa}let StiArrayEqualityComparer=Stimulsoft.Data.Comparers.StiArrayEqualityComparer,StiBingMapHelper=Stimulsoft.Base.Helpers.StiBingMapHelper,StiColorUtils=Stimulsoft.Base.Drawing.StiColorUtils,StiMapHelper=Stimulsoft.Report.Maps.StiMapHelper;{class StiOnlineMapHelper{static get ICON(){return null==this._ICON&&(this._ICON=Convert.toBase64String(Encoding.UTF8.getBytes('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z" fill="#af6682" stroke="#663a4c"/><circle cx="12" cy="9" r="3" fill="#f7f4f2"/></svg>'))),this._ICON}static get EMPTY_ICON(){return null==this._EMPTY_ICON&&(this._EMPTY_ICON=Convert.toBase64String(Encoding.UTF8.getBytes('<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1" ></svg>'))),this._EMPTY_ICON}static async getBingMapScript(a,t){let e=await StiElementDataCache.tryToGetOrCreate(a),u=this.calculateMapData(e,a);if(t){u["outerStyle"]="display: table;";let o=a.title;if(o.visible){let e="";if(o.font.bold&&(e+="font-weight: bold;"),o.font.italic&&(e+="font-style: italic;"),o.font.strikeout||o.font.underline){let t=o.font.underline?o.font.strikeout?"underline line-through":"underline":o.font.strikeout?"line-through":"none";e+=`text-decoration: ${t};`}let t=o.sizeMode==StiTextSizeMode.WordWrap||o.sizeMode==StiTextSizeMode.FitAndWordWrap?"normal":"nowrap",i=o.sizeMode==StiTextSizeMode.Trimming?";text-overflow:ellipsis; overflow:hidden; display:table-caption; width:{}":"",r=o.sizeMode==StiTextSizeMode.Fit||o.sizeMode==StiTextSizeMode.FitAndWordWrap?"font-size:measure":`font-size: ${o.font.size.toString().replace(",",".")}pt`,l=ColorTranslator.toHtml(Color.transparent.equals(o.foreColor)?StiDashboardStyleHelper.getTitleForeColor(a):o.foreColor),n=ColorTranslator.toHtml(Color.transparent.equals(o.backColor)?StiDashboardStyleHelper.getBackColor(a):o.backColor),s=Enum.getName(StiHorAlignment,o.horAlignment).toLowerCase();u["title"]=`font-family: ${o.font.name}; ${r}; color: ${l};`+`${e}background-color:${n};white-space:${t}${i};text-align:${s}'>${o.text}</div>`}}return StiBingMapHelper.getScript(u)}static calculateMapData(c,d){let i={},o=this.getLongitudeMeterIndex(c),a=this.getLatitudeMeterIndex(c),l=this.getLocationMeterIndex(c),n=this.getLocationColorMeterIndex(c),s=this.getLocationArgumentMeterIndex(c),g=this.getLocationValueMeterIndex(c),t=StiDashboardStyleHelper.isDarkStyle(d.dashboard);if(null!=c)if(-1!=a&&-1!=o){let n=[],s=0;for(let l of c.rows){s++;let t=l[a],e=l[o];if(null==t||null==e)continue;let i=StiValueHelper.tryToNumber(t).toString().replace(",","."),r=StiValueHelper.tryToNumber(e).toString().replace(",",".");if(null==d.customIcon?n.push({lat:i,lon:r,fontIcon:StiFontIconsHelper.getContent(d.icon).charCodeAt(0),fontIconColor:`rgb(${d.iconColor.r}, ${d.iconColor.g}, ${d.iconColor.b})`}):n.push({lat:i,lon:r,anchorX:this.MAX_RADIUS,anchorY:2*this.MAX_RADIUS}),s>this.MAX_LOCATIONS)break}i["pushpins"]=n}else if(-1!=l){let t=null,r=null;if(d.locationColorType==StiOnlineMapLocationColorType.ColorEach)t=this.getColors(Math.min(c.rows.length,this.MAX_LOCATIONS));else if(d.locationColorType==StiOnlineMapLocationColorType.Group&&-1!=n){let i=[];for(let e=0;e<c.rows.length;e++){let t=null!=c.rows[e][n]?c.rows[e][n].toString():"";i.includes(t)||i.push(t)}let e=this.getColors(i.length);r=new Hashtable;for(let t=0;t<i.length;t++)r.set(i[t],e[t])}let e=new List;if(0<=g)for(let t=0;t<Math.min(c.rows.length,this.MAX_LOCATIONS);t++)e.add(StiValueHelper.tryToNumber(c.rows[t][g]));StiArray.sort(e);let S=e,m=new Object,h=0;while(h<c.rows.length&&h<this.MAX_LOCATIONS){let o=c.rows[h][l];if(null==o){h++;continue}let a=Color.limeGreen,u=null;if(d.locationColorType==StiOnlineMapLocationColorType.Single)a=d.locationColor,u=Color.transparent.equals(d.locationColor)?"Transparent":null;else if(d.locationColorType==StiOnlineMapLocationColorType.ColorEach)a=t[h];else if((d.locationColorType==StiOnlineMapLocationColorType.Group||d.locationColorType==StiOnlineMapLocationColorType.Value)&&0<=n){let t=null!=c.rows[h][n]?c.rows[h][n].toString():"";d.locationColorType==StiOnlineMapLocationColorType.Group&&r.containsKey(t)&&(a=r.get(t)),d.locationColorType!=StiOnlineMapLocationColorType.Value||StiString.isNullOrEmpty(t)||(u=t)}if(m[o]={fillStyle:null!=u?u:`rgba(${a.r}, ${a.g}, ${a.b}, 0.5)`,strokeStyle:"Transparent"==u?u:"#d3d3d3"},0<=g||d.valueViewMode==StiOnlineMapValueViewMode.Icon)if(d.valueViewMode==StiOnlineMapValueViewMode.Bubble){let t=S.indexOf(StiValueHelper.tryToNumber(c.rows[h][g]))/S.length,e=2*this.MAX_RADIUS+2,i=this.MIN_RADIUS+Math.ceil(t*this.DELTA_RADIUS),r=this.MAX_RADIUS+1,l=StiColorUtils.dark(null!=u?this.parseColor(u):a,70),n=null!=u?u:`rgba(${a.r}, ${a.g}, ${a.b}, 0.5)`,s=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${e}">`+`<circle cx="${r}" cy="${r}" r="${i}" stroke="rgba(${l.r}, ${l.g}, ${l.b}, ${l.a})" `+`stroke-width="1" fill="${n}"/>`+"</svg>";m[o]["icon"]=Convert.toBase64String(Encoding.UTF8.getBytes(s)),m[o]["anchorX"]=r,m[o]["anchorY"]=r}else d.valueViewMode==StiOnlineMapValueViewMode.Value?(m[o]["icon"]=this.EMPTY_ICON,m[o]["title"]=null!=c.rows[h][g]?c.rows[h][g].toString():"",m[o]["anchorX"]=1,m[o]["anchorY"]=7):d.valueViewMode==StiOnlineMapValueViewMode.Icon?(null==d.customIcon&&(m[o]["fontIcon"]=StiFontIconsHelper.getContent(d.icon).charCodeAt(0),m[o]["fontIconColor"]=`rgb(${d.iconColor.r}, ${d.iconColor.g}, ${d.iconColor.b})`),0<g&&(m[o]["title"]=null!=c.rows[h][g]?c.rows[h][g].toString():"")):d.valueViewMode==StiOnlineMapValueViewMode.Chart&&(m[o]["chart"]=this.getChartData(c,l,g,s,c.rows[h][l]),m[o]["icon"]=this.EMPTY_ICON);h++}i["locations"]=m,i["locationType"]=Enum.getName(StiOnlineMapLocationType,d.locationType)}(d.valueViewMode==StiOnlineMapValueViewMode.Icon||-1!=a&&-1!=o)&&null!=d.customIcon&&this.getCustomIcon(d.customIcon,i),i["theme"]=t?"canvasDark":"canvasLight",i["culture"]=StiOnlineMapCulture[d.culture].toString().replace("_","-");let e=StiDashboardStyleHelper.getBackColor(d);return Color.transparent.equals(e)&&null!=d.report&&d.report.info.fillComponent&&d.isDesigning&&(e=Color.fromArgb3(153,Color.white)),i["backgroundColor"]=ColorTranslator.toHtml(e),i["onePointZoom"]=d.onePointZoom,i["userBingKey"]=d.userBingKey,i}static getChartData(e,i,r,l,f){let n=new Hashtable;try{if(0<=i&&0<=r&&0<=l){let S=this.CHART_RADIUS,m=e.meters[l],h=e.meters[r],c=e.meters[i],t=e.rows.where(t=>t[i]==f),d=t.groupBy2(t=>[t[l]],new StiArrayEqualityComparer).select(t=>t.key[0]).toList(),g=new List;for(let e of d)g.add(t.where(t=>t[l]==e).select(t=>t[r]).sum(t=>StiValueHelper.tryToNumber(t)));let p=g.sum(),C=this.getColors(Math.min(d.countItems,this.MAX_CHART_SECTORS)),b=0,w=[];for(let u=0;u<Math.min(d.countItems,this.MAX_CHART_SECTORS);u++){let t=d[u],e=g[u],i=e/p*6.28318530716,r=S+1+S*Math.cos(b),l=S+1+S*Math.sin(b),n=S+1+S*Math.cos(b+i),s=S+1+S*Math.sin(b+i),o=.5<e/p?1:0,a=StiColorUtils.dark(C[u],100);w.push({stroke:`rgb(${a.r}, ${a.g}, ${a.b})`,fill:`rgb(${C[u].r}, ${C[u].g}, ${C[u].b})`,_color:ColorTranslator.toHtml(C[u]),d:`M ${S+1} ${S+1} L ${this.toUnits(r)} ${this.toUnits(l)} A ${S} ${S} 0 ${o} 1 ${this.toUnits(n)} ${this.toUnits(s)}z`,_text0:c.label,_text1:null!=f?f.toString():null,_text2:m.label,_text3:null!=t?t.toString():null,_text4:h.label,_text5:e.toString}),b+=i}n["paths"]=w,n["anchor"]=S}}catch(t){}return n}static toUnits(t){let e=2,i=StiMath.round2(t,e).toString().replace(",",".");return i}static getCustomIcon(l,n){try{let e,i=0,r=0;if(!StiImageHelper.isSvg(l)){e=StiImageConverter.bytesToImage(l);let t=Math.min(1,2*this.MAX_RADIUS/Math.max(e.width,e.height));i=Math.round(e.width*t),r=Math.round(e.height*t)}n["customIconAnchorX"]=i/2,n["customIconAnchorY"]=r;let t=`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${r}"><image width="${i}" height="${r}" href="${this.imageBytesToBase64String(l)}"></image></svg>`;n["customIcon"]=Convert.toBase64String(Encoding.UTF8.getBytes(t))}catch(t){}}static imageBytesToBase64String(t){let e="data:image/png;base64,";return StiImageHelper.isBmp(t)?e="data:image/bmp;base64,":StiImageHelper.isJpeg(t)?e="data:image/jpeg;base64,":StiImageHelper.isGif(t)?e="data:image/gif;base64,":StiImageHelper.isSvg(t)&&(e="data:image/svg+xml;base64,"),e+Convert.toBase64String(t)}static getColors(t){let e=[],i=10,r=!0,l=StiMapHelper.getColors();e=l.slice();while(e.length<t){if(r)for(let t of l)e.push(StiColorUtils.dark(t,i));else{for(let t of l)e.push(StiColorUtils.light(t,i));i+=10}r=!r}return e}static getLongitudeMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiLongitudeMapMeter));return null!=e?t.meters.indexOf(e):-1}static getLatitudeMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiLatitudeMapMeter));return null!=e?t.meters.indexOf(e):-1}static getLocationMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiLocationMapMeter));return null!=e?t.meters.indexOf(e):-1}static getLocationColorMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiLocationColorMapMeter));return null!=e?t.meters.indexOf(e):-1}static getLocationArgumentMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiLocationArgumentMapMeter));return null!=e?t.meters.indexOf(e):-1}static getLocationValueMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiLocationValueMapMeter));return null!=e?t.meters.indexOf(e):-1}static parseColor(e){let l=Color.black;try{if(1<e.length){if("#"==e[0]){let i=e.substring(1).toLowerCase(),r="";for(let e=0;e<i.length;e++){let t=i.charAt(e);"0"!=t&&"1"!=t&&"2"!=t&&"3"!=t&&"4"!=t&&"5"!=t&&"6"!=t&&"7"!=t&&"8"!=t&&"9"!=t&&"a"!=t&&"b"!=t&&"c"!=t&&"d"!=t&&"e"!=t&&"f"!=t||(r+=t)}if(6==(i=3==r.length?StiString.format("{0}{0}{1}{1}{2}{2}",r[0],r[1],r[2]):r).length){let t=Convert.toInt32(i,16);l=Color.fromArgb(255,t>>16&255,t>>8&255,255&t)}}else if(e.startsWith("rgb")){let i=e.trim().substring(4,e.length-1).split(",");if(3==i.length){let t=[0,0,0];i[0].endsWith("%")?t[0]=Math.round(2.55*StiValueHelper.tryToNumber(i[0].substring(0,i[0].length-1))):t[0]=StiValueHelper.tryToNumber(i[0]),i[1].endsWith("%")?t[1]=Math.round(2.55*StiValueHelper.tryToNumber(i[1].substring(0,i[1].length-1))):t[1]=StiValueHelper.tryToNumber(i[1]),i[2].endsWith("%")?t[2]=Math.round(2.55*StiValueHelper.tryToNumber(i[2].substring(0,i[2].length-1))):t[2]=StiValueHelper.tryToNumber(i[2]),l=Color.fromArgb(255,t[0],t[1],t[2])}else if(4==i.length){let t=[0,0,0],e=1;i[0]=i[0].replace("(",""),i[0].endsWith("%")?t[0]=Math.round(2.55*StiValueHelper.tryToNumber(i[0].substring(0,i[0].length-1))):t[0]=StiValueHelper.tryToNumber(i[0]),i[1].endsWith("%")?t[1]=Math.round(2.55*StiValueHelper.tryToNumber(i[1].substring(0,i[1].length-1))):t[1]=StiValueHelper.tryToNumber(i[1]),i[2].endsWith("%")?t[2]=Math.round(2.55*StiValueHelper.tryToNumber(i[2].substring(0,i[2].length-1))):t[2]=StiValueHelper.tryToNumber(i[2]),e=i[3].endsWith("%")?2.55*StiValueHelper.tryToNumber(i[3].substring(0,i[3].length-1)):StiValueHelper.tryToNumber(i[3]),l=Color.fromArgb(Math.round(255*e),t[0],t[1],t[2])}}else if(null==this.htmlNameToColor){let l=[["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"],["DarkGrey","#A9A9A9"],["DarkGreen","#006400"],["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"],["Gold","#FFD700"],["GoldenRod","#DAA520"],["Gray","#808080"],["Grey","#808080"],["Green","#008000"],["GreenYellow","#ADFF2F"],["HoneyDew","#F0FFF0"],["HotPink","#FF69B4"],["IndianRed","#CD5C5C"],["Indigo","#4B0082"],["Ivory","#FFFFF0"],["Khaki","#F0E68C"],["Lavender","#E6E6FA"],["LavenderBlush","#FFF0F5"],["LawnGreen","#7CFC00"],["LemonChiffon","#FFFACD"],["LightBlue","#ADD8E6"],["LightCoral","#F08080"],["LightCyan","#E0FFFF"],["LightGoldenRodYellow","#FAFAD2"],["LightGray","#D3D3D3"],["LightGrey","#D3D3D3"],["LightGreen","#90EE90"],["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","#9370D8"],["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","#D87093"],["PapayaWhip","#FFEFD5"],["PeachPuff","#FFDAB9"],["Peru","#CD853F"],["Pink","#FFC0CB"],["Plum","#DDA0DD"],["PowderBlue","#B0E0E6"],["Purple","#800080"],["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"]];this.htmlNameToColor=new Hashtable;for(let r=0;r<2;r++){let t=l[r][0].toLowerCase(),e=Convert.toInt32(l[r][1].substring(1),16),i=Color.fromArgb(255,e>>16&255,e>>8&255,255&e);this.htmlNameToColor.set(t,i)}}let t=e.toLowerCase();this.htmlNameToColor.containsKey(t)&&(l=this.htmlNameToColor.get(t))}}catch(t){}return l}}StiOnlineMapHelper.MAX_LOCATIONS=1e3,StiOnlineMapHelper.MAX_CHART_SECTORS=100,StiOnlineMapHelper.MIN_RADIUS=3,StiOnlineMapHelper.MAX_RADIUS=15,StiOnlineMapHelper.CHART_RADIUS=26,StiOnlineMapHelper.DELTA_RADIUS=12,StiOnlineMapHelper.lockHtmlNameToColor=new Object,__.h.StiOnlineMapHelper=StiOnlineMapHelper}let StiCrossTabTopNCondition=Stimulsoft.Report.Components.StiCrossTabTopNCondition,StiDataTableSource=Stimulsoft.Report.Dictionary.StiDataTableSource,StiPivotTableColumnVisibilityHelper=__.N.StiPivotTableColumnVisibilityHelper,StiCellType=Stimulsoft.Report.CrossTab.Core.StiCellType,StiDataHelper=Stimulsoft.Report.Components.StiDataHelper,StiFilter=Stimulsoft.Report.Components.StiFilter,StiCondition=Stimulsoft.Report.Components.StiCondition,StiLabelHelper=Stimulsoft.Data.Helpers.StiLabelHelper,StiEngine=Stimulsoft.Report.Engine.StiEngine,ContentAlignment=Stimulsoft.System.Drawing.ContentAlignment,StiIconSetIndicator=Stimulsoft.Report.Components.StiIconSetIndicator,StiPivotToConvertedStateCache=Stimulsoft.Report.Dashboard.StiPivotToConvertedStateCache,StiPivotTableToCrossTabCache=Stimulsoft.Report.Dashboard.StiPivotTableToCrossTabCache,StiCrossTotal=Stimulsoft.Report.CrossTab.StiCrossTotal,StiCrossRowTotal=Stimulsoft.Report.CrossTab.StiCrossRowTotal,StiCrossTab=Stimulsoft.Report.CrossTab.StiCrossTab,StiCrossTitle=Stimulsoft.Report.CrossTab.StiCrossTitle,StiComponentsCollection=Stimulsoft.Report.Components.StiComponentsCollection,StiCrossColumnTotal=Stimulsoft.Report.CrossTab.StiCrossColumnTotal,StiCrossSummary=Stimulsoft.Report.CrossTab.StiCrossSummary,StiCell=Stimulsoft.Report.CrossTab.Core.StiCell,StiCrossColumn=Stimulsoft.Report.CrossTab.StiCrossColumn,StiReportUnitType=Stimulsoft.Report.StiReportUnitType,StiReport=Stimulsoft.Report.StiReport,StiCrossRow=Stimulsoft.Report.CrossTab.StiCrossRow,StiCrossSummaryHeader=Stimulsoft.Report.CrossTab.StiCrossSummaryHeader,Guid=Stimulsoft.System.Guid,StiCrossHeader=Stimulsoft.Report.CrossTab.StiCrossHeader,StiSummaryType=Stimulsoft.Report.CrossTab.Core.StiSummaryType,StiCrossCell=Stimulsoft.Report.CrossTab.StiCrossCell,StiCross=Stimulsoft.Report.CrossTab.Core.StiCross,StiCrossTabHelper=Stimulsoft.Report.CrossTab.StiCrossTabHelper;{class StiPivotTableHelper{static getHeadersBounds(r){let l=-1,n=-1,s=-1,o=-1;for(let i=0;i<r.length;i++)for(let e=0;e<r[i].length;e++){let t=r[i][e];t.cellType!=StiCellType.HeaderColMain&&t.cellType!=StiCellType.HeaderColSummaryTotal||(l=-1==l?e:l,n=Math.max(e,n)),t.cellType!=StiCellType.HeaderRowMain&&t.cellType!=StiCellType.HeaderRowSummaryTotal||(s=-1==s?i:s,o=Math.max(i,o))}return new Rectangle(s,l,o-s,n-l)}static async getViewerData(t){let e={},i=t.as(StiPivotTableElement),r=i.columns.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,i.report)).toList(),l=i.rows.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,i.report)).toList(),n=i.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,i.report)).toList(),a=StiPivotTableToCrossTabCache.get(i);if(null==a){let t=await StiElementDataCache.getOrCreate(i);a=await StiPivotTableHelper.convertToCrossTab(i,t),StiPivotTableToCrossTabCache.put(i,a),StiPivotToConvertedStateCache.putFalse(i)}let s=0==l.length&&0==r.length&&0<n.length,u=a.crossTabInfo.cross.cells,o=this.getHeadersBounds(u),S=o.bottom+1,m=o.right+1,h=(e["headerHeight"]=S,e["headerWidth"]=m,e["onlySummaries"]=s,e["pivotColumnsCount"]=r.length,e["pivotRowsCount"]=l.length,e["pivotSummariesCount"]=n.length,e["pivotSummaryDirection"]=Enum.getName(StiSummaryDirection,i.summaryDirection),[]);if(0<u.length){let s=new Hashtable;for(let i=0;i<u.length;i++)for(let e=0;e<u[i].length;e++){let t=u[i][e];StiString.isNullOrEmpty(t.parentGuid)||t.parentCell!=t||(s.containsKey(t.parentGuid)||s.set(t.parentGuid,new List),s.get(t.parentGuid).add(t))}let o=[];for(let n=0;n<u.length;n++){let l=[];for(let t=0;t<u[0].length;t++){let e=u[n][t],i=new List,r=null;if(e.parentCell==e&&!StiString.isNullOrEmpty(e.guid)&&s.containsKey(e.guid))for(let t of s.get(e.guid))t.field.is(StiCrossTotal)&&t.parentCell==t?r=t.guid:i.add(t.guid);l.push(this.cellItem(u[n][t],n,t,i,r,n<m||t<S,o,n>=m,a.crossTabInfo.cross.widths[n]))}h.push(l)}e["cells"]=h,e["sizes"]=o}return e}static cellItem(l,t,e,i,r,n,s,o,a){let u,S,m,h,c,d,g,p=null==(S=null==(u=l.field)?void 0:u.report)?void 0:S.unit,C=-1;if(l.field&&null!=p){let t=`${p.convertToHInches(a)};${p.convertToHInches(a)};`+(null!=(m=l.field)&&m.wordWrap?"True":"False");-1==s.indexOf(t)&&s.push(t),C=s.indexOf(t)}let b={};if(b["rowSpan"]=l.height,b["colSpan"]=l.width,b["row"]=e,b["column"]=t,b["text"]=l.text,b["isColumn"]=o,b["s"]=C,b["l"]=l.level,b["t"]=null==(h=l.field)?void 0:h.is(StiCrossTotal),!StiString.isNullOrEmpty(null==(d=null==(c=l.field)?void 0:c.interaction)?void 0:d.drillDownPageGuid)){let e=new List;if(l.drillDownParameters)for(let t of l.drillDownParameters)e.add({key:t.name,value:t.value});b["ip"]={drillDownPageKey:l.field.interaction.drillDownPageGuid,parameters:e}}if(null!=(g=l.field)&&g.is(StiCrossHeader)&&(b["o"]=l.field.isExpanded),n&&(StiString.isNullOrEmpty(l.guid)&&(l.guid=Guid.newGuid().toString()),StiString.isNullOrEmpty(l.parentGuid)||(b["parentGuid"]=l.parentGuid),null!=l.parentCell&&l.parentCell==l&&(b["parentCellGuid"]=l.parentCell.guid),null!=l.field&&(b["isTotal"]=l.field.is(StiCrossTotal)&&l.parentCell==l),b["guid"]=l.guid,0<i.length&&(b["dependedCellGuis"]=i),null!=r)&&(b["totalCellGuid"]=r),null!=l.field&&null!=l.field.indicator&&l.field.indicator.is(StiIconSetIndicator)){let t=l.field.indicator,e=Enum.getName(ContentAlignment,t.alignment),i=0==e.indexOf("Top")?"top":0==e.indexOf("Bottom")?"bottom":"middle",r=`<img src='data:image/png;base64,${Convert.toBase64String(t.customIcon)}' style='vertical-align: ${i};'>`;delete b["text"],0<e.indexOf("Left")?b["text"]=r+l.text:b["text"]=l.text+r}let w=null!=l.field?l.field.conditionPermissions:null,f={};if(l.isNegativeColor){let t=Stimulsoft.StiOptions.Engine.negativeColor;f["color"]=`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`}if(w!=StiConditionPermissions.None){if(0<(w&StiConditionPermissions.BackColor)){let t=l.field.conditionBrush.color;f["backgroundColor"]=`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`}0<(w&StiConditionPermissions.Font)&&(f["fontFamily"]=l.field.font.name),0<(w&StiConditionPermissions.FontSize)&&(f["fontSize"]=l.field.font.sizeInPoints+`pt`),0<(w&StiConditionPermissions.FontStyleBold)&&(f["fontWeight"]=0<(l.field.font.style&FontStyle.Bold)?"bold":"normal"),0<(w&StiConditionPermissions.FontStyleItalic)&&(f["fontStyle"]=0<(l.field.font.style&FontStyle.Italic)?"italic ":"normal");let t="";if(0<(w&StiConditionPermissions.FontStyleStrikeout)&&0<(l.field.font.style&FontStyle.Strikeout)&&(t+="line-through "),0<(w&StiConditionPermissions.FontStyleUnderline)&&0<(l.field.font.style&FontStyle.Underline)&&(t+="underline"),StiString.isNullOrEmpty(t)||(f["textDecoration"]=t),0<(w&StiConditionPermissions.TextColor)){let t=l.field.conditionTextBrush.color;f["color"]=`rgba(${t.r}, ${t.g}, ${t.b}, ${t.a})`}}if(null!=l.field)switch(l.field.horAlignment){case StiTextHorAlignment.Left:f["text-align"]="left";break;case StiTextHorAlignment.Right:f["text-align"]="right";break;case StiTextHorAlignment.Center:f["text-align"]="center";break;case StiTextHorAlignment.Width:f["text-align"]="justify";break}return b["style"]=f,b}static applyStyle(n,t,i){let s,o,a,u,S,m,h,c,d,g=StiDashboardStyleHelper.getPivotTableStyle(n),p=t.crossTabInfo.cross.cells,C=n.columns.length+(0<n.rows.length?1:0)+(1<n.summaries.length&&n.summaryDirection==StiSummaryDirection.LeftToRight?1:0),b=(0==n.rows.length?1:n.rows.length)+(1<n.summaries.length&&n.summaryDirection==StiSummaryDirection.UpToDown?1:0);for(let e=0;e<p.length;e++)for(let l=0;l<p[e].length;l++)if(null!=p[e][l].field){let r=p[e][l],t=(!Stimulsoft.StiOptions.Engine.CrossTab.memoryOptimization||null!=r.field.text&&""!=r.field.text||r.fieldCloned||(r.field=r.field.clone(),r.fieldCloned=!0),!(r.isCrossSummary||r.field.is2(StiCrossSummary)||(r.field.is2(StiCrossRowTotal)||r.field.is2(StiCrossColumnTotal))&&null==r.guid));if(i)r.field.font=new Font("Arial",10,t?FontStyle.Bold:FontStyle.Regular),r.field.brush=new StiSolidBrush(Color.transparent),r.field.textBrush=new StiSolidBrush(Color.black);else if(r.field.is2(StiCrossRow))r.field.brush=null!=(s=r.field.conditionBrush)?s:new StiSolidBrush(this.getColor(n.cells.rows.backColor,g.rowHeaderBackColor)),r.field.textBrush=null!=(o=r.field.conditionTextBrush)?o:new StiSolidBrush(this.getColor(n.cells.rows.foreColor,g.rowHeaderForeColor)),r.field.font=this.changeFontSize(n.getRowFont(),1);else if(t)e<b&&l>=C?(r.field.brush=null!=(m=r.field.conditionBrush)?m:new StiSolidBrush(this.getColor(n.cells.rows.backColor,g.rowHeaderBackColor)),r.field.textBrush=null!=(h=r.field.conditionTextBrush)?h:new StiSolidBrush(this.getColor(n.cells.rows.foreColor,g.rowHeaderForeColor)),r.field.font=this.changeFontSize(n.getRowFont(),1)):(r.field.brush=null!=(c=r.field.conditionBrush)?c:new StiSolidBrush(this.getColor(n.cells.columns.backColor,g.columnHeaderBackColor)),r.field.textBrush=null!=(d=r.field.conditionTextBrush)?d:new StiSolidBrush(this.getColor(n.cells.columns.foreColor,g.columnHeaderForeColor)),r.field.font=this.changeFontSize(n.getColumnFont(),1));else{let t=null==(a=r.field)?void 0:a.is(StiCrossTotal),e=this.getBackColor(n,n.cells,g,l%2!=0,t),i=this.getForeColor(n,n.cells,g,l%2!=0,t);r.field.brush=null!=(u=r.field.conditionBrush)?u:new StiSolidBrush(e),r.field.textBrush=null!=(S=r.field.conditionTextBrush)?S:new StiSolidBrush(i),r.field.font=this.changeFontSize(t?n.getTotalFont():n.getDataFont(),1)}r.field.border.color=g.lineColor}}static getBackColor(t,e,i,r,l){let n=(l?e.totals:e.data).backColor;return null==e||n.equals(Color.transparent)?r?i.alternatingCellBackColor:i.cellBackColor:r?StiDashboardStyleHelper.isDarkStyle3(t)?StiColorUtils.light(n,25):StiColorUtils.dark(n,25):n}static getForeColor(t,e,i,r,l){let n=(l?e.totals:e.data).foreColor;return null==e||n.equals(Color.transparent)?r?i.alternatingCellForeColor:i.cellForeColor:n}static getColor(t,e){return t.equals(Color.transparent)?e:t}static buildCross(s,n,l,e=1){let o=new Hashtable;for(let t=0;t<n.meters.length;t++)o.set(n.meters[t].expression,t);s.crossTabInfo.startRow=0,s.crossTabInfo.startCol=0;let u=new StiComponentsCollection(null),S=new StiComponentsCollection(null),m=new StiComponentsCollection(null),h=new StiComponentsCollection(null),c=new StiComponentsCollection(null),d=new StiComponentsCollection(null),r=l.columns.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,l.report)).toList(),a=l.rows.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,l.report)).toList(),g=l.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,l.report)).toList(),p=null,C=null,b=null,w=new DataTable;for(let n of s.components.list)if(n.is(StiCrossCell)||n.is(StiCrossTitle)||n.is(StiCrossSummaryHeader)){let t=n.as(StiCrossRow),e=n.as(StiCrossColumn),a=n.as(StiCrossSummary),i=n.as(StiCrossSummaryHeader),r=n.as(StiCrossTitle);if(null!=r){r.typeOfComponent.startsWith("Row:")&&c.add(r),r.typeOfComponent.startsWith("Col:")&&d.add(r),r.typeOfComponent.startsWith("LeftTitle")&&(p=r),r.typeOfComponent.startsWith("RightTitle")&&(C=r),r.typeOfComponent.startsWith("SummaryTitle")&&(b=r);continue}if(null!=t&&(S.add(t),t.isTotalVisible||(t.total.height=0)),null!=e&&(u.add(e),e.isTotalVisible||(e.total.width=0)),null!=a&&!a.disabledByCondition&&a.enabled){m.add(a),a.arguments.clear(),a.report.dictionary.dataSources.cachedDataSources={};for(let t of a.report.dictionary.dataSources.list)0<t.name.indexOf(" ")&&(a.report.dictionary.dataSources.cachedDataSources[t.name.toLowerCase().split(" ").join("")]=t);try{let t=new StiParserParameters,e=(t.returnAsmList=!0,StiParser.parseTextValue2(a.value,a,null,t)),i=e.filter(t=>t.type==StiAsmCommandType.PushDataSourceField);1<i.length&&(i.forEach(t=>{let e=t.parameter1;if(!a.arguments.containsKey(e)){a.arguments.add(e,Enum.getName(StiSummaryType,a.summary)+`(${e})`);let t=new DataColumn(e,Object);w.columns.add(t)}}),a.complexExpression=!0,a.summaryForFieldsInExpression=!0)}catch(t){}a.conditions.toList().cast().forEach(s=>{let o=`{${s.expression}}`;try{let t=new StiParserParameters,e=(t.returnAsmList=!0,StiParser.parseTextValue2(o,a,null,t)),l=new List,i=(e.filter(t=>t.type==StiAsmCommandType.PushValue).forEach(t=>{let e,i,r=null==(i=null==(e=t.parameter1)?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().as(List))?void 0:i.where(t=>t.Type==StiAsmCommandType.PushDataSourceField);null!=r&&l.addRange(r)}),a.report.engine.parserConversionStore.get("*StiConditionExpression*"+a.name)),r=i.findIndex(t=>t.key==s),n=i[r].value;l.forEach(t=>{let e=t.parameter1;if(!a.arguments.containsKey(e)){a.arguments.add(e,Enum.getName(StiSummaryType,a.summary)+`(${e})`);let t=new DataColumn(e,Object);w.columns.add(t)}n=n.split(Enum.getName(StiSummaryType,a.summary)+`(${e})`).join(e)}),i[Stimulsoft.System.StiObject.stimulsoft]().removeAt(r),i.push({key:s,value:n})}catch(t){}}),a.report.dictionary.dataSources.cachedDataSources={}}null!=i&&h.add(i);let l=new DataColumn(n.name,Object);w.columns.add(l),n.is(StiCrossHeader)&&(l=new DataColumn("Display__"+n.name,Object),w.columns.add(l))}for(let l of n.rows){let r=w.newRow();for(let i of s.components.list){if(i.is(StiCrossSummaryHeader))continue;let e=i.as(StiCrossCell);if(null!=e){let t=o.contains(i.alias)?l[o.get(i.alias)]:null;if("number"==typeof(t=StiArray.isArray(t)?new List(t).firstOrDefault():t)&&(t=t[Stimulsoft.System.StiObject.stimulsoft]().toNumber()),r.sett(e.name,t),e.is(StiCrossHeader)&&r.sett("Display__"+i.name,l[o.get(i.alias)]),e.is(StiCrossSummary))for(let t of e.arguments)r.sett(t.key,o.contains(t.value)?l[o.get(t.value)]:null)}else if(i.is(StiCrossTitle)&&!StiString.isNullOrEmpty(i.alias)){let t=l[o.get(i.alias)];i.setTextInternal(t.toString())}}w.rows.add(r),s.next()}let f=new StiCross,i=(s.crossTabInfo.cross=f,s.crossTabInfo.cross.designTime=!1,s.crossTabInfo.cross.colFields=u,s.crossTabInfo.cross.rowFields=S,s.crossTabInfo.cross.sumFields=m,s.crossTabInfo.cross.sumHeaderFields=h,s.crossTabInfo.cross.colTitleFields=d,s.crossTabInfo.cross.rowTitleFields=c,s.crossTabInfo.cross.leftCrossTitle=p,s.crossTabInfo.cross.rightCrossTitle=C,s.crossTabInfo.cross.summaryCrossTitle=b,(s.crossTabInfo.cross.crossTab=s).dataSourceName="pivot",new StiDataTableSource("pivot","pivot"));i.dictionary=s.report.dictionary;for(let t of w.columns.list)i.columns.add(new StiDataColumn(t.columnName,t.columnName,t.columnName));i.dataTable=w,s.report.dictionary.dataSources.add(i),s.summaryDirection=1<(null==g?void 0:g.length)?l.summaryDirection:StiSummaryDirection.UpToDown,s.crossTabInfo.cross.create(w,s.report,s.summaryDirection,s.emptyValue),s.crossTabInfo.cross.crossTab=null;let y=StiDashboardStyleHelper.getPivotTableStyle(l),t=0==a.length&&0==r.length&&0<g.length;if(t){f.init(2,g.length);for(let r=0;r<g.length;r++){let t=g[r],e=new StiCrossColumn,i=(e.alias=t.expression,e.name="CrossTab_Sum"+r.toString(),e.page=s.page,e.horAlignment=StiTextHorAlignment.Center,e.textFormat=t.textFormat.clone(),e.guid=Guid.newGuidString(),e.font=l.getDataFont(),e.brush=new StiSolidBrush(y.cellBackColor),e.hideZeros=t.hideZeros,e.border=new StiBorder(r==g.length-1?StiBorderSides.Right|StiBorderSides.Top:0==r?StiBorderSides.Right|StiBorderSides.Bottom:StiBorderSides.Right|StiBorderSides.Bottom|StiBorderSides.Top,y.lineColor,1,StiPenStyle.Solid),e.height=StiElementConsts.Table.getHeight(e.font),f.cells[0][r]=new StiCell,f.cells[0][r].text=this.getLabel(t),f.cells[0][r].field=e,f.cells[0][r].parentCell=f.cells[0][r],new StiCrossSummary);i.name="CrossTab_Sum"+r.toString(),i.value=0<n.rows.length?n.rows[0][r].toString():"",i.page=s.page,i.horAlignment=StiTextHorAlignment.Right,i.textFormat=t.textFormat.clone(),i.guid=Guid.newGuidString(),i.font=l.getDataFont(),i.border=new StiBorder(StiBorderSides.None,y.lineColor,1,StiPenStyle.Solid),i.height=StiElementConsts.Table.getHeight(i.font),f.cells[1][r]=new StiCell,f.cells[1][r].field=i,f.cells[1][r].text=0<n.rows.length?n.rows[0][r].toString():"",f.cells[1][r].parentCell=f.cells[1][r]}}if(s.rightToLeft&&StiCrossTabHelper.makeRightToLeft(s),s.crossTabInfo.cross.doAutoSize(),!t){for(let e=0;e<f.cells.length;e++)for(let t=0;t<f.cells[e].length;t++)null!=f.cells[e][t].field&&(f.cells[e][t].field.margins=f.cells[e][t].field.margins.clone(),0==e&&(f.cells[e][t].field.border.side=f.cells[e][t].field.border.side&~StiBorderSides.Left),0==t&&(f.cells[e][t].field.border.side=f.cells[e][t].field.border.side&~StiBorderSides.Top),e==f.cells.length-1&&(f.cells[e][t].field.border.side=f.cells[e][t].field.border.side&~StiBorderSides.Right),t==f.cells[e].length-1)&&(f.cells[e][t].field.border.side=f.cells[e][t].field.border.side&~StiBorderSides.Bottom);let t=r.length+(0<a.length?1:0),i=(0==a.length?1:a.length)+(1<g.length?1:0);for(let e=t;e<f.cells[0].length;e++)for(let t=i;t<f.cells.length;t++)null!=f.cells[t][e].field&&(f.cells[t][e].field.border.side=StiBorderSides.Left|StiBorderSides.Right);if(1<f.sumFields.count)for(let t=0;t<f.cells[0].length;t++)null!=f.cells[i-1][t].field&&(f.cells[i-1][t].field.border=new StiBorder(StiBorderSides.All,y.lineColor,1*e,StiPenStyle.Solid));null!=f.cells[0][0].field&&(f.cells[0][0].field.border.side=StiBorderSides.Right|StiBorderSides.Bottom)}s.report.dictionary.dataSources.remove(i)}static async convertToCrossTab(t,e,i=1){let r=new StiReport,l=(r.info.zoom=1,r.reportUnit=null!=t&&null!=t.report?t.report.reportUnit:StiReportUnitType.HundredthsOfInch,new StiEngine(r)),n=(r.engine=l,new StiPage),s=(r.pages.add(n),r.dictionary.variables=t.report.dictionary.variables,r.dictionary.dataSources=t.report.dictionary.dataSources,new StiCrossTab);return s.name="CrossTab",s.crossTabStyle=null,s.crossTabStyleIndex=9,n.components.add(s),await this.updateCrossTab(s,t,e,i),n.components.remove(s),s}static async updateCrossTab(h,l,t,n,e=!0){let r=new Hashtable,s=new List,o=new List,i=new List,a="",u=new Hashtable,S=new Hashtable,m=(s.clear(),o.clear(),new List),c=new List,d=new Hashtable,g=StiDashboardStyleHelper.getPivotTableStyle(l),p=l.columns.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,l.report)).toList(),C=l.rows.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,l.report)).toList(),b=l.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,l.report)).toList(),w=new Hashtable,f=0;for(let i of C){let t=new StiCrossRow,e=(t.showTotal=i.showTotal,t.alias=i.expression,t.displayValue="{"+i.expression+"}",t.value=t.displayValue,StiString.isNullOrEmpty(a)&&0<i.expression.length&&0<=i.expression.indexOf(".")&&(a=i.expression.substring(0,i.expression.indexOf("."))),t.page=null,t.name=h.name+"_Row"+(f+1).toString(),t.page=h.page,t.horAlignment=Enum.parse(StiTextHorAlignment,Enum.getName(StiHorAlignment,i.horAlignment)),t.textFormat=i.textFormat.clone(),t.guid=Guid.newGuidString(),t.wordWrap=i.size.wordWrap,t.margins=new StiMargins(this.FieldMargin*n),t.sortDirection=i.sortDirection,t.expandExpression=i.expandExpression,0<i.size.maxWidth&&(t.maxSize=new Size(h.report.unit.convertFromHInches(i.size.maxWidth*n),0)),0<i.size.minWidth&&(t.minSize=new Size(h.report.unit.convertFromHInches(i.size.minWidth*n),0)),0<i.size.width&&(t.maxSize=new Size(h.report.unit.convertFromHInches(i.size.width*n),0),t.minSize=new Size(h.report.unit.convertFromHInches(i.size.width*n),0)),w.set(t.alias,t.name),this.fillInteraction(i.dashboardInteraction,t),await this.setTopN(t,i.topN,l),await this.getCondition(l,i,t,n,h.name+"_ColTotal"+(s.length+1)),this.setupTitle(l,t,g,n),u.add(i,t),h.components.contains(t)&&h.components.remove(t),h.components.add(t),d.set(t,t),m.add(t),t.total);null==e&&(e=this.createRowTotal(l,t,r,g,n),StiString.isNullOrWhiteSpace(i.totalLabel)||(e.text=i.totalLabel),t.totalGuid=e.guid,h.components.add(e)),d.set(e,e),s.add(e),f++}let y=0;for(let i of p){let t=new StiCrossColumn,e=(t.showTotal=i.showTotal,t.alias=i.expression,t.displayValue="{"+i.expression+"}",t.value=t.displayValue,StiString.isNullOrEmpty(a)&&0<i.expression.length&&0<=i.expression.indexOf(".")&&(a=i.expression.substring(0,i.expression.indexOf("."))),t.page=null,t.name=h.name+"_Column"+(y+1).toString(),t.page=h.page,t.horAlignment=Enum.parse(StiTextHorAlignment,Enum.getName(StiHorAlignment,i.horAlignment)),t.guid=Guid.newGuidString(),t.wordWrap=i.size.wordWrap,t.margins=new StiMargins(this.FieldMargin*n),t.sortDirection=i.sortDirection,t.expandExpression=i.expandExpression,0<i.size.minWidth&&(t.minSize=new Size(h.report.unit.convertFromHInches(i.size.minWidth*n),0)),0<i.size.maxWidth&&(t.maxSize=new Size(h.report.unit.convertFromHInches(i.size.maxWidth*n),0)),0<i.size.width&&(t.maxSize=new Size(h.report.unit.convertFromHInches(i.size.width*n),0),t.minSize=new Size(h.report.unit.convertFromHInches(i.size.width*n),0)),w.set(t.alias,t.name),this.fillInteraction(i.dashboardInteraction,t),await this.getCondition(l,i,t,n,h.name+"_RowTotal"+(o.length+1)),await this.setTopN(t,i.topN,l),t.textFormat=i.textFormat.clone(),this.setupTitle(l,t,g,n),S.add(i,t),h.components.contains(t)&&h.components.remove(t),h.components.add(t),d.set(t,t),c.add(t),t.total);null==e&&(e=this.createColTotal(l,t,r,o,g,n),StiString.isNullOrWhiteSpace(i.totalLabel)||(e.text=i.totalLabel),t.totalGuid=e.guid,h.components.add(e)),d.set(e,e),o.add(e),y++}let M=1;for(let e of b){let t=new StiCrossSummary;t.alias=e.expression,this.setSummaryType(t,e.expression),t.page=null,t.name=h.name+"_Sum"+M.toString(),t.page=h.page,t.horAlignment=Enum.parse(StiTextHorAlignment,Enum.getName(StiHorAlignment,e.horAlignment)),t.textFormat=e.textFormat.clone(),t.guid=Guid.newGuidString(),await this.getCondition(l,e,t,n,""),t.font=this.changeFontSize(l.getDataFont(),n),t.border=new StiBorder(StiBorderSides.All,g.lineColor,1*n,StiPenStyle.Solid),t.height=StiElementConsts.Table.getHeight(t.font,n),t.hideZeros=e.hideZeros,StiString.isNullOrEmpty(t.value)||w.set(t.value.substring(1,t.value.length-1),t.name),this.fillInteraction(e.dashboardInteraction,t),0<e.size.minWidth&&(t.minSize=new Size(h.report.unit.convertFromHInches(e.size.minWidth*n),0)),0<e.size.maxWidth&&(t.maxSize=new Size(h.report.unit.convertFromHInches(e.size.maxWidth*n),0)),0<e.size.width&&(t.maxSize=new Size(h.report.unit.convertFromHInches(e.size.width*n),0),t.minSize=new Size(h.report.unit.convertFromHInches(e.size.width*n),0)),d.set(t,t),h.components.contains(t)&&h.components.remove(t),h.components.add(t),M++}if(b.length<2){for(let t of i)h.components.contains(t)&&h.components.remove(t);i.clear()}else if(i.length>b.length)while(i.length>b.length){let t=i[i.length-1];h.components.contains(t)&&h.components.remove(t),i.removeAt(i.length-1)}else if(i.length<b.length)while(i.length<b.length){let t=new StiCrossSummaryHeader;t.text=StiString.isNullOrEmpty(b[i.length].label)?(i.length+1).toString():b[i.length].label,t.margins=new StiMargins(this.FieldMargin*n),t.page=null,t.name=h.name+"_SumHeader"+(i.length+1).toString(),t.page=h.page,t.font=this.changeFontSize(l.getRowFont(),n),t.border.size*=n,h.applyFieldStyle(t),h.components.add(t),i.add(t)}for(let t of i)d.set(t,t);let V=1;for(let t of s)t.page=null,t.name=h.name+"_RowTotal"+(V++).toString(),t.page=h.page;let B=1;for(let t of o)t.page=null,t.name=h.name+"_ColTotal"+(B++).toString(),t.page=h.page;let I=0<p.length&&0<C.length,T=[],x=[],D=null,F=null,A=null;for(let e of h.components.list)if(e.is(StiCrossTitle)){let t=e;t.typeOfComponent.startsWith("Col:")&&T.push(t),t.typeOfComponent.startsWith("Row:")&&x.push(t),t.typeOfComponent.startsWith("LeftTitle")&&(D=t),t.typeOfComponent.startsWith("RightTitle")&&(F=t),t.typeOfComponent.startsWith("SummaryTitle")&&(A=t)}if(0==C.length)for(let r of c){let e="Col:"+r.name,i=!1;for(let t of T)if(t.typeOfComponent==e){T[Stimulsoft.System.StiObject.stimulsoft]().remove(t),i=!0,d.set(t,t);break}if(!i){let e="",i=new StiCrossTitle;i.name=r.name+"_Title",i.typeOfComponent="Col:"+r.name;for(let t of p)S.get(t)==r&&(e=this.getLabel(t),i.horAlignment=StiTextHorAlignment.Center,i.textFormat=t.textFormat.clone());i.text=e,this.setupField(i,n),this.setupTitle(l,i,g,n),h.components.add(i),d.set(i,i)}}for(let r of m){let e="Row:"+r.name,i=!1;for(let t of x){if(t.typeOfComponent!=e)continue;x[Stimulsoft.System.StiObject.stimulsoft]().remove(t),i=!0,d.set(t,t);break}if(!i){let e="",i=new StiCrossTitle;for(let t of C)u.get(t)==r&&(e=this.getLabel(t),i.horAlignment=StiTextHorAlignment.Center,i.textFormat=t.textFormat.clone());this.setupField(i,n),i.name=r.name+"_Title",i.text=e,i.typeOfComponent="Row:"+r.name,this.setupTitle(l,i,g,n),h.components.add(i),d.set(i,i)}}if(null==D?I&&((D=new StiCrossTitle).name=h.name+"_LeftTitle",this.setupField(D,n),null!=l.title&&(D.text=l.title.text),D.typeOfComponent="LeftTitle",this.setupTitle(l,D,g,n),h.components.add(D),d.set(D,D)):I&&d.set(D,D),null==F){if(I){let e="",i=!0;for(let t of p)i||(e+=", "),e+=this.getLabel(t),i=!1;(F=new StiCrossTitle).name=h.name+"_RightTitle",F.text=e,F.typeOfComponent="RightTitle",this.setupField(F,n),this.setupTitle(l,F,g,n),h.components.add(F),d.set(F,F)}}else I&&d.set(F,F);let v=(0==p.length||0==C.length)&&0<b.length,E=StiString.join(", ",b.select(t=>t.label)),R=(null==A?v&&((A=new StiCrossTitle).name=h.name+"_SummaryTitle",A.text=E,A.typeOfComponent="SummaryTitle",this.setupField(A,n),this.setupTitle(l,A,g,n),h.components.add(A),d.set(A,A)):v&&((StiString.isNullOrEmpty(A.text)||A.text.startsWith(E)||E.startsWith(A.text))&&(A.text=E),d.set(A,A)),0);while(R<h.components.count){let t=h.components.getByIndex(R);null==d.get(t)?h.components.removeAt(R):R++}let O=RectangleD.empty;h.dataSourceName=a;for(let i of h.components.list)if(i.is2(StiCrossColumn)||i.is2(StiCrossRow)||i.is2(StiCrossSummary))for(let t=1;t<=10;t++){let e=i.interaction[`drillDownParameter`+t];for(let t of w.keys.list)e.expression=e.expression.replace(t.toString(),`pivot.`+w.get(t))}if(!e)return;this.buildCross(h,t,l,n);for(let e of h.components.toCast())if(h.crossTabInfo.cross.fields.contains(e)){let t=h.crossTabInfo.cross.fields.get(e);h.crossTabInfo.cross.setTextOfCell(t.x,t.y,e.cellText)}h.crossTabInfo.cross.maxWidth=h.page.width*n,h.crossTabInfo.cross.maxHeight=h.page.height*n,h.crossTabInfo.cross.doAutoSize();let H=new Hashtable;for(let e of h.components.toCast()){let t=e.as(StiCrossHeader);null==t||t.isTotalVisible||H.set(t.total,t.total)}let L=h.report.unit.convertFromHInches(2),_=h.report.unit.convertFromHInches(2);for(let m of h.components.toCast())if(h.crossTabInfo.cross.fields.contains(m)){let t=h.crossTabInfo.cross.fields.get(m),e=h.report.unit.convertRectangleToHInches(Stimulsoft.Report.CrossTab.StiCrossTabHelper.getCellRect(h,t.x,t.y)),i=(O.width=Math.max(O.width,e.right),O.height=Math.max(O.height,e.bottom),e=h.report.unit.convertRectangleFromHInches(e),null!=H.get(m)&&(e.width=0,e.height=0),0),r=0,l=m.as(StiCrossTitle),n=(null!=l&&(l.typeOfComponent.startsWith("LeftTitle")&&(i=0,r=0),l.typeOfComponent.startsWith("RightTitle")&&(i=L,r=0),l.typeOfComponent.startsWith("SummaryTitle")&&(0==C.length&&(i=0,r=2*_),0==p.length)&&(i=L,r=_),l.typeOfComponent.startsWith("Row:")&&(i=0,r=_),l.typeOfComponent.startsWith("Col:"))&&(i=0,r=_),m.as(StiCrossRow)),s=(null!=n&&(i=0,r=2*_),m.as(StiCrossRowTotal)),o=(null!=s&&(i=0,r=2*_),m.as(StiCrossColumn)),a=(null!=o&&(i=L,r=_),m.as(StiCrossColumnTotal)),u=(null!=a&&(i=L,r=_),m.as(StiCrossSummary)),S=(null!=u&&(i=L,r=2*_),m.as(StiCrossSummaryHeader));null!=S&&(r=h.summaryDirection==StiSummaryDirection.LeftToRight?(i=L,_):(i=0,2*_)),e.x+=i,e.y+=r,m.clientRectangle=e.clone()}}static fillInteraction(r,l){for(let i=0;i<r.getDrillDownParameters().length;i++){let t=r.getDrillDownParameters()[i],e=l.interaction[`drillDownParameter`+(i+1)];e.expression=0==t.expression.indexOf("{")?t.expression.substring(1,t.expression.length-1):t.expression,e.name=t.name}r.onClick!=StiInteractionOnClick.ShowDashboard||StiString.isNullOrEmpty(r.drillDownPageKey)||(l.interaction.drillDownPageGuid=r.drillDownPageKey)}static changeFontSize(t,e){return 1==e?t:StiFontUtils.changeFontSize(t,t.size*e)}static async getCondition(s,o,a,t,e){let i=new List;for(let t of s.pivotTableConditions)t.destinationValueMeter!=StiLabelHelper.getLabel(o)&&t.destinationValueMeter!=o.key||i.add(t);if(null!=i&&0<i.length)for(let n of i){let l=new(n.conditionType==StiPivotTableConditionType.Condition?StiCondition:StiCrossTabTopNCondition),r="";if(n.conditionType==StiPivotTableConditionType.Condition){let t=new StiFilter,e=(t.condition=n.condition,t.dataType=n.dataType,t.value1=n.value,s.getAllMeters().find(t=>n.keyValueMeter==t.key||n.keyValueMeter==StiLabelHelper.getLabel(t))),i=null==e||e==o?"value2":e.expression;r=StiDataHelper.getFilterExpression(t,i,a.report),n.dataType!=Stimulsoft.Report.Components.StiFilterDataType.String&&(r=`value2 == null ? False : (value2.ToString().Length > 0 ? ${r} : False)`),l.expression=r}if(l.permissions=n.permissions,l.permissions&=~StiConditionPermissions.Borders,l.backColor=n.backColor,l.font=this.changeFontSize(n.font,t),l.textColor=n.textColor,n.iconAlignment!=StiIconAlignment.None&&(l.icon=await n.getIcon(),l.iconSize=n.iconSize,l.iconAlignment=n.iconAlignment==StiIconAlignment.Right?ContentAlignment.MiddleRight:ContentAlignment.MiddleLeft),n.conditionType==StiPivotTableConditionType.Condition){let t={key:l,value:`{${r}}`};this.addToConversionStore(a,"*StiConditionExpression*"+a.name,t)}if(a.conditions.add(l),a instanceof StiCrossHeader&&n.conditionType==StiPivotTableConditionType.TopN){let i=l[Stimulsoft.System.StiObject.stimulsoft]().as(StiCrossTabTopNCondition),r=(i.count=n.topNCount,i.mode=n.topNMode,i.conditionCell=n.topNConditionCell,i.conditionHeader=n.topNConditionHeader,i.conditionTotal=n.topNConditionTotal,s.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,s.report)).toList());for(let e=0;e<r.length;e++){let t=r[e];if(t.key!=n.measureField||StiString.isNullOrEmpty(t.expression)||-1==t.expression.indexOf("(")||-1==t.expression.indexOf(")"))continue;i.measureField=t.expression.substring(t.expression.indexOf("(")+1).replace(")","")}}}}static setupTitle(t,e,i,r){e.border=new StiBorder(StiBorderSides.All,i.lineColor,1*r,StiPenStyle.Solid),e.height=StiElementConsts.Table.getHeight(e.font)*r,e.font=this.changeFontSize(StiElementConsts.Table.Font.getCachedGdiFont(),r),e.is2(StiCrossTitle)||e.is2(StiCrossColumn)?e.font=this.changeFontSize(t.getColumnFont(),r):e.is2(StiCrossRow)?e.font=this.changeFontSize(t.getRowFont(),r):e.is2(StiCrossTotal)?e.font=this.changeFontSize(t.getTotalFont(),r):e.font=this.changeFontSize(t.getDataFont(),r)}static addToConversionStore(e,i,t){if(null==e.report.engine.parserConversionStore.get(i)){let t=[];e.report.engine.parserConversionStore.set(i,t)}e.report.engine.parserConversionStore.get(i).push(t)}static setupField(t,e){t.margins=new StiMargins(this.FieldMargin*e),t.guid=Guid.newGuidString()}static createRowTotal(t,e,i,r,l){let n=e.guid,s=i.get(n);return null==s&&((s=new StiCrossRowTotal).text=StiString.isNullOrEmpty(t.totalLabel)?Loc.get("PropertyMain","Total"):t.totalLabel,s.wordWrap=e.wordWrap,s.minSize=e.minSize.multiply(l),s.maxSize=e.maxSize.multiply(l),this.setupField(s,l),this.setupTitle(t,s,r,l),s.font=this.changeFontSize(t.cells.rows.font,l)),i.set(n,s),s}static createColTotal(t,e,i,r,l,n){let s=e.guid,o=i.get(s);return null==o&&((o=new StiCrossColumnTotal).text=StiString.isNullOrEmpty(t.totalLabel)?Loc.get("PropertyMain","Total"):t.totalLabel,o.wordWrap=e.wordWrap,o.minSize=e.minSize.multiply(n),o.maxSize=e.maxSize.multiply(n),this.setupField(o,n),this.setupTitle(t,o,l,n),o.font=this.changeFontSize(t.cells.columns.font,n)),i.set(s,o),r.add(o),o}static getLabel(t){return StiString.isNullOrEmpty(t.label)?t.expression.substr(t.expression.lastIndexOf(".")+1)[Stimulsoft.System.StiObject.stimulsoft]().replaceAll("]","")[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(")",""):t.label}static getSummaryTypes(){return 0==this.summaryTypes.count&&(this.summaryTypes.add("None","None"),this.summaryTypes.add("Sum","Sum"),this.summaryTypes.add("Avg","Average"),this.summaryTypes.add("Min","Min"),this.summaryTypes.add("Max","Max"),this.summaryTypes.add("DistinctCount","CountDistinct"),this.summaryTypes.add("Count","Count"),this.summaryTypes.add("Median","Median"),this.summaryTypes.add("First",""),this.summaryTypes.add("Last","")),this.summaryTypes}static async setTopN(e,t,i){let r=i.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,i.report)).toList();if(e.topN=t.clone(),e.topN.mode!=StiDataTopNMode.None){e.topN.showOthers&&(e.topN.othersText=StiString.isNullOrEmpty(e.topN.othersText)?Loc.get("FormDesigner","Others"):await StiReportParser.parseAsync(e.topN.othersText,i));for(let t of r){if(!StiString.isNullOrEmpty(t.label)&&t.label!=e.topN.measureField||StiLabelHelper.getLabel(t)!=e.topN.measureField)continue;t.label!=e.topN.measureField||StiString.isNullOrEmpty(t.expression)||-1==t.expression.indexOf("(")||-1==t.expression.indexOf(")")||(e.topN.measureField=t.expression.substr(t.expression.indexOf("(")+1)[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(")",""))}}}static setSummaryType(e,l){if(StiString.isNullOrEmpty(l))return;let n=this.getSummaryTypes();for(let t of n.keys){let r=t+`(`;if(0<=l.indexOf(r)){"First"==t||"Last"==t?e.summary=StiSummaryType.None:e.summary="Count"!=t&&"DistinctCount"!=t?StiSummaryType[n.get(t)]:StiSummaryType.Sum;let i=l.indexOf(r);while(0<=i){let t=i+r.length,e=1;while(t<l.length&&0!=e)e+="("==l[t]?1:")"==l[t]?-1:0,t++;l=l.substr(0,i)+l.substr(i+r.length,t-i-r.length-1)+l.substr(t,l.length-t),i=l.indexOf(r)}}}e.value=`{${l}}`}}StiPivotTableHelper.summaryTypes=new Hashtable,StiPivotTableHelper.FieldMargin=1.5,__.h.StiPivotTableHelper=StiPivotTableHelper}__.v.StiProgressIteration=class{constructor(t="",e,i){this.series=t,this.value=e,this.target=i}};let StiProgressIteration=__.v.StiProgressIteration;{class StiProgressElementBuilder extends __.i.StiElementBuilder{async render(s,o){this.storedCulture=StiCultureHelper.set(s.report);try{let e=this.getValueMeterIndex(o),i=this.getTargetMeterIndex(o),r=this.getSeriesMeterIndex(o),t=this.getSeriesKeys(o,r),l=t.count2(),n=t.select(t=>new StiProgressIteration(this.getSeries(o,r,t,s.report),this.getValue(o,e,r,l,t),this.getNullableValue(o,i,r,l,t)));return n=StiProgressElementBuilder.processVariationSort(s,n),await StiProgressElementBuilder.processTopNElements(s,n)}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}static processVariationSort(t,e){let i=t.userSorts;return e=null!=i&&i.any(t=>t.key==StiDataSortVariation.ident)?i.firstOrDefault().direction==StiDataSortDirection.Ascending?e.orderBy(t=>0!=t.target?t.value/t.target:0):e.orderByDescending(t=>0!=t.target?t.value/t.target:0):e}static async processTopNElements(l,n){if(l.topN.mode==StiDataTopNMode.None)return n;let s=(n=(l.topN.mode==StiDataTopNMode.Bottom?n.orderBy(t=>t.value):n.orderByDescending(t=>t.value)).toList()).take(l.topN.count).toList();if(n.count2()>l.topN.count&&l.topN.showOthers){let t=n.skip(l.topN.count).sum(t=>StiValueHelper.tryToNumber(t.value)),e=n.skip(l.topN.count),i=e.all(t=>null==t.target)?null:e.sum(t=>StiValueHelper.tryToNullableNumber(t.target)),r=StiString.isNullOrEmpty(l.topN.othersText)?Loc.get("FormDesigner","Others"):await StiReportParser.parseAsync(l.topN.othersText,l);s.add(new StiProgressIteration(r,t,i))}return s}getValueMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiValueProgressMeter));return null!=e?t.meters.indexOf(e):-1}getTargetMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiTargetProgressMeter));return null!=e?t.meters.indexOf(e):-1}getSeriesMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiSeriesProgressMeter));return null!=e?t.meters.indexOf(e):-1}}__.i.StiProgressElementBuilder=StiProgressElementBuilder}__.w.StiProgressVisualCreator=class{static createProgressVisual(t,e){switch(t.mode){case StiProgressElementMode.DataBars:return new __.v.StiDataBarsProgressVisual(t,e);case StiProgressElementMode.Circle:return new __.v.StiCircleProgressVisual(t,e);case StiProgressElementMode.Pie:return new __.v.StiPieProgressVisual(t,e);default:throw new StiTypeNotRecognizedException(t.mode)}}};let StiProgressElementBuilder=__.i.StiProgressElementBuilder,IStiProgressVisualSvgHelper=Stimulsoft.Report.Dashboard.Visuals.IStiProgressVisualSvgHelper,StiProgressVisualCreator=__.w.StiProgressVisualCreator;{class OQa{implements(){let t=[IStiProgressVisualSvgHelper];return(this.implements=()=>t)()}async writeProgress(t,e,i,r){let l=new Rectangle(0,0,e.width,e.height),n=e.component,s=await OQa.getDataTable(n);if(null==s)return;let o=await(new StiProgressElementBuilder).render(n,s);if(n["isSampleForStyles"]?o=this.getStyleSampleIterations():this.isEmptyData(n,s)&&(o=this.getEmptyDataIterations(n)),null==o||!o.any())return;let a=new StiContextPainter,u=new StiContext(a,!0,!1,!1,1),S=StiProgressVisualCreator.createProgressVisual(n,o.toList());if(i&&i.needToVertScroll){let t=S.getContentRectangle(l.clone());i.needToVertScroll=t.height>l.height+5,i.needToVertScroll&&(l.width-=15,t=S.getContentRectangle(l.clone()),l=t,r.ref=Stimulsoft.System.Convert.toInt32(l.height))}await S.draw(u,l.clone()),t.writeStartElement("g");let m=i&&i.needToVertScroll?0:e.x,h=i&&i.needToVertScroll?0:e.y;t.writeAttributeString("transform",StiString.format("translate({0},{1})",this.p(m),this.p(h))),StiContextSvgHelper.writeGeoms(t,u,!1),t.writeEndElement()}p(t){return t.toString().split(",").join(".")}isEmptyData(t,e){return null!=e&&e.isEmpty&&t.isQuerable}getStyleSampleIterations(){let t=new List,e=new StiProgressIteration;return e.value=75,e.target=100,t.add(e),t}getEmptyDataIterations(t){let e=new List,i=new StiProgressIteration;return i.value=0,t.showBlanks&&(i.series=StiLocalization.get("Dashboard","Blank")),e.add(i),e}static async getDataTable(t){let e,i=null==(e=t.as(IStiManuallyEnteredData))?void 0:e.getManuallyEnteredDataTable();if(null!=i)return i;return StiElementDataCache.tryToGetOrCreate(t)}}__.h.StiProgressVisualSvgHelper=OQa}__.h.StiTableAlignmentHelper=class{static getHorAlign(t){let e=__.h.StiMeterHelper.toDataType(t);if(Type.isNumericType(e))return StiHorAlignment.Right;if(Type.isDateType(e))return StiHorAlignment.Center;return StiHorAlignment.Left}},__.h.StiTableElementHelper=class{static minDataColumnValue(t,e,i){if(!(t.is2(StiDataBarsColumn)||t.is2(StiColorScaleColumn)||t.is2(StiBubbleColumn)))return 0;return e.rows.any()?e.rows.min(t=>StiValueHelper.tryToNumber(t[i])):0}static maxDataColumnValue(t,e,i){if(!(t.is2(StiDataBarsColumn)||t.is2(StiColorScaleColumn)||t.is2(StiBubbleColumn)))return 0;return e.rows.any()?e.rows.max(t=>StiValueHelper.tryToNumber(t[i])):0}static calculateTotal(t,i,r){switch(t.summaryType){case StiSummaryColumnType.Sum:if(StiExpressionHelper.isPercentOfGrandTotal(t.expression))return 1;return r.rows.any()?r.rows.sum(t=>i<t.length?StiValueHelper.tryToNumber(t[i]):0):0;case StiSummaryColumnType.Count:return r.rows.any()?r.rows.count2(t=>i<t.length&&null!=t[i]):0;case StiSummaryColumnType.Min:return r.rows.any()?r.rows.min(t=>i<t.length?StiValueHelper.tryToNumber(t[i]):0):0;case StiSummaryColumnType.Max:return r.rows.any()?r.rows.max(t=>i<t.length?StiValueHelper.tryToNumber(t[i]):0):0;case StiSummaryColumnType.Average:{let t=r.rows.any()?r.rows.sum(t=>i<t.length?StiValueHelper.tryToNumber(t[i]):0):0,e=r.rows.any()?r.rows.count2(t=>i<t.length&&null!=t[i]&&null!=t[i]):0;return 0==e?0:t/e}}return 0}},__.h.StiTitleMeasureHelper=class{static measureTitle(t){return this.measureTitle2(t,t.text)}static measureTitle2(t,e){return this.measureTitle3(null,null,t,e)}static measureTitle3(t,e,i,r){var l;if(null==i||!i.visible)return Size.empty;let n=StiScale.yy(30),s=null!=(l=null==e?void 0:e.width)?l:Rectangle.empty.width;if(StiString.isNullOrWhiteSpace(r))return new Size(s,n);let o=i.sizeMode==StiTextSizeMode.WordWrap||i.sizeMode==StiTextSizeMode.FitAndWordWrap?__.h.StiAutoSizeTextHelper.measure2(t,r,i.font,s):__.h.StiAutoSizeTextHelper.measure(t,r,i.font);return n=Math.max(n,o.height),null!=e&&(n=Math.min(n,e.height)),new Size(o.width,n)}static measureTitle4(t,e,i,r){let l=StiScale.yy(30);if(StiString.isNullOrWhiteSpace(r))return new Size(e.width,l);let n=__.h.StiAutoSizeTextHelper.measure(t,r,i);return l=Math.max(l,n.height),null!=e&&(l=Math.min(l,e.height)),new Size(n.width,l)}};{class ZRa{static loadReport(t,e){switch(e){case"Financial":t.loadPacked(this.financial);break;case"Orders":t.loadPacked(this.orders);break;case"SalesOverview":t.loadPacked(this.salesOverview);break;case"TicketsStatistics":t.loadPacked(this.ticketsStatistics);break;case"TrafficAnalytics":t.loadPacked(this.trafficAnalytics);break;case"VehicleProduction":t.loadPacked(this.vehicleProduction);break;case"WebsiteAnalytics":t.loadPacked(this.websiteAnalytics);break}}}ZRa.financial="H4sIABxOZ2QAC+1b63PauhL/3r+CyadzJjlFsiU/2t4zQyA8EggJJoRk8kWyZHBibOJHgJzp/35l8wgYG0ibc++Zzul02ka7knZXv13trty/PhUKRx0+9vywx/3A9tyjL4UjCUjyZ+kzOjp5I9cim8U0TGQVWKYuQ4CQJmOdytxSJYShrGMVmutzLsmIx3Oqtktc0ybOOrHk2CTIpVZtJ5la+fLwMB8JHh7OjUKFWyRywkKFBEPqEZ8Vunw0dkjIBX210ueR/7qxVxQOPT9ezwjtUeQEnhWu08s+Fysk+hUr4l+/gWMAAfi9uME0JO5gnQkqGkI6RKoGgJggvU04cwe2y9csuhiQ5uQyccxIyCyILY8lejbckPtjn4fJ6Pq2N64dxhz1yGU+Z+EwaFsN1xzOeQzTt8dhU0gWkUGyUtkYEn+82EiYKvKTYe7+cWPMR1e269l8wn2Dh6HtDuKzkDBKOK58/iJo6xShq4wRxvMVbDMWk/gzQfpLjCTSBl7kmzxYDYlBsPaD+DEbEAtiDiAW1O5snEw9DxbmWYw3Rgu9SX/2WLq/e6l0wDk/G9/dvdrj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Z3oYdLmg1FlkJQzaUWdqmonpqdtWnrIRPI8W31iWGLLJC4JG7yj55z/+/Df1QiAX4l4AAA==",__.d.StiWizardDashboardsHelper=ZRa}__.l.StiDashboardImages=class{};{class aSa{clone(){return this[Stimulsoft.System.StiObject.stimulsoft]().memberwiseClone()}meta(){return[new StiStringNullOrEmptyMeta("Name"),new StiStringNullOrEmptyMeta("Expression")]}saveToJsonObject(t){return StiMetaHelper.saveToJsonObject(t,this)}loadFromJsonObject(t){StiMetaHelper.loadFromJsonObject(t,this)}loadFromXml(t){StiMetaHelper.loadFromXml(t,this)}static loadFromJson(t){let e=new aSa;return e.loadFromJsonObject(t),e}static loadFromXml(t){let e=new aSa;return e.loadFromXml(t),e}saveToString(){return this.saveToJsonObject(StiJsonSaveMode.Report).serialize()}getStringRepresentation(){if(StiString.isNullOrWhiteSpace(this.name))return Loc.get("FormStyleDesigner","NotSpecified");return StiString.isNullOrWhiteSpace(this.expression)?this.name:this.name+` - `+this.expression}constructor(){this.name="",this.expression=""}}__.g.StiDashboardDrillDownParameter=aSa}__.x.StiDashboardDrillDownParameterConverter=class{},__.x.StiDashboardInteractionConverter=class{},__.x.StiDashboardInteractionCreator=class{static new2(t){switch(t){case"Chart":return new __.g.StiChartDashboardInteraction;case"Table":return new __.g.StiTableDashboardInteraction;case"TableColumn":return new __.g.StiTableColumnDashboardInteraction;case"RegionMap":return new __.g.StiRegionMapDashboardInteraction;case"Text":return new __.g.StiTextDashboardInteraction;case"Image":return new __.g.StiImageDashboardInteraction;case"Gauge":return new __.g.StiGaugeDashboardInteraction;case"Indicator":return new __.g.StiIndicatorDashboardInteraction;case"Shape":return new __.g.StiShapeDashboardInteraction;case"Progress":return new __.g.StiProgressDashboardInteraction;case"OnlineMap":return new __.g.StiOnlineMapDashboardInteraction;case"PivotTable":return new __.g.StiPivotTableDashboardInteraction;case"PivotTableItem":return new __.g.StiPivotTableItemDashboardInteraction;case"Cards":return new __.g.StiCardsDashboardInteraction;case"Filter":return new __.g.StiFilterDashboardInteraction;case"CardsColumn":return new __.g.StiCardsColumnDashboardInteraction;default:throw new StiTypeNotRecognizedException(t)}}},__.x.StiDashboardInteractionJsonConverter=class{},__.x.StiTableDashboardInteractionConverter=class extends __.x.StiDashboardInteractionConverter{};let StiWebContentElement=__.Y.StiWebContentElement,StiButtonElement=__.E.StiButtonElement,StiShapeElement=__.Z.StiShapeElement,StiComboBoxElement=__.S.StiComboBoxElement,StiListBoxElement=__.P.StiListBoxElement,StiTreeViewBoxElement=__.I.StiTreeViewBoxElement,StiTreeViewElement=__.J.StiTreeViewElement,StiDatePickerElement=__.Q.StiDatePickerElement,StiTableElement=__.K.StiTableElement,StiCardsElement=__.F.StiCardsElement,StiProgressElement=__.M.StiProgressElement,StiOnlineMapElement=__.O.StiOnlineMapElement,StiRegionMapElement=__.L.StiRegionMapElement,StiImageElement=__.X.StiImageElement,StiGaugeElement=__.T.StiGaugeElement,StiChartElement=__.H.StiChartElement,StiNumberBoxElement=__.R.StiNumberBoxElement,StiDashboard=__.e.StiDashboard;{class jSa{}__.m.StiDashboardOptions=jSa,__.m.Services=class{static get elements(){return null==this._elements&&(this._elements=[StiDashboard,StiButtonElement,StiCardsElement,StiGaugeElement,StiImageElement,StiWebContentElement,StiIndicatorElement,StiRegionMapElement,StiOnlineMapElement,StiPanelElement,StiPivotTableElement,StiProgressElement,StiTableElement,StiTextElement,StiShapeElement,StiComboBoxElement,StiListBoxElement,StiTreeViewBoxElement,StiTreeViewElement,StiDatePickerElement,StiNumberBoxElement],Stimulsoft.Report.Chart.StiChartAssembly.isAssemblyLoaded)&&this._elements.push(StiChartElement),this._elements}}}{class kSa{static fetchAll(){return __.m.Services.elements}static load(){Stimulsoft["StiOptions"].Services.components.push(...this.fetchAll())}}(__.m.StiDashboardElementsLoader=kSa).load()}let StiHeatmapArea=Stimulsoft.Report.Chart.StiHeatmapArea,StiDataIndicatorValue=Stimulsoft.Data.Engine.StiDataIndicatorValue,StiDoughnutArea=Stimulsoft.Report.Chart.StiDoughnutArea,IStiClusteredColumnArea=Stimulsoft.Report.Chart.IStiClusteredColumnArea,IStiColumnShape3D=Stimulsoft.Report.Chart.IStiColumnShape3D,IStiClusteredColumnArea3D=Stimulsoft.Report.Chart.IStiClusteredColumnArea3D,IStiAxisArea3D=Stimulsoft.Report.Chart.IStiAxisArea3D,StiPie3dSeries=Stimulsoft.Report.Chart.StiPie3dSeries,StiClusteredBarArea=Stimulsoft.Report.Chart.StiClusteredBarArea,StiConstantLines_StiOrientation=Stimulsoft.Report.Chart.StiConstantLines_StiOrientation,StiLegendVisibility=__.H.StiLegendVisibility,StiPieSeries=Stimulsoft.Report.Chart.StiPieSeries,StiRadarArea=Stimulsoft.Report.Chart.StiRadarArea,StiMarker=Stimulsoft.Report.Chart.StiMarker,IStiGanttArea=Stimulsoft.Report.Chart.IStiGanttArea,StiChartLabelsStyle=__.H.StiChartLabelsStyle,IStiPieSeriesLabels=Stimulsoft.Report.Chart.IStiPieSeriesLabels,IStiOutsidePieLabels=Stimulsoft.Report.Chart.IStiOutsidePieLabels,IStiCenterPieLabels=Stimulsoft.Report.Chart.IStiCenterPieLabels,IStiYRightAxis=Stimulsoft.Report.Chart.IStiYRightAxis,StiXChartAxisTitle=__.H.StiXChartAxisTitle,IStiClusteredBarArea=Stimulsoft.Report.Chart.IStiClusteredBarArea,IStiAllowApplyBrushNegative=Stimulsoft.Report.Chart.IStiAllowApplyBrushNegative,IStiAllowApplyColorNegative=Stimulsoft.Report.Chart.IStiAllowApplyColorNegative,IStiSeriesLabels=Stimulsoft.Report.Chart.IStiSeriesLabels,IStiDoughnutSeries=Stimulsoft.Report.Chart.IStiDoughnutSeries,IStiPictorialSeries=Stimulsoft.Report.Chart.IStiPictorialSeries,IStiParetoSeries=Stimulsoft.Report.Chart.IStiParetoSeries,StiCustomFormatService=Stimulsoft.Report.Components.TextFormats.StiCustomFormatService,IStiPieSeries=Stimulsoft.Report.Chart.IStiPieSeries,StiYChartAxis=__.H.StiYChartAxis,StiXChartAxis=__.H.StiXChartAxis,IStiAxisArea=Stimulsoft.Report.Chart.IStiAxisArea,IStiStackedBaseLineSeries=Stimulsoft.Report.Chart.IStiStackedBaseLineSeries,IStiBaseLineSeries=Stimulsoft.Report.Chart.IStiBaseLineSeries,IStiFunnelSeries=Stimulsoft.Report.Chart.IStiFunnelSeries,StiBoxAndWhiskerHelper=Stimulsoft.Report.Chart.StiBoxAndWhiskerHelper,StiShowSeriesLabels=Stimulsoft.Report.Chart.StiShowSeriesLabels,IStiShowZerosSeries=Stimulsoft.Report.Chart.IStiShowZerosSeries,StiShowEmptyCellsAs=Stimulsoft.Report.Chart.StiShowEmptyCellsAs,StiChartHelper=Stimulsoft.Report.Chart.StiChartHelper,IStiFontIconsSeries=Stimulsoft.Report.Chart.IStiFontIconsSeries,IStiRoundValuesArea=Stimulsoft.Report.Chart.IStiRoundValuesArea,StiScatterSeries=Stimulsoft.Report.Chart.StiScatterSeries,IStiScatterArea=Stimulsoft.Report.Chart.IStiScatterArea,StiValueComparer=Stimulsoft.Base.Helpers.StiValueComparer,IStiShowNullsSeriesAs=Stimulsoft.Report.Chart.IStiShowNullsSeriesAs,IStiShowZerosSeriesAs=Stimulsoft.Report.Chart.IStiShowZerosSeriesAs,IStiRangeSeries=Stimulsoft.Report.Chart.IStiRangeSeries,StiHeatmapSeries=Stimulsoft.Report.Chart.StiHeatmapSeries;{class StiChartElementBuilder extends __.i.StiElementBuilder{async render(i,r){this.storedCulture=StiCultureHelper.set(i.report);try{let t=new Stimulsoft.Report.Components["StiChart"];if(t.horSpacing=i.area.horSpacing,t.vertSpacing=i.area.vertSpacing,t.isDashboard=!0,t.page=i.page,t.previousAnimations=i.previousAnimations,t.sortAnimation=i.sortAnimation,i.sortAnimation=!1,StiChartElementBuilder.setStyle(i,t),t.series.clear(),null==r)return t;await this.renderElements(i,t,r),await this.renderArea(i,t),await this.renderLegend(i,t),await this.renderSeriesLabels(i,t),await StiChartElementBuilder.renderConstantLines(i,t),this.simplifyValues(t),t.applyStyle(),t.allowApplyStyle=!1;let e=StiDashboardExpressionHelper.getBackColor(i,i.backColor);return Color.transparent.equals(e)||(t.brush=new StiSolidBrush(e)),t}finally{__.h.StiCultureHelper.restore(this.storedCulture)}}async renderElements(a,u,S){let m=null==u?void 0:u.report,t=this.getSeriesMeterIndex(S),e=this.getSeriesKeyValues(S,t),r=this.getArgumentMeterIndexes(S),h=this.getArgumentKeys(a,S).toList(),l=this.getValueMeters(S),n=e.count2();await this.calculateIndicatorValue(a);for(let o of e){let i=-1!=t&&1<n?S.rows.whereArrayItemStringEqualsTo(t,this.toString(o)):S.rows,s=new Dictionary;for(let e of h){let t=StiChartElementBuilder.getDetailRows(i,e,r);s.add(e,t)}let e=0;for(let t of l){let r=this.getValueMeterIndexes(S)[e],l=this.renderSeries(a,t,this.toReadableString(o,m),u);if(null==l)continue;await StiChartElementBuilder.renderConditions(this.toString(o),l,a,t),StiChartElementBuilder.renderTrendLines(l,a,t),l.values=List.create(Number,h.length);let n=0;for(let i of h){let t=s.get(i),e=List.getValueOrFirstOrDefault(t.getArrayItem(r).firstOrDefault());(null!=e&&e[Stimulsoft.System.StiObject.stimulsoft]().is(DateTime)||null!=e&&e[Stimulsoft.System.StiObject.stimulsoft]().is(TimeSpan))&&(l.core.isDateTimeValues=!0),l.values[n]=t.getArrayItem(r).firstOrDefaultAsNullableNumber(),n++}l.originalArguments=h.slice(),l.arguments=this.proccessSelectArguments(h,a,l,m);let i=l.as(IStiFunnelSeries);if(null!=i){let t=l.values,e=l.arguments;StiArray.sort3(t,e),StiArray.reverse(t),StiArray.reverse(e),i.values=t,i.arguments=e}else if(l.is(IStiParetoSeries)){let i=[],r=[];for(let e=0;e<l.values.length;e++){let t=l.values[e];if(!(0<t))continue;i.push(t),null!=l.arguments&&e<l.arguments.length?r.push(l.arguments[e]):r.push(e+1)}let t=i.slice(),e=r.slice();StiArray.sort3(t,e),StiArray.reverse(t),StiArray.reverse(e),l.valuesStart=null,l.values=t,l.arguments=e}e++,await StiChartElementBuilder.processTopNElements(a,l),Stimulsoft.Report.Chart["StiHistogramHelper"].checkValuesAndArguments(l,a.argumentFormat),await this.renderSeriesInteraction(l,a,h.length,this.toString(o))}}StiBoxAndWhiskerHelper.checkArgument(u),StiChartHelper.checkWaterfallTotals(u)}proccessSelectArguments(t,e,l,i){let r=l.as(StiScatterSeries);if(null!=r){let r=[];for(let i=0;i<l.originalArguments.length;i++){let t=l.originalArguments[i],e=null!=t&&0<t.length?t[0]:t;r.push(e)}return r}return t.select(t=>this.getString(e.argumentFormat,t,i))[Stimulsoft.System.StiObject.stimulsoft]().toArray()}static async processTopNElements(i,l){if(i.topN.mode==StiDataTopNMode.None)return;let n=new List,t=(l.values.length>l.arguments.length?l.values:l.arguments).length;for(let r=0;r<t;r++){let t=r<l.values.length?l.values[r]:null,e=r<l.arguments.length?l.arguments[r]:null,i=r<l.originalArguments.length?l.originalArguments[r]:null;n.add({key:e,key1:i,value:t})}let r=(n=i.topN.mode==StiDataTopNMode.Bottom?n.orderBy(t=>t.value):n.orderByDescending(t=>t.value)).take(i.topN.count);if(n.length>i.topN.count&&i.topN.showOthers){l.originalTopNValues=n.skip(i.topN.count).select(t=>t.value);let t=n.skip(i.topN.count).sum(t=>StiValueHelper.tryToNumber(t.value)),e=StiString.isNullOrEmpty(i.topN.othersText)?Loc.get("FormDesigner","Others"):await StiReportParser.parseAsync(i.topN.othersText,i);r.add({key:e,key1:e,value:t})}i.isBarChart&&r.reverse(),l.originalArguments=r.select(t=>t.key1),l.arguments=r.select(t=>t.key),l.values=r.select(t=>StiValueHelper.tryToNullableNumber(t.value))}static setStyle(t,e){if(t.style!=StiElementStyleIdent.Custom)return void(e.style=StiDashboardStyleHelper.getChartStyle(t));let i=t.report.styles.getCustomChartStyle(t.customStyleName);if(null!=i)return e.style=i,void(e.customStyleName=t.customStyleName);e.style=StiDashboardStyleHelper.getChartStyle2(StiElementStyleIdent.Blue)}static getDetailRows(t,i,r){if(!r.any())return t;return t.where(e=>{let t=r.select(t=>e[t]);return StiValueComparer.equalValues(t,i)})}renderSeries(t,e,i,r){let l=e,n=StiChartSeriesCreator.neww2(e.seriesType);return StiChartElementBuilder.renderSeriesYAxis(t,l,n),StiChartElementBuilder.renderSeriesLine(l,n),StiChartElementBuilder.renderSeriesShowZeros(l,n),StiChartElementBuilder.renderSeriesShowNulls(l,n),n.coreTitle=this.getSeriesTitle(t,i,e),n.core.seriesColors=null!=t.seriesColors&&0<t.seriesColors.length?t.seriesColors:null,n.isDashboard=!0,this.renderSeriesNegativeColor(t,n,r.series.count),this.renderSeriesParetoColor(t,n,r.series.count),this.renderMarker(t,n),StiChartElementBuilder.renderSeriesLighting(n),StiChartElementBuilder.renderSeriesIcon(t,n),StiChartElementBuilder.renderSeriesPie3d(t,n),n.is(IStiColumnShape3D)&&(n.columnShape=t.columnShape),r.series.add(n),n}static renderSeriesPie3d(t,e){var i;e.is(StiPie3dSeries)&&null!=(i=t.options3D)&&i[Stimulsoft.System.StiObject.stimulsoft]().is(StiPie3dOptions)&&(e.options3D=t.options3D[Stimulsoft.System.StiObject.stimulsoft]().as(StiPie3dOptions))}static renderSeriesYAxis(t,e,i){e.is(StiValueChartMeter)&&1<t.values.length&&(i.yAxis=e.yAxis)}static renderSeriesLine(i,r){if(null!=i){let t=r.as(IStiBaseLineSeries);if(null!=t)return t.lineStyle=i.lineStyle,void(t.lineWidth=i.lineWidth);let e=r.as(IStiStackedBaseLineSeries);null!=e&&(e.lineStyle=i.lineStyle,e.lineWidth=i.lineWidth)}}static renderSeriesShowZeros(t,e){let i=e.as(IStiShowZerosSeries);if(null==i)return;i.showZeros=t.showZeros==StiEmptyCellsAs.Zero;let r=e.as(IStiBaseLineSeries);if(null==r)return;t.showZeros==StiEmptyCellsAs.Gap&&(r.showZerosAs=StiShowEmptyCellsAs.Gap),t.showZeros==StiEmptyCellsAs.ConnectPointsWithLine&&(r.showZerosAs=StiShowEmptyCellsAs.ConnectPointsWithLine)}static renderSeriesShowNulls(t,e){let i=e.as(IStiShowNullsSeries);if(null==i)return;i.showNulls=t.showNulls==StiEmptyCellsAs.Zero;let r=e.as(IStiBaseLineSeries);if(null==r)return;t.showNulls==StiEmptyCellsAs.Gap&&(r.showNullsAs=StiShowEmptyCellsAs.Gap),t.showNulls==StiEmptyCellsAs.ConnectPointsWithLine&&(r.showNullsAs=StiShowEmptyCellsAs.ConnectPointsWithLine)}static renderSeriesLighting(t){t.is(IStiPieSeries)&&(t.lighting=!1),t.is(IStiDoughnutSeries)&&(t.lighting=!1)}static renderSeriesIcon(t,e){let i=e.as(IStiFontIconsSeries);null!=i&&(e.is(IStiPictorialSeries)&&null==t.icon?i.icon=Stimulsoft.Report.Helpers.StiFontIcons.QuarterFull:i.icon=t.icon)}renderMarker(t,e){let i,r=null!=e?e.as(IStiBaseLineSeries):null,l=null!=e?e.as(IStiStackedBaseLineSeries):null;null!=r?i=null!=r.marker?r.marker.as(StiMarker):null:null!=l&&(i=null!=l.marker?l.marker.as(StiMarker):null),null!=i&&(i.size=t.marker.size,i.angle=t.marker.angle,i.type=t.marker.type,i.extendedVisible=t.marker.visible)}renderSeriesNegativeColor(t,e,i){if(null==t.negativeSeriesColors||t.negativeSeriesColors.length<=0)return;while(i>=t.negativeSeriesColors.length)i-=t.negativeSeriesColors.length;let r=e.as(IStiAllowApplyBrushNegative),l=(null!=r&&(r.allowApplyBrushNegative=!0,r.brushNegative=new StiSolidBrush(t.negativeSeriesColors[i])),e.as(IStiAllowApplyColorNegative));null!=l&&(l.allowApplyColorNegative=!0,l.lineColorNegative=t.negativeSeriesColors[i])}renderSeriesParetoColor(t,e,i){if(null==t.paretoSeriesColors||t.paretoSeriesColors.length<=0)return;while(i>=t.paretoSeriesColors.length)i-=t.paretoSeriesColors.length;let r=e.as(IStiParetoSeries);null!=r&&(r.allowApplyLineColor=!0,r.lineColor=t.paretoSeriesColors[i])}async renderArea(t,e){let i=StiDashboardExpressionHelper.getBackColor(t,t.backColor);Color.transparent.equals(i)||(e.area.brush=255==i.a?new StiSolidBrush(i):new StiEmptyBrush),(t.isPieChart||t.isPie3dChart||t.isDoughnutChart||t.isFunnelChart||t.isSunburstChart||t.isPictorialStackedChart)&&(e.area.allowApplyStyle=!1,e.area.borderColor=Color.transparent),e.area.colorEach=StiChartElementBuilder.getColorEach(t),e.area.is(IStiRoundValuesArea)&&(e.area.as(IStiRoundValuesArea).roundValues=t.roundValues),await this.renderAxisAxes3d(t,e),await this.renderAxisAxes(t,e),StiChartElementBuilder.renderRadarAxis(t,e),this.renderAreaIndicator(t,e)}static getColorEach(t){return!!(t.isPieChart||t.isPie3dChart||t.isDoughnutChart||t.isPictorialStackedChart)||null!=t.area&&t.area.colorEach}async renderAxisAxes3d(t,e){if(e.series.count<=0)return;let i=e.area.as(IStiClusteredColumnArea3D),r=(null!=i&&(i.sideBySide=t.area.sideBySide),e.area.as(IStiClusteredColumnArea));null!=r&&(r.sideBySide=t.area.sideBySide),await this.renderXAxis3D(t,e),await this.renderYAxis3D(t,e)}async renderAxisAxes(t,e){if(e.series.count<=0)return;let i=e.area.as(IStiAxisArea);if(null==i)return;StiChartElementBuilder.renderInterlacingHor(t,i),StiChartElementBuilder.renderInterlacingVert(t,i),StiChartElementBuilder.renderGridLinesHor(t,i),StiChartElementBuilder.renderGridLinesVert(t,i),i.reverseHor=t.area.reverseHor,i.reverseVert=t.area.reverseVert,await this.renderXAxis(t,e,!1),await this.renderYAxis(t,e,!1),t.xTopAxis.visible&&await this.renderXAxis(t,e,!0),t.yRightAxis.visible?await this.renderYAxis(t,e,!0):await StiChartElementBuilder.renderYRightAxis(t,e)}static renderInterlacingHor(t,e){t.area.interlacingHor.visible&&!Color.transparent.equals(t.area.interlacingHor.color)&&(e.interlacingHor.interlacedBrush=new StiSolidBrush(t.area.interlacingHor.color)),e.interlacingHor.visible=t.area.interlacingHor.visible}static renderInterlacingVert(t,e){t.area.interlacingVert.visible&&!Color.transparent.equals(t.area.interlacingVert.color)&&(e.interlacingVert.interlacedBrush=new StiSolidBrush(t.area.interlacingVert.color)),e.interlacingVert.visible=t.area.interlacingVert.visible}static renderGridLinesHor(t,e){t.area.gridLinesHor.visible&&!Color.transparent.equals(t.area.gridLinesHor.color)&&(e.gridLinesHor.color=t.area.gridLinesHor.color),e.gridLinesHor.visible=t.area.gridLinesHor.visible,e.gridLinesHor.style=StiPenStyle.Solid}static renderGridLinesVert(t,e){t.area.gridLinesVert.visible&&!Color.transparent.equals(t.area.gridLinesVert.color)&&(e.gridLinesVert.color=t.area.gridLinesVert.color),e.gridLinesVert.visible=t.area.gridLinesVert.visible,e.gridLinesVert.style=StiPenStyle.Solid}async renderXAxis3D(t,e){let i=e.area.as(IStiAxisArea3D);if(null==i)return;let r=i.xAxis,l=t.xAxis,n=(await StiChartElementBuilder.renderAxis3D(t,r,l),StiDrillDownHelper.isDrillAvailable(t)&&t.drillDownCurrentLevel<t.drillDownLevelCount?t.arguments.getRange(t.drillDownCurrentLevel,1):t.arguments),s=n.select(this.getTitle).distinct();await StiChartElementBuilder.renderXAxisTitleText3D(t,r,l,s),r.visible=l.visible,l.showEdgeValues==StiAutoBool.Auto&&(r.showEdgeValues=!1)}async renderYAxis3D(t,e){let i=e.area.as(IStiAxisArea3D);if(null==i)return;let r=i.yAxis,l=t.yAxis,n=(await StiChartElementBuilder.renderAxis3D(t,r,l),(t.dataMode==StiDataMode.ManuallyEnteringData?t.chartValuesList():t.arguments).select(this.getTitle).distinct());r.visible=n.any()&&l.visible,await StiChartElementBuilder.renderYAxisTitleText3D(t,r,l,n),r.visible=l.visible,null!=t.valueFormat&&(r.labels.formatService=StiChartElementBuilder.checkValueFormat(t.valueFormat,e))}static async renderXAxisTitleText3D(t,e,i,r){if(!i.title.visible)return;e.title.text=""===i.title.text?r.join(" / "):await StiReportParser.parseAsync(i.title.text,t)}static async renderYAxisTitleText3D(t,e,i,r){if(!i.title.visible)return;e.title.text=""===i.title.text?r.join(" / "):await StiReportParser.parseAsync(i.title.text,t)}async renderXAxis(t,e,i){let r=e.area.as(IStiAxisArea);if(null==r)return;let l=i?r.xTopAxis:r.xAxis,n=i?t.xTopAxis:t.xAxis,s=e.area.is(IStiClusteredBarArea),o=StiDrillDownHelper.isDrillAvailable(t)&&t.drillDownCurrentLevel<t.drillDownLevelCount?t.arguments.getRange(t.drillDownCurrentLevel,1):t.arguments,a=(s?t.values:o).select(this.getTitle).distinct(),u=(await StiChartElementBuilder.renderAxis(t,l,n),l.ticks.visible=a.any(),l.visible=n.visible,await StiChartElementBuilder.renderXAxisTitleText(t,l,n,a),e.series.toList().cast().all(t=>t.is(IStiBaseLineSeries)||t.is(IStiStackedBaseLineSeries))),S=(n.startFromZero==StiAutoBool.Auto&&(l.startFromZero=!u),e.series.toList().cast().all(t=>t.core.isDateTimeValues));S&&r.is(StiClusteredBarArea)&&(l.startFromZero=!1),n.showEdgeValues==StiAutoBool.Auto&&(l.showEdgeValues=u),l.labels.placement==StiLabelsPlacement.AutoRotation&&(l.labels.textAlignment=StiHorAlignment.Left),null!=t.valueFormat&&r.is(IStiClusteredBarArea)&&(l.labels.formatService=StiChartElementBuilder.checkValueFormat(t.valueFormat,e)),null!=t.argumentFormat&&r.is(IStiScatterArea)&&(l.labels.formatService=t.argumentFormat),StiChartElementBuilder.renderAxisLineColor(t,l)}async renderYAxis(t,e,i){let r=e.area.as(IStiAxisArea);if(null==r)return;let l=i?r.yRightAxis:r.yAxis,n=i?t.yRightAxis:t.yAxis,s=e.area.is(IStiGanttArea)||e.area.is(IStiClusteredBarArea),o=(s&&t.dataMode!=StiDataMode.ManuallyEnteringData?t.arguments:t.chartValuesList()).select(this.getTitle).distinct(),a=(await StiChartElementBuilder.renderAxis(t,l,n),l.visible=o.any()&&n.visible,await StiChartElementBuilder.renderYAxisTitleText(t,l,n,o),null==t.valueFormat||r.is(IStiClusteredBarArea)||r.is(StiHeatmapArea)||(l.labels.formatService=StiChartElementBuilder.checkValueFormat(t.valueFormat,e)),e.series.toList().cast().all(t=>t.core.isDateTimeValues));a&&(r.yAxis.startFromZero=!1),StiChartElementBuilder.renderAxisLineColor(t,l)}static renderXRadarAxis(t,e){let i=e.area.as(StiRadarArea);if(null==i)return;this.renderXRadarAxisLabels(t,t.area.xAxis.labels,i.xAxis.labels),this.renderAxisRange(i.xAxis.range,t.xAxis),null!=t.valueFormat&&(i.yAxis.labels.formatService=StiChartElementBuilder.checkValueFormat(t.valueFormat,e));let r=StiDashboardStyleHelper.getForeColor(t);this.renderRadarXAxisLabelsColor(t,i.xAxis.labels,t.xAxis,r),i.xAxis.visible=t.xAxis.visible}static renderXRadarAxisLabels(t,e,i){i.font=this.getSmallStyleFont(t,e.font),i.textBefore=e.textBefore,i.textAfter=e.textAfter,i.allowApplyStyle=!1}static renderYRadarAxis(t,e){let i=e.area.as(StiRadarArea);if(null==i)return;this.renderYRadarAxisLabels(t,t.area.yAxis.labels,i.yAxis.labels),this.renderAxisRange(i.yAxis.range,t.yAxis);let r=StiDashboardStyleHelper.getForeColor(t);this.renderRadarYAxisLabelsColor(t,i.yAxis.labels,t.yAxis,r),i.yAxis.visible=t.yAxis.visible}static renderYRadarAxisLabels(t,e,i){i.font=this.getSmallStyleFont(t,e.font),i.textBefore=e.textBefore,i.textAfter=e.textAfter,i.step=e.step,i.angle=e.angle,i.textAlignment=e.textAlignment,i.wordWrap=e.wordWrap,i.width=e.width,i.allowApplyStyle=!1}static renderRadarXAxisLabelsColor(t,e,i,r){if(!Color.transparent.equals(i.labels.color))return void(e.color=i.labels.color);t.style==StiElementStyleIdent.Custom&&e.color!=Color.transparent||(e.color=r)}static renderRadarYAxisLabelsColor(t,e,i,r){if(!Color.transparent.equals(i.labels.color))return void(e.color=i.labels.color);t.style==StiElementStyleIdent.Custom&&e.color!=Color.transparent||(e.color=r)}static checkValueFormat(t,r){let l=t.as(StiNumberFormatService);if(null!=l&&0<(l.state&Stimulsoft.Report.Components.StiTextFormatState.Abbreviation)&&0==(l.state&Stimulsoft.Report.Components.StiTextFormatState.DecimalDigits)){let e=l.clone(),i=null;for(let t=0;t<r.series.count;t++){let e=r.series.getByIndex(t);for(let t of e.values)(null==i||i>t)&&(i=t)}if(null!=i&&0!=i){let t=0;if((i=Math.abs(i))<5){while(Math.round(i)%10==0)i*=10,t++;t+=2}e.useLocalSetting=!1,e.decimalDigits=t}return e}return t}static async renderYRightAxis(t,e){let i=e.area.as(IStiAxisArea);if(null==i)return;await this.renderAxis(t,i.yRightAxis,t.yRightAxis),this.renderAxisLineColor(t,i.yRightAxis)}static async renderXAxisTitleText(t,e,i,r){if(!i.title.visible)return;e.title.text=StiString.isNullOrEmpty(i.title.text)?StiString.join(" / ",r):await StiReportParser.parseAsync(i.title.text,t)}static async renderYAxisTitleText(t,e,i,r){if(!i.title.visible)return;e.title.text=StiString.isNullOrEmpty(i.title.text)?StiString.join(" / ",r):await StiReportParser.parseAsync(i.title.text,t)}static renderAxisLineColor(t,e){if(t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.lineColor))return e.allowApplyStyle=!1,void(e.allowApplyStyle=!1);StiDashboardStyleHelper.isDarkStyle(t.dashboard)&&(e.allowApplyStyle=!1,e.lineColor=StiDashboardStyleHelper.getForeColor(t))}static renderRadarAxis(t,e){if(e.series.count<=0)return;let i=e.area.as(StiRadarArea);if(null==i)return;this.renderXRadarAxis(t,e),this.renderYRadarAxis(t,e)}renderAreaIndicator(t,e){let i=e.area.as(StiDoughnutArea);if(null==i)return;let r=null==t?void 0:t.report,l=null==this.indicatorValueValue?"":this.getString(t.valueFormat,this.indicatorValueValue.toString(),r),n=(i.indicator.value.value=l,i.indicator.value.color=t.area.indicator.value.color,t.area.indicator.title.text);i.indicator.title.text=n,i.indicator.title.color=t.area.indicator.title.color,i.indicator.visible=!StiString.isNullOrEmpty(l)||!StiString.isNullOrEmpty(n)}static async renderAxis3D(t,e,i){let r=StiDashboardStyleHelper.getForeColor(t);this.renderAxisTitle3D(t,e,i,r),await this.renderAxisLabels3D(t,e,i),this.renderAxisLabelsColor3D(t,e,i,r)}static renderAxisTitle3D(t,e,i,r){let l=this.getTitleAxisChart(i),n=e.title;n.font=this.getStyleFont(t,l.font),StiChartElementBuilder.renderAxisLabelsTitleColor3D(t,n,l,r),l instanceof StiXChartAxisTitle&&(n.direction=l.direction),l instanceof StiYChartAxisTitle&&(n.direction=l.direction)}static async renderAxis(t,e,i){let r=StiDashboardStyleHelper.getForeColor(t);this.renderAxisTitle(t,e,i,r),await this.renderAxisLabels(t,e,i),this.renderAxisStartFromZero(e,i),this.renderAxisShowEdgeValues(e,i),this.renderAxisRange(e.range,i),this.renderAxisLabelsColor(t,e,i,r)}static renderAxisTitle(t,e,i,r){let l=this.getTitleAxisChart(i),n=e.title;n.alignment=l.alignment,n.position=l.position,n.font=this.getStyleFont(t,l.font),this.renderAxisLabelsTitleColor(t,n,l,r),l.is(StiXChartAxisTitle)&&(n.direction=l.direction),l.is(StiYChartAxisTitle)&&(n.direction=l.direction)}static async renderAxisLabels3D(t,e,i){e.labels.textAfter=await StiReportParser.parseAsync(i.labels.textAfter,t),e.labels.textBefore=await StiReportParser.parseAsync(i.labels.textBefore,t),e.labels.font=StiChartElementBuilder.getSmallStyleFont(t,i.labels.font)}static async renderAxisLabels(t,e,i){e.labels.angle=i.labels.angle,e.is(IStiYRightAxis)&&t.isParetoChart||(e.labels.textAfter=await StiReportParser.parseAsync(i.labels.textAfter,t)),e.labels.textAlignment=i.labels.textAlignment,e.labels.textBefore=await StiReportParser.parseAsync(i.labels.textBefore,t),e.labels.font=StiChartElementBuilder.getSmallStyleFont(t,i.labels.font),e.labels.placement=i.labels.placement,e.labels.step=i.labels.step,e.labels.wordWrap=i.labels.wordWrap,e.labels.width=i.labels.width}static renderAxisStartFromZero(e,i){if(i.is(StiXChartAxis)){let t=i;null!=t&&t.startFromZero!=StiAutoBool.Auto&&(e.startFromZero=t.startFromZero!=StiAutoBool.False)}if(i.is(StiYChartAxis)){let t=i;null!=t&&(e.startFromZero=t.startFromZero)}}static renderAxisShowEdgeValues(e,i){if(i.is(StiXChartAxis)){let t=i;null!=t&&t.showEdgeValues!=StiAutoBool.Auto&&(e.showEdgeValues=t.showEdgeValues!=StiAutoBool.False)}}static renderAxisRange(t,e){e[Stimulsoft.System.StiObject.stimulsoft]().getType()!=StiXChartAxis&&e[Stimulsoft.System.StiObject.stimulsoft]().getType()!=StiYChartAxis||(t.auto=e.range.auto,t.maximum=e.range.maximum,t.minimum=e.range.minimum)}static renderAxisLabelsTitleColor(t,e,i,r){if(!Color.transparent.equals(i.color))return void(e.color=i.color);t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.color)||(e.color=r)}static renderAxisLabelsTitleColor3D(t,e,i,r){if(!Color.transparent.equals(i.color))return void(e.color=i.color);t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.color)||(e.color=r)}static renderAxisLabelsColor3D(t,e,i,r){if(!Color.transparent.equals(i.labels.color))return void(e.labels.color=i.labels.color);t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.labels.color)||(e.labels.color=r)}static renderAxisLabelsColor(t,e,i,r){if(!Color.transparent.equals(i.labels.color))return void(e.labels.color=i.labels.color);t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.labels.color)||(e.labels.color=r)}static getTitleAxisChart(t){if(t.is(StiXChartAxis))return t.title;if(t.is(StiYChartAxis))return t.title;return null}async renderLegend(t,e){e.legend.horAlignment=StiChartElementBuilder.getChartLegendHotAlignment(t),e.legend.vertAlignment=StiChartElementBuilder.getChartLegendVertAlignment(t),e.legend.title=await StiReportParser.parseAsync(t.legend.title.text,t),e.legend.titleFont=StiChartElementBuilder.getStyleFont(t,t.legend.title.font),e.legend.allowApplyStyle=!1,e.legend.font=StiChartElementBuilder.getSmallStyleFont(t,t.legend.labels.font),e.legend.visible=StiChartElementBuilder.getChartLegendVisible(t,e),e.legend.columns=t.legend.columns,e.legend.direction=t.legend.direction;let i=StiDashboardStyleHelper.getForeColor(t);StiChartElementBuilder.renderLegendTitleColor(t,e,i),StiChartElementBuilder.renderLegendLabelsColor(t,e,i)}static getChartLegendHotAlignment(t){if(t.isHeatmapChart)return StiLegendHorAlignment.RightOutside;return t.legend.horAlignment}static getChartLegendVertAlignment(t){if(t.isHeatmapChart)return StiLegendVertAlignment.Center;return t.legend.vertAlignment}static getChartLegendVisible(t,e){if(1==e.series.count&&!e.series.getByIndex(0).is(StiPieSeries)&&!e.series.getByIndex(0).is(StiHeatmapSeries))return t.legend.visibility==StiLegendVisibility.Always;return t.legend.visibility!=StiLegendVisibility.False}static renderLegendTitleColor(t,e,i){if(!Color.transparent.equals(t.legend.title.color))return void(e.legend.titleColor=t.legend.title.color);t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.legend.titleColor)||(e.legend.titleColor=i)}static renderSeriesLabelsLegendValueType(t,e){let i=0;e.series.list.filter(t=>null!=t.arguments).forEach(t=>{i+=t.arguments.filter(t=>null!=t).length}),null==t.legend.labels.valueType?0<i&&1<e.series.count?e.seriesLabels.legendValueType=StiSeriesLabelsValueType.SeriesTitleArgument:1==i&&1==e.series.count&&(t.isPieChart||t.isPie3dChart||t.isDoughnutChart)?e.seriesLabels.legendValueType=StiSeriesLabelsValueType.SeriesTitle:0<i&&1==e.series.count?e.seriesLabels.legendValueType=StiSeriesLabelsValueType.Argument:0==i&&1<e.series.count?e.seriesLabels.legendValueType=StiSeriesLabelsValueType.SeriesTitle:e.seriesLabels.legendValueType=t.isBubbleChart?StiSeriesLabelsValueType.Weight:StiSeriesLabelsValueType.Value:e.seriesLabels.legendValueType=t.legend.labels.valueType}static renderLegendLabelsColor(t,e,i){if(!Color.transparent.equals(t.legend.labels.color))return void(e.legend.labelsColor=t.legend.labels.color);t.style==StiElementStyleIdent.Custom&&!Color.transparent.equals(e.legend.labelsColor)||(e.legend.labelsColor=i)}static async renderConditions(t,e,i,r){let l=null!=i.chartConditions?i.chartConditions.where(t=>t.keyValueMeter==r.key):null,n=(null!=l&&await this.renderValueConditions(i,e,l),null!=i.chartConditions?i.chartConditions.where(t=>t.field==StiChartConditionalField.EndValue):null),s=(null!=n&&await this.renderEndValueConditions(i,e,n),null!=i.chartConditions?i.chartConditions.where(t=>t.field==StiChartConditionalField.Argument):null),o=(null!=s&&await this.renderArgumentConditions(i,e,s),null!=i.chartConditions?i.chartConditions.where(t=>t.field==StiChartConditionalField.Series):null);null!=o&&await this.renderSeriesConditions(i,e,o,t)}static async renderValueConditions(i,r,t){for(let e of t){let t=e.isExpression?await StiReportParser.parseAsync(`{${e.value}}`,i):e.value;r.conditions.add(new Stimulsoft.Report.Chart["StiChartCondition"](e.color,Stimulsoft.Report.Components.StiFilterItem.Value,e.dataType,e.condition,t,e.markerType,e.markerAngle))}}static async renderEndValueConditions(i,r,t){for(let e of t){let t=e.isExpression?await StiReportParser.parseAsync(`{${e.value}}`,i):e.value;r.conditions.add(new Stimulsoft.Report.Chart["StiChartCondition"](e.color,Stimulsoft.Report.Components.StiFilterItem.ValueEnd,e.dataType,e.condition,t,e.markerType,e.markerAngle))}}static async renderArgumentConditions(i,r,t){for(let e of t){let t=e.isExpression?await StiReportParser.parseAsync(`{${e.value}}`,i):e.value;r.conditions.add(new Stimulsoft.Report.Chart["StiChartCondition"](e.color,Stimulsoft.Report.Components.StiFilterItem.Argument,e.dataType,e.condition,t,e.markerType,e.markerAngle))}}static async renderSeriesConditions(i,r,t,l){for(let e of t){let t=e.isExpression?await StiReportParser.parseAsync(`{${e.value}}`,i):e.value;this.getConditionResult(null==t?void 0:t.toString(),l,e.condition)&&(r.legendColor=e.color,r.conditions.add(new Stimulsoft.Report.Chart["StiChartCondition"](e.color,Stimulsoft.Report.Components.StiFilterItem.Argument,Stimulsoft.Report.Components.StiFilterDataType.String,Stimulsoft.Report.Components.StiFilterCondition.BeginningWith,"",e.markerType,e.markerAngle)))}}static getConditionResult(i,r,e){let t=!1;if(null!=r){let t=r;if(null!=t&&null!=i){r[Stimulsoft.System.StiObject.stimulsoft]().getType()!=i[Stimulsoft.System.StiObject.stimulsoft]().getType()&&(r=r.toString(),i=i[Stimulsoft.System.StiObject.stimulsoft]().toString(),t=r);try{switch(e){case Stimulsoft.Report.Components.StiFilterCondition.EqualTo:return 0==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.NotEqualTo:return 0!=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.GreaterThan:return 1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.GreaterThanOrEqualTo:return 0<=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.LessThan:return-1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.LessThanOrEqualTo:return t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i)<=0;case Stimulsoft.Report.Components.StiFilterCondition.Containing:{let t=r.toString(),e=i.toString();return-1!=t.indexOf(e)}case Stimulsoft.Report.Components.StiFilterCondition.NotContaining:{let t=r.toString(),e=i.toString();return-1==t.indexOf(e)}case Stimulsoft.Report.Components.StiFilterCondition.BeginningWith:{let t=r.toString(),e=i.toString();return t.startsWith(e)}case Stimulsoft.Report.Components.StiFilterCondition.EndingWith:{let t=r.toString(),e=i.toString();return t.endsWith(e)}}}catch(t){}}}return t}static async renderConstantLines(r,l){for(let i of r.constantLines){let t=!StiString.isNullOrEmpty(i.text),e=new Stimulsoft.Report.Chart["StiConstantLines"];e.allowApplyStyle=!1,e.text=i.text,e.axisValue=await StiReportParser.parseAsync(i.axisValue,r),e.lineColor=i.lineColor,e.lineStyle=i.lineStyle,e.lineWidth=i.lineWidth,e.titleVisible=t,e.orientation=r.isBarChart?StiConstantLines_StiOrientation.Vertical:StiConstantLines_StiOrientation.Horizontal,e.position=i.position,l.constantLines.add(e)}}static renderTrendLines(e,t,i){let r,l=null==(r=t.trendLines)?void 0:r.where(t=>t.keyValueMeter==i.key).toList();e.trendLines.clear();for(let t of l)e.trendLines.add(this.getTrendLine(t,e.chart))}static getTrendLine(e,i){switch(e.type){case StiChartTrendLineType.None:return new Stimulsoft.Report.Chart["StiTrendLineNone"];case StiChartTrendLineType.Exponential:{let t=new Stimulsoft.Report.Chart["StiTrendLineExponential"];return t.allowApplyStyle=!1,t.lineColor=Color.transparent.equals(e.lineColor)?i.style.core.trendLineColor:e.lineColor,t.lineStyle=e.lineStyle,t.lineWidth=e.lineWidth,t.showShadow=!1,t}case StiChartTrendLineType.Linear:{let t=new Stimulsoft.Report.Chart["StiTrendLineLinear"];return t.allowApplyStyle=!1,t.lineColor=Color.transparent.equals(e.lineColor)?i.style.core.trendLineColor:e.lineColor,t.lineStyle=e.lineStyle,t.lineWidth=e.lineWidth,t.showShadow=!1,t}case StiChartTrendLineType.Logarithmic:{let t=new Stimulsoft.Report.Chart["StiTrendLineLogarithmic"];return t.allowApplyStyle=!1,t.lineColor=Color.transparent.equals(e.lineColor)?i.style.core.trendLineColor:e.lineColor,t.lineStyle=e.lineStyle,t.lineWidth=e.lineWidth,t.showShadow=!1,t}}}async renderSeriesLabels(e,i){if(!(e.isPieChart||e.isPie3dChart||e.isFunnelChart||e.isPictorialStackedChart||e.isDoughnutChart||e.isTreemapChart||e.isAxisAreaChart||e.isSunburstChart||e.isRadarChart||e.isWaterfallChart||e.isAxisAreaChart3D||e.isLineChart3D))return void(i.seriesLabels.visible=!1);if(i.allowApplyStyle=!1,e.isPieChart?StiChartElementBuilder.renderPieLabelsPosition(e,i):e.isPie3dChart?StiChartElementBuilder.renderPie3dLabelsPosition(e,i):e.isDoughnutChart||e.isSunburstChart?StiChartElementBuilder.renderDoughnutLabelsPosition(e,i):e.isFunnelChart?StiChartElementBuilder.renderFunnelLabelsPosition(e,i):e.isPictorialStackedChart?StiChartElementBuilder.renderPictorialStackedLabelsPosition(e,i):e.isTreemapChart?StiChartElementBuilder.renderTreemapLabelsPosition(e,i):e.isHeatmapChart?StiChartElementBuilder.renderHeatmapLabelsPosition(e,i):e.isWaterfallChart?StiChartElementBuilder.renderWaterfallLabelsPosition(e,i):e.isStackedChart?StiChartElementBuilder.renderStackedLabelsPosition(e,i):e.isRadarChart?StiChartElementBuilder.renderRadarLabelsPosition(e,i):e.isAxisAreaChart?StiChartElementBuilder.renderAxisLabelsPosition(e,i):e.isAxisAreaChart3D?StiChartElementBuilder.renderClusteredColumn3DLabelsPosition(e,i):e.isLineChart3D&&this.renderLine3DLabelsPosition(e,i),i.seriesLabels.core.applyStyle(i.style),await StiChartElementBuilder.applyPropertiesToSeriesLabels(e,i.seriesLabels.as(IStiSeriesLabels)),e.isStackedChart)for(let t of i.series.list)await StiChartElementBuilder.applyPropertiesToSeriesLabels(e,t.seriesLabels.as(IStiSeriesLabels));e.isPieChart||e.isPie3dChart||e.isDoughnutChart||e.isSunburstChart?(StiChartElementBuilder.renderPieLabelsStyle(e,i),StiChartElementBuilder.renderPieLabelsAutoRotate(e,i),StiChartElementBuilder.renderSeriesLabelsLegendValueType(e,i)):e.isFullStackedChart?(StiChartElementBuilder.renderLabelsStyle(e,i),i.seriesLabels.showInPercent=!0):StiChartElementBuilder.renderLabelsStyle(e,i),StiChartElementBuilder.renderLabelsColor(e,i),StiChartElementBuilder.renderLabelsTextFormat(e,i),StiChartElementBuilder.renderLabelsShowZeros(i),StiChartElementBuilder.renderLabelsShowZeros(i)}static renderLabelsShowZeros(r){for(let i of r.series.toList()){let t=i.as(IStiShowZerosSeriesAs);if(null!=t)return void(r.seriesLabels.showZeros=t.showZerosAs==StiShowEmptyCellsAs.Zero);let e=i.as(IStiShowZerosSeries);if(null!=e)return void(r.seriesLabels.showZeros=e.showZeros)}}static renderLabelsShowNulls(r){for(let i of r.series.toList()){let t=i.as(IStiShowNullsSeriesAs);if(null!=t)return void(r.seriesLabels.showNulls=t.showNullsAs==StiShowEmptyCellsAs.Zero);let e=i.as(IStiShowNullsSeries);if(null!=e)return void(r.seriesLabels.showNulls=e.showNulls)}}static async applyPropertiesToSeriesLabels(t,e){e.preventIntersection=t.isAxisAreaChart,e.textAfter=await StiReportParser.parseAsync(t.labels.textAfter,t),e.textBefore=await StiReportParser.parseAsync(t.labels.textBefore,t),e.font=StiChartElementBuilder.getSmallStyleFont(t,t.labels.font),e.showZeros=!1,e.width=t.labels.width,e.wordWrap=t.labels.wordWrap}static renderPieLabelsAutoRotate(t,e){let i=e.seriesLabels.as(IStiCenterPieLabels);null!=i&&(i.autoRotate=t.labels.autoRotate)}static renderLabelsColor(t,e){let i,r,l=e.seriesLabels.as(IStiSeriesLabels),n=e.seriesLabels.as(IStiOutsidePieLabels);Color.transparent.equals(t.labels.foreColor)?(l.labelColor=Color.gray,l.labelColor=StiDashboardStyleHelper.isDarkStyle2(t.style)?Color.fromArgb2(50,50,50):null!=(null==(i=null==e?void 0:e.style)?void 0:i.core)?e.style.core.seriesLabelsColor:Color.gray,null!=n&&(n.lineColor=null!=(null==(r=null==e?void 0:e.style)?void 0:r.core)?e.style.core.seriesLabelsLineColor:Color.gray)):(l.labelColor=t.labels.foreColor,null!=n&&(n.lineColor=t.labels.foreColor))}static renderLabelsTextFormat(t,e){e.seriesLabels.formatService=t.valueFormat}static renderFunnelLabelsPosition(t,e){switch(t.labels.funnelPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Left:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideLeftFunnelLabels"];break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterFunnelLabels"];break;case StiChartLabelsPosition.Right:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideRightFunnelLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderPictorialStackedLabelsPosition(t,e){switch(t.labels.pictorialStackedPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Left:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideLeftPictorialStackedLabels"];break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterPictorialStackedLabels"];break;case StiChartLabelsPosition.Right:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideRightPictorialStackedLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderTreemapLabelsPosition(t,e){switch(t.labels.treemapPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterTreemapLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderHeatmapLabelsPosition(t,e){switch(t.labels.heatmapPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterHeatmapLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderPieLabelsPosition(t,e){switch(t.labels.piePosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterPieLabels"];break;case StiChartLabelsPosition.InsideEnd:e.seriesLabels=new Stimulsoft.Report.Chart["StiInsideEndPieLabels"];break;case StiChartLabelsPosition.Outside:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsidePieLabels"];break;case StiChartLabelsPosition.TwoColumns:e.seriesLabels=new Stimulsoft.Report.Chart["StiTwoColumnsPieLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderPie3dLabelsPosition(t,e){switch(t.labels.pie3dPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterPie3dLabels"];break;case StiChartLabelsPosition.InsideEnd:e.seriesLabels=new Stimulsoft.Report.Chart["StiInsideEndPie3dLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderStackedLabelsPosition(t,i){switch(t.labels.axisPosition){case StiChartLabelsPosition.Total:{let e=i.series.toList().lastOrDefault();i.series.toList().where(t=>t!=e).toList().forEach(t=>{t.showSeriesLabels=StiShowSeriesLabels.FromSeries,t.seriesLabels.visible=!1}),e.showSeriesLabels=StiShowSeriesLabels.FromSeries,e.seriesLabels=new Stimulsoft.Report.Chart["StiValueAxisLabels"],e.isTotalLabel=!0,e.seriesLabels.formatService=t.valueFormat;break}default:StiChartElementBuilder.renderAxisLabelsPosition(t,i);break}}static renderRadarLabelsPosition(t,e){switch(t.labels.radarPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterAxisLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderWaterfallLabelsPosition(t,e){switch(t.labels.axisPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterAxisLabels"];break;case StiChartLabelsPosition.InsideBase:e.seriesLabels=new Stimulsoft.Report.Chart["StiInsideBaseAxisLabels"];break;case StiChartLabelsPosition.InsideEnd:e.seriesLabels=new Stimulsoft.Report.Chart["StiInsideEndAxisLabels"];break;case StiChartLabelsPosition.Outside:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideAxisLabels"];break;case StiChartLabelsPosition.OutsideBase:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideBaseAxisLabels"];break;case StiChartLabelsPosition.OutsideEnd:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideEndAxisLabels"];break;case StiChartLabelsPosition.Value:e.seriesLabels=new Stimulsoft.Report.Chart["StiValueAxisLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderAxisLabelsPosition(t,e){switch(t.labels.axisPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterAxisLabels"];break;case StiChartLabelsPosition.InsideBase:e.seriesLabels=new Stimulsoft.Report.Chart["StiInsideBaseAxisLabels"];break;case StiChartLabelsPosition.InsideEnd:e.seriesLabels=new Stimulsoft.Report.Chart["StiInsideEndAxisLabels"];break;case StiChartLabelsPosition.Left:e.seriesLabels=new Stimulsoft.Report.Chart["StiLeftAxisLabels"];break;case StiChartLabelsPosition.Outside:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideAxisLabels"];break;case StiChartLabelsPosition.OutsideBase:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideBaseAxisLabels"];break;case StiChartLabelsPosition.OutsideEnd:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideEndAxisLabels"];break;case StiChartLabelsPosition.Right:e.seriesLabels=new Stimulsoft.Report.Chart["StiRightAxisLabels"];break;case StiChartLabelsPosition.Value:e.seriesLabels=new Stimulsoft.Report.Chart["StiValueAxisLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderClusteredColumn3DLabelsPosition(t,e){switch(t.labels.clusteredColumn3dPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterAxisLabels3D"];break;case StiChartLabelsPosition.Outside:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideAxisLabels3D"];break;default:e.seriesLabels.visible=!1;break}}renderLine3DLabelsPosition(t,e){switch(t.labels.line3dPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterAxisLabels3D"];break;case StiChartLabelsPosition.Outside:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsideAxisLabels3D"];break;default:e.seriesLabels.visible=!1;break}}static renderDoughnutLabelsPosition(t,e){switch(t.labels.doughnutPosition){case StiChartLabelsPosition.None:e.seriesLabels.visible=!1;break;case StiChartLabelsPosition.Center:e.seriesLabels=new Stimulsoft.Report.Chart["StiCenterPieLabels"];break;case StiChartLabelsPosition.Outside:e.seriesLabels=new Stimulsoft.Report.Chart["StiOutsidePieLabels"];break;default:e.seriesLabels.visible=!1;break}}static renderPieLabelsStyle(t,e){let i=e.seriesLabels.as(IStiPieSeriesLabels);switch(t.labels.style){case StiChartLabelsStyle.PercentOfTotal:i.showInPercent=!0,i.valueType=StiSeriesLabelsValueType.Value;break;case StiChartLabelsStyle.Category:i.showInPercent=!1,i.valueType=t.arguments.any()?StiSeriesLabelsValueType.Argument:StiSeriesLabelsValueType.SeriesTitle;break;case StiChartLabelsStyle.CategoryPercentOfTotal:i.showInPercent=!0,i.valueType=t.arguments.any()?StiSeriesLabelsValueType.ArgumentValue:StiSeriesLabelsValueType.SeriesTitleValue;break;case StiChartLabelsStyle.CategoryValue:i.showInPercent=!1,i.valueType=t.arguments.any()?StiSeriesLabelsValueType.ArgumentValue:StiSeriesLabelsValueType.SeriesTitleValue;break;case StiChartLabelsStyle.Value:i.showInPercent=!1,i.valueType=StiSeriesLabelsValueType.Value;break}}static renderLabelsStyle(t,e){let i=e.seriesLabels;switch(t.labels.style){case StiChartLabelsStyle.PercentOfTotal:i.valueType=StiSeriesLabelsValueType.Value;break;case StiChartLabelsStyle.Category:i.valueType=t.arguments.any()?StiSeriesLabelsValueType.Argument:StiSeriesLabelsValueType.SeriesTitle;break;case StiChartLabelsStyle.CategoryPercentOfTotal:i.valueType=t.arguments.any()?StiSeriesLabelsValueType.ArgumentValue:StiSeriesLabelsValueType.SeriesTitleValue;break;case StiChartLabelsStyle.CategoryValue:i.valueType=t.arguments.any()?StiSeriesLabelsValueType.ArgumentValue:StiSeriesLabelsValueType.SeriesTitleValue;break;case StiChartLabelsStyle.Value:i.valueType=StiSeriesLabelsValueType.Value;break}}async renderSeriesInteraction(l,n,t,i){var s;if(l.chart.isDesigning)return;let r=null==n?void 0:n.report,o=0,e=n.dashboardInteraction;if(e.onHover==StiInteractionOnHover.ShowToolTip){l.toolTips=StiArray.create(String,t);for(let e of l.arguments){let t="";o<l.values.length&&null!=l.values[o]&&(t=l.values[o].toString()),l.toolTips[o]=await this.getToolTip(l.chart.style,n,null,n.dashboardInteraction.toolTip,this.getString(n.argumentFormat,e,r),this.getString(n.valueFormat,t,r),"",i),o++}}o=0,l.hyperlinks=StiArray.create(String,t);for(let r of l.arguments){let t="",e="",i=(o<l.values.length&&null!=l.values[o]&&(t=l.values[o].toString()),l.as(IStiRangeSeries));null!=i&&o<i.valuesEnd.length&&(e=null==(s=i.valuesEnd[o])?void 0:s.toString()),o<l.hyperlinks.length&&(l.hyperlinks[o]=await this.getHyperlink(n,l,n.dashboardInteraction.hyperlink,null==r?void 0:r.toString(),t,e,l.titleValue,o)),o++}l.drillDownEnabled=!0}async getToolTip(i,t,e,r,l,n,s,o){if(null==l&&(l=""),null==o&&(o=""),StiString.isNullOrWhiteSpace(r)){null==l||StiString.isNullOrEmpty(l)||(l=l.split('"').join('\\"'));let t='"StiColor":"{0}","StiValue":"{1}","StiArgument":"{2}"{3}',e=await this.getToolTipStyle(i);return"{"+StiString.format(t,"#ffffff",n,l,e)+"}"}return this.getHyperlink(t,e,r,l,n,s,o,0)}async getToolTipStyle(t){let e=Stimulsoft.Base.StiJsonReportObjectHelper.Serialize.jBrush(t.core.toolTipBrush),i=Stimulsoft.Base.StiJsonReportObjectHelper.Serialize.jBrush(t.core.toolTipTextBrush),r=Stimulsoft.Base.StiJsonReportObjectHelper.Serialize.jBorder2(t.core.toolTipBorder),l=t.core.toolTipCornerRadius.toString();return`,"StiToolTipCornerRadius":"${l}","StiToolTipBrush":"${e}","StiToolTipTextBrush":"${i}","StiToolTipBorder":"${r}"`}async getHyperlink(l,t,e,i,r,n,s,o){null==i&&(i=""),null==s&&(s="");let a=new Hashtable,u=(a.add("Argument",i),a.add("Value",r),a.add("EndValue ",n),a.add("Series",s),null==t?void 0:t.originalArguments[o]);if(StiArray.isArray(u)&&1<u.length){let r=0;u.forEach(t=>{let e=l.arguments[r],i=`Argument_`+this.getIdentFromArgument(e,r+1);a.containsKey(i)||a.add(i,t),r++})}return StiReportParser.parseAsync(e,l,!1,a)}getIdentFromArgument(t,e){if(!StiString.isNullOrWhiteSpace(t.label))return StiNameValidator.correctName(t.label);let i=StiExpressionHelper.getFirstArgumentFromExpression(t.expression),r=i.indexOf(".");if(-1!=r&&(i=i.substr(r+1)),!StiString.isNullOrEmpty(i))return i;return e.toString()}getTitle(t){return StiLabelHelper.getLabel(t)}getSeriesTitle(t,e,i){if(t.values.length<2)return e;let r=StiLabelHelper.getLabel(i),l=StiString.isNullOrWhiteSpace(r)?null:r;if(null==l)return e;return StiString.isNullOrWhiteSpace(e)?l:e+` - `+l}getArgumentIndex(t,e){let i=this.getArgumentMeterIndexes(t).toList();if(null==i||!i.any())return-1;if(1==i.length)return i.firstOrDefault();if(e<i.length)return StiMath.trunc(i[e]);return-1}simplifyValues(t){let e=0;while(e<t.series.count){let i=t.series.getByIndex(e);if(800<i.values.length){let e=this.getShorterListPoints(i);i.values=[],i.arguments=[];for(let t=0;t<e.length;t++)i.values[t]=e[t].x,i.arguments[t]=e[t].y}e++}}getShorterListPoints(e){let i=[];for(let t=0;t<e.values.length;t++)i[t]=new Point(e.values[t],t);let r=[.3,.6,1,5,9,15,20,25,30,40],l=null,n=null;for(let t=0;t<r.length;t++){if((l=Stimulsoft.Report.Chart["StiSimplifyHelper"].simplify(i,t,!0)).length/i.length<.02&&l.length<900&&null!=n){l=n;break}n=l}return l}getString(i,r,l){if(null==r)return"";if(StiArray.isArray(r)){let e=[];for(let t of r)e.push(this.getFormatValue(i,t,l));return StiString.join(" - ",e)}return this.getFormatValue(i,r,l)}getFormatValue(t,e,i){if(null==e)return"";if(e instanceof DateTime)return t.is2(StiDateFormatService)||t.is2(StiTimeFormatService)||t.is2(StiCustomFormatService)?t.format(e):e.toShortDateString();let r=null==i?void 0:i.getParsedCulture();if(StiExtValueConverter.isEligable(e,r))return StiExtValueConverter.convert(e,r);if(null!=t)return t.format(e);return e.toString()}async calculateIndicatorValue(i){if(null==i.indicatorValue||null!=i.indicatorValue&&StiString.isNullOrEmpty(i.indicatorValue.expression))return;let r=StiElementDataCache.getKey(i);if(StiDataIndicatorValue.existsInCache(r))this.indicatorValueValue=StiDataIndicatorValue.getFromCache(r);else{let t=i.clone(!0),e=(t.values=new List,t.arguments=new List,await StiElementDataCache.getOrCreate(t));null!=e&&(this.indicatorValueValue=e.rows.getArrayItem(0).tryCastToNullableNumber().sum(),StiDataIndicatorValue.addToCache(r,this.indicatorValueValue))}}static create(t){if(t.isSunburstChart)return new __.i.StiSunburstChartElementBuilder;if(t.isHeatmapChart)return new __.i.StiHeatmapChartElementBuilder;if(t.isBubbleChart)return new __.i.StiBubbleChartElementBuilder;if(t.isRange)return new __.i.StiRangeChartElementBuilder;if(t.isFinancial)return new __.i.StiFinancialChartElementBuilder;if(t.isFullStackedChart||t.isStackedChart||t.isRibbonChart)return new __.i.StiStackedChartElementBuilder;return new StiChartElementBuilder}static scaleFont(t,e,i=.05){if(Math.abs(1-e)<=i)return;t.labels.font=StiFontUtils.changeFontSize(t.labels.font,t.labels.font.size*e),t.legend.font=StiFontUtils.changeFontSize(t.legend.font,t.legend.font.size*e);let r=t.area.as(IStiAxisArea);null!=r&&(r.xAxis.labels.font=StiFontUtils.changeFontSize(r.xAxis.labels.font,r.xAxis.labels.font.size*e),r.xTopAxis.labels.font=StiFontUtils.changeFontSize(r.xTopAxis.labels.font,r.xTopAxis.labels.font.size*e),r.yAxis.labels.font=StiFontUtils.changeFontSize(r.yAxis.labels.font,r.yAxis.labels.font.size*e),r.yRightAxis.labels.font=StiFontUtils.changeFontSize(r.yRightAxis.labels.font,r.yRightAxis.labels.font.size*e))}static getStyleFont(t,e){return StiDashboardStyleHelper.getElementFontFromStyle(t,e)}static getSmallStyleFont(t,e){let i=StiDashboardStyleHelper.getElementFontFromStyle(t);if(null==i)return e;let r=StiDashboardStyleHelper.getElementFontFromStyle(t),l=8*r.size/13,n=t.cachedSmallFont;if(null!=n&&n.name==r.name&&n.style==r.style&&n.size==l)return n;return t.cachedSmallFont=StiFontUtils.changeFontSize(r,l),t.cachedSmallFont}getValueMeterIndexes(e){if(null==e)return null;return this.getValueMeters(e).select(t=>e.meters.indexOf(t))}getArgumentMeterIndexes(e){if(null==e)return null;return this.getArgumentMeters(e).select(t=>e.meters.indexOf(t)).toList()}getSeriesMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>t.is(StiSeriesChartMeter));return null!=e?t.meters.indexOf(e):-1}getArgumentKeys(t,e){if(null==e)return null;let i=this.getArgumentMeters(e),r=i.select(t=>e.meters.indexOf(t)).toList(),l=e.rows.groupBy2(e=>r.select(t=>e[t]),new StiArrayEqualityComparer);return l.select(t=>t.key)}getValueMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiValueChartMeter)).cast()}getArgumentMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiArgumentChartMeter)).cast()}}__.i.StiChartElementBuilder=StiChartElementBuilder}let IStiBubbleSeries=Stimulsoft.Report.Chart.IStiBubbleSeries,IStiFinancialSeries=(__.i.StiBubbleChartElementBuilder=class extends __.i.StiChartElementBuilder{async renderElements(u,S,m){let h=this.getSeriesMeterIndex(m),t=this.getSeriesKeys(m,h),e=this.getValueMeters(m),c=t.count2();for(let a of t){let o=0;for(let s of e){let t=this.getValueMeterIndexes(m)[o],e=this.renderSeries(u,s,a,S);if(null==e)continue;let i=-1!=h&&1<c?m.rows.whereArrayItemStringEqualsTo(h,a):m.rows,r=(await __.i.StiChartElementBuilder.renderConditions(this.toString(a),e,u,s),e.values=i.getArrayItem(t).tryCastToNullableNumber(),this.getArgumentIndex(m,t)),l=(-1!=r&&(e.arguments=i.getArrayItem(r)),e.weights=null,this.getWeightIndex(m,t));if(-1!=l&&(e.weights=i.getArrayItem(l).tryCastToNumber()),null==e.weights){e.weights=[];for(let t=0;t<e.arguments.length;t++)e.weights[t]=10}o++;let n=Math.min(e.values.length,e.arguments.length);await this.renderSeriesInteraction(e,u,n,a)}}}renderSeries(t,e,i,r){let l=new Stimulsoft.Report.Chart["StiBubbleSeries"];return l.coreTitle=this.getSeriesTitle(t,i,e),l.isDashboard=!0,r.series.add(l),l}async renderSeriesInteraction(s,t,e,o){let a=s.as(IStiBubbleSeries);if(null==a)return;let u=t.dashboardInteraction;if(u.onHover==StiInteractionOnHover.ShowToolTip){s.toolTips=StiArray.create(String,e);for(let n=0;n<e;n++){let i="",r="",l="";if(n<s.values.length&&null!=s.values[n]&&(i=s.values[n].toString()),n<s.arguments.length&&null!=s.arguments[n]&&(r=``+s.arguments[n]),n<a.weights.length&&(l=a.weights[n].toString()),StiString.isNullOrEmpty(u.toolTip)){let t='"StiColor":"{0}","StiValue":"{1}","StiArgument":"{2}","StiWeight":"{3}"{4}',e=await this.getToolTipStyle(s.chart.style);s.toolTips[n]="{"+StiString.format(t,"#ffffff",i,r,l,e)+"}"}else s.toolTips[n]=await this.getHyperlink2(t,u.toolTip,r,i,l,o)}}s.drillDownEnabled=!0}async getHyperlink2(t,e,i,r,l,n){null==i&&(i=""),null==n&&(n="");let s=new Hashtable;return s.add("Argument",i),s.add("Value",r),s.add("Weight",l),s.add("Series",n),StiReportParser.parseAsync(e,t,!1,s)}getWeightIndex(t,e){if(null==t)return-1;let i=this.getWeightMeterIndexes(t);if(null==i)return-1;if(!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(i.length>e)return StiMath.trunc(i[e]);return-1}getWeightMeterIndexes(e){if(null==e)return null;return this.getWeightMeters(e).select(t=>e.meters.indexOf(t)).toList()}getWeightMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiWeightChartMeter)).cast()}getValueMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiYChartMeter)).cast()}getArgumentMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiXChartMeter)).cast()}},Stimulsoft.Report.Chart.IStiFinancialSeries),StiHeatmapHelper=(__.i.StiFinancialChartElementBuilder=class extends __.i.StiChartElementBuilder{async renderElements(h,c,d){let g=null==c?void 0:c.report,p=this.getSeriesMeterIndex(d),t=this.getSeriesKeys(d,p),e=this.getValueMeters(d),C=t.count2();for(let m of t){let S=0;for(let u of e){let t=this.getValueMeterIndexes(d)[S],e=this.renderSeries(h,u,m,c),i=e.as(IStiFinancialSeries);if(null==e||null==i)continue;let r=-1!=p&&1<C?d.rows.whereArrayItemStringEqualsTo(p,m):d.rows,l=(i.valuesOpen=r.getArrayItem(t).tryCastToNullableNumber(),i.valuesClose=null,this.getCloseValueIndex(d,t));if(-1!=l&&(i.valuesClose=r.getArrayItem(l).tryCastToNullableNumber()),null==i.valuesClose){i.valuesClose=[];for(let t=0;t<e.argument.length;t++)i.valuesClose[t]=10}i.valuesLow=null;let n=this.getLowValueIndex(d,t);if(-1!=n&&(i.valuesLow=r.getArrayItem(n).tryCastToNullableNumber()),null==i.valuesLow){i.valuesLow=[];for(let t=0;t<e.argument.length;t++)i.valuesLow[t]=10}i.valuesHigh=null;let s=this.getHighValueIndex(d,t);if(-1!=s&&(i.valuesHigh=r.getArrayItem(s).tryCastToNullableNumber()),null==i.valuesHigh){i.valuesHigh=[];for(let t=0;t<e.argument.length;t++)i.valuesHigh[t]=10}let o=this.getArgumentIndex(d,t),a=(-1!=o&&(e.arguments=r.getArrayItem(o).select(t=>this.getString(h.argumentFormat,t,g))),S++,Math.min(e.values.length,e.arguments.length));await this.renderSeriesInteraction(e,h,a,m)}}}renderSeries(t,e,i,r){let l=StiChartSeriesCreator.neww2(e.as(StiOpenValueChartMeter).seriesType);return l.coreTitle=this.getSeriesTitle(t,i,e),l.isDashboard=!0,r.series.add(l),l}async renderSeriesInteraction(a,t,e,i){let u=a.as(IStiFinancialSeries);if(null==u)return;let r=t.dashboardInteraction;if(r.onHover==StiInteractionOnHover.ShowToolTip){a.toolTips=StiArray.create(String,e);for(let o=0;o<e;o++){let t="",e="",i="",r="",l="",n=(o<u.valuesOpen.length&&null!=u.valuesOpen[o]&&(t=u.valuesOpen[o].toString()),o<u.valuesClose.length&&(e=u.valuesClose[o].toString()),o<u.valuesLow.length&&(i=u.valuesLow[o].toString()),o<u.valuesHigh.length&&(r=u.valuesHigh[o].toString()),o<a.arguments.length&&null!=a.arguments[o]&&(l=``+a.arguments[o]),'"StiColor":"{0}","StiOpenValue":"{1}","StiCloseValue":"{2}","StiLowValue":"{3}","StiHighValue":"{4}","StiArgument":"{5}"{6}'),s=await this.getToolTipStyle(a.chart.style);a.toolTips[o]="{"+StiString.format(n,"#ffffff",t,e,i,r,l,s)+"}"}}a.drillDownEnabled=!0}async renderArea(t,h){await super.renderArea(t,h);let c=null,d=null;for(let m=0;m<h.series.count;m++){let t=h.series.getByIndex(m).as(IStiFinancialSeries);if(null==t)continue;let e=t.valuesOpen[Stimulsoft.System.StiObject.stimulsoft]().toList().min(),i=t.valuesClose[Stimulsoft.System.StiObject.stimulsoft]().toList().min(),r=t.valuesLow[Stimulsoft.System.StiObject.stimulsoft]().toList().min(),l=t.valuesHigh[Stimulsoft.System.StiObject.stimulsoft]().toList().min(),n=t.valuesOpen[Stimulsoft.System.StiObject.stimulsoft]().toList().max(),s=t.valuesClose[Stimulsoft.System.StiObject.stimulsoft]().toList().max(),o=t.valuesLow[Stimulsoft.System.StiObject.stimulsoft]().toList().max(),a=t.valuesHigh[Stimulsoft.System.StiObject.stimulsoft]().toList().max(),u=new List([e,i,r,l]).min(),S=new List([n,s,o,a]).max();null==c&&(c=u),null==d&&(d=S),c=Math.min(c,u),d=Math.max(d,S)}let e=h.area.as(IStiAxisArea),i=(e.yAxis.range.auto=!1,e.yAxis.range.minimum=c,e.yAxis.range.maximum=d,e.yAxis.range.maximum-e.yAxis.range.minimum);e.yAxis.labels.step=2<i?Math.round(i/10):StiMath.round2(i/10,4)}getValueMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiOpenValueChartMeter)).cast()}getCloseValueIndex(t,e){if(null==t)return-1;let i=this.getCloseMeterIndexes(t);if(null==i||!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(e<i.length)return i[e];return-1}getCloseMeterIndexes(e){if(null==e)return null;return this.getCloseMeters(e).select(t=>e.meters.indexOf(t)).toList()}getCloseMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiCloseValueChartMeter)).cast()}getLowValueIndex(t,e){if(null==t)return-1;let i=this.getLowMeterIndexes(t);if(null==i||!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(e<i.length)return i[e];return-1}getLowMeterIndexes(e){if(null==e)return null;return this.getLowMeters(e).select(t=>e.meters.indexOf(t)).toList()}getLowMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiLowValueChartMeter)).cast()}getHighValueIndex(t,e){if(null==t)return-1;let i=this.getHighMeterIndexes(t);if(null==i)return-1;if(!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(i.length>e)return i[e];return-1}getHighMeterIndexes(e){if(null==e)return null;return this.getHighMeters(e).select(t=>e.meters.indexOf(t)).toList()}getHighMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiHighValueChartMeter)).cast()}},Stimulsoft.Report.Chart.StiHeatmapHelper),StiShape=(__.i.StiHeatmapChartElementBuilder=class extends __.i.StiChartElementBuilder{async renderElements(u,S,m){let h=null==S?void 0:S.report,c=this.getSeriesMeterIndex(m),t=this.getSeriesKeys(m,c),e=this.getValueMeters(m),d=t.count2();for(let a of t){let o=0;for(let s of e){let t=this.getValueMeterIndexes(m)[o],e=this.renderSeries(u,s,a,S),i=e.as(StiHeatmapSeries);if(null==e||null==i)continue;let r=-1!=c&&1<d?m.rows.whereArrayItemStringEqualsTo(c,a):m.rows,l=(e.values=r.getArrayItem(t).tryCastToNullableNumber(),this.getXValueIndex(m,t)),n=(i.xValues=-1!=l?r.getArrayItem(l).select(t=>this.getString(u.argumentFormat,t,h)):[""],this.getYValueIndex(m,t));i.yValues=-1!=n?r.getArrayItem(n).select(t=>this.getString(u.argumentFormat,t,h)):[""],o++,await this.renderSeriesInteraction(e,u,e.values.length,a)}}}renderSeries(t,e,i,r){let l=new Stimulsoft.Report.Chart["StiHeatmapSeries"];return l.coreTitle=this.getSeriesTitle(t,i,e),l.isDashboard=!0,r.series.add(l),l}async renderSeriesInteraction(o,t,e,i){if(o.chart.isDesigning)return;let a=o.as(StiHeatmapSeries);if(null==a)return;let r=o.core,u=r.getHeatmapColors(),l=r.getAllValues(),S=l.min(),m=l.max(),h=t.dashboardInteraction.as(StiChartDashboardInteraction);if(h.onHover==StiInteractionOnHover.ShowToolTip){o.toolTips=StiArray.create(String,e);for(let s=0;s<e;s++){let r=0,l="",n="";if(s<a.values.length&&null!=a.values[s]&&(r=a.values[s]),s<a.xValues.length&&(l=a.xValues[s].toString()),s<a.yValues.length&&(n=a.yValues[s].toString()),StiString.isNullOrEmpty(h.toolTip)){let t='{{"StiColor":"{0}","StiValue":"{1}","StiXValue":"{2}","StiYValue":"{3}"{4}}}',e=await this.getToolTipStyle(o.chart.style),i=StiHeatmapHelper.getColorFromRange(u,S,m,r);o.toolTips[s]=StiString.format(t,ColorTranslator.toHtml(i),r,l,n,e)}else o.toolTips[s]=await this.getHyperlink3(t,h.toolTip,r.toString(),l,n,i)}}o.drillDownEnabled=!0}async getHyperlink3(t,e,i,r,l,n){null==n&&(n="");let s=new Hashtable;return s.add("Value",i),s.add("XValue",r),s.add("YValue",l),s.add("Series",n),StiReportParser.parseAsync(e,t,!1,s)}getYValueIndex(t,e){if(null==t)return-1;let i=this.getYMeterIndexes(t);if(null==i)return-1;if(!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(i.length>e)return StiMath.trunc(i[e]);return-1}getYMeterIndexes(e){if(null==e)return null;return this.getYMeters(e).select(t=>e.meters.indexOf(t)).toList()}getYMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiYChartMeter)).cast()}getXValueIndex(t,e){if(null==t)return-1;let i=this.getXMeterIndexes(t);if(null==i)return-1;if(!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(i.length>e)return StiMath.trunc(i[e]);return-1}getXMeterIndexes(e){if(null==e)return null;return this.getXMeters(e).select(t=>e.meters.indexOf(t)).toList()}getXMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiXChartMeter)).cast()}},__.i.StiRangeChartElementBuilder=class extends __.i.StiChartElementBuilder{async renderElements(u,S,m){let h=null==S?void 0:S.report,c=this.getSeriesMeterIndex(m),t=this.getSeriesKeys(m,c),d=t.count2(),i=this.getValueMeters(m),g=this.getArgumentMeterIndexes(m),p=this.getArgumentKeys(u,m).toList();for(let a of t){let o=0;for(let e of i){let r=this.getValueMeterIndexes(m)[o],i=this.renderSeries(u,e,a,S);if(null==i)continue;await __.i.StiChartElementBuilder.renderConditions(a,i,u,e);let l=-1!=c&&1<d?m.rows.whereArrayItemStringEqualsTo(c,this.toString(a)):m.rows,n=(i.values=List.create(Number,p.length),0);for(let e of p){let t=__.i.StiChartElementBuilder.getDetailRows(l,e,g);n<i.values.length&&(i.values[n]=t.getArrayItem(r).firstOrDefaultAsNullableNumber()),n++}i.core.isDateTimeValues=List.getValueOrFirstOrDefault(l.getArrayItem(r).toList().firstOrDefault())instanceof DateTime;let s=i.as(IStiRangeSeries);if(null!=s){s.valuesEnd=List.create(Number,p.length);let i=this.getEndValueIndex(m,r);if(null==s.valuesEnd&&(s.valuesEnd=List.repeat(10,p.length)),-1!=i){n=0;for(let e of p){let t=__.i.StiChartElementBuilder.getDetailRows(l,e,g);n<s.valuesEnd.length&&(s.valuesEnd[n]=t.getArrayItem(i).firstOrDefaultAsNullableNumber()),n++}}}i.originalArguments=p[Stimulsoft.System.StiObject.stimulsoft]().toArray(),i.arguments=p.select(t=>this.getString(u.argumentFormat,t,h))[Stimulsoft.System.StiObject.stimulsoft]().toArray(),o++;let t=Math.min(i.values.length,i.arguments.length);await this.renderSeriesInteraction(i,u,t,a)}}}renderSeries(t,e,i,r){let l=StiChartSeriesCreator.neww2(e.seriesType),n=(l.coreTitle=this.getSeriesTitle(t,i,e),l.isDashboard=!0,e);return __.i.StiChartElementBuilder.renderSeriesLine(n,l),__.i.StiChartElementBuilder.renderSeriesShowNulls(n,l),this.renderMarker(t,l),r.series.add(l),l}async renderSeriesInteraction(l,n,t,s){let o,a,u=null==n?void 0:n.report,S=l.as(IStiRangeSeries);if(null==S)return;let e=n.dashboardInteraction.as(StiChartDashboardInteraction);if(e.onHover==StiInteractionOnHover.ShowToolTip){l.toolTips=StiArray.create(String,t);for(let r=0;r<t;r++){let t="",e="",i="";r<l.values.length&&null!=l.values[r]&&(t=(l.core.isDateTimeValues?DateTime.fromOADate(l.values[r]):l.values[r]).toString()),null!=S.valuesEnd&&r<S.valuesEnd.length&&(e=l.core.isDateTimeValues?null==(o=DateTime.fromOADate(S.valuesEnd[r]))?void 0:o.toString():null==(a=S.valuesEnd[r])?void 0:a.toString()),r<l.arguments.length&&null!=l.arguments[r]&&(i=``+l.arguments[r]),l.toolTips[r]=await this.getToolTip2(l.chart.style,n,n.dashboardInteraction.toolTip,this.getString(n.argumentFormat,i,u),this.getString(n.valueFormat,t,u),this.getString(n.valueFormat,e,u),s)}}l.drillDownEnabled=!0}async getToolTip2(i,t,e,r,l,n,s){if(null==r&&(r=""),null==s&&(s=""),StiString.isNullOrWhiteSpace(e)){null==r||StiString.isNullOrEmpty(r)||(r=r.split('"').join('\\"'));let t='"StiColor":"{0}","StiValue":"{1} - {3}","StiArgument":"{2}"{4}',e=await this.getToolTipStyle(i);return"{"+StiString.format(t,"#ffffff",l,r,n,e)+"}"}return this.getHyperlink2(t,e,r,l,n,s)}async getHyperlink2(t,e,i,r,l,n){null==i&&(i=""),null==n&&(n="");let s=new Hashtable;return s.add("Argument",i),s.add("Value",r),s.add("EndValue",l),s.add("Series",n),StiReportParser.parseAsync(e,t,!1,s)}getValueMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiStartValueChartMeter)).cast()}getEndValueIndex(t,e){if(null==t)return-1;let i=this.getEndValueMeterIndexes(t);if(null==i||!i.any())return-1;if(1==i.length)return i.toList().firstOrDefault();if(e<i.length)return StiMath.trunc(i[e]);return-1}getEndValueMeterIndexes(e){if(null==e)return null;return this.getEndValueMeters(e).select(t=>e.meters.indexOf(t)).toList()}getEndValueMeters(t){if(null==t)return null;return t.meters.where(t=>t.is(StiEndValueChartMeter)).cast()}},Stimulsoft.Report.Components.StiShape),IStiStackedColumnSeries=(__.i.StiShapeElementBuilder=class{render(t){let e=new StiShape;return e.shapeType=t.shapeType,e.brush=t.fill,e.borderColor=t.stroke,e.size=t.size,e}},Stimulsoft.Report.Chart.IStiStackedColumnSeries),IStiStackedBarSeries=Stimulsoft.Report.Chart.IStiStackedBarSeries,IStiRibbonSeries=Stimulsoft.Report.Chart.IStiRibbonSeries;{class k20 extends __.i.StiChartElementBuilder{async renderElements(o,a,u){let S=null==a?void 0:a.report,m=this.getSeriesMeterIndex(u),t=this.getSeriesKeys(u,m),h=this.getArgumentMeterIndexes(u),c=this.getArgumentKeys(o,u).toList(),i=this.getValueMeters(u),d=new List,g=t.count2();for(let s of t){let e=0;for(let t of i){d.add(s);let i=this.getValueMeterIndexes(u)[e],r=this.renderSeries(o,t,s,a);if(null==r)continue;await __.i.StiChartElementBuilder.renderConditions(s,r,o,t),__.i.StiChartElementBuilder.renderTrendLines(r,o,t);let l=-1!=m&&1<g?u.rows.whereArrayItemStringEqualsTo(m,s):u.rows,n=(r.values=List.create(Number,c.length),0);for(let e of c){let t=__.i.StiChartElementBuilder.getDetailRows(l,e,h);n<r.values.length&&(r.values[n]=t.getArrayItem(i).firstOrDefaultAsNullableNumber()),n++}r.originalArguments=c[Stimulsoft.System.StiObject.stimulsoft]().toArray(),r.arguments=c.select(t=>this.getString(o.argumentFormat,t,S))[Stimulsoft.System.StiObject.stimulsoft]().toArray(),e++}}await k20.processTopNStackedChart(o,a);for(let e=0;e<d.length;e++){if(a.series.count<e)break;let t=a.series.getByIndex(e);if(null==t)return;await this.renderSeriesInteraction(t,o,c.length,d[e])}}static getDataTable(t){let i=new DataTable,e=new DataColumn("Id",Number),r=(i.columns.add(e),new DataColumn("Argument",Object));i.columns.add(r);for(let e=0;e<t.length;e++){let t=new DataColumn("Value-"+e.toString(),Number);i.columns.add(t)}let l=new DataColumn("OriginalArguments",Object),n=(i.columns.add(l),new DataColumn("ValueSum",Number)),s=(i.columns.add(n),this.getCountRow(t.toList()));for(let t=0;t<s;t++){let t=i.newRow();i.rows.add(t)}return i}static getCountRow(e){let i=0;for(let t of e)i=Math.max(i,t.arguments.length);return i}static async getArguments(t,e){if(t.length<=e.topN.count)return t;let i=t.take(e.topN.count).toList();if(e.topN.showOthers){let t=StiString.isNullOrEmpty(e.topN.othersText)?Loc.get("FormDesigner","Others"):await StiReportParser.parseAsync(e.topN.othersText,e);i.add(t)}return i}static getValues(e,i){if(e.length<=i.topN.count)return e;let r=e.take(i.topN.count).toList();if(i.topN.showOthers){let t=e.skip(i.topN.count).sum();r.add(t)}return r}static async processTopNStackedChart(l,t){if(l.topN.mode==StiDataTopNMode.None)return;let n=t.series.toList();if(!n.any(t=>t.is(IStiStackedBaseLineSeries)||t.is(IStiStackedColumnSeries)||t.is(IStiStackedBarSeries)||t.is(IStiRibbonSeries)))return;let s=k20.getDataTable(n.toList());if(s.rows.count<1)return;for(let r=0;r<s.rows.count;r++){0<n.length&&n[0].arguments.length>r?s.rows.getByIndex(r).setValue(1,n[0].arguments[r]):s.rows.getByIndex(r).setValue(1,null),0<n.length&&n[0].originalArguments.length>r?s.rows.getByIndex(r).setValue(s.columns.count-2,n[0].originalArguments[r]):s.rows.getByIndex(r).setValue(s.columns.count-2,null);let i=0;for(let e=0;e<n.length;e++)if(0<n.length&&n[e].values.length>r){let t=n[e].values[r];s.rows.getByIndex(r).setValue(e+2,t),i+=t}else s.rows.getByIndex(r).setValue(e+2,null);s.rows.getByIndex(r).setValue(s.columns.count-1,i)}s.defaultView.sort=l.topN.mode==StiDataTopNMode.Top?"ValueSum desc":"ValueSum asc",s=s.defaultView.toTable();let o=0;for(let r of n){let t=k20.getListByColumnName(s,"OriginalArguments"),e=(r.originalArguments=await k20.getArguments(t,l),k20.getListByColumnName(s,"Argument")),i=(r.arguments=await k20.getArguments(e,l),k20.getListByColumnName(s,"Value-"+o.toString()));r.values=k20.getValues(i,l),r.is(IStiStackedBarSeries)&&(r.originalArguments=r.originalArguments.reverse(),r.arguments=r.arguments.reverse(),r.values=r.values.reverse()),o++}}static getListByColumnName(t,i){let r=new List;for(let e of t.rows.toList()){let t=e.gett(i);r.add(t)}return r}}__.i.StiStackedChartElementBuilder=k20}__.i.StiSunburstChartElementBuilder=class extends __.i.StiChartElementBuilder{async renderElements(e,l,n){let i=this.getArgumentMeters(n),s=this.getValueMeters(n).firstOrDefault(),o=this.getValueMeterIndexes(n)[Stimulsoft.System.StiObject.stimulsoft]().toList().firstOrDefault();for(let t=0;t<i.length;t++){let i=this.getArgumentMeterIndexes(n)[t],r=this.renderSeries(e,s,"",l);if(null==r)continue;r.values=StiArray.create(Number,n.rows.length),r.arguments=StiArray.create(Object,n.rows.length),r.originalArguments=StiArray.create(Object,n.rows.length);for(let e=0;e<n.rows.length;e++){r.values[e]=StiValueHelper.tryToNullableNumber(n.rows[e][o]);let t=n.rows[e][i];r.arguments[e]=t,r.originalArguments[e]=t}await this.renderSeriesInteraction(r,e,r.arguments.length,"")}}renderSeries(t,e,i,r){let l=StiChartSeriesCreator.neww2(e.seriesType);return l.core.seriesColors=null!=t.seriesColors&&0<t.seriesColors.length?t.seriesColors:null,l.isDashboard=!0,r.series.add(l),l}};{class Ld0{static getVisualizer(t){return null}}Ld0.typeToGdiVisualizer=new Hashtable,Ld0.typeToWpfVisualizer=new Hashtable,Ld0.lockObject={},__.n.StiVisualizer=Ld0}__.n.StiGdiVisualizer=class extends __.n.StiVisualizer{render(t){}},__.n.StiGdiVisualizerAttribute=class{},__.u.StiIndicatorIconRangeValue=class{isBetween(t){return this.start<=t&&t<=this.end}constructor(t,e,i){this.start=t,this.end=e,this.icon=i}};let StiProgressInteractionData=Stimulsoft.Base.Context.StiProgressInteractionData,StiElementLocationHelper=__.h.StiElementLocationHelper,StiPieSegmentGeom=(__.v.StiProgressVisual=class extends __.j.StiVisual{getMaxValue(){return this.iterations.select(t=>Math.abs(t.value)).concat(new List([0])).max()}getTargetValues(){let e=this.getMaxValue(),i=new List;for(let t of this.iterations)i.add(null!=t.target?t.target:e);return i}getTextValues(){let r=new List,l=this.getTargetValues();for(let i=0;i<this.iterations.length;i++){let t=l[i],e=0!=t?Math.abs(this.iterations[i].value)/t:0;r.add(StiTextFormatHelper.formatAsPercentage2(this.element.report,this.element.textFormat,e))}return r}getColor(t){return this.element.colorEach?this.getColors(this.iterations.length)[t]:this.style.bandColor}getColors(t){let s=[],e=(null!=this.element.seriesColors&&0<this.element.seriesColors.length?this.element:this.style).seriesColors,i=0,o=0;for(let n=0;n<t;n++){let l=null==e||0==e.length?Color.fromArgb(255,52,152,219):e[i];if(0!=o){let t=Math.min(l.a+o,255),e=Math.min(l.r+o,255),i=Math.min(l.g+o,255),r=Math.min(l.b+o,255);s[n]=Color.fromArgb(t,e,i,r)}else s[n]=l;++i==e.length&&(i=0,o=50)}return s}getContentRectangle(e){if(1<this.iterations.length){let t=StiElementLocationHelper.getLocationRectangles(e,this.iterations.length,this.element);e=StiElementLocationHelper.getSumRectangle(t)}return e}getConditionResult(r,e){let l=null;switch(e.field){case StiProgressFieldCondition.Value:l=r.value;break;case StiProgressFieldCondition.Series:l=r.series;break;case StiProgressFieldCondition.Target:l=r.target;break;case StiProgressFieldCondition.Percentage:{let t=this.getVariation(r),e=new StiPercentageFormatService,i=(e.decimalDigits=3,StiTextFormatHelper.formatAsPercentage2(this.element.report,e,t));l=i.replace("%","")[Stimulsoft.System.StiObject.stimulsoft]().toNumber();break}}let t=!1,i=this.getConditionValue(e);if(null!=l){let t=l=e.field!=StiProgressFieldCondition.Value&&e.field!=StiProgressFieldCondition.Target&&e.field!=StiProgressFieldCondition.Percentage?l:null==l?0:l[Stimulsoft.System.StiObject.stimulsoft]().toNumber();if(null!=t&&null!=i){l[Stimulsoft.System.StiObject.stimulsoft]().getType()!=i[Stimulsoft.System.StiObject.stimulsoft]().getType()&&(l=l.toString(),i=i[Stimulsoft.System.StiObject.stimulsoft]().toString(),t=l);try{switch(e.condition){case Stimulsoft.Report.Components.StiFilterCondition.EqualTo:return 0==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.NotEqualTo:return 0!=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.GreaterThan:return 1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.GreaterThanOrEqualTo:return 0<=t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.LessThan:return-1==t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i);case Stimulsoft.Report.Components.StiFilterCondition.LessThanOrEqualTo:return t[Stimulsoft.System.StiObject.stimulsoft]().compareTo(i)<=0;case Stimulsoft.Report.Components.StiFilterCondition.Containing:{let t=l.toString(),e=i.toString();return-1!=t.indexOf(e)}case Stimulsoft.Report.Components.StiFilterCondition.NotContaining:{let t=l.toString(),e=i.toString();return-1==t.indexOf(e)}case Stimulsoft.Report.Components.StiFilterCondition.BeginningWith:{let t=l.toString(),e=i.toString();return t.startsWith(e)}case Stimulsoft.Report.Components.StiFilterCondition.EndingWith:{let t=l.toString(),e=i.toString();return t.endsWith(e)}}}catch(t){}}}return t}processColor(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.Color)&&this.getConditionResult(e,t))return t.color;return t}getVariation(t){let e=t.value,i=t.target;return e/i}getConditionValue(t){if(StiString.isNullOrEmpty(t.value))return null;switch(t.field){case StiProgressFieldCondition.Value:case StiProgressFieldCondition.Target:case StiProgressFieldCondition.Percentage:return t.value[Stimulsoft.System.StiObject.stimulsoft]().toNumber();default:return t.value.toString()}}processForeColor(e,t=null){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.TextColor)&&this.getConditionResult(e,t))return t.textColor;return StiDashboardStyleHelper.getForeColor(this.element,t)}processTrackColor(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.TrackColor)&&this.getConditionResult(e,t))return t.trackColor;return t}processFontStyle(t,e){let i=this.processFontBold(t.bold,e),r=this.processFontItalic(t.italic,e),l=this.processFontUnderline(t.underline,e),n=this.processFontStrikeout(t.strikeout,e),s=FontStyle.Regular;return i&&(s^=FontStyle.Bold),r&&(s^=FontStyle.Italic),l&&(s^=FontStyle.Underline),n&&(s^=FontStyle.Strikeout),s}processFontStrikeout(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.FontStyleStrikeout)&&this.getConditionResult(e,t))return t.font.strikeout;return t}processFontUnderline(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.FontStyleUnderline)&&this.getConditionResult(e,t))return t.font.underline;return t}processFontItalic(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.FontStyleItalic)&&this.getConditionResult(e,t))return t.font.italic;return t}processFontBold(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.FontStyleBold)&&this.getConditionResult(e,t))return t.font.bold;return t}processFontName(t,e){for(let t of this.element.progressConditions)if(0<(t.permissions&StiProgressConditionPermissions.Font)&&this.getConditionResult(e,t))return t.font.name;return t}getInteractionDataGeom(t){if(this.element.isDesigning)return null;let e=new StiProgressInteractionData,i=(e.value=t.value,e.seriesText=t.series,e.target=t.target,new StiInteractionDataGeom);return i.interactionToolTip=this.getToolTip(e),i.interactionHyperlink=this.getHyperlink(e),i.interactionData=e,i}getToolTip(t){let e,i=null==(e=this.element.dashboardInteraction)?void 0:e.toolTip;return StiString.isNullOrEmpty(i)?i:this.parseConstants(i,t)}getHyperlink(t){let e,i=null==(e=this.element.dashboardInteraction)?void 0:e.hyperlink;return StiString.isNullOrEmpty(i)?i:this.parseConstants(i,t)}parseConstants(e,i){if(!StiString.isNullOrEmpty(e)){let t=new Hashtable;return t.set("Value",i.value),t.set("Series",i.seriesText),t.set("Target",i.target),StiReportParser.parse(e,this.element,!1,t)}return e}constructor(t,e){super(),this.minElementSide=2,this.minFontSize=3,this.element=t,this.iterations=e,this.style=StiDashboardStyleHelper.getProgressStyle(this.element)}},Stimulsoft.Base.Context.StiPieSegmentGeom),StiArcSegmentGeom=(__.v.StiPieProgressVisual=class extends __.v.StiProgressVisual{async draw(S,m){if(0==this.iterations.length)return;let h=StiElementLocationHelper.getLocationRectangles(m,this.iterations.length,this.element);if(h.length<1)return;let c=h[0],t=c.width<c.height?c.width:c.height,e=StiDashboardStyleHelper.getElementFontFromStyle(this.element),d=this.getTitleHeight(t,e.size),g=c.width,p=null,i=new Font(e.fontFamily.name,1,e.style,e.unit);for(let e of this.iterations){if(StiString.isNullOrEmpty(e.series))continue;let t=StiStringFormatHelper.getFontSize(S,new Rectangle(0,0,g,d),e.series,i);(null==p||p>t)&&(p=t)}let C=(t-(d=null!=p&&p<e.size?this.getTitleHeight(t,p):d))/2*.8,b=(p<this.minFontSize&&(p=0,d=0,C=t/2*.8),2*C),w=this.getTargetValues(),f=!1;S.pushClip(m);for(let u=0;u<this.iterations.length;u++){let t=w[u],e=this.iterations[u],i=h[u];if(!f&&(1<i.right-m.right||1<i.bottom-m.bottom)&&(f=!0),!this.element.report.isDesigning){let t=StiDashboardStyleHelper.getHotBackColor(this.element);S.fillRectangle3(new StiSolidBrush(Color.transparent),new StiSolidBrush(t),i,this.getInteractionDataGeom(this.iterations[0]))}let r=i.x+i.width/2,l=i.y+d+(c.height-d)/2,n=new Point(r,l),s=new Rectangle(n.x-C,n.y-C,b,b),o=new Rectangle(s.x+s.width/2-g/2,s.top-d,g,d),a=this.processColor(this.getColor(u),this.iterations[u]);this.drawPieProgress(S,s,o,t,e,p,a)}if(f){let t=StiElementScale.factor(this.element);this.drawArrowMore(S,m,t)}S.popClip()}drawPieProgress(S,t,m,e,h,c,i){let r=this.processTrackColor(this.style.trackColor,h),l=(S.fillEllipse2(r,t,null),0!=e?360/e*Math.abs(h.value):e),n=(360<l&&(l=360),new List([new StiPieSegmentGeom(t,-90,l,null,null,null)]));if(S.fillPath(i,n,t,null),c>=this.minFontSize){let t=StiDashboardStyleHelper.getElementFontFromStyle(this.element),e=this.processFontName(t.fontFamily.name,h),i=this.processFontStyle(t,h),r=new Font(e,c,i),l=new StiFontGeom(r.fontFamily.name,c,r.style,r.unit),n=StiRotationMode.CenterCenter,s=new Point,o={ref:StiRotationMode.CenterCenter},a={ref:new Point},u=(StiStringFormatHelper.measureAlignmentParameters(StiHorAlignment.Center,m,o,a),n=o.ref,s=a.ref,this.processForeColor(h));S.drawRotatedString4(h.series,l,u,s,StiStringFormatHelper.getStringFormatGeom(S),n,0,!0)}}getTitleHeight(t,e){let i=e/13;return t/4*(i=4<i?4:i)}constructor(t,e){super(t,e)}},Stimulsoft.Base.Context.StiArcSegmentGeom);__.v.StiCircleProgressVisual=class extends __.v.StiPieProgressVisual{async draw(d,g){if(0==this.iterations.length)return;let p=StiElementLocationHelper.getLocationRectangles(g,this.iterations.length,this.element);if(p.length<1)return;let C=.8,b=p[0],t=b.width<b.height?b.width:b.height,w=StiDashboardStyleHelper.getElementFontFromStyle(this.element),f=this.getTitleHeight(t,w.size),y=b.width,M=this.getTargetValues(),I=this.getTextValues(),T=null,i=new Font(w.fontFamily.name,1,w.style,w.unit);for(let e of this.iterations.where(t=>!StiString.isNullOrEmpty(t.series))){let t=StiStringFormatHelper.getFontSize(d,new Rectangle(0,0,y,f),e.series,i);(null==T||T>t)&&(T=t)}let x=(t-(f=null!=T&&T<w.size?this.getTitleHeight(t,T):f))/2*.8,D=null,r=new Rectangle(b.x-x*C,b.y-.79*x,2*x*C,2*x*C),l=new Font(this.element.font.name,1,FontStyle.Bold,GraphicsUnit.Pixel);for(let e=0;e<this.iterations.length;e++){let t=StiStringFormatHelper.getFontSize(d,r,I[e],l);(null==D||D>t)&&(D=t)}T<this.minFontSize&&(f=0,T=0,x=t/2*.8);let F=2*x,A=x/5,v=x-A,E=2*v,R=!1;d.pushClip(g);for(let c=0;c<this.iterations.length;c++){let e=p[c];if(!R&&(1<e.right-g.right||1<e.bottom-g.bottom)&&(R=!0),!this.element.report.isDesigning){let t=StiDashboardStyleHelper.getHotBackColor(this.element);d.fillRectangle3(new StiSolidBrush(Color.transparent),new StiSolidBrush(t),e,this.getInteractionDataGeom(this.iterations[0]))}let t=e.x+e.width/2,i=e.y+f+(b.height-f)/2,m=new Point(t,i),h=new Rectangle(m.x-x,m.y-x,F,F),r=new Rectangle(m.x-v,m.y-v,E,E);if(!this.element.report.isDesigning){let t=StiDashboardStyleHelper.getHotBackColor(this.element);d.fillRectangle3(Color.transparent,t,e,this.getInteractionDataGeom(this.iterations[c]))}let l=this.processTrackColor(this.style.trackColor,this.iterations[c]),n=new StiPenGeom(l,A),s=(d.drawEllipse(n,h.x+A/2,h.y+A/2,h.width-A,h.height-A),M[c]),o=0!=s?360/s*Math.abs(this.iterations[c].value):0,a=-90,u=(360<o&&(o=360),new List),S=(u.add(new StiArcSegmentGeom(h,a,o)),u.add(new StiLineSegmentGeom(this.getPoint(m,x,a+o),this.getPoint(m,v,a+o))),u.add(new StiArcSegmentGeom(r,a+o,-o)),u.add(new StiLineSegmentGeom(this.getPoint(m,v,a),this.getPoint(m,x,a))),this.processColor(this.getColor(c),this.iterations[c]));if(d.fillPath(S,u,h,null),D>=this.minFontSize){let t=new Rectangle(m.x-x*C,m.y-.79*x,2*x*C,2*x*C),e=I[c],i=new Font(this.element.font.name,D,FontStyle.Bold,GraphicsUnit.Pixel),r=this.processFontStyle(i,this.iterations[c]),l=new StiFontGeom(i.name,i.size,r,i.unit),n=this.processForeColor(this.iterations[c]);d.drawRotatedString5(e,l,n,t,StiStringFormatHelper.getStringFormatGeom(d),StiRotationMode.CenterCenter,0,!0)}if(T>=this.minFontSize){let t=new Rectangle(m.x-y/2,h.top-f,y,f),e=new Font(w.fontFamily.name,T,w.style,w.unit),i=this.processFontName(e.fontFamily.name,this.iterations[c]),r=this.processFontStyle(e,this.iterations[c]),l=new Font(i,e.size,r),n=new StiFontGeom(l.fontFamily.name,T,l.style,l.unit),s=StiRotationMode.CenterCenter,o=new Point,a={ref:StiRotationMode.CenterCenter},u={ref:new Point},S=(StiStringFormatHelper.measureAlignmentParameters(StiHorAlignment.Center,t,a,u),s=a.ref,o=u.ref,this.processForeColor(this.iterations[c]));d.drawRotatedString4(this.iterations[c].series,n,S,o,StiStringFormatHelper.getStringFormatGeom(d),s,0,!0)}}if(R){let t=StiElementScale.factor(this.element);this.drawArrowMore(d,g,t)}d.popClip()}getPoint(t,e,i){let r=Math.PI*i/180;return new Point(t.x+Math.cos(r)*e,t.y+Math.sin(r)*e)}constructor(t,e){super(t,e)}},__.v.StiDataBarsProgressVisual=class extends __.v.StiProgressVisual{async draw(g,t){if(0==this.iterations.length)return;let e=.06*t.width,p=(e<4&&(e=4),new Rectangle(t.x+e/2,t.y+e/2,t.width-e,t.height-e)),C=p.height/this.iterations.length,b=(C<this.minElementSide&&(C=this.minElementSide),1<this.iterations.length?.95*C:C),w=p.width,l=this.getTextValues(),f=this.getTargetValues(),y=StiDashboardStyleHelper.getElementFontFromStyle(this.element),M=null,n=new Font(y.fontFamily.name,1,y.style,y.unit);for(let r=0;r<this.iterations.length;r++){let t=``+this.iterations[r].series+l[r],e=new Rectangle(p.x,p.y+C*r+.07*b,w,.86*b),i=StiStringFormatHelper.getFontSize(g,e,t,n);(null==M||M>i)&&(M=i)}let I=this.element.font.size/18*M,T=(I>M&&(I=M),new Font(y.fontFamily.name,I,y.style,y.unit)),x=(g.pushClip(p),1<this.iterations.length?.05*C/(this.iterations.length-1):0);for(let d=0;d<this.iterations.length;d++){let t=this.processFontName(T.fontFamily.name,this.iterations[d]),e=this.processFontStyle(T,this.iterations[d]),n=new Font(t,T.size,e),i=f[d],r=p.y+(C+x)*d,s=new Rectangle(p.x,r,w,b),l=this.processTrackColor(this.style.trackColor,this.iterations[d]),o=(g.fillRectangle(l,s,this.getInteractionDataGeom(this.iterations[d])),0!=i?Math.abs(this.iterations[d].value)/i:0),a=StiTextFormatHelper.formatAsPercentage2(this.element.report,this.element.textFormat,o),u=StiDashboardStyleHelper.getForeColor(this.element);if(M>=this.minFontSize){let t=new StiFontGeom(y.fontFamily.name,I,n.style,n.unit),e=g.measureString(a,t),i=new Rectangle(s.right-e.width,s.top+.05*s.height,e.width,s.height);u=this.processForeColor(this.iterations[d]),g.drawRotatedString5(a,t,u,i,StiStringFormatHelper.getStringFormatGeom(g),StiRotationMode.CenterCenter,0,!0)}let S=this.iterations[d].series;if(M>=this.minFontSize){let t=new StiFontGeom(y.fontFamily.name,I,n.style,n.unit),e=g.measureString(S,t),i=new Rectangle(s.left,s.top+.05*s.height,e.width,s.height);u=this.processForeColor(this.iterations[d]),g.drawRotatedString5(S,t,u,i,StiStringFormatHelper.getStringFormatGeom(g),StiRotationMode.CenterCenter,0,!0)}let m=0!=i?w/i*this.iterations[d].value:0,h=(m>s.width&&(m=s.width),new Rectangle(p.x,r,m,b)),c=(g.pushClip(h),this.processColor(this.getColor(d),this.iterations[d]));if(g.fillRectangle(c,h,this.getInteractionDataGeom(this.iterations[d])),this.element.report.isDesigning||(null==c&&(c=Color.transparent),g.fillRectangle3(c,Color.fromArgb3(100,Color.white),h,this.getInteractionDataGeom(this.iterations[d]))),M>=this.minFontSize){let t=new StiFontGeom(n.name,n.size,n.style,n.unit),e=g.measureString(a,t),i=new Rectangle(s.right-e.width,s.top+.05*s.height,e.width,s.height),r=this.isColorLight(c)?Color.white:u,l=this.processForeColor(this.iterations[d],r);g.drawRotatedString5(a,t,l,i,StiStringFormatHelper.getStringFormatGeom(g),StiRotationMode.CenterCenter,0,!0)}if(M>=this.minFontSize){let t=new StiFontGeom(n.name,n.size,n.style,n.unit),e=g.measureString(S,t),i=new Rectangle(s.left,s.top+.05*s.height,e.width,s.height),r=this.isColorLight(c)?Color.white:u,l=this.processForeColor(this.iterations[d],r);g.drawRotatedString5(S,t,l,i,StiStringFormatHelper.getStringFormatGeom(g),StiRotationMode.CenterCenter,0,!0)}g.popClip()}g.popClip()}isColorLight(t){return 0<600-t.r-t.g-t.b}constructor(t,e){super(t,e)}};{let t;(t=>{t[t["Pdf"]=0]="Pdf",t[t["Excel"]=1]="Excel",t[t["Data"]=2]="Data",t[t["Image"]=3]="Image",t[t["Html"]=4]="Html",t[t["Document"]=5]="Document"})(t=__.f.StiDashboardExportFormat||(__.f.StiDashboardExportFormat={}))}let StiPageOrientation=Stimulsoft.Report.Components.StiPageOrientation,PaperKind=Stimulsoft.System.Drawing.Printing.PaperKind,IStiDashboardExportSettings=Stimulsoft.Report.Dashboard.Export.IStiDashboardExportSettings,StiExportSettings=Stimulsoft.Report.Export.StiExportSettings,IStiSizeExportSettings=(__.y.StiDashboardExportSettings=class extends StiExportSettings{constructor(){super(...arguments),this.renderBorders=!0,this.orientation=StiPageOrientation.Landscape,this.paperSize=PaperKind.A4,this.openAfterExport=!0,this.viewportWidth=0,this.viewportHeight=0}is(t){if(t instanceof Stimulsoft.System.Interface)return-1!=this.implements().indexOf(t);if("function"==typeof t)return this instanceof t;if(null==t)throw new Error("Type for comparison is 'undefined'");return!1}is2(t){return this.is(t)}as(t){if(this.is(t))return this;return null}implements(){let t=[IStiDashboardExportSettings];return(this.implements=()=>t)()}get isDesignMode(){return this.is(__.y.StiSvgDashboardExportSettings)&&this.as(__.y.StiSvgDashboardExportSettings).designMode}getExportFormat(){
|
|
10
|
-
return __.A.StiExportFormatHelper.convert(this.format)}toParameters(){let t=super.toParameters();return t.Format=Enum.getName(__.f.StiDashboardExportFormat,this.format),t.Orientation=Enum.getName(StiPageOrientation,this.orientation),t.PaperSize=Enum.getName(StiPageOrientation,this.paperSize),t}},__.y.IStiDashboardScaleMode=new Stimulsoft.System.Interface("IStiDashboardScaleMode"),__.y.IStiSizeExportSettings=new Stimulsoft.System.Interface("IStiSizeExportSettings"),__.y.IStiSizeExportSettings),StiDashboardScaleMode=Stimulsoft.Report.Dashboard.StiDashboardScaleMode,IStiDashboardScaleMode=__.y.IStiDashboardScaleMode,StiImageType=Stimulsoft.Report.Export.StiImageType,IStiImageDashboardExportSettings=Stimulsoft.Report.Dashboard.Export.IStiImageDashboardExportSettings,IStiHtmlDashboardExportSettings=(__.y.StiImageDashboardExportSettings=class extends __.y.StiDashboardExportSettings{implements(){let t=super.implements().concat([IStiSizeExportSettings,IStiImageDashboardExportSettings,IStiDashboardScaleMode]);return(this.implements=()=>t)()}get width(){return this._width}set width(t){this._width=t,this.paperSize=PaperKind.Custom}get height(){return this._height}set height(t){this._height=t,this.paperSize=PaperKind.Custom}toParameters(){let t=super.toParameters();return t.Format=Enum.getName(__.f.StiDashboardExportFormat,this.format),t.ImageType=Enum.getName(StiImageType,this.imageType),t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t.Width=0,t.Height=0,t}constructor(t){super(),this.format=__.f.StiDashboardExportFormat.Image,this.imageType=StiImageType.Svg,this.scale=100,this.scaleMode=StiDashboardScaleMode.ViewSize,null!=t?this.imageType=t:this.renderSinglePage=!0}},__.y.StiSvgDashboardExportSettings=class extends __.y.StiImageDashboardExportSettings{constructor(){super(...arguments),this.imageType=StiImageType.Svg,this.renderEmptyContent=!0}},Stimulsoft.Report.Dashboard.Export.IStiHtmlDashboardExportSettings);__.y.StiHtmlDashboardExportSettings=class extends __.y.StiDashboardExportSettings{constructor(){super(...arguments),this.format=__.f.StiDashboardExportFormat.Html,this.imageQuality=200,this.scale=100,this.enableAnimation=!0,this.scaleMode=StiDashboardScaleMode.ViewSize}implements(){let t=super.implements().concat([IStiHtmlDashboardExportSettings,__.y.IStiDashboardScaleMode]);return(this.implements=()=>t)()}toParameters(){let t=super.toParameters();return t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t}};{class StiExportTool{async render(t,e,i,r){}static getTool(t){let e=this.typeToTool.get(t);if(null!=e)return e;let i=StiExportToolAttribute.attributes.get(t[Stimulsoft.System.StiObject.stimulsoft]().getTypeName()),r=null!=i?i.exportToolTypeName:null;if(null==r)return null;return e=StiActivator.createObject2(r),this.typeToTool.set(t,e),e}static isAllowOpacity(t){return t.is(__.y.StiImageDashboardExportSettings)||t.is(__.y.StiHtmlDashboardExportSettings)||t.is(__.y.StiPdfDashboardExportSettings)||t.is(__.y.StiExcelDashboardExportSettings)}static getScaleFactor(t,e){if(0<e.viewportWidth&&0<e.viewportHeight)return Math.min(t.page.width/e.viewportWidth,t.page.height/e.viewportHeight);return 1}}StiExportTool.typeToTool=new Hashtable,__.z.StiExportTool=StiExportTool}let StiHtmlDashboardExportSettings=__.y.StiHtmlDashboardExportSettings,StiTitleMeasureHelper=__.h.StiTitleMeasureHelper,StiSvgDashboardExportSettings=__.y.StiSvgDashboardExportSettings,StiImageDashboardExportSettings=__.y.StiImageDashboardExportSettings,StiExportTool=__.z.StiExportTool,IStiBorder=(__.A.StiTitleExportHelper=class{static async render(t,e,i){let r,l,n=t.as(IStiTitleElement),s=__.p.StiElementControlPainter.getBorderContentRect(new Rectangle(0,0,e.width,e.height),e.border),o=null!=n?n.title:null,a=this.getTitleText(t);if(null==o||!o.visible||StiString.isNullOrEmpty(a))return s;let u=StiExportTool.getScaleFactor(e,i),S=StiTitleMeasureHelper.measureTitle3(null,s,n.title,a),m=(S.height=S.height*u,S.height>s.height/2&&(S.height=s.height/2),1);if(o.sizeMode==StiTextSizeMode.Fit||o.sizeMode==StiTextSizeMode.FitAndWordWrap){let t=S.width>s.width?s.width/S.width:1,e=S.height>s.height?s.height/S.height:1;m=Math.min(Math.abs(t),Math.abs(e))}let h=this.getTitleForeColor(t),c=Color.transparent.equals(h)?StiDashboardStyleHelper.getTitleForeColor(t):h,d=this.getTitleFont(t),g=1==m?d:StiFontUtils.changeFontSize(d,d.size*m),p=i.is(StiImageDashboardExportSettings)&&i.imageType==StiImageType.Svg||i.is(StiSvgDashboardExportSettings)||i.is(StiHtmlDashboardExportSettings),C=this.getTitleBackColor(t),b=Color.transparent.equals(C)?StiDashboardStyleHelper.getBackColor(t,null,p):C,w=StiDashboardStyleHelper.getBackColor(t,null,!0),f=(b.equals(w)&&(b=Color.transparent),i.format==__.f.StiDashboardExportFormat.Html&&t.is(IStiChartElement)&&(s.x+=3,s.y+=3),new StiText),y=(f.name=t.name+`_Title`,f.allowHtmlTags=!0,f.clientRectangle=new Rectangle(s.x,s.y,s.width,S.height),f.text=await StiReportParser.parseAsync(a,t),f.font=g,f.horAlignment=this.convert(o.horAlignment),f.trimming=o.sizeMode==StiTextSizeMode.Trimming?StringTrimming.EllipsisCharacter:StringTrimming.None,f.wordWrap=o.sizeMode==StiTextSizeMode.WordWrap||o.sizeMode==StiTextSizeMode.FitAndWordWrap,f.vertAlignment=StiVertAlignment.Center,f.textBrush=new StiSolidBrush(c),f.brush=new StiSolidBrush(b),s.height-=f.height,s.y+=f.height,null==(r=o[Stimulsoft.System.StiObject.stimulsoft]().as(IStiTitlePadding))?void 0:r.padding),M=(null!=y&&(s.y+=y.top+y.bottom,s.height-=y.top+y.bottom,f.left+=y.left,f.width-=y.left+y.right,f.top+=y.top),null==(l=t.as(IStiCornerRadius))?void 0:l.cornerRadius);return null!=M&&((0<M.topLeft||0<M.topRight)&&(f.cornerRadius=new StiCornerRadius(M.topLeft,M.topRight,0,0)),0<M.topLeft&&(f.margins.left=Math.max(f.margins.left,M.topLeft/2)),0<M.topRight)&&(f.margins.right=Math.max(f.margins.right,M.topRight/2)),e.components.add(f),s}static getTitleBackColor(t){let e=StiDashboardStyleHelper.getElementTitleStyle(t);if(null!=e&&e.allowUseTitle)return e.titleBackColor;if(t.is(IStiTitleElement))return t.title.backColor;return Color.transparent}static getTitleForeColor(t){let e=StiDashboardStyleHelper.getElementTitleStyle(t);if(null!=e&&e.allowUseTitle)return e.titleForeColor;if(t.is(IStiTitleElement))return t.title.foreColor;return Color.black}static getTitleFont(t){let e=StiDashboardStyleHelper.getElementTitleStyle(t);if(null!=e&&e.allowUseTitle)return e.titleFont;if(t.is(IStiTitleElement))return t.title.font;return null}static getTitleText(e){if(e.is(IStiTitleElement)){if(e.is(StiChartElement)&&e.showViewTitle){let t=e.userViewStates.firstOrDefault(t=>t.key==e.selectedViewStateKey);if(null!=t)return t.name}return e.title.text}return null}static convert(t){switch(t){case StiHorAlignment.Left:return StiTextHorAlignment.Left;case StiHorAlignment.Center:return StiTextHorAlignment.Center;case StiHorAlignment.Right:return StiTextHorAlignment.Right;default:throw new StiTypeNotRecognizedException(t)}}},__.A.StiLayoutExportHelper=class{static excludeMargin(e,i){if(e.is(IStiMargin)){let t=e.margin;if(!t.isEmpty)return new Rectangle(i.x+t.left,i.y+t.top,Math.max(1,i.width-t.left-t.right),Math.max(1,i.height-t.top-t.bottom))}return i}static excludePadding(e,i,r){if(e.is(IStiPadding)){let t=e.padding;if(!t.isEmpty)return new Rectangle(i.x+t.left*r,i.y+t.top*r,Math.max(1,i.width-t.left*r-t.right*r),Math.max(1,i.height-t.top*r-t.bottom*r))}return i}static excludeCornerRadius(n,s,o){if(n.is(IStiCornerRadius)){let t=n.cornerRadius;if(t.isDefault())return s;let e=Math.max(t.topLeft*o/2,t.bottomLeft*o/2),i=Math.max(t.topLeft*o/2,t.topRight*o/2),r=Math.max(t.topRight*o/2,t.bottomRight*o/2),l=Math.max(t.bottomLeft*o/2,t.bottomRight*o/2);return new Rectangle(s.x+e,s.y+i,Math.max(1,s.width-e-r),Math.max(1,s.height-i-l))}return s}},Stimulsoft.Report.Components.IStiBorder),StiExportFormat=(__.A.StiBorderExportHelper=class{static render(t,e,i){t.is(IStiSimpleBorder)&&e.is(IStiBorder)&&i.renderBorders&&(e.border=t.border2.getBorder(),e.border.topmost=!0)}},__.A.StiBackColorExportHelper=class{static render(t,e){e.is(IStiBackColor)&&(e.backColor=StiDashboardStyleHelper.getBackColor(t))}},Stimulsoft.Report.StiExportFormat),IStiExcelDashboardExportSettings=(__.A.StiExportFormatHelper=class{static convert(t){switch(t){case __.f.StiDashboardExportFormat.Pdf:return StiExportFormat.Pdf;case __.f.StiDashboardExportFormat.Excel:return StiExportFormat.Excel;case __.f.StiDashboardExportFormat.Html:return StiExportFormat.Html;case __.f.StiDashboardExportFormat.Data:return StiExportFormat.Data;case __.f.StiDashboardExportFormat.Image:return StiExportFormat.Image;case __.f.StiDashboardExportFormat.Document:return StiExportFormat.Document;default:throw new StiTypeNotRecognizedException(t)}}},Stimulsoft.Report.Dashboard.Export.IStiExcelDashboardExportSettings),IStiPdfDashboardExportSettings=(__.y.StiExcelDashboardExportSettings=class extends __.y.StiDashboardExportSettings{constructor(){super(...arguments),this.format=__.f.StiDashboardExportFormat.Excel,this.imageQuality=200,this.scaleMode=StiDashboardScaleMode.ViewSize}implements(){let t=super.implements().concat([IStiSizeExportSettings,IStiExcelDashboardExportSettings,__.y.IStiDashboardScaleMode]);return(this.implements=()=>t)()}get width(){return this._width}set width(t){this._width=t,this.paperSize=PaperKind.Custom}get height(){return this._height}set height(t){this._height=t,this.paperSize=PaperKind.Custom}toParameters(){let t=super.toParameters();return t.Width=0,t.Height=0,t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t}},Stimulsoft.Report.Dashboard.Export.IStiPdfDashboardExportSettings),StiDataType=(__.y.StiPdfDashboardExportSettings=class extends __.y.StiDashboardExportSettings{constructor(){super(...arguments),this.format=__.f.StiDashboardExportFormat.Pdf,this.imageQuality=200,this.scaleMode=StiDashboardScaleMode.PaperSize}implements(){let t=super.implements().concat([IStiPdfDashboardExportSettings,IStiDashboardScaleMode]);return(this.implements=()=>t)()}toParameters(){let t=super.toParameters();return t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t}},Stimulsoft.Report.Export.StiDataType),IStiDataDashboardExportSettings=Stimulsoft.Report.Dashboard.Export.IStiDataDashboardExportSettings,StiHtmlChartType=(__.y.StiDataDashboardExportSettings=class extends __.y.StiDashboardExportSettings{implements(){let t=super.implements().concat([IStiDataDashboardExportSettings]);return(this.implements=()=>t)()}toParameters(){let t=super.toParameters();return t.DataType=Stimulsoft.System.Enum.getName(StiDataType,this.dataType),t}constructor(t){super(),this.format=__.f.StiDashboardExportFormat.Data,this.dataType=StiDataType.Csv,null!=t&&(this.dataType=t)}},Stimulsoft.Report.Export.StiHtmlChartType),StiHtmlExportSettings=Stimulsoft.Report.Export.StiHtmlExportSettings,StiDataExportSettings=Stimulsoft.Report.Export.StiDataExportSettings,StiImageExportSettings=Stimulsoft.Report.Export.StiImageExportSettings,StiSvgExportSettings=Stimulsoft.Report.Export.StiSvgExportSettings,StiDataDashboardExportSettings=__.y.StiDataDashboardExportSettings,StiExcelDashboardExportSettings=__.y.StiExcelDashboardExportSettings,StiPdfDashboardExportSettings=__.y.StiPdfDashboardExportSettings,StiDashboardExportSettings=__.y.StiDashboardExportSettings,StiDataExportMode=Stimulsoft.Report.Export.StiDataExportMode,StiPdfExportSettings=Stimulsoft.Report.Export.StiPdfExportSettings,StiExcelExportSettings=Stimulsoft.Report.Export.StiExcelExportSettings,XmlTextWriter=(__.A.StiExportSettingsHelper=class{static getExportSettings(i){switch(i.format){case __.f.StiDashboardExportFormat.Pdf:{let t=new StiPdfExportSettings;return t.imageQuality=1,t.imageResolution=i.imageQuality,t}case __.f.StiDashboardExportFormat.Excel:{let t=new StiExcelExportSettings;return t.imageQuality=1,t.imageResolution=i.imageQuality,t}case __.f.StiDashboardExportFormat.Data:{let t=new StiDataExportSettings;return t.dataType=i.dataType,t.dataExportMode=StiDataExportMode.DataAndHeadersFooters,t.skipColumnHeaders=!0,t}case __.f.StiDashboardExportFormat.Image:{let e=i.imageType;switch(e){case StiImageType.Svg:return new StiSvgExportSettings;default:{let t=new StiImageExportSettings;return t.imageType=e,t.imageZoom=i.scale/100,t.imageResolution=100,t}}}case __.f.StiDashboardExportFormat.Html:{let t=new StiHtmlExportSettings;return t.imageResolution=i.imageQuality,t.useEmbeddedImages=!0,t.zoom=i.scale/100,t.addPageBreaks=!1,t.chartType=i.enableAnimation?StiHtmlChartType.AnimatedVector:StiHtmlChartType.Vector,t}case __.f.StiDashboardExportFormat.Document:return null;default:throw new StiTypeNotRecognizedException(i.format)}}static getDashboardExportSettings(t){if(t instanceof StiDashboardExportSettings)return t;let e=null==t?StiExportFormat.Document:t.getExportFormat(),i=this.getDashboardExportSettings2(e);switch(e){case StiExportFormat.Html:i.enableAnimation=t.chartType==StiHtmlChartType.AnimatedVector;break}return i}static getDashboardExportSettings2(t){switch(t){case StiExportFormat.Pdf:return new StiPdfDashboardExportSettings;case StiExportFormat.Excel:return new StiExcelDashboardExportSettings;case StiExportFormat.Data:return new StiDataDashboardExportSettings;case StiExportFormat.Csv:return new StiDataDashboardExportSettings(StiDataType.Csv);case StiExportFormat.Dbf:return new StiDataDashboardExportSettings(StiDataType.Dbf);case StiExportFormat.Xml:return new StiDataDashboardExportSettings(StiDataType.Xml);case StiExportFormat.Json:return new StiDataDashboardExportSettings(StiDataType.Json);case StiExportFormat.Dif:return new StiDataDashboardExportSettings(StiDataType.Dif);case StiExportFormat.Sylk:return new StiDataDashboardExportSettings(StiDataType.Sylk);case StiExportFormat.Image:return new StiImageDashboardExportSettings;case StiExportFormat.ImageBmp:return new StiImageDashboardExportSettings(StiImageType.Bmp);case StiExportFormat.ImageGif:return new StiImageDashboardExportSettings(StiImageType.Gif);case StiExportFormat.ImagePng:return new StiImageDashboardExportSettings(StiImageType.Png);case StiExportFormat.ImageTiff:return new StiImageDashboardExportSettings(StiImageType.Tiff);case StiExportFormat.ImageJpeg:return new StiImageDashboardExportSettings(StiImageType.Jpeg);case StiExportFormat.ImageEmf:return new StiImageDashboardExportSettings(StiImageType.Emf);case StiExportFormat.ImagePcx:return new StiImageDashboardExportSettings(StiImageType.Pcx);case StiExportFormat.ImageSvgz:return new StiImageDashboardExportSettings(StiImageType.Svgz);case StiExportFormat.ImageSvg:return new StiSvgDashboardExportSettings;case StiExportFormat.Html:return new StiHtmlDashboardExportSettings;case StiExportFormat.Document:return null;default:throw new StiTypeNotRecognizedException(t)}}static isDataExport(t){return t.is(StiDataDashboardExportSettings)||t.is(StiExcelDashboardExportSettings)&&t.exportDataOnly}},Stimulsoft.System.Xml.XmlTextWriter),StiImage=Stimulsoft.Report.Components.StiImage;{class StiElementExportTool extends __.z.StiExportTool{async render(t,e,i,r){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;await this.renderContent(t,e,i.clone())}async renderContent(t,e,i){let r=new StiImage(i),l=(r.name=t.name+`_Content`,r.stretch=!0,r.aspectRatio=!1,await this.draw(t,i));r.imageToDraw=l,e.components.add(r)}async drawElement(e,t){let i=new Image,r=new XmlTextWriter(Encoding.UTF8),l=new StiSvgData;if(l.x=0,l.y=0,l.width=t.width,l.height=t.height,l.component=e.as(StiComponent),e.is(IStiBackColor)){let t=StiDashboardStyleHelper.getBackColor(e);t.a<255&&(t=Color.white),r.writeStartElement("rect"),r.writeAttributeString("x","0"),r.writeAttributeString("y","0"),r.writeAttributeString("height",l.height.toString()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(",",".")),r.writeAttributeString("width",l.width.toString()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(",",".")),r.writeAttributeString("style",StiContextSvgHelper.writeFillBrush(r,t,new RectangleD(0,0,l.width,l.height))),r.writeEndElement()}if(e.is(StiProgressElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createProgressVisualSvgHelper();null!=t&&await t.writeProgress(r,l)}else if(e.is(StiIndicatorElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createIndicatorVisualSvgHelper();null!=t&&await t.writeIndicator(r,l)}else if(e.is(StiCardsElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createCardsVisualSvgHelper();null!=t&&await t.writeCards(r,l)}else if(e.is(StiGaugeElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createGaugeVisualSvgHelper();null!=t&&await t.writeGauge(r,l,!1)}let n=Stimulsoft.Report.Resources.StimulsoftFont.getBase64Content(),s="<style>@font-face {font-family: 'Stimulsoft';src: url(data:font/ttf;base64,"+n+") format('truetype');font-weight: normal;font-style: normal;}</style>",o=StiString.format('<svg xmlns="http://www.w3.org/2000/svg" width="{0}" height="{1}"><defs>{3}</defs><rect x="0" y="0" width="{0}" height="{1}" style="fill: white;"/>{2}</svg>',l.width.toString(),l.height.toString(),r.textWriter.getStringBuilder().toString(),s);return i.svg=o,await i.convertAsync(Stimulsoft.System.Drawing.Imaging.ImageFormat.Jpeg),i}async draw(e,t){if(e.is(StiImageElement)){let t=await e.imageToDraw;return null!=t&&(t.url=e.imageHyperlink),t}let i=new Rectangle(0,0,Math.trunc(t.width),Math.trunc(t.height));if(e.is(StiIndicatorElement)||e.is(StiProgressElement)||e.is(StiGaugeElement)||e.is(StiCardsElement))return this.drawElement(e,i);let r=new Image;try{if(e.is(IStiBackColor)){let t=StiDashboardStyleHelper.getBackColor(e);t.a<255&&(t=Color.white)}await this.paintContent(null,i,e)}catch(t){}return r}async paintContent(t,e,i){try{await this.paintAtom(t,e.clone(),i)}catch(t){}finally{}}async paintAtom(t,e,i){let r=null;if(i.isQuerable&&null==(r=await StiElementExportTool.getDataTable(i)))return}static async getDataTable(t){let e,i=null==(e=t.as(IStiManuallyEnteredData))?void 0:e.getManuallyEnteredDataTable();if(null!=i)return i;return StiElementDataCache.tryToGetOrCreate(t)}renderEmptyDataMessage(e,i,r,t){var l;if(!t.is(StiSvgDashboardExportSettings)||t.renderEmptyContent)return!1;if(e.is(IStiRegionMapElement)&&e.dataFrom==StiMapSource.Manual)return!1;if(e.is(IStiImageElement)&&(null!=e.image||null!=e.icon||!StiString.isNullOrEmpty(e.imageHyperlink)))return!1;if(e.is(IStiWebContentElement)&&(!StiString.isNullOrEmpty(e.url)||!StiString.isNullOrEmpty(e.embedCode)))return!1;if(0<e.getMeters().length||(null==(l=e.as(IStiManuallyEnteredData))?void 0:l.dataMode)==StiDataMode.ManuallyEnteringData)return!1;let n=r.size,s=new Font("Arial",9),o=e.is(IStiWebContentElement)?Loc.get("FormStyleDesigner","NotSpecified"):e.is(IStiImageElement)?Loc.get("Dashboard","ImageNotSpecified"):Loc.get("Dashboard","DragDropDataFromDictionary"),a=Graphics.measureString(o,s);if(r.y+=r.height/2-48,r.height=Math.min(32,r.height),48<=n.width&&64<=n.height){r.y+=n.width>a.width+16?16:32;let t=new StiImage(new Rectangle(r.width/2-16,r.y,32,32));t.name=e.name+`_EmptyImage`,t.horAlignment=StiHorAlignment.Center,t.image=Stimulsoft.Base.Drawing.StiImageConverter.stringToImage(this.getEmptyDataImage(e)),i.components.add(t)}if(n.width>a.width+16&&32<=n.height){r.y+=32;let t=new StiText(r);t.name=e.name+`_EmptyText`,t.horAlignment=StiTextHorAlignment.Center,t.vertAlignment=StiVertAlignment.Center,t.font=s,t.text=o,t.textBrush=new StiSolidBrush(Color.darkGray),i.components.add(t)}return!0}format(t,e){var i,r;if(null!=e&&null!=t){if(e instanceof DateTime&&!t.textFormat.is(StiDateFormatService))return e.toShortDateString();return StiExtValueConverter.isEligable(e,null==(i=null==t?void 0:t.report)?void 0:i.culture)?StiExtValueConverter.convert(e,null==(r=null==t?void 0:t.report)?void 0:r.culture):t.textFormat.format(e)}return""}getEmptyDataImage(t){if(t.is(Stimulsoft.Report.Dashboard.IStiTableElement))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1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dG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Mjc2NTY1N2UtZjU3OS03OTQxLWIwYTgtZGU3MjdiYjI3MDhhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6OWZmYzA0NGMtNTQyYS03NTRkLWI0YzUtOTIwZWRkMTVlYjRlIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+/5jbrAAAAG1JREFUeNrslzEOgDAMAxOU/+T/z8iLzMLACkZyAXvqUvWUNCclAYQyW4hTMyN7vLujjvPdPiR5V98CAxjAAHWeSWaeWQCZiOqhSl6tAvwJDbCcB9iABbCIKJlYRAb4jIiYJfG9Isrfb8e7AAMAInAVUndCPVIAAAAASUVORK5CYII=";if(t.is(Stimulsoft.Report.Dashboard.IStiChartElement))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGNJREFUeNpi/P//P8NAAsaBdgATiDh//vz/AXXAgIfAQAIWYhXiiiZDQ0PG0SigSxTQKnpGo2DUAYMrF9CisCFk5mgUjDpg1AGjDhh1wKgDRh0A7hsOVNcMVCUzjvjeMUCAAQAQtyafO9RmPQAAAABJRU5ErkJggg==";if(t.is(Stimulsoft.Report.Dashboard.IStiGaugeElement))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkI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F3wrwwMRqJqvuU9YNUjwABgJX86W1bOxQAAAABJRU5ErkJggg==";if(t.is(Stimulsoft.Report.Dashboard.IStiWebContentElement))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAACIUlEQVR42u2XsYoCQQyGfS0fQHu1slIQFES0sBEbF8ROUDtB2UpFtBIsfQUbH0Ks1wfI8YfLMYyzM7OuesVdYDhcvOTb5E8mZjL/9m3ZbJY+eYwAPtZsNmm73VIaexrgeDxSoVCg4XBIxWKRP38MIIoiDnq9Xh9g5NlbAZbLJQfTDeUAyHQ69QZJDADHuVwuNgCeJylLYgA4RwZcBhCIFCDn8/k1AHCEFJvscDjQaDSyitWUtUQAprReLhfqdDpUr9epWq0ySJxuUDr8hYgTAyAwUip2u92o3+9TuVym+XzOgcMw5M/3+91bH14A+EdpOzjfbDZUqVRoMBjQfr/n4HJ6vR4tFgunPlAWvJAXwGQyYfLT6cRv2O12HwLL2e12/B2Uxmbwh7Z1Aghtq9XiGku6bWc2m7EuXFPUqwRCCseNRsMZXA5EGSdIbw2opDCIbjweewGs12ujIPEy6hS1Auhth7rCKersAwGRYiybxOwE0EnFoHA4dgVHS6JktVrtJwvwB0F7DSIZo/r0gjNkYbVaGQPjOboE30G7SnARs+7PSwP6GDUJEmUJgoDngxpYXV5Ml5OzC+BIHaNi7XabW1ICl0olLo9pCupifuou0MeoCBKB0R0YzXFmuxETX8dyIyKlyIBr4sUtLy/dCW3LST6ft25HqbZiOEafI8Wm7dhneUkFYLtmpe3Uu/9tAGlW9ZcCqPNeXV6eAvjVn2Z/1r4A4YX01RrCMf0AAAAASUVORK5CYII=";return null}}__.z.StiElementExportTool=StiElementExportTool}let StiChartElementBuilder=__.i.StiChartElementBuilder,StiGaugeVisualSvgHelper=(__.z.StiChartElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r,l){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;let n=t.as(StiChartElement),s=null,o=(0<n.chartValuesList().length&&(s=await __.z.StiElementExportTool.getDataTable(n)),await StiChartElementBuilder.create(n).render(n,s)),a=(o.horSpacing=0,o.vertSpacing=0,StiExportTool.getScaleFactor(e,r));StiChartElementBuilder.scaleFont(o,a);for(let t=0;t<o.series.count;t++){if(null==l||t>=l.length)break;o.series.getByIndex(t).valuesStart=l[t]}o.name=t.name+`_Content`,o.clientRectangle=i.clone(),e.components.add(o)}},__.h.StiGaugeVisualSvgHelper),StiImageElementExportTool=(__.z.StiGaugeElementExportTool=class extends __.z.StiElementExportTool{async render(t,s,e,i){if(this.renderEmptyDataMessage(t,s,e.clone(),i))return;let o=t.as(StiGaugeElement),a=await __.z.StiElementExportTool.getDataTable(t),u=(new StiGaugeElementBuilder).render2(o,e.size,a);if(1!=(await u()).count2()||i.is(StiExcelDashboardExportSettings)||i.is(StiPdfDashboardExportSettings)){if(0<(await u()).count2())if(i.isDesignMode||i.format!=__.f.StiDashboardExportFormat.Html)await this.renderContent(t,s,e.clone());else{let r=0,l=StiElementLocationHelper.getLocationRectangles(e,(await u()).count2(),o),n=l[0].clone();for(let i of await(u=(new StiGaugeElementBuilder).render2(o,n.size,a))()){let t=l[r].clone(),e={ref:0};StiString.isNullOrEmpty(i.series)||(await this.renderSingleGaugeTitleFromIteration(o,s,i,t,n,u,r,e),t.height-=e.ref,t.y+=e.ref),this.renderSingleGaugeFromIteration(o,s,i,t,r),r++}}}else this.renderSingleGaugeFromIteration(o,s,(await u()).firstOrDefault(),e)}renderSingleGaugeFromIteration(t,e,i,r,l=0){let n=i.gauge;n.name=t.name+`_Content`+l,n.clientRectangle=r,n.style=StiDashboardStyleHelper.getGaugeStyle(t),n.customStyleName=t.customStyleName,n.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t,null,!0)),e.components.add(n)}async renderSingleGaugeTitleFromIteration(s,o,t,a,e,i,u,S){let m=t.series,h=StiDashboardStyleHelper.getFont(s),r=await StiGaugeVisualSvgHelper.getTitleHeight(null,i,a,s,null),c=await StiGaugeVisualSvgHelper.getTitleMinFontSize(null,i,h,e.width,e.height);if(S.ref=r||0,null!=r){let t=new Rectangle(a.x,a.y,a.width,S.ref),e=StiFontUtils.changeFontSize(h,c),i=StiTitleMeasureHelper.measureTitle4(null,t,h,m),r=(t.height=i.height,StiDashboardExpressionHelper.getForeColor(s,s.foreColor)),l=Color.transparent.equals(r)?StiDashboardStyleHelper.getForeColor(s):r,n=new StiText(t);n.name=s.name+`_ContentTitle`+u,n.brush=new StiSolidBrush(Color.transparent),n.text=m,n.font=e,n.textBrush=new StiSolidBrush(l),n.horAlignment=StiTextHorAlignment.Center,o.components.add(n)}}},__.z.StiImageElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;await this.renderContent(t,e,i.clone())}async renderContent(t,e,s){let o=t.as(StiImageElement),a=await this.draw(o,s.clone());if(o.aspectRatio&&null!=a){let t=s.width/a.width,e=s.height/a.height,i=(t=e=t<e?t:e,a.width*(t=e)),r=a.height*e,l=this.calculateHorAlignmentPosition(o,s,i),n=this.calculateVertAlignmentPosition(o,s,r);s=new Rectangle(l,n,i,r)}let i=new StiImage(s);i.name=o.name+`_Content`,i.stretch=!0,i.aspectRatio=!1,i.imageToDraw=a,e.components.add(i)}calculateHorAlignmentPosition(t,e,i){switch(t.horAlignment){case StiHorAlignment.Left:return e.x;case StiHorAlignment.Right:return e.right-i;default:return e.x+(e.width-i)/2}}calculateVertAlignmentPosition(t,e,i){switch(t.vertAlignment){case StiVertAlignment.Top:return e.y;case StiVertAlignment.Bottom:return e.bottom-i;default:return e.y+(e.height-i)/2}}},__.z.StiImageElementExportTool),StiGaugeElementExportTool=__.z.StiGaugeElementExportTool,StiChartElementExportTool=__.z.StiChartElementExportTool,StiExportSettingsHelper=__.A.StiExportSettingsHelper,StiExportFormatHelper=__.A.StiExportFormatHelper,StiElementExportTool=__.z.StiElementExportTool,StiTitleExportHelper=__.A.StiTitleExportHelper,StiBackColorExportHelper=__.A.StiBackColorExportHelper,StiBorderExportHelper=__.A.StiBorderExportHelper,StiLayoutExportHelper=__.A.StiLayoutExportHelper,IStiReport=Stimulsoft.Base.IStiReport;{class W70{static exportAsync(e,i,r){setTimeout(async function(){let t=await W70.export(i,r);e(t)})}static export(t,e){let i;return i=e instanceof StiDashboardExportSettings?e:e instanceof StiExportSettings?__.A.StiExportSettingsHelper.getDashboardExportSettings(e):__.A.StiExportSettingsHelper.getDashboardExportSettings2(e),this.exportToStream(t,i)}static async exportToStream(e,i){let t,n=new StiReport,r=(n.isDocument=!0,n.reportUnit=StiReportUnitType.HundredthsOfInch,n.renderedPages.getByIndex(0)),l=(r.orientation=i.orientation,r.paperSize=i.paperSize,(i.is(StiExcelDashboardExportSettings)||i.is(StiDataDashboardExportSettings)||i.is(StiImageDashboardExportSettings))&&(r.margins=new StiMargins(0)),i),s=("width"in i&&null!=l&&0<l.width&&0<l.height&&(r.width=l.width,r.height=l.height),null==(t=e.as(IStiDashboardWatermark))?void 0:t.dashboardWatermark),o=(r.tagValue=s,null==r.tagValue&&(r.tagValue="*Dashboards*"),null);if(e.is(IStiReport))await this.renderCellReportAsync(e,n,r,i);else if(e.is(IStiDashboard)){let t=e.as(IStiDashboard);(o=t.report).currentPage=o.pages.indexOf(t.page),await this.renderCellDashboardAsync(e,r,i)}else if(e.is(IStiElement)){let t=e.as(IStiElement);(o=t.report).currentPage=o.pages.indexOf(t.page),await this.renderCellElement(e,n,r,i)}n.parentReport=o;for(let r of n.renderedPages.list)r.components.toList().where(t=>t.is(StiContainer)).cast().forEach(t=>{let e=r.components.indexOf(t)+1,i=t.getComponentsList();for(let t=0;t<i.length;t++)i[t].page=r,i[t].setDirectDisplayRectangle(i[t].componentToPage(i[t].displayRectangle)),r.components.insert(e+t,i[t]);t.components.clear()});if(0<n.renderedPages.count&&!(Stimulsoft.Base.LUQWU.KGpud.kHSlz()||(Stimulsoft.Base.LUQWU.KGpud.TiGmR()||Stimulsoft.Base.LUQWU.KGpud.osnmc())&&Stimulsoft.System.NodeJs.isStandaloneVersion)){let t=n.renderedPages.getByIndex(0),e=t.report.unit.convertFromHInches(200),i=t.report.unit.convertFromHInches(52),r=new Rectangle((t.width-e)/2,t.height-i,e,i),l=new StiImage(r);l.stretch=!0,l.printable=!1,l.image=Stimulsoft.Report.Export.StiExportUtils.getAdditionalData2(192),l.name=Stimulsoft.Report.StiNameValidator.correctName(Stimulsoft.System.Guid.newGuidString().substring(0,8)),l.componentPlacement="pf.PageFooterBand",t.components.add(l)}let a,u=null==i?StiExportFormat.Document:StiExportFormatHelper.convert(i.format);if(u==StiExportFormat.Document)a=Stimulsoft.System.Text.Encoding.UTF8.getBytes(n.saveDocumentToJsonString());else{let t=StiExportSettingsHelper.getExportSettings(i),e=await n.exportDocumentAsync2(u,null,t);a="string"==typeof e?Stimulsoft.System.Text.Encoding.UTF8.getBytes(e):"undefined"!=typeof Buffer&&Buffer.isBuffer(e)?e.toJSON().data:e}return a}static async renderCellReportAsync(t,e,i,r){let l=t.as(IStiReport).fetchPages().where(t=>t.is(IStiDashboard)).cast();for(let t=0;t<l.length;t++)0<t&&(i=i.clone(!0,!1),e.renderedPages.add(i)),this.setUpPage(i,l[t],r),await this.renderDashboardAsync(i,l[t],r)}static async renderCellDashboardAsync(t,e,i){this.setUpPage(e,t,i),await this.renderDashboardAsync(e,t.as(IStiDashboard),i)}static async renderCellElement(t,e,i,r){let l=t.as(IStiElement);l.is(IStiRegionMapElement)&&e.dictionary.resources.addRange(l.report.dictionary.resources),e.reportAlias=l.name,this.setUpPage(i,t,r),await this.renderSingleElementAsync(i,l,r)}static async renderDashboardAsync(e,t,i){if(null==t)return;null!=i&&(i.renderSinglePage=!0,i.renderSingleElement=!1);let r=t.as(StiDashboard),l=await r.getElements(!1).whereAsync(async t=>t.isEnabledAsync()),n=1,s=1;if(i.is(IStiDashboardScaleMode)){let t=i.as(IStiDashboardScaleMode).scaleMode;switch(t){case StiDashboardScaleMode.PaperSize:n=e.width/r.width,s=e.height/r.height;break;case StiDashboardScaleMode.ViewSize:{let t=Math.min(e.width/i.viewportWidth,e.height/i.viewportHeight);n=i.viewportWidth/r.width*t,s=i.viewportHeight/r.height*t;break}case StiDashboardScaleMode.DesignSize:n=s=Math.min(e.width/r.width,e.height/r.height);break}}e.brush=new StiSolidBrush(StiDashboardStyleHelper.getDashboardBackColor(t,!1)),await this.renderElementsAsync(e,l,n,s,i)}static async renderSingleElementAsync(t,e,i){if(null==e||!await e.isEnabledAsync())return;null!=i&&(i.renderSingleElement=!0),t.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(e));let r=e.as(StiComponent),l=t.width/r.width,n=t.height/r.height,s=await this.renderElementAsync(t,e,l,n,i),o=StiExportSettingsHelper.isDataExport(i),a=e.margin;s.left=o?0:a.left,s.top=o?0:a.top}static setUpPage(i,r,l){var t;if(l.is(StiPdfDashboardExportSettings)&&(i.orientation=l.as(StiPdfDashboardExportSettings).orientation,i.paperSize=l.as(StiPdfDashboardExportSettings).paperSize),(l.is(StiExcelDashboardExportSettings)||l.is(StiDataDashboardExportSettings)||l.is(StiHtmlDashboardExportSettings)||l.is(StiImageDashboardExportSettings))&&(i.margins=new StiMargins(0)),l.is(IStiDashboardScaleMode)){let t=l.as(IStiDashboardScaleMode).scaleMode,e=(0!=l.viewportWidth&&0!=l.viewportHeight&&t==StiDashboardScaleMode.ViewSize||(l.viewportWidth=r.as(StiComponent).width,l.viewportHeight=r.as(StiComponent).height),l.as(IStiSizeExportSettings));null!=e&&0<e.width&&0<e.height&&(l.viewportWidth=e.width,l.viewportHeight=e.height),l.is(StiPdfDashboardExportSettings)||(i.width=l.viewportWidth,i.height=l.viewportHeight)}let e=null==(t=r.as(IStiDashboardWatermark))?void 0:t.dashboardWatermark;i.tagValue=e,null==i.tagValue&&(i.tagValue="*Dashboards*"),null!=e&&(e.textEnabled&&(i.watermark.text=e.text,i.watermark.textBrush=new StiSolidBrush(e.textColor),i.watermark.font=e.textFont,i.watermark.angle=e.textAngle,i.watermark.showBehind=!0),e.imageEnabled)&&(i.watermark.image=e.image,i.watermark.aspectRatio=e.imageAspectRatio,i.watermark.imageAlignment=e.imageAlignment,i.watermark.imageMultipleFactor=e.imageMultipleFactor,i.watermark.imageStretch=e.imageStretch,i.watermark.imageTiling=e.imageTiling,i.watermark.imageTransparency=e.imageTransparency,i.watermark.showImageBehind=!0)}static async renderElementsAsync(r,e,l,n,s){null!=s&&(s.renderSingleElement=!1);for(let t of e){let e=await this.renderElementAsync(r,t,l,n,s),i=t.as(StiPanelElement);if(null!=i){let t=i.getComponents().toList().where(t=>t.is(IStiElement)).cast();await this.renderElementsAsync(e,t,l,n,s)}}}static async renderElementAsync(t,e,i,r,l,n,s={ref:new Stimulsoft.System.Drawing.Rectangle},o=new List){let a,u=e.as(StiComponent),S=StiExportSettingsHelper.isDataExport(l),m=Math.round(u.left*i),h=Math.round(u.top*r),c=Math.round(u.right*i),d=Math.round(u.bottom*r),g=new Rectangle(m,h,c-m,d-h);if(S||(g=StiLayoutExportHelper.excludeMargin(e,g)),u.parent.is(StiPanelElement)){let t=u.parent;g.x-=t.margin.left,g.y-=t.margin.top}let p=new StiPanel(g),C=(p.name=e.name,StiExportTool.isAllowOpacity(l));if(S||(p.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(e,null,C)),p.cornerRadius=null==(a=e.as(IStiCornerRadius))?void 0:a.cornerRadius),t.components.add(p),null!=p.report&&null!=e.report&&(p.report.styles.clear(),p.report.styles.addRange(e.report.styles)),g=await StiTitleExportHelper.render(e,p,l),!S){StiBorderExportHelper.render(e,p,l),StiBackColorExportHelper.render(e,p);let t=StiElementExportTool.getScaleFactor(p,l);g=StiLayoutExportHelper.excludePadding(e,g,t),g=StiLayoutExportHelper.excludeCornerRadius(e,g,t),s.ref=g}let b=StiExportTool.getTool(Type.getType(e));return(b=null==b?new StiElementExportTool:b)[Stimulsoft.System.StiObject.stimulsoft]().is(StiChartElementExportTool)&&l.is(StiHtmlDashboardExportSettings)?(e.previousAnimations=o,await b.render(e,p,g.clone(),l,n)):b[Stimulsoft.System.StiObject.stimulsoft]().is(StiGaugeElementExportTool)&&l.is(StiHtmlDashboardExportSettings)?(e.previousAnimations=o,await b.render(e,p,g.clone(),l)):!b[Stimulsoft.System.StiObject.stimulsoft]().is(StiImageElementExportTool)&&null!=l&&1==l.isDesignMode&&e[Stimulsoft.System.StiObject.stimulsoft]().is(IStiOnlineMapElement)||await b.render(e,p,g.clone(),l),p}}__.f.StiDashboardExportTools=W70}let StiBorderElementHelper=Stimulsoft.Report.Dashboard.Helpers.StiBorderElementHelper,SolidBrush=(__.p.StiElementControlPainter=class{static getBorderContentRect(t,e){return StiBorderElementHelper.getBorderContentRect3(t.clone(),e,StiScale.factor,!1)}},__.p.StiLocHelper=class{static get locAll(){return`(${Loc.get("Report","RangeAll")[Stimulsoft.System.StiObject.stimulsoft]().replaceAll("& ","")})`}},Stimulsoft.System.Drawing.SolidBrush),StiTableElementConditionHelper=__.K.StiTableElementConditionHelper,StringFormat=Stimulsoft.System.Drawing.StringFormat,StringFormatFlags=Stimulsoft.System.Drawing.StringFormatFlags,StiIndicatorCellPainter=(__.C.StiIndicatorCellPainter=class{static async draw(t,e,i,r,l,n,s,o,a,u=!0){let S=await StiTableElementConditionHelper.getIconCondition(n.key,i,r,l),m=(null!=S&&S.iconAlignment!=StiIconAlignment.None&&(await __.C.StiConditionIconPainter.drawIcon(t,S,e,s),e=__.C.StiConditionIconPainter.adjustCellContentRectWithIcon(e,S)),this.getCellText(i,n,o));await this.draw2(t,e.clone(),i,r,l,n,s,o,a,m,u)}static async draw2(i,r,l,t,e,n,s,o,a,u,S=!0){let m=this.measureText(s,u,l.font),h=this.calculateIndicatorRect(r.clone(),n,s,m);if(await this.drawIndicator(i,l,t,e,n,h,o,a),S){let t=this.calculateTextRect(r.clone(),n),e=this.getColor(n,o,a);this.drawText(i,t,n,s,u,l.font,e)}}static async drawIndicator(s,o,a,u,S,m,h,c){let d=Math.min(m.width,m.height);if(null==h||0==h)s.fillRectangle(new RectangleD(m.x+(m.width-d)/2,m.y+(m.height-4)/2,d,5),Color.lightGray);else{let t=.75*d,e=(m=new Rectangle(m.x+(m.width-d)/2,m.y+(m.height-t)/2,d,t)).width/2,i,r,l,n=(l=0<h?(i=new Point(m.left+e,m.top),r=new Point(m.left,m.bottom),new Point(m.right,m.bottom)):(i=new Point(m.left+e,m.bottom),r=new Point(m.left,m.top),new Point(m.right,m.top)),0<h?c.cellIndicatorPositive:c.cellIndicatorNegative);n=await StiTableElementConditionHelper.processForeColor(n,S.key,o,a,u),s.fillPolygon([i,r,l],new SolidBrush(n))}}static drawText(t,e,i,r,l,n,s){if(StiString.isNullOrWhiteSpace(l))return;e.width-=2;let o=new StringFormat,a=StiElementConsts.Table.Font.getGdiFont(r,null,n);o.lineAlignment=StringAlignment.Center,o.alignment=this.toAlignment(i),o.trimming=StringTrimming.None,o.formatFlags|=StringFormatFlags.NoWrap,t.drawString(l,a,s,e.clone(),o)}static measureText(t,e,i){if(StiString.isNullOrWhiteSpace(e))return 0;let r=StiElementConsts.Table.Font.getGdiFont(t,null,i);return StiTextDrawing.measureString(null,e,r).width}static calculateIndicatorRect(e,t,i,r){let l=16*i;switch(this.getHorAlignment(t)){case StiHorAlignment.Left:e=new Rectangle(e.x,e.y,l,e.height);break;case StiHorAlignment.Right:e=new Rectangle(e.right-l,e.y,l,e.height);break;case StiHorAlignment.Center:{let t=r+l;e=new Rectangle(e.right-(e.width-t)/2-l,e.y,l,e.height);break}}return e.inflate(-4*i,-4*i),e}static getCellText(t,e,i){if(null==i)return"";return StiTextFormatHelper.formatAsPercentage2(t.report,e.textFormat,i)}static calculateTextRect(t,e){let i=t.width/4;switch(this.getHorAlignment(e)){case StiHorAlignment.Left:return new Rectangle(t.x+i,t.y,t.width-i,t.height);case StiHorAlignment.Right:return new Rectangle(t.x,t.y,t.width-i,t.height);case StiHorAlignment.Center:return new Rectangle(t.x,t.y,t.width,t.height)}return t}static getColor(t,e,i){if(!Color.transparent.equals(t.foreColor))return t.foreColor;if(0<e)return i.cellIndicatorPositive;if(e<0)return i.cellIndicatorNegative;return i.cellIndicatorNeutral}static toAlignment2(t){if(t[Stimulsoft.System.StiObject.stimulsoft]().is(StringAlignment))return t;let e=t[Stimulsoft.System.StiObject.stimulsoft]().as(IStiHorAlignment);if(null==e)return StringAlignment.Center;return this.toAlignment(e.horAlignment)}static toAlignment(t){switch(t){case StiHorAlignment.Left:return StringAlignment.Near;case StiHorAlignment.Center:return StringAlignment.Center;case StiHorAlignment.Right:return StringAlignment.Far}return StringAlignment.Center}static getHorAlignment(t){let e=t;return null!=e?e.horAlignment:StiHorAlignment.Right}},__.C.StiIndicatorCellPainter),StiDataSortRuleHelper=Stimulsoft.Data.Engine.StiDataSortRuleHelper;{class StiTableElementGdiPainter{static getBackgroundColor(t,e,i,r){return null==e||e.data.backColor.equals(Color.transparent)?r?i.alternatingCellBackColor:i.cellBackColor:r?StiDashboardStyleHelper.isDarkStyle3(t)?StiColorUtils.light(e.data.backColor,25):StiColorUtils.dark(e.data.backColor,25):e.data.backColor}static measureColumn(t,e,i,r,l){let n,s=StiElementConsts.Table.getHeight(i.font,i.zoom);if(r.is2(StiSparklinesColumn))n=this.measureSparklinesCell(i,0,i.zoom);else if(r.is2(StiIndicatorColumn))n=this.measureIndicatorCell(t,i,r,l,i.zoom);else if(r.is2(StiDataBarsColumn))n=this.measureDataBarsCell(t,i,r,l,i.zoom);else if(r.is2(StiBubbleColumn))n=this.measureBubbleCell(t,i,r,l,i.zoom);else if(StiImageHelper.isImage(l))return new Size(0,StiElementConsts.Table.getHeight(i.font,i.zoom));return new Size(n.width,Math.max(n.height,s))}static getArrowSize(t,e){let i=StiElementConsts.Table.getHeight(t.headerFont,t.zoom),r=StiDataSortRuleHelper.getSortDirection(t.userSorts,e.key);if(r!=StiDataSortDirection.None)return new Size(1.5*i,i);return Size.empty}static getRightImageRect(t,e,i){let r=i.width*t.zoom,l=i.height*t.zoom;return new Rectangle(e.right-3-r,e.y+(e.height-l)/2,r,l)}static measureSparklinesCell(t,e,i){return new Size(Math.max(e,80*i),0)}static measureIndicatorCell(t,e,i,r,l){let n=i,s=StiIndicatorCellPainter.getCellText(e,n,StiValueHelper.tryToNullableNumber(r)),o=this.measureCell2(t,s,e.font,i);return o.width=(o.width+4)*l*1.25,o}static measureDataBarsCell(t,e,i,r,l){let n=StiTextFormatHelper.formatBasedOnColumnType(e,i,r),s=this.measureCell2(t,n,e.font,i);return s.width*=l,i.horAlignment!=StiHorAlignment.Center&&(s.width*=2),i.is(StiDataBarsColumn)&&0<i.width&&(s.width=l*i.width),s}static measureBubbleCell(i,r,l,n,t){let s=StiElementConsts.Table.getHeight(r.font,r.zoom);if(l.horAlignment==StiHorAlignment.Center)return s-=2,new Size(s,StiElementConsts.Table.getHeight(r.font));{let t=StiTextFormatHelper.formatBasedOnColumnType(r,l,n),e=this.measureCell2(i,t,r.font,l);return e.width+=s,e}}static measureCommonCell(t,e,i,r,l,n){let s=StiTextFormatHelper.formatBasedOnColumnType(e,i,r),o=new Size(l,0);return StiImageHelper.isImage(s)||((o=this.measureCell2(t,s,e.font,i)).width*=n,o.height*=n),o}static measureHeader(t,e){return this.measureHeader2(null,t,e)}static measureHeader2(t,e,i){let r=StiLabelHelper.getLabel(i),l=this.measureCell2(t,r,e.headerFont,i);return l.width+=36,l}static measureCell(t,e,i){return this.measureCell2(null,t,e,i)}static measureCell2(t,e,i,r){let l=new Size(8,StiElementConsts.Table.getHeight(i));if(StiString.isNullOrEmpty(e))return l;let n=new __.C.StiTableColumnSizeHelper(i,r),s=i[Stimulsoft.System.StiObject.stimulsoft]().getHashCode().toString()+e+n.getUniqueCode().toString();if(this.captionSizeCache.contains(s)){let t=this.captionSizeCache.get(s);return l.width=t.width,l.height=t.height,l}let o=StiElementConsts.Table.Font.getGdiFont(1,null,i),a=0!=n.width?n.width:n.maxWidth,u=Graphics.measureString(e,o,a);return u.width=n.getColumnWidth(u.width),u.height=n.getColumnHeight(u.height),l.width=u.width,l.height=u.height,this.captionSizeCache.set(s,u),l}static measureHeaders(e,t){let r=StiElementConsts.Table.Font.getGdiFont(1,null,t),l=new Size(8,StiElementConsts.Table.getHeight(r));for(let t of e){let e=new Size(8,0),i=StiLabelHelper.getLabel(t);if(!StiString.isNullOrEmpty(i)){let t=Graphics.measureString(i,r,1e6);e.width+=t.width}l.width+=e.width}return l.width}}StiTableElementGdiPainter.captionSizeCache=new Hashtable,__.q.StiTableElementGdiPainter=StiTableElementGdiPainter}__.C.StiBubbleCellPainter=class{static async draw(l,t,e,i,r,n,s,o,a,u,S,m,h=!0){if(0==o)return;let c=StiTextFormatHelper.formatBasedOnColumnType(e,n,o),d=(0<a&&(a=0),u<0&&(u=0),n.horAlignment),g=t,p=await StiTableElementConditionHelper.getIconCondition(n.key,e,i,r),C=(null!=p&&p.iconAlignment!=StiIconAlignment.None&&(await __.C.StiConditionIconPainter.drawIcon(l,p,g,s),g=__.C.StiConditionIconPainter.adjustCellContentRectWithIcon(g,p)),g.inflate(-2,-2),this.calculateTextRect(e,g,n)),b=(g=this.calculateBubbleRect(e,g,n,Math.abs(o),a,u),StiDashboardStyleHelper.getTableStyle(e)),w=this.getForeColor(e,n,b,S,m);if(h&&d!=StiHorAlignment.Center&&l.drawString(c,e.font,w,C,null),0<g.width&&0<g.height){let t=n.as(StiBubbleColumn),e=t.allowCustomColors?t.positiveColor:b.cellDataBarsPositive,i=t.allowCustomColors?t.negativeColor:b.cellDataBarsNegative,r=new SolidBrush(o<0?i:e);l.fillEllipse(g,r)}}static getForeColor(t,e,i,r,l){if(!Color.transparent.equals(e.foreColor))return e.foreColor;if(!Color.transparent.equals(t.foreColor))return t.foreColor;if(r)return i.alternatingCellForeColor;return l?null!=i?i.selectedCellForeColor:StiElementConsts.Table.Font.Color:null!=i?i.cellForeColor:StiElementConsts.Table.Font.Color}static calculateBubbleRect(t,e,i,r,l,n){let s=i;if(null==s)return e;let o=StiElementConsts.Table.getHeight(t.font,t.zoom),a=(o-=2,Math.max(Math.abs(l),Math.abs(n))),u=Math.abs(o*r/a);switch(s.horAlignment){case StiHorAlignment.Left:return new RectangleD(e.right-o+(o-u)/2,e.y+(e.height-u)/2,u,u);case StiHorAlignment.Center:return new RectangleD(e.x+(e.width-u)/2,e.y+(e.height-u)/2,u,u);case StiHorAlignment.Right:return new RectangleD(e.x+(o-u)/2,e.y+(e.height-u)/2,u,u)}return e}static calculateTextRect(e,i,t){let r=t;if(null!=r){let t=StiElementConsts.Table.getHeight(e.font,e.zoom);switch(r.horAlignment){case StiHorAlignment.Left:i=new RectangleD(i.x,i.y,i.width-t,i.height);break;case StiHorAlignment.Right:i=new RectangleD(i.x+t,i.y,i.width-t,i.height);break}}return i.inflate(-2,-2),i}static getCellText(t,e,i){return StiTextFormatHelper.formatBasedOnColumnType(t,e,i)}},__.C.StiColorScaleCellPainter=class{static getScaleColor(e,i,r,t,l,n){let s=(r-i)/2,o=(e=Math.min(e,r),e=Math.max(e,i),0),a,u,S=t.cellBackColor;if(s<e){let t=r-s;u=0!=t?(o=(e-s)/t,a=Color.fromArgb3(255,S),Color.fromArgb3(255,n)):(a=Color.lightGray,Color.lightGray)}else{let t=s-i;u=0!=t?(o=e/t,a=Color.fromArgb3(255,l),Color.fromArgb3(255,S)):(a=Color.lightGray,Color.lightGray)}let m=(u.a-a.a)*o+a.a,h=(u.r-a.r)*o+a.r,c=(u.g-a.g)*o+a.g,d=(u.b-a.b)*o+a.b;return m=Math.min(m,255),h=Math.min(h,255),c=Math.min(c,255),d=Math.min(d,255),m=Math.max(m,0),h=Math.max(h,0),c=Math.max(c,0),d=Math.max(d,0),Color.fromArgb(Math.round(m),Math.round(h),Math.round(c),Math.round(d))}};let StiSvgGeomWriter=Stimulsoft.Report.Export.StiSvgGeomWriter,StiSvgHelper=Stimulsoft.Report.Export.StiSvgHelper,StiDataBarsDirection=(__.C.StiConditionIconPainter=class{static async drawIcon(h,c,d,g){if(!c||c.iconAlignment===StiIconAlignment.None)return;let t=c.customIcon;if(t){let m=StiImageHelper.getImageFromObject(t);if(m){let t=new RectangleD,e=(c.iconAlignment===StiIconAlignment.Left?t=new RectangleD(d.left,d.top,d.height,d.height):c.iconAlignment===StiIconAlignment.Right&&(t=new RectangleD(d.right-d.height,d.top,d.height,d.height)),m.width),i=m.height,r=t.width/e,l=t.height/i,n=Math.min(r,l),s=e*n,o=i*n,a=(t.width-s)/2,u=(t.height-o)/2,S=new RectangleD;S.x=t.x+a,S.y=t.y+u,S.width=s,S.height=o,S.inflate(-2*g,-2*g),h.drawImage(m,S)}}else{let t=new RectangleD,e=(c.iconAlignment===StiIconAlignment.Left?t=new RectangleD(d.left,d.top,d.height,d.height):c.iconAlignment===StiIconAlignment.Right&&(t=new RectangleD(d.right-d.height,d.top,d.height,d.height)),await StiFontIconsHelper.convertFontIconToImageAsync(c.icon,c.iconColor,t.width,t.height,"0.9em"));h.drawImage(e,t)}}static adjustCellContentRectWithIcon(t,e){if(e.iconAlignment===StiIconAlignment.Left)return new RectangleD(t.left+t.height,t.top,t.width-t.height,t.height);if(e.iconAlignment===StiIconAlignment.Right)return new RectangleD(t.left,t.top,t.width-t.height,t.height);return t}static async getImageWithConditionIcon(t,e,i){let r=t.iconAlignment===StiIconAlignment.Left?new RectangleD(e.x,e.y,e.height,e.height):new RectangleD(e.right-e.height,e.y,e.height,e.height),l=new XmlTextWriter(Encoding.UTF8),n=(l.indentation=-1,l.writeStartElement("svg"),l.writeAttributeString("version","1.1"),l.writeAttributeString("baseProfile","full"),l.writeAttributeString("xmlns","http://www.w3.org/2000/svg"),l.writeAttributeString("xmlns:xlink","http://www.w3.org/1999/xlink"),l.writeAttributeString("xmlns:ev","http://www.w3.org/2001/xml-events"),l.writeAttributeString("height",StiSvgHelper.toUnits(r.height)),l.writeAttributeString("width",StiSvgHelper.toUnits(r.width)),l.writeStartElement("rect"),l.writeAttributeString("x","0"),l.writeAttributeString("y","0"),l.writeAttributeString("width",StiSvgHelper.toUnits(r.width)),l.writeAttributeString("height",StiSvgHelper.toUnits(r.height)),l.writeAttributeString("style",StiSvgHelper.writeFillBrush(l,t.backColor,r)),l.writeEndElement(),new StiSvgGeomWriter(l)),s=(await this.drawIcon(n,t,new RectangleD(0,0,r.width,r.height),1),l.writeFullEndElement(),l.flush(),new StiImage(r)),o=(s.name=i+`_ConditionIcon`,l.textWriter.getStringBuilder().toString());return s.image=StiImageConverter.stringToImage(Stimulsoft.System.Convert.toBase64String(o)),s}},__.K.StiDataBarsDirection),StiDataBarsBrushType=__.K.StiDataBarsBrushType,StiGradientBrush=Stimulsoft.Base.Drawing.StiGradientBrush,IStiControlElement=(__.C.StiDataBarsCellPainter=class{static async draw(t,e,i,r,l,n,s,o,a,u,S,m,h=!0,c=StiDataBarsDirection.LeftToRight,d=StiDataBarsBrushType.Solid){let g=await StiTableElementConditionHelper.getIconCondition(n.key,i,r,l),p=(null!=g&&g.iconAlignment!=StiIconAlignment.None&&(await __.C.StiConditionIconPainter.drawIcon(t,g,e,s),e=__.C.StiConditionIconPainter.adjustCellContentRectWithIcon(e,g)),StiTextFormatHelper.formatBasedOnColumnType(i,n,o));await this.draw2(t,e,o,a,u,s,p,i,r,l,n,S,m,h,c,d)}static async draw2(l,t,n,e,i,r,s,o,a,u,S,m,h,c=!0,d=StiDataBarsDirection.LeftToRight,g=StiDataBarsBrushType.Solid){if(null==n||0==n)return;let p=S,C=(StiString.isNullOrWhiteSpace(p.minimum)||(e=StiValueHelper.tryToNumber(StiReportParser.parse2(p.minimum,o.report))),StiString.isNullOrWhiteSpace(p.maximum)||(i=StiValueHelper.tryToNumber(StiReportParser.parse2(p.maximum,o.report))),e=Math.min(e,0),!1),b=((i=Math.max(i,0))<n&&(C=!0,n=i),n<e&&(C=!0,n=e),S.horAlignment),w=t,f=(w.inflate(-2,-2),this.calculateTextRect(w,S)),y=(w=this.calculateDataBarsRect(w,S),StiDashboardStyleHelper.getTableStyle(o)),M=this.getColorPositive(y,p),I=this.getNegativeColor(y,p),T=this.getOverlappedColor(y,p),x=this.getFillColor(y,p),D=this.getForeColor(o,S,y,m,h),F=(c&&l.drawString(s,o.font,D,f,null),b!=StiHorAlignment.Center&&l.fillRectangle(w,x),i+Math.abs(e)),A=w.width*Math.abs(e)/F,v=w.width*n/F,E=w.width*Math.abs(n)/F,R=0;if(d==StiDataBarsDirection.LeftToRight?w.x+=n<0?A-E:A:(R=180,w.x=n<0?w.right-A:w.right-A-E),w.width=E,n<0&&(R+=180),0<w.width&&0<w.height){if(g==StiDataBarsBrushType.Gradient){let r;if(r=d==StiDataBarsDirection.LeftToRight?0<n?new RectangleD(t.left+A,t.top,v,t.height):new RectangleD(t.left,t.top,A,t.height):n<0?new RectangleD(t.left+v,t.top,A,t.height):new RectangleD(t.left,t.top,v,t.height),0<w.width&&w.width<1&&(w.width=1),0<r.width&&r.width<1&&(r.width=1),0<r.width&&0<w.width){let t=n<0?I:M,e=StiColorUtils.light(t,200),i=(r.x-=.1*r.width,r.width+=.2*r.width,new StiGradientBrush(t,e,R));l.fillRectangle(w,i)}}else{let t=n<0?I:M;t=await StiTableElementConditionHelper.processForeColor(t,S.key,o,a,u),l.fillRectangle(w,t)}if(C){let t=0<=n?new RectangleD(w.right-6*r,w.y,6*r,w.height):new RectangleD(w.x,w.y,6*r,w.height);l.fillRectangle(t,T)}b==StiHorAlignment.Center&&l.drawString(s,o.font,Color.white,f,null)}}static getOverlappedColor(t,e){return e.overlappedColor.equals(Color.transparent)?t.cellDataBarsOverlapped:e.overlappedColor}static getColorPositive(t,e){return e.positiveColor.equals(Color.transparent)?t.cellDataBarsPositive:e.positiveColor}static getNegativeColor(t,e){return e.negativeColor.equals(Color.transparent)?t.cellDataBarsNegative:e.negativeColor}static getFillColor(t,e){return e.fillColor.equals(Color.transparent)?Color.fromArgb3(40,t.cellDataBarsPositive):e.fillColor}static getForeColor(t,e,i,r,l){if(!Color.transparent.equals(e.foreColor))return e.foreColor;if(!Color.transparent.equals(t.foreColor))return t.foreColor;if(r)return i.alternatingCellForeColor;return l?null!=i?i.selectedCellForeColor:StiElementConsts.Table.Font.Color:null!=i?i.cellForeColor:StiElementConsts.Table.Font.Color}static calculateDataBarsRect(t,e){let i=e;if(null==i)return t;switch(i.horAlignment){case StiHorAlignment.Left:return new RectangleD(t.right-t.width/2,t.y,t.width/2,t.height);case StiHorAlignment.Right:return new RectangleD(t.x,t.y,t.width/2,t.height)}return t}static calculateTextRect(t,e){let i=e;if(null!=i)switch(i.horAlignment){case StiHorAlignment.Left:t=new RectangleD(t.x,t.y,t.width/2,t.height);break;case StiHorAlignment.Right:t=new RectangleD(t.right-t.width/2,t.y,t.width/2,t.height);break}return t.inflate(-2,-2),t}},__.C.StiSparklinesCellPainter=class{static draw(t,e,i,r,l){}static castToArray(t){return StiArray.isArray(t)?t:null}},__.C.StiTableColumnSizeHelper=class{getUniqueCode(){let t=0;return t=397*(t=397*(t=397*(t=397*t^this.width)^this.minWidth)^this.maxWidth)^this.wordWrap[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}getColumnWidth(t,e=!1){if(0!=this.width&&!e)return this.width;if(!this.isMeasurable)return t;return t<this.minWidth&&(t=this.minWidth),t=0!=this.maxWidth&&t>this.maxWidth?this.maxWidth:t}getColumnHeight(t){if(!this.isMeasurable)return t;if(this.maxHeight<t)return this.maxHeight;return t}static isWordWrap(t){let e=t.as(IStiTableColumnSize);if(null==(null==e?void 0:e.size))return!1;return e.size.wordWrap}constructor(t,e){this.width=0,this.minWidth=30,this.maxWidth=300,this.maxHeight=0,this.wordWrap=!1,this.fontUniqueCode=0,this.isMeasurable=!1;let i=(this.column=e).as(IStiTableColumnSize);if(null==(null==i?void 0:i.size))return;this.isMeasurable=!0,this.fontUniqueCode=t.getHashCode();let r=i.size;this.width=r.width,this.minWidth=r.minWidth,this.maxWidth=r.maxWidth,this.maxHeight=r.wordWrap?Number.MAX_VALUE:Math.round(t.getHeight())+1,this.wordWrap=r.wordWrap}},Stimulsoft.Report.Dashboard.IStiControlElement),StiLocHelper=__.p.StiLocHelper,StiComboBoxHelper=__.S.StiComboBoxHelper;{class ko0 extends __.z.StiElementExportTool{async render(r,l,n,t){var i,e,s,o;if(0==r.getMeters().length)return;let a=await StiElementDataCache.tryToGetOrCreate(r);if(null==a)return;let u=t.is(StiSvgDashboardExportSettings)&&t.designMode,S=r.as(StiComboBoxElement),m=ko0.getNameMeterIndex(a),h=ko0.getKeyMeterIndex(a),c=u&&null!=S&&!StiString.isNullOrEmpty(S.initialValue),d=StiExportTool.isAllowOpacity(t),g=new Hashtable;if(1<a.meters.countItems)for(let e of a.rows){let t=null==(i=e[1])?void 0:i[Stimulsoft.System.StiObject.stimulsoft]().toString();StiString.isNullOrWhiteSpace(t)||g.set(t,e[0])}let p=r,C=r,b="";if(p.selectionMode==StiItemSelectionMode.One)if(C.userFilters.any())b=C.userFilters[0].value,b=null!=(e=g.get(b))?e:b;else if(p.showAllValue)b=StiLocHelper.locAll;else{let t=a.rows.firstOrDefault();null!=t&&0<t.length&&null!=t[0]&&(b=t[0].toString())}if(c)if(S.initialValue.includes(";"))b=S.initialValue;else{let t=ko0.getRow(S,a,h);if(null==t)return;let e=-1!=m?t[m]:null,i=-1!=h?t[h]:null;null==e&&null==i||(b=(e||i).toString())}if(this.renderElement(l,r,n,this.format(r.as(IStiControlElement),b),d),p.selectionMode==StiItemSelectionMode.Multi&&!c){let e=n;if(C.userFilters.any()){let i=C.userFilters;if(i.all(t=>t.condition==StiDataFilterCondition.NotEqualTo)){i=new List;for(let t of a.rows){let e=null==(s=t[1])?void 0:s[Stimulsoft.System.StiObject.stimulsoft]().toString();if(C.userFilters.any(t=>t.value==e))continue;i.add(new StiDataFilterRule(null,null,StiDataFilterCondition.EqualTo,e))}}for(let t of i){if(!(e.x+e.width<=n.x+n.width)){while(1<l.components.count)l.components.removeAt(1);this.renderItem(l,r,n,StiString.format(Loc.get("Dashboard","NSelected"),C.userFilters.length));break}(e=this.renderItem(l,r,e,this.format(r.as(IStiControlElement),null!=(o=g.get(t.value))?o:t.value))).x+=e.width+4}}else if(p.showAllValue)this.renderItem(l,r,n,StiLocHelper.locAll);else{let t=this.getValuesCount(r,a);this.renderItem(l,r,n,StiString.format(Loc.get("Dashboard","NSelected"),t))}}}getValuesCount(t,e){let i=t.as(StiComboBoxElement),r=StiComboBoxHelper.fetchItems(i,e,i.showBlanks);return null!=r?r.length:0}renderElement(t,e,i,r,l){let n=StiDashboardStyleHelper.getForeColor(e),s=StiDashboardStyleHelper.getBackColor(e,null,l),o=new StiText(i);o.name=e.name+`_ComboBox`,o.allowHtmlTags=!0,o.vertAlignment=StiVertAlignment.Center,o.horAlignment=StiTextHorAlignment.Left,o.textBrush=new StiSolidBrush(n),o.brush=new StiSolidBrush(s),o.text=this.format(e.as(IStiControlElement),r),o.font=StiDashboardStyleHelper.getFont(e),t.components.add(o)}renderItem(t,e,i,r){let l=StiDashboardStyleHelper.getControlStyle(e),n=new StiText,s=(n.name=e.name+`_ComboBoxItem`,n.allowHtmlTags=!0,n.vertAlignment=StiVertAlignment.Center,n.horAlignment=StiTextHorAlignment.Center,n.textBrush=new StiSolidBrush(l.selectedForeColor),n.brush=new StiSolidBrush(l.selectedBackColor),n.text=this.format(e.as(IStiControlElement),r),n.font=StiDashboardStyleHelper.getFont(e),t.components.add(n),Graphics.measureString(r,n.font));return n.clientRectangle=new Rectangle(i.x,i.y,s.width+4,i.height)}static getNameMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>"StiNameComboBoxMeter"==t[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName());return null!=e?t.meters.indexOf(e):-1}static getKeyMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>"StiKeyComboBoxMeter"==t[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName());return null!=e?t.meters.indexOf(e):-1}static getRow(i,t,r){if(StiString.isNullOrEmpty(i.initialValue)||-1==r)return t.rows.firstOrDefault();return t.rows.firstOrDefault(t=>{var e;return(null==(e=t[r])?void 0:e.toString())==i.initialValue})}}__.z.StiComboBoxElementExportTool=ko0}let StiDatePickerHelper=__.Q.StiDatePickerHelper,StiListBoxHelper=(__.z.StiDatePickerElementExportTool=class extends __.z.StiElementExportTool{async render(e,i,r,t){let l,n=e;if(null==n.getValueMeter())return;let s=await StiElementDataCache.tryToGetOrCreate(e),o=StiDashboardStyleHelper.getForeColor(e),a=StiDashboardStyleHelper.getBackColor(e);this.storedCulture=null;try{let t=null==(l=e.report)?void 0:l.getParsedCulture();StiString.isNullOrWhiteSpace(t)||(this.storedCulture=CultureInfo.currentCulture,CultureInfo.currentCulture=new CultureInfo(t))}finally{let t=new StiText(r);t.name=e.name+`_Content`,t.allowHtmlTags=!0,t.vertAlignment=StiVertAlignment.Center,t.textBrush=new StiSolidBrush(o),t.brush=new StiSolidBrush(a),t.text=this.getDateTimeString(n,s),t.font=StiDashboardStyleHelper.getFont(n),i.components.add(t),null!=this.storedCulture&&(CultureInfo.currentCulture=this.storedCulture)}}getDateTimeString(i,t){let e,r,l=StiDatePickerHelper.getDefaultValue(i);if(StiVariableExpressionHelper.isVariableSpecifiedAsExpression(i,null==(e=null==i?void 0:i.valueMeter)?void 0:e.expression)){let t=null==(r=StiDatePickerHelper.getVariableSpecifiedAsValue(i))?void 0:r.as(StiVariable);if(Range.isRangeType(null==t?void 0:t.type)&&i.initialRangeSelectionSource==StiInitialDateRangeSelectionSource.Selection){let t={ref:null},e={ref:null};return StiDatePickerHelper.calculateRangeFromInitial(i.initialRangeSelection,t,e),this.getRangeVariableString(i,new DateTimeRange(t.ref,e.ref))}return null!=l&&l[Stimulsoft.System.StiObject.stimulsoft]().is(DateTimeRange)?this.getRangeVariableString(i,l):this.format(i,l)}if(i.userFilters.any()){let t=this.format(i,i.userFilters[0].value);return i.selectionMode!=StiDateSelectionMode.AutoRange&&i.selectionMode!=StiDateSelectionMode.Range||(t+=` - `+this.format(i,i.userFilters[0].value2)),t}return i.selectionMode==StiDateSelectionMode.AutoRange?this.getAutoRangeColumnString(i,t):i.selectionMode==StiDateSelectionMode.Range?this.getRangeColumnString(i):this.format(i,l)}getRangeVariableString(t,e){let i=null==e?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().as(DateTimeRange);return this.format(t,null==i?void 0:i.fromObject)+` - `+this.format(t,null==i?void 0:i.toObject)}getAutoRangeColumnString(i,t){if(null==t)return"";let r=t.rows.select(t=>t[0]).where(t=>null!=t&&t instanceof DateTime);if(r.any()){let t=r.where(t=>t instanceof DateTime).cast().min(),e=r.where(t=>t instanceof DateTime).cast().max();return this.format(i,t)+` - `+this.format(i,e)}return""}getRangeColumnString(t){let e={ref:null},i={ref:null};return StiDatePickerHelper.calculateRangeFromInitial(t.initialRangeSelection,e,i),this.format(t,e.ref)+` - `+this.format(t,i.ref)}},__.P.StiListBoxHelper),StiCheckBox=Stimulsoft.Report.Components.StiCheckBox,StiCheckStyle=Stimulsoft.Report.Components.StiCheckStyle,IStiShape=Stimulsoft.Report.Components.IStiShape;{class bq0 extends __.z.StiElementExportTool{async render(t,l,e,i){if(this.renderEmptyDataMessage(t,l,e.clone(),i))return;let n=l.report,s=l.page,o=t.as(StiListBoxElement),a=l.clone(!0,!1),r=(i.renderSinglePage||(e.height=Number.MAX_VALUE),StiExportTool.isAllowOpacity(i)),u=StiExportTool.getScaleFactor(l,i),S=(await this.renderItems(a,e.clone(),t,r,u),0),m=l.top;0<a.components.count&&(m+=a.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top));while(1){let t=a.getComponentsList(),r=0;for(let i of t){let t=i.bottom,e=i.left;i.is(IStiShape)&&(t+=StiElementConsts.ListBox.ItemHeight/3),null!=o?(o.orientation==StiItemOrientation.Vertical&&t<=l.height||o.orientation==StiItemOrientation.Horizontal&&e<=l.width||0==r)&&(a.components.remove(i),l.components.add(i)):t<=l.height&&(a.components.remove(i),l.components.add(i)),r++}if(i.renderSinglePage||0==a.components.count)break;let e=a.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top);a.getComponentsList().forEach(t=>t.top=t.top-e+1),n.renderedPages.count<=++S&&n.renderedPages.add(s.clone(!0,!1)),s=n.renderedPages.getByIndex(S),l=l.clone(!0,!1),i.renderSingleElement?(l.top=0,l.left=0):l.top=m,s.components.add(l)}for(let t of l.report.renderedPages.list)t.getComponentsList().forEach(t=>{t.report=n,t.page=s})}static getCheckStyle(t,e){let i=t,r=t.is(StiListBoxElement)&&t.as(StiListBoxElement).selectionMode==StiItemSelectionMode.One&&t.as(StiListBoxElement).selectionType==StiListBoxSelectionType.RadioButton,l=r?StiCheckStyle.DotCircle:StiCheckStyle.CheckRectangle,n=r?StiCheckStyle.NoneCircle:StiCheckStyle.NoneRectangle;if(!i.userFilters.any())return r?n:l;if(i.userFilters.any(t=>t.condition==StiDataFilterCondition.IsFalse))return n;if(i.userFilters.any(t=>t.condition==StiDataFilterCondition.EqualTo&&t.value==(null==e?void 0:e.toString())))return l;return n}async renderItems(r,l,n,s,o){let t=await StiElementDataCache.tryToGetOrCreate(n);if(null==t)return;let e=n,a=StiListBoxHelper.fetchItems(e,t,e.showBlanks);if(null!=a){let t=a.select(t=>null==t?"":null==t.label&&null!=t.value&&t.value instanceof DateTime?t.value.toShortDateString():t.toString()),e=a.select(t=>bq0.getCheckStyle(n,t)),i=a.select(t=>!1);this.renderItems2(r,l.clone(),n,t,e,i,s,o)}}renderItems2(l,n,s,o,a,u,S,m){let h=s,c=h.selectionMode==StiItemSelectionMode.Multi,d=h.selectionMode==StiItemSelectionMode.One&&s.is(StiListBoxElement)&&s.as(StiListBoxElement).selectionType==StiListBoxSelectionType.RadioButton,g=c||d,p=s.is(IStiListBoxElement)&&s.orientation==StiItemOrientation.Horizontal,C=s,b=StiDashboardStyleHelper.getFont(s),w=(b=null!=b?StiFontUtils.changeFontSize(b,b.size*m):new Font("Arial",8),p?this.getHorizontalItemAutoWidth(h,b,o,n.width,g):n.width),f=p?n.height:StiElementConsts.ListBox.ItemHeight,y=n.x,M=n.y;if(h.showAllValue){p&&0==w&&(w=this.measureItemWidth(StiLocHelper.locAll,b,g));let t=new Rectangle(y,M,w,f),e=d?StiCheckStyle.DotCircle:StiCheckStyle.CheckRectangle;C.userFilters.any()&&(e=d?StiCheckStyle.NoneCircle:C.userFilters.any(t=>t.condition==StiDataFilterCondition.IsFalse)?StiCheckStyle.NoneRectangle:StiCheckStyle.DotRectangle),this.renderItem(l,t,s,StiLocHelper.locAll,e,p?StiBorderSides.Right:StiBorderSides.Bottom,c,d,!1,S,m),p?y+=w+1:M+=f+1}if(null!=o){let r=0;for(let i=0;i<o.count2();i++){p&&0==w&&(w=this.measureItemWidth(o[i],b,g));let t=new Rectangle(y+r,M,w-r,f),e=a[i];if(!d||C.userFilters.any()||h.showAllValue||0!=i||(e=StiCheckStyle.DotCircle),this.renderItem(l,t,s,o[i],e,StiBorderSides.None,c,d,u[i],S,m),u[i]&&(r+=StiElementConsts.ListBox.CheckBoxWidth),p?y+=w+1:M+=f+1,p&&y>=n.right||!p&&M>=n.bottom)break}}}getHorizontalItemAutoWidth(t,e,i,r,l){let n=0,s=0;if(null!=i)while(n<r&&s<i.length)n+=this.measureItemWidth(i[s],e,l),s++;return t.showAllValue&&(this.measureItemWidth(StiLocHelper.locAll,e,l),s++),n<r&&0<s?r/s:0}measureItemWidth(t,e,i){let r=StiElementConsts.Table.Font.getGdiFont(1,null,e),l=Graphics.measureString(t,r,1e6),n=l.width;return i&&(n+=StiElementConsts.ListBox.CheckBoxWidth),n}renderItem(e,i,r,t,l,n,s,o,a,u,S){if(s||o){let t=r.is(IStiListBoxElement)&&r.orientation==StiItemOrientation.Horizontal;bq0.renderCheckControl(e,i.clone(),r,l,t?StiBorderSides.None:n,o,u,S),i.x+=StiElementConsts.ListBox.CheckBoxWidth*S,i.width-=StiElementConsts.ListBox.CheckBoxWidth*S}let m=StiDashboardStyleHelper.getForeColor(r),h=StiDashboardStyleHelper.getBackColor(r,null,u),c=StiDashboardStyleHelper.getFont(r),d=(c=null!=c?StiFontUtils.changeFontSize(c,c.size*S):new Font("Arial",8),this.format(r.as(IStiControlElement),t)),g=new StiText(i),p=(g.name=r.name+`_Item`,g.allowHtmlTags=!0,g.margins=s||o?new StiMargins(1,0,0,0):StiMargins.empty,g.border=n!=StiBorderSides.None?new StiBorder(n,Color.gray,1,StiPenStyle.Solid):new StiBorder(StiBorderSides.None,Color.transparent,0,StiPenStyle.None),g.brush=new StiSolidBrush(h),g.horAlignment=StiTextHorAlignment.Left,g.vertAlignment=StiVertAlignment.Center,g.text=d,g.textBrush=new StiSolidBrush(m),g.wordWrap=!1,g.font=c,r.as(IStiControlElement));null==p||p.textFormat.is(StiGeneralFormatService)||(g.excelDataValue=d),e.components.add(g)}static renderCheckControl(t,e,i,r,l,n,s,o){let a=StiDashboardStyleHelper.getForeColor(i),u=StiDashboardStyleHelper.getBackColor(i,null,s),S=(e=new Rectangle(e.x,e.y,StiElementConsts.ListBox.CheckBoxWidth*o,e.height),new StiCheckBox(e));S.name=i.name+`_ItemCheckBox`,S.border=l!=StiBorderSides.None?new StiBorder(l,Color.gray,1,StiPenStyle.Solid):new StiBorder(StiBorderSides.None,Color.transparent,0,StiPenStyle.None),S.contourColor=Color.transparent,S.textBrush=new StiSolidBrush(a),S.brush=new StiSolidBrush(u),S.checkStyleForTrue=r,S.checkStyleForFalse=n?StiCheckStyle.NoneCircle:StiCheckStyle.NoneRectangle,S.checkedValue=r!=StiCheckStyle.NoneRectangle&&r!=StiCheckStyle.NoneCircle,t.components.add(S)}}__.z.StiListBoxElementExportTool=bq0}let StiVerticalLinePrimitive=Stimulsoft.Report.Components.StiVerticalLinePrimitive,StiFlowchartSortShapeType=Stimulsoft.Report.Components.StiFlowchartSortShapeType;{class hs0 extends __.z.StiElementExportTool{async render(t,l,n,e){let s=t.as(StiNumberBoxElement);if(null==s.getValueMeter())return;let o=n.height+2*n.y,a=__.z.StiExportTool.isAllowOpacity(e),u=await StiNumberBoxHelper.getInitialValue(s);if(u[Stimulsoft.System.StiObject.stimulsoft]().getType()==Stimulsoft.Report.DecimalRange){let t=new Rectangle(n.x,n.y,n.width/2,n.height),e=1,i=new Rectangle(t.right,o/4,e,o/2),r=new Rectangle(t.right,n.y,n.width/2,n.height);this.paintItem(l,s,t,u.from,a),this.paintSeparator(l,s,i),this.paintItem(l,s,r,u.to,a)}else if(Stimulsoft.System.Type.isNumericType(Stimulsoft.System.Type.getType(u))){let t=u,e=10,i=new Rectangle(n.right-e-3,o/3,e,o/3);this.paintItem(l,s,n,t,a),this.paintNavButtons(l,s,i)}}paintItem(t,e,i,r,l){let n=StiDashboardStyleHelper.getForeColor(e),s=StiDashboardStyleHelper.getBackColor(e,null,l),o=new StiText(i);o.name=e.name+`_NumberBox`,o.allowHtmlTags=!0,o.vertAlignment=StiVertAlignment.Center,o.horAlignment=Enum.parse(StiTextHorAlignment,Enum.getName(StiHorAlignment,e.horAlignment)),o.textBrush=new StiSolidBrush(n),o.brush=new StiSolidBrush(s),o.text=hs0.formatValue(e,r),o.font=StiDashboardStyleHelper.getFont(e),t.components.add(o)}paintSeparator(t,e,i){let r=new StiVerticalLinePrimitive(i);r.name=e.name+`_NumberBoxSep`,r.color=hs0.getSeparatorColor(e),t.components.add(r)}paintNavButtons(t,e,i){let r=new StiShape(i);r.name=e.name+`_NumberBoxButtons`,r.shapeType=new StiFlowchartSortShapeType,r.borderColor=StiDashboardStyleHelper.getForeColor(e),t.components.add(r)}static formatValue(t,e){return t.textFormat.format(e)}static getSeparatorColor(t){return StiDashboardStyleHelper.getSeparatorColor(t)}}__.z.StiNumberBoxElementExportTool=hs0}let StiOnlineMapHelper=__.h.StiOnlineMapHelper,StiMapMode=Stimulsoft.Report.Maps.StiMapMode,StiDockStyle=(__.z.StiOnlineMapElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){var l,n,s;if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;let o=await StiElementDataCache.tryToGetOrCreate(t),a=StiOnlineMapHelper.calculateMapData(o,t),u=t,S=new StiMap;S.stretch=!0,S.page=u.page,S.dataTable=o,e.report.dictionary=u.report.dictionary,S.latitude=null==(l=u.latitude)?void 0:l.expression,S.longitude=null==(n=u.longitude)?void 0:n.expression,S.mapMode=StiMapMode.Online,S.pushPins=JSON.stringify(null==(s=a.pushpins)?void 0:s.map(t=>`pp=${t.lat},${t.lon};60`)),S.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t,null,r.is(StiSvgDashboardExportSettings)||r.is(StiHtmlDashboardExportSettings))),S.left=i.left,S.top=i.top,S.width=i.width,S.height=i.height,e.components.add(S)}},__.z.StiPanelElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){let l=StiDashboardStyleHelper.getBackColor(t),n=new StiContainer(i);n.name=t.name+`_Content`,n.brush=new StiSolidBrush(l),e.components.add(n)}},Stimulsoft.Report.Components.StiDockStyle),StiCrossTabBuilder=Stimulsoft.Report.Engine.StiCrossTabBuilder,StiCrossTabParams=Stimulsoft.Report.CrossTab.StiCrossTabParams,StiPivotTableHelper=__.h.StiPivotTableHelper;{class gt0 extends __.z.StiElementExportTool{async render(l,n,s,o){if(this.renderEmptyDataMessage(l,n,s.clone(),o))return;let a=n.report,e=l.as(StiPivotTableElement),u=n.page,i=o.is(StiSvgDashboardExportSettings)&&o.designMode,t=StiExportSettingsHelper.isDataExport(o),S=StiExportTool.getScaleFactor(n,o),m=null,r=1!=StiScale.factor||1!=S,h=null==(m=r?m:StiPivotTableToCrossTabCache.get(e));if(h||r){let t=await StiElementDataCache.tryToGetOrCreate(e);null==t&&(t=new StiDataTable),m=await StiPivotTableHelper.convertToCrossTab(e,t,S),r||(StiPivotTableToCrossTabCache.put(e,m),StiPivotToConvertedStateCache.putFalse(e))}StiPivotTableHelper.applyStyle(e,m,t),i&&(gt0.renderForWebDesigner(m,e),StiPivotTableToCrossTabCache.remove(e)),gt0.convertSizes(e,m,!r);let c=m.crossTabInfo.cross,d=c.widths[Stimulsoft.System.StiObject.stimulsoft]().toList().sum(),g=c.heights[Stimulsoft.System.StiObject.stimulsoft]().toList().sum();if(d<=s.width&&g<=s.height||i||o.renderSinglePage){StiBorderExportHelper.render(l,n,o),StiBackColorExportHelper.render(l,n);let t=await StiTitleExportHelper.render(l,n,o);t=StiLayoutExportHelper.excludePadding(l,t,S),t=StiLayoutExportHelper.excludeCornerRadius(l,t,S),gt0.renderCells(n,t,t,null,m,i)}else if(o.is(StiExcelDashboardExportSettings)){!o.renderSingleElement&&0!=a.renderedPages.getByIndex(0).components.count||a.renderedPages.removeAt(0),u=new StiPage;let t=new StiPanel,e=(t.name=l.name,t.clientRectangle=new Rectangle(0,0,d,g),u.components.add(t),a.renderedPages.add(u),StiBorderExportHelper.render(l,t,o),StiBackColorExportHelper.render(l,t),await StiTitleExportHelper.render(l,t,o)),i=(a.renderedPages.remove(u),2*d-e.width+e.left+1),r=2*g-e.height+e.top+1;(u=new StiPage).width=i,u.height=r,(t=new StiPanel).name=l.name,t.clientRectangle=new Rectangle(0,0,i,r),u.components.add(t),a.renderedPages.add(u),StiBorderExportHelper.render(l,t,o),StiBackColorExportHelper.render(l,t),e=await StiTitleExportHelper.render(l,t,o),u.unlimitedHeight=!0,gt0.renderCells(t,e,e,null,m,!1)}else{let r=u.clone(!0,!1),t=(a.renderedPages.add(r),n.clone(!0,!1)),e=(t.left=0,t.top=0,t.width=r.width,t.height=r.height,s=new Rectangle(0,0,r.width,r.height),r.components.add(t),n=t,!o.renderSingleElement&&0!=a.renderedPages.getByIndex(0).components.count||a.renderedPages.removeAt(0),StiBorderExportHelper.render(l,n,o),StiBackColorExportHelper.render(l,n),await StiTitleExportHelper.render(l,n,o)),i=(e=StiLayoutExportHelper.excludePadding(l,e,S),e=StiLayoutExportHelper.excludeCornerRadius(l,e,S),new Rectangle(e.left,e.top,e.width+d,e.height+g));u.unlimitedHeight=!0,gt0.renderCells(n,i,e,null,m,!1);for(let i=0;i<r.segmentPerWidth;i++)for(let e=0;e<r.segmentPerHeight;e++)if(0!=i||0!=e){let t=n.clone(!0,!1);t.left=i*u.width,t.top=e*u.height,t.width=u.width,t.height=u.height,r.components.insert(0,t),StiBorderExportHelper.render(l,t,o),StiBackColorExportHelper.render(l,t),await StiTitleExportHelper.render(l,t,o)}}for(let t of n.report.renderedPages.list)t.getComponentsList().forEach(t=>{t.report=a,t.page=u})}static renderForWebDesigner(t,e){let i=e.columns.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,e.report)).toList(),r=e.rows.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,e.report)).toList(),l=e.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,e.report)).toList();if(!(1<i.length||1<r.length))return;let n=t.crossTabInfo.cross.cells,s=0,o=new List,a=new List,u=null,S=null,m=e.summaryDirection==StiSummaryDirection.LeftToRight?l.length:1,h=e.summaryDirection==StiSummaryDirection.UpToDown?l.length:1,c=StiPivotTableHelper.getHeadersBounds(n);for(let i=0;i<n.length;i++){let e=n[i][0];for(e.cellType==StiCellType.LeftTopLineMain&&((u=new ht0).cell=e,u.x=i,u.width=e.width),e.cellType==StiCellType.RightTopLineMain&&((S=new ht0).cell=e,S.x=i),s=0;s<n[i].length;s++)if((e=n[i][s]).cellType==StiCellType.CornerColMain||e.cellType==StiCellType.CornerRowMain){let t=new ht0;t.cell=e,t.x=i,t.y=s,t.width=e.width,t.height=e.height,o.add(t)}}if(-1<c.top){let l=-1;for(let r=0;r<n.length;r++){let i=n[r][c.top];if(i.cellType==StiCellType.HeaderColMain||i.cellType==StiCellType.HeaderColTotalMain){l=-1==l?r:l;let t=c.bottom-c.top+(1<m?0:1),e=new ht0;if(e.cell=i,e.x=l,e.y=c.top,e.height=t,e.width=m,o.add(e),i.text=(1<t&&i.cellType!=StiCellType.HeaderColTotalMain?"> ":"")+i.text,a.add(r+i.width-1),1<m)for(let e=r+i.width-m;e<r+i.width;e++){let t=new ht0;t.cell=n[e][c.bottom],t.x=l,t.y=c.bottom,o.add(t),a.add(e),l++}else l++}}}if(-1<c.left){let r=-1;for(s=0;s<n[0].length;s++){let i=n[0][s];if(i.cellType==StiCellType.HeaderRowMain||i.cellType==StiCellType.HeaderRowTotalMain){r=-1==r?s:r;let t=c.right+(1<h?0:1),e=new ht0;if(e.cell=i,e.x=0,e.y=r,e.height=h,e.width=t,e.cellRow=1==h?s+i.height-1:-1,o.add(e),i.text=(1<t&&i.cellType!=StiCellType.HeaderRowTotalMain?"> ":"")+i.text,1<h)for(let e=s+i.height-h;e<s+i.height;e++){let t=new ht0;t.cell=n[c.right][e],t.x=c.right,t.y=r,t.cellRow=e,o.add(t),r++}else r++}}}null!=u&&(u.width=c.right-c.left+1,o.add(u)),null!=S&&(S.width=o.max(t=>t.x)-c.right,o.add(S));let d=StiDashboardStyleHelper.getPivotTableStyle(e),g=o.max(t=>t.y)+1,p=o.max(t=>t.x)+1,C=StiArray.create2(StiCell,p,g);for(let r of o)if(C[r.x][r.y]=r.cell,r.cell.width=r.width,r.cell.height=r.height,0<=r.cellRow)for(s=r.y;s<r.y+r.height;s++){let i=c.right+1;for(let t=r.width;t<n.length;t++)if(0<=a.indexOf(t)){C[i++][s]=n[t][r.cellRow+s-r.y],C[i-1][s].field.border.side=t==n.length-1?StiBorderSides.None:StiBorderSides.Right;let e=C[i-1][s];if(null!=e&&null!=e.field&&e.field.brush.is(StiSolidBrush)){let t=e.field.brush.color;(t.equals(d.alternatingCellBackColor)||t.equals(d.cellBackColor))&&(e.field.brush=new StiSolidBrush(s%2!=0?d.alternatingCellBackColor:d.cellBackColor),e.field.textBrush=new StiSolidBrush(s%2!=0?d.alternatingCellForeColor:d.cellForeColor))}null!=e&&null!=e.field&&(e.field.brush=null!=e.field.conditionBrush?e.field.conditionBrush:e.field.brush,e.field.textBrush=null!=e.field.conditionTextBrush?e.field.conditionTextBrush:e.field.textBrush)}}n=StiArray.create2(StiCell,p,0);for(let e=0;e<p;e++){n[e]=StiArray.create(StiCell,g);for(let t=0;t<g;t++)n[e][t]=null!=C[e][t]?C[e][t]:new StiCell,null!=n[e][t].field&&e==p-1&&(n[e][t].field.border.side|=StiBorderSides.Top),0<t&&(n[e][t].parentCell=n[e][t])}let b=StiArray.create(Number,g),w=StiArray.create(Number,p);StiArray.copy(t.crossTabInfo.cross.heights,0,b,g),StiArray.copy(t.crossTabInfo.cross.widths,0,w,p),t.crossTabInfo.cross.cells=n,t.crossTabInfo.cross.widths=w,t.crossTabInfo.cross.heights=b,t.crossTabInfo.cross.doAutoSize()}static renderCells(t,e,i,r,l,n){l.page.unlimitedHeight=!0,t.canBreak=!0,t.dockStyle=StiDockStyle.None;let s=new StiCrossTabParams,o=(s.startColumn=0,s.startRow=0,s.destinationContainer=t,s.destinationRectangle=i,s.forceNoBreak=n,new StiCrossTabBuilder);o.renderCrossTabUnlimitedBreakable(s,l,t,e.clone())}static convertSizes(t,e,i){let r=e.crossTabInfo.cross,l=t.report.unit;StiPivotToConvertedStateCache.isConverted(t)&&i||(this.convert(r.heights,l),this.convert(r.widths,l),this.convert(r.coordX,l),this.convert(r.coordY,l),i&&StiPivotToConvertedStateCache.putTrue(t))}static convert(e,i){for(let t=0;t<e.length;t++)e[t]=i.convertToHInches(e[t])}}__.z.StiPivotTableElementExportTool=gt0;class ht0{constructor(){this.x=0,this.y=0,this.width=1,this.height=1,this.cellRow=-1}}}__.z.StiRegionMapElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;let l=t,n=StiDashboardStyleHelper.getElementFontFromStyle(t,l.font),s=new StiMap;if(s.stretch=!0,s.page=l.page,s.mapType=l.mapType,s.dataFrom=l.dataFrom,s.language=l.language,s.mapStyle=StiDashboardStyleHelper.getMapStyleIdent(l),s.componentStyle=l.customStyleName,s.mapIdent=l.mapIdent,s.mapMode=StiMapMode.Choropleth,s.showValue=l.showValue,s.shortValue=l.shortValue,s.showZeros=l.showZeros,s.showBubble=l.showBubble,s.colorEach=l.colorEach,s.show3D=l.show3D,s.displayNameType=l.showName,s.colorDataColumn=null==l.colorMeter?"":l.colorMeter.expression,s.groupDataColumn=null==l.groupMeter?"":l.groupMeter.expression,s.valueDataColumn=null==l.valueMeter?"":l.valueMeter.expression,s.nameDataColumn=null==l.nameMeter?"":l.nameMeter.expression,s.keyDataColumn=null==l.keyMeter?"":l.keyMeter.expression,s.mapData=l.mapData,s.labels=new StiMapLabels(n,l.labels.foreColor,l.labels.shadowColor,l.labels.showShadow),s.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t,null,r.is(StiSvgDashboardExportSettings)||r.is(StiHtmlDashboardExportSettings))),s.left=i.left,s.top=i.top,s.width=i.width,s.height=i.height,s.valueFormat=l.valueFormat,l.dataFrom==StiMapSource.DataColumns){let t=await StiElementDataCache.tryToGetOrCreate(l);s.dataTable=t,e.report.dictionary=l.report.dictionary}e.components.add(s)}},__.z.StiShapeElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){let l=t.as(StiShapeElement),n=new StiShape;n.shapeType=l.shapeType,n.size=l.size,n.borderColor=l.stroke,n.brush=l.fill,n.page=l.page,n.left=i.left,n.top=i.top,n.width=i.width,n.height=i.height,e.components.add(n)}};let StiTableElementPagingHelper=Stimulsoft.Report.Dashboard.Helpers.StiTableElementPagingHelper,StiTableColumnVisibilityHelper=Stimulsoft.Report.Dashboard.StiTableColumnVisibilityHelper,StiBubbleCellPainter=__.C.StiBubbleCellPainter,StiSparklinesCellPainter=__.C.StiSparklinesCellPainter,StiSparkline=Stimulsoft.Report.Components.StiSparkline,StiSystemVariableObject=Stimulsoft.Data.Functions.StiSystemVariableObject,StiTableElementGdiPainter=__.q.StiTableElementGdiPainter,StiTableElementHelper=__.h.StiTableElementHelper,StiDataBarsCellPainter=__.C.StiDataBarsCellPainter,StiColorScaleCellPainter=__.C.StiColorScaleCellPainter,StiTextQuality=Stimulsoft.Report.Components.StiTextQuality,StiConditionIconPainter=__.C.StiConditionIconPainter;{class kv0 extends __.z.StiElementExportTool{async render(t,i,e,r){if(this.renderEmptyDataMessage(t,i,e.clone(),r))return;let l=i.report,n=i.page,s=r.is(StiSvgDashboardExportSettings)&&r.as(StiSvgDashboardExportSettings).designMode,o=t.as(StiTableElement),a=null==r?__.f.StiDashboardExportFormat.Document:r.format,u=r.renderSingleElement&&a==__.f.StiDashboardExportFormat.Excel,S=StiExportSettingsHelper.isDataExport(r),m=(delete o.cacheStyle,i.clone(!0,!1)),h=StiExportTool.getScaleFactor(i,r),c=(r.renderSinglePage||(e.height=Number.MAX_VALUE),await kv0.renderCells(m,e,o,h,a,S,s),u&&(e.width=m.components.toList().max(t=>t.right),e.height=m.components.toList().max(t=>t.bottom),i.width=i.page.width=e.width,i.height=i.page.height=e.height),0),d=i.top;0<m.components.count&&(d+=m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top));while(1){if(m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().where(t=>t.bottom<=i.height).toList().forEach(t=>{m.components.remove(t),(t.left<i.width||a==__.f.StiDashboardExportFormat.Data)&&(i.components.add(t),t.right>i.width)&&a!=__.f.StiDashboardExportFormat.Data&&(t.width=Math.max(0,i.width-t.left))}),r.renderSinglePage||0==m.components.count)break;let e=m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top);m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().forEach(t=>t.top=t.top-e+1),l.renderedPages.count<=++c&&l.renderedPages.add(n.clone(!0,!1)),n=l.renderedPages.getByIndex(c),i=i.clone(!0,!1),r.renderSingleElement?(i.top=0,i.left=0):i.top=d,n.components.add(i)}for(let t of i.report.renderedPages.list)t.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().forEach(t=>{t.report=l,t.page=n})}static async renderCellsForViewer(t,i,h){let c,d=t.as(StiTableElement);if(null==d)return null;let g=await StiElementDataCache.getOrCreate(d);if(null==g)return null;g=this.processDataTableWithTopN(g);let p=1,C=[],b=StiElementConsts.Table.getHeight(d.getDataFont(),p),w=g.meters.where(t=>t.is(StiTableColumn)).cast(),e=null!=w.firstOrDefault(t=>t.showTotalSummary),f=(delete d.cacheStyle,0),y=0<d.rowsPerPage,M=0,I=g.rows.length-1;if(y){let t=null!=i&&null!=i[d.key]?i[d.key]:1,e=Math.ceil(g.rows.length/d.rowsPerPage);t>e&&(t=e),M=(t-1)*d.rowsPerPage,I=Math.min(t*d.rowsPerPage-1,g.rows.length-1)}for(let m of w){m.cache={};let t=await this.getColumnVisibilityState(m,d.report);if(!t){f++;continue}let s=kv0.measureHeader(d,m,p);if(m.is(StiSparklinesColumn))s=kv0.measureSparklinesCell(p,s);else{for(let r=M;r<=I;r++){let t=g.rows[r],e=t[f],i;i=m.is2(StiIndicatorColumn)?kv0.measureIndicatorCell(d,m,p,e):m.is2(StiDataBarsColumn)?kv0.measureDataBarsCell(d,m,p,e):kv0.measureCommonCell(d,m,p,e,s).width,s=Math.max(s,i)}if(m.showTotalSummary){let t=StiTableElementHelper.calculateTotal(m,f,g),e=this.measureFooter(d,m,p,t);s=Math.max(s,e)}}let o=StiTableElementHelper.minDataColumnValue(m,g,f),a=StiTableElementHelper.maxDataColumnValue(m,g,f),u=y&&h?M:0,S=y&&h?I:g.rows.length-1;for(let n=u;n<=S;n++){if(C.length<=S-u&&C.push([]),y&&!h&&(n<M||n>I))continue;let r=g.rows[n],e=this.processRowValue(n,r[f],m),t=new Rectangle(0,0,s,b),i=new StiPanel,l=(await kv0.renderCell(i,t,d,r,w.select(t=>t.key),m,p,e,o,a,1==(1&n),__.f.StiDashboardExportFormat.Html,!1),{});if(0<d.tableConditions.length&&0<i.components.length){let t=i.components.getByIndex(0);t.is(StiText)||(t.is(IStiBrush)&&(l["backColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.as(IStiBrush).brush))),t.is(IStiTextBrush)&&(l["textColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.as(IStiTextBrush).textBrush))))}if("boolean"==typeof e)l["boolValue"]=e;else for(let t of i.components.list)if(t.is(StiText)){if(l["text"]=t.text,l["textColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.textBrush)),l["backColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.brush)),l["textWidth"]=t.width,l["textHeight"]=t.height,0<d.tableConditions.length){let t=null==(c=d.as(IStiFont))?void 0:c.font,e=0<d.tableConditions.length?await StiTableElementConditionHelper.processFontStyle(t,m.key,d,r,w.select(t=>t.key)):FontStyle.Regular,i=(t=new Font(t.fontFamily.name,t.size,e),{});i["bold"]=t.bold,i["italic"]=t.italic,i["underline"]=t.underline,i["strikeout"]=t.strikeout,l["textFontStyle"]=i}null!=e&&e.toString()!=l["text"]&&(l["value"]=e.toString())}else t.is(StiImage)?(l["image"]=null!=t.imageToDraw?Stimulsoft.Base.Drawing.StiImageConverter.imageToString(t.imageToDraw):null,l["imageWidth"]=t.width,l["imageHeight"]=t.height,0<d.tableConditions.length&&(l["iconAlignment"]=Enum.getName(StiIconAlignment,d.tableConditions.firstOrDefault().iconAlignment).toLowerCase())):t.is(StiSparkline)&&(l["sparkline"]=Stimulsoft.Report.Export.StiHtmlExportService.getSparklineData(null,t,t.width,t.height),l["sparklineWidth"]=t.width,l["sparklineHeight"]=t.height);null==l["boolValue"]&&null==l["text"]&&null==l["image"]&&(l["text"]=e),C[h?n-u:n].push(l)}if(e){C.length<g.rows.length+1&&C.push([]);let e={};if(e["text"]="",m.showTotalSummary){let t=StiTableElementHelper.calculateTotal(m,f,g);e["text"]=m.summaryType==StiSummaryColumnType.Count?StiMath.trunc(t).toString():StiTextFormatHelper.formatBasedOnColumnType(d,m,t)}C[C.length-1].push(e)}f++}return C}static async renderCells(u,S,m,h,c,d,r){let g=await StiElementDataCache.tryToGetOrCreate(m);if(null==g)return;g=this.processDataTableWithTopN(g);let e=StiElementConsts.Table.getHeight(m.getColumnFont(),h),t=StiElementConsts.Table.getHeight(m.getDataFont(),h),p=g.meters.where(t=>t.is(StiTableColumn)).cast(),i=null!=p.firstOrDefault(t=>t.showTotalSummary),l=r?0:m.currentPageIndex,n=0!=m.rowsPerPage&&-1!=l&&c!=__.f.StiDashboardExportFormat.Excel,s=1,C=(n&&(s=StiTableElementPagingHelper.getNumberOfPages(g.rows.length,m.rowsPerPage))<=1&&(n=!1),g.rows);if(n){let t=C.skip(m.rowsPerPage*l).take(m.rowsPerPage);t.any()?C=t:n=!1}let b=i?StiElementConsts.Table.getHeight(m.getTotalFont(),h):0,o=n?StiElementConsts.Table.getHeight(m.getTotalFont(),h):0,w=b+o,f=new List,y=[],M=0;for(let r of p){r.cache={};let i=0,t=await this.getColumnVisibilityState(r,m.report);if(t&&(i=this.measureHeader(m,r,h),r.showTotalSummary)){let t=StiTableElementHelper.calculateTotal(r,M,g),e=this.measureFooter(m,r,h,t);i=Math.max(i,e)}f.push(i),M++}let I=S.y+e;if(I<S.bottom-w){for(let s of C){let n=t;M=-1;for(let l of p){M++;let t=await StiTableColumnVisibilityHelper.getVisible(l,m.report);if(!t)continue;let r=f[M];if(l.is(StiSparklinesColumn))r=this.measureSparklinesCell(h,r);else{let e=s[M],i;if(l.is2(StiIndicatorColumn))i=this.measureIndicatorCell(m,l,h,e);else if(l.is2(StiDataBarsColumn))i=this.measureDataBarsCell(m,l,h,e);else if(l.is2(StiBubbleColumn))i=kv0.measureBubbleCell(m,l,h,e);else{let t=this.measureCommonCell(m,l,h,e,r);i=t.width,n=Math.max(t.height,n)}r=Math.max(r,i)}f[M]=r}if(I+n>S.bottom-w&&(n=S.bottom-w-I)<1.2&&(n=1.2),y.push(n),(I+=n)>=S.bottom-w)break}y.push(t)}if(m.sizeMode==StiTableSizeMode.Fit){let e=S.width/f.sum(),t=((1<e||!r)&&(f=f.select(t=>t*e).toList()),-1);for(let n of C){if(++t>=y.length)break;M=-1;let l=y[t];for(let r of p){if(M++,r.is2(StiIndicatorColumn)||r.is2(StiDataBarsColumn))continue;if(r.is(IStiTableColumnSize)){let t=r,e=t.size.width,i=(t.size.width=f[M]-4,this.measureCommonCell(m,r,h,n[M],t.size.width));l=Math.max(i.height,l),t.size.width=e}}y[t]=l}}let T=S.x;M=0;for(let a of p){let t=await this.getColumnVisibilityState(a,m.report);if(!t){M++;continue}let o=f[M];if(c==__.f.StiDashboardExportFormat.Excel&&(o*=1.1),I=S.y,c!=__.f.StiDashboardExportFormat.Data){let t=new Rectangle(T,I,o,e);this.renderHeader(u,t,m,a,h,c,d),I+=t.height}if(I<=S.bottom-w){let l=StiTableElementHelper.minDataColumnValue(a,g,M),n=StiTableElementHelper.maxDataColumnValue(a,g,M),s=0;for(let r of C){let t=Math.ceil(y[s]),e=this.processRowValue(s,r[M],a),i=new Rectangle(T,I,o,t);if(await this.renderCell(u,i,m,r,p.select(t=>t.key),a,h,e,l,n,1==(1&s),c,d),I+=t,s++,I>=S.bottom-w)break}}if(c!=__.f.StiDashboardExportFormat.Data&&!d&&i){let t=new Rectangle(T,r?S.bottom-w:I,o,b);this.renderFooter(u,t,m,a,M,h,g)}T+=o,M++}if(c!=__.f.StiDashboardExportFormat.Data&&!d&&n){let t=StiString.format(StiLocalization.get("Report","PageNofM"),l+1,s),e=T-S.x,i=new Rectangle(S.x,(r?S.bottom-w:I)+b,e,o);this.renderCurrentPageNumber(u,i,m,h,t)}}static processDataTableWithTopN(t){let e=t.meters.where(t=>t.is(StiTableColumn)).cast().toList(),r=t.rows,l=0;for(let i of e){let t=i.topN,e=this.processTopNElements(r,t,l);r=e.select(t=>t).toList(),l++}let i=new StiDataTable;return i.meters.addRange(e),i.rows.addRange(r),i}static processTopNElements(t,e,i){if(e.mode==StiDataTopNMode.None)return t;let r=new List;for(let e of t){let t=StiValueHelper.tryToNumber(e[i]);r.add({key:t,value:e})}e.mode==StiDataTopNMode.Bottom?r.sort((t,e)=>t.key[Stimulsoft.System.StiObject.stimulsoft]().compareTo(e.key)):r.sort((t,e)=>e.key[Stimulsoft.System.StiObject.stimulsoft]().compareTo(t.key));let l=r.take(e.count).select(t=>t.value).toList();return l}static measureSparklinesCell(t,e){return Math.max(e,80*t)}static measureHeader(t,e,i){return StiTableElementGdiPainter.measureHeader(t,e).width*i}static measureFooter(t,e,i,r){let l=StiTextFormatHelper.formatBasedOnColumnType(t,e,r);return StiTableElementGdiPainter.measureCell(l,t.getTotalFont(),e).width*i}static measureIndicatorCell(t,e,i,r){let l=e.as(StiIndicatorColumn),n=StiIndicatorCellPainter.getCellText(t,l,StiValueHelper.tryToNullableNumber(r)),s=StiTableElementGdiPainter.measureCell(n,t.getDataFont(),e).width*i;return s*=1.25}static measureDataBarsCell(t,e,i,r){let l=StiTextFormatHelper.formatBasedOnColumnType(t,e,r),n=StiTableElementGdiPainter.measureCell(l,t.getDataFont(),e).width*i;return e.horAlignment!=StiHorAlignment.Center&&(n*=2),n=e.is(StiDataBarsColumn)&&0<e.width?i*e.width:n}static measureBubbleCell(t,e,i,r){let l=StiTextFormatHelper.formatBasedOnColumnType(t,e,r),n=StiTableElementGdiPainter.measureCell(l,t.getDataFont(),e).width*i,s=StiElementConsts.Table.getHeight(t.getDataFont(),i);if(e.horAlignment==StiHorAlignment.Center)return s;return n+=s}static measureCommonCell(t,e,i,r,l){if(StiImageHelper.isImage(r))return new Size(l,0);let n=StiTextFormatHelper.formatBasedOnColumnType(t,e,r),s=StiTableElementGdiPainter.measureCell(n,t.getDataFont(),e);return s.width*=i,s.height*=i,s}static renderHeader(t,e,i,r,l,n,s){let o=null!=r?StiLabelHelper.getLabel(r):"",a=StiString.isNullOrWhiteSpace(o)?i.name+`_Column`:StiNameValidator.correctName(o),u=StiDashboardStyleHelper.getTableStyle(i),S=0!=i.columns.indexOf(r)&&e.left<t.width&&!s,m=i.columns.indexOf(r)!=i.columns.length-1&&e.right<=t.width&&!s,h=(S?StiBorderSides.Left:StiBorderSides.None)|(m?StiBorderSides.Right:StiBorderSides.None),c=s?Color.black:this.getHeaderForeColor(i),d=s?Color.transparent:this.getHeaderBackColor(i),g=s?new Font("Arial",10,FontStyle.Bold):i.getColumnFont(),p=new StiText(e);p.name=a,p.allowHtmlTags=!0,p.autoWidth=!1,p.horAlignment=this.getHeaderAlignment(r),p.vertAlignment=StiVertAlignment.Center,p.wordWrap=!1,p.border=new StiBorder(h,u.lineColor,1,StiPenStyle.Solid),p.brush=new StiSolidBrush(d),p.font=StiElementConsts.Table.Font.getGdiFont(l,null,g),p.text=o,p.textFormat=null!=r.textFormat?r.textFormat.clone():null,p.textBrush=new StiSolidBrush(c),p.componentPlacement=`h.`+i.name,t.components.add(p)}static getHeaderAlignment(t){if(t.headerAlignment==StiHorAlignment.Left)return StiTextHorAlignment.Left;if(t.headerAlignment==StiHorAlignment.Right)return StiTextHorAlignment.Right;return StiTextHorAlignment.Center}static renderFooter(t,e,i,r,l,n,s){let o=this.getFooterForeColor(i),a=this.getFooterBackColor(i),u=i.getTotalFont(),S="",m=0,h=(r.showTotalSummary&&(m=StiTableElementHelper.calculateTotal(r,l,s),S=r.summaryType==StiSummaryColumnType.Count?StiMath.trunc(m).toString():StiTextFormatHelper.formatBasedOnColumnType(i,r,m)),StiTextHorAlignment.Right),c=(r.summaryAlignment==StiHorAlignment.Left?h=StiTextHorAlignment.Left:r.summaryAlignment==StiHorAlignment.Center&&(h=StiTextHorAlignment.Center),new StiText(e)),d=(c.name=i.name+`_FooterCell`,null!=r.textFormat&&r.textFormat.is(StiGeneralFormatService)?null:S);null!=r.textFormat&&(r.textFormat.is(StiCurrencyFormatService)||r.textFormat.is(StiNumberFormatService)||r.textFormat.is(StiPercentageFormatService))&&(d=m.toString()),c.border=this.getBorderSides(t,e,i,r,StiBorderSides.All),c.brush=new StiSolidBrush(a),c.excelDataValue=d,c.font=StiElementConsts.Table.Font.getGdiFont(n,null,u),c.horAlignment=h,c.vertAlignment=StiVertAlignment.Center,c.text=S,c.textBrush=new StiSolidBrush(o),c.textFormat=null!=r.textFormat?r.textFormat.clone():null,c.wordWrap=!1,c.componentPlacement=`f.`+i.name,t.components.add(c)}static renderCurrentPageNumber(t,e,i,r,l){let n=this.getFooterForeColor(i),s=this.getFooterBackColor(i),o=i.getTotalFont(),a=new StiText(e);a.name=i.name+`_CurrentPage`,a.brush=new StiSolidBrush(s),a.font=StiElementConsts.Table.Font.getGdiFont(r,null,o),a.horAlignment=StiTextHorAlignment.Center,a.vertAlignment=StiVertAlignment.Center,a.margins=new StiMargins(0,0,1,0),a.textQuality=StiTextQuality.Typographic,a.text=l,a.textBrush=new StiSolidBrush(n),a.wordWrap=!1,a.componentPlacement=`f.`+i.name,t.components.add(a)}static async renderCell(t,e,i,r,l,n,s,o,a,u,S,m,h){let c=StiDashboardStyleHelper.getTableStyle(i),d=this.getForeColor(i,n,c,S),g=StiTableElementGdiPainter.getBackgroundColor(i,i.cells,c,null!=S&&S);g=0<i.tableConditions.length?await StiTableElementConditionHelper.processBackColor(g,n.key,i,r,l):g,h?await this.renderTextCell(t,e,i,r,l,n,s,o,StiBorderSides.None,Color.black,Color.transparent,m,!0):n.is2(StiDataBarsColumn)||n.is2(StiSparklinesColumn)||n.is2(StiIndicatorColumn)||n.is2(StiBubbleColumn)?await this.renderGraphicCell(t,e,i,r,l,n,s,o,a,u,g,c,null!=S&&S,m):n.is2(StiColorScaleColumn)?await this.drawColorScaleColumn(t,e,i,r,l,n,s,o,a,u,c,m):StiImageHelper.isImage(o)?this.renderImageCell(t,e,i,n,o,g,m):"boolean"==typeof o?await this.renderBoolCell2(t,e,i,r,l,n,s,o,d,g,m):await this.renderTextCell(t,e,i,r,l,n,s,o,StiBorderSides.All,d,g,m,!1,null,!0,!0)}static processRowValue(t,e,i){let r,l=i.textFormat,n=(null!=e&&e[Stimulsoft.System.StiObject.stimulsoft]().is(StiSystemVariableObject)&&(e=e==StiSystemVariableObject.Line&&null!=l?l.format(t+1):Funcs.getSystemVariable(null==e?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().as(StiSystemVariableObject),t+1)),i.ident==StiMeterIdent.SparklinesColumn);return e=ListExt.isList(e)&&!StiImageHelper.isImage(e)?n?ListExt.toList(e):null==(r=ListExt.toList(e))?void 0:r.firstOrDefault():e}static async renderGraphicCell(s,o,a,u,S,m,e,h,i,r,c,d,l,n){let g="",p=o,C=this.getForeColor(a,m,d,l),b=new XmlTextWriter(Encoding.UTF8);if(b.indentation=-1,b.writeStartElement("svg"),b.writeAttributeString("version","1.1"),b.writeAttributeString("baseProfile","full"),b.writeAttributeString("xmlns","http://www.w3.org/2000/svg"),b.writeAttributeString("xmlns:xlink","http://www.w3.org/1999/xlink"),b.writeAttributeString("xmlns:ev","http://www.w3.org/2001/xml-events"),b.writeAttributeString("height",StiSvgHelper.toUnits(o.height)),b.writeAttributeString("width",StiSvgHelper.toUnits(o.width)),b.writeStartElement("rect"),b.writeAttributeString("x","0"),b.writeAttributeString("y","0"),b.writeAttributeString("width",StiSvgHelper.toUnits(o.width)),b.writeAttributeString("height",StiSvgHelper.toUnits(o.height)),b.writeAttributeString("style",StiSvgHelper.writeFillBrush(b,c,o)),b.writeEndElement(),m.is2(StiSparklinesColumn)){let t=StiSparklinesCellPainter.castToArray(h),e=null==t?void 0:t.map(t=>null==t?void 0:t[Stimulsoft.System.StiObject.stimulsoft]().toNumber()),i=m.as(StiSparklinesColumn),r=o,l=await StiTableElementConditionHelper.getIconCondition(m.key,a,u,S),n=(null!=l&&l.iconAlignment!=StiIconAlignment.None&&(l.iconAlignment==StiIconAlignment.Right?r=new Rectangle(o.x,o.y,o.width-o.height,o.height):l.iconAlignment==StiIconAlignment.Left&&(r=new Rectangle(o.x+o.height,o.y,o.width-o.height,o.height))),new StiSparkline(r));if(n.values=e,n.positiveColor=i.allowCustomColors?i.positiveColor:d.cellSparkline,n.negativeColor=i.allowCustomColors?i.negativeColor:d.cellWinLossNegative,n.showFirstLastPoints=i.showFirstLastPoints,n.showHighLowPoints=i.showHighLowPoints,n.type=i.type,n.brush=new StiSolidBrush(c),n.componentPlacement=`d.`+a.name,s.components.add(n),null!=l&&l.iconAlignment!=StiIconAlignment.None){let t=await StiConditionIconPainter.getImageWithConditionIcon(l,o,a.name);s.components.add(t)}return}let w=new StiSvgGeomWriter(b),f=StiBorderSides.None,y="GraphicCell",M=new Rectangle(0,0,o.width,o.height),I=m.horAlignment;if(m.is2(StiDataBarsColumn)){await StiDataBarsCellPainter.draw(w,M,a,u,S,m,e,StiValueHelper.tryToNumber(h),i,r,l,!1,!1),n!=__.f.StiDashboardExportFormat.Data&&(p=StiDataBarsCellPainter.calculateTextRect(o.clone(),m)).inflate(2,2),g=StiTextFormatHelper.formatBasedOnColumnType(a,m,h),C=StiDataBarsCellPainter.getForeColor(a,m,d,l,!1);let t=StiValueHelper.tryToNumber(h);t<0&&StiNegativeColorChecker.isNegativeInRed(m.textFormat)&&(C=Stimulsoft.StiOptions.Engine.negativeColor),C=0<a.tableConditions.length?await StiTableElementConditionHelper.processForeColor(C,m.key,a,u,S):C,f=StiBorderSides.Right,y="DataBarsCell"}else if(m.is2(StiIndicatorColumn))await StiIndicatorCellPainter.draw(w,M,a,u,S,m,e,StiValueHelper.tryToNullableNumber(h),d,!1),p=StiIndicatorCellPainter.calculateTextRect(o.clone(),m),g=StiIndicatorCellPainter.getCellText(a,m,StiValueHelper.tryToNullableNumber(h)),C=StiIndicatorCellPainter.getColor(m,StiValueHelper.tryToNullableNumber(h),d),C=0<a.tableConditions.length?await StiTableElementConditionHelper.processForeColor(C,m.key,a,u,S):C,f=StiBorderSides.None,y="IndicatorCell";else if(m.is2(StiBubbleColumn)){await StiBubbleCellPainter.draw(w,M,a,u,S,m,e,StiValueHelper.tryToNullableNumber(h),i,r,l,!1,!1),n!=__.f.StiDashboardExportFormat.Data&&(p=StiBubbleCellPainter.calculateTextRect(a,o.clone(),m)).inflate(2,2),g=StiBubbleCellPainter.getCellText(a,m,StiValueHelper.tryToNullableNumber(h)),C=StiDataBarsCellPainter.getForeColor(a,m,d,l,!1),C=0<a.tableConditions.length?await StiTableElementConditionHelper.processForeColor(C,m.key,a,u,S):C,f=StiBorderSides.None,y="BubbleCell";let t=m[Stimulsoft.System.StiObject.stimulsoft]().as(IStiHorAlignment);null!=t&&(t.horAlignment==StiHorAlignment.Center&&n!=__.f.StiDashboardExportFormat.Data&&(g=null),t.horAlignment==StiHorAlignment.Left&&(I=StiHorAlignment.Right),t.horAlignment==StiHorAlignment.Right)&&(I=StiHorAlignment.Left)}if(b.writeFullEndElement(),b.flush(),n!=__.f.StiDashboardExportFormat.Data&&!m.is2(StiSparklinesColumn)){let t=new StiImage(o),e=(t.name=a.name+`_`+y,t.border=this.getBorderSides(s,o,a,m,StiBorderSides.All),t.stretch=!0,t.aspectRatio=m.is2(StiIndicatorColumn)||m.is2(StiBubbleColumn),b.textWriter.getStringBuilder().toString());t.image=StiImageConverter.stringToImage(Stimulsoft.System.Convert.toBase64String(e)),t.brush=new StiSolidBrush(c),t.horAlignment=I,s.components.add(t)}n!=__.f.StiDashboardExportFormat.Data&&StiString.isNullOrEmpty(g)||await this.renderTextCell(s,p,a,u,S,m,e,h,f,C,c,n,!1,!1,!0,!1)}static async drawColorScaleColumn(t,e,i,r,l,n,s,o,a,u,S,m){let h=n.as(StiColorScaleColumn),c=this.getForeColor(i,n,S,!1),d=StiColorScaleCellPainter.getScaleColor(StiValueHelper.tryToNumber(o),a,u,S,h.minimumColor,h.maximumColor),g=i.tableConditions.length?await StiTableElementConditionHelper.processForeAndBackColor(c,d,n.key,i,r,l):{foreColor:c,backColor:d};await this.renderTextCell(t,e,i,r,l,n,s,o,StiBorderSides.All,g.foreColor,g.backColor,m,!1,null,!0,!0)}static async renderBoolCell2(r,l,n,s,o,a,t,u,S,m,e){if(e==__.f.StiDashboardExportFormat.Data)await this.renderTextCell(r,l,n,s,o,a,t,u,StiBorderSides.None,S,m,e,!1);else{let t=0<n.tableConditions.length?await StiTableElementConditionHelper.processForeAndBackColor(S,m,a.key,n,s,o):{foreColor:S,backColor:m},e=u?StiCheckStyle.CheckRectangle:StiCheckStyle.NoneRectangle,i=new StiCheckBox(l);i.name=n.name+`_Cell`,i.border=this.getBorderSides(r,l,n,a,StiBorderSides.All),i.contourColor=Color.transparent,i.textBrush=new StiSolidBrush(t.foreColor),i.brush=new StiSolidBrush(t.backColor),i.checkStyleForTrue=e,i.checkStyleForFalse=StiCheckStyle.NoneRectangle,i.checkedValue=e!=StiCheckStyle.NoneRectangle,i.excelDataValue=u.toString(),i.componentPlacement=`d.`+n.name,r.components.add(i)}}static async renderTextCell(e,i,l,n,s,t,r,o,a,u,S,m,h,c=null,d=!1,g=!1){let p,C=null,b=null,w=(!d||h||null==(b=await StiTableElementConditionHelper.getIconCondition(t.key,l,n,s))||b.iconAlignment==StiIconAlignment.None||h||m==__.f.StiDashboardExportFormat.Html||(b.iconAlignment==StiIconAlignment.Left?C=new StiMargins(i.height,0,0,0):b.iconAlignment==StiIconAlignment.Right&&(C=new StiMargins(0,i.height,0,0))),StiTextFormatHelper.formatBasedOnColumnType(l,t,o)),f=h?new Font("Arial",10):l.getDataFont(),y=(t.is(StiDimensionColumn)&&t.showHyperlink&&(f=new Font(f.fontFamily.name,f.size,f.style|FontStyle.Underline)),await StiTableElementConditionHelper.processFontStyle(f,t.key,l,n,s)),M=(f.style!=y&&(f=new Font(f.fontFamily.name,f.size,y)),StiValueHelper.tryToNumber(o));if(M<0&&StiNegativeColorChecker.isNegativeInRed(t.textFormat)&&(u=Stimulsoft.StiOptions.Engine.negativeColor),t.is(StiSparklinesColumn)){let t=StiSparklinesCellPainter.castToArray(o),e=null==t?void 0:t.map(t=>t.toString());w=StiString.join(" ",e)}let I=0<l.tableConditions.length?await StiTableElementConditionHelper.processForeAndBackColor(u,S,t.key,l,n,s):{foreColor:u,backColor:S},T=StiTitleExportHelper.convert(t.horAlignment),x=(t.is(StiBubbleColumn)&&(T=StiTextHorAlignment.Right),t.as(IStiTableColumnSize)),D=(null!=x&&null==c&&(c=x.size.wordWrap),null);if(t.is(StiDimensionColumn)&&t.showHyperlink&&!StiString.isNullOrWhiteSpace(t.hyperlinkPattern)){let r=new Stimulsoft.System.Collections.Hashtable;r.add("Value",o);for(let i=0;i<s.length;i++){let t=l.columns.firstOrDefault(t=>t.key==s[i]),e="Row."+StiNameValidator.correctName(t.label,!0);r.add(e,null==(p=n[i])?void 0:p.toString())}D=await Stimulsoft.Report.Dashboard.StiReportParser.parseAsync(t.hyperlinkPattern,l,!1,r)}let F=null!=t.textFormat&&t.textFormat.is(StiGeneralFormatService)?null:w,A=(null!=o&&null!=t.textFormat&&(t.textFormat.is(StiCurrencyFormatService)||t.textFormat.is(StiNumberFormatService)||t.textFormat.is(StiPercentageFormatService))&&(F=o.toString()),new StiMargins(2,2,1,0)),v=(null!=C&&(A=new StiMargins(A.left+C.left,A.right+C.right,A.top+C.top,A.bottom+C.bottom)),new StiText(i));if(v.name=l.name+`_Cell`,v.border=this.getBorderSides(e,i,l,t,a),v.brush=new StiSolidBrush(I.backColor),v.excelDataValue=F,v.font=StiElementConsts.Table.Font.getGdiFont(r,null,f),v.horAlignment=T,v.vertAlignment=StiVertAlignment.Center,v.margins=A,v.text=w,v.textBrush=new StiSolidBrush(I.foreColor),v.textFormat=null!=t.textFormat?t.textFormat.clone():null,v.wordWrap=0!=c,v.componentPlacement=`d.`+l.name,v.trimming=StringTrimming.EllipsisCharacter,v.hyperlinkValue=D,e.components.add(v),null!=b&&b.iconAlignment!=StiIconAlignment.None&&g){let t=await StiConditionIconPainter.getImageWithConditionIcon(b,i,l.name);e.components.add(t)}}static renderImageCell(t,e,i,r,l,n,s){if(s==__.f.StiDashboardExportFormat.Data)return;let o=StiImageHelper.getImageFromObject(l);if(null==o)return;let a=new StiImage(e);a.name=i.name+`_Cell`,a.border=this.getBorderSides(t,e,i,r,StiBorderSides.All),a.brush=new StiSolidBrush(n),a.stretch=!0,a.aspectRatio=!0,a.imageToDraw=o,a.horAlignment=r.horAlignment,t.components.add(a)}static async renderBoolCell(t,e,i,r,l,n,s,o,a,u,S){if(S==__.f.StiDashboardExportFormat.Data)return void await this.renderTextCell(t,e,i,r,l,n,s,o,a,null,u,S,!1);let m=0!=i.columns.indexOf(n),h=i.columns.indexOf(n)!=i.columns.length-1,c=(m?StiBorderSides.Left:StiBorderSides.None)|(h?StiBorderSides.Right:StiBorderSides.None),d=StiDashboardStyleHelper.getTableStyle(i),g=new StiImage(e);g.name=i.name+`_Cell`,g.border=a?new StiBorder(c,d.lineColor,1,StiPenStyle.Solid):new StiBorder(StiBorderSides.None,Color.transparent,0,StiPenStyle.None),g.brush=new StiSolidBrush(u),g.horAlignment=StiHorAlignment.Center,g.vertAlignment=StiVertAlignment.Center,t.components.add(g)}static async getColumnVisibilityState(t,e){if(t.visibility==StiTableColumnVisibility.TrueAndHidden)return!1;return StiTableColumnVisibilityHelper.getVisible(t,e)}static getForeColor(t,e,i,r){if(!Color.transparent.equals(e.foreColor))return e.foreColor;if(e.is(StiDimensionColumn)&&e.showHyperlink)return StiColor.get("165dc8");let l=StiDashboardExpressionHelper.getForeColor(t,t.cells.data.foreColor);if(!Color.transparent.equals(l))return l;return null!=i?r?i.alternatingCellForeColor:i.cellForeColor:StiElementConsts.Table.Font.Color}static getHeaderBackColor(t){if(!t.cells.columns.backColor.equals(Color.transparent))return t.cells.columns.backColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.headerBackColor}static getHeaderForeColor(t){if(!Color.transparent.equals(t.cells.columns.foreColor))return t.cells.columns.foreColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.headerForeColor}static getFooterForeColor(t){if(!Color.transparent.equals(t.footerForeColor))return t.footerForeColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.footerForeColor}static getFooterBackColor(t){if(!t.cells.totals.backColor.equals(Color.transparent))return t.cells.totals.backColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.footerBackColor}static getBorderSides(t,e,i,r,l){let n=StiDashboardStyleHelper.getTableStyle(i),s=0!=(l&StiBorderSides.Left)&&0!=i.columns.indexOf(r)&&e.left<t.width,o=0!=(l&StiBorderSides.Right)&&i.columns.indexOf(r)!=i.columns.length-1&&e.right<=t.width,a=(s?StiBorderSides.Left:StiBorderSides.None)|(o?StiBorderSides.Right:StiBorderSides.None),u=a!=StiBorderSides.None?1:0,S=a!=StiBorderSides.None?n.lineColor:Color.transparent;return new StiBorder(a,S,u,StiPenStyle.Solid)}}__.z.StiTableElementExportTool=kv0}let StiAutoSizeHtmlTextHelper=__.h.StiAutoSizeHtmlTextHelper;{class WC0 extends __.z.StiElementExportTool{async render(t,e,l,i){if(this.renderEmptyDataMessage(t,e,l.clone(),i))return;let n=t.as(StiTextElement),s="";if(Stimulsoft.StiOptions.Engine.dashboardTextElementExpressionParser==StiParserType.ReportParser||StiExpressionHelper.isTimeExpression(n.text)||WC0.isExpressionWithVariables(n.text,n.report))s=await StiReportParser.parseAsync(n.text,n,!1);else if(n.isQuerable){let t=await StiElementDataCache.tryToGetOrCreate(n),e=new List(null==t?void 0:t.rows.firstOrDefault()).select(t=>StiValueHelper.tryToString(t)).toList();null!=e&&(s=StiExpressionHelper.replaceExpressionBlocksByValues(n.text,e))}else s=n.text;!StiString.isNullOrEmpty(s)&&s.toLowerCase()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(" ","").includes("javascript:")&&(s=s.toLowerCase()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll("javascript",""));let o=i.format==__.f.StiDashboardExportFormat.Excel||i.format==__.f.StiDashboardExportFormat.Html?.96:1,r=StiExportTool.getScaleFactor(e,i);if(s=this.changeFontSize(s,r*o),n.sizeMode==StiTextSizeMode.Fit||n.sizeMode==StiTextSizeMode.FitAndWordWrap){let r,t=3;do{let t=StiAutoSizeHtmlTextHelper.measure(null,l.clone(),s,n),e=t.width>l.width?l.width/t.width:1,i=l.height<t.height?l.height/t.height:1;r=Math.min(Math.abs(e),Math.abs(i)),(r=n.sizeMode==StiTextSizeMode.FitAndWordWrap&&.8<t.width/l.width&&i<.5?1-.7*(1-r):r)<1&&(s=this.changeFontSize(s,.99*r))}while(r<1&&0<t--);o<1&&(s=this.changeFontSize(s,o))}let a=new StiText(l);a.name=t.name+`_Content`,a.allowHtmlTags=!0,a.vertAlignment=n.vertAlignment,a.horAlignment=n.horAlignment,a.text=s,a.textBrush=new StiSolidBrush(StiDashboardStyleHelper.getForeColor(n)),a.trimming=n.sizeMode==StiTextSizeMode.Trimming?StringTrimming.EllipsisCharacter:StringTrimming.None,a.wordWrap=n.sizeMode==StiTextSizeMode.WordWrap||n.sizeMode==StiTextSizeMode.FitAndWordWrap,a.rightToLeft=n.rightToLeft,e.components.add(a)}changeFontSize(t,e){if(null==t||!t.startsWith("<font ")||t.indexOf(' size="')<0)return t;let i=t.indexOf(' size="')+7,r=t.substring(i),l=(r=r.substring(0,r.indexOf('"')))[Stimulsoft.System.StiObject.stimulsoft]().toNumber();return null==l&&(l=12),l=Math.ceil(l*e*10)/10,t.substring(0,i)+l.toString().replace(",",".")+t.substring(i+r.length)}static isExpressionWithVariables(e,i){var t;if(!StiString.isNullOrEmpty(e)&&StiExpressionHelper.isExpression(e)&&0<(null==(t=null==i?void 0:i.variables)?void 0:t.count))for(let t of i.variables.keys)if(e.toLowerCase().includes(t.toLowerCase()))return!0;return!1}}__.z.StiTextElementExportTool=WC0}__.z.StiTreeViewBoxElementExportTool=class extends __.z.StiComboBoxElementExportTool{async render(t,e,i,r){return super.render(t,e,i,r)}getValuesCount(t,e){let i=t.as(IStiTreeViewBoxElement),r=StiTreeViewHelper.fetchItems(e,i.showBlanks);return null!=r?r.length:0}};let StiShapeDirection=Stimulsoft.Report.Components.StiShapeDirection,StiTriangleShapeType=Stimulsoft.Report.Components.StiTriangleShapeType;{class DD0 extends __.z.StiListBoxElementExportTool{async render(t,e,i,r){return super.render(t,e,i,r)}getCheckStyle(e,i){let t=e;if(!t.userFilters.any())return StiCheckStyle.CheckRectangle;if(t.userFilters.any(t=>t.condition==StiDataFilterCondition.IsFalse))return StiCheckStyle.NoneRectangle;if(null!=i.items){let t=i.items.select(t=>this.getCheckStyle(e,t));if(t.all(t=>t==StiCheckStyle.CheckRectangle))return StiCheckStyle.CheckRectangle;if(t.all(t=>t==StiCheckStyle.NoneRectangle))return StiCheckStyle.NoneRectangle;return StiCheckStyle.DotRectangle}if(t.userFilters.any(t=>t.condition==StiDataFilterCondition.EqualTo&&t.value==i.toString()))return StiCheckStyle.CheckRectangle;return StiCheckStyle.NoneRectangle}async renderItems(t,e,i,r,l){let n,s=await StiElementDataCache.tryToGetOrCreate(i);if(null==s)return;let o=!1,a=i.as(IStiTreeViewElement),u=StiTreeViewHelper.fetchItems(s,a.showBlanks),S=(1==(null==u?void 0:u.length)&&0<(null==(n=u[0].items)?void 0:n.length)&&(u=u.concat(u[0].items),o=!0),null==u?void 0:u.select(t=>null==t?"":null!=t.key&&t.key instanceof DateTime?t.key.toShortDateString():t.toString())),m=null==u?void 0:u.select(t=>this.getCheckStyle(i,t)),h=null==u?void 0:u.select(t=>o&&t==u.first());this.renderItems2(t,e.clone(),i,S,m,h,r,l)}renderItem(t,e,i,r,l,n,s,o,a,u,S){r!=StiLocHelper.locAll&&(DD0.renderExpander(t,e.clone(),i,a),e.x+=StiElementConsts.ListBox.CheckBoxWidth/2,e.width-=StiElementConsts.ListBox.CheckBoxWidth/2),super.renderItem(t,e.clone(),i,r,l,n,s,o,a,u,S)}static renderExpander(t,e,i,r){e=new Rectangle(e.x,e.y+e.height/2-e.height/8,StiElementConsts.ListBox.CheckBoxWidth/3,e.height/4);let l=new StiShape(e);l.name=i.name+`_ItemExpander`,l.shapeType=new StiTriangleShapeType(r?StiShapeDirection.Down:StiShapeDirection.Right),l.brush=new StiSolidBrush(Color.dimGray),l.style=StiPenStyle.None,t.components.add(l)}}__.z.StiTreeViewElementExportTool=DD0}let StiHorizontalLinePrimitive=Stimulsoft.Report.Components.StiHorizontalLinePrimitive;__.z.StiWebContentElementExportTool=class extends __.z.StiElementExportTool{async render(t,r,l,e){if(this.renderEmptyDataMessage(t,r,l.clone(),e))return;let n=t.as(StiWebContentElement),s=StiString.isNullOrEmpty(n.url)?"EmbedCode":"URL",o=StiString.isNullOrEmpty(n.url)?n.embedCode:n.url;if(null!=e&&e.is(StiSvgDashboardExportSettings)&&e.designMode){let t=30,e=1,i=20;this.paintHeader(r,n,new Rectangle(l.x,l.top,l.width,t),s),this.paintSeparator(r,n,new Rectangle(l.x+i,l.top+t,l.width-2*i,e)),this.paintWebContent(r,n,new Rectangle(l.x,l.top+t+e,l.width,t),o,!0)}else this.paintWebContent(r,n,new Rectangle(l.x,l.top,l.width,l.height),o)}paintHeader(t,e,i,r){let l=StiDashboardStyleHelper.getForeColor(e),n=new StiText(i);n.name=e.name+`__WebContentHeader`,n.vertAlignment=StiVertAlignment.Center,n.horAlignment=StiTextHorAlignment.Left,n.textBrush=new StiSolidBrush(l),n.brush=new StiSolidBrush(Color.transparent),n.margins=new StiMargins(20,0,0,0),n.text=r,n.font=new Font("Arial",8,FontStyle.Bold),t.components.add(n)}paintSeparator(t,e,i){let r=StiDashboardStyleHelper.getForeColor(e),l=new StiHorizontalLinePrimitive(i);l.name=e.name+`_WebContentSep`,l.color=r,t.components.add(l)}paintWebContent(t,e,i,r,l=!1){let n=StiDashboardStyleHelper.getForeColor(e),s=new StiText(i);s.name=e.name+`__WebContentContent`,s.vertAlignment=l?StiVertAlignment.Center:StiVertAlignment.Top,s.horAlignment=StiTextHorAlignment.Left,s.textBrush=new StiSolidBrush(n),s.brush=new StiSolidBrush(Color.transparent),s.margins=new StiMargins(l?20:0,0,0,0),s.text=r,s.font=new Font("Arial",8,FontStyle.Bold),s.allowHtmlTags=!l,t.components.add(s)}};{class XE0{static run(r,l){if(void 0===r)return void XE0.run(Stimulsoft,"Stimulsoft");if("Stimulsoft.ExternalLibrary"==l||"Stimulsoft.Blockly"==l||"Stimulsoft.Report.StiOptions"==l||"Stimulsoft.StiOptions"==l)return;l=l.replace("Stimulsoft.System","System");for(let i in r){let t=r[i],e=typeof t;"function"==e?(t.ssTypeName=i,t.ssNamespace=l):"object"==e&&XE0.run(t,l+`.`+i)}}}__.c.StiTypesHelper=XE0}__.c.StiTypesHelper.run();export{Stimulsoft};
|
|
10
|
+
return __.A.StiExportFormatHelper.convert(this.format)}toParameters(){let t=super.toParameters();return t.Format=Enum.getName(__.f.StiDashboardExportFormat,this.format),t.Orientation=Enum.getName(StiPageOrientation,this.orientation),t.PaperSize=Enum.getName(StiPageOrientation,this.paperSize),t}},__.y.IStiDashboardScaleMode=new Stimulsoft.System.Interface("IStiDashboardScaleMode"),__.y.IStiSizeExportSettings=new Stimulsoft.System.Interface("IStiSizeExportSettings"),__.y.IStiSizeExportSettings),StiDashboardScaleMode=Stimulsoft.Report.Dashboard.StiDashboardScaleMode,IStiDashboardScaleMode=__.y.IStiDashboardScaleMode,StiImageType=Stimulsoft.Report.Export.StiImageType,IStiImageDashboardExportSettings=Stimulsoft.Report.Dashboard.Export.IStiImageDashboardExportSettings,IStiHtmlDashboardExportSettings=(__.y.StiImageDashboardExportSettings=class extends __.y.StiDashboardExportSettings{implements(){let t=super.implements().concat([IStiSizeExportSettings,IStiImageDashboardExportSettings,IStiDashboardScaleMode]);return(this.implements=()=>t)()}get width(){return this._width}set width(t){this._width=t,this.paperSize=PaperKind.Custom}get height(){return this._height}set height(t){this._height=t,this.paperSize=PaperKind.Custom}toParameters(){let t=super.toParameters();return t.Format=Enum.getName(__.f.StiDashboardExportFormat,this.format),t.ImageType=Enum.getName(StiImageType,this.imageType),t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t.Width=0,t.Height=0,t}constructor(t){super(),this.format=__.f.StiDashboardExportFormat.Image,this.imageType=StiImageType.Svg,this.scale=100,this.scaleMode=StiDashboardScaleMode.ViewSize,null!=t?this.imageType=t:this.renderSinglePage=!0}},__.y.StiSvgDashboardExportSettings=class extends __.y.StiImageDashboardExportSettings{constructor(){super(...arguments),this.imageType=StiImageType.Svg,this.renderEmptyContent=!0}},Stimulsoft.Report.Dashboard.Export.IStiHtmlDashboardExportSettings);__.y.StiHtmlDashboardExportSettings=class extends __.y.StiDashboardExportSettings{constructor(){super(...arguments),this.format=__.f.StiDashboardExportFormat.Html,this.imageQuality=200,this.scale=100,this.enableAnimation=!0,this.scaleMode=StiDashboardScaleMode.ViewSize}implements(){let t=super.implements().concat([IStiHtmlDashboardExportSettings,__.y.IStiDashboardScaleMode]);return(this.implements=()=>t)()}toParameters(){let t=super.toParameters();return t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t}};{class StiExportTool{async render(t,e,i,r){}static getTool(t){let e=this.typeToTool.get(t);if(null!=e)return e;let i=StiExportToolAttribute.attributes.get(t[Stimulsoft.System.StiObject.stimulsoft]().getTypeName()),r=null!=i?i.exportToolTypeName:null;if(null==r)return null;return e=StiActivator.createObject2(r),this.typeToTool.set(t,e),e}static isAllowOpacity(t){return t.is(__.y.StiImageDashboardExportSettings)||t.is(__.y.StiHtmlDashboardExportSettings)||t.is(__.y.StiPdfDashboardExportSettings)||t.is(__.y.StiExcelDashboardExportSettings)}static getScaleFactor(t,e){if(0<e.viewportWidth&&0<e.viewportHeight)return Math.min(t.page.width/e.viewportWidth,t.page.height/e.viewportHeight);return 1}}StiExportTool.typeToTool=new Hashtable,__.z.StiExportTool=StiExportTool}let StiHtmlDashboardExportSettings=__.y.StiHtmlDashboardExportSettings,StiTitleMeasureHelper=__.h.StiTitleMeasureHelper,StiSvgDashboardExportSettings=__.y.StiSvgDashboardExportSettings,StiImageDashboardExportSettings=__.y.StiImageDashboardExportSettings,StiExportTool=__.z.StiExportTool,IStiBorder=(__.A.StiTitleExportHelper=class{static async render(t,e,i){let r,l,n=t.as(IStiTitleElement),s=__.p.StiElementControlPainter.getBorderContentRect(new Rectangle(0,0,e.width,e.height),e.border),o=null!=n?n.title:null,a=this.getTitleText(t);if(null==o||!o.visible||StiString.isNullOrEmpty(a))return s;let u=StiExportTool.getScaleFactor(e,i),S=StiTitleMeasureHelper.measureTitle3(null,s,n.title,a),m=(S.height=S.height*u,S.height>s.height/2&&(S.height=s.height/2),1);if(o.sizeMode==StiTextSizeMode.Fit||o.sizeMode==StiTextSizeMode.FitAndWordWrap){let t=S.width>s.width?s.width/S.width:1,e=S.height>s.height?s.height/S.height:1;m=Math.min(Math.abs(t),Math.abs(e))}let h=this.getTitleForeColor(t),c=Color.transparent.equals(h)?StiDashboardStyleHelper.getTitleForeColor(t):h,d=this.getTitleFont(t),g=1==m?d:StiFontUtils.changeFontSize(d,d.size*m),p=i.is(StiImageDashboardExportSettings)&&i.imageType==StiImageType.Svg||i.is(StiSvgDashboardExportSettings)||i.is(StiHtmlDashboardExportSettings),C=this.getTitleBackColor(t),b=Color.transparent.equals(C)?StiDashboardStyleHelper.getBackColor(t,null,p):C,w=StiDashboardStyleHelper.getBackColor(t,null,!0),f=(b.equals(w)&&(b=Color.transparent),i.format==__.f.StiDashboardExportFormat.Html&&t.is(IStiChartElement)&&(s.x+=3,s.y+=3),new StiText),y=(f.name=t.name+`_Title`,f.allowHtmlTags=!0,f.clientRectangle=new Rectangle(s.x,s.y,s.width,S.height),f.text=await StiReportParser.parseAsync(a,t),f.font=g,f.horAlignment=this.convert(o.horAlignment),f.trimming=o.sizeMode==StiTextSizeMode.Trimming?StringTrimming.EllipsisCharacter:StringTrimming.None,f.wordWrap=o.sizeMode==StiTextSizeMode.WordWrap||o.sizeMode==StiTextSizeMode.FitAndWordWrap,f.vertAlignment=StiVertAlignment.Center,f.textBrush=new StiSolidBrush(c),f.brush=new StiSolidBrush(b),s.height-=f.height,s.y+=f.height,null==(r=o[Stimulsoft.System.StiObject.stimulsoft]().as(IStiTitlePadding))?void 0:r.padding),M=(null!=y&&(s.y+=y.top+y.bottom,s.height-=y.top+y.bottom,f.left+=y.left,f.width-=y.left+y.right,f.top+=y.top),null==(l=t.as(IStiCornerRadius))?void 0:l.cornerRadius);return null!=M&&((0<M.topLeft||0<M.topRight)&&(f.cornerRadius=new StiCornerRadius(M.topLeft,M.topRight,0,0)),0<M.topLeft&&(f.margins.left=Math.max(f.margins.left,M.topLeft/2)),0<M.topRight)&&(f.margins.right=Math.max(f.margins.right,M.topRight/2)),e.components.add(f),s}static getTitleBackColor(t){let e=StiDashboardStyleHelper.getElementTitleStyle(t);if(null!=e&&e.allowUseTitle)return e.titleBackColor;if(t.is(IStiTitleElement))return t.title.backColor;return Color.transparent}static getTitleForeColor(t){let e=StiDashboardStyleHelper.getElementTitleStyle(t);if(null!=e&&e.allowUseTitle)return e.titleForeColor;if(t.is(IStiTitleElement))return t.title.foreColor;return Color.black}static getTitleFont(t){let e=StiDashboardStyleHelper.getElementTitleStyle(t);if(null!=e&&e.allowUseTitle)return e.titleFont;if(t.is(IStiTitleElement))return t.title.font;return null}static getTitleText(e){if(e.is(IStiTitleElement)){if(e.is(StiChartElement)&&e.showViewTitle){let t=e.userViewStates.firstOrDefault(t=>t.key==e.selectedViewStateKey);if(null!=t)return t.name}return e.title.text}return null}static convert(t){switch(t){case StiHorAlignment.Left:return StiTextHorAlignment.Left;case StiHorAlignment.Center:return StiTextHorAlignment.Center;case StiHorAlignment.Right:return StiTextHorAlignment.Right;default:throw new StiTypeNotRecognizedException(t)}}},__.A.StiLayoutExportHelper=class{static excludeMargin(e,i){if(e.is(IStiMargin)){let t=e.margin;if(!t.isEmpty)return new Rectangle(i.x+t.left,i.y+t.top,Math.max(1,i.width-t.left-t.right),Math.max(1,i.height-t.top-t.bottom))}return i}static excludePadding(e,i,r){if(e.is(IStiPadding)){let t=e.padding;if(!t.isEmpty)return new Rectangle(i.x+t.left*r,i.y+t.top*r,Math.max(1,i.width-t.left*r-t.right*r),Math.max(1,i.height-t.top*r-t.bottom*r))}return i}static excludeCornerRadius(n,s,o){if(n.is(IStiCornerRadius)){let t=n.cornerRadius;if(t.isDefault())return s;let e=Math.max(t.topLeft*o/2,t.bottomLeft*o/2),i=Math.max(t.topLeft*o/2,t.topRight*o/2),r=Math.max(t.topRight*o/2,t.bottomRight*o/2),l=Math.max(t.bottomLeft*o/2,t.bottomRight*o/2);return new Rectangle(s.x+e,s.y+i,Math.max(1,s.width-e-r),Math.max(1,s.height-i-l))}return s}},Stimulsoft.Report.Components.IStiBorder),StiExportFormat=(__.A.StiBorderExportHelper=class{static render(t,e,i){t.is(IStiSimpleBorder)&&e.is(IStiBorder)&&i.renderBorders&&(e.border=t.border2.getBorder(),e.border.topmost=!0)}},__.A.StiBackColorExportHelper=class{static render(t,e){e.is(IStiBackColor)&&(e.backColor=StiDashboardStyleHelper.getBackColor(t))}},Stimulsoft.Report.StiExportFormat),IStiExcelDashboardExportSettings=(__.A.StiExportFormatHelper=class{static convert(t){switch(t){case __.f.StiDashboardExportFormat.Pdf:return StiExportFormat.Pdf;case __.f.StiDashboardExportFormat.Excel:return StiExportFormat.Excel;case __.f.StiDashboardExportFormat.Html:return StiExportFormat.Html;case __.f.StiDashboardExportFormat.Data:return StiExportFormat.Data;case __.f.StiDashboardExportFormat.Image:return StiExportFormat.Image;case __.f.StiDashboardExportFormat.Document:return StiExportFormat.Document;default:throw new StiTypeNotRecognizedException(t)}}},Stimulsoft.Report.Dashboard.Export.IStiExcelDashboardExportSettings),IStiPdfDashboardExportSettings=(__.y.StiExcelDashboardExportSettings=class extends __.y.StiDashboardExportSettings{constructor(){super(...arguments),this.format=__.f.StiDashboardExportFormat.Excel,this.imageQuality=200,this.scaleMode=StiDashboardScaleMode.ViewSize}implements(){let t=super.implements().concat([IStiSizeExportSettings,IStiExcelDashboardExportSettings,__.y.IStiDashboardScaleMode]);return(this.implements=()=>t)()}get width(){return this._width}set width(t){this._width=t,this.paperSize=PaperKind.Custom}get height(){return this._height}set height(t){this._height=t,this.paperSize=PaperKind.Custom}toParameters(){let t=super.toParameters();return t.Width=0,t.Height=0,t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t}},Stimulsoft.Report.Dashboard.Export.IStiPdfDashboardExportSettings),StiDataType=(__.y.StiPdfDashboardExportSettings=class extends __.y.StiDashboardExportSettings{constructor(){super(...arguments),this.format=__.f.StiDashboardExportFormat.Pdf,this.imageQuality=200,this.scaleMode=StiDashboardScaleMode.PaperSize}implements(){let t=super.implements().concat([IStiPdfDashboardExportSettings,IStiDashboardScaleMode]);return(this.implements=()=>t)()}toParameters(){let t=super.toParameters();return t.ScaleMode=Enum.getName(StiDashboardScaleMode,this.scaleMode),t}},Stimulsoft.Report.Export.StiDataType),IStiDataDashboardExportSettings=Stimulsoft.Report.Dashboard.Export.IStiDataDashboardExportSettings,StiHtmlChartType=(__.y.StiDataDashboardExportSettings=class extends __.y.StiDashboardExportSettings{implements(){let t=super.implements().concat([IStiDataDashboardExportSettings]);return(this.implements=()=>t)()}toParameters(){let t=super.toParameters();return t.DataType=Stimulsoft.System.Enum.getName(StiDataType,this.dataType),t}constructor(t){super(),this.format=__.f.StiDashboardExportFormat.Data,this.dataType=StiDataType.Csv,null!=t&&(this.dataType=t)}},Stimulsoft.Report.Export.StiHtmlChartType),StiHtmlExportSettings=Stimulsoft.Report.Export.StiHtmlExportSettings,StiDataExportSettings=Stimulsoft.Report.Export.StiDataExportSettings,StiImageExportSettings=Stimulsoft.Report.Export.StiImageExportSettings,StiSvgExportSettings=Stimulsoft.Report.Export.StiSvgExportSettings,StiDataDashboardExportSettings=__.y.StiDataDashboardExportSettings,StiExcelDashboardExportSettings=__.y.StiExcelDashboardExportSettings,StiPdfDashboardExportSettings=__.y.StiPdfDashboardExportSettings,StiDashboardExportSettings=__.y.StiDashboardExportSettings,StiDataExportMode=Stimulsoft.Report.Export.StiDataExportMode,StiPdfExportSettings=Stimulsoft.Report.Export.StiPdfExportSettings,StiExcelExportSettings=Stimulsoft.Report.Export.StiExcelExportSettings,XmlTextWriter=(__.A.StiExportSettingsHelper=class{static getExportSettings(i){switch(i.format){case __.f.StiDashboardExportFormat.Pdf:{let t=new StiPdfExportSettings;return t.imageQuality=1,t.imageResolution=i.imageQuality,t}case __.f.StiDashboardExportFormat.Excel:{let t=new StiExcelExportSettings;return t.imageQuality=1,t.imageResolution=i.imageQuality,t}case __.f.StiDashboardExportFormat.Data:{let t=new StiDataExportSettings;return t.dataType=i.dataType,t.dataExportMode=StiDataExportMode.DataAndHeadersFooters,t.skipColumnHeaders=!0,t}case __.f.StiDashboardExportFormat.Image:{let e=i.imageType;switch(e){case StiImageType.Svg:return new StiSvgExportSettings;default:{let t=new StiImageExportSettings;return t.imageType=e,t.imageZoom=i.scale/100,t.imageResolution=100,t}}}case __.f.StiDashboardExportFormat.Html:{let t=new StiHtmlExportSettings;return t.imageResolution=i.imageQuality,t.useEmbeddedImages=!0,t.zoom=i.scale/100,t.addPageBreaks=!1,t.chartType=i.enableAnimation?StiHtmlChartType.AnimatedVector:StiHtmlChartType.Vector,t}case __.f.StiDashboardExportFormat.Document:return null;default:throw new StiTypeNotRecognizedException(i.format)}}static getDashboardExportSettings(t){if(t instanceof StiDashboardExportSettings)return t;let e=null==t?StiExportFormat.Document:t.getExportFormat(),i=this.getDashboardExportSettings2(e);switch(e){case StiExportFormat.Html:i.enableAnimation=t.chartType==StiHtmlChartType.AnimatedVector;break}return i}static getDashboardExportSettings2(t){switch(t){case StiExportFormat.Pdf:return new StiPdfDashboardExportSettings;case StiExportFormat.Excel:return new StiExcelDashboardExportSettings;case StiExportFormat.Data:return new StiDataDashboardExportSettings;case StiExportFormat.Csv:return new StiDataDashboardExportSettings(StiDataType.Csv);case StiExportFormat.Dbf:return new StiDataDashboardExportSettings(StiDataType.Dbf);case StiExportFormat.Xml:return new StiDataDashboardExportSettings(StiDataType.Xml);case StiExportFormat.Json:return new StiDataDashboardExportSettings(StiDataType.Json);case StiExportFormat.Dif:return new StiDataDashboardExportSettings(StiDataType.Dif);case StiExportFormat.Sylk:return new StiDataDashboardExportSettings(StiDataType.Sylk);case StiExportFormat.Image:return new StiImageDashboardExportSettings;case StiExportFormat.ImageBmp:return new StiImageDashboardExportSettings(StiImageType.Bmp);case StiExportFormat.ImageGif:return new StiImageDashboardExportSettings(StiImageType.Gif);case StiExportFormat.ImagePng:return new StiImageDashboardExportSettings(StiImageType.Png);case StiExportFormat.ImageTiff:return new StiImageDashboardExportSettings(StiImageType.Tiff);case StiExportFormat.ImageJpeg:return new StiImageDashboardExportSettings(StiImageType.Jpeg);case StiExportFormat.ImageEmf:return new StiImageDashboardExportSettings(StiImageType.Emf);case StiExportFormat.ImagePcx:return new StiImageDashboardExportSettings(StiImageType.Pcx);case StiExportFormat.ImageSvgz:return new StiImageDashboardExportSettings(StiImageType.Svgz);case StiExportFormat.ImageSvg:return new StiSvgDashboardExportSettings;case StiExportFormat.Html:return new StiHtmlDashboardExportSettings;case StiExportFormat.Document:return null;default:throw new StiTypeNotRecognizedException(t)}}static isDataExport(t){return t.is(StiDataDashboardExportSettings)||t.is(StiExcelDashboardExportSettings)&&t.exportDataOnly}},Stimulsoft.System.Xml.XmlTextWriter),StiImage=Stimulsoft.Report.Components.StiImage;{class StiElementExportTool extends __.z.StiExportTool{async render(t,e,i,r){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;await this.renderContent(t,e,i.clone())}async renderContent(t,e,i){let r=new StiImage(i),l=(r.name=t.name+`_Content`,r.stretch=!0,r.aspectRatio=!1,await this.draw(t,i));r.imageToDraw=l,e.components.add(r)}async drawElement(e,t){let i=new Image,r=new XmlTextWriter(Encoding.UTF8),l=new StiSvgData;if(l.x=0,l.y=0,l.width=t.width,l.height=t.height,l.component=e.as(StiComponent),e.is(IStiBackColor)){let t=StiDashboardStyleHelper.getBackColor(e);t.a<255&&(t=Color.white),r.writeStartElement("rect"),r.writeAttributeString("x","0"),r.writeAttributeString("y","0"),r.writeAttributeString("height",l.height.toString()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(",",".")),r.writeAttributeString("width",l.width.toString()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(",",".")),r.writeAttributeString("style",StiContextSvgHelper.writeFillBrush(r,t,new RectangleD(0,0,l.width,l.height))),r.writeEndElement()}if(e.is(StiProgressElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createProgressVisualSvgHelper();null!=t&&await t.writeProgress(r,l)}else if(e.is(StiIndicatorElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createIndicatorVisualSvgHelper();null!=t&&await t.writeIndicator(r,l)}else if(e.is(StiCardsElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createCardsVisualSvgHelper();null!=t&&await t.writeCards(r,l)}else if(e.is(StiGaugeElement)){let t=Stimulsoft.Report.Dashboards.StiDashboardHelperCreator.createGaugeVisualSvgHelper();null!=t&&await t.writeGauge(r,l,!1)}let n=Stimulsoft.Report.Resources.StimulsoftFont.getBase64Content(),s="<style>@font-face {font-family: 'Stimulsoft';src: url(data:font/ttf;base64,"+n+") format('truetype');font-weight: normal;font-style: normal;}</style>",o=StiString.format('<svg xmlns="http://www.w3.org/2000/svg" width="{0}" height="{1}"><defs>{3}</defs><rect x="0" y="0" width="{0}" height="{1}" style="fill: white;"/>{2}</svg>',l.width.toString(),l.height.toString(),r.textWriter.getStringBuilder().toString(),s);return i.svg=o,await i.convertAsync(Stimulsoft.System.Drawing.Imaging.ImageFormat.Jpeg),i}async draw(e,t){if(e.is(StiImageElement)){let t=await e.imageToDraw;return null!=t&&(t.url=e.imageHyperlink),t}let i=new Rectangle(0,0,Math.trunc(t.width),Math.trunc(t.height));if(e.is(StiIndicatorElement)||e.is(StiProgressElement)||e.is(StiGaugeElement)||e.is(StiCardsElement))return this.drawElement(e,i);let r=new Image;try{if(e.is(IStiBackColor)){let t=StiDashboardStyleHelper.getBackColor(e);t.a<255&&(t=Color.white)}await this.paintContent(null,i,e)}catch(t){}return r}async paintContent(t,e,i){try{await this.paintAtom(t,e.clone(),i)}catch(t){}finally{}}async paintAtom(t,e,i){let r=null;if(i.isQuerable&&null==(r=await StiElementExportTool.getDataTable(i)))return}static async getDataTable(t){let e,i=null==(e=t.as(IStiManuallyEnteredData))?void 0:e.getManuallyEnteredDataTable();if(null!=i)return i;return StiElementDataCache.tryToGetOrCreate(t)}renderEmptyDataMessage(e,i,r,t){var l;if(!t.is(StiSvgDashboardExportSettings)||t.renderEmptyContent)return!1;if(e.is(IStiRegionMapElement)&&e.dataFrom==StiMapSource.Manual)return!1;if(e.is(IStiImageElement)&&(null!=e.image||null!=e.icon||!StiString.isNullOrEmpty(e.imageHyperlink)))return!1;if(e.is(IStiWebContentElement)&&(!StiString.isNullOrEmpty(e.url)||!StiString.isNullOrEmpty(e.embedCode)))return!1;if(0<e.getMeters().length||(null==(l=e.as(IStiManuallyEnteredData))?void 0:l.dataMode)==StiDataMode.ManuallyEnteringData)return!1;let n=r.size,s=new Font("Arial",9),o=e.is(IStiWebContentElement)?Loc.get("FormStyleDesigner","NotSpecified"):e.is(IStiImageElement)?Loc.get("Dashboard","ImageNotSpecified"):Loc.get("Dashboard","DragDropDataFromDictionary"),a=Graphics.measureString(o,s);if(r.y+=r.height/2-48,r.height=Math.min(32,r.height),48<=n.width&&64<=n.height){r.y+=n.width>a.width+16?16:32;let t=new StiImage(new Rectangle(r.width/2-16,r.y,32,32));t.name=e.name+`_EmptyImage`,t.horAlignment=StiHorAlignment.Center,t.image=Stimulsoft.Base.Drawing.StiImageConverter.stringToImage(this.getEmptyDataImage(e)),i.components.add(t)}if(n.width>a.width+16&&32<=n.height){r.y+=32;let t=new StiText(r);t.name=e.name+`_EmptyText`,t.horAlignment=StiTextHorAlignment.Center,t.vertAlignment=StiVertAlignment.Center,t.font=s,t.text=o,t.textBrush=new StiSolidBrush(Color.darkGray),i.components.add(t)}return!0}format(t,e){var i,r;if(null!=e&&null!=t){if(e instanceof DateTime&&!t.textFormat.is(StiDateFormatService))return e.toShortDateString();return StiExtValueConverter.isEligable(e,null==(i=null==t?void 0:t.report)?void 0:i.culture)?StiExtValueConverter.convert(e,null==(r=null==t?void 0:t.report)?void 0:r.culture):t.textFormat.format(e)}return""}getEmptyDataImage(t){if(t.is(Stimulsoft.Report.Dashboard.IStiTableElement))return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPA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ml5OzC+BIHaNi7XabW1ICl0olLo9pCupifuou0MeoCBKB0R0YzXFmuxETX8dyIyKlyIBr4sUtLy/dCW3LST6ft25HqbZiOEafI8Wm7dhneUkFYLtmpe3Uu/9tAGlW9ZcCqPNeXV6eAvjVn2Z/1r4A4YX01RrCMf0AAAAASUVORK5CYII=";return null}}__.z.StiElementExportTool=StiElementExportTool}let StiChartElementBuilder=__.i.StiChartElementBuilder,StiGaugeVisualSvgHelper=(__.z.StiChartElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r,l){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;let n=t.as(StiChartElement),s=null,o=(0<n.chartValuesList().length&&(s=await __.z.StiElementExportTool.getDataTable(n)),await StiChartElementBuilder.create(n).render(n,s)),a=(o.horSpacing=0,o.vertSpacing=0,StiExportTool.getScaleFactor(e,r));StiChartElementBuilder.scaleFont(o,a);for(let t=0;t<o.series.count;t++){if(null==l||t>=l.length)break;o.series.getByIndex(t).valuesStart=l[t]}o.name=t.name+`_Content`,o.clientRectangle=i.clone(),e.components.add(o)}},__.h.StiGaugeVisualSvgHelper),StiImageElementExportTool=(__.z.StiGaugeElementExportTool=class extends __.z.StiElementExportTool{async render(t,s,e,i){if(this.renderEmptyDataMessage(t,s,e.clone(),i))return;let o=t.as(StiGaugeElement),a=await __.z.StiElementExportTool.getDataTable(t),u=(new StiGaugeElementBuilder).render2(o,e.size,a);if(1!=(await u()).count2()||i.is(StiExcelDashboardExportSettings)||i.is(StiPdfDashboardExportSettings)){if(0<(await u()).count2())if(i.isDesignMode||i.format!=__.f.StiDashboardExportFormat.Html)await this.renderContent(t,s,e.clone());else{let r=0,l=StiElementLocationHelper.getLocationRectangles(e,(await u()).count2(),o),n=l[0].clone();for(let i of await(u=(new StiGaugeElementBuilder).render2(o,n.size,a))()){let t=l[r].clone(),e={ref:0};StiString.isNullOrEmpty(i.series)||(await this.renderSingleGaugeTitleFromIteration(o,s,i,t,n,u,r,e),t.height-=e.ref,t.y+=e.ref),this.renderSingleGaugeFromIteration(o,s,i,t,r),r++}}}else this.renderSingleGaugeFromIteration(o,s,(await u()).firstOrDefault(),e)}renderSingleGaugeFromIteration(t,e,i,r,l=0){let n=i.gauge;n.name=t.name+`_Content`+l,n.clientRectangle=r,n.style=StiDashboardStyleHelper.getGaugeStyle(t),n.customStyleName=t.customStyleName,n.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t,null,!0)),e.components.add(n)}async renderSingleGaugeTitleFromIteration(s,o,t,a,e,i,u,S){let m=t.series,h=StiDashboardStyleHelper.getFont(s),r=await StiGaugeVisualSvgHelper.getTitleHeight(null,i,a,s,null),c=await StiGaugeVisualSvgHelper.getTitleMinFontSize(null,i,h,e.width,e.height);if(S.ref=r||0,null!=r){let t=new Rectangle(a.x,a.y,a.width,S.ref),e=StiFontUtils.changeFontSize(h,c),i=StiTitleMeasureHelper.measureTitle4(null,t,h,m),r=(t.height=i.height,StiDashboardExpressionHelper.getForeColor(s,s.foreColor)),l=Color.transparent.equals(r)?StiDashboardStyleHelper.getForeColor(s):r,n=new StiText(t);n.name=s.name+`_ContentTitle`+u,n.brush=new StiSolidBrush(Color.transparent),n.text=m,n.font=e,n.textBrush=new StiSolidBrush(l),n.horAlignment=StiTextHorAlignment.Center,o.components.add(n)}}},__.z.StiImageElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;await this.renderContent(t,e,i.clone())}async renderContent(t,e,s){let o=t.as(StiImageElement),a=await this.draw(o,s.clone());if(o.aspectRatio&&null!=a){let t=s.width/a.width,e=s.height/a.height,i=(t=e=t<e?t:e,a.width*(t=e)),r=a.height*e,l=this.calculateHorAlignmentPosition(o,s,i),n=this.calculateVertAlignmentPosition(o,s,r);s=new Rectangle(l,n,i,r)}let i=new StiImage(s);i.name=o.name+`_Content`,i.stretch=!0,i.aspectRatio=!1,i.imageToDraw=a,e.components.add(i)}calculateHorAlignmentPosition(t,e,i){switch(t.horAlignment){case StiHorAlignment.Left:return e.x;case StiHorAlignment.Right:return e.right-i;default:return e.x+(e.width-i)/2}}calculateVertAlignmentPosition(t,e,i){switch(t.vertAlignment){case StiVertAlignment.Top:return e.y;case StiVertAlignment.Bottom:return e.bottom-i;default:return e.y+(e.height-i)/2}}},__.z.StiImageElementExportTool),StiGaugeElementExportTool=__.z.StiGaugeElementExportTool,StiChartElementExportTool=__.z.StiChartElementExportTool,StiExportSettingsHelper=__.A.StiExportSettingsHelper,StiExportFormatHelper=__.A.StiExportFormatHelper,StiElementExportTool=__.z.StiElementExportTool,StiTitleExportHelper=__.A.StiTitleExportHelper,StiBackColorExportHelper=__.A.StiBackColorExportHelper,StiBorderExportHelper=__.A.StiBorderExportHelper,StiLayoutExportHelper=__.A.StiLayoutExportHelper,IStiReport=Stimulsoft.Base.IStiReport;{class W70{static exportAsync(e,i,r){setTimeout(async function(){let t=await W70.export(i,r);e(t)})}static export(t,e){let i;return i=e instanceof StiDashboardExportSettings?e:e instanceof StiExportSettings?__.A.StiExportSettingsHelper.getDashboardExportSettings(e):__.A.StiExportSettingsHelper.getDashboardExportSettings2(e),this.exportToStream(t,i)}static async exportToStream(e,i){let t,n=new StiReport,r=(n.isDocument=!0,n.reportUnit=StiReportUnitType.HundredthsOfInch,n.renderedPages.getByIndex(0)),l=(r.orientation=i.orientation,r.paperSize=i.paperSize,(i.is(StiExcelDashboardExportSettings)||i.is(StiDataDashboardExportSettings)||i.is(StiImageDashboardExportSettings))&&(r.margins=new StiMargins(0)),i),s=("width"in i&&null!=l&&0<l.width&&0<l.height&&(r.width=l.width,r.height=l.height),null==(t=e.as(IStiDashboardWatermark))?void 0:t.dashboardWatermark),o=(r.tagValue=s,null==r.tagValue&&(r.tagValue="*Dashboards*"),null);if(e.is(IStiReport))await this.renderCellReportAsync(e,n,r,i);else if(e.is(IStiDashboard)){let t=e.as(IStiDashboard);(o=t.report).currentPage=o.pages.indexOf(t.page),await this.renderCellDashboardAsync(e,r,i)}else if(e.is(IStiElement)){let t=e.as(IStiElement);(o=t.report).currentPage=o.pages.indexOf(t.page),await this.renderCellElement(e,n,r,i)}n.parentReport=o;for(let r of n.renderedPages.list)r.components.toList().where(t=>t.is(StiContainer)).cast().forEach(t=>{let e=r.components.indexOf(t)+1,i=t.getComponentsList();for(let t=0;t<i.length;t++)i[t].page=r,i[t].setDirectDisplayRectangle(i[t].componentToPage(i[t].displayRectangle)),r.components.insert(e+t,i[t]);t.components.clear()});if(0<n.renderedPages.count&&!(Stimulsoft.Base.hpale.hdAKf.ANZwS()||(Stimulsoft.Base.hpale.hdAKf.LHMdC()||Stimulsoft.Base.hpale.hdAKf.RHahK())&&Stimulsoft.System.NodeJs.isStandaloneVersion)){let t=n.renderedPages.getByIndex(0),e=t.report.unit.convertFromHInches(200),i=t.report.unit.convertFromHInches(52),r=new Rectangle((t.width-e)/2,t.height-i,e,i),l=new StiImage(r);l.stretch=!0,l.printable=!1,l.image=Stimulsoft.Report.Export.StiExportUtils.getAdditionalData2(192),l.name=Stimulsoft.Report.StiNameValidator.correctName(Stimulsoft.System.Guid.newGuidString().substring(0,8)),l.componentPlacement="pf.PageFooterBand",t.components.add(l)}let a,u=null==i?StiExportFormat.Document:StiExportFormatHelper.convert(i.format);if(u==StiExportFormat.Document)a=Stimulsoft.System.Text.Encoding.UTF8.getBytes(n.saveDocumentToJsonString());else{let t=StiExportSettingsHelper.getExportSettings(i),e=await n.exportDocumentAsync2(u,null,t);a="string"==typeof e?Stimulsoft.System.Text.Encoding.UTF8.getBytes(e):"undefined"!=typeof Buffer&&Buffer.isBuffer(e)?e.toJSON().data:e}return a}static async renderCellReportAsync(t,e,i,r){let l=t.as(IStiReport).fetchPages().where(t=>t.is(IStiDashboard)).cast();for(let t=0;t<l.length;t++)0<t&&(i=i.clone(!0,!1),e.renderedPages.add(i)),this.setUpPage(i,l[t],r),await this.renderDashboardAsync(i,l[t],r)}static async renderCellDashboardAsync(t,e,i){this.setUpPage(e,t,i),await this.renderDashboardAsync(e,t.as(IStiDashboard),i)}static async renderCellElement(t,e,i,r){let l=t.as(IStiElement);l.is(IStiRegionMapElement)&&e.dictionary.resources.addRange(l.report.dictionary.resources),e.reportAlias=l.name,this.setUpPage(i,t,r),await this.renderSingleElementAsync(i,l,r)}static async renderDashboardAsync(e,t,i){if(null==t)return;null!=i&&(i.renderSinglePage=!0,i.renderSingleElement=!1);let r=t.as(StiDashboard),l=await r.getElements(!1).whereAsync(async t=>t.isEnabledAsync()),n=1,s=1;if(i.is(IStiDashboardScaleMode)){let t=i.as(IStiDashboardScaleMode).scaleMode;switch(t){case StiDashboardScaleMode.PaperSize:n=e.width/r.width,s=e.height/r.height;break;case StiDashboardScaleMode.ViewSize:{let t=Math.min(e.width/i.viewportWidth,e.height/i.viewportHeight);n=i.viewportWidth/r.width*t,s=i.viewportHeight/r.height*t;break}case StiDashboardScaleMode.DesignSize:n=s=Math.min(e.width/r.width,e.height/r.height);break}}e.brush=new StiSolidBrush(StiDashboardStyleHelper.getDashboardBackColor(t,!1)),await this.renderElementsAsync(e,l,n,s,i)}static async renderSingleElementAsync(t,e,i){if(null==e||!await e.isEnabledAsync())return;null!=i&&(i.renderSingleElement=!0),t.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(e));let r=e.as(StiComponent),l=t.width/r.width,n=t.height/r.height,s=await this.renderElementAsync(t,e,l,n,i),o=StiExportSettingsHelper.isDataExport(i),a=e.margin;s.left=o?0:a.left,s.top=o?0:a.top}static setUpPage(i,r,l){var t;if(l.is(StiPdfDashboardExportSettings)&&(i.orientation=l.as(StiPdfDashboardExportSettings).orientation,i.paperSize=l.as(StiPdfDashboardExportSettings).paperSize),(l.is(StiExcelDashboardExportSettings)||l.is(StiDataDashboardExportSettings)||l.is(StiHtmlDashboardExportSettings)||l.is(StiImageDashboardExportSettings))&&(i.margins=new StiMargins(0)),l.is(IStiDashboardScaleMode)){let t=l.as(IStiDashboardScaleMode).scaleMode,e=(0!=l.viewportWidth&&0!=l.viewportHeight&&t==StiDashboardScaleMode.ViewSize||(l.viewportWidth=r.as(StiComponent).width,l.viewportHeight=r.as(StiComponent).height),l.as(IStiSizeExportSettings));null!=e&&0<e.width&&0<e.height&&(l.viewportWidth=e.width,l.viewportHeight=e.height),l.is(StiPdfDashboardExportSettings)||(i.width=l.viewportWidth,i.height=l.viewportHeight)}let e=null==(t=r.as(IStiDashboardWatermark))?void 0:t.dashboardWatermark;i.tagValue=e,null==i.tagValue&&(i.tagValue="*Dashboards*"),null!=e&&(e.textEnabled&&(i.watermark.text=e.text,i.watermark.textBrush=new StiSolidBrush(e.textColor),i.watermark.font=e.textFont,i.watermark.angle=e.textAngle,i.watermark.showBehind=!0),e.imageEnabled)&&(i.watermark.image=e.image,i.watermark.aspectRatio=e.imageAspectRatio,i.watermark.imageAlignment=e.imageAlignment,i.watermark.imageMultipleFactor=e.imageMultipleFactor,i.watermark.imageStretch=e.imageStretch,i.watermark.imageTiling=e.imageTiling,i.watermark.imageTransparency=e.imageTransparency,i.watermark.showImageBehind=!0)}static async renderElementsAsync(r,e,l,n,s){null!=s&&(s.renderSingleElement=!1);for(let t of e){let e=await this.renderElementAsync(r,t,l,n,s),i=t.as(StiPanelElement);if(null!=i){let t=i.getComponents().toList().where(t=>t.is(IStiElement)).cast();await this.renderElementsAsync(e,t,l,n,s)}}}static async renderElementAsync(t,e,i,r,l,n,s={ref:new Stimulsoft.System.Drawing.Rectangle},o=new List){let a,u=e.as(StiComponent),S=StiExportSettingsHelper.isDataExport(l),m=Math.round(u.left*i),h=Math.round(u.top*r),c=Math.round(u.right*i),d=Math.round(u.bottom*r),g=new Rectangle(m,h,c-m,d-h);if(S||(g=StiLayoutExportHelper.excludeMargin(e,g)),u.parent.is(StiPanelElement)){let t=u.parent;g.x-=t.margin.left,g.y-=t.margin.top}let p=new StiPanel(g),C=(p.name=e.name,StiExportTool.isAllowOpacity(l));if(S||(p.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(e,null,C)),p.cornerRadius=null==(a=e.as(IStiCornerRadius))?void 0:a.cornerRadius),t.components.add(p),null!=p.report&&null!=e.report&&(p.report.styles.clear(),p.report.styles.addRange(e.report.styles)),g=await StiTitleExportHelper.render(e,p,l),!S){StiBorderExportHelper.render(e,p,l),StiBackColorExportHelper.render(e,p);let t=StiElementExportTool.getScaleFactor(p,l);g=StiLayoutExportHelper.excludePadding(e,g,t),g=StiLayoutExportHelper.excludeCornerRadius(e,g,t),s.ref=g}let b=StiExportTool.getTool(Type.getType(e));return(b=null==b?new StiElementExportTool:b)[Stimulsoft.System.StiObject.stimulsoft]().is(StiChartElementExportTool)&&l.is(StiHtmlDashboardExportSettings)?(e.previousAnimations=o,await b.render(e,p,g.clone(),l,n)):b[Stimulsoft.System.StiObject.stimulsoft]().is(StiGaugeElementExportTool)&&l.is(StiHtmlDashboardExportSettings)?(e.previousAnimations=o,await b.render(e,p,g.clone(),l)):!b[Stimulsoft.System.StiObject.stimulsoft]().is(StiImageElementExportTool)&&null!=l&&1==l.isDesignMode&&e[Stimulsoft.System.StiObject.stimulsoft]().is(IStiOnlineMapElement)||await b.render(e,p,g.clone(),l),p}}__.f.StiDashboardExportTools=W70}let StiBorderElementHelper=Stimulsoft.Report.Dashboard.Helpers.StiBorderElementHelper,SolidBrush=(__.p.StiElementControlPainter=class{static getBorderContentRect(t,e){return StiBorderElementHelper.getBorderContentRect3(t.clone(),e,StiScale.factor,!1)}},__.p.StiLocHelper=class{static get locAll(){return`(${Loc.get("Report","RangeAll")[Stimulsoft.System.StiObject.stimulsoft]().replaceAll("& ","")})`}},Stimulsoft.System.Drawing.SolidBrush),StiTableElementConditionHelper=__.K.StiTableElementConditionHelper,StringFormat=Stimulsoft.System.Drawing.StringFormat,StringFormatFlags=Stimulsoft.System.Drawing.StringFormatFlags,StiIndicatorCellPainter=(__.C.StiIndicatorCellPainter=class{static async draw(t,e,i,r,l,n,s,o,a,u=!0){let S=await StiTableElementConditionHelper.getIconCondition(n.key,i,r,l),m=(null!=S&&S.iconAlignment!=StiIconAlignment.None&&(await __.C.StiConditionIconPainter.drawIcon(t,S,e,s),e=__.C.StiConditionIconPainter.adjustCellContentRectWithIcon(e,S)),this.getCellText(i,n,o));await this.draw2(t,e.clone(),i,r,l,n,s,o,a,m,u)}static async draw2(i,r,l,t,e,n,s,o,a,u,S=!0){let m=this.measureText(s,u,l.font),h=this.calculateIndicatorRect(r.clone(),n,s,m);if(await this.drawIndicator(i,l,t,e,n,h,o,a),S){let t=this.calculateTextRect(r.clone(),n),e=this.getColor(n,o,a);this.drawText(i,t,n,s,u,l.font,e)}}static async drawIndicator(s,o,a,u,S,m,h,c){let d=Math.min(m.width,m.height);if(null==h||0==h)s.fillRectangle(new RectangleD(m.x+(m.width-d)/2,m.y+(m.height-4)/2,d,5),Color.lightGray);else{let t=.75*d,e=(m=new Rectangle(m.x+(m.width-d)/2,m.y+(m.height-t)/2,d,t)).width/2,i,r,l,n=(l=0<h?(i=new Point(m.left+e,m.top),r=new Point(m.left,m.bottom),new Point(m.right,m.bottom)):(i=new Point(m.left+e,m.bottom),r=new Point(m.left,m.top),new Point(m.right,m.top)),0<h?c.cellIndicatorPositive:c.cellIndicatorNegative);n=await StiTableElementConditionHelper.processForeColor(n,S.key,o,a,u),s.fillPolygon([i,r,l],new SolidBrush(n))}}static drawText(t,e,i,r,l,n,s){if(StiString.isNullOrWhiteSpace(l))return;e.width-=2;let o=new StringFormat,a=StiElementConsts.Table.Font.getGdiFont(r,null,n);o.lineAlignment=StringAlignment.Center,o.alignment=this.toAlignment(i),o.trimming=StringTrimming.None,o.formatFlags|=StringFormatFlags.NoWrap,t.drawString(l,a,s,e.clone(),o)}static measureText(t,e,i){if(StiString.isNullOrWhiteSpace(e))return 0;let r=StiElementConsts.Table.Font.getGdiFont(t,null,i);return StiTextDrawing.measureString(null,e,r).width}static calculateIndicatorRect(e,t,i,r){let l=16*i;switch(this.getHorAlignment(t)){case StiHorAlignment.Left:e=new Rectangle(e.x,e.y,l,e.height);break;case StiHorAlignment.Right:e=new Rectangle(e.right-l,e.y,l,e.height);break;case StiHorAlignment.Center:{let t=r+l;e=new Rectangle(e.right-(e.width-t)/2-l,e.y,l,e.height);break}}return e.inflate(-4*i,-4*i),e}static getCellText(t,e,i){if(null==i)return"";return StiTextFormatHelper.formatAsPercentage2(t.report,e.textFormat,i)}static calculateTextRect(t,e){let i=t.width/4;switch(this.getHorAlignment(e)){case StiHorAlignment.Left:return new Rectangle(t.x+i,t.y,t.width-i,t.height);case StiHorAlignment.Right:return new Rectangle(t.x,t.y,t.width-i,t.height);case StiHorAlignment.Center:return new Rectangle(t.x,t.y,t.width,t.height)}return t}static getColor(t,e,i){if(!Color.transparent.equals(t.foreColor))return t.foreColor;if(0<e)return i.cellIndicatorPositive;if(e<0)return i.cellIndicatorNegative;return i.cellIndicatorNeutral}static toAlignment2(t){if(t[Stimulsoft.System.StiObject.stimulsoft]().is(StringAlignment))return t;let e=t[Stimulsoft.System.StiObject.stimulsoft]().as(IStiHorAlignment);if(null==e)return StringAlignment.Center;return this.toAlignment(e.horAlignment)}static toAlignment(t){switch(t){case StiHorAlignment.Left:return StringAlignment.Near;case StiHorAlignment.Center:return StringAlignment.Center;case StiHorAlignment.Right:return StringAlignment.Far}return StringAlignment.Center}static getHorAlignment(t){let e=t;return null!=e?e.horAlignment:StiHorAlignment.Right}},__.C.StiIndicatorCellPainter),StiDataSortRuleHelper=Stimulsoft.Data.Engine.StiDataSortRuleHelper;{class StiTableElementGdiPainter{static getBackgroundColor(t,e,i,r){return null==e||e.data.backColor.equals(Color.transparent)?r?i.alternatingCellBackColor:i.cellBackColor:r?StiDashboardStyleHelper.isDarkStyle3(t)?StiColorUtils.light(e.data.backColor,25):StiColorUtils.dark(e.data.backColor,25):e.data.backColor}static measureColumn(t,e,i,r,l){let n,s=StiElementConsts.Table.getHeight(i.font,i.zoom);if(r.is2(StiSparklinesColumn))n=this.measureSparklinesCell(i,0,i.zoom);else if(r.is2(StiIndicatorColumn))n=this.measureIndicatorCell(t,i,r,l,i.zoom);else if(r.is2(StiDataBarsColumn))n=this.measureDataBarsCell(t,i,r,l,i.zoom);else if(r.is2(StiBubbleColumn))n=this.measureBubbleCell(t,i,r,l,i.zoom);else if(StiImageHelper.isImage(l))return new Size(0,StiElementConsts.Table.getHeight(i.font,i.zoom));return new Size(n.width,Math.max(n.height,s))}static getArrowSize(t,e){let i=StiElementConsts.Table.getHeight(t.headerFont,t.zoom),r=StiDataSortRuleHelper.getSortDirection(t.userSorts,e.key);if(r!=StiDataSortDirection.None)return new Size(1.5*i,i);return Size.empty}static getRightImageRect(t,e,i){let r=i.width*t.zoom,l=i.height*t.zoom;return new Rectangle(e.right-3-r,e.y+(e.height-l)/2,r,l)}static measureSparklinesCell(t,e,i){return new Size(Math.max(e,80*i),0)}static measureIndicatorCell(t,e,i,r,l){let n=i,s=StiIndicatorCellPainter.getCellText(e,n,StiValueHelper.tryToNullableNumber(r)),o=this.measureCell2(t,s,e.font,i);return o.width=(o.width+4)*l*1.25,o}static measureDataBarsCell(t,e,i,r,l){let n=StiTextFormatHelper.formatBasedOnColumnType(e,i,r),s=this.measureCell2(t,n,e.font,i);return s.width*=l,i.horAlignment!=StiHorAlignment.Center&&(s.width*=2),i.is(StiDataBarsColumn)&&0<i.width&&(s.width=l*i.width),s}static measureBubbleCell(i,r,l,n,t){let s=StiElementConsts.Table.getHeight(r.font,r.zoom);if(l.horAlignment==StiHorAlignment.Center)return s-=2,new Size(s,StiElementConsts.Table.getHeight(r.font));{let t=StiTextFormatHelper.formatBasedOnColumnType(r,l,n),e=this.measureCell2(i,t,r.font,l);return e.width+=s,e}}static measureCommonCell(t,e,i,r,l,n){let s=StiTextFormatHelper.formatBasedOnColumnType(e,i,r),o=new Size(l,0);return StiImageHelper.isImage(s)||((o=this.measureCell2(t,s,e.font,i)).width*=n,o.height*=n),o}static measureHeader(t,e){return this.measureHeader2(null,t,e)}static measureHeader2(t,e,i){let r=StiLabelHelper.getLabel(i),l=this.measureCell2(t,r,e.headerFont,i);return l.width+=36,l}static measureCell(t,e,i){return this.measureCell2(null,t,e,i)}static measureCell2(t,e,i,r){let l=new Size(8,StiElementConsts.Table.getHeight(i));if(StiString.isNullOrEmpty(e))return l;let n=new __.C.StiTableColumnSizeHelper(i,r),s=i[Stimulsoft.System.StiObject.stimulsoft]().getHashCode().toString()+e+n.getUniqueCode().toString();if(this.captionSizeCache.contains(s)){let t=this.captionSizeCache.get(s);return l.width=t.width,l.height=t.height,l}let o=StiElementConsts.Table.Font.getGdiFont(1,null,i),a=0!=n.width?n.width:n.maxWidth,u=Graphics.measureString(e,o,a);return u.width=n.getColumnWidth(u.width),u.height=n.getColumnHeight(u.height),l.width=u.width,l.height=u.height,this.captionSizeCache.set(s,u),l}static measureHeaders(e,t){let r=StiElementConsts.Table.Font.getGdiFont(1,null,t),l=new Size(8,StiElementConsts.Table.getHeight(r));for(let t of e){let e=new Size(8,0),i=StiLabelHelper.getLabel(t);if(!StiString.isNullOrEmpty(i)){let t=Graphics.measureString(i,r,1e6);e.width+=t.width}l.width+=e.width}return l.width}}StiTableElementGdiPainter.captionSizeCache=new Hashtable,__.q.StiTableElementGdiPainter=StiTableElementGdiPainter}__.C.StiBubbleCellPainter=class{static async draw(l,t,e,i,r,n,s,o,a,u,S,m,h=!0){if(0==o)return;let c=StiTextFormatHelper.formatBasedOnColumnType(e,n,o),d=(0<a&&(a=0),u<0&&(u=0),n.horAlignment),g=t,p=await StiTableElementConditionHelper.getIconCondition(n.key,e,i,r),C=(null!=p&&p.iconAlignment!=StiIconAlignment.None&&(await __.C.StiConditionIconPainter.drawIcon(l,p,g,s),g=__.C.StiConditionIconPainter.adjustCellContentRectWithIcon(g,p)),g.inflate(-2,-2),this.calculateTextRect(e,g,n)),b=(g=this.calculateBubbleRect(e,g,n,Math.abs(o),a,u),StiDashboardStyleHelper.getTableStyle(e)),w=this.getForeColor(e,n,b,S,m);if(h&&d!=StiHorAlignment.Center&&l.drawString(c,e.font,w,C,null),0<g.width&&0<g.height){let t=n.as(StiBubbleColumn),e=t.allowCustomColors?t.positiveColor:b.cellDataBarsPositive,i=t.allowCustomColors?t.negativeColor:b.cellDataBarsNegative,r=new SolidBrush(o<0?i:e);l.fillEllipse(g,r)}}static getForeColor(t,e,i,r,l){if(!Color.transparent.equals(e.foreColor))return e.foreColor;if(!Color.transparent.equals(t.foreColor))return t.foreColor;if(r)return i.alternatingCellForeColor;return l?null!=i?i.selectedCellForeColor:StiElementConsts.Table.Font.Color:null!=i?i.cellForeColor:StiElementConsts.Table.Font.Color}static calculateBubbleRect(t,e,i,r,l,n){let s=i;if(null==s)return e;let o=StiElementConsts.Table.getHeight(t.font,t.zoom),a=(o-=2,Math.max(Math.abs(l),Math.abs(n))),u=Math.abs(o*r/a);switch(s.horAlignment){case StiHorAlignment.Left:return new RectangleD(e.right-o+(o-u)/2,e.y+(e.height-u)/2,u,u);case StiHorAlignment.Center:return new RectangleD(e.x+(e.width-u)/2,e.y+(e.height-u)/2,u,u);case StiHorAlignment.Right:return new RectangleD(e.x+(o-u)/2,e.y+(e.height-u)/2,u,u)}return e}static calculateTextRect(e,i,t){let r=t;if(null!=r){let t=StiElementConsts.Table.getHeight(e.font,e.zoom);switch(r.horAlignment){case StiHorAlignment.Left:i=new RectangleD(i.x,i.y,i.width-t,i.height);break;case StiHorAlignment.Right:i=new RectangleD(i.x+t,i.y,i.width-t,i.height);break}}return i.inflate(-2,-2),i}static getCellText(t,e,i){return StiTextFormatHelper.formatBasedOnColumnType(t,e,i)}},__.C.StiColorScaleCellPainter=class{static getScaleColor(e,i,r,t,l,n){let s=(r-i)/2,o=(e=Math.min(e,r),e=Math.max(e,i),0),a,u,S=t.cellBackColor;if(s<e){let t=r-s;u=0!=t?(o=(e-s)/t,a=Color.fromArgb3(255,S),Color.fromArgb3(255,n)):(a=Color.lightGray,Color.lightGray)}else{let t=s-i;u=0!=t?(o=e/t,a=Color.fromArgb3(255,l),Color.fromArgb3(255,S)):(a=Color.lightGray,Color.lightGray)}let m=(u.a-a.a)*o+a.a,h=(u.r-a.r)*o+a.r,c=(u.g-a.g)*o+a.g,d=(u.b-a.b)*o+a.b;return m=Math.min(m,255),h=Math.min(h,255),c=Math.min(c,255),d=Math.min(d,255),m=Math.max(m,0),h=Math.max(h,0),c=Math.max(c,0),d=Math.max(d,0),Color.fromArgb(Math.round(m),Math.round(h),Math.round(c),Math.round(d))}};let StiSvgGeomWriter=Stimulsoft.Report.Export.StiSvgGeomWriter,StiSvgHelper=Stimulsoft.Report.Export.StiSvgHelper,StiDataBarsDirection=(__.C.StiConditionIconPainter=class{static async drawIcon(h,c,d,g){if(!c||c.iconAlignment===StiIconAlignment.None)return;let t=c.customIcon;if(t){let m=StiImageHelper.getImageFromObject(t);if(m){let t=new RectangleD,e=(c.iconAlignment===StiIconAlignment.Left?t=new RectangleD(d.left,d.top,d.height,d.height):c.iconAlignment===StiIconAlignment.Right&&(t=new RectangleD(d.right-d.height,d.top,d.height,d.height)),m.width),i=m.height,r=t.width/e,l=t.height/i,n=Math.min(r,l),s=e*n,o=i*n,a=(t.width-s)/2,u=(t.height-o)/2,S=new RectangleD;S.x=t.x+a,S.y=t.y+u,S.width=s,S.height=o,S.inflate(-2*g,-2*g),h.drawImage(m,S)}}else{let t=new RectangleD,e=(c.iconAlignment===StiIconAlignment.Left?t=new RectangleD(d.left,d.top,d.height,d.height):c.iconAlignment===StiIconAlignment.Right&&(t=new RectangleD(d.right-d.height,d.top,d.height,d.height)),await StiFontIconsHelper.convertFontIconToImageAsync(c.icon,c.iconColor,t.width,t.height,"0.9em"));h.drawImage(e,t)}}static adjustCellContentRectWithIcon(t,e){if(e.iconAlignment===StiIconAlignment.Left)return new RectangleD(t.left+t.height,t.top,t.width-t.height,t.height);if(e.iconAlignment===StiIconAlignment.Right)return new RectangleD(t.left,t.top,t.width-t.height,t.height);return t}static async getImageWithConditionIcon(t,e,i){let r=t.iconAlignment===StiIconAlignment.Left?new RectangleD(e.x,e.y,e.height,e.height):new RectangleD(e.right-e.height,e.y,e.height,e.height),l=new XmlTextWriter(Encoding.UTF8),n=(l.indentation=-1,l.writeStartElement("svg"),l.writeAttributeString("version","1.1"),l.writeAttributeString("baseProfile","full"),l.writeAttributeString("xmlns","http://www.w3.org/2000/svg"),l.writeAttributeString("xmlns:xlink","http://www.w3.org/1999/xlink"),l.writeAttributeString("xmlns:ev","http://www.w3.org/2001/xml-events"),l.writeAttributeString("height",StiSvgHelper.toUnits(r.height)),l.writeAttributeString("width",StiSvgHelper.toUnits(r.width)),l.writeStartElement("rect"),l.writeAttributeString("x","0"),l.writeAttributeString("y","0"),l.writeAttributeString("width",StiSvgHelper.toUnits(r.width)),l.writeAttributeString("height",StiSvgHelper.toUnits(r.height)),l.writeAttributeString("style",StiSvgHelper.writeFillBrush(l,t.backColor,r)),l.writeEndElement(),new StiSvgGeomWriter(l)),s=(await this.drawIcon(n,t,new RectangleD(0,0,r.width,r.height),1),l.writeFullEndElement(),l.flush(),new StiImage(r)),o=(s.name=i+`_ConditionIcon`,l.textWriter.getStringBuilder().toString());return s.image=StiImageConverter.stringToImage(Stimulsoft.System.Convert.toBase64String(o)),s}},__.K.StiDataBarsDirection),StiDataBarsBrushType=__.K.StiDataBarsBrushType,StiGradientBrush=Stimulsoft.Base.Drawing.StiGradientBrush,IStiControlElement=(__.C.StiDataBarsCellPainter=class{static async draw(t,e,i,r,l,n,s,o,a,u,S,m,h=!0,c=StiDataBarsDirection.LeftToRight,d=StiDataBarsBrushType.Solid){let g=await StiTableElementConditionHelper.getIconCondition(n.key,i,r,l),p=(null!=g&&g.iconAlignment!=StiIconAlignment.None&&(await __.C.StiConditionIconPainter.drawIcon(t,g,e,s),e=__.C.StiConditionIconPainter.adjustCellContentRectWithIcon(e,g)),StiTextFormatHelper.formatBasedOnColumnType(i,n,o));await this.draw2(t,e,o,a,u,s,p,i,r,l,n,S,m,h,c,d)}static async draw2(l,t,n,e,i,r,s,o,a,u,S,m,h,c=!0,d=StiDataBarsDirection.LeftToRight,g=StiDataBarsBrushType.Solid){if(null==n||0==n)return;let p=S,C=(StiString.isNullOrWhiteSpace(p.minimum)||(e=StiValueHelper.tryToNumber(StiReportParser.parse2(p.minimum,o.report))),StiString.isNullOrWhiteSpace(p.maximum)||(i=StiValueHelper.tryToNumber(StiReportParser.parse2(p.maximum,o.report))),e=Math.min(e,0),!1),b=((i=Math.max(i,0))<n&&(C=!0,n=i),n<e&&(C=!0,n=e),S.horAlignment),w=t,f=(w.inflate(-2,-2),this.calculateTextRect(w,S)),y=(w=this.calculateDataBarsRect(w,S),StiDashboardStyleHelper.getTableStyle(o)),M=this.getColorPositive(y,p),I=this.getNegativeColor(y,p),T=this.getOverlappedColor(y,p),x=this.getFillColor(y,p),D=this.getForeColor(o,S,y,m,h),F=(c&&l.drawString(s,o.font,D,f,null),b!=StiHorAlignment.Center&&l.fillRectangle(w,x),i+Math.abs(e)),A=w.width*Math.abs(e)/F,v=w.width*n/F,E=w.width*Math.abs(n)/F,R=0;if(d==StiDataBarsDirection.LeftToRight?w.x+=n<0?A-E:A:(R=180,w.x=n<0?w.right-A:w.right-A-E),w.width=E,n<0&&(R+=180),0<w.width&&0<w.height){if(g==StiDataBarsBrushType.Gradient){let r;if(r=d==StiDataBarsDirection.LeftToRight?0<n?new RectangleD(t.left+A,t.top,v,t.height):new RectangleD(t.left,t.top,A,t.height):n<0?new RectangleD(t.left+v,t.top,A,t.height):new RectangleD(t.left,t.top,v,t.height),0<w.width&&w.width<1&&(w.width=1),0<r.width&&r.width<1&&(r.width=1),0<r.width&&0<w.width){let t=n<0?I:M,e=StiColorUtils.light(t,200),i=(r.x-=.1*r.width,r.width+=.2*r.width,new StiGradientBrush(t,e,R));l.fillRectangle(w,i)}}else{let t=n<0?I:M;t=await StiTableElementConditionHelper.processForeColor(t,S.key,o,a,u),l.fillRectangle(w,t)}if(C){let t=0<=n?new RectangleD(w.right-6*r,w.y,6*r,w.height):new RectangleD(w.x,w.y,6*r,w.height);l.fillRectangle(t,T)}b==StiHorAlignment.Center&&l.drawString(s,o.font,Color.white,f,null)}}static getOverlappedColor(t,e){return e.overlappedColor.equals(Color.transparent)?t.cellDataBarsOverlapped:e.overlappedColor}static getColorPositive(t,e){return e.positiveColor.equals(Color.transparent)?t.cellDataBarsPositive:e.positiveColor}static getNegativeColor(t,e){return e.negativeColor.equals(Color.transparent)?t.cellDataBarsNegative:e.negativeColor}static getFillColor(t,e){return e.fillColor.equals(Color.transparent)?Color.fromArgb3(40,t.cellDataBarsPositive):e.fillColor}static getForeColor(t,e,i,r,l){if(!Color.transparent.equals(e.foreColor))return e.foreColor;if(!Color.transparent.equals(t.foreColor))return t.foreColor;if(r)return i.alternatingCellForeColor;return l?null!=i?i.selectedCellForeColor:StiElementConsts.Table.Font.Color:null!=i?i.cellForeColor:StiElementConsts.Table.Font.Color}static calculateDataBarsRect(t,e){let i=e;if(null==i)return t;switch(i.horAlignment){case StiHorAlignment.Left:return new RectangleD(t.right-t.width/2,t.y,t.width/2,t.height);case StiHorAlignment.Right:return new RectangleD(t.x,t.y,t.width/2,t.height)}return t}static calculateTextRect(t,e){let i=e;if(null!=i)switch(i.horAlignment){case StiHorAlignment.Left:t=new RectangleD(t.x,t.y,t.width/2,t.height);break;case StiHorAlignment.Right:t=new RectangleD(t.right-t.width/2,t.y,t.width/2,t.height);break}return t.inflate(-2,-2),t}},__.C.StiSparklinesCellPainter=class{static draw(t,e,i,r,l){}static castToArray(t){return StiArray.isArray(t)?t:null}},__.C.StiTableColumnSizeHelper=class{getUniqueCode(){let t=0;return t=397*(t=397*(t=397*(t=397*t^this.width)^this.minWidth)^this.maxWidth)^this.wordWrap[Stimulsoft.System.StiObject.stimulsoft]().getHashCode(),Math.abs(t)}getColumnWidth(t,e=!1){if(0!=this.width&&!e)return this.width;if(!this.isMeasurable)return t;return t<this.minWidth&&(t=this.minWidth),t=0!=this.maxWidth&&t>this.maxWidth?this.maxWidth:t}getColumnHeight(t){if(!this.isMeasurable)return t;if(this.maxHeight<t)return this.maxHeight;return t}static isWordWrap(t){let e=t.as(IStiTableColumnSize);if(null==(null==e?void 0:e.size))return!1;return e.size.wordWrap}constructor(t,e){this.width=0,this.minWidth=30,this.maxWidth=300,this.maxHeight=0,this.wordWrap=!1,this.fontUniqueCode=0,this.isMeasurable=!1;let i=(this.column=e).as(IStiTableColumnSize);if(null==(null==i?void 0:i.size))return;this.isMeasurable=!0,this.fontUniqueCode=t.getHashCode();let r=i.size;this.width=r.width,this.minWidth=r.minWidth,this.maxWidth=r.maxWidth,this.maxHeight=r.wordWrap?Number.MAX_VALUE:Math.round(t.getHeight())+1,this.wordWrap=r.wordWrap}},Stimulsoft.Report.Dashboard.IStiControlElement),StiLocHelper=__.p.StiLocHelper,StiComboBoxHelper=__.S.StiComboBoxHelper;{class ko0 extends __.z.StiElementExportTool{async render(r,l,n,t){var i,e,s,o;if(0==r.getMeters().length)return;let a=await StiElementDataCache.tryToGetOrCreate(r);if(null==a)return;let u=t.is(StiSvgDashboardExportSettings)&&t.designMode,S=r.as(StiComboBoxElement),m=ko0.getNameMeterIndex(a),h=ko0.getKeyMeterIndex(a),c=u&&null!=S&&!StiString.isNullOrEmpty(S.initialValue),d=StiExportTool.isAllowOpacity(t),g=new Hashtable;if(1<a.meters.countItems)for(let e of a.rows){let t=null==(i=e[1])?void 0:i[Stimulsoft.System.StiObject.stimulsoft]().toString();StiString.isNullOrWhiteSpace(t)||g.set(t,e[0])}let p=r,C=r,b="";if(p.selectionMode==StiItemSelectionMode.One)if(C.userFilters.any())b=C.userFilters[0].value,b=null!=(e=g.get(b))?e:b;else if(p.showAllValue)b=StiLocHelper.locAll;else{let t=a.rows.firstOrDefault();null!=t&&0<t.length&&null!=t[0]&&(b=t[0].toString())}if(c)if(S.initialValue.includes(";"))b=S.initialValue;else{let t=ko0.getRow(S,a,h);if(null==t)return;let e=-1!=m?t[m]:null,i=-1!=h?t[h]:null;null==e&&null==i||(b=(e||i).toString())}if(this.renderElement(l,r,n,this.format(r.as(IStiControlElement),b),d),p.selectionMode==StiItemSelectionMode.Multi&&!c){let e=n;if(C.userFilters.any()){let i=C.userFilters;if(i.all(t=>t.condition==StiDataFilterCondition.NotEqualTo)){i=new List;for(let t of a.rows){let e=null==(s=t[1])?void 0:s[Stimulsoft.System.StiObject.stimulsoft]().toString();if(C.userFilters.any(t=>t.value==e))continue;i.add(new StiDataFilterRule(null,null,StiDataFilterCondition.EqualTo,e))}}for(let t of i){if(!(e.x+e.width<=n.x+n.width)){while(1<l.components.count)l.components.removeAt(1);this.renderItem(l,r,n,StiString.format(Loc.get("Dashboard","NSelected"),C.userFilters.length));break}(e=this.renderItem(l,r,e,this.format(r.as(IStiControlElement),null!=(o=g.get(t.value))?o:t.value))).x+=e.width+4}}else if(p.showAllValue)this.renderItem(l,r,n,StiLocHelper.locAll);else{let t=this.getValuesCount(r,a);this.renderItem(l,r,n,StiString.format(Loc.get("Dashboard","NSelected"),t))}}}getValuesCount(t,e){let i=t.as(StiComboBoxElement),r=StiComboBoxHelper.fetchItems(i,e,i.showBlanks);return null!=r?r.length:0}renderElement(t,e,i,r,l){let n=StiDashboardStyleHelper.getForeColor(e),s=StiDashboardStyleHelper.getBackColor(e,null,l),o=new StiText(i);o.name=e.name+`_ComboBox`,o.allowHtmlTags=!0,o.vertAlignment=StiVertAlignment.Center,o.horAlignment=StiTextHorAlignment.Left,o.textBrush=new StiSolidBrush(n),o.brush=new StiSolidBrush(s),o.text=this.format(e.as(IStiControlElement),r),o.font=StiDashboardStyleHelper.getFont(e),t.components.add(o)}renderItem(t,e,i,r){let l=StiDashboardStyleHelper.getControlStyle(e),n=new StiText,s=(n.name=e.name+`_ComboBoxItem`,n.allowHtmlTags=!0,n.vertAlignment=StiVertAlignment.Center,n.horAlignment=StiTextHorAlignment.Center,n.textBrush=new StiSolidBrush(l.selectedForeColor),n.brush=new StiSolidBrush(l.selectedBackColor),n.text=this.format(e.as(IStiControlElement),r),n.font=StiDashboardStyleHelper.getFont(e),t.components.add(n),Graphics.measureString(r,n.font));return n.clientRectangle=new Rectangle(i.x,i.y,s.width+4,i.height)}static getNameMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>"StiNameComboBoxMeter"==t[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName());return null!=e?t.meters.indexOf(e):-1}static getKeyMeterIndex(t){if(null==t)return-1;let e=t.meters.firstOrDefault(t=>"StiKeyComboBoxMeter"==t[Stimulsoft.System.StiObject.stimulsoft]().getType()[Stimulsoft.System.StiObject.stimulsoft]().getTypeName());return null!=e?t.meters.indexOf(e):-1}static getRow(i,t,r){if(StiString.isNullOrEmpty(i.initialValue)||-1==r)return t.rows.firstOrDefault();return t.rows.firstOrDefault(t=>{var e;return(null==(e=t[r])?void 0:e.toString())==i.initialValue})}}__.z.StiComboBoxElementExportTool=ko0}let StiDatePickerHelper=__.Q.StiDatePickerHelper,StiListBoxHelper=(__.z.StiDatePickerElementExportTool=class extends __.z.StiElementExportTool{async render(e,i,r,t){let l,n=e;if(null==n.getValueMeter())return;let s=await StiElementDataCache.tryToGetOrCreate(e),o=StiDashboardStyleHelper.getForeColor(e),a=StiDashboardStyleHelper.getBackColor(e);this.storedCulture=null;try{let t=null==(l=e.report)?void 0:l.getParsedCulture();StiString.isNullOrWhiteSpace(t)||(this.storedCulture=CultureInfo.currentCulture,CultureInfo.currentCulture=new CultureInfo(t))}finally{let t=new StiText(r);t.name=e.name+`_Content`,t.allowHtmlTags=!0,t.vertAlignment=StiVertAlignment.Center,t.textBrush=new StiSolidBrush(o),t.brush=new StiSolidBrush(a),t.text=this.getDateTimeString(n,s),t.font=StiDashboardStyleHelper.getFont(n),i.components.add(t),null!=this.storedCulture&&(CultureInfo.currentCulture=this.storedCulture)}}getDateTimeString(i,t){let e,r,l=StiDatePickerHelper.getDefaultValue(i);if(StiVariableExpressionHelper.isVariableSpecifiedAsExpression(i,null==(e=null==i?void 0:i.valueMeter)?void 0:e.expression)){let t=null==(r=StiDatePickerHelper.getVariableSpecifiedAsValue(i))?void 0:r.as(StiVariable);if(Range.isRangeType(null==t?void 0:t.type)&&i.initialRangeSelectionSource==StiInitialDateRangeSelectionSource.Selection){let t={ref:null},e={ref:null};return StiDatePickerHelper.calculateRangeFromInitial(i.initialRangeSelection,t,e),this.getRangeVariableString(i,new DateTimeRange(t.ref,e.ref))}return null!=l&&l[Stimulsoft.System.StiObject.stimulsoft]().is(DateTimeRange)?this.getRangeVariableString(i,l):this.format(i,l)}if(i.userFilters.any()){let t=this.format(i,i.userFilters[0].value);return i.selectionMode!=StiDateSelectionMode.AutoRange&&i.selectionMode!=StiDateSelectionMode.Range||(t+=` - `+this.format(i,i.userFilters[0].value2)),t}return i.selectionMode==StiDateSelectionMode.AutoRange?this.getAutoRangeColumnString(i,t):i.selectionMode==StiDateSelectionMode.Range?this.getRangeColumnString(i):this.format(i,l)}getRangeVariableString(t,e){let i=null==e?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().as(DateTimeRange);return this.format(t,null==i?void 0:i.fromObject)+` - `+this.format(t,null==i?void 0:i.toObject)}getAutoRangeColumnString(i,t){if(null==t)return"";let r=t.rows.select(t=>t[0]).where(t=>null!=t&&t instanceof DateTime);if(r.any()){let t=r.where(t=>t instanceof DateTime).cast().min(),e=r.where(t=>t instanceof DateTime).cast().max();return this.format(i,t)+` - `+this.format(i,e)}return""}getRangeColumnString(t){let e={ref:null},i={ref:null};return StiDatePickerHelper.calculateRangeFromInitial(t.initialRangeSelection,e,i),this.format(t,e.ref)+` - `+this.format(t,i.ref)}},__.P.StiListBoxHelper),StiCheckBox=Stimulsoft.Report.Components.StiCheckBox,StiCheckStyle=Stimulsoft.Report.Components.StiCheckStyle,IStiShape=Stimulsoft.Report.Components.IStiShape;{class bq0 extends __.z.StiElementExportTool{async render(t,l,e,i){if(this.renderEmptyDataMessage(t,l,e.clone(),i))return;let n=l.report,s=l.page,o=t.as(StiListBoxElement),a=l.clone(!0,!1),r=(i.renderSinglePage||(e.height=Number.MAX_VALUE),StiExportTool.isAllowOpacity(i)),u=StiExportTool.getScaleFactor(l,i),S=(await this.renderItems(a,e.clone(),t,r,u),0),m=l.top;0<a.components.count&&(m+=a.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top));while(1){let t=a.getComponentsList(),r=0;for(let i of t){let t=i.bottom,e=i.left;i.is(IStiShape)&&(t+=StiElementConsts.ListBox.ItemHeight/3),null!=o?(o.orientation==StiItemOrientation.Vertical&&t<=l.height||o.orientation==StiItemOrientation.Horizontal&&e<=l.width||0==r)&&(a.components.remove(i),l.components.add(i)):t<=l.height&&(a.components.remove(i),l.components.add(i)),r++}if(i.renderSinglePage||0==a.components.count)break;let e=a.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top);a.getComponentsList().forEach(t=>t.top=t.top-e+1),n.renderedPages.count<=++S&&n.renderedPages.add(s.clone(!0,!1)),s=n.renderedPages.getByIndex(S),l=l.clone(!0,!1),i.renderSingleElement?(l.top=0,l.left=0):l.top=m,s.components.add(l)}for(let t of l.report.renderedPages.list)t.getComponentsList().forEach(t=>{t.report=n,t.page=s})}static getCheckStyle(t,e){let i=t,r=t.is(StiListBoxElement)&&t.as(StiListBoxElement).selectionMode==StiItemSelectionMode.One&&t.as(StiListBoxElement).selectionType==StiListBoxSelectionType.RadioButton,l=r?StiCheckStyle.DotCircle:StiCheckStyle.CheckRectangle,n=r?StiCheckStyle.NoneCircle:StiCheckStyle.NoneRectangle;if(!i.userFilters.any())return r?n:l;if(i.userFilters.any(t=>t.condition==StiDataFilterCondition.IsFalse))return n;if(i.userFilters.any(t=>t.condition==StiDataFilterCondition.EqualTo&&t.value==(null==e?void 0:e.toString())))return l;return n}async renderItems(r,l,n,s,o){let t=await StiElementDataCache.tryToGetOrCreate(n);if(null==t)return;let e=n,a=StiListBoxHelper.fetchItems(e,t,e.showBlanks);if(null!=a){let t=a.select(t=>null==t?"":null==t.label&&null!=t.value&&t.value instanceof DateTime?t.value.toShortDateString():t.toString()),e=a.select(t=>bq0.getCheckStyle(n,t)),i=a.select(t=>!1);this.renderItems2(r,l.clone(),n,t,e,i,s,o)}}renderItems2(l,n,s,o,a,u,S,m){let h=s,c=h.selectionMode==StiItemSelectionMode.Multi,d=h.selectionMode==StiItemSelectionMode.One&&s.is(StiListBoxElement)&&s.as(StiListBoxElement).selectionType==StiListBoxSelectionType.RadioButton,g=c||d,p=s.is(IStiListBoxElement)&&s.orientation==StiItemOrientation.Horizontal,C=s,b=StiDashboardStyleHelper.getFont(s),w=(b=null!=b?StiFontUtils.changeFontSize(b,b.size*m):new Font("Arial",8),p?this.getHorizontalItemAutoWidth(h,b,o,n.width,g):n.width),f=p?n.height:StiElementConsts.ListBox.ItemHeight,y=n.x,M=n.y;if(h.showAllValue){p&&0==w&&(w=this.measureItemWidth(StiLocHelper.locAll,b,g));let t=new Rectangle(y,M,w,f),e=d?StiCheckStyle.DotCircle:StiCheckStyle.CheckRectangle;C.userFilters.any()&&(e=d?StiCheckStyle.NoneCircle:C.userFilters.any(t=>t.condition==StiDataFilterCondition.IsFalse)?StiCheckStyle.NoneRectangle:StiCheckStyle.DotRectangle),this.renderItem(l,t,s,StiLocHelper.locAll,e,p?StiBorderSides.Right:StiBorderSides.Bottom,c,d,!1,S,m),p?y+=w+1:M+=f+1}if(null!=o){let r=0;for(let i=0;i<o.count2();i++){p&&0==w&&(w=this.measureItemWidth(o[i],b,g));let t=new Rectangle(y+r,M,w-r,f),e=a[i];if(!d||C.userFilters.any()||h.showAllValue||0!=i||(e=StiCheckStyle.DotCircle),this.renderItem(l,t,s,o[i],e,StiBorderSides.None,c,d,u[i],S,m),u[i]&&(r+=StiElementConsts.ListBox.CheckBoxWidth),p?y+=w+1:M+=f+1,p&&y>=n.right||!p&&M>=n.bottom)break}}}getHorizontalItemAutoWidth(t,e,i,r,l){let n=0,s=0;if(null!=i)while(n<r&&s<i.length)n+=this.measureItemWidth(i[s],e,l),s++;return t.showAllValue&&(this.measureItemWidth(StiLocHelper.locAll,e,l),s++),n<r&&0<s?r/s:0}measureItemWidth(t,e,i){let r=StiElementConsts.Table.Font.getGdiFont(1,null,e),l=Graphics.measureString(t,r,1e6),n=l.width;return i&&(n+=StiElementConsts.ListBox.CheckBoxWidth),n}renderItem(e,i,r,t,l,n,s,o,a,u,S){if(s||o){let t=r.is(IStiListBoxElement)&&r.orientation==StiItemOrientation.Horizontal;bq0.renderCheckControl(e,i.clone(),r,l,t?StiBorderSides.None:n,o,u,S),i.x+=StiElementConsts.ListBox.CheckBoxWidth*S,i.width-=StiElementConsts.ListBox.CheckBoxWidth*S}let m=StiDashboardStyleHelper.getForeColor(r),h=StiDashboardStyleHelper.getBackColor(r,null,u),c=StiDashboardStyleHelper.getFont(r),d=(c=null!=c?StiFontUtils.changeFontSize(c,c.size*S):new Font("Arial",8),this.format(r.as(IStiControlElement),t)),g=new StiText(i),p=(g.name=r.name+`_Item`,g.allowHtmlTags=!0,g.margins=s||o?new StiMargins(1,0,0,0):StiMargins.empty,g.border=n!=StiBorderSides.None?new StiBorder(n,Color.gray,1,StiPenStyle.Solid):new StiBorder(StiBorderSides.None,Color.transparent,0,StiPenStyle.None),g.brush=new StiSolidBrush(h),g.horAlignment=StiTextHorAlignment.Left,g.vertAlignment=StiVertAlignment.Center,g.text=d,g.textBrush=new StiSolidBrush(m),g.wordWrap=!1,g.font=c,r.as(IStiControlElement));null==p||p.textFormat.is(StiGeneralFormatService)||(g.excelDataValue=d),e.components.add(g)}static renderCheckControl(t,e,i,r,l,n,s,o){let a=StiDashboardStyleHelper.getForeColor(i),u=StiDashboardStyleHelper.getBackColor(i,null,s),S=(e=new Rectangle(e.x,e.y,StiElementConsts.ListBox.CheckBoxWidth*o,e.height),new StiCheckBox(e));S.name=i.name+`_ItemCheckBox`,S.border=l!=StiBorderSides.None?new StiBorder(l,Color.gray,1,StiPenStyle.Solid):new StiBorder(StiBorderSides.None,Color.transparent,0,StiPenStyle.None),S.contourColor=Color.transparent,S.textBrush=new StiSolidBrush(a),S.brush=new StiSolidBrush(u),S.checkStyleForTrue=r,S.checkStyleForFalse=n?StiCheckStyle.NoneCircle:StiCheckStyle.NoneRectangle,S.checkedValue=r!=StiCheckStyle.NoneRectangle&&r!=StiCheckStyle.NoneCircle,t.components.add(S)}}__.z.StiListBoxElementExportTool=bq0}let StiVerticalLinePrimitive=Stimulsoft.Report.Components.StiVerticalLinePrimitive,StiFlowchartSortShapeType=Stimulsoft.Report.Components.StiFlowchartSortShapeType;{class hs0 extends __.z.StiElementExportTool{async render(t,l,n,e){let s=t.as(StiNumberBoxElement);if(null==s.getValueMeter())return;let o=n.height+2*n.y,a=__.z.StiExportTool.isAllowOpacity(e),u=await StiNumberBoxHelper.getInitialValue(s);if(u[Stimulsoft.System.StiObject.stimulsoft]().getType()==Stimulsoft.Report.DecimalRange){let t=new Rectangle(n.x,n.y,n.width/2,n.height),e=1,i=new Rectangle(t.right,o/4,e,o/2),r=new Rectangle(t.right,n.y,n.width/2,n.height);this.paintItem(l,s,t,u.from,a),this.paintSeparator(l,s,i),this.paintItem(l,s,r,u.to,a)}else if(Stimulsoft.System.Type.isNumericType(Stimulsoft.System.Type.getType(u))){let t=u,e=10,i=new Rectangle(n.right-e-3,o/3,e,o/3);this.paintItem(l,s,n,t,a),this.paintNavButtons(l,s,i)}}paintItem(t,e,i,r,l){let n=StiDashboardStyleHelper.getForeColor(e),s=StiDashboardStyleHelper.getBackColor(e,null,l),o=new StiText(i);o.name=e.name+`_NumberBox`,o.allowHtmlTags=!0,o.vertAlignment=StiVertAlignment.Center,o.horAlignment=Enum.parse(StiTextHorAlignment,Enum.getName(StiHorAlignment,e.horAlignment)),o.textBrush=new StiSolidBrush(n),o.brush=new StiSolidBrush(s),o.text=hs0.formatValue(e,r),o.font=StiDashboardStyleHelper.getFont(e),t.components.add(o)}paintSeparator(t,e,i){let r=new StiVerticalLinePrimitive(i);r.name=e.name+`_NumberBoxSep`,r.color=hs0.getSeparatorColor(e),t.components.add(r)}paintNavButtons(t,e,i){let r=new StiShape(i);r.name=e.name+`_NumberBoxButtons`,r.shapeType=new StiFlowchartSortShapeType,r.borderColor=StiDashboardStyleHelper.getForeColor(e),t.components.add(r)}static formatValue(t,e){return t.textFormat.format(e)}static getSeparatorColor(t){return StiDashboardStyleHelper.getSeparatorColor(t)}}__.z.StiNumberBoxElementExportTool=hs0}let StiOnlineMapHelper=__.h.StiOnlineMapHelper,StiMapMode=Stimulsoft.Report.Maps.StiMapMode,StiDockStyle=(__.z.StiOnlineMapElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){var l,n,s;if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;let o=await StiElementDataCache.tryToGetOrCreate(t),a=StiOnlineMapHelper.calculateMapData(o,t),u=t,S=new StiMap;S.stretch=!0,S.page=u.page,S.dataTable=o,e.report.dictionary=u.report.dictionary,S.latitude=null==(l=u.latitude)?void 0:l.expression,S.longitude=null==(n=u.longitude)?void 0:n.expression,S.mapMode=StiMapMode.Online,S.pushPins=JSON.stringify(null==(s=a.pushpins)?void 0:s.map(t=>`pp=${t.lat},${t.lon};60`)),S.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t,null,r.is(StiSvgDashboardExportSettings)||r.is(StiHtmlDashboardExportSettings))),S.left=i.left,S.top=i.top,S.width=i.width,S.height=i.height,e.components.add(S)}},__.z.StiPanelElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){let l=StiDashboardStyleHelper.getBackColor(t),n=new StiContainer(i);n.name=t.name+`_Content`,n.brush=new StiSolidBrush(l),e.components.add(n)}},Stimulsoft.Report.Components.StiDockStyle),StiCrossTabBuilder=Stimulsoft.Report.Engine.StiCrossTabBuilder,StiCrossTabParams=Stimulsoft.Report.CrossTab.StiCrossTabParams,StiPivotTableHelper=__.h.StiPivotTableHelper;{class gt0 extends __.z.StiElementExportTool{async render(l,n,s,o){if(this.renderEmptyDataMessage(l,n,s.clone(),o))return;let a=n.report,e=l.as(StiPivotTableElement),u=n.page,i=o.is(StiSvgDashboardExportSettings)&&o.designMode,t=StiExportSettingsHelper.isDataExport(o),S=StiExportTool.getScaleFactor(n,o),m=null,r=1!=StiScale.factor||1!=S,h=null==(m=r?m:StiPivotTableToCrossTabCache.get(e));if(h||r){let t=await StiElementDataCache.tryToGetOrCreate(e);null==t&&(t=new StiDataTable),m=await StiPivotTableHelper.convertToCrossTab(e,t,S),r||(StiPivotTableToCrossTabCache.put(e,m),StiPivotToConvertedStateCache.putFalse(e))}StiPivotTableHelper.applyStyle(e,m,t),i&&(gt0.renderForWebDesigner(m,e),StiPivotTableToCrossTabCache.remove(e)),gt0.convertSizes(e,m,!r);let c=m.crossTabInfo.cross,d=c.widths[Stimulsoft.System.StiObject.stimulsoft]().toList().sum(),g=c.heights[Stimulsoft.System.StiObject.stimulsoft]().toList().sum();if(d<=s.width&&g<=s.height||i||o.renderSinglePage){StiBorderExportHelper.render(l,n,o),StiBackColorExportHelper.render(l,n);let t=await StiTitleExportHelper.render(l,n,o);t=StiLayoutExportHelper.excludePadding(l,t,S),t=StiLayoutExportHelper.excludeCornerRadius(l,t,S),gt0.renderCells(n,t,t,null,m,i)}else if(o.is(StiExcelDashboardExportSettings)){!o.renderSingleElement&&0!=a.renderedPages.getByIndex(0).components.count||a.renderedPages.removeAt(0),u=new StiPage;let t=new StiPanel,e=(t.name=l.name,t.clientRectangle=new Rectangle(0,0,d,g),u.components.add(t),a.renderedPages.add(u),StiBorderExportHelper.render(l,t,o),StiBackColorExportHelper.render(l,t),await StiTitleExportHelper.render(l,t,o)),i=(a.renderedPages.remove(u),2*d-e.width+e.left+1),r=2*g-e.height+e.top+1;(u=new StiPage).width=i,u.height=r,(t=new StiPanel).name=l.name,t.clientRectangle=new Rectangle(0,0,i,r),u.components.add(t),a.renderedPages.add(u),StiBorderExportHelper.render(l,t,o),StiBackColorExportHelper.render(l,t),e=await StiTitleExportHelper.render(l,t,o),u.unlimitedHeight=!0,gt0.renderCells(t,e,e,null,m,!1)}else{let r=u.clone(!0,!1),t=(a.renderedPages.add(r),n.clone(!0,!1)),e=(t.left=0,t.top=0,t.width=r.width,t.height=r.height,s=new Rectangle(0,0,r.width,r.height),r.components.add(t),n=t,!o.renderSingleElement&&0!=a.renderedPages.getByIndex(0).components.count||a.renderedPages.removeAt(0),StiBorderExportHelper.render(l,n,o),StiBackColorExportHelper.render(l,n),await StiTitleExportHelper.render(l,n,o)),i=(e=StiLayoutExportHelper.excludePadding(l,e,S),e=StiLayoutExportHelper.excludeCornerRadius(l,e,S),new Rectangle(e.left,e.top,e.width+d,e.height+g));u.unlimitedHeight=!0,gt0.renderCells(n,i,e,null,m,!1);for(let i=0;i<r.segmentPerWidth;i++)for(let e=0;e<r.segmentPerHeight;e++)if(0!=i||0!=e){let t=n.clone(!0,!1);t.left=i*u.width,t.top=e*u.height,t.width=u.width,t.height=u.height,r.components.insert(0,t),StiBorderExportHelper.render(l,t,o),StiBackColorExportHelper.render(l,t),await StiTitleExportHelper.render(l,t,o)}}for(let t of n.report.renderedPages.list)t.getComponentsList().forEach(t=>{t.report=a,t.page=u})}static renderForWebDesigner(t,e){let i=e.columns.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,e.report)).toList(),r=e.rows.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,e.report)).toList(),l=e.summaries.where(t=>StiPivotTableColumnVisibilityHelper.getVisible(t,e.report)).toList();if(!(1<i.length||1<r.length))return;let n=t.crossTabInfo.cross.cells,s=0,o=new List,a=new List,u=null,S=null,m=e.summaryDirection==StiSummaryDirection.LeftToRight?l.length:1,h=e.summaryDirection==StiSummaryDirection.UpToDown?l.length:1,c=StiPivotTableHelper.getHeadersBounds(n);for(let i=0;i<n.length;i++){let e=n[i][0];for(e.cellType==StiCellType.LeftTopLineMain&&((u=new ht0).cell=e,u.x=i,u.width=e.width),e.cellType==StiCellType.RightTopLineMain&&((S=new ht0).cell=e,S.x=i),s=0;s<n[i].length;s++)if((e=n[i][s]).cellType==StiCellType.CornerColMain||e.cellType==StiCellType.CornerRowMain){let t=new ht0;t.cell=e,t.x=i,t.y=s,t.width=e.width,t.height=e.height,o.add(t)}}if(-1<c.top){let l=-1;for(let r=0;r<n.length;r++){let i=n[r][c.top];if(i.cellType==StiCellType.HeaderColMain||i.cellType==StiCellType.HeaderColTotalMain){l=-1==l?r:l;let t=c.bottom-c.top+(1<m?0:1),e=new ht0;if(e.cell=i,e.x=l,e.y=c.top,e.height=t,e.width=m,o.add(e),i.text=(1<t&&i.cellType!=StiCellType.HeaderColTotalMain?"> ":"")+i.text,a.add(r+i.width-1),1<m)for(let e=r+i.width-m;e<r+i.width;e++){let t=new ht0;t.cell=n[e][c.bottom],t.x=l,t.y=c.bottom,o.add(t),a.add(e),l++}else l++}}}if(-1<c.left){let r=-1;for(s=0;s<n[0].length;s++){let i=n[0][s];if(i.cellType==StiCellType.HeaderRowMain||i.cellType==StiCellType.HeaderRowTotalMain){r=-1==r?s:r;let t=c.right+(1<h?0:1),e=new ht0;if(e.cell=i,e.x=0,e.y=r,e.height=h,e.width=t,e.cellRow=1==h?s+i.height-1:-1,o.add(e),i.text=(1<t&&i.cellType!=StiCellType.HeaderRowTotalMain?"> ":"")+i.text,1<h)for(let e=s+i.height-h;e<s+i.height;e++){let t=new ht0;t.cell=n[c.right][e],t.x=c.right,t.y=r,t.cellRow=e,o.add(t),r++}else r++}}}null!=u&&(u.width=c.right-c.left+1,o.add(u)),null!=S&&(S.width=o.max(t=>t.x)-c.right,o.add(S));let d=StiDashboardStyleHelper.getPivotTableStyle(e),g=o.max(t=>t.y)+1,p=o.max(t=>t.x)+1,C=StiArray.create2(StiCell,p,g);for(let r of o)if(C[r.x][r.y]=r.cell,r.cell.width=r.width,r.cell.height=r.height,0<=r.cellRow)for(s=r.y;s<r.y+r.height;s++){let i=c.right+1;for(let t=r.width;t<n.length;t++)if(0<=a.indexOf(t)){C[i++][s]=n[t][r.cellRow+s-r.y],C[i-1][s].field.border.side=t==n.length-1?StiBorderSides.None:StiBorderSides.Right;let e=C[i-1][s];if(null!=e&&null!=e.field&&e.field.brush.is(StiSolidBrush)){let t=e.field.brush.color;(t.equals(d.alternatingCellBackColor)||t.equals(d.cellBackColor))&&(e.field.brush=new StiSolidBrush(s%2!=0?d.alternatingCellBackColor:d.cellBackColor),e.field.textBrush=new StiSolidBrush(s%2!=0?d.alternatingCellForeColor:d.cellForeColor))}null!=e&&null!=e.field&&(e.field.brush=null!=e.field.conditionBrush?e.field.conditionBrush:e.field.brush,e.field.textBrush=null!=e.field.conditionTextBrush?e.field.conditionTextBrush:e.field.textBrush)}}n=StiArray.create2(StiCell,p,0);for(let e=0;e<p;e++){n[e]=StiArray.create(StiCell,g);for(let t=0;t<g;t++)n[e][t]=null!=C[e][t]?C[e][t]:new StiCell,null!=n[e][t].field&&e==p-1&&(n[e][t].field.border.side|=StiBorderSides.Top),0<t&&(n[e][t].parentCell=n[e][t])}let b=StiArray.create(Number,g),w=StiArray.create(Number,p);StiArray.copy(t.crossTabInfo.cross.heights,0,b,g),StiArray.copy(t.crossTabInfo.cross.widths,0,w,p),t.crossTabInfo.cross.cells=n,t.crossTabInfo.cross.widths=w,t.crossTabInfo.cross.heights=b,t.crossTabInfo.cross.doAutoSize()}static renderCells(t,e,i,r,l,n){l.page.unlimitedHeight=!0,t.canBreak=!0,t.dockStyle=StiDockStyle.None;let s=new StiCrossTabParams,o=(s.startColumn=0,s.startRow=0,s.destinationContainer=t,s.destinationRectangle=i,s.forceNoBreak=n,new StiCrossTabBuilder);o.renderCrossTabUnlimitedBreakable(s,l,t,e.clone())}static convertSizes(t,e,i){let r=e.crossTabInfo.cross,l=t.report.unit;StiPivotToConvertedStateCache.isConverted(t)&&i||(this.convert(r.heights,l),this.convert(r.widths,l),this.convert(r.coordX,l),this.convert(r.coordY,l),i&&StiPivotToConvertedStateCache.putTrue(t))}static convert(e,i){for(let t=0;t<e.length;t++)e[t]=i.convertToHInches(e[t])}}__.z.StiPivotTableElementExportTool=gt0;class ht0{constructor(){this.x=0,this.y=0,this.width=1,this.height=1,this.cellRow=-1}}}__.z.StiRegionMapElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){if(this.renderEmptyDataMessage(t,e,i.clone(),r))return;let l=t,n=StiDashboardStyleHelper.getElementFontFromStyle(t,l.font),s=new StiMap;if(s.stretch=!0,s.page=l.page,s.mapType=l.mapType,s.dataFrom=l.dataFrom,s.language=l.language,s.mapStyle=StiDashboardStyleHelper.getMapStyleIdent(l),s.componentStyle=l.customStyleName,s.mapIdent=l.mapIdent,s.mapMode=StiMapMode.Choropleth,s.showValue=l.showValue,s.shortValue=l.shortValue,s.showZeros=l.showZeros,s.showBubble=l.showBubble,s.colorEach=l.colorEach,s.show3D=l.show3D,s.displayNameType=l.showName,s.colorDataColumn=null==l.colorMeter?"":l.colorMeter.expression,s.groupDataColumn=null==l.groupMeter?"":l.groupMeter.expression,s.valueDataColumn=null==l.valueMeter?"":l.valueMeter.expression,s.nameDataColumn=null==l.nameMeter?"":l.nameMeter.expression,s.keyDataColumn=null==l.keyMeter?"":l.keyMeter.expression,s.mapData=l.mapData,s.labels=new StiMapLabels(n,l.labels.foreColor,l.labels.shadowColor,l.labels.showShadow),s.brush=new StiSolidBrush(StiDashboardStyleHelper.getBackColor(t,null,r.is(StiSvgDashboardExportSettings)||r.is(StiHtmlDashboardExportSettings))),s.left=i.left,s.top=i.top,s.width=i.width,s.height=i.height,s.valueFormat=l.valueFormat,l.dataFrom==StiMapSource.DataColumns){let t=await StiElementDataCache.tryToGetOrCreate(l);s.dataTable=t,e.report.dictionary=l.report.dictionary}e.components.add(s)}},__.z.StiShapeElementExportTool=class extends __.z.StiElementExportTool{async render(t,e,i,r){let l=t.as(StiShapeElement),n=new StiShape;n.shapeType=l.shapeType,n.size=l.size,n.borderColor=l.stroke,n.brush=l.fill,n.page=l.page,n.left=i.left,n.top=i.top,n.width=i.width,n.height=i.height,e.components.add(n)}};let StiTableElementPagingHelper=Stimulsoft.Report.Dashboard.Helpers.StiTableElementPagingHelper,StiTableColumnVisibilityHelper=Stimulsoft.Report.Dashboard.StiTableColumnVisibilityHelper,StiBubbleCellPainter=__.C.StiBubbleCellPainter,StiSparklinesCellPainter=__.C.StiSparklinesCellPainter,StiSparkline=Stimulsoft.Report.Components.StiSparkline,StiSystemVariableObject=Stimulsoft.Data.Functions.StiSystemVariableObject,StiTableElementGdiPainter=__.q.StiTableElementGdiPainter,StiTableElementHelper=__.h.StiTableElementHelper,StiDataBarsCellPainter=__.C.StiDataBarsCellPainter,StiColorScaleCellPainter=__.C.StiColorScaleCellPainter,StiTextQuality=Stimulsoft.Report.Components.StiTextQuality,StiConditionIconPainter=__.C.StiConditionIconPainter;{class kv0 extends __.z.StiElementExportTool{async render(t,i,e,r){if(this.renderEmptyDataMessage(t,i,e.clone(),r))return;let l=i.report,n=i.page,s=r.is(StiSvgDashboardExportSettings)&&r.as(StiSvgDashboardExportSettings).designMode,o=t.as(StiTableElement),a=null==r?__.f.StiDashboardExportFormat.Document:r.format,u=r.renderSingleElement&&a==__.f.StiDashboardExportFormat.Excel,S=StiExportSettingsHelper.isDataExport(r),m=(delete o.cacheStyle,i.clone(!0,!1)),h=StiExportTool.getScaleFactor(i,r),c=(r.renderSinglePage||(e.height=Number.MAX_VALUE),await kv0.renderCells(m,e,o,h,a,S,s),u&&(e.width=m.components.toList().max(t=>t.right),e.height=m.components.toList().max(t=>t.bottom),i.width=i.page.width=e.width,i.height=i.page.height=e.height),0),d=i.top;0<m.components.count&&(d+=m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top));while(1){if(m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().where(t=>t.bottom<=i.height).toList().forEach(t=>{m.components.remove(t),(t.left<i.width||a==__.f.StiDashboardExportFormat.Data)&&(i.components.add(t),t.right>i.width)&&a!=__.f.StiDashboardExportFormat.Data&&(t.width=Math.max(0,i.width-t.left))}),r.renderSinglePage||0==m.components.count)break;let e=m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().min(t=>t.top);m.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().forEach(t=>t.top=t.top-e+1),l.renderedPages.count<=++c&&l.renderedPages.add(n.clone(!0,!1)),n=l.renderedPages.getByIndex(c),i=i.clone(!0,!1),r.renderSingleElement?(i.top=0,i.left=0):i.top=d,n.components.add(i)}for(let t of i.report.renderedPages.list)t.getComponentsList()[Stimulsoft.System.StiObject.stimulsoft]().toList().forEach(t=>{t.report=l,t.page=n})}static async renderCellsForViewer(t,i,h){let c,d=t.as(StiTableElement);if(null==d)return null;let g=await StiElementDataCache.getOrCreate(d);if(null==g)return null;g=this.processDataTableWithTopN(g);let p=1,C=[],b=StiElementConsts.Table.getHeight(d.getDataFont(),p),w=g.meters.where(t=>t.is(StiTableColumn)).cast(),e=null!=w.firstOrDefault(t=>t.showTotalSummary),f=(delete d.cacheStyle,0),y=0<d.rowsPerPage,M=0,I=g.rows.length-1;if(y){let t=null!=i&&null!=i[d.key]?i[d.key]:1,e=Math.ceil(g.rows.length/d.rowsPerPage);t>e&&(t=e),M=(t-1)*d.rowsPerPage,I=Math.min(t*d.rowsPerPage-1,g.rows.length-1)}for(let m of w){m.cache={};let t=await this.getColumnVisibilityState(m,d.report);if(!t){f++;continue}let s=kv0.measureHeader(d,m,p);if(m.is(StiSparklinesColumn))s=kv0.measureSparklinesCell(p,s);else{for(let r=M;r<=I;r++){let t=g.rows[r],e=t[f],i;i=m.is2(StiIndicatorColumn)?kv0.measureIndicatorCell(d,m,p,e):m.is2(StiDataBarsColumn)?kv0.measureDataBarsCell(d,m,p,e):kv0.measureCommonCell(d,m,p,e,s).width,s=Math.max(s,i)}if(m.showTotalSummary){let t=StiTableElementHelper.calculateTotal(m,f,g),e=this.measureFooter(d,m,p,t);s=Math.max(s,e)}}let o=StiTableElementHelper.minDataColumnValue(m,g,f),a=StiTableElementHelper.maxDataColumnValue(m,g,f),u=y&&h?M:0,S=y&&h?I:g.rows.length-1;for(let n=u;n<=S;n++){if(C.length<=S-u&&C.push([]),y&&!h&&(n<M||n>I))continue;let r=g.rows[n],e=this.processRowValue(n,r[f],m),t=new Rectangle(0,0,s,b),i=new StiPanel,l=(await kv0.renderCell(i,t,d,r,w.select(t=>t.key),m,p,e,o,a,1==(1&n),__.f.StiDashboardExportFormat.Html,!1),{});if(0<d.tableConditions.length&&0<i.components.length){let t=i.components.getByIndex(0);t.is(StiText)||(t.is(IStiBrush)&&(l["backColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.as(IStiBrush).brush))),t.is(IStiTextBrush)&&(l["textColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.as(IStiTextBrush).textBrush))))}if("boolean"==typeof e)l["boolValue"]=e;else for(let t of i.components.list)if(t.is(StiText)){if(l["text"]=t.text,l["textColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.textBrush)),l["backColor"]=ColorTranslator.toHtml(StiBrush.toColor(t.brush)),l["textWidth"]=t.width,l["textHeight"]=t.height,0<d.tableConditions.length){let t=null==(c=d.as(IStiFont))?void 0:c.font,e=0<d.tableConditions.length?await StiTableElementConditionHelper.processFontStyle(t,m.key,d,r,w.select(t=>t.key)):FontStyle.Regular,i=(t=new Font(t.fontFamily.name,t.size,e),{});i["bold"]=t.bold,i["italic"]=t.italic,i["underline"]=t.underline,i["strikeout"]=t.strikeout,l["textFontStyle"]=i}null!=e&&e.toString()!=l["text"]&&(l["value"]=e.toString())}else t.is(StiImage)?(l["image"]=null!=t.imageToDraw?Stimulsoft.Base.Drawing.StiImageConverter.imageToString(t.imageToDraw):null,l["imageWidth"]=t.width,l["imageHeight"]=t.height,0<d.tableConditions.length&&(l["iconAlignment"]=Enum.getName(StiIconAlignment,d.tableConditions.firstOrDefault().iconAlignment).toLowerCase())):t.is(StiSparkline)&&(l["sparkline"]=Stimulsoft.Report.Export.StiHtmlExportService.getSparklineData(null,t,t.width,t.height),l["sparklineWidth"]=t.width,l["sparklineHeight"]=t.height);null==l["boolValue"]&&null==l["text"]&&null==l["image"]&&(l["text"]=e),C[h?n-u:n].push(l)}if(e){C.length<g.rows.length+1&&C.push([]);let e={};if(e["text"]="",m.showTotalSummary){let t=StiTableElementHelper.calculateTotal(m,f,g);e["text"]=m.summaryType==StiSummaryColumnType.Count?StiMath.trunc(t).toString():StiTextFormatHelper.formatBasedOnColumnType(d,m,t)}C[C.length-1].push(e)}f++}return C}static async renderCells(u,S,m,h,c,d,r){let g=await StiElementDataCache.tryToGetOrCreate(m);if(null==g)return;g=this.processDataTableWithTopN(g);let e=StiElementConsts.Table.getHeight(m.getColumnFont(),h),t=StiElementConsts.Table.getHeight(m.getDataFont(),h),p=g.meters.where(t=>t.is(StiTableColumn)).cast(),i=null!=p.firstOrDefault(t=>t.showTotalSummary),l=r?0:m.currentPageIndex,n=0!=m.rowsPerPage&&-1!=l&&c!=__.f.StiDashboardExportFormat.Excel,s=1,C=(n&&(s=StiTableElementPagingHelper.getNumberOfPages(g.rows.length,m.rowsPerPage))<=1&&(n=!1),g.rows);if(n){let t=C.skip(m.rowsPerPage*l).take(m.rowsPerPage);t.any()?C=t:n=!1}let b=i?StiElementConsts.Table.getHeight(m.getTotalFont(),h):0,o=n?StiElementConsts.Table.getHeight(m.getTotalFont(),h):0,w=b+o,f=new List,y=[],M=0;for(let r of p){r.cache={};let i=0,t=await this.getColumnVisibilityState(r,m.report);if(t&&(i=this.measureHeader(m,r,h),r.showTotalSummary)){let t=StiTableElementHelper.calculateTotal(r,M,g),e=this.measureFooter(m,r,h,t);i=Math.max(i,e)}f.push(i),M++}let I=S.y+e;if(I<S.bottom-w){for(let s of C){let n=t;M=-1;for(let l of p){M++;let t=await StiTableColumnVisibilityHelper.getVisible(l,m.report);if(!t)continue;let r=f[M];if(l.is(StiSparklinesColumn))r=this.measureSparklinesCell(h,r);else{let e=s[M],i;if(l.is2(StiIndicatorColumn))i=this.measureIndicatorCell(m,l,h,e);else if(l.is2(StiDataBarsColumn))i=this.measureDataBarsCell(m,l,h,e);else if(l.is2(StiBubbleColumn))i=kv0.measureBubbleCell(m,l,h,e);else{let t=this.measureCommonCell(m,l,h,e,r);i=t.width,n=Math.max(t.height,n)}r=Math.max(r,i)}f[M]=r}if(I+n>S.bottom-w&&(n=S.bottom-w-I)<1.2&&(n=1.2),y.push(n),(I+=n)>=S.bottom-w)break}y.push(t)}if(m.sizeMode==StiTableSizeMode.Fit){let e=S.width/f.sum(),t=((1<e||!r)&&(f=f.select(t=>t*e).toList()),-1);for(let n of C){if(++t>=y.length)break;M=-1;let l=y[t];for(let r of p){if(M++,r.is2(StiIndicatorColumn)||r.is2(StiDataBarsColumn))continue;if(r.is(IStiTableColumnSize)){let t=r,e=t.size.width,i=(t.size.width=f[M]-4,this.measureCommonCell(m,r,h,n[M],t.size.width));l=Math.max(i.height,l),t.size.width=e}}y[t]=l}}let T=S.x;M=0;for(let a of p){let t=await this.getColumnVisibilityState(a,m.report);if(!t){M++;continue}let o=f[M];if(c==__.f.StiDashboardExportFormat.Excel&&(o*=1.1),I=S.y,c!=__.f.StiDashboardExportFormat.Data){let t=new Rectangle(T,I,o,e);this.renderHeader(u,t,m,a,h,c,d),I+=t.height}if(I<=S.bottom-w){let l=StiTableElementHelper.minDataColumnValue(a,g,M),n=StiTableElementHelper.maxDataColumnValue(a,g,M),s=0;for(let r of C){let t=Math.ceil(y[s]),e=this.processRowValue(s,r[M],a),i=new Rectangle(T,I,o,t);if(await this.renderCell(u,i,m,r,p.select(t=>t.key),a,h,e,l,n,1==(1&s),c,d),I+=t,s++,I>=S.bottom-w)break}}if(c!=__.f.StiDashboardExportFormat.Data&&!d&&i){let t=new Rectangle(T,r?S.bottom-w:I,o,b);this.renderFooter(u,t,m,a,M,h,g)}T+=o,M++}if(c!=__.f.StiDashboardExportFormat.Data&&!d&&n){let t=StiString.format(StiLocalization.get("Report","PageNofM"),l+1,s),e=T-S.x,i=new Rectangle(S.x,(r?S.bottom-w:I)+b,e,o);this.renderCurrentPageNumber(u,i,m,h,t)}}static processDataTableWithTopN(t){let e=t.meters.where(t=>t.is(StiTableColumn)).cast().toList(),r=t.rows,l=0;for(let i of e){let t=i.topN,e=this.processTopNElements(r,t,l);r=e.select(t=>t).toList(),l++}let i=new StiDataTable;return i.meters.addRange(e),i.rows.addRange(r),i}static processTopNElements(t,e,i){if(e.mode==StiDataTopNMode.None)return t;let r=new List;for(let e of t){let t=StiValueHelper.tryToNumber(e[i]);r.add({key:t,value:e})}e.mode==StiDataTopNMode.Bottom?r.sort((t,e)=>t.key[Stimulsoft.System.StiObject.stimulsoft]().compareTo(e.key)):r.sort((t,e)=>e.key[Stimulsoft.System.StiObject.stimulsoft]().compareTo(t.key));let l=r.take(e.count).select(t=>t.value).toList();return l}static measureSparklinesCell(t,e){return Math.max(e,80*t)}static measureHeader(t,e,i){return StiTableElementGdiPainter.measureHeader(t,e).width*i}static measureFooter(t,e,i,r){let l=StiTextFormatHelper.formatBasedOnColumnType(t,e,r);return StiTableElementGdiPainter.measureCell(l,t.getTotalFont(),e).width*i}static measureIndicatorCell(t,e,i,r){let l=e.as(StiIndicatorColumn),n=StiIndicatorCellPainter.getCellText(t,l,StiValueHelper.tryToNullableNumber(r)),s=StiTableElementGdiPainter.measureCell(n,t.getDataFont(),e).width*i;return s*=1.25}static measureDataBarsCell(t,e,i,r){let l=StiTextFormatHelper.formatBasedOnColumnType(t,e,r),n=StiTableElementGdiPainter.measureCell(l,t.getDataFont(),e).width*i;return e.horAlignment!=StiHorAlignment.Center&&(n*=2),n=e.is(StiDataBarsColumn)&&0<e.width?i*e.width:n}static measureBubbleCell(t,e,i,r){let l=StiTextFormatHelper.formatBasedOnColumnType(t,e,r),n=StiTableElementGdiPainter.measureCell(l,t.getDataFont(),e).width*i,s=StiElementConsts.Table.getHeight(t.getDataFont(),i);if(e.horAlignment==StiHorAlignment.Center)return s;return n+=s}static measureCommonCell(t,e,i,r,l){if(StiImageHelper.isImage(r))return new Size(l,0);let n=StiTextFormatHelper.formatBasedOnColumnType(t,e,r),s=StiTableElementGdiPainter.measureCell(n,t.getDataFont(),e);return s.width*=i,s.height*=i,s}static renderHeader(t,e,i,r,l,n,s){let o=null!=r?StiLabelHelper.getLabel(r):"",a=StiString.isNullOrWhiteSpace(o)?i.name+`_Column`:StiNameValidator.correctName(o),u=StiDashboardStyleHelper.getTableStyle(i),S=0!=i.columns.indexOf(r)&&e.left<t.width&&!s,m=i.columns.indexOf(r)!=i.columns.length-1&&e.right<=t.width&&!s,h=(S?StiBorderSides.Left:StiBorderSides.None)|(m?StiBorderSides.Right:StiBorderSides.None),c=s?Color.black:this.getHeaderForeColor(i),d=s?Color.transparent:this.getHeaderBackColor(i),g=s?new Font("Arial",10,FontStyle.Bold):i.getColumnFont(),p=new StiText(e);p.name=a,p.allowHtmlTags=!0,p.autoWidth=!1,p.horAlignment=this.getHeaderAlignment(r),p.vertAlignment=StiVertAlignment.Center,p.wordWrap=!1,p.border=new StiBorder(h,u.lineColor,1,StiPenStyle.Solid),p.brush=new StiSolidBrush(d),p.font=StiElementConsts.Table.Font.getGdiFont(l,null,g),p.text=o,p.textFormat=null!=r.textFormat?r.textFormat.clone():null,p.textBrush=new StiSolidBrush(c),p.componentPlacement=`h.`+i.name,t.components.add(p)}static getHeaderAlignment(t){if(t.headerAlignment==StiHorAlignment.Left)return StiTextHorAlignment.Left;if(t.headerAlignment==StiHorAlignment.Right)return StiTextHorAlignment.Right;return StiTextHorAlignment.Center}static renderFooter(t,e,i,r,l,n,s){let o=this.getFooterForeColor(i),a=this.getFooterBackColor(i),u=i.getTotalFont(),S="",m=0,h=(r.showTotalSummary&&(m=StiTableElementHelper.calculateTotal(r,l,s),S=r.summaryType==StiSummaryColumnType.Count?StiMath.trunc(m).toString():StiTextFormatHelper.formatBasedOnColumnType(i,r,m)),StiTextHorAlignment.Right),c=(r.summaryAlignment==StiHorAlignment.Left?h=StiTextHorAlignment.Left:r.summaryAlignment==StiHorAlignment.Center&&(h=StiTextHorAlignment.Center),new StiText(e)),d=(c.name=i.name+`_FooterCell`,null!=r.textFormat&&r.textFormat.is(StiGeneralFormatService)?null:S);null!=r.textFormat&&(r.textFormat.is(StiCurrencyFormatService)||r.textFormat.is(StiNumberFormatService)||r.textFormat.is(StiPercentageFormatService))&&(d=m.toString()),c.border=this.getBorderSides(t,e,i,r,StiBorderSides.All),c.brush=new StiSolidBrush(a),c.excelDataValue=d,c.font=StiElementConsts.Table.Font.getGdiFont(n,null,u),c.horAlignment=h,c.vertAlignment=StiVertAlignment.Center,c.text=S,c.textBrush=new StiSolidBrush(o),c.textFormat=null!=r.textFormat?r.textFormat.clone():null,c.wordWrap=!1,c.componentPlacement=`f.`+i.name,t.components.add(c)}static renderCurrentPageNumber(t,e,i,r,l){let n=this.getFooterForeColor(i),s=this.getFooterBackColor(i),o=i.getTotalFont(),a=new StiText(e);a.name=i.name+`_CurrentPage`,a.brush=new StiSolidBrush(s),a.font=StiElementConsts.Table.Font.getGdiFont(r,null,o),a.horAlignment=StiTextHorAlignment.Center,a.vertAlignment=StiVertAlignment.Center,a.margins=new StiMargins(0,0,1,0),a.textQuality=StiTextQuality.Typographic,a.text=l,a.textBrush=new StiSolidBrush(n),a.wordWrap=!1,a.componentPlacement=`f.`+i.name,t.components.add(a)}static async renderCell(t,e,i,r,l,n,s,o,a,u,S,m,h){let c=StiDashboardStyleHelper.getTableStyle(i),d=this.getForeColor(i,n,c,S),g=StiTableElementGdiPainter.getBackgroundColor(i,i.cells,c,null!=S&&S);g=0<i.tableConditions.length?await StiTableElementConditionHelper.processBackColor(g,n.key,i,r,l):g,h?await this.renderTextCell(t,e,i,r,l,n,s,o,StiBorderSides.None,Color.black,Color.transparent,m,!0):n.is2(StiDataBarsColumn)||n.is2(StiSparklinesColumn)||n.is2(StiIndicatorColumn)||n.is2(StiBubbleColumn)?await this.renderGraphicCell(t,e,i,r,l,n,s,o,a,u,g,c,null!=S&&S,m):n.is2(StiColorScaleColumn)?await this.drawColorScaleColumn(t,e,i,r,l,n,s,o,a,u,c,m):StiImageHelper.isImage(o)?this.renderImageCell(t,e,i,n,o,g,m):"boolean"==typeof o?await this.renderBoolCell2(t,e,i,r,l,n,s,o,d,g,m):await this.renderTextCell(t,e,i,r,l,n,s,o,StiBorderSides.All,d,g,m,!1,null,!0,!0)}static processRowValue(t,e,i){let r,l=i.textFormat,n=(null!=e&&e[Stimulsoft.System.StiObject.stimulsoft]().is(StiSystemVariableObject)&&(e=e==StiSystemVariableObject.Line&&null!=l?l.format(t+1):Funcs.getSystemVariable(null==e?void 0:e[Stimulsoft.System.StiObject.stimulsoft]().as(StiSystemVariableObject),t+1)),i.ident==StiMeterIdent.SparklinesColumn);return e=ListExt.isList(e)&&!StiImageHelper.isImage(e)?n?ListExt.toList(e):null==(r=ListExt.toList(e))?void 0:r.firstOrDefault():e}static async renderGraphicCell(s,o,a,u,S,m,e,h,i,r,c,d,l,n){let g="",p=o,C=this.getForeColor(a,m,d,l),b=new XmlTextWriter(Encoding.UTF8);if(b.indentation=-1,b.writeStartElement("svg"),b.writeAttributeString("version","1.1"),b.writeAttributeString("baseProfile","full"),b.writeAttributeString("xmlns","http://www.w3.org/2000/svg"),b.writeAttributeString("xmlns:xlink","http://www.w3.org/1999/xlink"),b.writeAttributeString("xmlns:ev","http://www.w3.org/2001/xml-events"),b.writeAttributeString("height",StiSvgHelper.toUnits(o.height)),b.writeAttributeString("width",StiSvgHelper.toUnits(o.width)),b.writeStartElement("rect"),b.writeAttributeString("x","0"),b.writeAttributeString("y","0"),b.writeAttributeString("width",StiSvgHelper.toUnits(o.width)),b.writeAttributeString("height",StiSvgHelper.toUnits(o.height)),b.writeAttributeString("style",StiSvgHelper.writeFillBrush(b,c,o)),b.writeEndElement(),m.is2(StiSparklinesColumn)){let t=StiSparklinesCellPainter.castToArray(h),e=null==t?void 0:t.map(t=>null==t?void 0:t[Stimulsoft.System.StiObject.stimulsoft]().toNumber()),i=m.as(StiSparklinesColumn),r=o,l=await StiTableElementConditionHelper.getIconCondition(m.key,a,u,S),n=(null!=l&&l.iconAlignment!=StiIconAlignment.None&&(l.iconAlignment==StiIconAlignment.Right?r=new Rectangle(o.x,o.y,o.width-o.height,o.height):l.iconAlignment==StiIconAlignment.Left&&(r=new Rectangle(o.x+o.height,o.y,o.width-o.height,o.height))),new StiSparkline(r));if(n.values=e,n.positiveColor=i.allowCustomColors?i.positiveColor:d.cellSparkline,n.negativeColor=i.allowCustomColors?i.negativeColor:d.cellWinLossNegative,n.showFirstLastPoints=i.showFirstLastPoints,n.showHighLowPoints=i.showHighLowPoints,n.type=i.type,n.brush=new StiSolidBrush(c),n.componentPlacement=`d.`+a.name,s.components.add(n),null!=l&&l.iconAlignment!=StiIconAlignment.None){let t=await StiConditionIconPainter.getImageWithConditionIcon(l,o,a.name);s.components.add(t)}return}let w=new StiSvgGeomWriter(b),f=StiBorderSides.None,y="GraphicCell",M=new Rectangle(0,0,o.width,o.height),I=m.horAlignment;if(m.is2(StiDataBarsColumn)){await StiDataBarsCellPainter.draw(w,M,a,u,S,m,e,StiValueHelper.tryToNumber(h),i,r,l,!1,!1),n!=__.f.StiDashboardExportFormat.Data&&(p=StiDataBarsCellPainter.calculateTextRect(o.clone(),m)).inflate(2,2),g=StiTextFormatHelper.formatBasedOnColumnType(a,m,h),C=StiDataBarsCellPainter.getForeColor(a,m,d,l,!1);let t=StiValueHelper.tryToNumber(h);t<0&&StiNegativeColorChecker.isNegativeInRed(m.textFormat)&&(C=Stimulsoft.StiOptions.Engine.negativeColor),C=0<a.tableConditions.length?await StiTableElementConditionHelper.processForeColor(C,m.key,a,u,S):C,f=StiBorderSides.Right,y="DataBarsCell"}else if(m.is2(StiIndicatorColumn))await StiIndicatorCellPainter.draw(w,M,a,u,S,m,e,StiValueHelper.tryToNullableNumber(h),d,!1),p=StiIndicatorCellPainter.calculateTextRect(o.clone(),m),g=StiIndicatorCellPainter.getCellText(a,m,StiValueHelper.tryToNullableNumber(h)),C=StiIndicatorCellPainter.getColor(m,StiValueHelper.tryToNullableNumber(h),d),C=0<a.tableConditions.length?await StiTableElementConditionHelper.processForeColor(C,m.key,a,u,S):C,f=StiBorderSides.None,y="IndicatorCell";else if(m.is2(StiBubbleColumn)){await StiBubbleCellPainter.draw(w,M,a,u,S,m,e,StiValueHelper.tryToNullableNumber(h),i,r,l,!1,!1),n!=__.f.StiDashboardExportFormat.Data&&(p=StiBubbleCellPainter.calculateTextRect(a,o.clone(),m)).inflate(2,2),g=StiBubbleCellPainter.getCellText(a,m,StiValueHelper.tryToNullableNumber(h)),C=StiDataBarsCellPainter.getForeColor(a,m,d,l,!1),C=0<a.tableConditions.length?await StiTableElementConditionHelper.processForeColor(C,m.key,a,u,S):C,f=StiBorderSides.None,y="BubbleCell";let t=m[Stimulsoft.System.StiObject.stimulsoft]().as(IStiHorAlignment);null!=t&&(t.horAlignment==StiHorAlignment.Center&&n!=__.f.StiDashboardExportFormat.Data&&(g=null),t.horAlignment==StiHorAlignment.Left&&(I=StiHorAlignment.Right),t.horAlignment==StiHorAlignment.Right)&&(I=StiHorAlignment.Left)}if(b.writeFullEndElement(),b.flush(),n!=__.f.StiDashboardExportFormat.Data&&!m.is2(StiSparklinesColumn)){let t=new StiImage(o),e=(t.name=a.name+`_`+y,t.border=this.getBorderSides(s,o,a,m,StiBorderSides.All),t.stretch=!0,t.aspectRatio=m.is2(StiIndicatorColumn)||m.is2(StiBubbleColumn),b.textWriter.getStringBuilder().toString());t.image=StiImageConverter.stringToImage(Stimulsoft.System.Convert.toBase64String(e)),t.brush=new StiSolidBrush(c),t.horAlignment=I,s.components.add(t)}n!=__.f.StiDashboardExportFormat.Data&&StiString.isNullOrEmpty(g)||await this.renderTextCell(s,p,a,u,S,m,e,h,f,C,c,n,!1,!1,!0,!1)}static async drawColorScaleColumn(t,e,i,r,l,n,s,o,a,u,S,m){let h=n.as(StiColorScaleColumn),c=this.getForeColor(i,n,S,!1),d=StiColorScaleCellPainter.getScaleColor(StiValueHelper.tryToNumber(o),a,u,S,h.minimumColor,h.maximumColor),g=i.tableConditions.length?await StiTableElementConditionHelper.processForeAndBackColor(c,d,n.key,i,r,l):{foreColor:c,backColor:d};await this.renderTextCell(t,e,i,r,l,n,s,o,StiBorderSides.All,g.foreColor,g.backColor,m,!1,null,!0,!0)}static async renderBoolCell2(r,l,n,s,o,a,t,u,S,m,e){if(e==__.f.StiDashboardExportFormat.Data)await this.renderTextCell(r,l,n,s,o,a,t,u,StiBorderSides.None,S,m,e,!1);else{let t=0<n.tableConditions.length?await StiTableElementConditionHelper.processForeAndBackColor(S,m,a.key,n,s,o):{foreColor:S,backColor:m},e=u?StiCheckStyle.CheckRectangle:StiCheckStyle.NoneRectangle,i=new StiCheckBox(l);i.name=n.name+`_Cell`,i.border=this.getBorderSides(r,l,n,a,StiBorderSides.All),i.contourColor=Color.transparent,i.textBrush=new StiSolidBrush(t.foreColor),i.brush=new StiSolidBrush(t.backColor),i.checkStyleForTrue=e,i.checkStyleForFalse=StiCheckStyle.NoneRectangle,i.checkedValue=e!=StiCheckStyle.NoneRectangle,i.excelDataValue=u.toString(),i.componentPlacement=`d.`+n.name,r.components.add(i)}}static async renderTextCell(e,i,l,n,s,t,r,o,a,u,S,m,h,c=null,d=!1,g=!1){let p,C=null,b=null,w=(!d||h||null==(b=await StiTableElementConditionHelper.getIconCondition(t.key,l,n,s))||b.iconAlignment==StiIconAlignment.None||h||m==__.f.StiDashboardExportFormat.Html||(b.iconAlignment==StiIconAlignment.Left?C=new StiMargins(i.height,0,0,0):b.iconAlignment==StiIconAlignment.Right&&(C=new StiMargins(0,i.height,0,0))),StiTextFormatHelper.formatBasedOnColumnType(l,t,o)),f=h?new Font("Arial",10):l.getDataFont(),y=(t.is(StiDimensionColumn)&&t.showHyperlink&&(f=new Font(f.fontFamily.name,f.size,f.style|FontStyle.Underline)),await StiTableElementConditionHelper.processFontStyle(f,t.key,l,n,s)),M=(f.style!=y&&(f=new Font(f.fontFamily.name,f.size,y)),StiValueHelper.tryToNumber(o));if(M<0&&StiNegativeColorChecker.isNegativeInRed(t.textFormat)&&(u=Stimulsoft.StiOptions.Engine.negativeColor),t.is(StiSparklinesColumn)){let t=StiSparklinesCellPainter.castToArray(o),e=null==t?void 0:t.map(t=>t.toString());w=StiString.join(" ",e)}let I=0<l.tableConditions.length?await StiTableElementConditionHelper.processForeAndBackColor(u,S,t.key,l,n,s):{foreColor:u,backColor:S},T=StiTitleExportHelper.convert(t.horAlignment),x=(t.is(StiBubbleColumn)&&(T=StiTextHorAlignment.Right),t.as(IStiTableColumnSize)),D=(null!=x&&null==c&&(c=x.size.wordWrap),null);if(t.is(StiDimensionColumn)&&t.showHyperlink&&!StiString.isNullOrWhiteSpace(t.hyperlinkPattern)){let r=new Stimulsoft.System.Collections.Hashtable;r.add("Value",o);for(let i=0;i<s.length;i++){let t=l.columns.firstOrDefault(t=>t.key==s[i]),e="Row."+StiNameValidator.correctName(t.label,!0);r.add(e,null==(p=n[i])?void 0:p.toString())}D=await Stimulsoft.Report.Dashboard.StiReportParser.parseAsync(t.hyperlinkPattern,l,!1,r)}let F=null!=t.textFormat&&t.textFormat.is(StiGeneralFormatService)?null:w,A=(null!=o&&null!=t.textFormat&&(t.textFormat.is(StiCurrencyFormatService)||t.textFormat.is(StiNumberFormatService)||t.textFormat.is(StiPercentageFormatService))&&(F=o.toString()),new StiMargins(2,2,1,0)),v=(null!=C&&(A=new StiMargins(A.left+C.left,A.right+C.right,A.top+C.top,A.bottom+C.bottom)),new StiText(i));if(v.name=l.name+`_Cell`,v.border=this.getBorderSides(e,i,l,t,a),v.brush=new StiSolidBrush(I.backColor),v.excelDataValue=F,v.font=StiElementConsts.Table.Font.getGdiFont(r,null,f),v.horAlignment=T,v.vertAlignment=StiVertAlignment.Center,v.margins=A,v.text=w,v.textBrush=new StiSolidBrush(I.foreColor),v.textFormat=null!=t.textFormat?t.textFormat.clone():null,v.wordWrap=0!=c,v.componentPlacement=`d.`+l.name,v.trimming=StringTrimming.EllipsisCharacter,v.hyperlinkValue=D,e.components.add(v),null!=b&&b.iconAlignment!=StiIconAlignment.None&&g){let t=await StiConditionIconPainter.getImageWithConditionIcon(b,i,l.name);e.components.add(t)}}static renderImageCell(t,e,i,r,l,n,s){if(s==__.f.StiDashboardExportFormat.Data)return;let o=StiImageHelper.getImageFromObject(l);if(null==o)return;let a=new StiImage(e);a.name=i.name+`_Cell`,a.border=this.getBorderSides(t,e,i,r,StiBorderSides.All),a.brush=new StiSolidBrush(n),a.stretch=!0,a.aspectRatio=!0,a.imageToDraw=o,a.horAlignment=r.horAlignment,t.components.add(a)}static async renderBoolCell(t,e,i,r,l,n,s,o,a,u,S){if(S==__.f.StiDashboardExportFormat.Data)return void await this.renderTextCell(t,e,i,r,l,n,s,o,a,null,u,S,!1);let m=0!=i.columns.indexOf(n),h=i.columns.indexOf(n)!=i.columns.length-1,c=(m?StiBorderSides.Left:StiBorderSides.None)|(h?StiBorderSides.Right:StiBorderSides.None),d=StiDashboardStyleHelper.getTableStyle(i),g=new StiImage(e);g.name=i.name+`_Cell`,g.border=a?new StiBorder(c,d.lineColor,1,StiPenStyle.Solid):new StiBorder(StiBorderSides.None,Color.transparent,0,StiPenStyle.None),g.brush=new StiSolidBrush(u),g.horAlignment=StiHorAlignment.Center,g.vertAlignment=StiVertAlignment.Center,t.components.add(g)}static async getColumnVisibilityState(t,e){if(t.visibility==StiTableColumnVisibility.TrueAndHidden)return!1;return StiTableColumnVisibilityHelper.getVisible(t,e)}static getForeColor(t,e,i,r){if(!Color.transparent.equals(e.foreColor))return e.foreColor;if(e.is(StiDimensionColumn)&&e.showHyperlink)return StiColor.get("165dc8");let l=StiDashboardExpressionHelper.getForeColor(t,t.cells.data.foreColor);if(!Color.transparent.equals(l))return l;return null!=i?r?i.alternatingCellForeColor:i.cellForeColor:StiElementConsts.Table.Font.Color}static getHeaderBackColor(t){if(!t.cells.columns.backColor.equals(Color.transparent))return t.cells.columns.backColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.headerBackColor}static getHeaderForeColor(t){if(!Color.transparent.equals(t.cells.columns.foreColor))return t.cells.columns.foreColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.headerForeColor}static getFooterForeColor(t){if(!Color.transparent.equals(t.footerForeColor))return t.footerForeColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.footerForeColor}static getFooterBackColor(t){if(!t.cells.totals.backColor.equals(Color.transparent))return t.cells.totals.backColor;let e=StiDashboardStyleHelper.getTableStyle(t);return e.footerBackColor}static getBorderSides(t,e,i,r,l){let n=StiDashboardStyleHelper.getTableStyle(i),s=0!=(l&StiBorderSides.Left)&&0!=i.columns.indexOf(r)&&e.left<t.width,o=0!=(l&StiBorderSides.Right)&&i.columns.indexOf(r)!=i.columns.length-1&&e.right<=t.width,a=(s?StiBorderSides.Left:StiBorderSides.None)|(o?StiBorderSides.Right:StiBorderSides.None),u=a!=StiBorderSides.None?1:0,S=a!=StiBorderSides.None?n.lineColor:Color.transparent;return new StiBorder(a,S,u,StiPenStyle.Solid)}}__.z.StiTableElementExportTool=kv0}let StiAutoSizeHtmlTextHelper=__.h.StiAutoSizeHtmlTextHelper;{class WC0 extends __.z.StiElementExportTool{async render(t,e,l,i){if(this.renderEmptyDataMessage(t,e,l.clone(),i))return;let n=t.as(StiTextElement),s="";if(Stimulsoft.StiOptions.Engine.dashboardTextElementExpressionParser==StiParserType.ReportParser||StiExpressionHelper.isTimeExpression(n.text)||WC0.isExpressionWithVariables(n.text,n.report))s=await StiReportParser.parseAsync(n.text,n,!1);else if(n.isQuerable){let t=await StiElementDataCache.tryToGetOrCreate(n),e=new List(null==t?void 0:t.rows.firstOrDefault()).select(t=>StiValueHelper.tryToString(t)).toList();null!=e&&(s=StiExpressionHelper.replaceExpressionBlocksByValues(n.text,e))}else s=n.text;!StiString.isNullOrEmpty(s)&&s.toLowerCase()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll(" ","").includes("javascript:")&&(s=s.toLowerCase()[Stimulsoft.System.StiObject.stimulsoft]().replaceAll("javascript",""));let o=i.format==__.f.StiDashboardExportFormat.Excel||i.format==__.f.StiDashboardExportFormat.Html?.96:1,r=StiExportTool.getScaleFactor(e,i);if(s=this.changeFontSize(s,r*o),n.sizeMode==StiTextSizeMode.Fit||n.sizeMode==StiTextSizeMode.FitAndWordWrap){let r,t=3;do{let t=StiAutoSizeHtmlTextHelper.measure(null,l.clone(),s,n),e=t.width>l.width?l.width/t.width:1,i=l.height<t.height?l.height/t.height:1;r=Math.min(Math.abs(e),Math.abs(i)),(r=n.sizeMode==StiTextSizeMode.FitAndWordWrap&&.8<t.width/l.width&&i<.5?1-.7*(1-r):r)<1&&(s=this.changeFontSize(s,.99*r))}while(r<1&&0<t--);o<1&&(s=this.changeFontSize(s,o))}let a=new StiText(l);a.name=t.name+`_Content`,a.allowHtmlTags=!0,a.vertAlignment=n.vertAlignment,a.horAlignment=n.horAlignment,a.text=s,a.textBrush=new StiSolidBrush(StiDashboardStyleHelper.getForeColor(n)),a.trimming=n.sizeMode==StiTextSizeMode.Trimming?StringTrimming.EllipsisCharacter:StringTrimming.None,a.wordWrap=n.sizeMode==StiTextSizeMode.WordWrap||n.sizeMode==StiTextSizeMode.FitAndWordWrap,a.rightToLeft=n.rightToLeft,e.components.add(a)}changeFontSize(t,e){if(null==t||!t.startsWith("<font ")||t.indexOf(' size="')<0)return t;let i=t.indexOf(' size="')+7,r=t.substring(i),l=(r=r.substring(0,r.indexOf('"')))[Stimulsoft.System.StiObject.stimulsoft]().toNumber();return null==l&&(l=12),l=Math.ceil(l*e*10)/10,t.substring(0,i)+l.toString().replace(",",".")+t.substring(i+r.length)}static isExpressionWithVariables(e,i){var t;if(!StiString.isNullOrEmpty(e)&&StiExpressionHelper.isExpression(e)&&0<(null==(t=null==i?void 0:i.variables)?void 0:t.count))for(let t of i.variables.keys)if(e.toLowerCase().includes(t.toLowerCase()))return!0;return!1}}__.z.StiTextElementExportTool=WC0}__.z.StiTreeViewBoxElementExportTool=class extends __.z.StiComboBoxElementExportTool{async render(t,e,i,r){return super.render(t,e,i,r)}getValuesCount(t,e){let i=t.as(IStiTreeViewBoxElement),r=StiTreeViewHelper.fetchItems(e,i.showBlanks);return null!=r?r.length:0}};let StiShapeDirection=Stimulsoft.Report.Components.StiShapeDirection,StiTriangleShapeType=Stimulsoft.Report.Components.StiTriangleShapeType;{class DD0 extends __.z.StiListBoxElementExportTool{async render(t,e,i,r){return super.render(t,e,i,r)}getCheckStyle(e,i){let t=e;if(!t.userFilters.any())return StiCheckStyle.CheckRectangle;if(t.userFilters.any(t=>t.condition==StiDataFilterCondition.IsFalse))return StiCheckStyle.NoneRectangle;if(null!=i.items){let t=i.items.select(t=>this.getCheckStyle(e,t));if(t.all(t=>t==StiCheckStyle.CheckRectangle))return StiCheckStyle.CheckRectangle;if(t.all(t=>t==StiCheckStyle.NoneRectangle))return StiCheckStyle.NoneRectangle;return StiCheckStyle.DotRectangle}if(t.userFilters.any(t=>t.condition==StiDataFilterCondition.EqualTo&&t.value==i.toString()))return StiCheckStyle.CheckRectangle;return StiCheckStyle.NoneRectangle}async renderItems(t,e,i,r,l){let n,s=await StiElementDataCache.tryToGetOrCreate(i);if(null==s)return;let o=!1,a=i.as(IStiTreeViewElement),u=StiTreeViewHelper.fetchItems(s,a.showBlanks),S=(1==(null==u?void 0:u.length)&&0<(null==(n=u[0].items)?void 0:n.length)&&(u=u.concat(u[0].items),o=!0),null==u?void 0:u.select(t=>null==t?"":null!=t.key&&t.key instanceof DateTime?t.key.toShortDateString():t.toString())),m=null==u?void 0:u.select(t=>this.getCheckStyle(i,t)),h=null==u?void 0:u.select(t=>o&&t==u.first());this.renderItems2(t,e.clone(),i,S,m,h,r,l)}renderItem(t,e,i,r,l,n,s,o,a,u,S){r!=StiLocHelper.locAll&&(DD0.renderExpander(t,e.clone(),i,a),e.x+=StiElementConsts.ListBox.CheckBoxWidth/2,e.width-=StiElementConsts.ListBox.CheckBoxWidth/2),super.renderItem(t,e.clone(),i,r,l,n,s,o,a,u,S)}static renderExpander(t,e,i,r){e=new Rectangle(e.x,e.y+e.height/2-e.height/8,StiElementConsts.ListBox.CheckBoxWidth/3,e.height/4);let l=new StiShape(e);l.name=i.name+`_ItemExpander`,l.shapeType=new StiTriangleShapeType(r?StiShapeDirection.Down:StiShapeDirection.Right),l.brush=new StiSolidBrush(Color.dimGray),l.style=StiPenStyle.None,t.components.add(l)}}__.z.StiTreeViewElementExportTool=DD0}let StiHorizontalLinePrimitive=Stimulsoft.Report.Components.StiHorizontalLinePrimitive;__.z.StiWebContentElementExportTool=class extends __.z.StiElementExportTool{async render(t,r,l,e){if(this.renderEmptyDataMessage(t,r,l.clone(),e))return;let n=t.as(StiWebContentElement),s=StiString.isNullOrEmpty(n.url)?"EmbedCode":"URL",o=StiString.isNullOrEmpty(n.url)?n.embedCode:n.url;if(null!=e&&e.is(StiSvgDashboardExportSettings)&&e.designMode){let t=30,e=1,i=20;this.paintHeader(r,n,new Rectangle(l.x,l.top,l.width,t),s),this.paintSeparator(r,n,new Rectangle(l.x+i,l.top+t,l.width-2*i,e)),this.paintWebContent(r,n,new Rectangle(l.x,l.top+t+e,l.width,t),o,!0)}else this.paintWebContent(r,n,new Rectangle(l.x,l.top,l.width,l.height),o)}paintHeader(t,e,i,r){let l=StiDashboardStyleHelper.getForeColor(e),n=new StiText(i);n.name=e.name+`__WebContentHeader`,n.vertAlignment=StiVertAlignment.Center,n.horAlignment=StiTextHorAlignment.Left,n.textBrush=new StiSolidBrush(l),n.brush=new StiSolidBrush(Color.transparent),n.margins=new StiMargins(20,0,0,0),n.text=r,n.font=new Font("Arial",8,FontStyle.Bold),t.components.add(n)}paintSeparator(t,e,i){let r=StiDashboardStyleHelper.getForeColor(e),l=new StiHorizontalLinePrimitive(i);l.name=e.name+`_WebContentSep`,l.color=r,t.components.add(l)}paintWebContent(t,e,i,r,l=!1){let n=StiDashboardStyleHelper.getForeColor(e),s=new StiText(i);s.name=e.name+`__WebContentContent`,s.vertAlignment=l?StiVertAlignment.Center:StiVertAlignment.Top,s.horAlignment=StiTextHorAlignment.Left,s.textBrush=new StiSolidBrush(n),s.brush=new StiSolidBrush(Color.transparent),s.margins=new StiMargins(l?20:0,0,0,0),s.text=r,s.font=new Font("Arial",8,FontStyle.Bold),s.allowHtmlTags=!l,t.components.add(s)}};{class XE0{static run(r,l){if(void 0===r)return void XE0.run(Stimulsoft,"Stimulsoft");if("Stimulsoft.ExternalLibrary"==l||"Stimulsoft.Blockly"==l||"Stimulsoft.Report.StiOptions"==l||"Stimulsoft.StiOptions"==l)return;l=l.replace("Stimulsoft.System","System");for(let i in r){let t=r[i],e=typeof t;"function"==e?(t.ssTypeName=i,t.ssNamespace=l):"object"==e&&XE0.run(t,l+`.`+i)}}}__.c.StiTypesHelper=XE0}__.c.StiTypesHelper.run();export{Stimulsoft};
|