-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsmart.common.js
195 lines (147 loc) · 381 KB
/
smart.common.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
/* Smart UI v15.0.0 (2023-Jan)
Copyright (c) 2011-2023 jQWidgets.
License: https://htmlelements.com/license/ */
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 4232:
/***/ (() => {
Smart.Utilities.Assign("Complex",class{constructor(r,a){if("string"==typeof r)this.complexNumber=this.parseComplexNumber(r),this.realPart=this.complexNumber.realPart,this.imaginaryPart=this.complexNumber.imaginaryPart;else{if("number"!=typeof r)throw new Error("Can't create complex number");if(this.realPart=r,"number"==typeof a)this.imaginaryPart=a;else{if(void 0!==a)throw new Error("Can't create complex number: invalid imaginary part");this.imaginaryPart=0}this.complexNumber=this.parseComplexNumber(this.realPart,this.imaginaryPart)}}valueOf(){return 0===this.imaginaryPart?this.realPart:null}isNaN(){return isNaN(this.realPart)||isNaN(this.imaginaryPart)}isZero(){return!(0!==this.realPart&&"-0"!==this.realPart.toString()||0!==this.imaginaryPart&&"-0"!==this.imaginaryPart.toString())}isFinite(){return isFinite(this.realPart)&&isFinite(this.imaginaryPart)}isInfinite(){return!(this.isNaN()||this.isFinite())}parseComplexNumber(r,a){const t={realPart:0,imaginaryPart:0};if(null==r)t.realPart=t.imaginaryPart=0;else if(void 0!==a)t.realPart=r,t.imaginaryPart=a;else switch(typeof r){case"object":if("imaginaryPart"in r&&"realPart"in r)t.realPart=r.realPart,t.imaginaryPart=r.imaginaryPart;else{if(2!==r.length)throw SyntaxError("Invalid Complex Number Parameter");t.realPart=r[0],t.imaginaryPart=r[1]}break;case"string":{t.imaginaryPart=t.realPart=0;const a=r.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g);let i=1,e=0;if(null===a)throw SyntaxError("Invalid Complex Number Parameter");for(let r=0;r<a.length;r++){const s=a[r];if(" "===s||"\t"===s||"\n"===s);else if("+"===s)i++;else if("-"===s)e++;else if("i"===s||"I"===s){if(i+e===0)throw SyntaxError("Invalid Complex Number Parameter");" "===a[r+1]||isNaN(a[r+1])?t.imaginaryPart+=parseFloat((e%2?"-":"")+"1"):(t.imaginaryPart+=parseFloat((e%2?"-":"")+a[r+1]),r++),i=e=0}else{if(i+e===0||isNaN(s))throw SyntaxError("Invalid Complex Number Parameter");"i"===a[r+1]||"I"===a[r+1]?(t.imaginaryPart+=parseFloat((e%2?"-":"")+s),r++):t.realPart+=parseFloat((e%2?"-":"")+s),i=e=0}}if(i+e>0)throw SyntaxError("Invalid Complex Number Parameter");break}case"number":t.imaginaryPart=0,t.realPart=r;break;default:throw SyntaxError("Invalid Complex Number Parameter")}return t}compare(r,a){const t=this.parseComplexNumber(r,a),i=this.parseComplexNumber("1e-16");return Math.abs(t.realPart-this.realPart)<=i&&Math.abs(t.imaginaryPart-this.imaginaryPart)<=i}toString(){let r=this.realPart,a=this.imaginaryPart,t="";return this.isNaN()?"NaN":this.isZero()?"0":this.isInfinite()?"Infinity":(0!==r&&(t+=r),0!==a&&(0!==r?t+=a<0?" - ":" + ":a<0&&(t+="-"),a=Math.abs(a),1!==a&&(t+=a),t+="i"),t||"0")}});
/***/ }),
/***/ 6057:
/***/ (() => {
(()=>{Smart.DataAdapter=window.smartDataAdapter=class{constructor(e){e||(e={});const t=Object.assign(this,e);t.key=(65536*(1+Math.random())|0).toString(16).substring(1),t.$document=Smart.Utilities.Extend(document),t.boundSource=!1===t.observable||t.virtualDataSource?[]:new Smart.ObservableArray,t.dataItemById=[],void 0===t.allowAdd&&(t.allowAdd=!0),void 0===t.allowRemove&&(t.allowRemove=!0),void 0===t.allowUpdate&&(t.allowUpdate=!0),void 0===t.mapChar&&(t.mapChar="."),void 0!==e.observable||t.virtualDataSource?t.observable=!1:t.observable=!0,void 0===t.sanitizeHTML&&(t.sanitizeHTML="blackList"),t._expandedRowIds=[],e.dataSource||(t.dataSource=[]),e.dataFields||(t.dataFields=[]),e.dataSourceType||(t.dataSourceType="array"),e.id||(t.id=null),e.autoFetch||(t.autoFetch=!0),e.dataFields&&(t.dataFields=e.dataFields),Object.defineProperty(t,"groupBy",{configurable:!1,enumerable:!0,get:()=>t._groupBy?t._groupBy:[],set(e){const a=()=>{t.boundHierarchy=null,t.refreshHierarchy(),t.onGroup&&t.onGroup()};t._groupBy=new Smart.ObservableArray(e),t._groupBy.notify((function(){a()})),t.isInitialized&&a()}}),e.groupBy?e.groupBy.toArray?t.groupBy=e.groupBy.toArray():t.groupBy=e.groupBy:t.groupBy=[],e&&!1!==e.autoBind&&t.dataBind(),t.isInitialized=!0}beginUpdate(){this.isUpdating=!0}endUpdate(){const e=this;e.isUpdating=!1,e.refreshIndexes(),e.refreshHierarchy()}get expandHierarchy(){return void 0===this._expandHierarchy&&(this._expandHierarchy=!1),this._expandHierarchy}set expandHierarchy(e){const t=this;t._expandHierarchy=e,t.isInitialized&&t.refreshHierarchy()}_getDataField(e){switch(e.name){case"leaf":case"parent":case"expanded":case"checked":case"selected":case"level":case"icon":case"data":case"group":case"children":case"items":e.map?e.map=e.map.replace(e.name,"$"+e.name):e.map=e.name,e.name="$"+e.name}}get dataFields(){return this._dataFields}set dataFields(e){const t=this;return t._dataFields=t._getDataFieldObjects(e),t._dataFields}_getDataFieldObjects(e){const t=this;let a=[];if("number"==typeof e){const t="A".charCodeAt(0);let n="",r=0;for(let i=0;i<e;i++){const e=String.fromCharCode(t+r);r++;const i=n+e;a.push({name:i,dataType:"string"}),r>=26&&(r=0,n+="A")}}else if(Array.isArray(e)&&e.length>0)for(let n=0;n<e.length;n++){const r=e[n];if("string"==typeof r){const e=r.split(":"),t=e[0].trim(),n=e.length>1?e[1].trim():"string";a.push({name:t,dataType:n})}else a.push(r);t._getDataField(a[a.length-1])}return a}get dataSource(){const e=this;return e._dataSource||(e._dataSource=[]),e._dataSource}set dataSource(e){const t=this;t._dataSource=e,t.isInitialized&&(t.boundSource=!1===t.observable||t.virtualDataSource?[]:new Smart.ObservableArray,t.dataItemById=[],t.bindingCompleted=!1,t.dataBind(),t.refreshIndexes())}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;t.canNotify&&t.notifyFn&&t.notifyFn(e)}notify(e){e&&(this.notifyFn=e)}toArray(){const e=this;return!1===e.observable?e.boundSource:e.boundSource.toArray()}forEach(e){const t=this;if(e)if(t.boundHierarchy&&t.boundHierarchy.length>0){const a=(e=>{let t=[];for(;e;){t=t.concat(e);for(let a=0;a<e.length;a++)e[a].children&&(t=t.concat(e[a].children));e=e.children}return t})(t.boundHierarchy);for(let t=0;t<a.length;t++){e(a[t],t)}}else for(let a=0;a<t.boundSource.length;a++){e(t.boundSource[a],a)}}dataBind(){const t=this;t.bindingCompleted=!1,t.clear();const a=()=>{t.observable&&(t.boundSource.notify||(t.boundSource=new Smart.ObservableArray),t.boundSource.notify((function(e){if("update"===e.action&&e.path&&e.path.indexOf(".")>=0&&-1===e.path.indexOf("children")&&-1===e.path.indexOf("parent")&&-1===e.path.indexOf("loaded")&&-1===e.path.indexOf("level")&&-1===e.path.indexOf("leaf")&&-1===e.path.indexOf("expanded")){let a=!1;for(let n=0;n<t.dataFields.length;n++){const r=t.dataFields[n].name;e.path.indexOf(r)>=0&&(a=!0)}t._notify&&a&&t._notify({action:"update",data:e.target,index:e.index})}}))),t._onBindingComplete()};"string"==typeof t.dataSource&&(t.dataSource.indexOf(".json")>=0||"json"===t.dataSourceType)?(t.url=t.dataSource,t.dataSourceType="json",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".xml")>=0?(t.url=t.dataSource,t.dataSourceType="xml",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".xlsx")>=0?(t.url=t.dataSource,t.dataSourceType="xlsx",new e(t,(e=>{if(!e[0])return e=[],t._bindToArray(),void a();const n=Object.keys(e[0]),r={},i=[];if(!1!==t.exportHeader){let a=0;for(let e in n){r[n[e]]=t.dataFields[a++].name}for(let t=1;t<e.length;t++){const a=e[t],o={};for(let e in n){const t=n[e];o[r[t]]=a[t]}i.push(o)}t.dataSource=i}t._bindToArray(),a()}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".csv")>=0?(t.url=t.dataSource,t.dataSourceType="csv",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&t.dataSource.indexOf(".tsv")>=0?(t.url=t.dataSource,t.dataSourceType="tsv",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&(t.dataSource.indexOf(".ics")>=0||t.dataSource.indexOf(".php")>=0&&"ics"===t.dataSourceType||t.dataSource.indexOf(".txt")>=0&&"ics"===t.dataSourceType)?(t.url=t.dataSource,t.dataSourceType="ics",new e(t,(e=>{t.dataSource=e}))):"string"==typeof t.dataSource&&(t.dataSource.indexOf("BEGIN:VCALENDAR")>=0||"ics"===t.dataSourceType)?(t._bindToICS(),a()):"string"==typeof t.dataSource&&(t.dataSource.indexOf("<?xml")>=0||"xml"===t.dataSourceType)?(t._bindToXML(),a()):"string"==typeof t.dataSource&&(t.dataSource.indexOf(" ")>=0||t.dataSource.indexOf(",")>=0||"tsv"===t.dataSourceType||"csv"===t.dataSourceType||"tab"===t.dataSourceType)?(t._bindToCSV(),a()):"array"===t.dataSourceType?(t._bindToArray(),a()):"json"===t.dataSourceType&&(t._bindToJSON(),a())}_bindToXML(){const e=this;let t=null,a=null;window.DOMParser&&(t=new DOMParser,a=t.parseFromString(e.dataSource,"text/xml")),void 0===e.root&&(e.root=""),void 0===e.record&&(e.record="");const n=a.querySelectorAll(e.root+" "+e.record),r=n.length,i=[];let o=e.dataFields?e.dataFields.length:0;if(0===o){const t=n[0],a=new Array;for(let e in t){const t=e;a[a.length]={name:t}}e.dataFields=a,o=a.length}for(let t=0;t<r;t++){const a=n[t],r={};if(void 0===a)break;if(e.id){const t=a.querySelector(e.id);r[e.id]=t.textContent}for(let t=0;t<o;t++){const n=e.dataFields[t],i=a.querySelector(n.map||n.name);r[n.name]=i.textContent}i[t]=r}e.canNotify=!1,e.dataSource=i,e.canNotify=!0,e._bindToArray()}static BindToCSV(e,t=!1){const a=""+e,n=-1===a.indexOf(",")?"\t":",",r=a.split("\r"),i=new Array,o=[];let d=a.split("\n"),l=d.length;1===l&&r.length>1&&(d=r,l=d.length);const s=!0===t;for(let e=0;e<l;e++){const t={},a=d[e].split(n);for(let n=0;n<a.length;n++){let r=o[n],i=a[n];if(r||(o.push({name:i.trim()}),r=o[o.length-1]),i=i.trim(),1!==e||s)switch(r.dataType){case"boolean":i="false"!==i;break;case"number":i=parseFloat(i);break;case"date":i=new Date(i)}else{let e="string";"false"===i||"true"===i?(e="boolean",i="false"!==i):isNaN(parseInt(i)&&-1===i.indexOf("/"))?(i.indexOf("-")>=0||i.indexOf("/")>=0||i.indexOf(":")>=0)&&"Invalid Date"!==new Date(i).toString()&&(e="date",i=new Date(i)):(e="number",i=parseFloat(i)),r.dataType||(r.dataType=e)}t[r.name]=i}(s||e>0)&&i.push(t)}return i}_bindToCSV(){const e=this,t=""+e.dataSource,a=-1===t.indexOf(",")?"\t":",",n=t.split("\r"),r=new Array;let i=t.split("\n"),o=i.length;1===o&&n.length>1&&(i=n,o=i.length);const d=e.dataFields.length>0;for(let t=0;t<o;t++){const n=i[t],o={},l=i[t].split(a);for(let a=0;a<l.length;a++){let r=e.dataFields[a],i=l[a];if(r||(e.dataFields.push({name:i.trim()}),r=e.dataFields[e.dataFields.length-1]),r.map&&(i=n[r.map]),i=i.trim(),1!==t||d)switch(r.dataType){case"boolean":i="false"!==i;break;case"number":i=parseFloat(i);break;case"date":i=new Date(i)}else{let e="string";"false"===i||"true"===i?(e="boolean",i="false"!==i):isNaN(parseInt(i)&&-1===i.indexOf("/"))?(i.indexOf("-")>=0||i.indexOf("/")>=0||i.indexOf(":")>=0)&&"Invalid Date"!==new Date(i).toString()&&(e="date",i=new Date(i)):(e="number",i=parseFloat(i)),r.dataType||(r.dataType=e)}o[r.map||r.name||a.toString()]=i}(d||t>0)&&r.push(o)}e.canNotify=!1,e.dataSource=r,e.canNotify=!0,e._bindToArray()}_onBindingComplete(){const e=this;e._buildHierarchy(),e.onBindingComplete&&e.onBindingComplete({data:e.boundSource}),e._notify&&e._notify({action:"bindingComplete",data:e.boundSource}),e.bindingCompleted=!0}refreshHierarchy(){this.isUpdating||this._buildHierarchy()}find(){return this.boundSource.find.apply(this.boundSource,arguments)}onVirtualDataSourceRequested(e,t){const a=this;let n=t?t.first:1/0,r=t?t.last:1/0,i=t?t.row:null;if(void 0===n&&(n=1/0),void 0===r&&(r=1/0),a.virtualFirstIndex=n,a.virtualLastIndex=r,a.virtualDataSource){const o=function(r){void 0!==r.virtualDataSourceLength&&(a.virtualDataSourceLength=r.virtualDataSourceLength),new Smart.DataAdapter({dataSource:r.dataSource,dataFields:r.dataFields||a.dataFields,data:t,keyDataField:r.keyDataField,parentDataField:r.parentDataField,observable:!1,id:r.id||a.id,onBindingComplete(r){if(void 0===t.result&&(t.result=!0),a.virtualDataSourceOnExpand&&i)return a.groupBy.length>0?r.data&&r.data.length>0&&a.add(r.data):r.data&&r.data.length>0?a.add(r.data,i.$.id):i.leaf=!0,a.onFilter&&a.onFilter(),void e(t);n===1/0&&"scroll"===t.action?r.data&&r.data.length&&a.add(r.data):"filter"===t.action||"group"===t.action?(a.canNotify=!1,a.dataSource=r.data,a.canNotify=!0):("add"===t.action||"update"===t.action||t.action,a.canNotify=!1,a.dataSource=r.data,a.canNotify=!0),a.onFilter&&a.onFilter(),e(t)}})};let d={};if(t.sorting&&t.sorting.length>0){let e=[];for(let a in t.sorting)e.push(a+" "+t.sorting[a].sortOrder.toUpperCase());const a=" ORDER BY "+e.join(", ");d.orderBy=a}else d.orderBy="";if(void 0===n||void 0===r||0===n&&0===r)d.limit="";else{const e=r-n,t=" LIMIT "+e+" OFFSET "+n;d.limit=t,isNaN(e)&&(d.limit="")}if(t.grouping&&t.grouping.length>0){const e=" GROUP BY "+t.grouping[0];d.groupBy=e}else d.groupBy="";if(t.filtering&&t.filtering.length>0){const e=(e,t)=>{switch(t.condition){case"EMPTY":return e+" = ''";case"NOT_EMPTY":return e+" != ''";case"EQUAL":return e+" = '"+t.value+"'";case"NOT_EQUAL":return e+" != '"+t.value+"'";case"CONTAINS_CASE_SENSITIVE":case"CONTAINS":return e+" LIKE '%"+t.value+"%'";case"DOES_NOT_CONTAIN_CASE_SENSITIVE":case"DOES_NOT_CONTAIN":return e+" NOT LIKE '%"+t.value+"%'";case"STARTS_WITH_CASE_SENSITIVE":case"STARTS_WITH":return e+" LIKE '"+t.value+"%'";case"ENDS_WITH_CASE_SENSITIVE":case"ENDS_WITH":return e+" LIKE '%"+t.value+"'";case"NULL":return e+" IS NULL";case"NOT_NULL":return e+" IS NOT NULL"}},a=(e,t)=>{switch(t.condition){case"EQUAL":return e+" = "+t.value;case"NOT_EQUAL":return e+" != "+t.value;case"GREATER_THAN":return e+" > "+t.value;case"GREATER_THAN_OR_EQUAL":return e+" >= "+t.value;case"LESS_THAN":return e+" < "+t.value;case"LESS_THAN_OR_EQUAL":return e+" <= "+t.value;case"NULL":return e+" IS NULL";case"NOT_NULL":return e+" IS NOT NULL";case"RANGE":return"("+e+" >= "+t.value+" and "+e+" <= "+t.valueTo+")"}},n=(e,t,a)=>{if(a.operator){var n=e(t,a.condition1),r=e(t,a.condition2);return"("+n+" "+a.operator+" "+r+")"}return e(t,a)};let r=[];for(let i in t.filtering){const o=t.filtering[i];let d=o.filters,l=[],s=" AND ";for(let t=0;t<d.length;t++){const r=d[t];switch(r.type){case"stringFilter":l.push(n(e,i,r));break;case"numericFilter":case"dateFilter":case"booleanFilter":l.push(n(a,i,r))}1===o.logicalOperators[t]&&(s=" OR ")}r.push("("+l.join(s)+")")}if(r.length>0){let e=" AND ";t.filterOperator&&"or"===t.filterOperator.toLowerCase()&&(e=" OR "),d.where=" WHERE "+r.join(e)}else d.where=""}else d.where="";if("dataBind"===t.action&&a.virtualDataSourceOnExpand&&a.keyDataField&&a.parentDataField&&(d.where?d.where+=" AND "+a.parentDataField+" IS NULL":d.where=" WHERE "+a.parentDataField+" IS NULL"),"update"===t.action){const e=[];for(let n in t.edit.row)"$"!==n&&n!==a.id&&e.push(n+"='"+t.edit.row[n]+"'");d.update=" SET "+e.join(", ")+" WHERE "+a.id+"="+t.edit.row[a.id]}if("remove"===t.action){const e=[];for(let n in t.edit.row)"$"!==n&&n!==a.id&&e.push(n+" = '"+t.edit.row[n]+"'");d.remove=" WHERE "+a.id+"="+t.edit.row[a.id]}if("add"===t.action){const e=[],a=[];for(let n in t.edit.row)"$"!==n&&(a.push(n),null!==t.edit.row[n]?e.push("'"+t.edit.row[n]+"'"):e.push("null"));d.add=" ("+a.join(", ")+") VALUES ("+e.join(", ")+")"}"expand"===t.action?(a.groupDataField?d.where?d.where+=" AND "+a.groupDataField+" = '"+i[a.groupDataField]+"'":d.where=" WHERE "+a.groupDataField+" = '"+i[a.groupDataField]+"'":a.keyDataField&&a.parentDataField?d.where?d.where+=" AND "+a.parentDataField+" = "+i[a.keyDataField]:d.where=" WHERE "+a.parentDataField+" = "+i[a.keyDataField]:d.where?d.where+=" AND "+i.groupDataField+" = '"+i.label+"'":d.where=" WHERE "+i.groupDataField+" = '"+i.label+"'",d.where.indexOf("undefined")>=0&&(d.where=""),d.limit="",d.groupBy="",a.virtualDataSourceOnExpand(o,{first:n,last:r,row:t.row,sorting:t.sorting,filtering:t.filtering,grouping:t.grouping,action:t.action,query:d})):a.virtualDataSource(o,{first:n,last:r,sorting:t.sorting,filtering:t.filtering,filterOperator:t.filterOperator||"and",grouping:t.grouping,action:t.action,query:d})}else e()}add(e,t){const a=this;if(!e)return;let n=!0;const r=function(e){const r=a._getDataItem(e,a.boundSource.length);if(a.dataItemById[r.$.id])return void 0!==t&&(r.$.parentId=t),null;a[a.boundSource.length]=r,a.dataItemById[r.$.id]=r;const i=a.boundSource.push(r);return void 0!==t&&(r.$.parentId=t),i||(n=!1),r};if(e.length){let t=[];for(let a=0;a<e.length;a++){const n=r(e[a]);n&&t.push(n)}a._notify({action:"add",data:t})}else{const t=r(e);a._notify({action:"add",data:t})}return a.refreshHierarchy(),n}refreshIndexes(){const e=this;for(let t=0;t<e.boundSource.length;t++)e[t]=e.boundSource[t],e[t].$.index=t,e.dataItemById[e[t].$.id]=e[t];let t=e.boundSource.length;for(;e[t];)delete e[t],t++}removeLast(){const e=this;delete e[e.boundSource.length-1];const t=e.boundSource.pop();return delete e.dataItemById[t.$.id],e._notify({action:"removeLast",data:t}),e.refreshHierarchy(),t}removeById(e){const t=this,a=t.indexOf(t.dataItemById[e]);t.boundSource[a]&&t.removeAt(a)}remove(e){const t=this;let a=t.indexOf(e);-1===a&&e&&e.$&&(a=t.indexOf(t.dataItemById[e.$.id]));t.boundSource[a]&&t.removeAt(a)}removeAt(e){const t=this,a=t.boundSource[e];if(!a)throw new Error("Invalid Item Index");t.boundSource.splice(e,1),delete t.dataItemById[a.$.id],t.refreshIndexes(),t._notify({action:"remove",index:e,data:a}),t.refreshHierarchy()}update(e,t){const a=this;if(Smart.Utilities.Types.isArray(e)&&Smart.Utilities.Types.isArray(t)&&0===e.length&&0===t.length)return void a.refreshHierarchy();if(t.length&&e.length){let n=[];for(let r=0;r<e.length;r++){const i=a._getDataItem(t[r],e[r]),o=e[r];n.push(i),a.boundSource[o]=i,a[o]=a.boundSource[o],a.dataItemById[i.$.id]=a[o]}return a._notify({action:"update",index:e,data:n}),void a.refreshHierarchy()}const n=a._getDataItem(t,e),r=a.boundSource[e].$.id;return n.$.id=r,a.boundSource[e]=n,a[e]=a.boundSource[e],a.dataItemById[n.$.id]=a[e],a._notify({action:"update",index:e,data:n}),a.refreshHierarchy(),n}insert(e,t){const a=this;if(t.length){const n=[];for(let r=0;r<t.length;r++){const i=a._getDataItem(t[r],e+r);n.push(i)}t=n}else t=a._getDataItem(t,e);const n=a.boundSource.splice(e,0,t);return a.refreshIndexes(),a._notify({action:"insert",index:e,data:t}),a.refreshHierarchy(),n}move(e,t){if(t>e&&t-e==1||e===t)return;const a=this,n=a.boundSource.splice(e,1)[0];t>e?(t--,a.boundSource.splice(t,0,n)):a.boundSource.splice(t,0,n),a.refreshIndexes(),a._notify({action:"move",index:t,data:a.boundSource[t]}),a.refreshHierarchy()}indexOf(e){return this.boundSource.indexOf(e)}get length(){const e=this;return void 0!==e.virtualDataSourceLength?e.virtualDataSourceLength:e.dataSourceLength?e.dataSourceLength:"number"==typeof e.dataSource?e.dataSource:e.bindingCompleted?e.boundSource.length:e.dataSource&&"string"!=typeof e.dataSource&&e.dataSource.length?e.dataSource.length:e.boundSource.length}clear(){const e=this;if(!e.isInitialized)return e._cachedValues=[],void(e.dataItemById=[]);for(let t=0;t<e.boundSource.length;t++)delete e[t];e._expandedRowIds=[],e._cachedValues=[],e.boundSource=e.observable?new Smart.ObservableArray:[],e.dataItemById=[],e.refreshHierarchy()}_getId(e,t,a){if(null===e||void 0===e.name||!e.name||!t.getAttribute){if(e&&e.toString().length>0&&t.getAttribute){let a=t.getAttribute(e);if(null!==a&&a.toString().length>0)return a.trim().split(" ").join("").replace(/([ #;?%&,.+*~\':'!^$[\]()=>|\/@])/g,"");{let a=e.split(this.mapChar);if(a.length>1){let e=t;for(let t=0;t<a.length;t++)void 0!==e&&(e=e[a[t]]);if(void 0!==e)return e}else if(void 0!==t[e])return t[e]}}return a}{let n=t.getAttribute(e.name);if(null!==n&&n.toString().length>0)return n;if(e.map)try{let a=t.getAttribute(e.map);if(null!==a&&a.toString().length>0)return a}catch(e){return a}}}_buildHierarchy(){const e=this;if(e.reservedNames){const t=e.reservedNames;t.leaf||(t.leaf="leaf"),t.parent||(t.parent="parent"),t.expanded||(t.expanded="expanded"),t.checked||(t.checked="checked"),t.selected||(t.selected="selected"),t.level||(t.level="level"),t.data||(t.data="data")}else e.reservedNames={leaf:"leaf",parent:"parent",expanded:"expanded",checked:"checked",selected:"selected",level:"level",icon:"icon",data:"data"};const t=e.reservedNames;if(e.childrenDataField){const a=[];for(let n=0;n<e.boundSource.length;n++){const r=Object.assign({},e.boundSource[n]);if(!r)continue;a.push(r);const i=function(a){const n=e.childrenDataField.split(e.mapChar);let r=null;if(n.length>1){let e=a;for(let t=0;t<n.length;t++)void 0!==e&&(e=e[n[t]]);r=e}else r=a.children;a.children=r,(null===a.children||void 0===a.children||a.children&&0===a.children.length)&&(a[t.leaf]=!0)};i(r),r[t.level]=0,r.$||(r.$={}),r[t.parent]=null,r[t.data]=r,void 0===r[t.expanded]&&(r[t.expanded]=!1,e.expandHierarchy&&(r[t.expanded]=!0));const o=function(a,n){if(n)for(let r=0;r<n.length;r++){let d=e._getDataItem(n[r],r);if(d){if(i(d),!e.id){const e=function(){const e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()};d.$.id=e()}d[t.level]=a[t.level]+1,d[t.parent]=a,d[t.data]=Object.assign({},d),a&&(a.children[r]=d),void 0===d[t.expanded]&&(d[t.expanded]=!1,e.expandHierarchy&&(d[t.expanded]=!0)),o(d,d.children)}}else a.children=new Array};o(r,r.children)}if(e.boundHierarchy=a,!e._boundSourceUpdate){for(let t=0;t<e.boundHierarchy.length;t++){const a=e.boundHierarchy[t];if(a.children){const t=function(a){if(e.dataItemById[a.$.id]||(e.boundSource.canNotify=!1,e.dataItemById[a.$.id]=a,e.boundSource.canNotify=!0),a.children)for(let e=0;e<a.children.length;e++){const n=a.children[e];n.children&&t(n)}};t(a)}}e._boundSourceUpdate=!0}}if(e.xmlRoot&&"xml"===e.dataSourceType&&(e.boundHierarchy=this._getHierarchy("uid","_parentuid","children",null,e.boundSource)),e.keyDataField&&e.parentDataField)return["keyDataField","parentDataField"].forEach((t=>{switch(e[t]){case"parent":e[t]="$"+e[t]}})),void(e.boundHierarchy=this._getHierarchy(e.keyDataField,e.parentDataField,"children",null,e.boundSource));e.groupBy&&e.groupBy.length>0?e.boundHierarchy=this._getGroupHierarchy(e.groupBy,"children","label",null,"data",null,"parent",e.boundSource):e.virtualDataSourceOnExpand&&(e.boundHierarchy=this._getHierarchy("id","parentId","children",null,e.boundSource))}_getGroupHierarchy(e,t,a,n,r,i,o,d,l){let s=this;l||(l=0);let c=s.reservedNames;const u=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()};let f=new Array;for(let t=0;t<e.length;t++)f[t]=u();t||(t="children"),a||(a="group"),r||(r="item"),o||(o="parent"),void 0===i&&(i="value");const h=new Array,p=new Array;let g=0;const S=function(e){let t=e;if(n)for(let e in n){const a=n[e];a.name&&a.map&&(t[a.map]=t[a.name])}return t};let y=!1;for(let n=0;n<d.length;n++){let m=Object.assign({},S(d[n]));m[c.leaf]=!1;let T=new Array,b=0;for(let t=0;t<e.length;t++){const a=e[t],n=m[a];null!=n?((""===n||void 0===n&&0===t)&&(y=!0),T[b++]={value:n,group:a,hash:f[t]}):(T[b++]={value:null,group:a,hash:f[t]},0===t&&(y=!0))}if(T.length!==e.length)break;let x=null,v="";for(let e=0;e<T.length;e++){const n=T[e].value,d=T[e].group;if(v=v+"_"+T[e].hash+"_"+n,void 0===p[v]||null===p[v]){if(null===x){x={$:{}},x[c.level]=0,x[c.leaf]=!1,x[o]=null,x[a]=n,x[r]=m,x.groupDataField=d,x[d]||(x[d]=x.data[d]),void 0!==m[c.expanded]?x[c.expanded]=m[c.expanded]:(x[c.expanded]=!1,s.expandHierarchy&&(x[c.expanded]=!0)),i&&(x[i]=m[i]),x[t]=new Array;let e=h.length+l;this.id&&"number"!=typeof m.$.id&&!isFinite(m.$.id)||(e="Item"+e),void 0===x.$.id&&(x.$.id=e),s._expandedRowIds[x.$.id]&&(x[c.expanded]=!0),s.expandHierarchy&&s._collapsedIds&&s._collapsedIds[x.$.id]&&(x[c.expanded]=!1),h[g++]=x}else{const e={$:{}};e[c.level]=x[c.level]+1,e[o]=x,e[a]=n,e[t]=new Array,e[r]=m,e.groupDataField=d,e[c.leaf]=!1,e[d]||(e[d]=e.data[d]),void 0!==m[c.expanded]?e[c.expanded]=m[c.expanded]:(e[c.expanded]=!1,s.expandHierarchy&&(e[c.expanded]=!0)),i&&(e[i]=m[i]),void 0===e.$.id&&(e.$.id=x.$.id+"_"+x[t].length),s.expandHierarchy&&s._collapsedIds&&s._collapsedIds[e.$.id]&&(e[c.expanded]=!1),s._expandedRowIds[e.$.id]&&(e[c.expanded]=!0),x[t][x[t].length]=e,x=e}p[v]=x}else x=p[v]}m&&(m[c.leaf]=!0),null!==x?(null===this.id?void 0===m.$.id&&(m.$.id=x.$.id+"_"+x[t].length):void 0===m.$.id&&-1===m.$.id.toString().indexOf(x.$.id)&&(m.$.id=x.$.id+"_"+m.$.id),m[o]=x,m[c.level]=x[c.level]+1,x[t][x[t].length]=m):void 0===m.$.id&&(m.$.id=u())}if(y){let e=null,t=!1;for(let a=0;a<h.length;a++){const n=h[a];if(!n[n.groupDataField]){e=n,e.$.id.toString().startsWith("Item")&&(t=!0),h.splice(a,1);break}}if(e&&(h.push(e),t))for(let e=0;e<h.length;e++){const t=h[e];t.$.id="Item"+e,Object.keys(s._expandedRowIds).length>0&&(s._expandedRowIds[t.$.id]?t[c.expanded]=!0:t[c.expanded]=!1,s.expandHierarchy&&(t[c.expanded]=!0,s._collapsedIds&&s._collapsedIds[t.$.id]&&(t[c.expanded]=!1)))}}return h}_getHierarchy(e,t,a,n,r){const i=this,o=new Array;let d=this.boundSource;if(r&&(d=r),0===this.boundSource.length)return null;const l=null!==a?a:"children";let s=new Array,c=d,u=c.length,f=i.reservedNames;const h=function(e){let t=e;if(n)for(let e in n){const a=n[e];a.name&&a.map&&(t[a.map]=t[a.name])}return t};for(let a=0;a<u;a++){let n=c[a],r=n[t],o=n[e];"parentId"===t&&(r=n.$.parentId),"id"===e&&(o=n.$.id),null===o&&(o=n[e]=n.$.id),n[l]=new Array,i.expandHierarchy&&void 0===n[f.expanded]&&(n[f.expanded]=i.expandHierarchy),s[o]={parentId:r,item:n}}for(let a=0;a<u;a++){const n=c[a];let r=n[t],i=n[e];if("parentId"===t&&(r=n.$.parentId),"id"===e&&(i=n.$.id),void 0!==s[r]){let e={parentId:r,item:s[i].item},t=s[r].item;t[l]||(t[l]=new Array);let a=t[l].length;e=e.item,f?e[f.parent]=t:e.parent=t;const n=h(e);t[l][a]=n,s[r].item=t,s[i].item=e}else{let e=s[i].item;f?void 0===e[f.parent]&&(e[f.parent]=null):void 0===e.parent&&(e.parent=null);const t=h(e);f?t[f.level]=0:t.level=0,o[o.length]=t}}if(0!==o.length){let e=function(t,a){for(let n=0;n<a.length;n++){const r=a[n];f?r[f.level]=t:r.level=t;const o=r[l];o&&o.length>0?(r.leaf=!1,e(t+1,o)):i.virtualDataSourceOnExpand?void 0===r.leaf&&(r.leaf=!1):f?r[f.leaf]=!0:r.leaf=!0}};e(0,o)}return o}summarize(e,t){const a=this;Array.isArray(e)||(e=[e]);let n=[];for(let t=0;t<e.length;t++){const a=e[t];for(let e in a){const t=a[e];n.push({dataField:e,functions:t})}}e=n;let r={},i=new Array;t||(t=a.boundSource);let o=t.length,d=0;if(0!==o&&void 0!==o){for(let a=0;a<o;a++){let n=t[a];if((!n||!n.$||!1!==n.$.filtered)&&n){d++;for(let t=0;t<e.length;t++){const o=e[t];let d=n[o.dataField];if(o.functions&&o.functions.length>0){r[o.dataField]=r[o.dataField]||{},i[o.dataField]=i[o.dataField]||0,i[o.dataField]++;const e=function(e){for(let t in e){let a=r[o.dataField][t];null==a&&(r[o.dataField][t]=0,a=0),"function"==typeof e[t]&&(a=e[t](a,d,o.dataField,n)),r[o.dataField][t]=a}},t=d;let l=parseFloat(d);l=!isNaN(l),t&&t.toDate&&(l=!1),"string"==typeof d&&d.startsWith("+")&&(l=!1),l&&(d=parseFloat(d)),"number"==typeof d&&isFinite(d)?o.functions.forEach((function(t){let n=r[o.dataField][t];if(null==n&&(n=0,"min"===t&&(n=9999999999999),"max"===t&&(n=-9999999999999),"median"===t&&(n=[])),"sum"===t||"avg"===t||"stdev"===t||"stdevp"===t||"var"===t||"varp"===t)n+=parseFloat(d);else if("product"===t)0===a?n=parseFloat(d):n*=parseFloat(d);else if("min"===t)n=Math.min(n,parseFloat(d));else if("max"===t)n=Math.max(n,parseFloat(d));else if("count"===t)n++;else if("median"===t)n.push(parseFloat(d));else if("blank"===t)n=r[o.dataField][t],null==n&&(n=0),d||n++;else if("filled"===t)n=r[o.dataField][t],null==n&&(n=0),void 0!==d&&n++;else if("unique"===t)n=r[o.dataField][t],null==n&&(n=[]),-1===n.indexOf(d)&&n.push(d);else if("object"==typeof t)return void e(t);r[o.dataField][t]=n})):o.functions.forEach((function(t){if("min"===t||"max"===t||"count"===t||"product"===t||"sum"===t||"avg"===t||"stdev"===t||"stdevp"===t||"var"===t||"varp"===t){if(null===d&&"count"!==t)return!0;let e=r[o.dataField][t];return null==e&&(e=0),r[o.dataField][t]=e,!0}if("blank"===t){let e=r[o.dataField][t];null==e&&(e=0),d||e++,r[o.dataField][t]=e}else if("filled"===t){let e=r[o.dataField][t];null==e&&(e=0),d&&e++,r[o.dataField][t]=e}else if("unique"===t){let e=r[o.dataField][t];null==e&&(e=[]),-1===e.indexOf(d)&&e.push(d),r[o.dataField][t]=e}"object"==typeof t&&e(t)}))}}}}for(let a=0;a<e.length;a++){const n=e[a];if(n.functions&&(!n.functions||0!==n.functions.length)){if(r[n.dataField]||(r[n.dataField]={},n.functions.forEach((function(e){r[n.dataField][e]=0}))),void 0!==r[n.dataField].avg){const e=r[n.dataField].avg,t=i[n.dataField];r[n.dataField].avg=0===t||void 0===t?0:e/t}else void 0!==r[n.dataField].count&&(r[n.dataField].count=d);if(void 0!==r[n.dataField].unique){const e=r[n.dataField].unique;r[n.dataField].unique=e.length}if(void 0!==r[n.dataField].median){let e=r[n.dataField].median;e.sort((function(e,t){return e-t})),r[n.dataField].median=.5*(e[Math.floor((e.length+1)/2)-1]+e[Math.ceil((e.length+1)/2)-1])}(r[n.dataField].stdev||r[n.dataField].stdevp||r[n.dataField].var||r[n.dataField].varp)&&n.functions.forEach((function(e){if("stdev"===e||"var"===e||"varp"===e||"stdevp"===e){const a=r[n.dataField][e],i=o,d=a/o;let l=0;for(let e=0;e<o;e++){let a=t[e][n.dataField];l+=(a-d)*(a-d)}let s="stdevp"===e||"varp"===e?i:i-1;0===s&&(s=1),"var"===e||"varp"===e?r[n.dataField][e]=l/s:"stdevp"!==e&&"stdev"!==e||(r[n.dataField][e]=Math.sqrt(l/s))}}))}}return r}}_getDataItem(e,t){const a=this,n={},r="number"==typeof a.dataSource||a.dataSourceLength;if(!e)return{$:{id:t,isEmpty:!0,index:t}};if("string"==typeof e&&(e={"":e}),r){for(let e=0;e<a.dataFields.length;e++){n[(a.dataFields?a.dataFields[e]:{}).name]=""}return n.$={},n.$.id=t,n.$.index=t,n}const i=e;if(void 0!==i.expanded&&(n.expanded=i.expanded,"true"===i.expanded||!0===i.expanded||1===i.expanded?n.expanded=!0:n.expanded=!1),a.childrenDataField?void 0!==i[a.childrenDataField]&&(n.children=i[a.childrenDataField]):void 0!==i.children?n.children=i.children:void 0!==i.items&&(n.children=i.items),void 0!==i.leaf&&(n.leaf=i.leaf),void 0!==i.level&&(n.level=i.level),a.keyDataField&&void 0!==i[a.keyDataField]&&(n[a.keyDataField]=i[a.keyDataField]),a.parentDataField&&void 0!==i[a.parentDataField]&&(n[a.parentDataField]=i[a.parentDataField]),0===a.dataFields.length){const t=Object.getOwnPropertyNames(e);for(let e=0;e<t.length;e++)"$"!==t[e]&&a.dataFields.push({name:t[e],dataType:"string"})}for(let t=0;t<a.dataFields.length;t++){const r=a.dataFields?a.dataFields[t]:{};let o="";if(null==r)continue;if(e.length&&(o=e[t]),r.map){let e=r.map.split(a.mapChar);if(e.length>0){let t=i;for(let a=0;a<e.length;a++)i&&t&&(t=t[e[a]]);o=t}else o=i[r.map]}null!=o?o=o.toString():void 0===o&&null!==o&&(o="");let d=!1;if(""===o&&(d=!0,o=e[r.name],void 0===r.dataType&&(r.dataType="any"),null!=o?"array"!==r.dataType&&("any"===r.dataType?o=Array.isArray(e[r.name])?[...e[r.name]]:"object"==typeof e[r.name]?Object.assign({},e[r.name]):e[r.name]:"date"!==r.dataType&&(o=o.toString())):o=void 0===o&&"any"===r.dataType?null:""),"[object Object]"===o&&r.map&&d&&(o=""),a._cachedValues[o+"_"+r.dataType])o=a._cachedValues[o+"_"+r.dataType];else{if("bool"===r.dataType||"boolean"===r.dataType)"true"===o||"1"===o?o=!0:"false"!==o&&"0"!==o||(o=!1);else if("number"===r.dataType)-1===o.indexOf(".")&&o.indexOf(",")>=0&&o.substring(1+o.indexOf(",")).length<3&&(o=o.replace(",",".")),o=a.$document.deserialize(""+o,r.dataType,!0);else if("date"===r.dataType)if(r.formatString&&Smart.Utilities.DateTime){o=Smart.Utilities.DateTime.ParseDate(o,r.formatString)}else o=a.$document.deserialize(""+o,r.dataType,!0);else"any"!==r.dataType&&(o="string"===r.dataType&&"null"===o?"null":a.$document.deserialize(""+o,r.dataType,!0));"any"!==r.dataType&&(a._cachedValues[o+"_"+r.dataType]=o)}"string"!==r.dataType&&"boolean"!==r.dataType&&"bool"!==r.dataType&&"any"!==r.dataType&&(isNaN(o)||o===-1/0||o===1/0)&&(o="date"===r.dataType||"number"===r.dataType?null:0),"parent"!==r.name&&"group"!==r.name&&"leaf"!==r.name&&"level"!==r.name?("string"===r.dataType&&/<.+?>/.test(o)&&o.replace&&("all"===a.sanitizeHTML?o=o.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,"""):"blackList"===a.sanitizeHTML&&(o=window.Smart.Utilities.Core.sanitizeHTML(o))),n[r.name]=o):n.$[r.name]=o}let o=t;if(a.id){if(o=i[a.id],void 0===o){const e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};o=e()+e()}"object"==typeof o&&(o=t),i.$&&void 0!==i.$.id&&(o=i.$.id)}else if(!a.virtualDataSource&&a.dataItemById&&a.dataItemById[o])for(o=a.length;a.dataItemById[o];)o++;return n.$||(n.$={}),n.$.id=o,n.$.index=t,new Object(n)}_bindToArray(){const e=this,t="number"==typeof e.dataSource||e.dataSourceLength,a=[];e.boundSource.canNotify=!1;const n=t?"number"==typeof e.dataSource?e.dataSource:e.dataSource.length:e.observable?e.length:e.dataSource.length;for(let r=0;r<n;r++){const n=t?{}:e.dataSource[r],i=e._getDataItem(n,r);a.push(i)}if(t&&e.dataSourceLength&&e.dataSource.length>0)for(let t=0;t<e.dataSource.length;t++){const n=e.dataSource[t].cell,r=e.dataSource[t].value,i=n.replace(/[^0-9]/g,""),o=n.replace(/[0-9]/g,"");a[i-1][o]=r}e.boundSource=!1===e.observable||e.virtualDataSource?[]:new Smart.ObservableArray(a),e.observable&&(e.boundSource=new Smart.ObservableArray(a));for(let t=0;t<n;t++)e.observable?e[t]=e.boundSource[t]:e[t]=a[t],e.dataItemById[e[t].$.id]=e[t];!1===e.observable&&(e.boundSource=a),e.boundSource.canNotify=!0}_bindToICS(){const e=this,t=""+e.dataSource,a=e.rowDelimiter||"\n",n=t.split("\r"),r=[];let i=t.split(a),o=i.length;1===o&&n.length>1&&(i=n,o=i.length);const d=function(e,t){var a=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/.exec(e);if(!a)throw new Error("Invalid UNTIL value: "+e);return t?new Date(a[1],a[2]-1,a[3],0,0,0,0):new Date(Date.UTC(a[1],a[2]-1,a[3],a[5]||0,a[6]||0,a[7]||0))};for(let e=0;e<o;e++){const t=i[e].trim();if(t.indexOf("BEGIN:VEVENT")>=0)var l={};else if(l)if(t.indexOf("BEGIN:VALARM")>=0)var s={};else{if(s){if(t.indexOf("ACTION")>=0){s.ACTION=t.substring(t.indexOf("ACTION")+7);continue}if(t.indexOf("DESCRIPTION")>=0){s.DESCRIPTION=t.substring(t.indexOf("DESCRIPTION")+12);continue}if(t.indexOf("TRIGGER")>=0){s.TRIGGER=t.substring(t.indexOf("TRIGGER")+8);continue}if(t.indexOf("END:VALARM")>=0){l.ALARM||(l.ALARM=[]),l.ALARM.push(s),s=void 0;continue}}if(t.indexOf("SUMMARY")>=0)l.SUMMARY=t.substring(t.indexOf("SUMMARY")+8);else if(t.indexOf("LOCATION")>=0)l.LOCATION=t.substring(t.indexOf("LOCATION")+9);else if(t.indexOf("DESCRIPTION")>=0)l.DESCRIPTION=t.substring(t.indexOf("DESCRIPTION")+12);else if(t.indexOf("RRULE")>=0)l.RRULE=t.substring(t.indexOf("RRULE")+6);else if(t.indexOf("RECURRENCE-ID")>=0)l.RECURRENCEID=t.substring(t.indexOf("RECURRENCE-ID")+14);else if(t.indexOf("RECURRENCE-ID;VALUE=DATE")>=0)l.RECURRENCEID=t.substring(t.indexOf("RECURRENCE-ID;VALUE=DATE")+25);else if(t.indexOf("EXDATE;VALUE=DATE")>=0){const e=t.substring(t.indexOf("EXDATE;VALUE=DATE")+20);l.EXDATE=e}else if(t.indexOf("EXDATE")>=0){const e=t.substring(t.indexOf("EXDATE")+7);l.EXDATE=e}else t.indexOf("DTEND;VALUE=DATE")>=0?l.DTEND=d(t.substring(t.indexOf("DTEND;VALUE=DATE")+17),!0):t.indexOf("DTEND")>=0?l.DTEND=d(t.substring(t.indexOf("DTEND")+6)):t.indexOf("DTSTART;VALUE=DATE")>=0?l.DTSTART=d(t.substring(t.indexOf("DTSTART;VALUE=DATE")+19),!0):t.indexOf("DTSTART")>=0?l.DTSTART=d(t.substring(t.indexOf("DTSTART")+8)):t.indexOf("UID")>=0?l.uid=l.UID=t.substring(t.indexOf("UID")+4):t.indexOf("STATUS")>=0?l.STATUS=t.substring(t.indexOf("STATUS")+7):t.indexOf("TITLE")>=0?l.TITLE=t.substring(t.indexOf("TITLE")+6):t.indexOf("CATEGORIES")>=0?l.CATEGORIES=t.substring(t.indexOf("CATEGORIES")+11):t.indexOf("END:VEVENT")>=0&&(r.push(l),l.ALARM&&(l.ALARM=JSON.stringify(l.ALARM)),s=void 0)}}e.canNotify=!1,e.dataSource=r,e.canNotify=!0,e._bindToArray()}_bindToJSON(){const e=this,t=[],a=e.dataSource.length?e.dataSource:Object.entries(e.dataSource);e.boundSource.canNotify=!1;for(let n=0;n<a.length;n++){const r=a[n],i=e._getDataItem(r,n);t.push(i)}e.boundSource=!1===e.observable||e.virtualDataSource?[]:new Smart.ObservableArray(t);for(let t=0;t<e.length;t++)e[t]=e.boundSource[t],e.dataItemById[e[t].$.id]=e[t];!1===e.observable&&(e.boundSource=t),e.boundSource.canNotify=!0}sortBy(e,t,a){const n=this;if(!t)for(let a=0;a<n.dataFields.length;a++){const r=n.dataFields[a];if(r.name===e){t=r.dataType;break}}if(n.boundHierarchy){if((!e||0===e.length)&&n.groupBy.length>0)return void n.refreshHierarchy();const r=(e=>{let t=[];for(;e;){t=t.concat(e);for(let a=0;a<e.length;a++)e[a].children&&(t=t.concat(e[a].children));e=e.children}return t})(n.boundHierarchy);if(r){r.find((e=>{if(e.summaryRow)return e}))&&n.refreshHierarchy()}const i=function(r){n._sort(r,e,a,t);for(let n=0;n<r.length;n++){const o=r[n];o.children&&i(o.children,e,a,t)}};i(n.boundHierarchy)}else n._sort(n.boundSource,e,a,t)}_createFilter(e,t){const a={"=":"EQUAL","<>":"NOT_EQUAL","!=":"NOT_EQUAL",not_like:"DOES_NOT_CONTAIN",like:"CONTAINS","<":"LESS_THAN",">":"GREATER_THAN","<=":"LESS_THAN_OR_EQUAL",">=":"GREATER_THAN_OR_EQUAL",equal:"EQUAL","not equal":"NOT_EQUAL","less than":"LESS_THAN","greater than":"GREATER_THAN","greater than or equal":"GREATER_THAN_OR_EQUAL","less than or equal":"LESS_THAN_OR_EQUAL","starts with":"STARTS_WITH","ends with":"ENDS_WITH",notEqual:"NOT_EQUAL",not_equal:"NOT_EQUAL",lessThan:"LESS_THAN",greaterThan:"GREATER_THAN",greaterThanOrEqual:"GREATER_THAN_OR_EQUAL",lessThanOrEqual:"LESS_THAN_OR_EQUAL",less_than:"LESS_THAN",greater_than:"GREATER_THAN",greater_than_or_equal:"GREATER_THAN_OR_EQUAL",less_than_or_equal:"LESS_THAN_OR_EQUAL",null:"null","":"EMPTY",isblank:"EMPTY",isnotblank:"NOT_EMPTY",isBlank:"EMPTY",isNotBlank:"NOT_EMPTY",CONTAINS:"CONTAINS",DOES_NOT_CONTAIN:"DOES_NOT_CONTAIN",contains:"CONTAINS",does_not_contain:"DOES_NOT_CONTAIN","not contains":"DOES_NOT_CONTAIN",notcontains:"DOES_NOT_CONTAIN",notContains:"DOES_NOT_CONTAIN",startswith:"STARTS_WITH",endswith:"ENDS_WITH",starts_with:"STARTS_WITH",ends_with:"ENDS_WITH",startsWith:"STARTS_WITH",endsWith:"ENDS_WITH",NULL:"NULL",NOT_NULL:"NOT_NULL"};let n=[];"string"==typeof t&&(t=[t]);for(let e=0;e<t.length;e++){const a=t[e],r=-1===a.indexOf('"')?a.split(" "):a.split('"');let i=[];for(let e=0;e<r.length;e++){const t=r[e];""!==t&&" "!==t&&i.push(t.trim())}n.push(i)}const r=new Smart.FilterGroup,i=[],o=[];for(let t=0;t<n.length;t++){const r=n[t];if(r.length>1){const t=new Smart.FilterGroup;let n=r.length>2?"":"and",i=0,d=[];for(let o=0;o<r.length;o++){let l=r[o];if("and"!==l&&"or"!==l){if(i++,2===i){let s=a[r[o-1]];s||(s=r[o-1]),"number"===e&&(l=parseFloat(l)),"date"===e&&(l=new Date(l));const c=t.createFilter(e,l,s);if(i=0,d.push(c),n){for(let e=0;e<d.length;e++)t.addFilter(n,d[e]);d=[]}}}else n=l}o.push(t)}else{let e=r[0];if(e&&a[e]&&(e="and"),"and"!==e&&"or"!==e)throw new Error('Filter Exprresion expects "AND" or "OR", but the token is: '+e);i.push(e)}}let d=0;if(1===o.length)return o[0];for(let e=0;e<o.length;e++){let t=i[d];(e+1)%2==0&&d++,t||(t="and"),r.addFilter(t,o[e])}return r}filterBy(e,...t){const a=this,n=(()=>{for(let t=0;t<a.dataFields.length;t++){const n=a.dataFields[t];if(n.name===e)return n.dataType}})(),r=a._createFilter(n,t);return a.boundSource.filter((t=>r.evaluate(t[e])))}_filter(e,t="and"){const a=this,n=[],r=[];if(0===e.length)return void a.clearFilter();const i=e=>{for(let t=0;t<a.dataFields.length;t++){const n=a.dataFields[t];if(n.name===e)return n.dataType}};let o,d;"and"===t?(o=!0,d=function(e,t,a){return e&&t.evaluate(a[t.dataField])}):(o=!1,d=function(e,t,a){return e||t.evaluate(a[t.dataField])});for(let t=0;t<e.length;t++){const o=e[t],d=o[0];let l=null;l=o[1]instanceof Smart.FilterGroup?o[1]:a._createFilter(i(d),o.splice(1)),l&&(r.push(d),l.dataField=d,n.push(l))}if(a.boundHierarchy){const e=function(e){let t=o;for(let a=0;a<n.length;a++){const r=n[a];t=d(t,r,e)}return e.$.filtered=t,t},t=function(n,r,i){let o=0;for(let a=0;a<n.length;a++){const i=n[a];e(i),i.$.filtered&&o++,i.children&&t(i.children,i,r)}o>0&&a.groupBy.length>0&&r?(r.$.filtered=!0,i&&!i.$.filtered&&(i.$.filtered=!0)):o>0&&o!==n.length&&r?(r.$.filtered=null,i&&!i.$.filtered&&(i.$.filtered=null)):o>0&&o===n.length&&r&&(r.$.filtered=!0,i&&!i.$.filtered&&(i.$.filtered=!0))};t(a.boundHierarchy,null,null)}else for(let e=0;e<a.boundSource.length;e++){const t=a.boundSource[e];let r=o;for(let e=0;e<n.length;e++){const a=n[e];r=d(r,a,t)}t.$.filtered=r}a.onFilter&&a.onFilter()}clearGroup(){const e=this;e.groupBy=[],e.boundHierarchy=null,e.refreshHierarchy(),e.onGroup&&e.onGroup()}clearFilter(){const e=this;for(let t=0;t<e.boundSource.length;t++){e.boundSource[t].$.filtered=!0}if(e.boundHierarchy){const t=function(e,a,n){for(let n=0;n<e.length;n++){const r=e[n];r.$.filtered=!0,r.$.filtered,r.children&&t(r.children,r,a)}a&&(a.$.filtered=!0,n&&!n.$.filtered&&(n.$.filtered=!0))};t(e.boundHierarchy,null,null)}e.onFilter&&e.onFilter()}clearSort(){this._sort(this.boundSource,[],[],[])}_sort(e,t,a,n,r,i){const o=this;let d=!1;if(0===e.length)return;if(e&&e.constructor&&e instanceof Smart.ObservableArray&&(d=!0),(!e||!Array.isArray(e)||0===e.length||!t||Array.isArray(t)&&0===t.length)&&!d&&!o.boundHierarchy)throw new Error("sort: Missing or Invalid arguments!");"string"==typeof t&&(t=[t]);const l=[],s=[];void 0===a&&(a=[]);const c=function(e,t){let a;switch(t||typeof e){case"string":a=(new Intl.Collator).compare;break;case"number":case"int":case"bigInt":case"float":case"double":a=function(e,t){return e-t};break;case"boolean":case"bool":a=function(e,t){return e===t?0:!1===e?-1:1};break;case"date":case"time":case"dateTime":a=e instanceof Date?function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0}:e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber?function(e,t){return e.compare(t)}:function(e,t){return e-t};break;case"object":if(e instanceof Date)a=function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)a=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;a=function(t,a){return e.compareComplexNumbers(t,a)}}}return a};for(let r=0;r<t.length;r++){void 0===a[r]||"asc"===a[r]||"ascending"===a[r]?l[r]=1:l[r]=-1;let d=e[0][t[r]];if(void 0===d&&e[0]&&e[0].children&&e[0].data&&(d=e[0].data[t[r]]),i&&i){const e=t[r];if(i[e]){s[r]=i[e];continue}}o.sortComparators&&o.sortComparators[t[r]]?s[r]=o.sortComparators[t[r]]:s[r]=c(d,n[r])}t.length>0&&r?r(e,t,a,s):e.sort((function(e,a){for(let n=0;n<t.length;n++){const r=s[n](e[t[n]],a[t[n]]);if(0===r){if(t[n+1])continue;return void 0!==e.$.index?(e.$.index-a.$.index)*l[n]:0}return r*l[n]}if(0===t.length)return e.$.index<a.$.index?-1:e.$.index>a.$.index?1:0}));for(let t=0;t<e.length;t++)o[t]=e[t]}static Filter(e,t,a,n,r="and"){let i,o;"and"===r?(i=!0,o=function(e,t,a,r){return n?e&&n(t,a,r):e&&r.evaluate(t[a])}):(i=!1,o=function(e,t,a,r){return n?e||n(t,a,r):e||r.evaluate(t[a])});return e.filter((e=>{let n=i;for(let r=0;r<a.length;r++){const i=a[r],d=t[r];n=o(n,e,d,i)}return n}))}filter(e,t,a){Smart.DataAdapter.Filter(this.boundSource,e,t,a)}sort(e,t,a){Smart.DataAdapter.Sort(this.boundSource,e,t,a)}static Sort(e,t,a,n){const r=function(e){let t;switch(typeof e){case"string":if(e.indexOf("-")>=0||e.indexOf("/")>=0){const t=new Date(e);if(t&&"Invalid Date"!==t.toString()){return function(e,t){const a=new Date(e),n=new Date(t);return a||n?a?n?a.getTime()-n.getTime():1:-1:0}}}t=(new Intl.Collator).compare;break;case"number":t=function(e,t){return e-t};break;case"boolean":t=function(e,t){return e===t?0:!1===e?-1:1};break;case"object":if(e instanceof Date)t=function(e,t){return e||t?e?t?e.getTime()-t.getTime():1:-1:0};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)t=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;t=function(t,a){return e.compareComplexNumbers(t,a)}}else t=function(e,t){return e-t}}return t};if(!e||!Array.isArray(e)||0===e.length||!t||Array.isArray(t)&&0===t.length)return;"string"==typeof t&&(t=[t]);const i=[],o=[];void 0===a&&(a=[]);for(let n=0;n<t.length;n++)void 0===a[n]||"asc"===a[n]||"ascending"===a[n]?i[n]=1:i[n]=-1,o[n]=r(e[0][t[n]]);if(n)return void n(e,t,a,o);const d=e.slice(0);return d.sort((function(e,a){for(let n=0;n<t.length;n++){const r=o[n](e[t[n]],a[t[n]]);if(0===r){if(t[n+1])continue;return void 0!==e._index?(e._index-a._index)*i[n]:0}return r*i[n]}})),d}};class e{constructor(e,t){const a=this;a.config=e,a.callback=t,!1!==e.autoFetch&&a.call(e)}call(e){const t=this;e||(e=t.config);let a="GET",n=e.url,r=null,i=!0;if(e.type&&(a=e.type),e.data)if("GET"===a){n+="?";for(let t in e.data)Object.prototype.hasOwnProperty.call(e.data,t)&&(n+=encodeURI(t+"="+e.data[t]+"&"));"&"===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1))}else"POST"===a&&(r=JSON.stringify(e.data));e&&!1===e.async&&"xlsx"!==e.dataSourceType&&(i=!1),void 0!==window.fetch&&i?t.ajaxFetch(e,a,n,r):t.ajaxXMLHttpRequest(e,a,n,r,i)}ajaxFetch(e,t,a,n){const r=this,i={method:t};let o,d,l,s;switch(e.dataSourceType){case"json":o="json";break;case"xlsx":o="arrayBuffer";break;default:o="text"}if(e&&e.contentType&&(i.headers=new Headers({"Content-Type":e.contentType})),null!==n&&(i.body=n),e.timeout&&(l=setTimeout((function(){s=!0}),e.timeout)),e.beforeSend){if(!1===e.beforeSend(i,e))return}fetch(a,i).then((function(e){if(s)throw d=408,new Error("timeout");if(l&&clearTimeout(l),d=e.status,!e.ok)throw new Error(e.statusText);return e[o]()})).then((function(t){if("arrayBuffer"===o)return JSZip.loadAsync(t).then((function(t){return t.files["xl/worksheets/sheet1.xml"].async("text").then((function(a){return t.files["xl/sharedStrings.xml"].async("text").then((function(t){const n=r.parseXLSXData(a,t);r.ajaxComplete(e,n,d)}))}))}));r.ajaxComplete(e,t,d)})).catch((function(t){"JSZip is not defined"===t.message&&(t.message="JSZip is not defined. Please include a reference to JSZip to be able to load data from XLSX files."),e&&e.loadError&&e.loadError(d,t),r.callback&&r.callback(t,d)}))}ajaxXMLHttpRequest(e,t,a,n,r){const i=new XMLHttpRequest,o=this;if(i.open(t,a,r),i.ontimeout=function(){e&&e.loadError&&e.loadError(408,"timeout")},i.onload=function(){if(4===i.readyState){const t=i.status;let a=i.response;t>=200&&t<=299?("json"===e.dataSourceType&&(a=JSON.parse(a)),o.ajaxComplete(e,a,t)):e&&e.loadError&&e.loadError(t,a)}},i.onerror=function(){e&&e.loadError&&e.loadError(i.status,i.response)},e&&e.contentType&&i.setRequestHeader("Content-Type",e.contentType),r&&e.timeout&&(i.timeout=e.timeout),e.beforeSend){if(!1===e.beforeSend(i,e))return}i.send(n)}ajaxComplete(e,t,a){if(e){if(e.beforeLoadComplete){const a=e.beforeLoadComplete(t);a&&(t=a)}e.loadComplete&&e.loadComplete(t,a),this.callback&&this.callback(t,a)}}parseXLSXData(e,t){const a=new DOMParser,n=a.parseFromString(t,"text/xml"),r=Array.from(n.getElementsByTagName("si")),i=[],o=a.parseFromString(e,"text/xml"),d=Array.from(o.getElementsByTagName("row")),l=[];return r.forEach((function(e){let t=e.getElementsByTagName("t");if(1===t.length)i.push(t[0].innerHTML);else{let e="";t=Array.from(t),t.forEach((function(t){e+=t.innerHTML})),i.push(e)}})),d.forEach((function(e){const t={};Array.from(e.getElementsByTagName("c")).forEach((function(e){const a=e.getAttribute("r").match(/\D+/)[0],n=e.getAttribute("t"),r=e.getElementsByTagName("v")[0].innerHTML;let o;switch(n){case"s":o=i[parseFloat(r)];break;case"b":o=1===parseFloat(r);break;default:o=parseFloat(r)}t[a]=o})),l.push(t)})),l}}Smart.Ajax=window.Ajax=e})();
/***/ }),
/***/ 2052:
/***/ (() => {
(()=>{const e=-1*(new Date).getTimezoneOffset(),t=[{id:"Local",offset:e,offsetHours:e/60,displayName:"",supportsDaylightSavingTime:!1},{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:!1},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:!1},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:!1},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:!1},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:!0},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:!1},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:!1},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:!0},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:!1},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:!0},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:!1},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:!0},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:!0},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:!0},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:!0},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus, San Juan",supportsDaylightSavingTime:!1},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:!0},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:!1},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:!0},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:!0},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:!0},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:!0},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:!0},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:!1},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:!0},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:!0},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:!1},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:!0},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:!1},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:!0},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:!1},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:!0},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:!0},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:!1},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna",supportsDaylightSavingTime:!0},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague",supportsDaylightSavingTime:!0},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:!0},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius",supportsDaylightSavingTime:!0},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:!1},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:!0},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:!0},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:!0},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:!0},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:!0},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:!0},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:!0},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:!0},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:!0},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:!1},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:!1},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:!0},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:!0},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:!0},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:!0},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:!1},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:!0},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:!1},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:!0},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:!0},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:!1},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:!0},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:!1},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:!1},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:!1},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:!1},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:!1},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:!0},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:!0},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:!1},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:!1},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:!0},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:!1},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi",supportsDaylightSavingTime:!1},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:!1},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:!0},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:!1},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:!0},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:!1},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:!0},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:!1},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:!1},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:!0},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:!1},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:!0},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:!1},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:!0},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:!0},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:!0},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:!1},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:!0},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:!0},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:!0},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:!0},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:!1},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:!1},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:!0}],a=[0,31,59,90,120,151,181,212,243,273,304,334,365],s=[0,31,60,91,121,152,182,213,244,274,305,335,366];Smart.Utilities.Assign("TimeSpan",class{constructor(){const e=this;if(e.ticksPerMillisecond=1e4,e.millisecondsPerTick=1e-4,e.ticksPerSecond=1e7,e.secondsPerTick=1e-7,e.ticksPerMinute=6e8,e.minutesPerTick=1/6e8,e.ticksPerHour=36e9,e.hoursPerTick=1/36e9,e.ticksPerDay=864e9,e.daysPerTick=1/864e9,e.millisPerSecond=1e3,e.millisPerMinute=6e4,e.millisPerHour=36e5,e.millisPerDay=864e5,e._ticks=0,1===arguments.length){if(isNaN(arguments[0]))throw new Error("Argument must be a number.");e._ticks=arguments[0]}else if(3===arguments.length)e._ticks=e.timeToMS(arguments[0],arguments[1],arguments[2],0);else if(4===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+0;e._ticks=t*e.ticksPerMillisecond}else if(5===arguments.length){const t=1e3*(3600*arguments[0]*24+3600*arguments[1]+60*arguments[2]+arguments[3])+arguments[4];e._ticks=t*e.ticksPerMillisecond}}ticks(){return this._ticks}days(){return parseInt(this._ticks/this.ticksPerDay)}timeToMS(e,t,a,s){return parseInt((3600*e+60*t+a+s/1e3)*this.ticksPerSecond)}hours(){return parseInt(this._ticks/this.ticksPerHour)%24}milliseconds(){return parseInt(this._ticks/this.ticksPerMillisecond)%1e3}minutes(){return parseInt(this._ticks/this.ticksPerMinute)%60}seconds(){return parseInt(this._ticks/this.ticksPerSecond)%60}totalDays(){return parseInt(this._ticks*this.daysPerTick)}totalHours(){return parseInt(this._ticks*this.hoursPerTick)}totalMilliseconds(){const e=this._ticks*this.millisecondsPerTick;return parseInt(e)}totalMinutes(){return parseInt(this._ticks*this.minutesPerTick)}totalSeconds(){return parseInt(this._ticks*this.secondsPerTick)}add(e){const t=this._ticks+e._ticks;return new Smart.Utilities.TimeSpan(t)}subtract(e){const t=this._ticks-e._ticks;return new Smart.Utilities.TimeSpan(t)}duration(){const e=this;return e._ticks>=0?new Smart.Utilities.TimeSpan(e._ticks):new Smart.Utilities.TimeSpan(-e._ticks)}equals(e){return this._ticks===e._ticks}valueOf(){return this._ticks}compare(e,t){return e._ticks>t._ticks?1:e._ticks<t._ticks?-1:0}interval(e,t){const a=e*t+(e>=0?.5:-.5);return new Smart.Utilities.TimeSpan(a*this.ticksPerMillisecond)}fromDays(e){return this.interval(e,this.millisPerDay)}fromHours(e){return this.interval(e,this.millisPerHour)}fromMilliseconds(e){return this.interval(e,1)}fromMinutes(e){return this.interval(e,this.millisPerMinute)}fromSeconds(e){return this.interval(e,this.millisPerSecond)}fromTicks(e){return new Smart.Utilities.TimeSpan(e)}toString(){return this.totalMilliseconds().toString()}negate(){return new Smart.Utilities.TimeSpan(-this._ticks)}}),Smart.Utilities.Assign("DateTime",class{constructor(){function e(e){const t=i.regexISOString.exec(e);r=new Smart.Utilities.DateTime(parseFloat(t[1]),parseFloat(t[2]),parseFloat(t[3]),parseFloat(t[4]),parseFloat(t[5]),parseFloat(t[6]),parseFloat(t[7]),0,0,0,0,0,0,0,"UTC")}const i=this;let r;if(i.ticksPerMillisecond=1e4,i.millisecondsPerTick=1e-4,i.ticksPerSecond=1e7,i.secondsPerTick=1e-7,i.ticksPerMinute=6e8,i.minutesPerTick=1/6e8,i.ticksPerHour=36e9,i.hoursPerTick=1/36e9,i.ticksPerDay=864e9,i.daysPerTick=1/864e9,i.millisPerSecond=1e3,i.millisPerMinute=6e4,i.millisPerHour=36e5,i.millisPerDay=864e5,i.daysPerYear=365,i.daysPer4Years=1461,i.daysPer100Years=36524,i.daysPer400Years=146097,i.daysTo1601=584388,i.daysTo1899=693593,i.daysTo10000=3652059,i.minTicks=0,i.maxTicks=3155378976e9,i.maxMillis=3155378976e5,i.datePartYear=0,i.datePartDayOfYear=1,i.datePartMonth=2,i.datePartDay=3,i.daysToMonth365=a,i.daysToMonth366=s,i.minValue=new Date(0),i.maxValue=new Date(3155378976e9),i.ticksMask=0x4000000000000000,i.flagsMask=0xc000000000000000,i.localMask=0x8000000000000000,i.ticksCeiling=0x4000000000000000,i.kindUnspecified=0,i.kindUtc=0x4000000000000000,i.kindLocal=0x8000000000000000,i.kindLocalAmbiguousDst=0xc000000000000000,i.kindShift=62,i.regexTrim=/^\s+|\s+$/g,i.regexInfinity=/^[+-]?infinity$/i,i.regexHex=/^0x[a-f0-9]+$/i,i.regexParseFloat=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,i.regexISOString=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}).(\d{3})Z$/,i.calendar={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",FP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",FPA:"yyyy/MM/dd HH:mm:ss:fffuunnppeeaaxxoo",FPA2:"yyyy-MM-dd HH:mm:ss:fffuunnppeeaaxxoo",FT:"HH:mm:ss:fff:uu:nn:pp:ee:aa:xx:oo",PP:"yyyy-MM-dd HH:mm:ss:fff:uu:nn:pp",PT:"HH:mm:ss:fff:uu:nn:pp"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:","},i.dateData=0,i.timeZone=null,i.timeZones=t,i._codeToUnit={u:"_microsecond",uu:"_microsecond",n:"_nanosecond",nn:"_nanosecond",p:"_picosecond",pp:"_picosecond",e:"_femtosecond",ee:"_femtosecond",a:"_attosecond",aa:"_attosecond",x:"_zeptosecond",xx:"_zeptosecond",o:"_yoctosecond",oo:"_yoctosecond"},i._smallUnits=["_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"],i._microsecond=0,i._nanosecond=0,i._picosecond=0,i._femtosecond=0,i._attosecond=0,i._zeptosecond=0,i._yoctosecond=0,0===arguments.length){const e=new Date;i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else if(1===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}}else if(2===arguments.length){void 0===arguments[0]&&(arguments[0]="todayDate");if("number"==typeof arguments[0]&&isFinite(arguments[0])||"string"!=typeof arguments[0])if("number"==typeof arguments[0])i.dateData=arguments[0];else if(arguments[0]instanceof Date){const e=arguments[0];i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else i.dateData=arguments[0];else{let t;"today"===arguments[0]?t=new Date:"todayDate"===arguments[0]?(t=new Date,t.setHours(0,0,0,0)):i.regexISOString.test(arguments[0])?e(arguments[0]):t=i.tryparseDate(arguments[0]),t&&(i.dateData=i.dateToMS(t.getFullYear(),t.getMonth()+1,t.getDate())+i.timeToMS(t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}i.validateTimeZone(arguments[1])}else if(arguments.length>2)if("string"==typeof arguments[0]){const e=i.tryparseDate(arguments[0],arguments[2],arguments[1]);i.dateData=i.dateToMS(e.getFullYear(),e.getMonth()+1,e.getDate())+i.timeToMS(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}else{const e=arguments[0],t=arguments[7]||0,a=arguments[8]||0,s=arguments[9]||0,r=arguments[10]||0,n=arguments[11]||0,o=arguments[12]||0,d=arguments[13]||0,l=new Date(e,arguments[1]-1,arguments[2],arguments[3]||0,arguments[4]||0,arguments[5]||0,arguments[6]||0);e<1970&&l.setFullYear(e),i.dateData=i.dateToMS(l.getFullYear(),l.getMonth()+1,l.getDate())+i.timeToMS(l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()),i._microsecond=t,i._nanosecond=a,i._picosecond=s,i._femtosecond=r,i._attosecond=n,i._zeptosecond=o,i._yoctosecond=d,arguments[14]&&i.validateTimeZone(arguments[14])}if(i.timeZone||i.validateTimeZone("Local"),r){const e=r.toTimeZone(i.timeZone);i.dateData=e.dateData}}static isValidDate(e){const t=this.validateDate(e);return!(!t||t&&!t.dateData)}static validateDate(e,t,a){if(e instanceof Smart.Utilities.DateTime)return e;if(e instanceof Date)return new Smart.Utilities.DateTime(e);try{if("string"==typeof e&&a)return this.parseDateString(e,t,a);if(new RegExp(/^\d{1,2}\/\d{1,2}\/\d{4}(, \d{1,2}:\d{2}:\d{1,2} [A|P]M)?$/).test(e)){const t=new Date(e);if(!isNaN(t.getTime()))return new Smart.Utilities.DateTime(t)}if("string"==typeof e)return this.parseDateString(e,t,a);if("number"==typeof e)return new Smart.Utilities.DateTime(new Date(e))}catch(e){}return t}static parseDateString(e,t,a){const s=new Date(e);if(!isNaN(s.getTime()))return e&&"string"==typeof e&&a?new Smart.Utilities.DateTime(e,a,null):new Smart.Utilities.DateTime(s);const i=e.indexOf("Date("),r=e.indexOf("DateTime("),n=e.lastIndexOf(")");let o=e;if(-1===i&&-1===r||-1===n){const t=new Smart.Utilities.DateTime,s=t.parseDate(e,a);if(s)return o=new Smart.Utilities.DateTime(s),t.copySmallTimePartValues(o),o}else{if(o=-1!==i?e.slice(i+5,n):e.slice(r+9,n),o=o.replace(/'/g,"").replace(/"/g,"").replace(/^\s+|\s+$|\s+(?=\s)/g,""),""===o.trim())return new Smart.Utilities.DateTime;if(new RegExp(/(^(\d+)(\s*,\s*\d+)+(\s*,\s*[a-zA-Z ]+)?$)/g).test(o))return o=o.split(","),o.map((function(e,t){isNaN(o[t])?o[t]=e.trim():o[t]=parseInt(e)})),-1!==i&&o[1]++,o.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,o)),o}if(""===o.trim())return t;if(!isNaN(o))return o=new Date(parseInt(o,10)),new Smart.Utilities.DateTime(o);try{const e=o.split(",");2===e.length?(e[1]=e[1].trim(),e.unshift(null),o=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,e))):o=new Smart.Utilities.DateTime(o)}catch(e){o=t}return o}static fromFullTimeStamp(e){e=e.toString();const t=new Smart.Utilities.DateTime(parseFloat(e.slice(0,e.length-21)));let a=e.slice(e.length-21),s=0;for(;a.length>0;)t[t._smallUnits[s]]=parseInt(a.slice(0,3),10),a=a.slice(3),s++;return t}static getConstructorParameters(e){return[e.year(),e.month(),e.day(),e.hour(),e.minute(),e.second(),e.millisecond(),e._microsecond,e._nanosecond,e._picosecond,e._femtosecond,e._attosecond,e._zeptosecond,e._yoctosecond,e.timeZone]}static detectDisplayMode(e,t,a){if(e.calendar.patterns[t])return-1!==["d","D","M","Y","d1","d2"].indexOf(t)?"calendar":-1!==["t","T","FT","PT"].indexOf(t)?"timePicker":"default";const s=["d","M","y"],i=["h","H","m","s","t","f","u","n","p","e","a","x","o"],r=a.groups;let n=!1,o=!1;for(let e=0;e<r.length;e++){const t=r[e].charAt(0);if(-1!==s.indexOf(t)?n=!0:-1!==i.indexOf(t)&&(o=!0),n&&o)break}return n===o?"default":n?"calendar":"timePicker"}static getLocalizedNames(e){const t={names:[],namesAbbr:[],namesShort:[]},a={names:[],namesAbbr:[]};if(this[e])return this[e];for(let a=23;a<30;a++){const s=new Date(2017,6,a),i=s.toLocaleString(e,{weekday:"long"});t.names.push(i),t.namesAbbr.push(s.toLocaleString(e,{weekday:"short"})),t.namesShort.push(i.substring(0,2))}for(let t=0;t<12;t++){const s=new Date(2017,t,1).toLocaleString(e,{month:"long"});a.names.push(s),a.namesAbbr.push(s.substring(0,3))}return a.names.push(""),a.namesAbbr.push(""),this[e]={days:t,months:a},this[e]}internalMS(){return this.dateData}getDatePart(e){const t=this,a=t.internalMS();let s=parseInt(a/t.millisPerDay);const i=parseInt(s/t.daysPer400Years);s-=i*t.daysPer400Years;let r=parseInt(s/t.daysPer100Years);4===r&&(r=3),s-=r*t.daysPer100Years;const n=parseInt(s/t.daysPer4Years);s-=n*t.daysPer4Years;let o=parseInt(s/t.daysPerYear);if(4===o&&(o=3),e===t.datePartYear)return parseInt(400*i+100*r+4*n+o+1);if(s-=o*t.daysPerYear,e===t.datePartDayOfYear)return parseInt(s+1);const d=3===o&&(24!==n||3===r)?t.daysToMonth366:t.daysToMonth365;let l=s>>6;for(;s>=d[l];)l++;return e===t.datePartMonth?parseInt(l):parseInt(s-d[l-1]+1)}dayOfWeek(){const e=this.dateData;return parseInt(e/this.millisPerDay+1)%7}dayOfYear(){return this.getDatePart(this.datePartDayOfYear)}weekOfYear(e){const t=this.toDate(),a=e||this.calendar.firstDay,s=new Date(t.getFullYear(),0,1),i=Math.floor((t.getTime()-s.getTime()-6e4*(t.getTimezoneOffset()-s.getTimezoneOffset()))/864e5)+1;let r,n=s.getDay()-a;if(n=n>=0?n:n+7,n<4){if(r=Math.floor((i+n-1)/7)+1,r>52){let e=new Date(t.getFullYear()+1,0,1).getDay()-a;e=e>=0?e:e+7,r=e<4?1:53}}else r=Math.floor((i+n-1)/7);return r}subtract(e){const t=this;return new Smart.Utilities.TimeSpan(t.dateData*t.ticksPerMillisecond-e.dateData*t.ticksPerMillisecond)}dateToMS(e,t,a){const s=this;if(e>=1&&e<=9999&&t>=1&&t<=12){e=parseInt(e);const i=s.isLeapYear(e)?s.daysToMonth366:s.daysToMonth365;if(a>=1&&a<=i[t]-i[t-1]){const r=e-1;return(365*r+parseInt(r/4)-parseInt(r/100)+parseInt(r/400)+i[t-1]+a-1)*s.millisPerDay}}}isLeapYear(e){if(e<1||e>9999)throw new Error("Year out of Range");return e%4==0&&(e%100!=0||e%400==0)}timeToMS(e,t,a,s){const i=this;if(e>=0&&e<24&&t>=0&&t<60&&a>=0&&a<60){const r=parseInt(3600*e+60*t+a);return s>0&&s<1e3?r*i.millisPerSecond+s:r*i.millisPerSecond}}daysInMonth(e,t){if(t<1||t>12)throw new Error("Month out of Range");const a=this,s=a.isLeapYear(e)?a.daysToMonth366:a.daysToMonth365;return s[t]-s[t-1]}arrayIndexOf(e,t){return e.indexOf(t)}startsWith(e,t){return 0===e.indexOf(t)}endsWith(e,t){return e.substr(e.length-t.length)===t}trim(e){return(e+"").replace(this.regexTrim,"")}expandFormat(e,t){t=t||"F";let a,s=e.patterns,i=t.length;if(s[t])return s[t];if(1===i){if(a=s[t],!a)throw"Invalid date format string '"+t+"'.";t=a}else 2===i&&"%"===t.charAt(0)&&(t=t.charAt(1));return t}getEra(e,t){if(!t)return 0;if("string"==typeof e)return 0;let a,s=e.getTime();for(let e=0,i=t.length;e<i;e++)if(a=t[e].start,null===a||s>=a)return e;return 0}toUpper(e){return e.split(" ").join(" ").toUpperCase()}toUpperArray(e){const t=[];for(let a=0,s=e.length;a<s;a++)t[a]=this.toUpper(e[a]);return t}getEraYear(e,t,a,s){let i=e.getFullYear();return!s&&t.eras&&(i-="number"==typeof a?a:t.eras[a].offset),i}getDayIndex(e,t,a){const s=this,i=e.days;let r,n=e._upperDays;return n||(e._upperDays=n=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr),s.toUpperArray(i.namesShort)]),t=t.toUpperCase(),a?(r=s.arrayIndexOf(n[1],t),-1===r&&(r=s.arrayIndexOf(n[2],t))):r=s.arrayIndexOf(n[0],t),r}getMonthIndex(e,t,a){const s=this;let i=e.months,r=e.monthsGenitive||e.months,n=e._upperMonths,o=e._upperMonthsGen;n||(e._upperMonths=n=[s.toUpperArray(i.names),s.toUpperArray(i.namesAbbr)],e._upperMonthsGen=o=[s.toUpperArray(r.names),s.toUpperArray(r.namesAbbr)]),t=s.toUpper(t);let d=s.arrayIndexOf(a?n[1]:n[0],t);return d<0&&(d=s.arrayIndexOf(a?o[1]:o[0],t)),d}appendPreOrPostMatch(e,t){let a=0,s=!1;for(let i=0,r=e.length;i<r;i++){const r=e.charAt(i);switch(r){case"'":s?t.push("'"):a++,s=!1;break;case"\\":s&&t.push("\\"),s=!s;break;default:t.push(r),s=!1}}return a}getTokenRegExp(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyyy|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|uu|u|nn|n|pp|p|ee|e|aa|a|xx|x|oo|o|i{1,24}|zzz|zz|z|gg|g/g}static ParseDate(e,t){return(new Smart.Utilities.DateTime).tryparseDate(e,null,t)}tryparseDate(e,t,a){const s=this;if(null==t&&(t=s.calendar),void 0!==a){if(Array.isArray(a))for(let i=0;i<a.length;i++){const r=s.parseDate(e,a[i],t);if(r)return r}const i=s.parseDate(e,a,t);if(i)return i}if(""===e)return null;if(null==e||e.substring||(e=e.toString()),null!=e&&"/Date("===e.substring(0,6)){const t=/^\/Date\((-?\d+)(\+|-)?(\d+)?\)\/$/;let a=new Date(+e.replace(/\/Date\((\d+)\)\//,"$1"));if("Invalid Date"===a){const t=e.match(/^\/Date\((\d+)([-+]\d\d)(\d\d)\)\/$/);a=null,t&&(a=new Date(1*t[1]+36e5*t[2]+6e4*t[3]))}if(null==a||"Invalid Date"===a||isNaN(a)){const a=t.exec(e);if(a){const e=new Date(parseInt(a[1]));if(a[2]){let t=parseInt(a[3]);"-"===a[2]&&(t=-t);const s=e.getUTCMinutes();e.setUTCMinutes(s-t)}if(!isNaN(e.valueOf()))return e}}return a}const i={smartdate:"yyyy-MM-dd HH:mm:ss",d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",ISO8601:"yyyy-MM-ddTHH:mm:ss.sssZ",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"MM-dd-yyyy",d4:"MM.dd.yyyy",zone1:"yyyy-MM-ddTHH:mm:ss-HH:mm",zone2:"yyyy-MM-ddTHH:mm:ss+HH:mm",custom:"yyyy-MM-ddTHH:mm:ss.fff",custom2:"yyyy-MM-dd HH:mm:ss.fff",custom3:"yyyy-MM-ddTHH:mm:ss.fff+HH:mm",custom4:"yyyy-MM-ddTHH:mm:ss.fff-HH:mm",custom5:"yyyy-MM-ddTHH:mm:ss.ffffff+HH:mm",custom6:"yyyy-MM-ddTHH:mm:ss.ffffff-HH:mm",iso:"yyyy-MM-ddTHH:mm:ssZ",iso2:"yyyy-MM-ddTHH:mm.fffZ",iso_date1:"yyyy-MM-dd",iso_date2:"yyyy-MM-dd",iso_date3:"yyyy-ddd",iso_date4:"yyyy-MM-dd HH:mm",iso_date5:"yyyy-MM-dd HH:mm Z",iso_date6:"yyyy-MMM-dd",iso_date7:"yyyy-MM",iso_date8:"yyyy-MMM",iso_date9:"yyyy-MMMM",iso_date10:"yyyy-MMMM-dd",iso_time1:"HH:mm:ss.tttt",iso_time2:"HH:mm:ss",iso_time3:"HH:mm",iso_time4:"HH",iso_time5:"yyyyyy-MM-dd",iso_time6:"yyyyyy-MM-dd"};for(let a in i){const r=s.parseDate(e,i[a],t);if(r)return r}const r=t.patterns;for(let a in r){const i=s.parseDate(e,r[a],t);if(i){if("ISO"===a){const a=s.parseDate(e,r.ISO2,t);if(a)return a}return i}}let n;if("string"==typeof e){const a=[":","/","-"," ",","];let i="",r=e=function(e,t,a){return a.replace(new RegExp(e,"g"),t)}(", ",",",e=s.trim(e));e.indexOf(":")>=0?(i=e.substring(e.indexOf(":")-2),i=s.trim(i),r=e.substring(0,e.indexOf(":")-2)):e.toUpperCase().indexOf("AM")>=0?(i=e.substring(e.toUpperCase().indexOf("AM")-2),i=s.trim(i),r=e.substring(0,e.toUpperCase().indexOf("AM")-2)):e.toUpperCase().indexOf("PM")>=0&&(i=e.substring(e.toUpperCase().indexOf("PM")-2),i=s.trim(i),r=e.substring(0,e.toUpperCase().indexOf("PM")-2));let o=new Date,d=!1;if(r){for(let e=0;e<a.length;e++)if(r.indexOf(a[e])>=0){n=r.split(a[e]);break}if(!n)return null;let e=new Array,i=new Array,l=new Array,f=null,m=null;for(let a=0;a<n.length;a++){const i=n[a],r=s.parseDate(i,"d",t)||s.parseDate(i,"dd",t)||s.parseDate(i,"ddd",t)||s.parseDate(i,"dddd",t);if(r&&(e.push(r.getDate()),i.length>2)){f=a;break}}for(let e=0;e<n.length;e++){const a=n[e],r=s.parseDate(a,"M",t)||s.parseDate(a,"MM",t)||s.parseDate(a,"MMM",t)||s.parseDate(a,"MMMM",t);if(r){if(null!=f&&f===e)continue;if(i.push(r.getMonth()),a.length>2){m=e;break}}}for(let e=0;e<n.length;e++){const a=n[e],i=s.parseDate(a,"yyyy",t);if(i){if(null!=f&&f===e)continue;if(null!=m&&m===e)continue;l.push(i.getFullYear())}}const c=new Array;for(let t=e.length-1;t>=0;t--)for(let a=0;a<i.length;a++)for(let s=0;s<l.length;s++){const r=new Date(l[s],i[a],e[t]);l[s]<1970&&r.setFullYear(l[s]),isNaN(r.getTime())||c.push(r)}c.length>0&&(o=c[0],d=!0)}if(i){const e=i.indexOf(":")>=0?i.split(":"):i,a=s.parseDate(i,"h:mm tt",t)||s.parseDate(i,"HH:mm:ss.fff",t)||s.parseDate(i,"HH:mm:ss.ff",t)||s.parseDate(i,"h:mm:ss tt",t)||s.parseDate(i,"HH:mm:ss.tttt",t)||s.parseDate(i,"HH:mm:ss",t)||s.parseDate(i,"HH:mm",t)||s.parseDate(i,"HH",t);let r=0,n=0,l=0,f=0;a&&!isNaN(a.getTime())?(r=a.getHours(),n=a.getMinutes(),l=a.getSeconds(),f=a.getMilliseconds()):(1===e.length&&(r=parseInt(e[0])),2===e.length&&(r=parseInt(e[0]),n=parseInt(e[1])),3===e.length&&(r=parseInt(e[0]),n=parseInt(e[1]),e[2].indexOf(".")>=0?(l=parseInt(e[2].toString().split(".")[0]),f=parseInt(e[2].toString().split(".")[1])):l=parseInt(e[2])),4===e.length&&(r=parseInt(e[0]),n=parseInt(e[1]),l=parseInt(e[2]),f=parseInt(e[3]))),!o||isNaN(r)||isNaN(n)||isNaN(l)||isNaN(f)||(o.setHours(r,n,l,f),d=!0)}if(d)return o}if(null!=e){n=[":","/","-"];let t=!0;for(let a=0;a<n.length;a++)-1!==e.indexOf(n[a])&&(t=!1);if(t){const t=new Number(e);if(!isNaN(t))return new Date(t)}}return null}getParseRegExp(e,t){const a=this;let s=e._parseRegExp;if(s){const e=s[t];if(e)return e}else e._parseRegExp=s={};let i,r=a.expandFormat(e,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),n=["^"],o=[],d=0,l=0,f=a.getTokenRegExp();for(;null!==(i=f.exec(r));){const e=r.slice(d,i.index);if(d=f.lastIndex,l+=a.appendPreOrPostMatch(e,n),l%2){n.push(i[0]);continue}let t,s=i[0],m=s.length;switch(s){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":t="(\\D+)";break;case"tt":case"t":t="(\\D*)";break;case"yyyyy":t="(\\d{1,4})";break;case"yyyy":t="(\\d{"+m+"})";break;case"fff":case"ff":case"f":t="(\\d{1,"+m+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":t="(\\d\\d?)";break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":t="(\\d{1,3})";break;case"zzz":t="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":t="([+-]?\\d\\d?)";break;case"/":t="/";break;default:if(!/i{1,24}/.test(s))throw"Invalid date format pattern '"+s+"'.";t="(\\d{"+s.length+"})"}t&&n.push(t),"/"!==s&&o.push(i[0])}a.appendPreOrPostMatch(r.slice(d),n),n.push("$");const m={regExp:n.join("").replace(/\s+/g,"\\s+"),groups:o};return s[t]=m}outOfRange(e,t,a){return e<t||e>a}expandYear(e,t){const a=this,s=new Date,i=a.getEra(s);if(t<100){let r=e.twoDigitYearMax;r="string"==typeof r?(new Date).getFullYear()%100+parseInt(r,10):r;const n=a.getEraYear(s,e,i);(t+=n-n%100)>r&&(t-=100)}return t}padZeros(e,t){let a,s=e+"";return t>1&&s.length<t?(a=["0","00","000"][t-2]+s,a.substr(a.length-t,t)):(a=s,a)}parseDate(e,t,a){const s=this;null==a&&(a=s.calendar),e=s.trim(e);const i=a,r=s.getParseRegExp(i,t),n=new RegExp(r.regExp).exec(e);if(null===n)return null;let o,d=r.groups,l=null,f=null,m=null,c=null,u=null,p=0,y=0,g=0,h=0,T=null,M=!1;for(let e=0,t=d.length;e<t;e++){const t=n[e+1];if(t){const a=d[e],r=a.length,n=parseInt(t,10);switch(a){case"dd":case"d":if(c=n,s.outOfRange(c,1,31))return null;break;case"MMM":case"MMMM":case"MMMMM":case"MMMMMM":case"MMMMMMM":case"MMMMMMMM":if(m=s.getMonthIndex(i,t,3===r),s.outOfRange(m,0,11))return null;break;case"M":case"MM":if(m=n-1,s.outOfRange(m,0,11))return null;break;case"y":case"yy":case"yyyy":if(f=r<4?s.expandYear(i,n):n,s.outOfRange(f,0,9999))return null;break;case"h":case"hh":if(p=n,12===p&&(p=0),s.outOfRange(p,0,11))return null;break;case"H":case"HH":if(p=n,s.outOfRange(p,0,23))return null;break;case"m":case"mm":if(y=n,s.outOfRange(y,0,59))return null;break;case"s":case"ss":if(g=n,s.outOfRange(g,0,59))return null;break;case"tt":case"t":if(M=i.PM&&(t===i.PM[0]||t===i.PM[1]||t===i.PM[2]),!M&&(!i.AM||t!==i.AM[0]&&t!==i.AM[1]&&t!==i.AM[2]))return null;break;case"f":case"ff":case"fff":if(h=n*Math.pow(10,3-r),s.outOfRange(h,0,999))return null;break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":if(s.outOfRange(n,0,1e3))return null;s[s._codeToUnit[a]]=n;break;case"ddd":case"dddd":if(u=s.getDayIndex(i,t,3===r),s.outOfRange(u,0,6))return null;break;case"zzz":{const e=t.split(/:/);if(2!==e.length)return null;if(o=parseInt(e[0],10),s.outOfRange(o,-12,13))return null;const a=parseInt(e[1],10);if(s.outOfRange(a,0,59))return null;T=60*o+(s.startsWith(t,"-")?-a:a);break}case"z":case"zz":if(o=n,s.outOfRange(o,-12,13))return null;T=60*o;break;case"g":case"gg":{let e=t;if(!e||!i.eras)return null;e=this.trim(e.toLowerCase());for(let t=0,a=i.eras.length;t<a;t++)if(e===i.eras[t].nathat.toLowerCase()){l=t;break}if(null===l)return null;break}default:{let e=t;e.length%3==1?e+="00":e.length%3==2&&(e+="0"),h=parseInt(e.slice(0,3),10),e=e.slice(3);let a=0;for(;e.length>0;)s[s._smallUnits[a]]=parseInt(e.slice(0,3),10),e=e.slice(3),a++}}}}let S,D=new Date,H=i.convert;if(S=D.getFullYear(),null===f?f=S:i.eras&&(f+=i.eras[l||0].offset),null===m&&(m=0),null===c&&(c=1),H){if(D=H.toGregorian(f,m,c),null===D)return null}else{if(D.setFullYear(f,m,c),D.getDate()!==c)return null;if(null!==u&&D.getDay()!==u)return null}if(M&&p<12&&(p+=12),D.setHours(p,y,g,h),null!==T){const e=D.getMinutes()-(T+D.getTimezoneOffset());D.setHours(D.getHours()+parseInt(e/60,10),e%60)}return D}toString(e,t){const a=this;void 0===e&&(e="yyyy-MM-dd HH:mm:ss");const s=a.dateData.toString()+a.getFractionsOfSecondStamp()+e+(a.timeZone||"");if(Smart.Utilities.DateTime.cache&&Smart.Utilities.DateTime.cache[s]&&!1!==a.showTodayDateAsString)return Smart.Utilities.DateTime.cache[s];const i=a.toDate();if(null==t&&(t=a.calendar),"string"==typeof i)return i;if(!e||!e.length||"i"===e){let e;return e=a.formatDate(i,t.patterns.F,t),e}const r=t.eras,n="s"===e;e=a.expandFormat(t,e);const o=[];let d,l=0,f=a.getTokenRegExp();function m(e,t){if(void 0!==e.getMonth)switch(t){case 0:return e.getFullYear();case 1:return e.getMonth();case 2:return e.getDate()}}for(;;){const s=f.lastIndex,c=f.exec(e),u=e.slice(s,c?c.index:e.length);if(l+=a.appendPreOrPostMatch(u,o),!c)break;if(l%2){o.push(c[0]);continue}const p=c[0],y=p.length;let g;if(/i{1,24}/.test(p))o.push(a.getFirstNDigitsOfPrecision(p.length));else switch(p){case"ddd":case"dddd":{const e=3===y?t.days.namesAbbr:t.days.names;o.push(e[i.getDay()]);break}case"d":case"dd":o.push(a.padZeros(m(i,2),y));break;case"MMM":case"MMMM":g=m(i,1),o.push(t.months[3===y?"namesAbbr":"names"][g]);break;case"M":case"MM":o.push(a.padZeros(m(i,1)+1,y));break;case"y":case"yy":case"yyyy":g=a.getEraYear(i,t,a.getEra(i,r),n),y<4&&(g%=100),o.push(a.padZeros(g,y));break;case"h":case"hh":d=i.getHours()%12,0===d&&(d=12),o.push(a.padZeros(d,y));break;case"H":case"HH":o.push(a.padZeros(i.getHours(),y));break;case"m":case"mm":o.push(a.padZeros(i.getMinutes(),y));break;case"s":case"ss":o.push(a.padZeros(i.getSeconds(),y));break;case"t":case"tt":g=i.getHours()<12?t.AM?t.AM[0]:" ":t.PM?t.PM[0]:" ",o.push(1===y?g.charAt(0):g);break;case"f":case"ff":case"fff":o.push(a.padZeros(i.getMilliseconds(),3).substr(0,y));break;case"u":case"n":case"p":case"e":case"a":case"x":case"o":o.push(a[a._codeToUnit[p]]);break;case"uu":case"nn":case"pp":case"ee":case"aa":case"xx":case"oo":o.push(a.padZeros(a[a._codeToUnit[p]],3));break;case"z":case"zz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),y));break;case"zzz":o.push((a.timeZoneOffsetHours>=0?"+":"-")+a.padZeros(Math.floor(Math.abs(a.timeZoneOffsetHours)),2)+":"+a.padZeros(60*Math.abs(a.timeZoneOffsetHours%1),2));break;case"g":case"gg":t.eras&&o.push(t.eras[a.getEra(i,r)].name);break;case"/":o.push(t["/"]);break;default:throw"Invalid date format pattern '"+p+"'."}}let c=o.join("");if(Smart.Utilities.DateTime.cache||(Smart.Utilities.DateTime.cache=new Array),a._today||(a._today=new Date),a.calendar&&a.calendar.today&&-1===e.indexOf(":")&&i.getFullYear()===a._today.getFullYear()&&i.getDate()===a._today.getDate()&&i.getMonth()===a._today.getMonth()){if(!1===a.showTodayDateAsString)return Smart.Utilities.DateTime.cache[s]=c,c;c=a.calendar.today}return Smart.Utilities.DateTime.cache[s]=c,c}getFractionsOfSecondStamp(){const e=this;return e._microsecond.toString()+e._nanosecond+e._picosecond+e._femtosecond+e._attosecond+e._zeptosecond+e._yoctosecond}getFirstNDigitsOfPrecision(e,t){const a=this;return(""+(!0!==t?a.padZeros(a.millisecond(),3):"")+a.padZeros(a._microsecond,3)+a.padZeros(a._nanosecond,3)+a.padZeros(a._picosecond,3)+a.padZeros(a._femtosecond,3)+a.padZeros(a._attosecond,3)+a.padZeros(a._zeptosecond,3)+a.padZeros(a._yoctosecond,3)).slice(0,e)}copySmallTimePartValues(e){const t=this;e._microsecond=t._microsecond,e._nanosecond=t._nanosecond,e._picosecond=t._picosecond,e._femtosecond=t._femtosecond,e._attosecond=t._attosecond,e._zeptosecond=t._zeptosecond,e._yoctosecond=t._yoctosecond}add(e,t,a){const s=this,i=s.internalMS();if(void 0===t){if(!1===a)return s.dateData=i+parseInt(e._ticks/s.ticksPerMillisecond),s;const t=new Smart.Utilities.DateTime(i+parseInt(e._ticks/s.ticksPerMillisecond));return s.copyTimeZone(t),s.copySmallTimePartValues(t),t}const r=e*t;if(r<=-s.maxMillis||r>=s.maxMillis)throw new Error("Out of Range");if(!1===a)return s.dateData=i+r,s;const n=new Smart.Utilities.DateTime(i+r);return s.copyTimeZone(n),s.copySmallTimePartValues(n),n}addDays(e,t){return this.add(e,this.millisPerDay,t)}clone(){const e=this,t=new Smart.Utilities.DateTime(e.dateData);return e.copyTimeZone(t),e.copySmallTimePartValues(t),t}clearTime(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s,0,0,0,0);return e.copyTimeZone(i),i}addHours(e,t){return this.add(e,this.millisPerHour,t)}addDeciseconds(e,t){return this.add(100*e,1,t)}addCentiseconds(e,t){return this.add(10*e,1,t)}addMilliseconds(e,t){return this.add(e,1,t)}addMinutes(e,t){return this.add(e,this.millisPerMinute,t)}addMonths(e,t){const a=this;if(e<-12e4||e>12e4)throw new Error("Invalid Months Value");let s=parseInt(a.getDatePart(a.datePartYear)),i=parseInt(a.getDatePart(a.datePartMonth)),r=parseInt(a.getDatePart(a.datePartDay));if(e%12==0)s+=e/12;else{const t=i-1+e;t>=0?(i=t%12+1,s+=t/12):(i=12+(t+1)%12,s+=(t-11)/12),s=parseInt(s)}if(s<1||s>9999)throw new Error("Year out of range");const n=a.daysInMonth(s,i);if(r>n&&(r=n),!1===t)return a.dateData=a.dateToMS(s,i,r)+a.internalMS()%a.millisPerDay,a;const o=new Smart.Utilities.DateTime(a.dateToMS(s,i,r)+a.internalMS()%a.millisPerDay);return a.copyTimeZone(o),a.copySmallTimePartValues(o),o}addSeconds(e,t){return this.add(e,this.millisPerSecond,t)}addYears(e,t){return this.addMonths(12*e,t)}addMicroseconds(e,t){if(0===e)return;const a=this;let s,i;e<0&&0===a.hour()&&0===a.minute()&&0===a.second()&&0===a.millisecond()&&0===a._microsecond&&(s=parseInt(e/1e3,10)-1,i=1e3+e%1e3);const r=1e3*a.timeToMS(a.hour(),a.minute(),a.second(),a.millisecond())+a._microsecond,n=r+e;let o;if(void 0===s&&(s=parseInt(n/1e3,10)-parseInt(r/1e3,10)),void 0===i&&(i=parseInt(n%1e3,10)),0!==s&&(o=a.addMilliseconds(s,t)),!1!==t)return o||(o=a.clone()),o._microsecond=i,o;a._microsecond=i}addFractionsOfSecond(e,t,a,s,i){if(0===e)return;const r=this,n=1e3*r[s]+r[a],o=e+n;let d,l=parseInt(o/1e3,10)-parseInt(n/1e3,10),f=parseInt(o%1e3,10);if(e<0&&o<0&&f<0&&(l--,f=1e3+f),0!==l&&(d=r[i](l,t)),!1!==t)return d||(d=r.clone()),d[a]=f,d;r[a]=f}addNanoseconds(e,t){return this.addFractionsOfSecond(e,t,"_nanosecond","_microsecond","addMicroseconds")}addPicoseconds(e,t){return this.addFractionsOfSecond(e,t,"_picosecond","_nanosecond","addNanoseconds")}addFemtoseconds(e,t){return this.addFractionsOfSecond(e,t,"_femtosecond","_picosecond","addPicoseconds")}addAttoseconds(e,t){return this.addFractionsOfSecond(e,t,"_attosecond","_femtosecond","addFemtoseconds")}addZeptoseconds(e,t){return this.addFractionsOfSecond(e,t,"_zeptosecond","_attosecond","addAttoseconds")}addYoctoseconds(e,t){return this.addFractionsOfSecond(e,t,"_yoctosecond","_zeptosecond","addZeptoseconds")}getTimeZoneOffset(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1),s=e.getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset());return{offset:-e.getTimezoneOffset()/60,dst:+s}}isInDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return this.date().getTimezoneOffset()<Math.max(t.getTimezoneOffset(),a.getTimezoneOffset())}supportsDaylightSavingTime(){const e=new Date,t=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1);return t.getTimezoneOffset()!==a.getTimezoneOffset()}date(){const e=this,t=e.month(),a=e.year(),s=e.day(),i=new Smart.Utilities.DateTime(a,t,s);return e.copyTimeZone(i),i}isWeekend(){return 0===this.dayOfWeek()||6===this.dayOfWeek()}toDate(e){const t=this,a=t.month(),s=t.year(),i=t.day(),r=t.hour(),n=t.minute(),o=t.second(),d=t.millisecond();let l=new Date(s,a-1,i);if(s<1970&&l.setFullYear(s),l.setHours(r,n,o,d),e){const a=t.timeZones.filter((function(t){return t.id===e}));if(a.length){let e=a[0].offset;const s=l.getTime();let i=60*l.getTimezoneOffset()*1e3;if(t.timeZone){const e=t.timeZones.filter((function(e){return e.id===t.timeZone}));e.length&&(i=60*-e[0].offset*1e3)}l=new Date(s+i+6e4*e)}}return l}toTimeZone(e){const t=this;let a=e;if(null==a&&(a="Local"),t.timeZone===a)return t.clone();const s=t.timeZones.filter((function(e){return e.id===a}));if(0===s.length)return t.clone();const i=this.toDate(a),r=new Smart.Utilities.DateTime(i);return r.timeZone=a,r.timeZoneOffset=s[0].offset,r.timeZoneOffsetHours=s[0].offsetHours,t.copySmallTimePartValues(r),r}day(){return this.getDatePart(this.datePartDay)}month(){return this.getDatePart(this.datePartMonth)}year(){return this.getDatePart(this.datePartYear)}millisecond(){return parseInt(this.internalMS()%1e3)}hour(){return parseInt(Math.floor(this.internalMS()/this.millisPerHour)%24)}minute(){return parseInt(this.internalMS()/this.millisPerMinute%60)}second(){return parseInt(this.internalMS()/this.millisPerSecond%60)}microsecond(){return this._microsecond}nanosecond(){return this._nanosecond}picosecond(){return this._picosecond}femtosecond(){return this._femtosecond}attosecond(){return this._attosecond}zeptosecond(){return this._zeptosecond}yoctosecond(){return this._yoctosecond}valueOf(){return this.dateData}equals(e){const t=this;return t.dateData===e.dateData&&t._microsecond===e._microsecond&&t._nanosecond===e._nanosecond&&t._picosecond===e._picosecond&&t._femtosecond===e._femtosecond&&t._attosecond===e._attosecond&&t._zeptosecond===e._zeptosecond&&t._yoctosecond===e._yoctosecond}equalDateParts(e){const t=this;return t.year()===e.year()&&t.month()===e.month()&&t.day()===e.day()}compare(e){const t=this;if(t.equals(e))return 0;const a=["dateData","_microsecond","_nanosecond","_picosecond","_femtosecond","_attosecond","_zeptosecond","_yoctosecond"];for(let s=0;s<a.length;s++){const i=a[s];if(t[i]>e[i])return 1;if(t[i]<e[i])return-1}return 0}toDateString(){return this.toDate().toDateString()}toLocaleDateString(){return this.toDate().toLocaleDateString(this.calendar.locale)}toLocaleString(){return this.toDate().toLocaleString(this.calendar.locale)}toLocaleTimeString(){return this.toDate().toLocaleTimeString(this.calendar.locale)}validateTimeZone(e){const t=this;if("string"!=typeof e)return;const a=t.timeZones.filter((function(t){return t.id===e}));0!==a.length&&(t.timeZone=e,t.timeZoneOffset=a[0].offset,t.timeZoneOffsetHours=a[0].offsetHours)}copyTimeZone(e){const t=this;e.timeZone=t.timeZone,e.timeZoneOffset=t.timeZoneOffset,e.timeZoneOffsetHours=t.timeZoneOffsetHours}getTimeStamp(){return new Smart.Utilities.BigNumber(this.dateData.toString()+this.getFirstNDigitsOfPrecision(void 0,!0))}})})();
/***/ }),
/***/ 9613:
/***/ (() => {
Smart.Utilities.Assign("Draw",class{constructor(t,e){const i=this;i.host=t,i.renderEngine=e||"",i.refresh();const r=["clear","removeElement","attr","getAttr","line","circle","rect","path","pieslice","pieSlicePath","text","measureText"];for(let t in r)i._addFn(Smart.Utilities.Draw.prototype,r[t])}_addFn(t,e){t[e]||(t[e]=function(){return this.renderer[e].apply(this.renderer,arguments)})}_initRenderer(t){return this.createRenderer(this,t)}_internalRefresh(){const t=this;if(t.renderer||(t.host.innerHTML="",t._initRenderer(t.host)),"none"===window.getComputedStyle(t.host).display)return;const e=t.renderer;if(!e)return;const i=e.getRect();t._render({x:1,y:1,width:i.width,height:i.height})}_render(t){this._plotRect=t}refresh(){this._internalRefresh()}getSize(){const t=this._plotRect;return{width:t.width,height:t.height}}toGreyScale(t){if(-1===t.indexOf("#"))return t;const e=this.cssToRgb(t);e[0]=e[1]=e[2]=Math.round(.3*e[0]+.59*e[1]+.11*e[2]);const i=this.rgbToHex(e[0],e[1],e[2]);return"#"+i[0]+i[1]+i[2]}decToHex(t){return t.toString(16)}hexToDec(t){return parseInt(t,16)}rgbToHex(t,e,i){return[this.decToHex(t),this.decToHex(e),this.decToHex(i)]}hexToRgb(t,e,i){return[this.hexToDec(t),this.hexToDec(e),this.hexToDec(i)]}cssToRgb(t){return t.indexOf("rgb")<=-1?this.hexToRgb(t.substring(1,3),t.substring(3,5),t.substring(5,7)):t.substring(4,t.length-1).split(",")}hslToRgb(t){let e,i,r;const s=parseFloat(t[0]),n=parseFloat(t[1]),h=parseFloat(t[2]);if(0===n)e=i=r=h;else{const t=h<.5?h*(1+n):h+n-h*n,a=2*h-t;e=this.hueToRgb(a,t,s+1/3),i=this.hueToRgb(a,t,s),r=this.hueToRgb(a,t,s-1/3)}return[255*e,255*i,255*r]}hueToRgb(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}rgbToHsl(t){const e=parseFloat(t[0])/255,i=parseFloat(t[1])/255,r=parseFloat(t[2])/255,s=Math.max(e,i,r),n=Math.min(e,i,r);let h,a,o=(s+n)/2;if(s===n)h=a=0;else{const t=s-n;switch(a=o>.5?t/(2-s-n):t/(s+n),s){case e:h=(i-r)/t+(i<r?6:0);break;case i:h=(r-e)/t+2;break;case r:h=(e-i)/t+4}h/=6}return[h,a,o]}swap(t,e){const i=t;t=e,e=i}getNum(t){if(t.constructor!==Array){if(isNaN(t))return 0}else for(let e=0;e<t.length;e++)if(!isNaN(t[e]))return t[e];return 0}_ptRotate(t,e,i,r,s){const n=Math.sqrt(Math.pow(Math.abs(t-i),2)+Math.pow(Math.abs(e-r),2)),h=Math.asin((t-i)/n)+s;return{x:t=i+Math.cos(h)*n,y:e=r+Math.sin(h)*n}}log(t,e){return Math.log(t)/(e?Math.log(e):1)}_mod(t,e){const i=Math.abs(t>e?e:t);let r=1;if(0!==i)for(;i*r<100;)r*=10;return(t*=r)%(e*=r)/r}createRenderer(t,e){const i=t;let r=i.renderer=null;return document.createElementNS&&"HTML5"!==i.renderEngine&&(r=new Smart.Utilities.SvgRenderer(this)),null!==r||"HTML5"!==i.renderEngine&&void 0!==i.renderEngine||(r=new Smart.Utilities.HTML5Renderer(this)),r.init(e),i.renderer=r,r}getByPriority(t){let e;for(let i=0;i<t.length;i++){const r=t[i];if(null!=r&&""!==r){e=r;break}}return e}get(t,e,i){return void 0!==i?t[e][i]:t[e]}min(t,e){let i=NaN;for(let r=0;r<t.length;r++){const s=this.get(t,r,e);(isNaN(i)||s<i)&&(i=s)}return i}max(t,e){let i=NaN;for(let r=0;r<t.length;r++){const s=this.get(t,r,e);(isNaN(i)||s>i)&&(i=s)}return i}sum(t,e){let i=0;for(let r=0;r<t.length;r++){const s=this.get(t,r,e);isNaN(s)||(i+=s)}return i}count(t,e){let i=0;for(let r=0;r<t.length;r++){const s=this.get(t,r,e);isNaN(s)||i++}return i}avg(t,e){return this.sum(t,e)/Math.max(1,this.count(t,e))}filter(t,e){if(!e)return t;const i=[];for(let r=0;r<t.length;r++)e(t[r])&&i.push(t[r]);return i}scale(t,e,i,r){if(isNaN(t))return NaN;if((t<Math.min(e.min,e.max)||t>Math.max(e.min,e.max))&&(!r||!0!==r.ignore_range))return NaN;let s=NaN,n=1;if(void 0===e.type||"logarithmic"!==e.type){let i=Math.abs(e.max-e.min);i||(i=1),n=Math.abs(t-Math.min(e.min,e.max))/i}else if("logarithmic"===e.type){let i=e.base;isNaN(i)&&(i=10);let r=Math.min(e.min,e.max);r<=0&&(r=1);let s=Math.max(e.min,e.max);s<=0&&(s=1);const h=this.log(s,i);s=Math.pow(i,h);const a=this.log(r,i);r=Math.pow(i,a);const o=this.log(t,i);n=Math.abs(o-a)/(h-a)}if("logarithmic"===i.type){let t=i.base;isNaN(t)&&(t=10);const e=this.log(i.max,t),r=this.log(i.min,t);i.flip&&(n=1-n);const h=Math.min(r,e)+n*Math.abs(e-r);s=Math.pow(t,h)}else s=Math.min(i.min,i.max)+n*Math.abs(i.max-i.min),i.flip&&(s=Math.max(i.min,i.max)-s+i.min);return s}axis(t,e,i){if(i<=1)return[e,t];(isNaN(i)||i<2)&&(i=2);let r=0;for(;Math.round(t)!==t&&Math.round(e)!==e&&r<10;)t*=10,e*=10,r++;let s=(e-t)/i;for(;r<10&&Math.round(s)!==s;)t*=10,e*=10,s*=10,r++;const n=[1,2,5];let h,a=0;for(;;){let t=a%n.length,e=Math.floor(a/n.length),i=Math.pow(10,e)*n[t];if(t=(a+1)%n.length,e=Math.floor((a+1)/n.length),h=Math.pow(10,e)*n[t],s>=i&&s<h)break;a++}const o=h,l=[];let d=this.renderer._rnd(t,o,!1);const c=r<=0?1:Math.pow(10,r);for(;d<e+o;)l.push(d/c),d+=o;return l}_widgetToImage(t,e,i,r,s){let n=t;if(!n)return!1;void 0!==i&&""!==i||(i="image."+e);let h=n.renderEngine,a=n.animation;if(n.animation="none",n.renderEngine="HTML5",n.renderEngine!==h)try{n.refresh()}catch(t){return n.renderEngine=h,n.refresh(),n.animation=a,!1}let o=n.renderer.getContainer().firstElementChild,l=!0;"function"==typeof r&&(l=r(t,o));let d=!0;return l&&(d=this.exportImage(t,o,e,i,s)),n.renderEngine!==h&&(n.renderEngine=h,n.refresh(),n.animation=a),d}_saveAsImage(t,e){return this._widgetToImage(this,t,e)}saveAsPNG(t){return this._saveAsImage("png",t)}saveAsJPEG(t){return this._saveAsImage("jpeg",t)}exportImage(t,e,i,r,s){if(!e)return!1;let n="pdf"===i.toLowerCase();n&&(i="jpeg"),void 0!==r&&""!==r||(r="image."+i);let h=!0;if("print"!==i){try{if(e)if(n){s=s||"portrait";const n={content:{image:e.toDataURL("image/"+i),width:Math.min(e.width/1.35,"portrait"===s?515:762)},pageOrientation:s};try{pdfMake.createPdf(n).download(r)}catch(e){t.error(t.localize("missingReference",{files:"pdfmake.min.js"}))}}else{Smart.Utilities.DataExporter||t.error(t.localize("missingReference",{files:"smart.export.js"}));const s=new Smart.Utilities.DataExporter;e.toBlob((function(t){s.downloadFile(t,i,r)}))}}catch(t){h=!1}return h}{const t=window.open("","","width=800,height=500"),i=t.document.open(),r='<!DOCTYPE html><html><head><meta charset="utf-8" /><title>jQWidgets Chart</title></head><body><img src="'+e.toDataURL()+'" /></html>';try{i.write(r),i.close(),setTimeout((function(){t.print(),t.close()}),100)}catch(t){}}}}),Smart.Utilities.Assign("Renderer",class{constructor(t){const e=this;e.draw=t,e._gradients={},e._toRadiansCoefficient=2*Math.PI/360}pieSlicePath(t,e,i,r,s,n,h){r||(r=1);const a=Math.abs(s-n),o=a>180?1:0;a>=360&&(n=s+359.99);const l=s*this._toRadiansCoefficient,d=n*this._toRadiansCoefficient;let c=t,p=t,u=e,g=e;const f=!isNaN(i)&&i>0;f&&(h=0);const m=Math.cos(l),_=Math.sin(l),x=Math.cos(d),M=Math.sin(d);if(h+i>0){if(h>0){const i=(a/2+s)*this._toRadiansCoefficient;t+=h*Math.cos(i),e-=h*Math.sin(i)}f&&(c=t+i*m,u=e-i*_,p=t+i*x,g=e-i*M)}const y=t+r*m,w=t+r*x,N=e-r*_,v=e-r*M;let b="";const C=Math.abs(Math.abs(n-s)-360)>.02;return f?(b="M "+p+","+g,b+=" a"+i+","+i,b+=" 0 "+o+",1 "+(c-p)+","+(u-g),b+=C?" L"+y+","+N:" M"+y+","+N,b+=" a"+r+","+r,b+=" 0 "+o+",0 "+(w-y)+","+(v-N),C&&(b+=" Z")):(b="M "+w+","+v,b+=" a"+r+","+r,b+=" 0 "+o+",1 "+(y-w)+","+(N-v),C&&(b+=" L"+t+","+e,b+=" Z")),b}measureText(t,e,i,r){const s=this._getTextParts(t,e,i),n=s.width;let h=s.height;!1===r&&(h/=.6);let a={};if(isNaN(e)&&(e=0),0===e)a={width:this._rup(n),height:this._rup(h)};else{const t=e*Math.PI*2/360,i=Math.abs(Math.sin(t)),r=Math.abs(Math.cos(t)),s=Math.abs(n*i+h*r),o=Math.abs(n*r+h*i);a={width:this._rup(o),height:this._rup(s)}}return r&&(a.textPartsInfo=s),a}alignTextInRect(t,e,i,r,s,n,h,a,o,l){const d=o*Math.PI*2/360,c=Math.sin(d),p=Math.cos(d),u=s*c,g=s*p;"center"===h||""===h||"undefined"===h?t+=i/2:"right"===h&&(t+=i),"center"===a||"middle"===a||""===a||"undefined"===a?e+=r/2:"bottom"===a?e+=r-n/2:"top"===a&&(e+=n/2);let f="middle";-1!==(l=l||"").indexOf("top")?f="top":-1!==l.indexOf("bottom")&&(f="bottom");let m="center";return-1!==l.indexOf("left")?m="left":-1!==l.indexOf("right")&&(m="right"),"center"===m?(t-=g/2,e-=u/2):"right"===m&&(t-=g,e-=u),"top"===f?(t-=n*c,e+=n*p):"middle"===f&&(t-=n*c/2,e+=n*p/2),{x:t=this._rup(t),y:e=this._rup(e)}}adjustColor(t,e){if("string"!=typeof t)return"#000000";if(-1===t.indexOf("#"))return t;const i=this.draw;let r=i.cssToRgb(t);const s=i.rgbToHsl(r);s[2]=Math.min(1,s[2]*e),s[1]=Math.min(1,s[1]*e*1.1),r=i.hslToRgb(s),t="#";for(let e=0;e<3;e++){let s=Math.round(r[e]);s=i.decToHex(s),1===s.toString().length&&(t+="0"),t+=s}return t.toUpperCase()}_rup(t){let e=Math.round(t);return t>e&&e++,e}_ptdist(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}_rnd(t,e,i,r){if(isNaN(t))return t;void 0===r&&(r=!0);let s=t-(!0===r?t%e:this._mod(t,e));return t===s?s:(i?t>s&&(s+=e):s>t&&(s-=e),1===e?Math.round(s):s)}_ptrnd(t){if(!document.createElementNS)return Math.round(t)===t?t:this._rnd(t,1,!1,!0);const e=this._rnd(t,.5,!1,!0);return.5!==Math.abs(e-Math.round(e))?e>t?e-.5:e+.5:e}_getContrastColor(t){if(void 0===t)return;let e=this.draw.hexToRgb(t.slice(1,3),t.slice(3,5),t.slice(5,7));return(.299*e[0]+.61*e[1]+.114*e[2])/255>.6?"#000000":"#FFFFFF"}}),Smart.Utilities.Assign("SvgRenderer",class extends Smart.Utilities.Renderer{constructor(t){super(t);const e=this;e._svgns="http://www.w3.org/2000/svg",e._openGroups=[],e._clipId=0}init(t){const e=document.createElement("div");e.className="drawContainer",e.onselectstart=function(){return!1},t.appendChild(e),this.host=t,this.container=e;try{const t=document.createElementNS(this._svgns,"svg");t.setAttribute("version","1.1"),t.setAttribute("width","100%"),t.setAttribute("height","100%"),t.setAttribute("overflow","hidden"),e.appendChild(t),this.canvas=t}catch(t){return!1}return this._id=(new Date).getTime(),this.clear(),!0}getType(){return"SVG"}refresh(){}getRect(){return{x:0,y:0,width:Math.max(this._rup(this.host.offsetWidth)-1,0),height:Math.max(this._rup(this.host.offsetHeight)-1,0)}}getContainer(){return this.container}clear(){for(;this.canvas.childNodes.length>0;)this.removeElement(this.canvas.firstElementChild);this._defaultParent=void 0,this._defs=document.createElementNS(this._svgns,"defs"),this._gradients={},this.canvas.appendChild(this._defs)}removeElement(t){if(void 0!==t)try{for(;t.firstChild;)this.removeElement(t.firstChild);t.parentNode?t.parentNode.removeChild(t):this.canvas.removeChild(t)}catch(t){}}beginGroup(){const t=this._activeParent(),e=document.createElementNS(this._svgns,"g");return t.appendChild(e),this._openGroups.push(e),e}endGroup(){0!==this._openGroups.length&&this._openGroups.pop()}_activeParent(){return 0===this._openGroups.length?this.canvas:this._openGroups[this._openGroups.length-1]}createClipRect(t){const e=document.createElementNS(this._svgns,"clipPath"),i=document.createElementNS(this._svgns,"rect");return this.attr(i,{x:t.x,y:t.y,width:t.width,height:t.height,fill:"none"}),this._clipId=this._clipId||0,e.id="cl"+this._id+"_"+(++this._clipId).toString(),e.appendChild(i),this._defs.appendChild(e),e}getWindowHref(){let t=window.location.href;return t?(t=t.replace(/([\('\)])/g,"\\$1"),t=t.replace(/#.*$/,""),t):t}setClip(t,e){const i="url("+this.getWindowHref()+"#"+e.id+")";return this.attr(t,{"clip-path":i})}addHandler(t,e,i){t.addEventListener(e,i)}removeHandler(){}on(t,e,i){this.addHandler(t,e,i)}off(t,e,i){this.removeHandler(t,e,i)}shape(t,e){const i=document.createElementNS(this._svgns,t);if(i){for(let t in e)i.setAttribute(t,e[t]);return this._activeParent().appendChild(i),i}}_getTextParts(t,e,i){const r={width:0,height:0,parts:[]};if(void 0===t)return r;const s=t.toString().split("<br>"),n=this._activeParent(),h=document.createElementNS(this._svgns,"text");this.attr(h,i);for(let t=0;t<s.length;t++){const e=s[t],i=h.ownerDocument.createTextNode(e);let a;h.appendChild(i),n.appendChild(h);try{a=h.getBBox()}catch(t){}const o=this._rup(a.width),l=this._rup(.6*a.height);h.removeChild(i),r.width=Math.max(r.width,o),r.height+=l+(t>0?4:0),r.parts.push({width:o,height:l,text:e})}return n.removeChild(h),r}_measureText(t,e,i,r){return super.measureText(t,e,i,r)}measureText(t,e,i){return this._measureText(t,e,i,!1)}text(t,e,i,r,s,n,h,a,o,l,d){const c=this._measureText(t,n,h,!0,this).textPartsInfo,p=c.parts,u=this._getContrastColor(arguments[11]);let g;if(o||(o="center"),l||(l="center"),(p.length>1||a)&&(g=this.beginGroup()),a){const t=this.createClipRect({x:this._rup(e)-1,y:this._rup(i)-1,width:this._rup(r)+2,height:this._rup(s)+2});this.setClip(g,t)}let f=this._activeParent(),m=0,_=0;m=c.width,_=c.height,(isNaN(r)||r<=0)&&(r=m),(isNaN(s)||s<=0)&&(s=_);const x=r||0,M=s||0;let y=0;if(!n||0===n){let t;i+=_,"center"===l||"middle"===l?i+=(M-_)/2:"bottom"===l&&(i+=M-_),r||(r=m),s||(s=_),f=this._activeParent();for(let r=p.length-1;r>=0;r--){t=document.createElementNS(this._svgns,"text"),this.attr(t,h),this.attr(t,{cursor:"default"});const s=t.ownerDocument.createTextNode(p[r].text);t.appendChild(s);let n=e;const a=p[r].width,l=p[r].height;"center"===o?n+=(x-a)/2:"right"===o&&(n+=x-a),this.attr(t,{x:this._rup(n),y:this._rup(i+y),width:this._rup(a),height:this._rup(l)}),void 0!==u&&(t.style.fill=u),f.appendChild(t),y-=p[r].height+4}return g?(this.endGroup(),g):t}const w=this.alignTextInRect(e,i,r,s,m,_,o,l,n,d);e=w.x,i=w.y;const N=this.shape("g",{transform:"translate("+e+","+i+")"}),v=this.shape("g",{transform:"rotate("+n+")"});N.appendChild(v),y=0;for(let t=p.length-1;t>=0;t--){const e=document.createElementNS(this._svgns,"text");this.attr(e,h),this.attr(e,{cursor:"default"});const i=e.ownerDocument.createTextNode(p[t].text);e.appendChild(i);let r=0;const s=p[t].width,n=p[t].height;"center"===o?r+=(c.width-s)/2:"right"===o&&(r+=c.width-s),this.attr(e,{x:this._rup(r),y:this._rup(y),width:this._rup(s),height:this._rup(n)}),v.appendChild(e),y-=n+4}return f.appendChild(N),g&&this.endGroup(),N}line(t,e,i,r,s){const n=this.shape("line",{x1:t,y1:e,x2:i,y2:r});return this.attr(n,s),n}path(t,e){const i=this.shape("path");return i.setAttribute("d",t),e&&this.attr(i,e),i}rect(t,e,i,r,s){t=this._ptrnd(t),e=this._ptrnd(e),i=Math.max(1,this._rnd(i,1,!1)),r=Math.max(1,this._rnd(r,1,!1));const n=this.shape("rect",{x:t,y:e,width:i,height:r});return s&&this.attr(n,s),n}circle(t,e,i,r){const s=this.shape("circle",{cx:t,cy:e,r:i});return r&&this.attr(s,r),s}pieslice(t,e,i,r,s,n,h,a){const o=this.pieSlicePath(t,e,i,r,s,n,h),l=this.shape("path");return l.setAttribute("d",o),a&&this.attr(l,a),l}attr(t,e){if(t&&e)for(let i in e)"textContent"===i?t.textContent=e[i]:"width"===i||"height"===i?t.setAttribute(i,Math.max(0,e[i])):t.setAttribute(i,e[i])}removeAttr(t,e){if(t&&e)for(let i in e)"textContent"===i?t.textContent="":t.removeAttribute(e[i])}getAttr(t,e){return t.getAttribute(e)}_toLinearGradient(t,e,i){const r="grd"+this._id+t.replace("#","")+(e?"v":"h"),s="url("+this.getWindowHref()+"#"+r+")";if(this._gradients[s])return s;const n=document.createElementNS(this._svgns,"linearGradient");this.attr(n,{x1:"0%",y1:"0%",x2:e?"0%":"100%",y2:e?"100%":"0%",id:r});for(let e=0;e<i.length;e++){const r=i[e],s=document.createElementNS(this._svgns,"stop"),h="stop-color:"+this.adjustColor(t,r[1]);this.attr(s,{offset:r[0]+"%",style:h}),n.appendChild(s)}return this._defs.appendChild(n),this._gradients[s]=!0,s}_toRadialGradient(t,e,i){const r="grd"+this._id+t.replace("#","")+"r"+(void 0!==i?i.key:""),s="url("+this.getWindowHref()+"#"+r+")";if(this._gradients[s])return s;const n=document.createElementNS(this._svgns,"radialGradient");void 0===i?this.attr(n,{cx:"50%",cy:"50%",r:"100%",fx:"50%",fy:"50%",id:r}):this.attr(n,{cx:i.x,cy:i.y,r:i.outerRadius,id:r,gradientUnits:"userSpaceOnUse"});for(let i=0;i<e.length;i++){const r=e[i],s=document.createElementNS(this._svgns,"stop"),h="stop-color:"+this.adjustColor(t,r[1]);this.attr(s,{offset:r[0]+"%",style:h}),n.appendChild(s)}return this._defs.appendChild(n),this._gradients[s]=!0,s}}),Smart.Utilities.Assign("HTML5Renderer",class extends Smart.Utilities.Renderer{constructor(t){super(t),this._renderers=new Smart.Utilities.HTML5RenderHelpers(this)}init(t){try{this.host=t;const e=document.createElement("div"),i=document.createElement("canvas");e.className="chartContainer",e.style.position="relative",e.onselectstart=function(){return!1},i.id="__smartCanvasWrap",i.style.width="100%",i.style.height="100%",e.appendChild(i),t.appendChild(e),this.canvas=i,i.width=t.offsetWidth,i.height=t.offsetHeight,this.ctx=i.getContext("2d"),this._elements={},this._maxId=0,this._gradientId=0,this._gradients={},this._currentPoint={x:0,y:0},this._lastCmd="",this._pos=0}catch(t){return!1}return!0}getType(){return"HTML5"}getContainer(){return this.host.getElementsByClassName("chartContainer")[0]}getRect(){return{x:0,y:0,width:this.canvas.width-1,height:this.canvas.height-1}}beginGroup(){}endGroup(){}setClip(){}createClipRect(){}addHandler(){}removeHandler(){}on(t,e,i){this.addHandler(t,e,i)}off(t,e,i){this.removeHandler(t,e,i)}clear(){this._elements={},this._maxId=0,this._renderers._gradients={},this._gradientId=0}removeElement(t){void 0!==t&&this._elements[t.id]&&delete this._elements[t.id]}shape(t,e){let i={type:t,id:this._maxId++};for(let t in e)i[t]=e[t];return this._elements[i.id]=i,i}attr(t,e){for(let i in e)t[i]=e[i]}removeAttr(t,e){for(let i in e)delete t[e[i]]}rect(t,e,i,r,s){if(isNaN(t))throw'Invalid value for "x"';if(isNaN(e))throw'Invalid value for "y"';if(isNaN(i))throw'Invalid value for "width"';if(isNaN(r))throw'Invalid value for "height"';let n=this.shape("rect",{x:t,y:e,width:i,height:r});return s&&this.attr(n,s),n}path(t,e){let i=this.shape("path",e);return this.attr(i,{d:t}),i}line(t,e,i,r,s){return this.path("M "+t+","+e+" L "+i+","+r,s)}circle(t,e,i,r){let s=this.shape("circle",{x:t,y:e,r:i});return r&&this.attr(s,r),s}pieslice(t,e,i,r,s,n,h,a){let o=this.path(this.pieSlicePath(t,e,i,r,s,n,h),a);return this.attr(o,{x:t,y:e,innerRadius:i,outerRadius:r,angleFrom:s,angleTo:n}),o}_getCSSStyle(t){const e=document.createElement("div");e.className=t,e.style.position="absolute",e.style.visibility="hidden",this.host.appendChild(e);let i=window.getComputedStyle(e);return i={color:i.color,fontFamily:i.fontFamily,fontSize:i.fontSize,fontWeight:i.fontWeight},this.host.removeChild(e),i}_getTextParts(t,e,i){let r="Arial",s="10pt",n="";if(i&&i.class){let t=this._getCSSStyle(i.class);t.fontSize&&(s=t.fontSize),t.fontFamily&&(r=t.fontFamily),t.fontWeight&&(n=t.fontWeight)}this.ctx.font=n+" "+s+" "+r;let h={width:0,height:0,parts:[]},a=t.toString().split("<br>");for(let t=0;t<a.length;t++){let e=a[t],i=this.ctx.measureText(e).width,r=document.createElement("span");r.className="chart",r.font=this.ctx.font,r.textContent=e,this.host.appendChild(r);let s=.6*r.offsetHeight;this.host.removeChild(r),h.width=Math.max(h.width,this._rup(i)),h.height+=s+(t>0?4:0),h.parts.push({width:i,height:s,text:e})}return h}_measureText(t,e,i,r){return super.measureText(t,e,i,r)}measureText(t,e,i){return this._measureText(t,e,i,!1)}text(t,e,i,r,s,n,h,a,o,l,d){let c=this.shape("text",{text:t,x:e,y:i,width:r,height:s,angle:n,clip:a,halign:o,valign:l,rotateAround:d});if(h&&this.attr(c,h),c.fontFamily="Arial",c.fontSize="10pt",c.fontWeight="",c.color=this._getContrastColor(arguments[11]),h&&h.class){let t=this._getCSSStyle(h.class);c.fontFamily=t.fontFamily||c.fontFamily,c.fontSize=t.fontSize||c.fontSize,c.fontWeight=t.fontWeight||c.fontWeight,c.color=c.color||t.color}c.color=c.color||"#000000";let p=this._measureText(t,0,h,!0);return this.attr(c,{textPartsInfo:p.textPartsInfo,textWidth:p.width,textHeight:p.height}),(r<=0||isNaN(r))&&this.attr(c,{width:p.width}),(s<=0||isNaN(s))&&this.attr(c,{height:p.height}),c}_toLinearGradient(t,e,i){if(this._renderers._gradients[t])return t;let r=[];for(let e=0;e<i.length;e++)r.push({percent:i[e][0]/100,color:this.adjustColor(t,i[e][1])});let s="gr"+this._gradientId++;return this.createGradient(s,e?"vertical":"horizontal",r),s}_toRadialGradient(t,e){if(this._renderers._gradients[t])return t;let i=[];for(let r=0;r<e.length;r++)i.push({percent:e[r][0]/100,color:this.adjustColor(t,e[r][1])});let r="gr"+this._gradientId++;return this.createGradient(r,"radial",i),r}createGradient(t,e,i){this._renderers.createGradient(this,t,e,i)}refresh(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);for(let t in this._elements){let e=this._elements[t];this._renderers.setFillStyle(this,e),this._renderers.setStroke(this,e),this._renderers[this._elements[t].type](this.ctx,e)}}}),Smart.Utilities.Assign("HTML5RenderHelpers",class{constructor(t){this.HTML5Renderer=t,this._cmds="mlcazq"}ptrnd(t){if(.5===Math.abs(Math.round(t)-t))return t;let e=Math.round(t);return e<t&&(e-=1),e+.5}createGradient(t,e,i,r){t._gradients[e]={orientation:i,colorStops:r}}setStroke(t,e){let i=t.ctx,r=e["stroke-width"];i.strokeStyle=e.stroke||"transparent",i.lineWidth=0===r?.01:void 0!==r?r:1,void 0!==e["fill-opacity"]?i.globalAlpha=e["fill-opacity"]:void 0!==e.opacity?i.globalAlpha=e.opacity:i.globalAlpha=1,i.setLineDash&&(e["stroke-dasharray"]?i.setLineDash(e["stroke-dasharray"].split(",")):i.setLineDash([]))}setFillStyle(t,e){let i=t.ctx;if(i.fillStyle="transparent",void 0!==e["fill-opacity"]?i.globalAlpha=e["fill-opacity"]:void 0!==e.opacity?i.globalAlpha=e.opacity:i.globalAlpha=1,e.fill&&-1===e.fill.indexOf("#")&&t._gradients[e.fill]){let r,s="horizontal"!==t._gradients[e.fill].orientation,n="radial"===t._gradients[e.fill].orientation,h=this.ptrnd(e.x),a=this.ptrnd(e.y),o=this.ptrnd(e.x+(s?0:e.width)),l=this.ptrnd(e.y+(s?e.height:0));if(("circle"===e.type||"path"===e.type||"rect"===e.type)&&n){let t=this.ptrnd(e.x),s=this.ptrnd(e.y);const n=e.innerRadius||0,h=e.outerRadius||e.r||0;"rect"===e.type&&(t+=e.width/2,s+=e.height/2),r=i.createRadialGradient(t,s,n,t,s,h)}n||((isNaN(h)||isNaN(o)||isNaN(a)||isNaN(l))&&(h=0,a=0,o=s?0:i.canvas.width,l=s?i.canvas.height:0),r=i.createLinearGradient(h,a,o,l));let d=t._gradients[e.fill].colorStops;for(let t=0;t<d.length;t++)r.addColorStop(d[t].percent,d[t].color);i.fillStyle=r}else e.fill&&(i.fillStyle=e.fill)}rect(t,e){0!==e.width&&0!==e.height&&(t.fillRect(this.ptrnd(e.x),this.ptrnd(e.y),e.width,e.height),t.strokeRect(this.ptrnd(e.x),this.ptrnd(e.y),e.width,e.height))}circle(t,e){0!==e.r&&(t.beginPath(),t.arc(this.ptrnd(e.x),this.ptrnd(e.y),e.r,0,2*Math.PI,!1),t.closePath(),t.fill(),t.stroke())}_parsePoint(t){return{x:this._parseNumber(t),y:this._parseNumber(t)}}_parseNumber(t){let e,i=!1;for(e=this._pos;e<t.length;e++)if(t[e]>="0"&&t[e]<="9"||"."===t[e]||"e"===t[e]||"-"===t[e]&&!i||"-"===t[e]&&e>=1&&"e"===t[e-1])i=!0;else{if(i||" "!==t[e]&&","!==t[e])break;this._pos++}let r=parseFloat(t.substring(this._pos,e));if(!isNaN(r))return this._pos=e,r}_isRelativeCmd(t){return-1!==this._cmds.indexOf(t)}_parseCmd(t){for(let e=this._pos;e<t.length;e++){if(-1!==this._cmds.toLowerCase().indexOf(t[e].toLowerCase()))return this._pos=e+1,this._lastCmd=t[e],this._lastCmd;if(" "!==t[e]){if(t[e]>="0"&&t[e]<="9"){if(this._pos=e,""===this._lastCmd)break;return this._lastCmd}}else this._pos++}}_toAbsolutePoint(t){return{x:this._currentPoint.x+t.x,y:this._currentPoint.y+t.y}}path(t,e){let i,r=e.d;for(this._pos=0,this._lastCmd="",this._currentPoint={x:0,y:0},t.beginPath();this._pos<r.length;){let e=this._parseCmd(r);if(void 0===e)break;if("M"!==e&&"m"!==e)if("L"!==e&&"l"!==e)if("A"!==e&&"a"!==e)if("Z"!==e&&"z"!==e||void 0===i)if("C"!==e&&"c"!==e)if("Q"!==e&&"q"!==e);else{let e=this._parsePoint(r),i=this._parsePoint(r);t.quadraticCurveTo(e.x,e.y,i.x,i.y),this._currentPoint=i}else{let e=this._parsePoint(r),i=this._parsePoint(r),s=this._parsePoint(r);t.bezierCurveTo(e.x,e.y,i.x,i.y,s.x,s.y),this._currentPoint=s}else t.lineTo(i.x,i.y),this._currentPoint=i;else{let i=this._parseNumber(r),s=this._parseNumber(r),n=this._parseNumber(r)*(Math.PI/180),h=this._parseNumber(r),a=this._parseNumber(r),o=this._parsePoint(r);if(this._isRelativeCmd(e)&&(o=this._toAbsolutePoint(o)),0===i||0===s)continue;let l=this._currentPoint,d={x:Math.cos(n)*(l.x-o.x)/2+Math.sin(n)*(l.y-o.y)/2,y:-Math.sin(n)*(l.x-o.x)/2+Math.cos(n)*(l.y-o.y)/2},c=Math.pow(d.x,2)/Math.pow(i,2)+Math.pow(d.y,2)/Math.pow(s,2);c>1&&(i*=Math.sqrt(c),s*=Math.sqrt(c));let p=(h===a?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(s,2)-Math.pow(i,2)*Math.pow(d.y,2)-Math.pow(s,2)*Math.pow(d.x,2))/(Math.pow(i,2)*Math.pow(d.y,2)+Math.pow(s,2)*Math.pow(d.x,2)));isNaN(p)&&(p=0);let u={x:p*i*d.y/s,y:p*-s*d.x/i},g={x:(l.x+o.x)/2+Math.cos(n)*u.x-Math.sin(n)*u.y,y:(l.y+o.y)/2+Math.sin(n)*u.x+Math.cos(n)*u.y},f=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},m=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(f(t)*f(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(m(t,e))},x=_([1,0],[(d.x-u.x)/i,(d.y-u.y)/s]),M=[(d.x-u.x)/i,(d.y-u.y)/s],y=[(-d.x-u.x)/i,(-d.y-u.y)/s],w=_(M,y);m(M,y)<=-1&&(w=Math.PI),m(M,y)>=1&&(w=0),0===a&&w>0&&(w-=2*Math.PI),1===a&&w<0&&(w+=2*Math.PI);let N=i>s?i:s,v=i>s?1:i/s,b=i>s?s/i:1;t.translate(g.x,g.y),t.rotate(n),t.scale(v,b),t.arc(0,0,N,x,x+w,1-a),t.scale(1/v,1/b),t.rotate(-n),t.translate(-g.x,-g.y)}else{let e=this._parsePoint(r);if(void 0===e)break;t.lineTo(e.x,e.y),this._currentPoint=e}else{let e=this._parsePoint(r);if(void 0===e)break;t.moveTo(e.x,e.y),this._currentPoint=e,void 0===i&&(i=e)}}t.fill(),t.stroke(),t.closePath()}text(t,e){let i=this.ptrnd(e.x),r=this.ptrnd(e.y),s=this.ptrnd(e.width),n=this.ptrnd(e.height),h=e.halign,a=e.valign,o=e.angle,l=e.rotateAround,d=e.textPartsInfo,c=d.parts,p=e.clip;void 0===p&&(p=!0),t.save(),h||(h="center"),a||(a="center"),p&&(t.rect(i,r,s,n),t.clip());let u=e.textWidth,g=e.textHeight,f=s||0,m=n||0;if(t.fillStyle=e.color,t.font=e.fontWeight+" "+e.fontSize+" "+e.fontFamily,!o||0===o){r+=g,"center"===a||"middle"===a?r+=(m-g)/2:"bottom"===a&&(r+=m-g),s||(s=u),n||(n=g);let e=0;for(let s=c.length-1;s>=0;s--){let n=c[s],a=i,o=c[s].width;"center"===h?a+=(f-o)/2:"right"===h&&(a+=f-o),t.fillText(n.text,a,r+e),e-=n.height+(s>0?4:0)}return void t.restore()}let _=this.HTML5Renderer.alignTextInRect(i,r,s,n,u,g,h,a,o,l);i=_.x,r=_.y;let x=o*Math.PI*2/360;t.translate(i,r),t.rotate(x);let M=0,y=d.width;for(let e=c.length-1;e>=0;e--){let i=0;"center"===h?i+=(y-c[e].width)/2:"right"===h&&(i+=y-c[e].width),t.fillText(c[e].text,i,M),M-=c[e].height+4}t.restore()}}),Smart.Utilities.Assign("Plot",class{constructor(t){this.renderer=t}get(t,e,i){return void 0!==i?t[e][i]:t[e]}min(t,e){let i=NaN;for(let r=0;r<t.length;r++){let s=this.get(t,r,e);(isNaN(i)||s<i)&&(i=s)}return i}max(t,e){let i=NaN;for(let r=0;r<t.length;r++){let s=this.get(t,r,e);(isNaN(i)||s>i)&&(i=s)}return i}sum(t,e){let i=0;for(let r=0;r<t.length;r++){let s=this.get(t,r,e);isNaN(s)||(i+=s)}return i}count(t,e){let i=0;for(let r=0;r<t.length;r++){let s=this.get(t,r,e);isNaN(s)||i++}return i}avg(t,e){return this.sum(t,e)/Math.max(1,this.count(t,e))}filter(t,e){if(!e)return t;let i=[];for(let r=0;r<t.length;r++)e(t[r])&&i.push(t[r]);return i}scale(t,e,i,r){if(isNaN(t))return NaN;if((t<Math.min(e.min,e.max)||t>Math.max(e.min,e.max))&&(!r||!0!==r.ignore_range))return NaN;let s=NaN,n=1;if(void 0===e.type||"logarithmic"!==e.type){let i=Math.abs(e.max-e.min);i||(i=1),n=Math.abs(t-Math.min(e.min,e.max))/i}else if("logarithmic"===e.type){let i=e.base;isNaN(i)&&(i=10);let r=Math.min(e.min,e.max);r<=0&&(r=1);let s=Math.max(e.min,e.max);s<=0&&(s=1);let h=Math.log(s)/Math.log(i);s=Math.pow(i,h);let a=Math.log(r)/Math.log(i);r=Math.pow(i,a);let o=Math.log(t)/Math.log(i);n=Math.abs(o-a)/(h-a)}if("logarithmic"===i.type){let t=i.base;isNaN(t)&&(t=10);let e=Math.log(i.max)/Math.log(t),r=Math.log(i.min)/Math.log(t);i.flip&&(n=1-n);let h=Math.min(r,e)+n*Math.abs(e-r);s=Math.pow(t,h)}else s=Math.min(i.min,i.max)+n*Math.abs(i.max-i.min),i.flip&&(s=Math.max(i.min,i.max)-s+i.min);return s}axis(t,e,i){if(i<=1)return[e,t];(isNaN(i)||i<2)&&(i=2);let r=0;for(;Math.round(t)!==t&&Math.round(e)!==e&&r<10;)t*=10,e*=10,r++;let s=(e-t)/i;for(;r<10&&Math.round(s)!==s;)t*=10,e*=10,s*=10,r++;let n,h=[1,2,5],a=0;for(;;){let t=a%h.length,e=Math.floor(a/h.length),i=Math.pow(10,e)*h[t];if(t=(a+1)%h.length,e=Math.floor((a+1)/h.length),n=Math.pow(10,e)*h[t],s>=i&&s<n)break;a++}let o=n,l=[],d=this.renderer._rnd(t,o,!1),c=r<=0?1:Math.pow(10,r);for(;d<e+o;)l.push(d/c),d+=o;return l}});
/***/ }),
/***/ 6321:
/***/ (() => {
!function(){const e="16.0.0",t=[];let n="Smart";if(window[n]&&window[n].Version){if(window[n].Version===e)return;if(window[n].Version!==e)n+=e;else{let e=2;for(;window[n];)n+=e.toString(),e++}}const r=navigator.userAgent.indexOf("Edge")>-1&&navigator.appVersion.indexOf("Edge")>-1;document.elementsFromPoint||(document.elementsFromPoint=document.msElementsFromPoint);class o{static isBoolean(e){return"boolean"==typeof e}static isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)}static isArray(e){return Array.isArray(e)}static isObject(e){return e&&("object"==typeof e||this.isFunction(e))||!1}static isDate(e){return e instanceof Date}static isString(e){return"string"==typeof e}static isNumber(e){return"number"==typeof e}static getType(e){const t=this,n=["Boolean","Number","String","Function","Array","Date","Object"].find((n=>{if(t["is"+n](e))return n}));return n?n.toLowerCase():void 0}}class i{static animate(e,t,r,o){const i=e;if(!i||i instanceof HTMLElement==0)return;if(0===i.getElementsByClassName("smart-ripple").length){const e=document.createElement("span");e.classList.add("smart-ripple"),e.setAttribute("role","presentation");let t=!0,r=null;if(window[n].EnableShadowDOM&&i.enableShadowDOM&&!0!==i.isInShadowDOM){for(let e=0;e<i.shadowRoot.host.shadowRoot.children.length;e++)"link"!==i.shadowRoot.host.shadowRoot.children[e].tagName.toLowerCase()&&(r=i.shadowRoot.host.shadowRoot.children[e]);i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple")&&(t=!1)}else r=i.firstElementChild;t&&(r&&!r.noRipple&&r.offsetHeight>0?r.appendChild(e):i.appendChild(e))}let s=null;if(s=window[n].EnableShadowDOM&&i.shadowRoot?i.shadowRoot.host.shadowRoot.querySelector(".smart-ripple"):i.getElementsByClassName("smart-ripple")[0],!s)return;s.innerHTML="",s.classList.remove("smart-animate"),s.style.height=s.style.width=Math.max(i.offsetHeight,i.offsetWidth)+"px";const a=window.getComputedStyle(s.parentElement),l=parseInt(a.borderLeftWidth)||0,d=parseInt(a.borderTopWidth)||0,c=i.getBoundingClientRect(),u=t-(c.left+window.pageXOffset)-s.offsetWidth/2-l,p=r-(c.top+window.pageYOffset)-s.offsetHeight/2-d;s.style.left=u+"px",s.style.top=p+"px",s.classList.add("smart-animate"),s.addEventListener("animationend",(function e(){s.parentElement&&s.parentElement.removeChild(s),o&&o(),s.removeEventListener("animationend",e),s.removeEventListener("animationcancel",e)})),s.addEventListener("animationcancel",(function e(){s.parentElement&&s.parentElement.removeChild(s),o&&o(),s.removeEventListener("animationcancel",e),s.removeEventListener("animationend",e)}))}}class s{static easeInQuad(e,t,n,r){return n*(e/=r)*e+t}static easeOutQuad(e,t,n,r){return-n*(e/=r)*(e-2)+t}static easeInOutQuad(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}static easeInCubic(e,t,n,r){return n*(e/=r)*e*e+t}static easeOutCubic(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}static easeInOutCubic(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t}static easeInQuart(e,t,n,r){return n*(e/=r)*e*e*e+t}static easeOutQuart(e,t,n,r){return-n*((e=e/r-1)*e*e*e-1)+t}static easeInOutQuart(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e+t:-n/2*((e-=2)*e*e*e-2)+t}static easeInQuint(e,t,n,r){return n*(e/=r)*e*e*e*e+t}static easeOutQuint(e,t,n,r){return n*((e=e/r-1)*e*e*e*e+1)+t}static easeInOutQuint(e,t,n,r){return(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t}static easeInSine(e,t,n,r){return-n*Math.cos(e/r*(Math.PI/2))+n+t}static easeOutSine(e,t,n,r){return n*Math.sin(e/r*(Math.PI/2))+t}static easeInOutSine(e,t,n,r){return-n/2*(Math.cos(Math.PI*e/r)-1)+t}static easeInExpo(e,t,n,r){return 0===e?t:n*Math.pow(2,10*(e/r-1))+t}static easeOutExpo(e,t,n,r){return e===r?t+n:n*(1-Math.pow(2,-10*e/r))+t}static easeInOutExpo(e,t,n,r){return 0===e?t:e===r?t+n:(e/=r/2)<1?n/2*Math.pow(2,10*(e-1))+t:n/2*(2-Math.pow(2,-10*--e))+t}static easeInCirc(e,t,n,r){return-n*(Math.sqrt(1-(e/=r)*e)-1)+t}static easeOutCirc(e,t,n,r){return n*Math.sqrt(1-(e=e/r-1)*e)+t}static easeInOutCirc(e,t,n,r){return(e/=r/2)<1?-n/2*(Math.sqrt(1-e*e)-1)+t:n/2*(Math.sqrt(1-(e-=2)*e)+1)+t}static easeInElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),-s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)+t)}static easeOutElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),s*Math.pow(2,-10*e)*Math.sin((e*r-o)*(2*Math.PI)/i)+n+t)}static easeInOutElastic(e,t,n,r){let o=1.70158,i=0,s=n;return 0===e?t:2==(e/=r/2)?t+n:(i||(i=r*(.3*1.5)),s<Math.abs(n)?(s=n,o=i/4):o=i/(2*Math.PI)*Math.asin(n/s),e<1?s*Math.pow(2,10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)*-.5+t:s*Math.pow(2,-10*(e-=1))*Math.sin((e*r-o)*(2*Math.PI)/i)*.5+n+t)}static easeInBack(e,t,n,r,o){return void 0===o&&(o=1.70158),n*(e/=r)*e*((o+1)*e-o)+t}static easeOutBack(e,t,n,r,o){return void 0===o&&(o=1.70158),n*((e=e/r-1)*e*((o+1)*e+o)+1)+t}static easeInOutBack(e,t,n,r,o){return void 0===o&&(o=1.70158),(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t}static easeInBounce(e,t,n,r){return n-this.easeOutBounce(r-e,0,n,r)+t}static easeOutBounce(e,t,n,r){return(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t}static easeInOutBounce(e,t,n,r){return e<r/2?.5*this.easeInBounce(2*e,0,n,r)+t:.5*this.easeOutBounce(2*e-r,0,n,r)+.5*n+t}}class a{static get isMobile(){const e=/(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());return e||["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}static get Browser(){let e;const t=function(t){let n=t.indexOf(e);if(-1===n)return;const r=t.indexOf("rv:");return"Trident"===e&&-1!==r?parseFloat(t.substring(r+3)):parseFloat(t.substring(n+e.length+1))};let n={};return n[function(){const t=[{string:navigator.userAgent,subString:"Edge",identity:"Edge"},{string:navigator.userAgent,subString:"MSIE",identity:"IE"},{string:navigator.userAgent,subString:"Trident",identity:"IE"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"Opera",identity:"Opera"},{string:navigator.userAgent,subString:"OPR",identity:"Opera"},{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"Safari",identity:"Safari"}];for(let n=0;n<t.length;n++){let r=t[n].string;if(e=t[n].subString,-1!==r.indexOf(t[n].subString))return t[n].identity}return"Other"}()]=!0,n.version=t(navigator.userAgent)||t(navigator.appVersion)||"Unknown",n}static toCamelCase(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}static toDash(e){return e.split(/(?=[A-Z])/).join("-").toLowerCase()}static unescapeHTML(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}static escapeHTML(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=\/]/g,(e=>t[e]))}static sanitizeHTML(e){if(e&&(e.indexOf("onclick")>=0||e.indexOf("onload")>=0||e.indexOf("onerror")>=0))return this.escapeHTML(e);const t=new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>","ig");return String(e).replace(t,(e=>this.escapeHTML(e)))}static createGUID(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}static getScriptLocation(){return"./"!==window[n].BaseUrl?window[n].BaseUrl:function(){if(document.currentScript){let e=document.currentScript.src,t=e.lastIndexOf("/");return e=e.substring(0,t),e}const e=new Error;let t="(",n=")";if(Smart.Utilities.Core.Browser.Safari&&(t="@",n="\n"),e.fileName)return e.fileName.replace("/smart.element.js","");let r=e.stack.split(t);return r=r[1],r=r.split(n)[0],r=r.split(":"),r.splice(-2,2),r=r.join(":"),r.replace("/smart.element.js","")}()}static CSSVariablesSupport(){return window.CSS&&window.CSS.supports&&window.CSS.supports("(--fake-var: 0)")}static assign(e,t){const n=e=>e&&"object"==typeof e&&!Array.isArray(e)&&null!==e;let r=Object.assign({},e);return n(e)&&n(t)&&Object.keys(t).forEach((o=>{n(t[o])?o in e?r[o]=this.assign(e[o],t[o]):Object.assign(r,{[o]:t[o]}):Object.assign(r,{[o]:t[o]})})),r}static html(e,t){const n=this;let r="",o=e.childNodes;if(!t){for(let e,t=0,i=o.length;t<i&&(e=o[t]);t++){const t=["strong"];if(e instanceof HTMLElement||e.tagName&&t.indexOf(e.tagName.toLowerCase())>=0){const t=e.tagName.toLowerCase(),o=e.attributes;let i="<"+t;for(let e,t=0;e=o[t];t++)i+=" "+e.name+'="'+e.value.replace(/[&\u00A0"]/g,y.Core.escapeHTML)+'"';i+=">",["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"][t]&&(r+=i),r=r+i+n.html(e)+"</"+t+">"}else{if(8===e.nodeType)continue;r+=e.textContent.replace(/[&\u00A0<>]/g,y.Core.escapeHTML)}}return r}{const n=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;e.innerHTML=t.replace(n,"<$1></$2>")}}}let l=[];class d{static watch(e){switch(e.nodeName.toLowerCase()){case"smart-grid":case"smart-kanban":case"smart-table":case"smart-pivot-table":case"smart-scheduler":case"smart-tabs":case"smart-card-view":case"smart-list-box":case"smart-combo-box":case"smart-drop-down-list":case"smart-calendar":case"smart-gauge":case"smart-numeric-text-box":case"smart-menu":case"smart-tree":l.push(e);break;default:return}d.start()}static start(){d.isStarted||(d.isStarted=!0,d.interval&&clearInterval(d.interval),0===l.length||document.hidden?d.isStarted=!1:d.interval=setInterval((function(){d.observe()}),100))}static stop(){d.isStarted=!1,d.interval&&clearInterval(d.interval)}static observeElement(e){const t=e;if("test"===window.Smart.Mode||document.hidden)return void(d.interval&&clearInterval(d.interval));let n=e._computedStyle||"resize"!==t.hasStyleObserver?document.defaultView.getComputedStyle(t,null):{},r=!0,o="resize"!==t.hasStyleObserver?["paddingLeft","paddingRight","paddingTop","paddingBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","display","visibility","font-size","font-family","font-style","font-weight","max-height","min-height","max-width","min-width","overflow","overflow-x","overflow-y"]:[];if(e.styleProperties&&(o=o.concat(e.styleProperties)),e.observableStyleProperties&&(o=e.observableStyleProperties),!t._styleInfo){t._styleInfo=[];for(let e=0;e<o.length;e++){const r=o[e],i=r.startsWith("--")?n.getPropertyValue(r):n[r];t._styleInfo[r]=i}return}if(e.isHidden||"none"!==n.display&&(0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0)),e.isHidden){if(e.visibilityChangedHandler(),e.isHidden)return;r=!1}let i=[];for(let e=0;e<o.length;e++){const r=o[e],s=r.startsWith("--")?n.getPropertyValue(r):n[r];t._styleInfo[r]!==s&&(i[r]={oldValue:t._styleInfo[r],value:s},i.length++),t._styleInfo[r]=s}i.length>0&&(t.$.fireEvent("styleChanged",{styleProperties:i},{bubbles:!1,cancelable:!0}),i.display&&r&&t.$.fireEvent("resize",t,{bubbles:!1,cancelable:!0}))}static observe(){for(let e=0;e<l.length;e++){const t=l[e];this.observeElement(t)}}static unwatch(e){d.stop();const t=l.indexOf(e);-1!==t&&l.splice(t,1),d.start()}}let c=[];const u=[],p=["resize","down","up","move","tap","taphold","swipeleft","swiperight","swipetop","swipebottom"];class h{constructor(e){const t=this;t.target=e,t.$target=new f(e),t.$document=e.$document?e.$document:new f(document),t.id=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase();let n={handlers:{},boundEventTypes:[],listen:t.listen.bind(t),unlisten:t.unlisten.bind(t)};return t.tapHoldDelay=750,t.swipeMin=10,t.swipeMax=5e3,t.swipeDelay=1e3,t.tapHoldDelay=750,t.inputEventProperties=["clientX","clientY","pageX","pageY","screenX","screenY"],p.forEach((e=>{n[e]=t=>{n.handlers[e]=t},t[e]=e=>{if(!n.handlers[e.type]){if(("mousemove"===e.type||"pointermove"===e.type||"touchmove"===e.type)&&n.handlers.move){const r=t.createEvent(e,"move");n.handlers.move(r)}return!0}return n.handlers[e.type](e)}})),t.listen(),t.handlers=n.handlers,n}listen(e){const t=this;if("resize"===e&&t.target!==document&&t.target!==window&&!1!==t.target.hasResizeObserver)if(Smart.Utilities.Core.Browser.Firefox){if(!t.target.resizeObserver){let e,n,r,o=!1,i=t.target.offsetWidth,s=t.target.offsetHeight;const a=new ResizeObserver((()=>{if(!o)return void(o=!0);const a=new CustomEvent("resize",{bubbles:!1,cancelable:!0});n=t.target.offsetWidth,r=t.target.offsetHeight,e=n!==i||r!==s,t.target.requiresLayout&&(e=!0),e&&(t.resize(a),t.target.requiresLayout=!1)}));a.observe(t.target),t.target.resizeObserver=a}}else if(!t.target.resizeTrigger){const e=document.createElement("div");e.className="smart-resize-trigger-container",e.innerHTML='<div class="smart-resize-trigger-container"><div class="smart-resize-trigger"></div></div><div class="smart-resize-trigger-container"><div class="smart-resize-trigger-shrink"></div></div>',e.setAttribute("aria-hidden",!0),window[n].EnableShadowDOM&&t.target.shadowRoot?t.target.shadowRoot.appendChild(e):t.target.appendChild(e),t.target.resizeTrigger=e;const r=e.childNodes[0],o=r.childNodes[0],i=e.childNodes[1],s=function(){o.style.width="100000px",o.style.height="100000px",r.scrollLeft=1e5,r.scrollTop=1e5,i.scrollLeft=1e5,i.scrollTop=1e5};let a,l,d,c,u=t.target.offsetWidth,p=t.target.offsetHeight;if(0===u||0===p){const e=function(){s(),t.target.removeEventListener("resize",e)};t.target.addEventListener("resize",e),s()}else s();t.target.resizeHandler=function(){l||(l=requestAnimationFrame((function(){if(l=0,d=t.target.offsetWidth,c=t.target.offsetHeight,a=d!==u||c!==p,t.target.requiresLayout&&(a=!0),!a)return;u=d,p=c;const e=new CustomEvent("resize",{bubbles:!1,cancelable:!0});t.resize(e),t.target.requiresLayout=!1}))),s()},r.addEventListener("scroll",t.target.resizeHandler),i.addEventListener("scroll",t.target.resizeHandler)}t.isListening||(t.isListening=!0,t.isPressed=!1,t.isReleased=!1,t.isInBounds=!1,window.PointerEvent?(t.$target.listen("pointerdown.inputEvents"+t.id,t.pointerDown.bind(t)),t.$target.listen("pointerup.inputEvents"+t.id,t.pointerUp.bind(t)),t.$target.listen("pointermove.inputEvents"+t.id,t.pointerMove.bind(t)),t.$target.listen("pointercancel.inputEvents"+t.id,t.pointerCancel.bind(t))):("ontouchstart"in window&&(t.$target.listen("touchmove.inputEvents"+t.id,t.touchMove.bind(t)),t.$target.listen("touchstart.inputEvents"+t.id,t.touchStart.bind(t)),t.$target.listen("touchend.inputEvents"+t.id,t.touchEnd.bind(t)),t.$target.listen("touchcancel.inputEvents"+t.id,t.touchCancel.bind(t))),t.$target.listen("mousedown.inputEvents"+t.id,t.mouseDown.bind(t)),t.$target.listen("mouseup.inputEvents"+t.id,t.mouseUp.bind(t)),t.$target.listen("mousemove.inputEvents"+t.id,t.mouseMove.bind(t)),t.$target.listen("mouseleave.inputEvents"+t.id,t.mouseLeave.bind(t))),t.target._handleDocumentUp||(t.target._handleDocumentUp=t.handleDocumentUp.bind(t),t.target._handleDocumentUpId=t.id,t.$document.listen("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp)))}unlisten(e){const t=this;if(t.isListening=!1,window.PointerEvent?(t.$target.unlisten("pointerdown.inputEvents"+t.id),t.$target.unlisten("pointerup.inputEvents"+t.id),t.$target.unlisten("pointermove.inputEvents"+t.id),t.$target.unlisten("pointercancel.inputEvents"+t.id)):("ontouchstart"in window&&(t.$target.unlisten("touchstart.inputEvents"+t.id),t.$target.unlisten("touchmove.inputEvents"+t.id),t.$target.unlisten("touchend.inputEvents"+t.id),t.$target.unlisten("touchcancel.inputEvents"+t.id)),t.$target.unlisten("mousedown.inputEvents"+t.id),t.$target.unlisten("mouseup.inputEvents"+t.id),t.$target.unlisten("mousemove.inputEvents"+t.id),t.$target.unlisten("mouseleave.inputEvents"+t.id)),t.target._handleDocumentUp&&(t.$document.unlisten("mouseup.inputEvents"+t.target._handleDocumentUpId,t.target._handleDocumentUp),delete t.target._handleDocumentUp,delete t.target._handleDocumentUpId),"resize"===e)if(Smart.Utilities.Core.Browser.Firefox)t.target.resizeObserver&&(t.target.resizeObserver.unobserve(t.target),delete t.target.resizeObserver);else if(t.target.resizeTrigger){const e=t.target.resizeTrigger,n=e.childNodes[0],r=e.childNodes[1];n.removeEventListener("scroll",t.target.resizeHandler),r.removeEventListener("scroll",t.target.resizeHandler),t.target.resizeHandler=null,e.parentNode.removeChild(e),delete t.target.resizeTrigger}}handleDocumentUp(e){const t=this;t.isPressed=!1,t.isReleased=!1,t.resetSwipe(e)}createEvent(e,t){const n=this,r=e.touches,o=e.changedTouches,i=r&&r.length?r[0]:o&&o.length?o[0]:void 0,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:void 0!==n.$target.element.getRootNode().host});if(s.originalEvent=e,i){for(let e=0;e<n.inputEventProperties.length;e++){const t=n.inputEventProperties[e];s[t]=i[t]}return s}for(let t in e)t in s||(s[t]=e[t]);return s}fireTap(e){const t=this;if(clearTimeout(this.tapHoldTimeout),!this.tapHoldFired&&this.isInBounds){const n=t.createEvent(e,"tap");t.tap(n)}}initTap(e){const t=this;t.isInBounds=!0,t.tapHoldFired=!1,t.tapHoldTimeout=setTimeout((function(){if(t.isInBounds){t.tapHoldFired=!0;const n=t.createEvent(e,"taphold");t.taphold(n)}}),t.tapHoldDelay)}pointerDown(e){return this.handleDown(e)}mouseDown(e){const t=this;if(!(t.isPressed||t.touchStartTime&&new Date-t.touchStartTime<500))return t.handleDown(e)}touchStart(e){const t=this;return t.touchStartTime=new Date,t.isTouchMoved=!0,t.handleDown(e)}mouseUp(e){const t=this;if(!(t.isReleased||t.touchEndTime&&new Date-t.touchEndTime<500))return t.handleUp(e)}handleDown(e){const t=this;t.isReleased=!1,t.isPressed=!0;const n=t.createEvent(e,"down");return(t.handlers.tap||t.handlers.taphold)&&t.initTap(n),(t.handlers.swipeleft||t.handlers.swiperight||t.handlers.swipetop||t.handlers.swipebottom)&&t.initSwipe(n),t.down(n)}handleUp(e){const t=this;t.isReleased=!0,t.isPressed=!1;const n=t.createEvent(e,"up"),r=t.up(n);return(t.handlers.tap||t.handlers.taphold)&&t.fireTap(n),t.resetSwipe(n),r}handleMove(e){const t=this;let n=t.move(e);return t.isPressed&&(t._maxSwipeVerticalDistance=Math.max(t._maxSwipeVerticalDistance,Math.abs(t._startY-e.pageY)),t._maxSwipeHorizontalDistance=Math.max(t._maxSwipeHorizontalDistance,Math.abs(t._startX-e.pageX)),n=t.handleSwipeEvents(e)),n}touchEnd(e){return this.touchEndTime=new Date,this.handleUp(e)}pointerUp(e){return this.handleUp(e)}pointerCancel(e){this.pointerUp(e)}touchCancel(e){this.touchEnd(e)}mouseLeave(){this.isInBounds=!1}mouseMove(e){if(!this.isTouchMoved)return this.handleMove(e)}pointerMove(e){return this.handleMove(e)}touchMove(e){const t=this,n=e.touches,r=e.changedTouches,o=n&&n.length?n[0]:r&&r.length?r[0]:void 0;for(let n=0;n<t.inputEventProperties.length;n++){const r=t.inputEventProperties[n];void 0===e[r]&&(e[r]=o[r])}return t.isTouchMoved=!0,t.handleMove(e)}handleSwipeEvents(e){const t=this;let n=!0;return(t.handlers.swipetop||t.handlers.swipebottom)&&(n=this.handleVerticalSwipeEvents(e)),!1===n||(t.handlers.swipeleft||t.handlers.swiperight)&&(n=this.handleHorizontalSwipeEvents(e)),n}handleVerticalSwipeEvents(e){let t,n;return t=e.pageY,n=t-this._startY,this.swiped(e,n,"vertical")}handleHorizontalSwipeEvents(e){let t,n;return t=e.pageX,n=t-this._startX,this.swiped(e,n,"horizontal")}swiped(e,t,n){const r=this;if(n=n||0,Math.abs(t)>=r.swipeMin&&!r._swipeEvent&&!r._swipeLocked){let o=t<0?"swipeleft":"swiperight";if("horizontal"===n?r._swipeEvent=r.createEvent(e,o):(o=t<0?"swipetop":"swipebottom",r._swipeEvent=r.createEvent(e,t<0?"swipetop":"swipebottom")),r[o]&&(r[o](this._swipeEvent),Math.abs(t)<=this.swipeMax))return e.stopImmediatePropagation(),!1}return!0}resetSwipe(){this._swipeEvent=null,clearTimeout(this._swipeTimeout)}initSwipe(e){const t=this;t._maxSwipeVerticalDistance=0,t._maxSwipeHorizontalDistance=0,t._startX=e.pageX,t._startY=e.pageY,t._swipeLocked=!1,t._swipeEvent=null,t._swipeTimeout=setTimeout((function(){t._swipeLocked=!0}),t.swipeDelay)}}class m{get scrollWidth(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.max:-1}set scrollWidth(e){const t=this;e<0&&(e=0),t.horizontalScrollBar&&(t.horizontalScrollBar.max=e)}get scrollHeight(){const e=this;return e.verticalScrollBar?e.verticalScrollBar.max:-1}set scrollHeight(e){const t=this;e<0&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.max=e)}get scrollLeft(){const e=this;return e.horizontalScrollBar?e.horizontalScrollBar.value:-1}set scrollLeft(e){const t=this;e<0&&(e=0),t.horizontalScrollBar&&(t.horizontalScrollBar.value=e)}get scrollTop(){const e=this;return e.verticalScrollBar?e.verticalScrollBar.value:-1}set scrollTop(e){const t=this;e<0&&(e=0),t.verticalScrollBar&&(t.verticalScrollBar.value=e)}get vScrollBar(){return this.verticalScrollBar}get hScrollBar(){return this.horizontalScrollBar}constructor(e,t,n){const r=this;r.container=e,r.horizontalScrollBar=t,r.verticalScrollBar=n,r.disableSwipeScroll=!1,r.listen()}listen(){const e=this,t=a.isMobile,n=e.horizontalScrollBar,r=e.verticalScrollBar;let o,i,s,l,d,c,u,p;e.inputEvents=new h(e.container);const m=function(e){return{amplitude:0,delta:0,initialValue:0,min:0,max:e.max,previousValue:0,pointerPosition:0,targetValue:0,scrollBar:e,value:0,velocity:0}},f=m(n),g=m(r),w=function(){const t=e.container.touchVelocityCoefficient||50;c=Date.now(),u=c-l,l=c;const n=function(e){e.delta=e.value-e.previousValue,e.previousValue=e.value;let n=t*e.delta/(1+u);e.velocity=.8*n+.2*e.velocity};n(g),n(f)},b=function(e){return p.value=e>p.max?p.max:e<p.min?p.min:e,p.scrollBar.value=p.value,e>p.max?"max":e<p.min?"min":"value"};function v(){let t,n;p.amplitude&&(e.container.$.fireEvent("kineticScroll"),t=Date.now()-l,n=-p.amplitude*Math.exp(-t/500),n>5||n<-5?(b(p.targetValue+n),cancelAnimationFrame(i),i=0,i=requestAnimationFrame(v)):b(p.targetValue))}let _;e.inputEvents.down((function(n){if(!t)return;const r=n.originalEvent.target,i=r&&r.closest?r.closest("smart-scroll-bar"):void 0;if(i===e.horizontalScrollBar||i===e.verticalScrollBar)return;s=!0,o=!1;const a=function(e,t){e.amplitude=0,e.pointerPosition=t,e.previousValue=e.value,e.value=e.scrollBar.value,e.initialValue=e.value,e.max=e.scrollBar.max};a(g,n.clientY),a(f,n.clientX),l=Date.now(),clearInterval(d),d=setInterval(w,500)})),e.inputEvents.up((function(){if(!s)return!0;if(clearInterval(d),e.disableSwipeScroll)return void(s=!1);const t=function(e){p=e,e.amplitude=.8*e.velocity,e.targetValue=Math.round(e.value+e.amplitude),l=Date.now(),cancelAnimationFrame(i),i=requestAnimationFrame(v),e.velocity=0};g.velocity>10||g.velocity<-10?t(g):(f.velocity>10||f.velocity<-10)&&t(f),s=!1})),e.inputEvents.move((function(t){if(!s)return!0;if(e.disableSwipeScroll)return;if(o&&(t.originalEvent.preventDefault(),t.originalEvent.stopPropagation()),f.visible=e.scrollWidth>0,g.visible=e.scrollHeight>0,!s||!f.visible&&!g.visible)return;const n=e.container.touchScrollRatio,r=e.container;let i,a;n&&("number"==typeof n?(i=-n,a=-n):"function"==typeof n&&(i=n(g.max,r.offsetHeight),a=n(f.max,r.offsetWidth))),g.ratio=i||-g.max/r.offsetHeight,g.delta=(t.clientY-g.pointerPosition)*g.ratio,f.ratio=a||-f.max/r.offsetWidth,f.delta=(t.clientX-f.pointerPosition)*f.ratio;let l="value";const d=function(t,n,r){return t.delta>5||t.delta<-5?(p=t,l=t.initialValue+t.delta>p.max?"max":t.initialValue+t.delta<p.min?"min":"value","min"===l&&0===t.initialValue||"max"===l&&t.initialValue===t.max||!t.visible||(e.container.$.fireEvent("kineticScroll"),b(t.initialValue+t.delta),w(),r.originalEvent.preventDefault(),r.originalEvent.stopPropagation(),o=!0,!1)):null};let c=d(g,t.clientY,t);if(null!==c)return c;{let e=d(f,t.clientX,t);if(null!==e)return e}})),e.scrollTo=function(t,n){const r=!1===n?f:g;let o=!1;l||(l=Date.now()),_||(_=Date.now()),Math.abs(Date.now()-_)>375?l=Date.now():o=!0,_=Date.now(),r.value=r.scrollBar.value,r.delta=t-r.value,r.max=r.scrollBar.max,t<=r.min&&(t=r.min),t>=r.max&&(t=r.max),r.targetValue=t;const s=t;let a=r.value;r.velocity=100*r.delta/(1+r.max),r.from=a;const d=function(e){return r.value=e>r.max?r.max:e<r.min?r.min:e,r.scrollBar.value=r.value,e>r.max?"max":e<r.min?"min":"value"},c=function(){let n,u=Date.now()-_,p=Math.min(1e3,Date.now()-l),h=r.velocity*Math.exp(p/175);if(o)(h<0&&r.value<=t||h>0&&r.value>=t)&&(h=0),(r.value+h<=r.min||r.value+h>=r.max)&&(h=0),h>.5||h<-.5?(d(r.value+h),cancelAnimationFrame(i),i=0,i=requestAnimationFrame(c)):d(r.targetValue);else{if(u>=175)return cancelAnimationFrame(i),e.container.$.fireEvent("kineticScroll"),void(i=0);n=y.Animation.Easings.easeInSine(u,a,s-a,175),d(n),cancelAnimationFrame(i),i=0,i=requestAnimationFrame(c)}};cancelAnimationFrame(i),i=requestAnimationFrame(c)},e.inputEvents.listen()}unlisten(){const e=this;e.inputEvents&&e.inputEvents.unlisten(),delete e.inputEvents}}class f{constructor(e){this.events={},this.handlers={},this.element=e}hasClass(e){const t=this,n=e.split(" ");for(let e=0;e<n.length;e++)if(!t.element.classList.contains(n[e]))return!1;return!0}addClass(e){const t=this;if(t.hasClass(e))return;const n=e.split(" ");for(let e=0;e<n.length;e++)t.element.classList.add(n[e]);t.isNativeElement||d.observeElement(t.element)}removeClass(e){const t=this;if(0===arguments.length)return void t.element.removeAttribute("class");const n=e.split(" ");for(let e=0;e<n.length;e++)t.element.classList.remove(n[e]);""===t.element.className&&t.element.removeAttribute("class"),t.isNativeElement||d.observeElement(t.element)}get isCustomElement(){const e=this;return!!e.element.tagName.startsWith(n)||e.element instanceof window[n].BaseElement==1||"DIV"!==e.element.tagName&&"SPAN"!==e.element.tagName&&"BUTTON"!==e.element.tagName&&"INPUT"!==e.element.tagName&&"UL"!==e.element.tagName&&"LI"!==e.element.tagName&&document.createElement(e.element.nodeName)instanceof window[n].BaseElement==1}get isNativeElement(){return!this.isCustomElement}dispatch(e){const t=this,n=t.events[e.type];let r=!1;if(n.length>1)for(let e=0;e<n.length;e++){const t=n[e];if(t.namespace&&t.namespace.indexOf("_")>=0){r=!0;break}}r&&n.sort((function(e,t){let n=e.namespace,r=t.namespace;return n=-1===n.indexOf("_")?0:parseInt(n.substring(n.indexOf("_")+1)),r=-1===r.indexOf("_")?0:parseInt(r.substring(r.indexOf("_")+1)),n<r?-1:n>r?1:0}));for(let r=0;r<n.length;r++){const o=n[r];if(e.namespace=o.namespace,e.context=o.context,e.defaultPrevented)break;const i=o.handler.apply(t.element,[e]);if(void 0!==i&&(e.result=i,!1===i)){e.preventDefault(),e.stopPropagation();break}}return e.result}fireEvent(e,t,n){const r=this;n||(n={bubbles:!0,cancelable:!0,composed:null!==r.element.getRootNode().host}),n.detail=t||{};const o=new CustomEvent(e,n);return o.originalStopPropagation=o.stopPropagation,o.stopPropagation=function(){return o.isPropagationStopped=!0,o.originalStopPropagation()},r.dispatchEvent(o),o}get isPassiveSupported(){const e=this;if(void 0!==e.supportsPassive)return e.supportsPassive;e.supportsPassive=!1;try{let t=Object.defineProperty({},"passive",{get:function(){e.supportsPassive=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch(e){}return e.supportsPassive}dispatchEvent(e){const t=this,n=e.type,r=t.element.context,o=n.substring(0,1).toUpperCase()+n.substring(1);t.element.context=document,t.element["on"+o]?t.element["on"+o](e):t.element["on"+n.toLowerCase()]?t.element["on"+n.toLowerCase()](e):t.element.dispatchEvent(e),t.element.context=r}listen(e,t){const n=this,r=e.split("."),o=r.slice(1).join("."),i=r[0];n.events[i]||(n.events[i]=[]);const s={type:i,handler:t,context:n.element,namespace:o};p.indexOf(i)>=0&&(n.inputEvents||(n.inputEvents=new h(n.element)),n.inputEvents[i]((function(e){n.dispatchEvent(e)})),n.inputEvents.boundEventTypes.push(i),n.inputEvents.listen(i)),0===n.events[i].length&&(n.handlers[i]=n.dispatch.bind(n),"wheel"===i?n.element.addEventListener("wheel",n.handlers[i],!!n.isPassiveSupported&&{passive:!1}):"touchmove"===i||"touchstart"===i||"touchend"===i?n.element.addEventListener(i,n.handlers[i],!!n.isPassiveSupported&&{passive:!1}):n.element.addEventListener(i,n.handlers[i],!1)),n.events[i].push(s)}unlisten(e){const t=this,n=e.split("."),r=n.slice(1).join("."),o=n[0];let i=t.events[o];if(t.inputEvents&&t.inputEvents.boundEventTypes.indexOf(o)>=0&&(t.inputEvents.boundEventTypes.splice(t.inputEvents.boundEventTypes.indexOf(o),1),0===t.inputEvents.boundEventTypes.length&&t.inputEvents.unlisten(o)),i){for(let e=0;e<i.length;e++){if(""!==r){let e=i.findIndex((e=>e.namespace===r));i.splice(e,1);break}i=[]}0===i.length&&(t.element.removeEventListener(o,t.handlers[o]),t.events[o]=[],delete t.handlers[o])}}getAttributeValue(e,t){const n=this,r=n.element.getAttribute(e);if(n.isNativeElement)return n.deserialize(r,t);const o=n.element.propertyByAttributeName[e];return void 0===o.deserialize?n.deserialize(r,t,o.nullable):n.element[o.deserialize](r)}setAttributeValue(e,t,n){const r=this;let o,i=!1;if(r.isNativeElement){if(o=r.serialize(t,n),"boolean"===n&&["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(e)>=0)return void(t?r.element.setAttribute(e,""):r.element.removeAttribute(e))}else{const s=r.element.propertyByAttributeName[e];i=!s||s.nullable,o=s&&s.serialize?r.element[s.serialize](t):r.serialize(t,n,i)}"array"!==n&&"object"!==n||"[]"!==o&&"{}"!==o?void 0===o?(r.element.removeAttribute(e),r.element.shadowRoot&&r.element.$.root&&r.element.$.root.removeAttribute(e)):(r.element.setAttribute(e,o),r.element.shadowRoot&&r.element.$.root&&r.element.$.root.setAttribute(e,o)):r.element.removeAttribute(e)}serialize(e,t,n){if(void 0===t&&(t=y.Types.getType(e)),void 0!==e&&(n||null!==e)){if(n&&null===e)return"null";if("string"===t)return e;if("boolean"===t||"bool"===t){if(!0===e||"true"===e||1===e||"1"===e)return"";if(!1===e||"false"===e||0===e||"0"===e)return}return"array"===t?JSON.stringify(e):["string","number","int","integer","float","date","any","function"].indexOf(t)>=0?e.toString():"object"===t?JSON.stringify(e):void 0}}deserialize(e,t,n){const r="null"===e;if(void 0!==e&&(!r||n)){if(r&&n)return null;if("boolean"===t||"bool"===t)return null!==e;if("number"===t||"float"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:parseFloat(e);if("int"===t||"integer"===t)return"NaN"===e?NaN:"Infinity"===e?1/0:"-Infinity"===e?-1/0:parseInt(e);if("string"===t)return e;if("any"===t)return e;if("date"===t)return new Date(e);if("function"===t){if("function"==typeof window[e])return window[e]}else if("array"===t||"object"===t)try{const t=JSON.parse(e);if(t)return t}catch(n){if(window[e]&&"object"==typeof window[e])return window[e];if("array"===t&&e.indexOf("[")>=0){if(e.indexOf("{")>=0){let t=e.replace(/{/gi,"").replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim();t=t.split("},");for(let e=0;e<t.length;e++){let n={},r=t[e].trim().split(",");for(let e=0;e<r.length;e++){const t=r[e].split(":")[0].trim(),o=r[e].split(":")[1].trim();n[t]=o}t[e]=n}return t}return e.replace("[","").replace("]","").replace(/'/gi,"").replace(/"/gi,"").trim().split(",")}}}}}class g{static get Ripple(){return i}static get Easings(){return s}}class y{static get Types(){return o}static get Core(){return a}static get Animation(){return g}static get Scroll(){return m}static get InputEvents(){return h}static Extend(e){return new f(e)}static Assign(e,t){if(e.indexOf(".")>=0){const n=e.split(".");return y[n[0]]||(y[n[0]]={}),void(y[n[0]][n[1]]=t)}y[e]=t}}const w=y.Extend(document);let b=null;document.addEventListener("click",(()=>{d.start(),b&&clearTimeout(b),b=setTimeout((()=>{d.stop()}),1e4)})),document.addEventListener("mouseenter",(()=>{d.start()})),document.addEventListener("mouseleave",(()=>{d.stop()}));class v{}v.cache={};class _ extends HTMLElement{static get properties(){return{animation:{value:"advanced",type:"string",allowedValues:["none","simple","advanced"]},unfocusable:{value:!1,type:"boolean"},disabled:{value:!1,type:"boolean"},dataContext:{value:null,reflectToAttribute:!1,type:"any"},debugMode:{value:!0,type:"boolean",reflectToAttribute:!1},locale:{value:"en",type:"string",reflectToAttribute:!1},localizeFormatFunction:{value:null,type:"any",reflectToAttribute:!1},messages:{value:{en:{propertyUnknownName:"Invalid property name: '{{name}}'!",propertyUnknownType:"'{{name}}' property is with undefined 'type' member!",propertyInvalidValue:"Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!",propertyInvalidValueType:"Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",methodInvalidValueType:"Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!",methodInvalidArgumentsCount:"Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!",methodInvalidReturnType:"Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!",elementNotInDOM:"Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.",moduleUndefined:"Module is undefined.",missingReference:"{{elementType}}: Missing reference to '{{files}}'.",htmlTemplateNotSuported:"{{elementType}}: Web Browser doesn't support HTMLTemplate elements.",invalidTemplate:"{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM."}},reflectToAttribute:!1,inherit:!0,type:"object"},props:{value:null,reflectToAttribute:!1,isHierarchicalProperty:!0,type:"any"},readonly:{value:!1,type:"boolean"},renderMode:{value:"auto",type:"string",reflectToAttribute:!1,allowedValues:["auto","manual"]},rightToLeft:{value:!1,type:"boolean"},rethrowError:{value:!0,type:"boolean",reflectToAttribute:!1},theme:{value:window[n].Theme,type:"string"},visibility:{value:"visible",allowedValues:["visible","collapsed","hidden"],type:"string"},wait:{value:!1,type:"boolean"}}}getBindings(e,t){const n=this;let r=0,o={},i=(e=>{if(e instanceof HTMLElement)return n.parseAttributes(e);{let t=n.parseProperty(e.data?e.data.trim():null,"textContent",e);if(t)return n&&e.parentNode===n.$.content&&(t.value=""!==n.$.html?n.$.html:void 0,n.innerHTML=""),{textContent:t}}})(e);i&&(o.data=i),t||(o.mapping=[],t=o),e.getAttribute&&(o.nodeId=e.getAttribute("smart-id"),t&&i&&(t.mapping[o.nodeId]=i)),o.node=e,e.firstChild&&(o.children={});for(let i=e.firstChild;i;i=i.nextSibling)o.children[r++]=n.getBindings(i,t);return o}_addRemovePropertyBinding(e,t,n,r,o){if(!e||!t||!n)return;const i=this,s=i.bindings,a=n.getAttribute("smart-id"),l=e.indexOf("{{")>=0;let d=!1;(e=e.replace("{{","").replace("}}","").replace("[[","").replace("]]","")).indexOf("!")>=0&&(e=e.replace("!",""),d=!0);const c=i._properties[e],u={name:e,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:d};if(o&&!r){const n={},r={name:e,targetPropertyName:t,reflectToAttribute:c.reflectToAttribute,twoWay:l,type:c.type,not:d};n[e]=r,s.mapping[a]=n}const p=function(e){for(let o in e){const s=e[o];if(s.nodeId===a){s.data||(s.data={}),r?(s.data[t]=null,delete s.data[t]):s.data[t]=u;break}if(s.children)p(s.children);else if(s.node&&s.node.children&&s.node===n.parentElement){const e=s.node;if(!e.firstChild)continue;s.children={};let t=0;for(let n=e.firstChild;n;n=n.nextSibling)s.children[t++]=i.getBindings(n);p(s.children)}}};p(s.children),r?delete i.boundProperties[e]:i.boundProperties[e]=!0,i.updateBoundNodes(e)}addPropertyBinding(e,t,n,r){this._addRemovePropertyBinding(e,t,n,!1,r)}removePropertyBinding(e,t,n,r){this._addRemovePropertyBinding(e,t,n,!0,r)}parseAttributes(e){const t=this;let n;for(let r=0;r<e.attributes.length;r++){const o=e.attributes[r],i=o.name,s=o.value;v.cache["toCamelCase"+i]||(v.cache["toCamelCase"+i]=y.Core.toCamelCase(i));const a=v.cache["toCamelCase"+i];if(i.indexOf("(")>=0){let r=i.substring(1,i.length-1);if(t&&!t.dataContext){t.templateListeners[e.getAttribute("smart-id")+"."+r]=s,e.removeAttribute(i);continue}{n||(n={});const e=s.substring(0,s.indexOf("("));n[a]={isEvent:!0,name:r,value:e};continue}}let l=t.parseProperty(s,i,e);l&&(n||(n={}),n[a]=l)}return n}parseProperty(e,t){if(!e||!e.length)return;const n=this;let r,o=e.length,i=0,s=0,a=0,l=!0;for(;s<o;){i=e.indexOf("{{",s);let t=e.indexOf("[[",s),n="}}";if(t>=0&&(i<0||t<i)&&(i=t,l=!1,n="]]"),a=i<0?-1:e.indexOf(n,i+2),a<0)return;r=r||{};let o=e.slice(i+2,a).trim();r.name=o,s=a+2}const d=r.name,c=n?n._properties[d]:null;return r.twoWay=l,r.ready=!1,n&&(d.indexOf("::")>=0?n.boundProperties[d.substring(0,d.indexOf("::"))]=!0:n.boundProperties[d]=!0),c?(r.type=c.type,r.reflectToAttribute=c.reflectToAttribute):(["checked","selected","async","autofocus","autoplay","controls","defer","disabled","hidden","ismap","loop","multiple","open","readonly","required","scoped"].indexOf(t)>=0?r.type="boolean":r.type="string",r.reflectToAttribute=!0),r}updateTextNodes(){const e=this;e.updateTextNode(e.shadowRoot||e,e.bindings,e)}updateTextNode(e,t,n){const r=this;if(!t)return;let o=0;for(let i=e.firstChild;i&&t.children;i=i.nextSibling)r.updateTextNode(i,t.children[o++],n);if(t&&t.data)for(let e in t.data){const r=t.data[e],o=r.name;"textContent"===e&&r.twoWay&&!r.updating&&void 0!==r.value&&(n[o]=r.value)}}updateBoundProperty(e,t){if(t.updating)return;const n=this;t.updating=!0,n[e]=t.value,t.updating=!1}updateBoundNodes(e){const t=this;if(t.updateBoundNode(t.shadowRoot||t,t.bindings,t,e),t.detachedChildren.length>0)for(let n=0;n<t.detachedChildren.length;n++){const r=t.detachedChildren[n],o=r.getAttribute("smart-id"),i=function(e){if(e.nodeId===o)return e;for(let t in e.children){const n=e.children[t];if((n.getAttribute?n.getAttribute("smart-id"):"")===o)return e;if(n.children){const e=i(n);if(e)return e}}return null},s=i(t.bindings);if(s)t.updateBoundNode(r,s,t,e,!0);else if(r.getAttribute&&t.bindings.mapping){const n=t,r=t.bindings;if(r)for(let o in r.mapping){const i=n.querySelector('[smart-id="'+o+'"]');if(i){const s=r.mapping[o];t.updateBoundData(i,s,n,e)}}}}}updateBoundMappedNodes(){const e=this,t=e.bindings,n=e;if(t.mapping)for(let r in t.mapping){let o=n.querySelector('[smart-id="'+r+'"]');if(n.shadowRoot&&(o=n.querySelector('[id="'+r+'"]'),o||(o=n.shadowRoot.querySelector('[id="'+r+'"]')||n.shadowRoot.querySelector('[smart-id="'+r+'"]'))),o){const i=t.mapping[r];e.updateBoundData(o,i,n)}else if(n.getAttribute("aria-controls")){let i=document.getElementById(n.getAttribute("aria-controls"));if(!i&&n.shadowRoot&&(i=n.shadowRoot.getElementById(n.getAttribute("aria-controls"))),o=i.querySelector('[smart-id="'+r+'"]'),o){const i=t.mapping[r];e.updateBoundData(o,i,n)}}}}updateBoundNode(e,t,n,r,o){const i=this;if(!t)return;let s=0;if(o){if(o&&!t.data)for(let a=e.firstChild;a&&t.children;a=a.nextSibling)if(a.getAttribute){const e=a.getAttribute("smart-id"),o=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();i.updateBoundNode(a,o,n,r),s++}else i.updateBoundNode(a,t.children[s++],n,r,o)}else for(let o=e.firstChild;o&&t.children;o=o.nextSibling)if(o.getAttribute){const e=o.getAttribute("smart-id"),a=function(){for(let n in t.children)if(t.children[n].nodeId===e)return t.children[n]}();i.updateBoundNode(o,a,n,r),s++}else i.updateBoundNode(o,t.children[s++],n,r);if(!t||!t.data)return;const a=t.data;i.updateBoundData(e,a,n,r)}updateBoundData(e,t,n,r){const o=this;for(let i in t){const s=t[i];let a=s.name;if(!s.updating&&(a.indexOf("::")>=0&&(a=a.substring(0,a.indexOf("::"))),void 0===r||r===a)){if(a.indexOf("(")>=0){let e=a.substring(a.indexOf("("));const t=a.substring(0,a.indexOf("("));if(e=e.substring(1,e.length-1),e=e.replace(/ /gi,""),e=e.split(","),e.length>0&&""!==e[0]){let r=[];for(let t=0;t<e.length;t++)r.push(n[e[t]]);s.value=n[t].apply(n,r)}else s.value=n[t]();s.type=typeof s.value}else s.value=n[a];if("innerHTML"===a){if(e[i].toString().trim()!==n[a].toString().trim()){if(window.smartBlazor&&e[i].indexOf("\x3c!--")>=0){(s.ready||n._properties[a].defaultValue!==s.value)&&(e[i]=s.value.toString());continue}(s.ready||n._properties[a].defaultValue!==s.value)&&(e[i]=s.value.toString().trim())}}else s.not?(e[i]=!s.value,s.targetPropertyName&&(e[s.targetPropertyName]=!s.value)):(e[i]=s.value,s.targetPropertyName&&(e[s.targetPropertyName]=s.value));if(e.$&&e.$.isNativeElement){v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const t=v.cache["toDash"+i],n=e.$.getAttributeValue(t,s.type);!s.reflectToAttribute||n===s.value&&s.ready||e.$.setAttributeValue(t,s.value,s.type),s.reflectToAttribute||e.$.setAttributeValue(t,null,s.type)}if(!s.ready){if(e.$&&e.$.isCustomElement){v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const t=v.cache["toDash"+i];e._properties||(e._beforeCreatedProperties=e._properties=e.propertyByAttributeName=[]),e._properties[i]||(e._properties[i]={attributeName:t},e._beforeCreatedProperties&&(e._beforeCreatedProperties[i]=e._properties[i]),e.propertyByAttributeName[t]=e._properties[i]);const n=e._properties[i];n.isUpdating=!0,s.reflectToAttribute&&(s.not?e.$.setAttributeValue(n.attributeName,!s.value,s.type):e.$.setAttributeValue(n.attributeName,s.value,s.type)),s.reflectToAttribute||e.$.setAttributeValue(n.attributeName,null,s.type),n.isUpdating=!1}if(s.twoWay){const t=function(t){if(s.value=t,e.$&&e.$.isNativeElement){v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const t=v.cache["toDash"+i],n=e.$.getAttributeValue(t,s.type);s.reflectToAttribute&&n!==s.value&&e.$.setAttributeValue(t,s.value,s.type),s.reflectToAttribute||e.$.setAttributeValue(t,null,s.type)}};if(s.name.indexOf("::")>=0){const n=s.name.indexOf("::"),r=s.name.substring(n+2);o["$"+e.getAttribute("smart-id")].listen(r,(function(){t(e[i]);const n=s.name.substring(0,s.name.indexOf("::"));o.updateBoundProperty(n,s)}))}if(e.$&&e.$.isCustomElement){e._properties[i]&&(e._properties[i].notify=!0),v.cache["toDash"+i]||(v.cache["toDash"+i]=y.Core.toDash(i));const n=v.cache["toDash"+i];o["$"+e.getAttribute("smart-id")].listen(n+"-changed",(function(e){let n=e.detail;t(n.value);const r=o.context;e.context!==document&&(o.context=o),o.updateBoundProperty(s.name,s),o.context=r}))}}}s.ready=!0}}}static clearCache(){this.cache={}}addMessages(e,t){Object.assign(this.messages[e],t)}localize(e,t){const n=this;if(!n.messages||!n.messages[n.locale])return;let r=n.messages[n.locale][e];if(""===r)return"";if(!r){const r=n.messages.en;if(r){let n=r[e];if(n){for(let e in t){let r=t[e];n=n.replace(new RegExp("{{"+e+"}}","g"),r)}return n}return e}}const o=r;for(let e in t){let n=t[e];r=r.replace(new RegExp("{{"+e+"}}","g"),n)}if(n.localizeFormatFunction){const i=n.localizeFormatFunction(o,r,t,e);if(void 0!==i)return i}return r}static get requires(){return{}}static get listeners(){return{"theme-changed":function(e){this.theme=e.detail.newValue}}}static get methods(){return{}}get classNamesMap(){return{animation:"smart-animate",rippleAnimation:"smart-ripple"}}get hasAnimation(){return"none"!==this.animation}get hasRippleAnimation(){return"none"!==this.animation&&"advanced"===this.animation}static get modules(){return window[n].Modules}get properties(){const e=this;return e._properties||(e._properties=[]),e._properties}get parents(){const e=this;let t=[],r=e.parentNode;for(;r&&9!==r.nodeType;)r instanceof HTMLElement==1&&t.push(r),r=r.parentNode;const o=e.getRootNode();if(o.host){const e=e=>{let t=[e],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==1&&t.push(n),n=n.parentNode;return t};t=t.concat(e(o.host))}return window[n].EnableShadowDOM&&e.isInShadowDOM&&e.shadowParent&&(t=t.concat(e.shadowParent.parents)),t}log(e){this._logger("log",e)}warn(e){this._logger("warn",e)}error(e){this._logger("error",e)}_logger(e,t){if(this.debugMode){const n=t instanceof Error?t.message:t.toString();console[e](n)}if(this.rethrowError&&"error"===e)throw t}get focused(){return this.contains(document.activeElement)}template(){return"<div></div>"}registered(){const e=this;e.onRegistered&&e.onRegistered()}created(){const e=this;e.isReady=!1,e._initElement(e),e._setModuleState("created"),e.onCreated&&e.onCreated()}completed(){const e=this;e.isCompleted=!0,e._onCompleted&&e._onCompleted(),e.onCompleted&&e.onCompleted()}whenReady(e){const t=this;t.isCompleted?e():(t.whenReadyCallbacks||(t.whenReadyCallbacks=[]),t.whenReadyCallbacks.push(e))}whenRendered(e){const t=this;t.isRendered?e():(t.whenRenderedCallbacks||(t.whenRenderedCallbacks=[]),t.whenRenderedCallbacks.push(e))}addThemeClass(){const e=this;""!==e.theme&&e.classList.add("smart-"+e.theme)}addDefaultClass(){const e=this;e.classList.add(n.toLowerCase()+"-element"),e.classList.add(e.nodeName.toLowerCase())}_renderShadowRoot(){const e=this;if(e.shadowRoot){e.$.root.classList.add(e.nodeName.toLowerCase());for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t];"class"===n.name||"id"===n.name||"style"===n.name||"tabindex"===n.name||n.name.indexOf("aria")>=0||e.$.root.setAttribute(n.name,n.value)}for(let t=0;t<e.classList.length;t++){const n=e.classList[t];"smart-element-init"!==n&&"smart-element"!==n&&"smart-hidden"!==n&&"smart-visibility-hidden"!==n&&e.$.root.classList.add(n)}}}render(){const e=this;if(!e.isRendered&&(e.isRendered=!0,e.isRendering=!1,e.context=document,e._renderShadowRoot(),e.whenRenderedCallbacks)){for(let t=0;t<e.whenRenderedCallbacks.length;t++)e.whenRenderedCallbacks[t]();e.whenRenderedCallbacks=[]}e.onRender&&e.onRender(),e.disabled&&e.setAttribute("aria-disabled",!0),e.readonly&&-1!==["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox"].indexOf(e.getAttribute("role"))&&e.setAttribute("aria-readonly",!0)}ready(){const e=this;if(e._setId(),e.addThemeClass(),e.addDefaultClass(),"collapsed"===e.visibility?e.classList.add("smart-hidden"):"hidden"===e.visibility&&e.classList.add("smart-visibility-hidden"),e.dataContext&&e.applyDataContext(),e.onReady&&e.onReady(),e.shadowRoot&&Smart(e._selector)){if(Smart(e._selector).styleUrls){const t=Smart(e._selector).styleUrls;for(let n=0;n<t.length;n++)e.importStyle(t[n])}if(Smart(e._selector).styles){const t=document.createElement("style");t.innerHTML=Smart(e._selector).styles,e.shadowRoot.insertBefore(t,e.shadowRoot.firstChild)}}Smart(e._selector)&&Smart(e._selector).ready&&Smart(e._selector).ready()}_setId(){const e=this;if(!e.id){const t=e.elementName;e.id=t.slice(0,1).toLowerCase()+t.slice(1)+Math.floor(65536*(1+Math.random())).toString(16).substring(1)}}checkLicense(){const e=this;"Evaluation"===window[n].License&&-1===window.location.hostname.indexOf("htmlelements")&&(e.logWatermark(),e.logLicense(),window[n].License="")}logWatermark(){const e=document.createElement("a");e.href="https://www.htmlelements.com/",e.innerHTML="https://www.htmlelements.com/",e.style.position="absolute",e.style.right="5px",e.style.bottom="5px",e.style.color="#fff",e.style.padding="20px",e.style.borderRadius="5px",e.style.background="#0C3D78",e.style.cursor="pointer",e.style.zIndex="999999",e.style.display="block",e.style.fontSize="24px",e.style.textDecoration="none",e.style.fontWeight="bold",e.style.opacity=0,e.style.transition="opacity .35s ease-in-out",e.id="watermark",document.getElementById("watermark")||setTimeout((()=>{document.getElementById("watermark")||(document.body.appendChild(e),setTimeout((()=>{e.style.opacity=1})),setTimeout((()=>{e.style.opacity=0,setTimeout((()=>{e.parentNode.removeChild(e)}),350)}),6e3))}),1e3)}logLicense(){console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("*jQWidgets License Key Not Found."),console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."),console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************"),console.log("****************************************************************************************************************")}get _selector(){const e=this;return e.id?"#"+e.id:e.classList.length>0?"."+e.classList[0]:""}applyDataContext(e){const t=this;let n="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext;if(e&&(n=e,t.dataContext=e),n){if(!n._uid){n._uid=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase(),n._properties=[];for(let e in n){const r=n[e];"function"!=typeof r&&"_properties"!==e&&"_uid"!==e&&(n._properties[e]=r,Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:()=>n._properties[e],set(r){const o=n._properties[e];n._properties[e]=r;let i=[];i[e]={oldValue:o,value:r},i.length++,t.updatingDataContext=!0,w.fireEvent("dataContextPropertyChanged",{dataContext:n,properties:i},{bubbles:!1,cancelable:!0}),t.updatingDataContext=!1}}))}}if(t.dataContextProperties=t.parseAttributes(t),t.dataContextPropertiesMap={},t.dataContextListeners={},t.dataContextProperties){t.updatingDataContext=!0;for(let e in t.dataContextProperties){const r=t.dataContextProperties[e],o=r.name;if(r.propertyName=e,t.dataContextPropertiesMap[o]=e,v.cache["toDash"+e]||(v.cache["toDash"+e]=y.Core.toDash(o)),r.isEvent){const e=r.value;t.dataContextListeners[o]&&t.removeEventListener(o,t.dataContextListeners[o]),t.dataContextListeners[o]=function(t){n[e](t)},t.addEventListener(o,t.dataContextListeners[o])}if(o.indexOf(".")>=0){const r=o.split(".");let i=n[r[0]];for(let e=1;e<r.length;e++)i=i[r[e]];void 0!==i&&(t[e]=i)}else t[e]=n[o]}t.dataContextPropertyChangedHandler=function(e){const n=e.detail.properties;if(e.detail.dataContext===("string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext))for(let e in n){const r=t.dataContextPropertiesMap[e],o=t.context;r&&(t.context=document,t[r]=n[e].value,t.context=o)}},w.listen("dataContextPropertyChanged",t.dataContextPropertyChangedHandler),t.updatingDataContext=!1}else t.dataContextProperties=null}else{t.dataContextProperties=null;const e=function(){("string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext)&&(t.applyDataContext(),window.removeEventListener("load",e))};window.addEventListener("load",e)}}updateDataContextProperty(e){const t=this,n="string"==typeof t.dataContext?window[t.dataContext]||document[t.dataContext]:t.dataContext,r=t.dataContextProperties[e];if(!t.updatingDataContext&&r.twoWay){const o=r.name;if(o.indexOf(".")>=0){const r=o.split(".");let i=n[r[0]];for(let e=1;e<r.length;e++)i=i[r[e]];void 0!==i&&(i=t[e],c[n._uid]&&(c[n._uid][e]=i))}else n[o]=t[e],c[n._uid]&&(c[n._uid][e]=n[o])}}static get version(){return window[n].Version}initProperties(){const e=this;if(Smart(e._selector)&&Smart(e._selector).properties&&(e._initProperties=Smart(e._selector).properties),e.hasAttribute("props")&&!e.props?e._initProperties=window[e.getAttribute("props")]:e.props&&(e._initProperties=e.props),e._initProperties){const t=Object.keys(e._initProperties);for(let n=0;n<t.length;n++){const r=t[n],o=e._initProperties[r];if(void 0!==o){if(o.constructor===Smart.ObservableArray||o instanceof Smart.ObservableArray){e[r]=o.toArray();continue}if(o.constructor===Smart.DataAdapter||"smartDataAdapter"===o.constructor.name||"object"==typeof o&&Smart.DataAdapter&&o instanceof Smart.DataAdapter||o instanceof Smart.Observable||o.constructor===Smart.Observable||"object"!=typeof o||y.Types.isArray(o)||o instanceof Date){if(void 0===e[r]&&-1===["onReady","onAttached","onDetached","onCreated","onCompleted"].indexOf(r)){const t=e.localize("propertyUnknownName",{name:r});e.log(t)}e[r]=o;continue}}if("messages"!==r)if("dataSourceMap"!==r&&"rowCSSRules"!==r){if(o&&"object"==typeof o){const t=function(n,r){const o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i],a=n[s],l=e._properties[r+"_"+s];if(l&&null===l.value){if(void 0===e[r+"_"+s]){const t=e.localize("propertyUnknownName",{name:r+"_"+s});e.log(t)}e[r+"_"+s]=a}else if("object"==typeof a&&!y.Types.isArray(a)&&a&&a.constructor!==Date)t(a,r+"_"+s);else{if(void 0===e[r+"_"+s]){const t=e.localize("propertyUnknownName",{name:r+"_"+s});e.log(t)}e[r+"_"+s]=a}}};t(o,r)}}else e[r]=o;else e[r]=Object.assign(e[r],o)}}}setProperties(e){const t=this,n=Object.keys(e);for(let r=0;r<n.length;r++){const o=n[r],i=e[o];if(i.constructor===Smart.ObservableArray||i instanceof Smart.ObservableArray)t[o]=i.toArray();else if(i.constructor===Smart.DataAdapter||"smartDataAdapter"===i.constructor.name||"object"==typeof i&&Smart.DataAdapter&&i instanceof Smart.DataAdapter||i instanceof Smart.Observable||i.constructor===Smart.Observable||"object"!=typeof i||y.Types.isArray(i)||i instanceof Date){if(void 0===t[o]&&-1===["onReady","onAttached","onDetached","onCreated","onCompleted"].indexOf(o))continue;const e=t._properties[o];"int"===e.type||"number"===e.type&&"string"==typeof subPropertyValue?"int"===e.type?t[o]=parseInt(i):t[o]=parseFloat(i):t[o]=i}else if("messages"!==o&&"dataSourceMap"!==o){if("object"==typeof i){const e=function(n,r){const o=Object.keys(n);for(let i=0;i<o.length;i++){const s=o[i],a=n[s],l=t._properties[r+"_"+s];if(l&&null===l.value){if(void 0===t[r+"_"+s])continue;const e=t._properties[r+"_"+s];"int"===e.type||"number"===e.type&&"string"==typeof a?"int"===e.type?t[r+"_"+s]=parseInt(a):t[r+"_"+s]=parseFloat(a):t[r+"_"+s]=a}else if("object"==typeof a&&!y.Types.isArray(a)&&a&&a.constructor!==Date)e(a,r+"_"+s);else{if(void 0===t[r+"_"+s])continue;const e=t._properties[r+"_"+s];"int"===e.type||"number"===e.type&&"string"==typeof a?"int"===e.type?t[r+"_"+s]=parseInt(a):t[r+"_"+s]=parseFloat(a):t[r+"_"+s]=a}}};e(i,o)}}else t[o]=i}}setup(){const e=this;if(e.context=this,e.isReady&&!e.isCompleted)return;if(e.isReady)return e._setModuleState("attached"),e.isAttached=!0,e.attached(),e._handleListeners("listen"),void(e.context=document);e.ownerElement&&e.ownerElement.detachedChildren.indexOf(e)>=0&&e.ownerElement.detachedChildren.splice(e.ownerElement.detachedChildren.indexOf(e),1),e.isReady=!0,e.methods=e.getStaticMember("methods"),e.initProperties(),a.isMobile&&e.classList.add("smart-mobile");for(let t=0;t<e.attributes.length;t+=1){const n=e.propertyByAttributeName[e.attributes[t].name];if(!n)continue;let r=e.$.getAttributeValue(n.attributeName,n.type);const o=r?r.toString():"";if(!(o.indexOf("{{")>=0||o.indexOf("[[")>=0||"object"!==n.type&&"array"!==n.type&&(e.attributes[t].value.indexOf("{{")>=0||e.attributes[t].value.indexOf("[[")>=0)||void 0===r||n.value===r)){const o=y.Types.getType(r),i=e.attributes[t].value;if(("any"===n.type||"object"===n.type)&&""+e[n.name]===r)continue;if("array"===n.type&&e[n.name]&&JSON.stringify(e[n.name])===r)continue;if("number"===o&&isNaN(r)&&"NaN"!==i&&"Infinity"!==i&&"-Infinity"!==i){const t=e.localize("propertyInvalidValueType",{name:n.name,actualType:"string",type:n.type});e.log(t)}n.isUpdatingFromAttribute=!0,e[n.name]=r,n.isUpdatingFromAttribute=!1}}for(let t in e._properties){const n=e._properties[t];if("innerHTML"===t&&n.value===n.defaultValue&&(n.value=n.defaultValue=y.Core.html(e)),"boolean"!==n.type&&"bool"!==n.type||"false"===e.getAttribute(n.attributeName)&&(n.isUpdating=!0,e.setAttribute(n.attributeName,""),n.isUpdating=!1),n.defaultReflectToAttribute&&n.reflectToAttribute){if(n.defaultReflectToAttribute&&n.defaultReflectToAttributeConditions){let t=!0;for(let r=0;r<n.defaultReflectToAttributeConditions.length;r++){const o=n.defaultReflectToAttributeConditions[r];let i,s;for(let e in o)i=e,s=o[e];e._properties[i]&&e._properties[i].value!==s&&(t=!1)}if(!t)continue}n.isUpdating=!0,e.$.setAttributeValue(n.attributeName,n.value,n.type),n.isUpdating=!1}}const t=[];if(e.children.length>0)for(let n=0;n<e.children.length;n++){const r=e.children[n];y.Extend(r).isCustomElement&&t.push(r)}e.applyTemplate(),e.complete=function(){if(!e.templateBindingsReady){const t=e=>{e.templateBindingsReady||(e.templateBindingsReady=!0,e.updateTextNodes(),e.updateBoundNodes())};if(e.ownerElement){let n=e.ownerElement,r=[];for(;n;)r.push(n),n=n.ownerElement;for(let e=r.length-1;e>=0;e--)t(r[e]);t(e)}else t(e)}const t=()=>{if(e._setModuleState("ready"),e.ready(),"auto"!==e.renderMode||e.isRendered||e.render(),e.isAttached=!0,e._setModuleState("attached"),e.attached(),e._handleListeners("listen"),e.isHidden||0!==e.offsetWidth&&0!==e.offsetHeight||(e.isHidden=!0),e.completed(),e.isRendered&&(e.context=document),e.whenReadyCallbacks){for(let t=0;t<e.whenReadyCallbacks.length;t++)e.whenReadyCallbacks[t]();e.whenReadyCallbacks=[]}};if(e.wait)e.classList.add("smart-visibility-hidden");else if(e.classList.contains("smart-async"))requestAnimationFrame((()=>{t()}));else{const n=e.shadowParent;e.shadowParent=null;const r=e.parents;if(e.shadowParent=n,0===r.length)return;const o=()=>{let t=e.ownerElement,n=[];for(;t;)n.push(t),t=t.ownerElement;for(let e=n.length-1;e>=0;e--)n[e].updateBoundMappedNodes()};e.ownerElement&&"HTML"!==r[r.length-1].nodeName?e.getRootNode().host?t():e.ownerElement&&"HTML"===e.ownerElement.parents[e.ownerElement.parents.length-1].nodeName?(o(),t()):e.checkIsInDomInterval=setInterval((()=>{const n=e.parents;"HTML"===n[n.length-1].nodeName&&(clearInterval(e.checkIsInDomInterval),o(),t())}),100):t()}};let r=[].slice.call(e.querySelectorAll("[smart-id]")).concat(t);if(window[n].EnableShadowDOM&&!0!==e.isInShadowDOM&&(r=[].slice.call(e.shadowRoot.querySelectorAll("[smart-id]")).concat(t)),0===r.length)e.complete();else{e._completeListeners=0;for(let t=0;t<r.length;t++){const n=r[t];if(y.Extend(n).isCustomElement){const t=function(){e._completeListeners--,0===e._completeListeners&&(e.complete(),delete e._completeListeners)}.bind(e);n.isCompleted||n.isUtilityElement||!0===n.wait||(e._completeListeners++,n._onCompleted||(n.completeHandlers=[],n._onCompleted=function(){for(let e=0;e<n.completeHandlers.length;e++)n.completeHandlers[e]()}),n.completeHandlers.push(t))}}0===e._completeListeners&&e.complete()}}visibilityChangedHandler(){const e=this;e.isReady&&requestAnimationFrame((()=>{0===e.offsetWidth||0===e.offsetHeight?e.isHidden=!0:(e.isHidden=!1,e.$.fireEvent("resize",e,{bubbles:!1,cancelable:!0}))}))}attributeChangedCallback(e,t,n){const r=this,o=r.propertyByAttributeName[e];if("class"!==e&&"style"!==e||r.visibilityChangedHandler(),o||r.attributeChanged(e,t,n),r.onAttributeChanged&&r.onAttributeChanged(e,t,n),!o||o&&o.isUpdating)return;let i=r.$.getAttributeValue(o.attributeName,o.type);void 0!==n&&r[o.name]!==i&&(o.isUpdatingFromAttribute=!0,r[o.name]=void 0!==i?i:r._properties[o.name].defaultValue,o.isUpdatingFromAttribute=!1)}attributeChanged(e,t,n){}set hasStyleObserver(e){const t=this;void 0===t._hasStyleObserver&&(t._hasStyleObserver=e),e?d.watch(t):d.unwatch(t)}get hasStyleObserver(){const e=this;return void 0===e._hasStyleObserver||e._hasStyleObserver}attached(){const e=this;e.hasStyleObserver&&d.watch(e),e.onAttached&&e.onAttached(),Smart(e._selector)&&Smart(e._selector).attached&&Smart(e._selector).attached()}detached(){const e=this;e.hasStyleObserver&&d.unwatch(e),e._setModuleState("detached"),e.isAttached=!1,e.ownerElement&&-1===e.ownerElement.detachedChildren.indexOf(e)&&e.ownerElement.detachedChildren.push(e),e._handleListeners("unlisten"),e.onDetached&&e.onDetached(),Smart(e._selector)&&Smart(e._selector).detached&&Smart(e._selector).detached(),u&&u[e._selector]&&delete u[e._selector]}propertyChangedHandler(e,t,n){const r=this;t!==n&&("theme"===e&&(""!==t&&r.classList.remove("smart-"+t),""!==n&&r.classList.add("smart-"+n)),"visibility"===e?("collapsed"===t?r.classList.remove("smart-hidden"):"hidden"===t&&r.classList.remove("smart-visibility-hidden"),"collapsed"===n?r.classList.add("smart-hidden"):"hidden"===n&&r.classList.add("smart-visibility-hidden")):("disabled"===e||"readonly"===e)&&r._ariaPropertyChangedHandler(e,n),r.propertyChanged&&r.propertyChanged(e,t,n))}_ariaPropertyChangedHandler(e,t){const n=this;"readonly"===e&&-1===["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox"].indexOf(n.getAttribute("role"))||(t?n.setAttribute("aria-"+e,!0):n.removeAttribute("aria-"+e))}_handleListeners(e){const t=this,n=t.tagName.toLowerCase(),r=r=>{for(let o in r){const i=o.split(".");let s=i[0],a=t.$;if(i[1])if(s=i[1],a=t["$"+i[0]],"document"===i[0]){let e=t.smartId;""===e&&(e=y.Core.toCamelCase(n)),s=s+"."+e}else t.smartId&&(s=s+"."+t.smartId+"_"+t.parents.length);else t.smartId&&(s=s+"."+t.smartId);const l=r[o],d=function(e){const n=t.context;t.context=t,t[l]&&t[l].apply(t,[e]),t.context=n};a&&a[e](s,d)}};r(t.getStaticMember("listeners")),r(t.templateListeners),Smart(t._selector)&&Smart(t._selector).properties&&r(Smart(t._selector).listeners)}parseTemplate(){const e=this,n=e.template(),o=document.createDocumentFragment();if(t[e.nodeName]&&!r)return t[e.nodeName].cloneNode(!0);if(""===n)return null;let i=document.createElement("div");o.appendChild(i),i.innerHTML=n;let s=i.childNodes;i.parentNode.removeChild(i);for(let e=0;e<s.length;e++)o.appendChild(s[e]);return t[e.nodeName]=o,r?o:o.cloneNode(!0)}applyTemplate(){const e=this,t=e.parseTemplate();if(!t)return;if(!t.hasChildNodes)return;const n=t.childNodes[0],r=(t,n)=>{e["$"+t]=n.$=y.Extend(n),e.$[t]=n,n.ownerElement=e};let o=n;if(n.getElementsByTagName("content").length>0){let e=n.getElementsByTagName("content")[0];o=e.parentNode,o.removeChild(e)}else{const e=t.querySelectorAll("[inner-h-t-m-l]");e&&e.length>0&&(o=e[0])}e.$.template="template"===n.nodeName.toLowerCase()?n:n.querySelector("template");let i=t.querySelectorAll("[id]");0===i.length&&(i=t.querySelectorAll("*")),r("root",n),r("content",o),e.$.html=e.innerHTML.toString().trim();for(let t=0;t<i.length;t+=1){let n=i[t];""===n.id&&(n.id="child"+t),r(n.id,n),n.setAttribute("smart-id",n.id),e.shadowRoot?n.shadowParent=e:n.removeAttribute("id")}for(!1!==e.hasTemplateBindings?e.bindings=e.getBindings(t):e.bindings=[],e.$root.addClass("smart-container");e.childNodes.length;)o.appendChild(e.firstChild);if(e.appendTemplate(t),e.$.template){const t=document.createElement("div");t.classList.add("smart-template-container"),e.$.templateContainer=t,e.$.template.parentNode.insertBefore(t,e.$.template),e.refreshTemplate()}}refreshTemplate(){const e=this;if(!e.$.templateContainer)return;e.templateDetached(e.$.templateContainer);const t=e.$.template.content.cloneNode(!0);e.templateBindings=e.getBindings(t),e.templateProperties=[];let n=document.createDocumentFragment();const r=function(t,n,o){for(let i in t){const s=t[i],a=s.node.cloneNode();n.appendChild(a);let l=[],d=!1;if(s.data)for(let t in s.data){const r=s.data[t],i=r.name;if(e.templateProperties[i]=!0,a.removeAttribute(y.Core.toDash(t)),"*items"===t)l=e[i],d=!0;else if(i.indexOf("item.")>=0&&void 0!==o)r.value=o[i.substring("item.".length)],a[t]=r.value;else if(i.indexOf("item")>=0&&void 0!==o)r.value=o,a[t]=r.value;else if("*if"===t)if(i.indexOf("(")>=0){let t,r=i.substring(i.indexOf("("));const o=i.substring(0,i.indexOf("("));if(r=r.substring(1,r.length-1),r=r.replace(/ /gi,""),r=r.split(","),r.length>0&&""!==r[0]){let n=[];for(let t=0;t<r.length;t++)n.push(e[r[t]]);t=e[o].apply(e,n)}else t=e[o]();!1===t&&n.removeChild(a)}else e[i]||n.removeChild(a);else e.updateBoundNode(a,s,e,i)}if(l.length>0||d){for(let e=0;e<l.length;e++)s.children&&r(s.children,a,l[e]);if("number"==typeof l)for(let e=0;e<l;e++)s.children&&r(s.children,a,e)}else s.children&&r(s.children,a,o)}};r(e.templateBindings.children,n),e.$.templateContainer.innerHTML="",e.$.templateContainer.appendChild(n),e.templateAttached(e.$.templateContainer)}templateAttached(){}templateDetached(){}appendTemplate(e){this.appendChild(e)}defineElementModules(){const e=this,t=e.constructor.prototype;if("BaseElement"===t.elementName){t.modules=e.constructor.modules;const n=t.modules;for(let t=0;t<n.length;t+=1)e.addModule(n[t])}else{const n=t.modules;if(!n)return;for(let t=0;t<n.length;t+=1){const r=n[t],o=r.prototype;e.defineElementMethods(o.methodNames,o),e.defineElementProperties(r.properties)}}}watch(e,t){const n=this;n._watch=null!==e&&null!==t?{properties:e,propertyChangedCallback:t}:null}unwatch(){this._watch=null}set(e,t,n){const r=this,o=r.context;r.context=!0===n?document:r,r[e]=t,r.context=o}get(e){return this[e]}_setModuleState(e,t){const n=this,r="is"+e.substring(0,1).toUpperCase()+e.substring(1),o="on"+e.substring(0,1).toUpperCase()+e.substring(1);for(let i=0;i<n.modulesList.length;i++){const s=n.modulesList[i];s[r]=!0,s[e]&&s[e](t),s[o]&&s[o](t)}}addModule(e,t){const n=this;if(!e)return;const r=n.modules.slice(0),o=e.prototype,i=Object.getPrototypeOf(e);if(i.name&&i.name!==e.name&&n.addModule(i),!e.moduleName&&e.name&&(e.moduleName=e.name),-1===r.findIndex((t=>e.moduleName===t.moduleName))&&r.push(e),n.defineModule(e),n.defineElementMethods(o.methodNames,o),n.defineElementProperties(e.properties),n.constructor.prototype.modules=r,t)for(let t in Smart.Elements.tagNames){const r=Smart.Elements.tagNames[t];let o=Object.getPrototypeOf(r),i=[];for(;o!==HTMLElement;)i.push(o.prototype),o=Object.getPrototypeOf(o);i.indexOf(n)>=0&&r!==n&&r.prototype.addModule(e)}}defineModule(e){if(e.isDefined)return;e.prototype._initModule=function(e){this.ownerElement=e};const t=e.properties||{},n=Object.keys(t),r=Object.getOwnPropertyNames(e.prototype);e.prototype.methodNames=r;for(let r=0;r<n.length;r+=1){const o=n[r],i=t[o];Object.defineProperty(e.prototype,o,{configurable:!1,enumerable:!0,get(){return this.ownerElement?this.ownerElement[o]:i.value},set(e){this.ownerElement[o]=e}})}e.isDefined=!0}getStaticMember(e,t){const r=window[n][this.elementName],o=r[e];t||(t="");let i="array"===t?[]:"string"===t?"":{},s=Object.getPrototypeOf(r),a=[];for(;s[e];)a.push(s[e]),s=Object.getPrototypeOf(s);for(let e=a.length-1;e>=0;e--)if("array"===t)for(let t=0;t<a[e].length;t++)-1===i.indexOf(a[e][t])&&i.push(a[e][t]);else"string"===t?-1===i.indexOf(a[e])&&(i+=a[e]):i=y.Core.assign(i,a[e]);if("array"===t){for(let e=0;e<o.length;e++)-1===i.indexOf(o[e])&&i.push(o[e]);return i}return"string"===t?(-1===i.indexOf(o)&&(i+=o),i):y.Core.assign(i,o)}defineElementHierarchicalProperties(e,t){const n=this,r=[];!function(e){const n=Object.keys(e);for(let o=0;o<n.length;o++){const i=n[o];if("messages"===i)continue;const s=e[i],a=Object.keys(s),l=a.indexOf("value")>=0&&a.indexOf("type")>=0&&"object"==typeof s.value;if("propertyObject"===s.type||l){const e=function(n,o){if(!n.value)return;const i=Object.keys(n.value);for(let s=0;s<i.length;s++){const a=i[s],l=n.value[a],d=o+"_"+a;if("object"!=typeof l||null===l)break;const c=Object.keys(l);if(!(c.indexOf("value")>=0&&c.indexOf("type")>=0))break;if("array"!==n.type&&(n.isHierarchicalProperty=!0),l.parentPropertyName=o,t){const e=t._properties[d];if(n.value.hasOwnProperty(a)){if(e.isDefined)continue;delete n.value[a]}e.isDefined=!0,Object.defineProperty(n.value,a,{configurable:!1,enumerable:!0,get:()=>t._properties[d].value,set(e){t.updateProperty(t,t._properties[d],e)}})}r[d]||(r[d]=l,r.length++),("propertyObject"===l.type||"object"==typeof l.value&&"array"!==l.type)&&e(t?t._properties[d]:l,d)}};e(s,i)}}}(e),r.length>0&&!t&&n.defineElementProperties(r)}defineElement(){const e=this,t=e.constructor.prototype,n=e.getStaticMember("properties"),r=Object.getOwnPropertyNames(t);t.extendedProperties={},t.boundProperties={},t.templateListeners={},e.defineElementModules(),e.defineElementMethods(r,t),e.defineElementProperties(n),e.defineElementHierarchicalProperties(e.extendedProperties),t._initElement=function(){const e=this,n=t.extendedProperties,r=Object.keys(n),o=e.modules;e.$=y.Extend(e),e.$document=w,e.smartId=(Date.now().toString(36)+Math.random().toString(36).substr(2,5)).toUpperCase(),e.isCreated||(e.modulesList=[],e._properties=[],e._beforeCreatedProperties&&(e._properties=e._beforeCreatedProperties,delete e._beforeCreatedProperties),e.detachedChildren=[],e.propertyByAttributeName=[]);for(let t=0;t<o.length;t+=1){let n=new(0,o[t]);n._initModule(e),e.modulesList.push(n)}for(let t=0;t<r.length;t+=1){const o=r[t],i=n[o];let s=i.value;if(e._properties[o]){if(void 0!==e._properties[o].notify)continue;delete e._properties[o]}if(E&&"innerHTML"===o&&delete e[o],-1===window.navigator.userAgent.indexOf("PhantomJS")&&e.hasOwnProperty(o)&&(s=e[o],delete e[o]),"array"===i.type&&null!=s&&(s=s.slice(0)),"object"===i.type&&null!=s&&(s=Array.isArray(s)?s.slice(0):Object.assign({},s)),e._properties[o]={name:o,notify:i.notify,allowedValues:i.allowedValues,type:i.type,nullable:i.nullable,reflectToAttribute:i.reflectToAttribute,defaultReflectToAttribute:i.defaultReflectToAttribute,defaultReflectToAttributeConditions:i.defaultReflectToAttributeConditions,value:s,readOnly:i.readOnly,defaultValue:s,attributeName:i.attributeName,observer:i.observer,inherit:i.inherit,extend:i.extend,validator:i.validator},e.propertyByAttributeName[i.attributeName]=e._properties[o],!i.hasOwnProperty("type")){const t=e.localize("propertyUnknownType",{name:o});e.log(t)}if("any"===i.type||"propertyObject"===i.type)continue;const a=y.Types.getType(s);if(null!=s&&i.type!==a&&!i.validator){if("object"===i.type&&"array"===a)continue;if("number"===a&&["integer","int","float"].findIndex((e=>e===i.type))>=0)continue;const t=e.localize("propertyInvalidValueType",{name:o,actualType:a,type:i.type});e.log(t)}}e.defineElementHierarchicalProperties(e._properties,e),e.isCreated=!0},t.registered()}defineElementMethods(e,t){const n=this.constructor.prototype,r=function(e,t){const n=Array.prototype.slice.call(arguments,2),r=function(){if(!this.isReady&&"localize"!==t&&"localize"!==t&&"cloneNode"!==t&&"importStyle"!==t&&"log"!==t&&"parseAttributes"!==t){const e=this.localize("elementNotInDOM");this.log(e)}let r=this;for(let e=0;e<this.modulesList.length;e++){let n=this.modulesList[e];if(t in n){r=n;break}}const o=this.context,i=n.concat(Array.prototype.slice.call(arguments));let s=null;const a=function(e,t){return e===t||"number"===e&&("int"===t||"integer"===t||"float"===t)||"bool"===e&&"boolean"===t||"boolean"===e&&"bool"===t||"object"===e&&"any"===t||void 0};if(this.methods){const e=this.methods[t];if(e){const n=e.split(":");s=n[n.length-1].trim();const r=[],o=e.substring(1+e.indexOf("("),e.lastIndexOf(")")).split(",");let l="";for(let e=0;e<o.length;e++){const t=o[e];l+=t,t.indexOf(":")>=0?(r.push(l),l=""):l+=","}let d=r.length;for(let e=0;e<r.length;e++){const n=r[e].trim().split(":"),o=n[0].split("=")[0].trim().indexOf("?")>=0,s=n[1].indexOf("?")>=0,l=n[1].replace(/\?/gi,"").trim(),c=l.split("|");let u=n[0].split("=")[1];const p=y.Types.getType(i[e]);if(void 0===i[e]&&u){switch(u=u.trim(),l[0]){case"date":{let e=u.substring(u.indexOf("(")+1,u.lastIndexOf(")"));e=e.length>0?e.split(",").map((e=>parseInt(e))):[],u=0===e.length?new Date:new Date(e[0],e[1],e[2]);break}case"bool":case"boolean":u="true"===u||"1"===u;break;case"int":case"integer":u=parseInt(u);break;case"float":case"number":u=parseFloat(u);break;case"any":case"object":u=u.indexOf("{")>=0?JSON.parse(u):u}i.push(u)}else o&&d--;if(l!==p&&p){let n=!0;for(let e=0;e<c.length;e++)if(a(p,c[e])){n=!1;break}if(n&&(null!==i[e]||!s)){const n=this.localize("methodInvalidValueType",{name:t,actualType:p,type:l,argumentIndex:e});this.log(n)}}if(i.length<d){const e=this.localize("methodInvalidArgumentsCount",{name:t,actualArgumentsCount:i.length,argumentsCount:d});this.log(e)}}}}this.context=this;const l=e.apply(r,i);if(s){const e=void 0===y.Types.getType(l)?"void":y.Types.getType(l);if(!a(e,s)){const n=this.localize("methodInvalidReturnType",{name:t,actualType:e,type:s});this.log(n)}}return this.context=o,l};return r},o=["constructor","ready","created","render","attached","detached","appendChild","insertBefore","removeChild","connect","disconnectedCallback","connectedCallback","attributeChangedCallback","propertyChangedHandler","enableShadowDOM","isInShadowDOM","addPropertyBindings"];for(let i in e){let s=e[i];s&&s.startsWith&&s.startsWith("_")||void 0!==o.find((e=>e===s))||n.extendedProperties[s]||y.Types.isFunction(t[s])&&(n[s]=r(t[s],s))}}defineElementProperties(e){if(!e)return;const t=this,n=t.constructor.prototype,r=Object.keys(e),o=t.getStaticMember("properties");Object.assign(n.extendedProperties,e),t.updateProperty=function(e,t,n){const r=e;if(!t||t.readOnly)return;if(t.allowedValues){let e=!1;for(let r=0;r<t.allowedValues.length;r++)if(t.allowedValues[r]===n){e=!0;break}if(!e){const e=JSON.stringify(t.allowedValues).replace(/\[|\]/gi,"").replace(",",", ").replace(/"/gi,"'"),o="'"+n+"'",i=r.localize("propertyInvalidValue",{name:t.name,actualValue:o,value:e});return void r.log(i)}}const o=t.name,i=r._properties[o].value;if(t.validator&&r[t.validator]){const e=r.context;r.context=r;const o=r[t.validator](i,n);void 0!==o&&(n=o),r.context=e}if(i!==n){if(r.propertyChanging){const e=r.propertyChanging(o,i,n);if(!1===e||null===e)return}if(!t.hasOwnProperty("type")){const e=r.localize("propertyUnknownType",{name:o});r.log(e)}if("array"!==t.type||JSON.stringify(i)!==JSON.stringify(n)){if(null!=n&&"any"!==t.type&&"propertyObject"!==t.type&&t.type!==y.Types.getType(n)&&!t.validator||null===n&&!t.nullable){let e=!0;if("object"===t.type&&"array"===y.Types.getType(n)&&(e=!1),"number"===y.Types.getType(n)&&["integer","int","float"].findIndex((e=>e===t.type))>=0&&(e=!1),e){const e=r.localize("propertyInvalidValueType",{name:o,actualType:y.Types.getType(n),type:t.type});return void r.error(e)}}if(t.isUpdating=!0,t.isHierarchicalProperty){const e=function(t,n){if(!t)return;const o=Object.keys(t);for(let i=0;i<o.length;i++){const s=o[i],a=t[s];"object"==typeof a&&!y.Types.isArray(a)&&a&&a.constructor!==Date?e(a,n+"_"+s):r[n+"_"+s]=a}};e(n,o)}else r._properties[o].value=n;if(!t.isUpdatingFromAttribute&&t.reflectToAttribute&&r.$.setAttributeValue(t.attributeName,n,t.type),r.isReady&&(!r.ownerElement||r.ownerElement&&r.ownerElement.isReady)){if("wait"===o&&(n||!i||r.isCompleted||(r.classList.remove("smart-visibility-hidden"),r.ownerElement&&r.ownerElement.updateBoundMappedNodes(),r.updateBoundMappedNodes(),r.complete())),"renderMode"===o)return;if(r.context!==r&&!r.wait){const e=r.context;r.context=r,r.propertyChangedHandler(o,i,n),r.context=e,t.observer&&r[t.observer]&&(r.context=r,r[t.observer](i,n),r.context=document),r._watch&&r._watch.properties.indexOf(o)>=0&&r._watch.propertyChangedCallback(o,i,n)}const e=t.notify||r.boundProperties[o];e&&(r.$.fireEvent(t.attributeName+"-changed",{context:r.context,oldValue:i,value:r[o]}),r.boundProperties[o]&&r.updateBoundNodes(o)),e&&r.templateProperties&&r.templateProperties[o]&&r.refreshTemplate(),r.dataContextProperties&&("dataContext"===o?r.applyDataContext():r.dataContextProperties[o]&&r.updateDataContextProperty(o))}t.isUpdating=!1}}};for(let t=0;t<r.length;t+=1){const i=r[t],s=e[i],a=y.Core.toDash(i),l=s.type||"any",d=l.indexOf("?")>=0||"any"===l;d&&"any"!==l&&(s.type=l.substring(0,l.length-1)),s.nullable=d,s.attributeName=a.toLowerCase(),s.name=i,s.reflectToAttribute=void 0===s.reflectToAttribute||s.reflectToAttribute,s.inherit&&o[i]&&(s.value=o[i].value),s.extend&&o[i]&&y.Core.assign(s.value,o[i].value),n.hasOwnProperty(i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get(){if(this._properties[i])return this._properties[i].value},set(e){const t=this;t.updateProperty(t,t._properties[i],e)}})}}}let C=[],S=[],x=[],E=!1;const A=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);A&&parseInt(A[2],10)<=50&&(E=!0);class T{static register(e,t){const r=t.prototype;let o=a.toCamelCase(e).replace(/[a-z]+/,""),i=t.version||window[n].Version;if(window.customElements.get(e)&&window.customElements.get(e).version===i)return;let s=e;for(i=i.split(".");window.customElements.get(e);)e=s+"-"+i.join("."),i[2]=parseInt(i[2])+1;if(!C[e]){if(e.startsWith(n.toLowerCase()))C[e]=window[n][o]=window[n.toLowerCase()+o]=t;else{let r=e.split("-")[0];r=r.substring(0,1).toUpperCase()+r.substring(1),window[n][r]||(window[n][r]={}),C[e]=window[n][r][o]=window[r.toLowerCase()+o]=t,window[n][o]&&(o=a.toCamelCase(e)),window[n][o]=t}r.elementName=o,r.defineElement(),S[e]&&S[e](r),window.customElements.define(e,t)}}static registerElements(){const e=this;if(e.toRegister){e.isRegistering=!0;for(let t=0;t<e.toRegister.length;t++){const n=e.toRegister[t];e.register(n.tagName,n.element)}e.isRegistering=!1}}static get(e){if(C[e])return C[e]}static whenRegistered(e,t){if(!e)throw new Error("Syntax Error: Invalid tag name");const n=S[e],r=this.get(e),o=r?r.modules.length:3;try{n||r?!n&&r?(t(r.prototype),S[e]=void 0):n&&!r?S[e]=function(e){n(e),t(e)}:n&&r&&(r.proto&&(n(r.proto),t(r.proto)),S[e]=void 0):S[e]=function(e){try{t(e)}catch(e){const t=e instanceof Error?e.message:e.toString();console.log(t)}}}catch(e){const t=e instanceof Error?e.message:e.toString();console.log(t)}if(r&&o!==r.prototype.modules.length){const t=document.querySelectorAll(e);for(let e=0;e<t.length;e++){const n=t[e];n.isCreated&&n._initElement()}}}}T.lazyRegister=!1,T.tagNames=[];class P{constructor(){const e=this;e.name="observableArray",e.observables=arguments.length<3?null:arguments[2];const t=new Proxy(e,{deleteProperty:function(e,t){return delete e[t],!0},apply:function(e,t,n){return e.apply(t,n)},get:function(t,n){return t[n]||isNaN(parseInt(n))?t[n]:e.getItem(parseInt(n))},set:function(t,n,r){return t[n]||isNaN(parseInt(n))?(t[n]=r,!0):(e.setItem(parseInt(n),r),!0)}});if(e._addArgs={eventName:"change",object:t,action:"add",index:null,removed:new Array,addedCount:1},e._removeArgs={eventName:"change",object:t,action:"remove",index:null,removed:null,addedCount:0},arguments.length>=1&&Array.isArray(arguments[0])){e._array=[];const t=arguments[0];for(let n=0,r=t.length;n<r;n++){const r=e._getItem(e._array.length,t[n]);e._array.push(r)}}else e._array=Array.apply(null,arguments);return 2===arguments.length&&(e.notifyFn=arguments[1]),t}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;t.canNotify&&t.notifyFn&&t.notifyFn(e)}notify(e){e&&(this.notifyFn=e)}toArray(){return this._array}_getItem(e,t){const n=this;return"string"==typeof t||"number"==typeof t||void 0===t?t:new Proxy(t,{deleteProperty:function(e,t){return delete e[t],!0},set:function(t,r,o){const i=t[r];return t[r]=o,!n._canNotify||!1===t.canNotify||(n.observables&&!n.observables[r]||n._notify({eventName:"change",object:n,target:t,action:"update",index:e,path:e+"."+r,oldValue:i,newValue:o,propertyName:r}),!0)}})}getItem(e){return this._array[e]}setItem(e,t){const n=this,r=n._array[e];n._array[e]=n._getItem(e,t),n._notify({eventName:"change",object:n._array,action:"update",index:e,removed:[r],addedCount:1})}get length(){return this._array.length}set length(e){const t=this;o.isNumber(e)&&t._array&&t._array.length!==e&&t.splice(e,t._array.length-e)}toString(){return this._array.toString()}toLocaleString(){return this._array.toLocaleString()}concat(){const e=this;e._addArgs.index=e._array.length;const t=e._array.concat.apply(e._array,arguments);return new Smart.ObservableArray(t)}join(e){return this._array.join(e)}pop(){const e=this;e._removeArgs.index=e._array.length-1,delete e[e._array.length-1];const t=e._array.pop();return e._removeArgs.removed=[t],e._notify(e._removeArgs),e._notifyLengthChange(),t}push(){const e=this;if(e._addArgs.index=e._array.length,1===arguments.length&&Array.isArray(arguments[0])){const t=arguments[0];for(let n=0,r=t.length;n<r;n++){const r=e._getItem(e._array.length,t[n]);e._array.push(r)}}else{const t=e._getItem(e._addArgs.index,arguments[0]);e._array.push.apply(e._array,[t])}return e._addArgs.addedCount=e._array.length-e._addArgs.index,e._notify(e._addArgs),e._notifyLengthChange(),e._array.length}_notifyLengthChange(){const e=this;if(!e.canNotify)return;const t=e._createPropertyChangeData("length",e._array.length);e._notify(t)}_createPropertyChangeData(e,t,n){return{eventName:"change",object:this,action:e,value:t,oldValue:n}}reverse(){return this._array.reverse()}shift(){const e=this,t=e._array.shift();return e._removeArgs.index=0,e._removeArgs.removed=[t],e._notify(e._removeArgs),e._notifyLengthChange(),t}slice(e,t){return this._array.slice(e,t)}sort(e){return this._array.sort(e)}splice(e,t,n){const r=this,o=r._array.length;let i;if(n&&n.length)for(let o=0;o<n.length;o++)i=r._array.splice(e+o,t,n[o]);else i=r._array.splice.apply(r._array,arguments);if(n){let t=r.canNotify;if(r.canNotify=!1,n.length)for(let t=0;t<n.length;t++)r.setItem(e+t,n[t]);else r.setItem(e,n);r.canNotify=t,r._notify({eventName:"change",object:this,action:"add",index:e,added:i,addedCount:r._array.length>o?r._array.length-o:0})}else r._notify({eventName:"change",object:this,action:"remove",index:e,removed:i,addedCount:r._array.length>o?r._array.length-o:0});return r._array.length!==o&&r._notifyLengthChange(),i}unshift(){const e=this,t=e._array.length,n=e._array.unshift.apply(e._array,arguments);return e._addArgs.index=0,e._addArgs.addedCount=n-t,e._notify(this._addArgs),e._notifyLengthChange(),n}indexOf(e,t){const n=this;for(let r=t||0,o=n._array.length;r<o;r++)if(n._array[r]===e)return r;return-1}lastIndexOf(e,t){const n=this;for(let r=t||n._array.length-1;r>=0;r--)if(n._array[r]===e)return r;return-1}find(e,t){return this._array.find(e,t)}findIndex(e,t){return this._array.findIndex(e,t)}every(e,t){return this._array.every(e,t)}some(e,t){return this._array.some(e,t)}forEach(e,t){this._array.forEach(e,t)}map(e,t){return this._array.map(e,t)}filter(e,t){return this._array.filter(e,t)}reduce(e,t){return void 0!==t?this._array.reduce(e,t):this._array.reduce(e)}reduceRight(e,t){return void 0!==t?this._array.reduceRight(e,t):this._array.reduceRight(e)}move(e,t){this.splice(t,0,this.splice(e,1)[0])}}let D={};window[n]&&(D=window[n]),window[n]=function(e,t){let r=e;if(e){if(e.indexOf("#")>=0||e.indexOf(".")>=0)return u[e]?u[e]:t?(u[e]=new t,function(e,t){const n=t.properties;t._properties=[];const r=function(n,o){const i=Object.keys(n);for(let s=0;s<i.length;s++){const a=i[s],l=n[a];t._properties[o+a]=l,Array.isArray(l)?t._properties[o+a]=new P(l,(function(t){const n=a+"."+t.path,r=t.newValue,o=document.querySelector(e);if(o){const e=n.split(".");let t=o;for(let n=0;n<e.length;n++)t=t[e[n]];t=r}})):(Object.defineProperty(n,a,{configurable:!1,enumerable:!0,get:()=>t._properties[o+a],set(e){t._properties[o+a]=e}}),l&&"DataAdapter"===l.constructor.name||l&&"object"==typeof l&&Smart.DataAdapter&&l instanceof Smart.DataAdapter||"object"==typeof l&&l&&Object.keys(l).length>0&&r(l,o+a+"."))}};r(n,""),Object.defineProperty(t,"properties",{configurable:!1,enumerable:!0,get:()=>n});const o=document.querySelector(e);if(o&&o.isReady)for(let e in n)o[e]=n[e];else if(o){o.props={};for(let e in n)o.props[e]=n[e]}}(e,u[e]),u[e]):void 0;if(t){if(T.tagNames[e]=t,T.lazyRegister){T.toRegister||(T.toRegister=[]);const e=a.toCamelCase(r).replace(/[a-z]+/,"");return window[n][e]=t,void T.toRegister.push({tagName:r,element:t})}T.register(r,t)}}},window.addEventListener("load",(function(){const e=window[n].Elements.tagNames;let t=[];for(let r in e){const o=e[r];let i=document.querySelectorAll("["+r+"]");for(let e=0;e<i.length;e++){const t=i[e];t instanceof HTMLDivElement&&(t.__proto__=o.prototype,t.created(),t.connectedCallback()),t.classList.add("smart-element-ready")}let s=o.name;"Item"===s&&(s="ListItem"),i=document.querySelectorAll('[is="'+n.toLocaleLowerCase()+s+'"]');for(let e=0;e<i.length;e++)t.push(i[e])}if(t.length>0){const e=e=>{let t=[],n=e.parentNode;for(;n&&9!==n.nodeType;)n instanceof HTMLElement==1&&t.push(n),n=n.parentNode;return t};t.sort((function(t,n){let r=e(t).length,o=e(n).length;return r<o?1:r>o?-1:0}));for(let e=0;e<t.length;e++){const n=t[e],r=n.getAttribute("is");let o;o="smartItem"===r?new window.smartListItem(n):new window[r](n),o.removeAttribute("is")}}}));const L=function(){if("complete"===document.readyState&&"manual"!==window[n].RenderMode){x.sort((function(e,t){let n=e.element.parents.length,r=t.element.parents.length;return n<r?-1:n>r?1:0}));for(let e=0;e<x.length;e++)window[n].RenderMode="",x[e].element.isLoading=!1,x[e].callback(),window[n].RenderMode="";x=[],document.removeEventListener("readystatechange",L)}};Object.assign(window[n],{Elements:T,Modules:[],BaseElement:class extends _{static get observedAttributes(){let e=this,t=["external-style"];for(let n in e.prototype.extendedProperties){const r=e.prototype.extendedProperties[n];t.push(r.attributeName)}return t}static get styleUrls(){return[]}static get styles(){return""}get styleUrl(){return this._styleUrl}set styleUrl(e){this._styleUrl=e}get isInShadowDOM(){const e=this,t=e.getRootNode();return!e.hasAttribute("smart-blazor")&&t!==document&&t!==e}getShadowRootOrBody(){const e=this;return e.isInShadowDOM&&e.getRootNode().host?e.getRootNode().host.shadowRoot:document.body}get enableShadowDOM(){return window[n].EnableShadowDOM}importStyle(e,t){this._importStyle(e,t)}_importStyle(e,t){const n=this;if(!n.shadowRoot||!e)return;const r=e=>{const r=n.shadowRoot.children;for(let n=0;n<r.length;n++){const o=r[n];if(o instanceof HTMLLinkElement&&o.href===e)return t&&t(),null}const o=document.createElement("link");return o.rel="stylesheet",o.type="text/css",o.href=e,o.onload=t,o},o=(()=>{const e=n.shadowRoot.children;let t=null;for(let n=0;n<e.length;n++){const r=e[n];r instanceof HTMLLinkElement&&(t=r)}return t})(),i=(e,t)=>{t.parentNode.insertBefore(e,t.nextSibling)};if(Array.isArray(e)){const t=document.createDocumentFragment();for(let n=0;n<e.length;n++){const o=r(e[n]);o&&t.appendChild(o)}o?i(t,o):n.shadowRoot.insertBefore(t,n.shadowRoot.firstChild)}else{const t=r(e);if(!t)return;o?i(t,o):n.shadowRoot.insertBefore(t,n.shadowRoot.firstChild)}}attributeChanged(e,t,n){"style-url"===e&&(this.styleUrl=n)}attributeChangedCallback(e,t,n){this.isReady&&super.attributeChangedCallback(e,t,n)}constructor(e,t){super();const n=this;if(e){t&&(n._initProperties=t);const r=e=>{if("string"==typeof e?document.querySelector(e):e){const r="string"==typeof e?document.querySelector(e):e;if(r instanceof HTMLDivElement){const o=document.createElement(n.tagName);for(let e of r.attributes)o.setAttribute(e.name,r.getAttribute(e.name));for(;r.childNodes.length;)o.appendChild(r.firstChild);return"string"==typeof e&&(o.id=e.substring(1)),o._initProperties=t,r.parentNode&&r.parentNode.replaceChild(o,r),o}if(t){const e=r.context;if(r._initProperties=t,r.isReady){r.context=r;const n={},o={};for(let e in t)n[e]=r[e],o[e]=t[e];Object.getOwnPropertyNames(t).length>0&&(r.initProperties(),r.propertyChangedHandler(t,n,o)),r.context=e}}return r}};if("string"==typeof e){const t=document.querySelectorAll(e),n=[];if(t.length>1){for(let e=0;e<t.length;e++){const o=r(t[e]);n.push(o)}return n}}else if(e&&e.length>0){const t=e;if(t.length>1){for(let e=0;e<t.length;e++){const n=r(t[e]);C.push(n)}return C}}return r(e)}n._styleUrl="",n.isUtilityElement||n.created()}_getRootShadowParent(){let e=this.shadowParent;for(;e;){if(!e.shadowParent)return e;e=e.shadowParent}return e||this.shadowParent}_getStyleUrl(e){let t=y.Core.getScriptLocation()+window[n].StyleBaseUrl+e;return this.shadowParent&&(t=t.replace("scoped/","")),t}_getStyleUrls(){const e=this;e.nodeName.startsWith(n);const t=e.getStaticMember("styleUrls","array"),r=[];for(let n=0;n<t.length;n++){const o=t[n],i=e._getStyleUrl(o);r.push(i)}return r}_setupShadowRoot(){const e=this;e.classList.add("smart-element-init");const t=t=>{t.$.root&&(t.$.root.classList.add(n.toLowerCase()+"-element"),t.$.root.classList.add(e.nodeName.toLowerCase())),t.setup(),t.classList.remove("smart-element-init")};if(document.adoptedStyleSheets)if(window[n].AdoptedStyleSheets)window[n].AdoptedStyleSheetsLoaded?(e.shadowRoot.adoptedStyleSheets=window[n].AdoptedStyleSheets,t(e)):(e.shadowRoot.adoptedStyleSheets=window[n].AdoptedStyleSheets,window[n].AdoptedStyleSheetsLoadedQueue||(window[n].AdoptedStyleSheetsLoadedQueue=[]),window[n].AdoptedStyleSheetsLoadedQueue.push(e));else{const r=new CSSStyleSheet;let o=y.Core.getScriptLocation()+"/styles/smart.default.css";r.replace('@import url("'+o+'")').then((()=>{if(t(e),window[n].AdoptedStyleSheetsLoaded=!0,window[n].AdoptedStyleSheetsLoadedQueue){const e=window[n].AdoptedStyleSheetsLoadedQueue;for(let n=0;n<e.length;n++){const r=e[n];t(r)}delete window[n].AdoptedStyleSheetsLoadedQueue}})).catch((e=>{console.error("Failed to load:",e)})),window[n].AdoptedStyleSheets=[r],document.adoptedStyleSheets=[r],e.shadowRoot.adoptedStyleSheets=window[n].AdoptedStyleSheets}}connect(){const e=this;window[n].EnableShadowDOM&&!e.shadowRoot&&!0!==e.isInShadowDOM&&(e.attachShadow({mode:"open"}),e.shadowRoot&&e.$.root&&(e.shadowRoot.appendChild(e.$.root),e.$.root.classList.add(e.nodeName.toLowerCase()))),e.shadowRoot||e.shadowParent?e.shadowRoot?e._setupShadowRoot():(e.shadowParent&&window[n].EnableShadowDOM,e.setup()):e.setup()}connectedCallback(){const e=this;if(e.isLoading||e.isUtilityElement)return;e.classList.add("smart-element-init");const t=function(){e.classList.remove("smart-element-init")};if("complete"===document.readyState&&(void 0===window[n].isAngular&&(window[n].isAngular=null!==document.body.querySelector("[ng-version]")),window[n].isAngular))for(let t=0;t<e.parents.length&&!e.parents[t].nodeName.toLowerCase().startsWith(n.toLowerCase()+"-");t++)if(e.parents[t].hasAttribute("ng-version")&&!e.classList.contains("smart-angular")){window[n].RenderMode="manual";break}if("complete"===document.readyState&&"manual"!==window[n].RenderMode){const n=e.parents;n.length&&"HTML"===n[n.length-1].nodeName||e.getRootNode().host?(e.checkIsInDomTimer&&clearInterval(e.checkIsInDomTimer),t(),e.connect()):(e.checkIsInDomTimer&&clearInterval(e.checkIsInDomTimer),n.length>0&&(e.checkIsInDomTimer=setInterval((()=>{const n=e.parents;0===n.length&&clearInterval(e.checkIsInDomTimer),n.length>0&&"HTML"===n[n.length-1].nodeName&&(clearInterval(e.checkIsInDomTimer),t(),e.connect())}),100)))}else e.isLoading=!0,x.push({element:this,callback:function(){this.isReady||(t(),this.connect())}.bind(e)})}disconnectedCallback(){const e=this;e.isAttached?(e.shadowParent=null,e.detached()):e._resetShadowParent()}adoptedCallback(){this.setup()}appendTemplate(e){const t=this;t.shadowRoot?t.shadowRoot.appendChild(e):t.appendChild(e)}_resetShadowParent(){const e=this;if(!window[n].EnableShadowDOM||null===e.shadowParent)return;const t=[];let r=e.parentNode;for(;r&&9!==r.nodeType;){if(r instanceof HTMLElement==1)t.push(r);else if(11===r.nodeType&&r.host){r=r.host;continue}r=r.parentNode}for(let n=0;n<t.length;n++)if(t[n]===e.shadowParent)return;t.length>0&&"HTML"===t[t.length-1].nodeName&&(e.shadowParent=null)}},Utilities:y,Import:function(e,t){let n=0;const r=function(e,t){return new Promise((n=>{const r=document.createElement("script");r.src=e,r.onload=n;for(let e=0;e<document.head.children.length;e++){const r=document.head.children[e];if(r.src&&r.src.toString().indexOf(t)>=0)return void n()}document.head.appendChild(r)}))};return new Promise((o=>{const i=y.Core.getScriptLocation(),s=function(t){if(!e[t])return;const a=i+"/"+e[t];r(a,e[t]).then((function(){n++,n===e.length&&o(),s(t+1)}))};if(t)for(let t=0;t<e.length;t++){const s=i+"/"+e[t];r(s,e[t]).then((function(){n++,n===e.length&&o()}))}else s(0)}))},ObservableArray:P,Observable:class{constructor(e,t){const n=this;var r;return this.name="observable",e&&Object.assign(n,e),r=e,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((e=>"constructor"===e||!!e.startsWith("_")||void(n[e]=r[e]))),new Proxy(n,{deleteProperty:function(e,t){return delete e[t],!0},get:function(e,t){return e[t]},set:function(e,r,o){const i=e[r];return i===o||(e[r]=o,!("notifyFn"!==r&&!r.startsWith("_")&&"canNotify"!==r&&(!t||-1!==t.indexOf(r))&&n.canNotify&&(n._notify({target:e,propertyName:r,oldValue:i,newValue:o}),0)))}})}get canNotify(){const e=this;return void 0===e._canNotify&&(e._canNotify=!0),e._canNotify}set canNotify(e){this._canNotify=e}_notify(e){const t=this;if(t.canNotify&&t.notifyFn)for(let n=0;n<t.notifyFn.length;n++)t.notifyFn[n](e)}notify(e){const t=this;e&&(t.notifyFn||(t.notifyFn=[]),t.notifyFn.push(e))}},Component:class{constructor(e,t){const n=this.name;let r=null;return e?r=new window[n](e,t):(r=new window[n],r._initProperties=t),this._element=r,r}get name(){return"Component"}get element(){return this._element}},Theme:D.Theme||"",EnableShadowDOM:D.ShadowDom||!1,BaseUrl:"./",StyleBaseUrl:"/styles/default/",Version:e,Templates:t,RenderMode:D.RenderMode||"auto",Render:function(){const e=()=>{window[n].RenderMode="",L()};"complete"===document.readyState?e():(window.removeEventListener("load",e),window.addEventListener("load",e))},Data:u,Mode:D.Mode||"production",License:D.License||"Evaluation"});let O=window[n].Theme;"manual"!==window[n].RenderMode&&document.addEventListener("readystatechange",L),Object.defineProperty(window[n],"Theme",{configurable:!1,enumerable:!0,get:()=>O,set(e){const t=O;O=e,w.fireEvent("theme-changed",{oldValue:t,newValue:e},{bubbles:!0,cancelable:!0})}}),window[n]("smart-base-element",window[n].BaseElement),window[n]("smart-content-element",class extends window[n].BaseElement{static get properties(){return{content:{type:"any",reflectToAttribute:!1},innerHTML:{type:"string",reflectToAttribute:!1}}}template(){return"<div inner-h-t-m-l='[[innerHTML]]'></div>"}ready(){super.ready(),this.applyContent()}refresh(){}clearContent(){const e=this;for(;e.$.content.firstChild;)e.$.content.removeChild(e.$.content.firstChild)}applyContent(){const e=this;if(void 0===e.content)return void(e.content=e.$.content);if(""===e.content||null===e.content)return void e.clearContent();if(e.content instanceof HTMLElement)return e.clearContent(),void e.$.content.appendChild(e.content);const t=document.createDocumentFragment();let n=document.createElement("div");t.appendChild(n),e.content instanceof HTMLElement?n.appendChild(e.content):n.innerHTML=e.content;let r=Array.from(n.childNodes);n.parentNode.removeChild(n);for(let e=0;e<r.length;e++)t.appendChild(r[e]);e.clearContent(),e.$.content.appendChild(t)}propertyChangedHandler(e,t,n){super.propertyChangedHandler(e,t,n);const r=this;t!==n&&("innerHTML"===e&&(r.content=n,r.applyContent(),r.innerHTML=r.content=y.Core.html(r.$.content)),"content"===e&&r.applyContent())}}),window[n]("smart-scroll-viewer",class extends window[n].ContentElement{static get properties(){return{autoRefresh:{type:"boolean",value:!1},horizontalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]},touchScrollRatio:{type:"any",value:null},touchVelocityCoefficient:{type:"number",value:50},verticalScrollBarVisibility:{type:"string",value:"auto",allowedValues:["auto","disabled","hidden","visible"]}}}static get listeners(){return{touchmove:"_touchmoveHandler",touchstart:"_touchstartHandler",wheel:"_mouseWheelHandler","document.up":"_upHandler"}}static get styleUrls(){return["smart.scrollviewer.css"]}template(){return'<div id="container" class="smart-container" role="presentation">\n <div id="scrollViewerContainer" class="smart-scroll-viewer-container" role="presentation">\n <div id="scrollViewerContentContainer" inner-h-t-m-l=\'[[innerHTML]]\' class="smart-scroll-viewer-content-container" role="presentation">\n <content></content>\n </div>\n </div>\n <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]" animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>\n <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>\n </div>'}appendChild(e){const t=this;if(e){if(!t.isCompleted||e.classList&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.appendChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}t.$.scrollViewerContentContainer.appendChild(e)}}removeChild(e){const t=this;if(e){if(!t.isCompleted||e.classList&&e.classList.contains("smart-resize-trigger-container")){const e=Array.prototype.slice.call(arguments,2);return HTMLElement.prototype.removeChild.apply(t,e.concat(Array.prototype.slice.call(arguments)))}t.$.scrollViewerContentContainer.removeChild(e)}}removeAll(){const e=this;e.isCompleted&&(e.$.scrollViewerContentContainer.innerHTML="")}_horizontalScrollbarHandler(e){const t=this;t.$.scrollViewerContentContainer.style.left=(t.rightToLeft?1:-1)*t.scrollLeft+"px",e.stopPropagation&&e.stopPropagation(),t.onHorizontalChange&&t.onHorizontalChange(e)}_verticalScrollbarHandler(e){const t=this;t.$.scrollViewerContentContainer.style.top=-t.scrollTop+"px",e.stopPropagation&&e.stopPropagation(),t.onVerticalChange&&t.onVerticalChange(e)}_touchmoveHandler(e){const t=this;if(t._touchmoveInside&&e.cancelable)return e.preventDefault(),void e.stopPropagation();const n=t.scrollHeight>0,r=t.scrollWidth>0,o=t._touchCoords;if(!n&&!r||!o)return;const i=e.touches[0];let s,a,l,d;t._touchCoords=[i.pageX,i.pageY],n?(s=t.scrollTop,a=t.scrollHeight,l=i.pageY,d=o[1]):(s=t.scrollLeft,a=t.scrollWidth,l=i.pageX,d=o[0]);const c=parseFloat(l.toFixed(5)),u=parseFloat(d.toFixed(5));0===s&&c>=u||s===a&&c<=u||(l!==d&&(t._touchmoveInside=!0),e.cancelable&&(e.preventDefault(),e.stopPropagation()))}_touchstartHandler(e){const t=e.touches[0];this._touchCoords=[t.pageX,t.pageY]}_mouseWheelHandler(e){const t=this;if(!t.disabled&&(t.computedHorizontalScrollBarVisibility||t.computedVerticalScrollBarVisibility)){if(e.shiftKey&&t.computedHorizontalScrollBarVisibility){const n=t.scrollLeft;if(0===n&&e.deltaX<0||n===t.scrollHeight&&e.deltaX>0)return;return e.stopPropagation(),e.preventDefault(),void(t.scrollWidth>0&&t.scrollTo(void 0,t.scrollLeft+t._getScrollCoefficient(e,t.offsetWidth)))}if(t.computedVerticalScrollBarVisibility){const n=t.scrollTop;if(0===n&&e.deltaY<0||n===t.scrollHeight&&e.deltaY>0)return;e.stopPropagation(),e.preventDefault(),t.scrollHeight>0&&t.scrollTo(t.scrollTop+t._getScrollCoefficient(e,t.offsetHeight))}}}_overriddenHandler(){}_upHandler(){delete this._touchCoords,delete this._touchmoveInside}_getScrollCoefficient(e,t){const n=e.deltaMode,r=Math.abs(e.deltaY);let o;return 0===n?o=r<100/3?r:t:1===n?o=r<1?r*(100/3):t:2===n&&(o=t),e.deltaY<0?-o:o}applyContent(){super.applyContent(),this.refresh()}get computedHorizontalScrollBarVisibility(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?!e._scrollView.hScrollBar.$.hasClass("smart-hidden"):null}get computedVerticalScrollBarVisibility(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?!e._scrollView.vScrollBar.$.hasClass("smart-hidden"):null}scrollTo(e,t){const n=this;n._scrollView&&(void 0!==e&&n._scrollView.scrollTo(e),void 0!==t&&n._scrollView.scrollTo(t,!1))}refreshScrollBarsVisibility(){const e=this;e._scrollView&&(e._scrollView.hScrollBar.disabled=e.disabled,e._scrollView.vScrollBar.disabled=e.disabled,"disabled"===e.horizontalScrollBarVisibility&&(e._scrollView.hScrollBar.disabled=!0),"disabled"===e.verticalScrollBarVisibility&&(e._scrollView.vScrollBar.disabled=!0),e.scrollWidth>0?e._scrollView.hScrollBar.$.removeClass("smart-hidden"):"visible"!==e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.addClass("smart-hidden"),e.scrollHeight>0?e._scrollView.vScrollBar.$.removeClass("smart-hidden"):"visible"!==e.verticalScrollBarVisibility&&e._scrollView.vScrollBar.$.addClass("smart-hidden"),"hidden"===e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.addClass("smart-hidden"),"hidden"===e.verticalScrollBarVisibility&&e._scrollView.vScrollBar.$.addClass("smart-hidden"),"visible"===e.horizontalScrollBarVisibility&&e._scrollView.hScrollBar.$.removeClass("smart-hidden"),"visible"===e.verticalScrollBarVisibility&&(e._scrollView.vScrollBar.$.removeClass("smart-hidden"),e.disabled||(e._scrollView.vScrollBar.disabled=e.scrollHeight<=0)),e.computedHorizontalScrollBarVisibility&&e.computedVerticalScrollBarVisibility?(e._scrollView.hScrollBar.$.addClass("bottom-corner"),e._scrollView.vScrollBar.$.addClass("bottom-corner")):(e._scrollView.hScrollBar.$.removeClass("bottom-corner"),e._scrollView.vScrollBar.$.removeClass("bottom-corner")))}ready(){super.ready();const e=this;e.$.verticalScrollBar.onChange=t=>{t.detail=t,e._verticalScrollbarHandler(t)},e.$.horizontalScrollBar.onChange=t=>{t.detail=t,e._horizontalScrollbarHandler(t)},e.$.verticalScrollBar.setAttribute("aria-controls",e.id),e.$.horizontalScrollBar.setAttribute("aria-controls",e.id),e._customScrollView||(e._scrollView=new Smart.Utilities.Scroll(e,e.$.horizontalScrollBar,e.$.verticalScrollBar)),e.refresh()}refresh(){const e=this;function t(){const t=e.$.scrollViewerContainer.classList.contains("vscroll");e.$.scrollViewerContainer.classList.remove("vscroll");const n=e.$.scrollViewerContentContainer.offsetWidth-e.$.scrollViewerContainer.offsetWidth;return n>0&&"hidden"!==e.horizontalScrollBarVisibility||"visible"===e.horizontalScrollBarVisibility?e.$.scrollViewerContainer.classList.add("hscroll"):e.$.scrollViewerContainer.classList.remove("hscroll"),t&&e.$.scrollViewerContainer.classList.add("vscroll"),n}function n(){let t;const n=e.$.scrollViewerContainer.classList.contains("hscroll");if(e.$.scrollViewerContainer.classList.remove("hscroll"),Smart.Utilities.Core.Browser.Safari){const n=e.$.scrollViewerContentContainer.getBoundingClientRect().height,r=e.$.scrollViewerContainer.getBoundingClientRect().height;t=n&&r?parseInt(n)-parseInt(r):e.$.scrollViewerContentContainer.offsetHeight-e.$.scrollViewerContainer.offsetHeight}else t=e.$.scrollViewerContentContainer.offsetHeight-e.$.scrollViewerContainer.offsetHeight;return e.virtualScrollHeight&&(t=e.virtualScrollHeight),t>0&&"hidden"!==e.verticalScrollBarVisibility||"visible"===e.verticalScrollBarVisibility?e.$.scrollViewerContainer.classList.add("vscroll"):e.$.scrollViewerContainer.classList.remove("vscroll"),n&&e.$.scrollViewerContainer.classList.add("hscroll"),t}if(!e.$.scrollViewerContentContainer)return;"hidden"===e.verticalScrollBarVisibility&&e.$.scrollViewerContentContainer.setAttribute("disable-vertical",""),"hidden"===e.horizontalScrollBarVisibility&&e.$.scrollViewerContentContainer.setAttribute("disable-horizontal","");let r=e.scrollWidth,o=e.scrollHeight;e.scrollWidth=t(),e.scrollHeight=n(),e.scrollHeight&&o===e.scrollHeight||(e.scrollWidth=t()),e.scrollWidth&&r===e.scrollWidth||(e.scrollHeight=n()),e.computedVerticalScrollBarVisibility&&(e.scrollHeight+=e._scrollView.hScrollBar.offsetHeight),e.computedHorizontalScrollBarVisibility&&(e.scrollWidth+=e._scrollView.vScrollBar.offsetWidth),0===e.scrollHeight&&e.scrollWidth>0&&e.$.container.offsetHeight-e.$.content.offsetHeight<5&&(e.$.container.style.paddingBottom=e._scrollView.hScrollBar.offsetHeight+"px"),e.autoRefresh&&(e.$.scrollViewerContainer.scrollLeft=0,e.$.scrollViewerContainer.scrollTop=0)}attached(){const e=this;super.attached(),e._scrollView||e._customScrollView||(e._scrollView=new Smart.Utilities.Scroll(e,e.$.horizontalScrollBar,e.$.verticalScrollBar))}detached(){const e=this;super.detached(),e._scrollView&&(e._scrollView.unlisten(),delete e._scrollView)}get scrollWidth(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?1===e._scrollView.hScrollBar.max&&"visible"===e.horizontalScrollBarVisibility?0:e._scrollView.hScrollBar.max:-1}set scrollWidth(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.hScrollBar&&(0===e&&"visible"===t.horizontalScrollBarVisibility?t._scrollView.hScrollBar.max=0:t._scrollView.hScrollBar.max=e,t.refreshScrollBarsVisibility())}get scrollHeight(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?1===e._scrollView.vScrollBar.max&&"visible"===e.verticalScrollBarVisibility?0:e._scrollView.vScrollBar.max:0}set scrollHeight(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.vScrollBar&&(0===e&&"visible"===t.verticalScrollBarVisibility?t._scrollView.vScrollBar.max=1:t._scrollView.vScrollBar.max=e,t.refreshScrollBarsVisibility())}get scrollLeft(){const e=this;return e._scrollView&&e._scrollView.hScrollBar?e._scrollView.hScrollBar.value:0}set scrollLeft(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.hScrollBar&&(t._scrollView.hScrollBar.value=e)}get scrollTop(){const e=this;return e._scrollView&&e._scrollView.vScrollBar?e._scrollView.vScrollBar.value:0}set scrollTop(e){const t=this;e<0&&(e=0),t._scrollView&&t._scrollView.vScrollBar&&(t._scrollView.vScrollBar.value=e)}propertyChangedHandler(e,t,n){const r=this;super.propertyChangedHandler(e,t,n),"animation"!==e&&"theme"!==e&&r.refresh()}}),window[n].Utilities.Assign("PositionDetection",class{constructor(e,t,n,r){const o=this;if(t){const n="dropDown"+Math.floor(65536*(1+Math.random())).toString(16).substring(1);t.id=n,e.setAttribute("aria-owns",n)}o.context=e,o.dropDown=t,o.defaultParent=n,o.closeMethod=r}handleAutoPositioning(){const e=this,t=e.context;if("auto"!==t.dropDownPosition||t.disabled||t.isHidden)return;const n=window.requestAnimationFrame;let r,o=Date.now();return r=n((function i(){t.isHidden||document.hidden||(r=n(i),"auto"===t.dropDownPosition&&!t.disabled&&(t.isInShadowDOM?document.body.contains(t.shadowParent):document.body.contains(t))||cancelAnimationFrame(r),t.isHidden&&cancelAnimationFrame(r),Date.now()-o>=200&&(e.scrollHandler(),o=Date.now()))}))}checkBrowserBounds(e){const t=this.context;if("auto"===t.dropDownPosition&&!t.disabled)switch(e){case"vertically":this.checkBrowserBoundsVertically();break;case"horizontally":this.checkBrowserBoundsHorizontally();break;default:this.checkBrowserBoundsVertically(),this.checkBrowserBoundsHorizontally()}}checkBrowserBoundsHorizontally(){const e=this.context,t=this.dropDown;let n,r=0;a.isMobile||window.innerWidth===document.documentElement.clientWidth||(r=window.innerWidth-document.documentElement.clientWidth),null!==e._dropDownParent?n=!0:t.style.left="";const o=window.innerWidth-r;let i=e.getBoundingClientRect().left;if(i<0&&(t.style.left=(n?0:Math.abs(i))+"px",i=parseFloat(t.style.left)),i+t.offsetWidth>o){let e=i-Math.abs(o-i-t.offsetWidth);n&&(e+=window.pageXOffset),t.style.left=(n?e:e-i)+"px",window.innerWidth===document.documentElement.clientWidth&&(t.style.left=parseFloat(t.style.left)+r+"px"),n&&window.innerHeight===document.documentElement.clientHeight&&this.positionDropDown(!0)}}checkBrowserBoundsVertically(e){const t=this.context,n=this.dropDown,r=t._dropDownListPosition;e||(e=t.getBoundingClientRect()),0!==e.height&&(document.documentElement.clientHeight-Math.abs(e.top+e.height+n.offsetHeight)>=0?t._dropDownListPosition="bottom":e.top-n.offsetHeight>=0?t._dropDownListPosition="top":t._dropDownListPosition="overlay-center",this.updatePositionAttribute(r,t._dropDownListPosition))}scrollHandler(){const e=this.context;if(!e.parentElement)return;const t=e.getBoundingClientRect();if(t.top===e._positionTop)return;const n=e._dropDownListPosition;this.checkBrowserBoundsVertically(t),e._dropDownListPosition!==n&&this.positionDropDown(),e._positionTop=t.top}getDropDownParent(e){const t=this.context,n=this.dropDown;let r=t.dropDownAppendTo;t._positionedParent=null,null===r?t._dropDownParent=null:"body"===r||r===document.body?t.getRootNode().host?t._dropDownParent=t.getRootNode().host.shadowRoot:t._dropDownParent=document.body:r instanceof HTMLElement?t._dropDownParent=r:"string"==typeof r?(r=document.getElementById(r),r instanceof HTMLElement?t._dropDownParent=r:(t.dropDownAppendTo=null,t._dropDownParent=null)):(t.dropDownAppendTo=null,t._dropDownParent=null);let o=t._dropDownParent;if(null!==o){for(;o&&o instanceof HTMLElement&&"static"===window.getComputedStyle(o).position&&o!==t.getShadowRootOrBody();)o=o.parentElement;o===document.body?t._positionedParent=null:t._positionedParent=o,n&&(n.setAttribute("animation",t.animation),""!==t.theme&&n.$.addClass(t.theme),e&&(t._dropDownParent.appendChild(n),n.$.addClass("smart-drop-down-repositioned")),-1===t.detachedChildren.indexOf(n)&&t.detachedChildren.push(n))}}dropDownAppendToChangedHandler(){const e=this.context,t=this.dropDown,n=e._dropDownParent;this.getDropDownParent(),e._dropDownParent!==n&&(e[this.closeMethod](),["left","top","font-size","font-family","font-style","font-weight"].forEach((e=>t.style[e]=null)),null===e._dropDownParent?(this.defaultParent.appendChild(t),t.$.removeClass("smart-drop-down-repositioned")):(e._dropDownParent.appendChild(t),t.$.addClass("smart-drop-down-repositioned")))}dropDownPositionChangedHandler(){const e=this;e.dropDown.style.transition="none",e.context[e.closeMethod](),e.setDropDownPosition(),e.handleAutoPositioning()}dropDownAttached(e){const t=this.context;null!==t._dropDownParent&&(t._dropDownParent.appendChild(this.dropDown),this.handleAutoPositioning(),e&&t[e]())}dropDownDetached(){const e=this.context;null!==e._dropDownParent&&document.body.contains(this.dropDown)&&document.body.contains(e._dropDownParent)&&e._dropDownParent.removeChild(this.dropDown)}setDropDownPosition(){const e=this.context,t=e.dropDownPosition,n=e._dropDownListPosition;"auto"===t?this.checkBrowserBounds():e._dropDownListPosition=t,this.updatePositionAttribute(n,e._dropDownListPosition)}updatePositionAttribute(e,t){const n=this.context,r=this.dropDown;n.$.dropDownButton&&!n.$.dropDownButton.hasAttribute(t)&&(n.$.dropDownButton.removeAttribute(e),n.$.dropDownButton.setAttribute(t,"")),r.hasAttribute(t)||(r.style.transition="none",r.removeAttribute(e),r.setAttribute(t,""),requestAnimationFrame((function(){r.style.transition=null})))}positionDropDown(e){const t=this.context,n=this.dropDown;if(!t.opened||null===t._dropDownParent)return;const r=t.getBoundingClientRect();let o,i;if(this.customPositionDropDown){const e=this.customPositionDropDown(r);o=e.left,i=e.top}else switch(o=r.left,i=r.top,t._dropDownListPosition){case"bottom":i+=t.$.container.offsetHeight-1;break;case"center-bottom":i+=t.$.container.offsetHeight-1,o+=t.offsetWidth-n.offsetWidth/2;break;case"center-top":i-=n.offsetHeight-1,o+=t.offsetWidth-n.offsetWidth/2;break;case"top":i-=n.offsetHeight-1;break;case"overlay-bottom":break;case"overlay-center":i-=n.offsetHeight/2-t.offsetHeight/2;break;case"overlay-top":i-=n.offsetHeight-t.offsetHeight}const s=this.getDropDownOffset();n.style.top=i+s.y+"px",e||(n.style.left=o+s.x+"px")}getDropDownOffset(){const e=this.context._positionedParent;let t,n;if(e&&"#document-fragment"!==e.nodeName){const r=e.getBoundingClientRect();t=-r.left,n=-r.top}else t=window.pageXOffset,n=window.pageYOffset;return{x:t,y:n}}placeOverlay(){const e=this.context;if(!e.dropDownOverlay||e._overlay)return;const t=document.createElement("div");t.classList.add("smart-drop-down-overlay"),t.style.width=document.documentElement.scrollWidth+"px",t.style.height=document.documentElement.scrollHeight+"px",document.body.appendChild(t),e._overlay=t}removeOverlay(e){const t=this,n=t.context;n._overlay&&(n.hasAnimation&&e?requestAnimationFrame((function e(){t.dropDown.getBoundingClientRect().height>0?requestAnimationFrame(e):(document.body.removeChild(n._overlay),delete n._overlay)})):(document.body.removeChild(n._overlay),delete n._overlay))}}),window.Smart.Color=class{constructor(e){if(window.Smart._colors||(window.Smart._colors=[]),window.Smart._colors[e]){const t=window.Smart._colors[e];return this.hex=t.hex,this.r=t.r,this.g=t.g,void(this.b=t.b)}this.r=this.g=this.b=0,this.hex="";const t=this.getStandardizedColor(e);t&&(this.setHex(t.substring(1)),window.Smart._colors[e]={hex:this.hex,r:this.r,g:this.g,b:this.b})}getStandardizedColor(e){const t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,t.fillStyle}getInvertedColor(){return""===this.hex?"transparent":255-(.299*this.r+.587*this.g+.114*this.b)<105?"Black":"White"}hexToRgb(e){let t="00",n="00",r="00";return 6===(e=this.validateHex(e)).length?(t=e.substring(0,2),n=e.substring(2,4),r=e.substring(4,6)):(e.length>4&&(t=e.substring(4,e.length),e=e.substring(0,4)),e.length>2&&(n=e.substring(2,e.length),e=e.substring(0,2)),e.length>0&&(r=e.substring(0,e.length))),{r:this.hexToInt(t),g:this.hexToInt(n),b:this.hexToInt(r)}}validateHex(e){return(e=(e=new String(e).toUpperCase()).replace(/[^A-F0-9]/g,"0")).length>6&&(e=e.substring(0,6)),e}webSafeDec(e){return e=Math.round(e/51),e*=51}hexToWebSafe(e){let t,n,r;return 3===e.length?(t=e.substring(0,1),n=e.substring(1,1),r=e.substring(2,1)):(t=e.substring(0,2),n=e.substring(2,4),r=e.substring(4,6)),this.intToHex(this.webSafeDec(this.hexToInt(t)))+this.intToHex(this.webSafeDec(this.hexToInt(n)))+this.intToHex(this.webSafeDec(this.hexToInt(r)))}rgbToWebSafe(e){return{r:this.webSafeDec(e.r),g:this.webSafeDec(e.g),b:this.webSafeDec(e.b)}}rgbToHex(e){return this.intToHex(e.r)+this.intToHex(e.g)+this.intToHex(e.b)}intToHex(e){let t=parseInt(e).toString(16);return 1===t.length&&(t="0"+t),t.toUpperCase()}hexToInt(e){return parseInt(e,16)}setRgb(e,t,n){let r=function(e){return e<0||e>255||isNaN(parseInt(e))?0:e};this.r=r(e),this.g=r(t),this.b=r(n),this.hex=this.rgbToHex(this)}setHex(e){this.hex=e;let t=this.hexToRgb(this.hex);this.r=t.r,this.g=t.g,this.b=t.b}}}();
/***/ }),
/***/ 6802:
/***/ (() => {
Smart.Utilities.Assign("DataExporter",class{constructor(e,t,a,o){const l=this;e||(e={}),l.style=e.style,l.header=e.header,l.exportHeader=void 0===e.exportHeader||e.exportHeader,l.hierarchical=e.hierarchical,l.expandChar=e.expandChar||"+",l.collapseChar=e.collapseChar||"-",l.pageOrientation=e.pageOrientation,l.allowNull=e.allowNull||!1,!l.hierarchical&&t&&t.length>0?l.groupBy=t:l.mergedCells=e.mergedCells,!l.groupBy&&a&&Object.keys(a).length>0&&(l.filterBy=a),o&&(l.conditionalFormatting=o),l.timeBetween1900And1970=new Date(1970,0,1,0,0,0).getTime()-new Date(1900,0,1,0,0,0).getTime()}downloadFile(e,t,a){let o;if(!a)return e;if(o=e instanceof Blob?e:new Blob([e],{type:t}),window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(o,a);else{const e=document.createElement("a"),t=URL.createObjectURL(o);e.href=t,e.download=a,e.style.position="absolute",e.style.visibility="hidden",document.body.appendChild(e),e.click(),setTimeout((function(){document.body.removeChild(e),window.URL.revokeObjectURL(t)}),100)}}exportData(e,t,a,o){const l=this;if(l.actualHierarchy=l.hierarchical,t=t.toLowerCase(),l.exportHeader&&(l.header?(0===(e=e.slice(0)).length&&(l.actualHierarchy=!1),l.processComplexHeader(l.header,e,t)):1===e.length&&(l.actualHierarchy=!1)),0===e.length)return void console.warn("No data to export.");"xlsx"===t&&(l.xlsxStartIndex=l.complexHeader?l.complexHeader.length:+l.exportHeader),l.actualHierarchy&&(e=l.processHierarchicalData(e,t)),l.getDatafields(e),a&&a.slice(a.length-t.length-1,a.length)!=="."+t&&(a+="."+t);let r=null;switch(t){case"csv":r=l.exportToCSVAndTSV(e,{delimiter:", ",MIME:"text/csv",toRemove:2},a);break;case"html":r=l.exportToHTML(e,a);break;case"jpeg":case"png":l.exportToImage(e,a,t,o);break;case"json":r=l.exportToJSON(e,a);break;case"pdf":r=l.exportToPDF(e,a);break;case"tsv":r=l.exportToCSVAndTSV(e,{delimiter:"\t",MIME:"text/tab-separated-values",toRemove:1},a);break;case"xlsx":r=l.exportToXLSX(e,a);break;case"xml":r=l.exportToXML(e,a);break;case"md":r=l.exportToMD(e,a)}return o&&r&&o(r),delete l.complexHeader,r}exportToCSVAndTSV(e,t,a){const o=this,l=o.datafields;let r="";for(let a=0;a<e.length;a++){const n=e[a];let s="";for(let e=0;e<l.length;e++)o.actualHierarchy&&0===e?s+=('""'+t.delimiter).repeat(n._level-1)+'"'+n[l[e]]+'"'+t.delimiter+('""'+t.delimiter).repeat(o.maxLevel-n._level):s+='"'+n[l[e]]+'"'+t.delimiter;s=s.slice(0,s.length-t.toRemove)+"\n",r+=s}return this.downloadFile(r,t.MIME,a)}exportToHTML(e,t){const a=this,o=a.datafields,l=a.style;let r="",n=0,s="";e=a.processGroupingInformation(e),a.data=e,a.exportHeader&&(r=a.getHTMLHeader(o,e),n=1),arguments[2]&&(s=`<script type="text/javascript" src="${Array.from(document.getElementsByTagName("script")).find((e=>-1!==e.src.indexOf("html2canvas"))).src}"><\/script>`);let i=`<!DOCTYPE html>\n<html>\n<head>\n <meta charset="UTF-8">\n <style type="text/css">\n${a.getRowStyle()}${a.getColumnStyle()}\n </style>${s}${a.toggleableFunctionality()}\n</head>\n<body>\n <table${a.getTableStyle()}>${r}\n <tbody>\n`;const c={},p={},m=[];a.getMergedCellsInfo(c,p);e:for(let r=n;r<e.length;r++){const s=e[r],f=r-n;let d=a.getAlternationIndex(f," rowN"),h="",g="",u="",y=0;if(a.actualHierarchy)s._collapsed&&(h=" collapsed"),g=` level="${s._level}"`;else if(a.groupBy)for(let e=0;e<a.groupBy.length;e++){const t=a.groupBy[e],o=s[t],l=a.groups[t][o];if(u+=o,-1===m.indexOf(u)){i+=` <tr class="row">\n <td class="column group" style="padding-left: ${25*y}px;" colspan="${a.datafields.length}">${l}</td>\n </tr>`,m.push(u),r--;continue e}y++}let x=` <tr class="row row${f}${d}${h}"${g}`;t||(x+=' style="page-break-inside: avoid;"'),x+=">\n";for(let e=0;e<o.length;e++){const t=e+","+f;let r=1,n=1;if(c[t])r=c[t].colspan,n=c[t].rowspan;else if(p[t])continue;const i=o[e];let m=s[i],d="";if(a.actualHierarchy&&0===e){let e="";s._expanded?e=a.collapseChar:!1===s._expanded&&(e=a.expandChar),d=`<div class="toggle-element" style="margin-left: ${25*(s._level-1)+5}px;" expanded>${e}</div>`}m=a.getFormattedValue(m,i);let h="";if(l&&l.columns&&l.columns[i]&&l.columns[i][f]){const e=l.columns[i][f];h+=`border-color: ${e.border}; background-color: ${e.background}; color: ${e.color};"`}0===e&&y>1&&(h+=`padding-left: ${25*(y-1)}px;"`),h&&(h=` style="${h}"`),x+=` <td class="column column${i}"${h} colspan="${r}" rowspan="${n}">${d+m}</td>\n`}i+=x+" </tr>\n"}return i+=" </tbody>\n </table>\n</body>\n</html>",arguments[2]?i:this.downloadFile(i,"text/html",t)}exportToImage(e,t,a,o){try{html2canvas}catch(e){throw new Error("smart-grid: Missing reference to 'html2canvas.min.js'.")}let l=null;const r=this.exportToHTML(e,t,!0),n=document.createElement("iframe");return n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.border="none",n.style.width="100%",n.style.height="100%",n.style.opacity=0,n.style.pointerEvents="none",document.body.appendChild(n),n.contentDocument.write(r),function e(){n.contentDocument.body&&n.contentDocument.body.firstElementChild?n.contentWindow.html2canvas(n.contentDocument.body.firstElementChild).then((e=>{const r=new Smart.Utilities.Draw(document.createElement("div"));l=e.toDataURL("image/png"),o?o(l):(document.body.appendChild(e),r.exportImage(void 0,e,a,t)),n.remove(),e.remove()})):requestAnimationFrame(e)}(),l}getMergedCellsInfo(e,t,a){const o=this;if(!o.mergedCells)return;const l=a&&0!==a[o.datafields.length-1];o.mergedCellsPDF=o.mergedCells.slice(0);for(let r=0;r<o.mergedCellsPDF.length;r++){const n=o.mergedCellsPDF[r];let s=n.colspan,i=n.rowspan;if(i<2&&s<2)continue;const c=n.cell[1];let p=n.cell[0];if(l&&s>1){const e=a[p],t=a[p+s-1],l=[];if(t>e){let r=e,n=p,m=0;e:for(let o=e;o<=t;o++){let e=n,t=0;for(;a[n]===r;)if(n++,m++,t++,m===s){l.push({start:e,span:t});break e}l.push({start:e,span:t}),r=a[n]}s=l[0].span;for(let e=1;e<l.length;e++)o.mergedCellsPDF.push({cell:[l[e].start,c],colspan:l[e].span,rowspan:i,originalCell:p})}}for(let a=p;a<p+s;a++)for(let o=c;o<c+i;o++){const l=a+","+o;a!==p||o!==c?t[l]=!0:e[l]={colspan:s,rowspan:i,originalCell:n.originalCell}}}}getAlternationIndex(e,t){if(!this.style)return"";const a=this.style.rows;return a&&a.alternationCount&&((void 0===a.alternationStart||e>=a.alternationStart)&&(void 0===a.alternationEnd||e<=a.alternationEnd)||a.alternationStart===a.alternationEnd)?t+e%a.alternationCount:""}getFormattedValue(e,t){const a=this,o=a.style;if(null===e)return a.allowNull?"null":"";if(t&&o&&o.columns&&o.columns[t]&&o.columns[t].format){if("number"==typeof e)return a.formatNumber(e,o.columns[t].format);if(e instanceof Date)return a.formatDate(e,o.columns[t].format)}else if(e instanceof Date)return a.formatDate(e,"d");return e}exportToJSON(e,t){return this.downloadFile(JSON.stringify(e,this.datafields.concat("rows")),"application/json",t)}exportToMD(e,t){const a=this.datafields;let o="";for(let t=0,l=e.length;t<l;t+=1)for(let l=0,r=a.length;l<r;l+=1){const r=e[t][a[l]];"string"==typeof r&&(o+=r)}return this.downloadFile(o,"application/text",t)}exportToPDF(e,t){try{pdfMake}catch(e){throw new Error("Missing reference to 'pdfmake.min.js'.")}const a=this,o=a.datafields,l=+a.exportHeader,r=[],n={},s={},i={},c=l?a.complexHeader?a.complexHeader.length:1:0,p={pageOrientation:a.pageOrientation||"portrait"};let m,f=[],d=[];function h(){let e=[];for(let t=0;t<m.length;t++)e.push([]);return e}e=a.processGroupingInformation(e),a.data=e,a.headerRows=c,a.getPDFStyle();const g=a.styleInfo;m=g?a.wrapPDFColumns(p,i):[{body:f,datafields:o}],l&&(f=a.getPDFHeader(o,m,i)),a.getMergedCellsInfo(n,s,i);e:for(let t=l;t<e.length;t++){const c=e[t];let p="",f=0;if(a.groupBy)for(let e=0;e<a.groupBy.length;e++){const o=a.groupBy[e],l=c[o],n=a.groups[o][l];if(p+=l,-1===r.indexOf(p)){a.createGroupHeaderRow(m,{text:n,style:["row","cell","group"],marginLeft:7.5*f}),r.push(p),t--;continue e}f++}const d=h(),g=t-l;let u=a.getAlternationIndex(g,"");for(let e=0;e<o.length;e++){const t=o[e],l={style:["row","row"+g,"cell","cell"+t]},r=i[e]||0;if(void 0!==u&&l.style.splice(1,0,"rowN"+u),a.mergedCellsPDF){const t=e+","+g,a=n[t];if(a){if(l.colSpan=a.colspan,l.rowSpan=a.rowspan,void 0!==a.originalCell){l.text="",l.style[l.style.length-1]="cell"+o[a.originalCell],d[r].push(l);continue}}else if(s[t]){d[r].push({});continue}}const p=a.getFormattedValue(c[t],t);l.text=p.toString(),a.getUniqueStylePDF(l,t,g),a.setIndentation(l,{j:e,currentRecord:c,value:p,outlineLevel:f}),d[r].push(l)}for(let e=0;e<m.length;e++)m[e].body.push(d[e])}if(g){for(let e=0;e<m.length;e++){const t=m[e].body;for(let a=c-1;a>=0;a--)t.unshift(f[e][a]);d.push({table:{headerRows:c,widths:m[e].widths,heights:function(e){return g.heights[e]?g.heights[e]:g.defaultHeight?g.defaultHeight:void 0},body:t},pageBreak:"after"})}delete d[m.length-1].pageBreak,p.styles=g.styles}else{const e=m[0].body;for(let t=c-1;t>=0;t--)e.unshift(f[0][t]);d=[{table:{headerRows:c,body:e}}],p.styles={header:{bold:!0},group:{bold:!0}}}p.content=d,pdfMake.createPdf(p).download(t),delete a.mergedCellsPDF,delete a.styleInfo}getPDFStyle(){const e=this,t=e.style;if(!t)return"";const a=e.data[0],o=t.header,l=t.columns,r=t.rows,n={heights:[],widths:Array(e.datafields.length).fill("*"),styles:{header:{},row:{},cell:{},group:{fillColor:"#FFFFFF",color:"#000000",bold:!0}}};function s(t,o){if(t)for(let l in t)if(Object.prototype.hasOwnProperty.call(t,l))if(void 0===a[l])if("height"===l&&"header"===o)for(let a=0;a<e.headerRows;a++)n.heights[a]=parseInt(t[l],10)/e.headerRows/1.4;else e.storePDFStyle({prop:l,value:t[l],toUpdate:o});else for(let a in t[l]){if(!isNaN(a)||!Object.prototype.hasOwnProperty.call(t[l],a))continue;const r=t[l][a],s=e.datafields.indexOf(l);"width"===a&&"*"===n.widths[s]?n.widths[s]=r:e.storePDFStyle({prop:a,value:r,toUpdate:o+l})}}if(e.styleInfo=n,s(o,"header"),s(l,"cell"),r){for(let t in r){if(!Object.prototype.hasOwnProperty.call(r,t)||-1!==t.indexOf("alt"))continue;const a=r[t];if(isNaN(t))"height"===t?n.defaultHeight=parseFloat(a)/1.4:e.storePDFStyle({prop:t,value:a,toUpdate:"row"});else for(let o in a)Object.prototype.hasOwnProperty.call(a,o)&&("height"===o?n.heights[parseFloat(t)+e.headerRows]=parseFloat(a[o])/1.4:e.storePDFStyle({prop:o,value:a[o],toUpdate:"row"+t}))}if(r.alternationCount)for(let e=0;e<r.alternationCount;e++){const t={};r[`alternationIndex${e}Color`]&&(t.color=r[`alternationIndex${e}Color`]),r[`alternationIndex${e}BackgroundColor`]&&(t.fillColor=r[`alternationIndex${e}BackgroundColor`]),n.styles["rowN"+e]=t}}}storePDFStyle(e){const t=this;let a=t.styleInfo.styles[e.toUpdate];a||(a={},t.styleInfo.styles[e.toUpdate]=a);let o=e.value;switch(e.prop){case"backgroundColor":a.fillColor=o;break;case"color":a.color=o;break;case"fontSize":a.fontSize=parseFloat(o);break;case"fontStyle":"italic"===o&&(a.italics=!0);break;case"fontWeight":"bold"===o&&(a.bold=!0);break;case"textAlign":a.alignment=o}}wrapPDFColumns(e,t){const a=this,o=this.styleInfo,l="portrait"===e.pageOrientation?655:1155,r=[];let n=0;for(let e=0;e<o.widths.length;e++){let s,i=o.widths[e];if("*"===i?s=l/6:"string"==typeof i&&-1!==i.indexOf("%")?(s=Math.min(l,Math.floor(parseFloat(i)/100*l)),s===l&&(i="*")):(i=parseFloat(i),i>=l?(s=l,i="*"):(s=i,i/=1.4)),void 0===r[n]){const o=[];r[n]={body:o,width:s,widths:[i],datafields:[a.datafields[e]]},t[e]=n;continue}const c=r[n];c.width+s>l?(n++,e--):(t[e]=n,c.width+=s,c.widths.push(i),c.datafields.push(a.datafields[e]))}return r}getPDFHeader(e,t,a){const o=this,l=[],r=o.headerRows,n=[],s=[];let i,c,p=[];o.complexHeader?(i=o.complexHeader,c=o.complexDataFieldsHeader):(i=[Object.values(o.data[0])],c=i);for(let e=0;e<r;e++){const t=i[e],o=c[e];for(let l=0;l<t.length;l++){let r=a[l]||0;n[r]||(n[r]=[],s[r]=[]),n[r][e]||(n[r][e]=[],s[r][e]=[]),n[r][e].push(t[l]),s[r][e].push(o[l])}}function m(e,t,a,o){for(let l=0;l<r;l++){const n=e[l],s=t[l],i=[];for(let e=0;e<n.length;e++){const a=s[e];let c=1,p=1;if(s[e-1]&&s[e-1]===a||t[l-1]&&t[l-1][e]===a){i.push({});continue}let m=e+1;for(;s[m]&&s[m]===s[m-1];)c++,m++;for(m=l+1;t[m]&&t[m][e]===a;)p++,m++;const f=l===r-1||p+l===r?o.datafields[e]:null,d={text:n[e],colSpan:c,rowSpan:p};f?d.style=["header","header"+f]:(d.alignment="center",d.style="header"),i.push(d)}a.push(i)}}for(let e=0;e<t.length;e++)p=[],m(n[e],s[e],p,t[e]),l.push(p);return l}createGroupHeaderRow(e,t){for(let a=0;a<e.length;a++){const o=Object.assign({},t),l=e[a].datafields.length,r=[o];o.colSpan=l,r.length=l,r.fill({},1,l-1),e[a].body.push(r)}}getUniqueStylePDF(e,t,a){const o=this.style;if(!o||!o.columns||!o.columns[t])return;const l=o.columns[t][a];l&&(e.fillColor=function(e){const t=/rgba\((\d+),(\d+),(\d+)\,(\d*.\d+|\d+)\)/gi.exec(e.replace(/\s/g,""));if(null===t)return e;const a=parseFloat(t[1]).toString(16).toUpperCase(),o=parseFloat(t[2]).toString(16).toUpperCase(),l=parseFloat(t[3]).toString(16).toUpperCase();return"#"+"0".repeat(2-a.length)+a+"0".repeat(2-o.length)+o+"0".repeat(2-l.length)+l}(l.background),e.color=l.color.toLowerCase())}setIndentation(e,t){if(0!==t.j)return;const a=this;if(a.actualHierarchy){const o=t.currentRecord;void 0!==o._expanded?(e.marginLeft=25*(o._level-1),e.text=a.collapseChar+" "+t.value):e.marginLeft=25*(o._level-1)+6}else t.outlineLevel>1&&(e.marginLeft=7.5*(t.outlineLevel-1))}exportToXLSX(e,t){try{JSZip}catch(e){throw new Error("Missing reference to 'jszip.min.js'.")}const a=this;let o=a.style;if(e=a.processGroupingInformation(e,!0),a.data=e,a.getColumnsArray(),a.complexHeaderMergedCells=[],a.complexHeaderMergeInfo)for(let e in a.complexHeaderMergeInfo)if(Object.prototype.hasOwnProperty.call(a.complexHeaderMergeInfo,e)){const t=a.complexHeaderMergeInfo[e];if(t.from[0]===t.to[0]&&t.from[1]===t.to[1])continue;a.complexHeaderMergedCells.push({from:a.columnsArray[t.from[1]]+(t.from[0]+1),to:a.columnsArray[t.to[1]]+(t.to[0]+1)})}a.getConditionalFormatting(),o||(o=a.generateDefaultStyle(e));const l=a.generateSharedStrings(e),r=l.collection,n=l.xml,s=a.generateStyles(o),i=a.groupBy?a.generateSheet1WithGrouping(e,r):a.generateSheet1(e,r),c=a.generateAuxiliaryFiles(),p=new JSZip,m=p.folder("_rels"),f=p.folder("docProps"),d=p.folder("xl"),h=d.folder("_rels"),g=d.folder("theme"),u=d.folder("worksheets");m.file(".rels",c._relsRels),f.file("app.xml",c.docPropsAppXml),f.file("core.xml",c.docPropsCoreXml),h.file("workbook.xml.rels",c.xl_relsWorkbookXmlRels),g.file("theme1.xml",c.xlThemeTheme1Xml),u.file("sheet1.xml",i),d.file("sharedStrings.xml",n),d.file("styles.xml",s),d.file("workbook.xml",c.xlWorkbookXml),p.file("[Content_Types].xml",c.Content_TypesXml),p.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}).then((function(e){return a.downloadFile(e,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",t)})),delete a.conditionalFormattingXLSX,delete a.complexHeaderMergeInfo,delete a.defaultRowHeight,delete a.rowHeight}processGroupingInformation(e,t){const a=this;if(!a.groupBy)return e;let o;if(e=e.slice(0),a.exportHeader&&(t&&a.complexHeader?(o=e.slice(0,a.complexHeader.length),e.splice(0,a.complexHeader.length)):(o=[e[0]],e.splice(0,1))),e.length>1){const t=function(e,t){let a;switch(t||typeof e){case"string":a=(new Intl.Collator).compare;break;case"number":a=function(e,t){return e-t};break;case"boolean":case"bool":a=function(e,t){return e===t?0:!1===e?-1:1};break;case"date":case"time":case"dateTime":e instanceof Date?a=function(e,t){return e.getTime()-t.getTime()}:(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)&&(a=function(e,t){return e.compare(t)});break;case"object":if(e instanceof Date)a=function(e,t){return e.getTime()-t.getTime()};else if(e instanceof Smart.Utilities.DateTime||e instanceof Smart.Utilities.BigNumber)a=function(e,t){return e.compare(t)};else if(e instanceof Smart.Utilities.Complex||window.NIComplex&&e instanceof window.NIComplex){const e=new Smart.Utilities.ComplexNumericProcessor;a=function(t,a){return e.compareComplexNumbers(t,a)}}}return a};!function(e,a,o,l){if(!e||!Array.isArray(e)||0===e.length||!a||Array.isArray(a)&&0===a.length)return;"string"==typeof a&&(a=[a]);const r=[],n=[];void 0===o&&(o=[]);for(let l=0;l<a.length;l++)void 0===o[l]||"asc"===o[l]||"ascending"===o[l]?r[l]=1:r[l]=-1,n[l]=t(e[0][a[l]]);l?l(e,a,o,n):e.sort((function(e,t){for(let o=0;o<a.length;o++){const l=n[o](e[a[o]],t[a[o]]);if(0===l){if(a[o+1])continue;return void 0!==e._index?(e._index-t._index)*r[o]:0}return l*r[o]}}))}(e,a.groupBy)}return o&&(e=o.concat(e)),a.getGroupLabels(e),e}exportToXML(e,t){const a=this.datafields.slice(0);let o='<?xml version="1.0" encoding="UTF-8" ?>\n<table>\n';return-1===a.indexOf("rows")&&a.push("rows"),o+=function e(t,o){let l="";for(let r=0;r<t.length;r++){const n=t[r];l+=o+"<row>\n";for(let t=0;t<a.length;t++){const r=a[t];if("rows"!==r)l+=o+` <${r}>${n[r]}</${r}>\n`;else{if(!n.rows)continue;l+=`${o} <rows>\n${e(n.rows,o+" ")}${o} </rows>\n`}}l+=o+"</row>\n"}return l}(e," ")+"</table>",this.downloadFile(o,"application/xml",t)}formatDate(e,t){if(!Smart.Utilities.DateTime)return e;try{return new Smart.Utilities.DateTime(e).toString(t)}catch(t){return e}}formatNumber(e,t){if(!Smart.Utilities.NumberRenderer)return e;const a=(new Smart.Utilities.NumberRenderer).formatNumber(e,t);return void 0===a?e:a}generateAuxiliaryFiles(){const e=(new Date).toISOString();return{_relsRels:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>',docPropsAppXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>',docPropsCoreXml:`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>Smart HTML Elements</dc:creator><cp:lastModifiedBy>Smart HTML Elements</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${e}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${e}</dcterms:modified></cp:coreProperties>`,xl_relsWorkbookXmlRels:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>',xlThemeTheme1Xml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="44546A"/></a:dk2><a:lt2><a:srgbClr val="E7E6E6"/></a:lt2><a:accent1><a:srgbClr val="4472C4"/></a:accent1><a:accent2><a:srgbClr val="ED7D31"/></a:accent2><a:accent3><a:srgbClr val="A5A5A5"/></a:accent3><a:accent4><a:srgbClr val="FFC000"/></a:accent4><a:accent5><a:srgbClr val="5B9BD5"/></a:accent5><a:accent6><a:srgbClr val="70AD47"/></a:accent6><a:hlink><a:srgbClr val="0563C1"/></a:hlink><a:folHlink><a:srgbClr val="954F72"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Calibri Light" panose="020F0302020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Calibri" panose="020F0502020204030204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="6350" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{62F939B6-93AF-4DB8-9C6B-D6C7DFDC589F}" vid="{4A3C46E8-61CC-4603-A589-7422A47A8E4A}"/></a:ext></a:extLst></a:theme>',xlWorkbookXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="20325"/><workbookPr defaultThemeVersion="166925"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="C:UsersjqwidgetsDesktop" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="13_ncr:1_{0DEDCB6D-5403-4CD8-AAA5-59B6D238A8B6}" xr6:coauthVersionLast="34" xr6:coauthVersionMax="34" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="0" yWindow="0" windowWidth="19200" windowHeight="6950" xr2:uid="{0CB664E6-3800-4A88-B158-B46A682E7484}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="179021"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext></extLst></workbook>',Content_TypesXml:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>'}}generateDefaultStyle(e){const t=this,a={},o=t.datafields,l=t.complexHeader?e[t.complexHeader.length]:e[+t.exportHeader];if(!l)return a;for(let e=0;e<o.length;e++)l[o[e]]instanceof Date&&(a.columns||(a.columns=[]),a.columns[o[e]]={format:"d"});return a}generateGroupRow(e){const t=e.rowNumber,a="A"+t,o=` <row r="${t}" outlineLevel="${e.outlineLevel}" spans="1:${e.numberOfColumns}"${this.getCustomRowHeight(t-1)} x14ac:dyDescent="0.45">\n <c r="${a}" t="s" s="0">\n <v>${e.sharedStringIndex}</v>\n </c>\n </row>\n`;return e.mergedCells.push({from:a,to:this.columnsArray[e.numberOfColumns-1]+t}),o}generateSharedStrings(e){const t=this,a=t.datafields,o=[];let l="",r=0,n=0;function s(e){r++,-1===o.indexOf(e)&&(n++,o.push(e),e=(e=(e=(e=(e=e.replace(/&(?!amp;)/g,"&")).replace(/'/g,"'")).replace(/"/g,""")).replace(/>/g,">")).replace(/</g,"<"),l+=`<si><t>${e}</t></si>`)}for(let o=0;o<e.length;o++){const l=e[o];for(let e=0;e<a.length;e++){let o=l[a[e]];null!==o||t.allowNull||(o=""),"string"==typeof o&&s(o)}}if(t.groupLabels)for(let e=0;e<t.groupLabels.length;e++)s(t.groupLabels[e]);return l=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${r}" uniqueCount="${n}">${l}</sst>`,{collection:o,xml:l}}generateSheet1(e,t){const a=this,o=a.columnsArray.length,l=e.length,r=a.columnsArray[o-1]+l,n=a.datafields,s=a.getFilters(),i=[].concat(a.complexHeaderMergedCells);let c=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{7F25248B-C640-4C64-AD47-C0EA0E5D90D0}">\n <sheetPr filterMode="${""!==s}" />\n <dimension ref="A1:${r}" />\n <sheetViews>\n <sheetView tabSelected="1" workbookViewId="0" />\n </sheetViews>\n <sheetFormatPr defaultRowHeight="14.5" x14ac:dyDescent="0.35" />${a.getCustomColumnWidths()}\n <sheetData>\n`;function p(e,t){return a.columnsArray[e]+t}for(let l=0;l<=e.length;l++){const r=e[l],s=l+1;let i="";if(a.actualHierarchy){const t=e[l-1];t&&t._collapsed&&(!r||t._level>r._level)&&(i=' collapsed="true"')}if(l===e.length){i&&(c+=` <row r="${s}" outlineLevel="${Math.max(e[l-1]._level-2,0)}" hidden="false" collapsed="true" />\n`);break}let m=` <row r="${s}"${a.getOutlineLevel(r)} hidden="${r._hidden||r._collapsed||!1}"${i} spans="1:${o}"${a.getCustomRowHeight(s-1)} x14ac:dyDescent="0.45">\n`;for(let e=0;e<n.length;e++){const o=a.getXLSXCellStyle(p(e,s));m+=a.getActualCellData(r[n[e]],{r:p(e,s),s:o},t)}m+=" </row>\n",c+=m}return c+=` </sheetData>${a.conditionalFormattingXLSX.conditions}${s}${a.getMergedCells(i)}\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n <pageSetup paperSize="9" orientation="portrait" r:id="rId1" />\n</worksheet>`,c}generateSheet1WithGrouping(e,t){const a=this,o=a.columnsArray.length,l=e.length,r=a.columnsArray[o-1]+l,n=a.datafields,s=[].concat(a.complexHeaderMergedCells);let i=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{7F25248B-C640-4C64-AD47-C0EA0E5D90D0}">\n <dimension ref="A1:${r}" />\n <sheetViews>\n <sheetView tabSelected="1" workbookViewId="0" />\n </sheetViews>\n <sheetFormatPr defaultRowHeight="14.5" x14ac:dyDescent="0.35" />${a.getCustomColumnWidths()}\n <sheetData>\n`,c=0,p=[];function m(e,t){return a.columnsArray[e]+t}e:for(let l=0;l<e.length;l++){const r=e[l],f=l+1+c;let d=0,h="";if(!a.exportHeader||!a.complexHeader&&0!==l||a.complexHeader&&l>=a.complexHeader.length){let e="";for(let n=0;n<a.groupBy.length;n++){const m=a.groupBy[n],h=r[m],g=a.groups[m][h];if(e+=h,-1===p.indexOf(e)){let r=t.indexOf(g);i+=a.generateGroupRow({rowNumber:f,outlineLevel:d,numberOfColumns:o,sharedStringIndex:r,mergedCells:s}),p.push(e),l--,c++;continue e}d++}h=` outlineLevel="${d}"`}let g=` <row r="${f}"${h} spans="1:${o}"${a.getCustomRowHeight(f-1)} x14ac:dyDescent="0.45">\n`;for(let e=0;e<n.length;e++){const o=a.getXLSXCellStyle(m(e,l+1));g+=a.getActualCellData(r[n[e]],{r:m(e,f),s:o},t)}g+=" </row>\n",i+=g}return i+=` </sheetData>${a.getMergedCells(s)}\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n <pageSetup paperSize="9" orientation="portrait" r:id="rId1" />\n</worksheet>`,i}getActualCellData(e,t,a){const o=t.r,l=t.s||' s="0"';return null!==e||this.allowNull||(e=""),"string"==typeof e?` <c r="${o}" t="s"${l}>\n <v>${a.indexOf(e)}</v>\n </c>\n`:"boolean"==typeof e?` <c r="${o}" t="b"${l}>\n <v>${+e}</v>\n </c>\n`:e instanceof Date?` <c r="${o}"${l}>\n <v>${2+Math.round(this.timeBetween1900And1970/864e5)+(e.getTime()-60*e.getTimezoneOffset()*1e3)/864e5}</v>\n </c>\n`:` <c r="${o}"${l}>\n <v>${e}</v>\n </c>\n`}getColumnsArray(){const e=this.datafields.length,t=[];function a(e){return e<26?"":String.fromCharCode(64+Math.floor(e/26))}for(let o=0;o<e;o++)t.push(a(o)+String.fromCharCode(65+(o<26?o:o%26)));this.columnsArray=t}getColumnStyle(){const e=this,t=e.style;if(!t)return" .header { border: 1px solid black; padding: 5px; }\n .column { border: 1px solid black; padding: 5px; }\n .group { background-color: #FFFFFF; color: #000000; font-weight: bold; }";let a;a=t.removeDefault?{header:"",column:"",group:""}:{header:"border: 1px solid black; padding: 5px; ",column:"white-space: nowrap; overflow: hidden; border: 1px solid black; padding: 5px; ",group:"background-color: #FFFFFF; color: #000000; font-weight: bold; "};const o=e.data[0];let l="";const r=t.header||{};for(let t in r){if(!Object.prototype.hasOwnProperty.call(r,t))continue;const l=r[t];if(o[t]){a["header"+t]||(a["header"+t]="");for(let e in l)if(Object.prototype.hasOwnProperty.call(l,e)){const o=Smart.Utilities.Core.toDash(e)+": "+l[e]+"; ";a["header"+t]+=o,"width"===e&&(a["column"+t]||(a["column"+t]=""),a["column"+t]+=o)}}else"height"===t&&e.complexHeader?a.header+="height: "+parseInt(r[t],10)/e.complexHeader.length+"px; ":a.header+=Smart.Utilities.Core.toDash(t)+": "+r[t]+"; "}const n=t.columns||{};for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;const t=n[e];if(o[e]){a["column"+e]||(a["column"+e]="");for(let o in t)isNaN(o)&&Object.prototype.hasOwnProperty.call(t,o)&&"format"!==o&&(a["column"+e]+=Smart.Utilities.Core.toDash(o)+": "+t[o]+"; ")}else a.column+=Smart.Utilities.Core.toDash(e)+": "+t+"; "}for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&(l+=` .${e} { ${a[e]}}\n`);return t.custom&&(l+=`${t.custom}\n`),l}getCustomColumnWidths(){const e=this;if(!e.style||!e.columnWidth||0===e.columnWidth.length)return"";let t="\n <cols>\n";for(let a=0;a<e.columnWidth.length;a++){let o=e.columnWidth[a];void 0!==o&&(o=Math.round(parseFloat(o))/7,t+=` <col min="${a+1}" max="${a+1}" width="${o}" customWidth="1" />\n`)}return t+=" </cols>",t}getCustomFilter(e,t){let a,o="equal";switch(e instanceof Date&&(e=(e.getTime()+this.timeBetween1900And1970)/864e5+2),t=t.toUpperCase()){case"EMPTY":a="";break;case"NOT_EMPTY":a="",o="notEqual";break;case"CONTAINS":case"CONTAINS_CASE_SENSITIVE":a=`*${e}*`;break;case"DOES_NOT_CONTAIN":case"DOES_NOT_CONTAIN_CASE_SENSITIVE":a=`*${e}*`,o="notEqual";break;case"STARTS_WITH":case"STARTS_WITH_CASE_SENSITIVE":a=`${e}*`;break;case"ENDS_WITH":case"ENDS_WITH_CASE_SENSITIVE":a=`*${e}`;break;case"EQUAL":case"EQUAL_CASE_SENSITIVE":a=e;break;case"NULL":a=null;break;case"NOT_NULL":a=null,o="notEqual";break;case"NOT_EQUAL":a=e,o="notEqual";break;case"LESS_THAN":a=e,o="lessThan";break;case"LESS_THAN_OR_EQUAL":a=e,o="lessThanOrEqual";break;case"GREATER_THAN":a=e,o="greaterThan";break;case"GREATER_THAN_OR_EQUAL":a=e,o="greaterThanOrEqual"}return` <customFilter val="${a}" operator="${o}"/>\n`}getCustomRowHeight(e){const t=this;return t.style&&(t.rowHeight[e]||t.defaultRowHeight)||""}getDatafields(e){const t=e[0],a=[];for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&"_"!==e.charAt(0)&&a.push(e);this.datafields=a}getFilters(){const e=this,t=e.filterBy;if(!t)return"";let a="";for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)){const l=e.datafields.indexOf(o);if(-1===l)continue;const r=t[o],n=r.filters;a+=` <filterColumn colId="${l}">\n <customFilters and="${!r.operator}">\n`;for(let t=0;t<n.length;t++)a+=e.getCustomFilter(n[t].value,n[t].condition);a+=" </customFilters>\n </filterColumn>"}return a?(a=`\n <autoFilter ref="A1:${e.columnsArray[e.columnsArray.length-1]+e.data.length}">\n${a}\n </autoFilter>`,a):""}getGroupLabels(e){const t=this,a=void 0!==t.xlsxStartIndex?t.xlsxStartIndex:+t.exportHeader,o={},l=[];for(let r=a;r<e.length;r++){const n=e[r];for(let r=0;r<t.groupBy.length;r++){const s=t.groupBy[r],i=n[s];let c=o[s];void 0===c&&(o[s]={},c=o[s]),void 0===c[i]&&(c[i]=(t.exportHeader?e[a-1][s]:s)+": "+i,l.push(c[i]))}}t.groups=o,t.groupLabels=l}getHTMLHeader(e,t){const a=this;let o="\n <thead>\n";if(!a.complexHeader){o+=" <tr>\n";for(let a=0;a<e.length;a++){const l=e[a];o+=` <th class="header header${l}">${t[0][l]}</th>\n`}return o+=" </tr>\n </thead>",o}for(let t=0;t<a.complexDataFieldsHeader.length;t++){const l=a.complexDataFieldsHeader[t];o+=" <tr>\n";for(let r=0;r<l.length;r++){const n=l[r];let s=1,i=1;if(l[r-1]&&l[r-1]===n||a.complexDataFieldsHeader[t-1]&&a.complexDataFieldsHeader[t-1][r]===n)continue;let c=r+1;for(;l[c]&&l[c]===l[c-1];)s++,c++;for(c=t+1;a.complexDataFieldsHeader[c]&&a.complexDataFieldsHeader[c][r]===n;)i++,c++;o+=` <th class="header${t===a.complexHeader.length-1||i+t===a.complexHeader.length?" header"+e[r]:""}" colspan="${s}" rowspan="${i}">${a.complexHeader[t][r]}</th>\n`}o+=" </tr>\n"}return o+=" </thead>",o}getConditionalFormatting(){const e=this,t=e.conditionalFormatting;if(!t)return void(e.conditionalFormattingXLSX={conditions:"",styles:""});const a=[];let o="",l="";for(let r=t.length-1;r>=0;r--){const n=t[r],s=e.columnsArray[e.datafields.indexOf(n.column)],i=s+(e.xlsxStartIndex+1),c=i+":"+s+e.data.length,p=n.background+n.color,m=e.getConditionalAttributes(n,i);let f=a.indexOf(p);-1===f&&(l+=` <dxf>\n <font>\n <b val="0"/>\n <i val="0"/>\n <color rgb="${"White"===n.color?"FFFFFFFF":"FF000000"}"/>\n <sz val="10"/>\n </font>\n <fill>\n <patternFill>\n <bgColor rgb="${e.toARGB(n.background)}"/>\n </patternFill>\n </fill>\n </dxf>\n`,f=a.length,a.push(p)),o+=` <conditionalFormatting sqref="${c}">\n <cfRule dxfId="${f}" text="${m.text}" rank="${m.rank}" percent="${m.percent}" bottom="${m.bottom}" equalAverage="${m.equalAverage}" aboveAverage="${m.aboveAverage}"${m.operator}${m.timePeriod} priority="${r+2}" type="${m.type}">\n${m.formula} </cfRule>\n </conditionalFormatting>\n`}l=` <dxfs count="${a.length}">\n${l} </dxfs>`,e.conditionalFormattingXLSX={conditions:o,styles:l}}getConditionalAttributes(e,t){let a=e.condition,o=e.comparator,l="",r=0,n=0,s=0,i=0,c="",p="",m="",f="";switch(a){case"equal":c="equal",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"lessThan":c="lessThan",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"greaterThan":c="greaterThan",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"notEqual":c="notEqual",m="cellIs",f=` <formula>${o}</formula>\n`;break;case"between":c="between",m="cellIs",f=` <formula>${e.min}</formula>\n <formula>${e.max}</formula>\n`;break;case"duplicate":m="duplicateValues",f=" <formula>0</formula>\n";break;case"topNItems":r=o,m="top10";break;case"bottomNItems":r=o,s=1,m="top10";break;case"topNPercent":r=o,n=1,m="top10";break;case"bottomNPercent":r=o,n=1,s=1,m="top10";break;case"aboveAverage":i=1,m="aboveAverage",f=" <formula>0</formula>\n";break;case"belowAverage":m="aboveAverage",f=" <formula>0</formula>\n";break;case"contains":l=o,c="containsText",m="containsText",f=` <formula>NOT(ISERROR(SEARCH("${o}",${t})))</formula>\n`;break;case"doesNotContain":l=o,c="notContains",m="notContainsText",f=` <formula>ISERROR(SEARCH("${o}",${t}))</formula>\n`;break;case"dateOccur":p=` timePeriod="${o}"`,m="timePeriod"}return c&&(c=` operator="${c}" `),{text:l,rank:r,percent:n,bottom:s,equalAverage:0,aboveAverage:i,operator:c,timePeriod:p,type:m,formula:f}}getMergedCells(e){const t=this;let a="";for(let t=0;t<e.length;t++)e[t].from!==e[t].to&&(a+=`\n <mergeCell ref="${e[t].from}:${e[t].to}" />\n`);if(t.mergedCells)for(let e=0;e<t.mergedCells.length;e++){const o=t.mergedCells[e];o.rowspan<2&&o.colspan<2||(a+=`\n <mergeCell ref="${t.columnsArray[o.cell[0]]+(o.cell[1]+t.xlsxStartIndex+1)}:${t.columnsArray[o.cell[0]+o.colspan-1]+(o.cell[1]+t.xlsxStartIndex+o.rowspan)}" />\n`)}return a&&(a=`\n <mergeCells count="${e.length}">${a} </mergeCells>`),a}getNumFmtIndex(e,t){let a=t.collection.indexOf(e);return-1===a?(a=t.collection.length+100,t.collection.push(e),t.xml+=`<numFmt numFmtId="${a}" formatCode="${e}"/>`):a+=100,a}getOutlineLevel(e){return this.actualHierarchy&&1!==e._level?` outlineLevel="${e._level-1}"`:""}getRowStyle(){const e=this.style;if(!e)return"";const t=e.rows;if(!t)return"";const a={row:""};let o="";for(let e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||"alternationCount"===e||"alternationStart"===e||"alternationEnd"===e)continue;const o=t[e];if(-1===e.indexOf("alt"))if(isNaN(e))a.row+=Smart.Utilities.Core.toDash(e)+": "+t[e]+"; ";else{a["row"+e]||(a["row"+e]="");for(let t in o)Object.prototype.hasOwnProperty.call(o,t)&&(a["row"+e]+=Smart.Utilities.Core.toDash(t)+": "+o[t]+"; ")}else{const t=e.slice(16,17),l=e.slice(17);a["rowN"+t]||(a["rowN"+t]=""),a["rowN"+t]+="Color"===l?"color : "+o+"; ":"BorderColor"===l?"border-color : "+o+"; ":"background-color : "+o+"; "}}let l=Object.keys(a);l.sort((function(e,t){if("row"===e)return-1;if("row"===t)return 1;const a=!isNaN(e.slice(3)),o=!isNaN(t.slice(3));return a&&!o?1:!a&&o?-1:+(e<t)}));for(let e=0;e<l.length;e++)o+=` .${l[e]} { ${a[l[e]]}}\n`;return o}getTableStyle(){const e=this.style;if(!e)return' style="table-layout: fixed; border: 1px solid black; border-collapse: collapse;"';let t="table-layout: fixed; ";for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===["header","columns","rows","removeDefault","custom"].indexOf(a)&&(t+=Smart.Utilities.Core.toDash(a)+": "+e[a]+"; ");return t&&(t=' style="'+t+'"'),t}getXLSXCellStyle(e){const t=this;return void 0!==t.cellStyleMapping[e]?` s="${t.cellStyleMapping[e]}"`:""}getXLSXFormat(e,t){if("number"==typeof t){if(!/^([a-zA-Z]\d*)$/g.test(e))return e;let t=parseFloat(e.slice(1))||0,a=t>0?"."+"0".repeat(t):"";switch(e=e.slice(0,1)){case"C":case"c":return"$#,0"+a;case"D":case"d":return t?"0".repeat(t):"0";case"E":case"e":return"0"+a+e+"000";case"F":case"f":return"0"+a;case"N":case"n":return"#,0"+a;case"P":case"p":return"#,0"+a+" %";default:return}}else if(t instanceof Date){switch(e){case"d":return"m/d/yyyy";case"D":return"nnnnmmmm dd, yyyy";case"t":return"h:m AM/PM";case"T":return"h:mm:ss AM/PM";case"f":return"nnnnmmmm dd, yyyy h:m AM/PM";case"F":return"nnnnmmmm dd, yyyy h:mm:ss AM/PM";case"M":return"mmmm d";case"Y":return"yyyy mmmm";case"FP":case"PP":return"yyyy-mm-dd hh:mm:ss";case"FT":case"PT":return"hh:mm:ss"}return e=(e=(e=(e=e.replace(/f|u|n|p|e|a|x|o/gi,"")).replace(/tt/gi,"AM/PM")).replace(/:{2,}|:\s|:$|\.$/g,"")).trim()}}processColumnStyle(e){const t=this,a=e.header,o=e.columns,l=t.data[0],r=t.xlsxStartIndex;if(t.columnWidth=[],r&&a)for(let e=0;e<t.columnsArray.length;e++){const o=t.columnsArray[e],n=o+r,s=a[t.datafields[e]];for(let e in a)if(Object.prototype.hasOwnProperty.call(a,e)&&void 0===l[e])if(t.complexHeader)for(let l=0;l<t.complexHeader.length;l++)"height"!==e?t.storeCellStyle(o+(l+1),e,a[e]):t.rowHeight[l]=` ht="${parseFloat(a.height)/t.complexHeader.length/2}"`;else{if("height"===e){t.rowHeight[0]=` ht="${parseFloat(a.height)/2}"`;continue}t.storeCellStyle(n,e,a[e])}if(s)for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){if("width"===a){t.columnWidth[e]=s.width;continue}t.storeCellStyle(n,a,s[a])}}else if(a)for(let e=0;e<t.columnsArray.length;e++){const o=a[t.datafields[e]];o&&void 0!==o.width&&(t.columnWidth[e]=o.width)}if(!o)return"";for(let e=r;e<t.data.length;e++)for(let a=0;a<t.columnsArray.length;a++){const r=t.columnsArray[a]+(e+1),n=t.datafields[a],s=o[n];for(let e in o)Object.prototype.hasOwnProperty.call(o,e)&&void 0===l[e]&&t.storeCellStyle(r,e,o[e]);if(s)for(let a in s)isNaN(a)&&Object.prototype.hasOwnProperty.call(s,a)&&t.storeCellStyle(r,a,s[a],t.data[e][n])}}processComplexHeader(e,t,a){const o=this,l={},r=-1!==["html","jpeg","pdf","png","xlsx"].indexOf(a)&&e.columngroups,n=[],s={},i={},c=[],p=[];let m=0;function f(t){for(let a=0;a<e.columngroups.length;a++){const o=e.columngroups[a];if(o.name===t)return o}}function d(e,t){const a=[];for(;e;){if(a.unshift(e[t]),!e.parentGroup)return a;e=f(e.parentGroup)}}if(r){for(let t=0;t<e.columngroups.length;t++){const a=e.columngroups[t],o=d(a,"label");s[a.name]=o,i[a.name]=d(a,"name"),m=Math.max(m,o.length)}m++;for(let e=0;e<m;e++)c[e]=[],p[e]=[]}for(let t=0;t<e.columns.length;t++){const a=e.columns[t];if(l[a.dataField]=a.label,!r)continue;if(n[t]=a.dataField,c[m-1][t]=a.label,p[m-1][t]=a.dataField,!a.columnGroup)continue;const o=s[a.columnGroup],f=i[a.columnGroup];if(o)for(let e=0;e<o.length;e++)c[e][t]=o[e],p[e][t]=f[e]}if(c.length>1){const e=Object.keys(l).length;for(let o=0;o<m-1;o++){const l={};for(let t=0;t<e;t++){if(void 0===c[o][t]){let e=o+1;for(;void 0===c[e][t];)e++;c[o][t]=c[e][t],p[o][t]=p[e][t]}l[n[t]]=c[o][t]}"xlsx"===a&&t.splice(o,0,l)}if(o.complexHeader=c,o.complexDataFieldsHeader=p,"xlsx"!==a)t.unshift(l);else{t.splice(m-1,0,l);const a={};for(let t=0;t<m;t++)for(let o=0;o<e;o++){const e=p[t][o];if(a[e]){const l=a[e].to;if(t-l[0]>1||o-l[1]>1){a[e+Math.random().toString(36)]=a[e],a[e]={from:[t,o],to:[t,o]};continue}a[e].to=[t,o]}else a[e]={from:[t,o]},a[e].to=a[e].from}o.complexHeaderMergeInfo=a}}else t.unshift(l)}processHierarchicalData(e,t){const a=this,o="xlsx"!==t?+a.exportHeader:a.xlsxStartIndex,l={},r=[];let n=0,s=!1;if(void 0===e[o]._keyDataField)return a.processNestedData(e,t,o);for(let t=o;t<e.length;t++){const a=Object.assign({},e[t]);let o=a._parentDataField;void 0===o&&(o=null),void 0===l[o]?l[o]=[a]:l[o].push(a)}if(o)for(let a=0;a<o;a++)r.push(Object.assign({},e[a])),-1===["json","pdf","xml"].indexOf(t)&&(r[a]._level=1);return"json"!==t&&"xml"!==t?function e(t,a,o){const i=l[t];if(n=Math.max(n,a),void 0!==i)for(let t=0;t<i.length;t++){const n=i[t],c=n._keyDataField;n._collapsed=o,n._level=a,r.push(n),l[c]&&(s=!0,n._expanded=void 0===n._expanded||n._expanded,e(c,a+1,o||!n._expanded))}}(null,1,!1):function e(a,o,r){const i=l[a];if(n=Math.max(n,o),void 0!==i)for(let a=0;a<i.length;a++){const n=i[a],c=n._keyDataField;let p;if("json"===t){p={};for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&"_"!==e.charAt(0)&&(p[e]=n[e])}else p=Object.assign({},n);r.push(p),l[c]&&(s=!0,p.rows=[],e(c,o+1,p.rows))}}(null,1,r),s||(a.actualHierarchy=!1),a.maxLevel=n,r}processNestedData(e,t,a){const o=this,l=[];let r=0,n=!1;if(a)for(let o=0;o<a;o++)l.push(Object.assign({},e[o])),-1===["json","pdf","xml"].indexOf(t)&&(l[o]._level=1);return"json"!==t&&"xml"!==t?function e(t,a,o,s){r=Math.max(r,o);for(let r=t;r<a.length;r++){const t=Object.assign({},a[r]);t._collapsed=s,t._level=o,l.push(t),t.children&&t.children.length>0&&(n=!0,t._expanded=void 0===t._expanded||t._expanded,e(0,t.children,o+1,s||!t._expanded)),delete t.children}}(a,e,1,!1):function e(t,a,o,s){r=Math.max(r,s);for(let r=t;r<a.length;r++){const t=Object.assign({},a[r]);1===s?l[r]=t:o[r]=t,t.children&&t.children.length>0&&(n=!0,t.rows=[],e(0,t.children,t.rows,s+1)),delete t.children}}(a,e,void 0,1),n||(o.actualHierarchy=!1),o.maxLevel=r,l}processRowStyle(e){const t=this,a=e.rows;if(t.rowHeight=[],!a)return;const o=t.xlsxStartIndex;function l(e,a,l){for(let r=0;r<t.columnsArray.length;r++){const n=t.columnsArray[r]+(e+1+o);t.storeCellStyle(n,a,l)}}a.height&&(t.defaultRowHeight=` ht="${parseFloat(a.height)/2}"`);for(let e=o;e<t.data.length;e++){const r=e-o;for(let e in a)Object.prototype.hasOwnProperty.call(a,e)&&-1===e.indexOf("alt")&&isNaN(e)&&"height"!==e&&l(r,e,a[e]);if(a.alternationCount&&((void 0===a.alternationStart||r>=a.alternationStart)&&(void 0===a.alternationEnd||r<=a.alternationEnd)||a.alternationStart===a.alternationEnd)){const e=(r-(a.alternationStart||0))%a.alternationCount;a[`alternationIndex${e}Color`]&&l(r,"color",a[`alternationIndex${e}Color`]),a[`alternationIndex${e}BorderColor`]&&l(r,"borderColor",a[`alternationIndex${e}BorderColor`]),a[`alternationIndex${e}BackgroundColor`]&&l(r,"backgroundColor",a[`alternationIndex${e}BackgroundColor`])}if(a[r])for(let o in a[r])if(Object.prototype.hasOwnProperty.call(a[r],o)){if("height"===o){t.rowHeight[e]=` ht="${parseFloat(a[r].height)/2}"`;continue}l(r,o,a[r][o])}}}storeCellStyle(e,t,a){const o=this.styleMap[e];switch(t){case"backgroundColor":o.fills.fgColor=a;break;case"color":o.fonts.color=a;break;case"fontFamily":o.fonts.name=a.replace(/"/g,"'");break;case"fontSize":o.fonts.sz=parseFloat(a);break;case"fontStyle":"italic"===a?o.fonts.i=!0:delete o.fonts.i;break;case"fontWeight":"bold"===a?o.fonts.b=!0:delete o.fonts.b;break;case"numFmt":o.numFmt=a;break;case"textAlign":o.alignment.horizontal=a;break;case"textDecoration":"underline"===a?o.fonts.u=!0:delete o.fonts.u;break;case"verticalAlign":"middle"===a&&(a="center"),o.alignment.vertical=a}}toARGB(e){e=e.replace(/\s/g,"");const t=/rgb\((\d+),(\d+),(\d+)\)/gi.exec(e);if(null!==t){const e=parseFloat(t[1]).toString(16).toUpperCase(),a=parseFloat(t[2]).toString(16).toUpperCase(),o=parseFloat(t[3]).toString(16).toUpperCase();return"FF"+"0".repeat(2-e.length)+e+"0".repeat(2-a.length)+a+"0".repeat(2-o.length)+o}const a=/rgba\((\d+),(\d+),(\d+)\,(\d*.\d+|\d+)\)/gi.exec(e);if(null!==a){const e=Math.round(255*parseFloat(a[4])).toString(16).toUpperCase(),t=parseFloat(a[1]).toString(16).toUpperCase(),o=parseFloat(a[2]).toString(16).toUpperCase(),l=parseFloat(a[3]).toString(16).toUpperCase();return"0".repeat(2-e.length)+e+"0".repeat(2-t.length)+t+"0".repeat(2-o.length)+o+"0".repeat(2-l.length)+l}const o=/^#(.)(.)(.)$/gi.exec(e);if(null!==o){const e=o[1].toUpperCase(),t=o[2].toUpperCase(),a=o[3].toUpperCase();return"FF"+e+e+t+t+a+a}return"FF"+e.toUpperCase().slice(1)}toggleableFunctionality(){const e=this;return e.actualHierarchy?`\n <style type="text/css">\n .toggle-element {\n width: 5px;\n height: 1px;\n padding-right: 5px;\n float: left;\n text-align: right;\n cursor: pointer;\n user-select: none;\n }\n\n .collapsed {\n display: none;\n }\n </style>\n <script type="text/javascript">\n window.onload = function () {\n var expandChar = '${e.expandChar}',\n collapseChar = '${e.collapseChar}',\n toggleElements = document.getElementsByClassName('toggle-element');\n\n function getParent(child) {\n var prevSibling = child.previousElementSibling;\n\n while (prevSibling) {\n if (child.getAttribute('level') > prevSibling.getAttribute('level')) {\n return prevSibling;\n }\n\n prevSibling = prevSibling.previousElementSibling;\n }\n\n }\n\n function getFirstCollapsedAncestor(child) {\n var parent = getParent(child);\n\n while (parent) {\n if (parent.firstElementChild.firstElementChild.innerHTML === expandChar) {\n return parent;\n }\n\n parent = getParent(parent);\n }\n }\n\n for (var i = 0; i < toggleElements.length; i++) {\n toggleElements[i].addEventListener('click', function (event) {\n var expanded = this.innerHTML === collapseChar,\n row = this.parentElement.parentElement,\n sibling = row.nextElementSibling;\n\n if (expanded) {\n this.innerHTML = expandChar;\n }\n else {\n this.innerHTML = collapseChar;\n }\n\n while (sibling && row.getAttribute('level') < sibling.getAttribute('level')) {\n if (expanded) {\n sibling.style.display = 'none';\n }\n else {\n var firstCollapsedAncestor = getFirstCollapsedAncestor(sibling);\n\n if (!firstCollapsedAncestor || firstCollapsedAncestor === row) {\n sibling.classList.remove('collapsed');\n sibling.style.display = null;\n }\n\n }\n\n sibling = sibling.nextElementSibling;\n }\n });\n }\n }\n <\/script>`:""}generateStyles(e){const t=this;if(t.cellStyleMapping={},0===Object.keys(e).length&&!t.complexHeader)return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="11"/><color theme="1"/><name val="Calibri"/><family val="2"/><charset val="204"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>${t.conditionalFormattingXLSX.styles||'<dxfs count="0"/>'}<tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`;t.styleMap={};for(let e=0;e<t.data.length;e++)for(let a=0;a<t.columnsArray.length;a++)t.styleMap[t.columnsArray[a]+(e+1)]={numFmts:{},fonts:{},fills:{},borders:{},alignment:{}};if(e&&e.columns)for(let a=0;a<t.columnsArray.length;a++){const o=t.datafields[a];if(!e.columns[o]||!e.columns[o].format)continue;const l=t.getXLSXFormat(e.columns[o].format,t.data[1][o]),r=t.getXLSXFormat(e.columns[o].format,t.data[t.data.length-1][o]);r?e.columns[o].numFmt=r:l&&(e.columns[o].numFmt=l)}t.processRowStyle(e),t.processColumnStyle(e);const a={};for(let e=0;e<t.complexHeaderMergedCells.length;e++){const o=t.complexHeaderMergedCells[e];parseFloat(o.to[1])!==t.complexHeader.length?(t.styleMap[o.from].alignment.horizontal="center",t.styleMap[o.from].alignment.vertical="center"):a[o.to]=o.from}const o={xml:'<font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><charset val="204" /><scheme val="minor" /></font>',collection:["default"]},l={xml:'<fill><patternFill patternType="none" /></fill><fill><patternFill patternType="gray125" /></fill>',collection:["default","gray125"]},r={xml:"",collection:[]},n={xml:'<xf fontId="0" fillId="0" borderId="1"/>',collection:["default"]};for(let e=0;e<t.data.length;e++)for(let s=0;s<t.columnsArray.length;s++){const i=t.columnsArray[s]+(e+1),c=t.styleMap[i];let p="",m="",f="",d=[],h=[],g=[],u=[];for(let e in c.fonts)if(Object.prototype.hasOwnProperty.call(c.fonts,e)){const a=c.fonts[e];switch(e){case"color":d[0]=a,p+=`<color rgb="${t.toARGB(a)}" />`;break;case"name":d[1]=a,p+=`<name val="${a}" />`;break;case"sz":d[2]=a,p+=`<sz val="${a}" />`;break;case"i":d[3]=a,p+="<i />";break;case"b":d[4]=a,p+="<b />";break;case"u":d[5]=a,p+="<u />"}}for(let e in c.fills)if(Object.prototype.hasOwnProperty.call(c.fills,e)){const a=c.fills[e];switch(e){case"fgColor":h[0]=a,m+=`<fgColor rgb="${t.toARGB(a)}" />`}}for(let e in c.alignment)if(Object.prototype.hasOwnProperty.call(c.alignment,e)){const t=c.alignment[e];switch(e){case"horizontal":g[0]=t,f+=`horizontal="${t}" `;break;case"vertical":g[1]=t,f+=`vertical="${t}" `}}if(d=d.toString(),h=h.toString(),""!==p){let e=o.collection.indexOf(d);-1===e&&(e=o.collection.length,o.xml+="<font>"+p+"</font>",o.collection.push(d)),u[0]=e}if(""!==m){let e=l.collection.indexOf(h);-1===e&&(e=l.collection.length,l.xml+='<fill><patternFill patternType="solid">'+m+"</patternFill></fill>",l.collection.push(h)),u[1]=e}g.length>0&&(u[2]=f),void 0!==c.numFmt&&(u[3]=t.getNumFmtIndex(c.numFmt,r));const y=u.toString();if(""!==y){let e=n.collection.indexOf(y);if(-1===e){let t="<xf ";e=n.collection.length,void 0!==u[0]&&(t+=`fontId="${u[0]}" `),void 0!==u[1]&&(t+=`fillId="${u[1]}" `),void 0!==u[3]&&(t+=`numFmtId="${u[3]}" `),void 0!==u[2]?t+=`applyAlignment="1" borderId="1"><alignment ${f}/></xf>`:t+=' borderId="1"/>',n.xml+=t,n.collection.push(y)}t.cellStyleMapping[a[i]||i]=e}}return r.collection.length&&(r.xml=`<numFmts count="${r.collection.length}">${r.xml}</numFmts>`),`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision">${r.xml}<fonts count="${o.collection.length}" x14ac:knownFonts="1">${o.xml}</fonts><fills count="${l.collection.length}">${l.xml}</fills><borders count="2"><border><left/><right/><top/><bottom/></border><border><left style="hair"/><right style="hair"/><top style="hair"/><bottom style="hair"/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${n.collection.length}">${n.xml}</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>${t.conditionalFormattingXLSX.styles}<dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`}});
/***/ }),
/***/ 6170:
/***/ (() => {
Smart.Utilities.Assign("FilterGroup",class t{constructor(){const t=this;t.stringConditions=["EMPTY","NOT_EMPTY","CONTAINS","CONTAINS_CASE_SENSITIVE","DOES_NOT_CONTAIN","DOES_NOT_CONTAIN_CASE_SENSITIVE","STARTS_WITH","STARTS_WITH_CASE_SENSITIVE","ENDS_WITH","ENDS_WITH_CASE_SENSITIVE","EQUAL","NOT_EQUAL","EQUAL_CASE_SENSITIVE","NOT_EQUAL_CASE_SENSITIVE","NULL","NOT_NULL"],t.numericConditions=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"],t.dateConditions=["EQUAL","NOT_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","NULL","NOT_NULL"],t.booleanConditions=["EQUAL","NOT_EQUAL","NULL","NOT_NULL"],t.filters=new Array,t.logicalOperators=new Array}toString(){const t=this;let e="";for(let r=0;r<t.filters.length;r++)r>0&&(e+=" "+t.logicalOperators[r-1]+" "),e+=t.filters[r].toString();return e}evaluate(t){const e=this;let r=!0;for(let n=0;n<e.filters.length;n++){if(!e.filters[n].evaluate)continue;let i=e.filters[n].evaluate(t);r=0===n?i:1===e.logicalOperators[n]||"or"===e.logicalOperators[n]?r||i:r&&i}return r}getFiltersCount(){return this.filters.length}setConditions(t,e){const r=this;switch(t){case"numeric":r.numericConditions=e;break;case"string":r.stringConditions=e;break;case"date":case"time":r.dateConditions=e;break;case"bool":case"boolean":r.booleanConditions=e}}getConditions(t){const e=this;let r=new Array;switch(t){case"numeric":r=e.numericConditions.slice(0);break;case"string":r=e.stringConditions.slice(0);break;case"date":case"time":r=e.dateConditions.slice(0);break;case"bool":case"boolean":r=e.booleanConditions.slice(0)}return r}generateFilterKey(){const t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+"-"+t()+"-"+t()}createFilter(t,e,r,n,i,s,l){if(null==t)return null;switch(t){case"int":case"float":case"int64":case"double":case"numeric":case"number":case"numericFilter":return new Smart.Utilities.NumericFilter(e,r.toUpperCase());case"string":case"stringFilter":return new Smart.Utilities.StringFilter(e,r.toUpperCase(),s);case"date":case"time":case"dateFilter":return new Smart.Utilities.DateFilter(e,r.toUpperCase(),i,s,l);case"bool":case"boolean":case"booleanFilter":return new Smart.Utilities.BooleanFilter(e,r.toUpperCase());case"custom":return new Smart.Utilities.CustomFilter(e,r.toUpperCase(),n)}throw new Error('smartGrid: There is no such filter type. The available filter types are: "numericFilter", "stringFilter", "dateFilter" and "booleanFilter"')}getFilters(){const e=this;let r=new Array;for(let n=0;n<e.filters.length;n++){const i=e.filters[n];if(i instanceof t){let t=i.getFilters();r.push({value:t,logicalOperator:e.logicalOperators[n],type:"FilterGroup"})}else{const t={value:i.value,condition:i.condition,logicalOperator:e.logicalOperators[n],type:i.type};i.data&&(t.id=i.data),r.push(t)}}return r}addFilter(t,e){const r=this;r.filters[r.filters.length]=e,e.key=r.generateFilterKey(),r.logicalOperators[r.logicalOperators.length]=t}removeFilter(t){const e=this;for(let r=0;r<e.filters.length;r++)if(e.filters[r].key===t.key){e.filters.splice(r,1),e.logicalOperators.splice(r,1);break}}getOperatorAt(t){return null==t||t<0||t>this.filters.length?null:this.logicalOperators[t]}setOperatorAt(t,e){return null==t||t<0||t>this.filters.length?null:void(this.logicalOperators[e]=e)}getFilterAt(t){return null==t||t<0||t>this.filters.length?null:this.filters[t]}setFilterAt(t,e){const r=this;return null==t||t<0||t>r.filters.length?null:(e.key=r.generateFilterKey(),void(r.filters[t]=e))}clear(){this.filters=new Array,this.logicalOperators=new Array}getUniqueValues(t,e){const r=t.data,n=[],i=[],s="dateFilter"===t.filterType&&"timePicker"===t.displayMode;let l,a=!1;for(let e=0;e<r.length;e++){let l,o=r[e][t.dataField];""!==o&&null!=o?(l=s?new Smart.Utilities.DateTime(o).toString(t.formatString):o.toString(),-1===n.indexOf(l)&&(n.push(l),i.push({label:l,value:o,customAttribute:"default-item"}))):a=!0}switch(t.filterType){case"numericFilter":case"booleanFilter":l=function(t,e){return t.value-e.value};break;case"stringFilter":l=function(t,e){return(new Intl.Collator).compare(t.value,e.value)};break;case"dateFilter":l=s?function(t,e){try{const r=t.value.getHours(),n=e.value.getHours();if(r!==n)return r-n;const i=t.value.getMinutes(),s=e.value.getMinutes();if(i!==s)return i-s;const l=t.value.getSeconds(),a=e.value.getSeconds();return l!==a?l-a:0}catch(t){return-1}}:function(t,e){try{return t.value.getTime()-e.value.getTime()}catch(t){return-1}}}return i.sort(l),"booleanFilter"===t.filterType&&i.map((function(t){t.label=t.label.toUpperCase()})),a&&i.push({label:e.localize("blanks"),value:"",customAttribute:"default-item"}),i}}),Smart.Utilities.Assign("StringFilter",class{constructor(t,e,r){const n=this;n.value=t,n.condition=e,n.locale=r||"en",n.type="stringFilter"}toString(){return this.condition+" "+this.value}evaluate(t){const e=this,r=e.value,n=e.condition;if(null==t||""===t){if("NULL"===n)return!0;if("EQUAL"===n&&t===r)return!0;if("NOT_EQUAL"===n&&t!==r)return!0;if("CONTAINS"===n&&t===r)return!0;if("EMPTY"!==n)return!1;if(""===t)return!0}let i="";try{i=t.toString()}catch(t){return!0}const s=function(t,r){const i=e.locale;switch(n){case"EQUAL":return 0===t.localeCompare(r,i,{sensitivity:"accent"});case"EQUAL_CASE_SENSITIVE":return 0===t.localeCompare(r,i,{sensitivity:"variant"});case"NOT_EQUAL":return 0!==t.localeCompare(r,i,{sensitivity:"accent"});case"NOT_EQUAL_CASE_SENSITIVE":return 0!==t.localeCompare(r,i,{sensitivity:"variant"});case"CONTAINS":return"number"==typeof r?t===r:-1!==t.toLowerCase().indexOf(r.toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.indexOf(r);case"DOES_NOT_CONTAIN":return-1===t.toLowerCase().indexOf(r.toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.indexOf(r);case"EMPTY":return""===t;case"NOT_EMPTY":return""!==t;case"NOT_NULL":return null!==t;case"STARTS_WITH":return 0===(t=t.substring(0,r.length)).localeCompare(r,i,{sensitivity:"accent"});case"ENDS_WITH":return 0===(t=t.substring(t.length-r.length,t.length)).localeCompare(r,i,{sensitivity:"accent"});case"ENDS_WITH_CASE_SENSITIVE":return 0===(t=t.substring(t.length-r.length,t.length)).localeCompare(r,i,{sensitivity:"variant"});case"STARTS_WITH_CASE_SENSITIVE":return 0===(t=t.substring(0,r.length)).localeCompare(r,i,{sensitivity:"variant"});default:return!1}},l=new Array;if(r&&r.indexOf&&(r.indexOf("|")>=0||r.indexOf(" AND ")>=0||r.indexOf(" OR ")>=0||r.indexOf(" and ")>=0||r.indexOf(" or ")>=0)){const t=s(i,r);if(t)return t;const e=r.indexOf(" and ")>=0?r.split(" and "):new Array,n=r.indexOf(" or ")>=0?r.split(" or "):new Array,a=r.indexOf("|")>=0?r.split("|"):new Array;let o=r.indexOf(" AND ")>=0?r.split(" AND "):new Array,c=r.indexOf(" OR ")>=0?r.split(" OR "):new Array;if(a.length>0)for(let t=0;t<a.length;t++)a[t]=a[t].trim;const u=r.indexOf(" ")>=0?r.split(" "):new Array;if(u.length>0)for(let t=0;t<u.length;t++)u[t]=u[t].trim;if(o=o.concat(u),o=o.concat(e),c=c.concat(a),c=c.concat(n),o.length>0)for(let t=0;t<o.length;t++)!o[t].indexOf(" OR ")>=0&&l.push(o[t]);if(c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" AND ")>=0&&l.push(c[t]);let S;for(let t=0;t<l.length;t++){const e=s(i,l[t]),r=t<o.length?"and":"or";S=void 0===S?e:"or"===r?S||e:S&&e}return S}return s(i,r)}}),Smart.Utilities.Assign("BooleanFilter",class{constructor(t,e){const r=this;r.value=t,r.condition=e,r.type="booleanFilter"}toString(){return this.condition+" "+this.value}evaluate(t){const e=this.value,r=t;switch(this.condition){case"EQUAL":return r===e;case"NOT_EQUAL":return r!==e;case"NULL":return null==t||""===t;case"NOT_NULL":return!(null==t||""===t);default:return!1}}}),Smart.Utilities.Assign("NumericFilter",class{constructor(t,e){const r=this;r.value=t,r.condition=e,r.type="numericFilter"}toString(){return this.condition+" "+this.value}evaluate(t){let e=this.value,r=this.condition;if(null==t||""===t){if("NOT_NULL"===r)return!1;if("NULL"===r)return!0;switch(r){case"EQUAL":return t===e;case"NOT_EQUAL":return t!==e}return!1}if("NULL"===r)return!1;if("NOT_NULL"===r)return!0;let n=t;try{n=parseFloat(n)}catch(e){if(null!==t&&""!==t.toString())return!1}const i=function(t,e){switch("number"==typeof t&&"number"!=typeof e&&(e=parseFloat(e)),r){case"EQUAL":return t===e;case"NOT_EQUAL":return t!==e;case"GREATER_THAN":return t>e;case"GREATER_THAN_OR_EQUAL":return t>=e;case"LESS_THAN":return t<e;case"LESS_THAN_OR_EQUAL":return t<=e;case"STARTS_WITH":return e=e.toString().toLowerCase(),t.toString().toLowerCase().substring(0,e.length)===e;case"ENDS_WITH":return t=t.toString().toLowerCase(),e=e.toString().toLowerCase(),t.substring(t.length-e.length,t.length)===e;case"ENDS_WITH_CASE_SENSITIVE":return t=t.toString(),e=e.toString(),t.substring(t.length-e.length,t.length)===e;case"STARTS_WITH_CASE_SENSITIVE":return e=e.toString(),t.toString().substring(0,e.length)===e;case"CONTAINS":return-1!==t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.toString().indexOf(e.toString());case"DOES_NOT_CONTAIN":return-1===t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.toString().indexOf(e.toString());default:return!0}};let s=new Array;if(e&&e.indexOf&&(e.indexOf("|")>=0||e.indexOf(" AND ")>=0||e.indexOf(" OR ")>=0||e.indexOf(" and ")>=0||e.indexOf(" or ")>=0)){let t=i(n,e);if(t)return t;e=e.toString();const r=e.indexOf(" and ")>=0?e.split(" and "):new Array,l=e.indexOf(" or ")>=0?e.split(" or "):new Array,a=e.indexOf("|")>=0?e.split("|"):new Array;let o,c=e.indexOf(" AND ")>=0?e.split(" AND "):new Array,u=e.indexOf(" OR ")>=0?e.split(" OR "):new Array;if(c=c.concat(r),u=u.concat(l),a.length>0)for(let t=0;t<a.length;t++)a[t]=a[t].trim;if(u=u.concat(a),c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" OR ")>=0&&s.push(c[t]);if(u.length>0)for(let t=0;t<u.length;t++)!u[t].indexOf(" AND ")>=0&&s.push(u[t]);for(let e=0;e<s.length;e++){const r=s[e];if(r&&r.indexOf&&r.indexOf("..")>=0){const e=r.toString().split("..");2===e.length&&(t=n>=e[0]&&n<=e[1])}else t=i(n,r);const l=e<c.length?"and":"or";o=void 0===o?t:"or"===l?o||t:o&&t}return o}return e&&e.indexOf&&e.indexOf("..")>=0&&(s=e.toString().split(".."),2===s.length)?n>=s[0]&&n<=s[1]:i(n,e)}}),Smart.Utilities.Assign("DateFilter",class{constructor(t,e,r,n,i){const s=this,l=new Smart.Utilities.DateTime;if(s.value=t,s.type="dateFilter",void 0!==r){const e=l.parseDate(t,r);if(null!==e)s.filterdate=e;else{const e=l.tryparseDate(t);null!==e&&(s.filterdate=e)}}else{const e=new Date(t);"NaN"===e.toString()||"Invalid Date"===e.toString()?s.filterdate=l.tryparseDate(t):s.filterdate=e}if(!s.filterdate){const e=new Date(t);"NaN"===e.toString()||"Invalid Date"===e.toString()?s.filterdate=l.tryparseDate(t):s.filterdate=e}s.condition=e,s.formatString=r,s.timeOnly=i}toString(){return this.condition+" "+this.value}evaluate(t){const e=this,r=e.condition,n=e.formatString;let i=e.value;if(e.timeOnly)return e.evaluateTimeOnly(t);if(null==t||""===t){if("NOT_NULL"===r)return!1;if("NULL"===r)return!0;switch(r){case"EQUAL":return t===i;case"NOT_EQUAL":return t!==i}return!1}if("NULL"===r)return!1;if("NOT_NULL"===r)return!0;let s,l=new Date;l.setFullYear(1900,0,1),l.setHours(12,0,0,0);try{const r=new Smart.Utilities.DateTime,a=new Date(t);if(l=t="NaN"===a.toString()||"Invalid Date"===a.toString()?r.tryparseDate(t):a,s=!1,void 0!==n&&(n.indexOf("t")>=0||n.indexOf("T")>=0||n.indexOf(":")>=0||n.indexOf("f")>=0)&&(s=!0,i&&-1===i.toString().indexOf(":"))){const t=r.tryparseDate(i.toString()+":00");null!==t&&(e.filterdate=t)}s||(l.setHours(0),l.setMinutes(0),l.setSeconds(0))}catch(e){if(null!==t&&""!==t.toString())return!1}if(null!==e.filterdate)i=e.filterdate;else if(i&&i.indexOf&&(-1!==i.indexOf(":")||!isNaN(parseInt(i)))){const t=new Date(l);t.setHours(12,0,0,0);const e=i.split(":");for(let r=0;r<e.length;r++)0===r&&t.setHours(e[r]),1===r&&t.setMinutes(e[r]),2===r&&t.setSeconds(e[r]);i=t}s&&i&&i.setFullYear&&l&&l.getFullYear&&-1===n.indexOf("d")&&-1===n.indexOf("M")&&-1===n.indexOf("y")&&i.setFullYear(l.getFullYear(),l.getMonth(),l.getDate());const a=function(t,e){switch(null===t&&(t=""),r){case"EQUAL":return t.toString()===e.toString();case"NOT_EQUAL":return t.toString()!==e.toString();case"GREATER_THAN":return t>e;case"GREATER_THAN_OR_EQUAL":return t>=e;case"LESS_THAN":return t<e;case"LESS_THAN_OR_EQUAL":return t<=e;case"STARTS_WITH":return e=e.toString().toLowerCase(),t.toString().toLowerCase().substring(0,e.length)===e;case"ENDS_WITH":return t=t.toString().toLowerCase(),e=e.toString().toLowerCase(),t.substring(t.length-e.length,t.length)===e;case"ENDS_WITH_CASE_SENSITIVE":return t=t.toString(),e=e.toString(),t.substring(t.length-e.length,t.length)===e;case"STARTS_WITH_CASE_SENSITIVE":return e=e.toString(),t.toString().substring(0,e.length)===e;case"CONTAINS":return-1!==t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"CONTAINS_CASE_SENSITIVE":return-1!==t.toString().indexOf(e.toString());case"DOES_NOT_CONTAIN":return-1===t.toString().toLowerCase().indexOf(e.toString().toLowerCase());case"DOES_NOT_CONTAIN_CASE_SENSITIVE":return-1===t.toString().indexOf(e.toString());default:return!0}};let o=new Array;if(i&&i.indexOf&&(i.indexOf("|")>=0||i.indexOf(" AND ")>=0||i.indexOf(" OR ")>=0||i.indexOf(" and ")>=0||i.indexOf(" or ")>=0)){let t=a(l,i);if(t)return t;const e=i.indexOf(" and ")>=0?i.split(" and "):new Array,r=i.indexOf(" or ")>=0?i.split(" or "):new Array,n=i.indexOf("|")>=0?i.split("|"):new Array;let s,c=i.indexOf(" AND ")>=0?i.split(" AND "):new Array,u=i.indexOf(" OR ")>=0?i.split(" OR "):new Array;if(c=c.concat(e),u=u.concat(r),n.length>0)for(let t=0;t<n.length;t++)n[t]=n[t].trim;if(u=u.concat(n),c.length>0)for(let t=0;t<c.length;t++)!c[t].indexOf(" OR ")>=0&&o.push(c[t]);if(u.length>0)for(let t=0;t<u.length;t++)!u[t].indexOf(" AND ")>=0&&o.push(u[t]);for(let e=0;e<o.length;e++){const r=o[e];if(r&&r.indexOf&&r.indexOf("..")>=0){const e=r.toString().split("..");2===e.length&&(t=l>=e[0]&&l<=e[1])}else t=a(l,r);const n=e<c.length?"and":"or";s=void 0===s?t:"or"===n?s||t:s&&t}return s}return i&&i.indexOf&&i.indexOf("..")>=0&&(o=i.toString().split(".."),2===o.length)?l>=o[0]&&l<=o[1]:a(l,i)}evaluateTimeOnly(t){const e=this.value;return e?!!(t&&t instanceof Date)&&(t.getHours()===e.getHours()&&(t.getMinutes()===e.getMinutes()&&t.getSeconds()===e.getSeconds())):!t}}),Smart.Utilities.Assign("CustomFilter",class{constructor(t,e,r){const n=this;n.value=t,n.condition=e,n.customfilter=r}toString(){return this.condition+" "+this.value}evaluate(t){const e=this;return e.customfilter(e.value,t,e.condition)}}),Smart.FilterGroup=Smart.Utilities.FilterGroup,Smart.StringFilter=Smart.Utilities.StringFilter,Smart.NumericFilter=Smart.Utilities.NumericFilter,Smart.DateFilter=Smart.Utilities.DateFilter,Smart.CustomFilter=Smart.Utilities.CustomFilter;
/***/ }),
/***/ 2515:
/***/ (() => {
Smart.Utilities.Assign("ConditionalFormatter",class{constructor(e){const t=this;t.data=e||[],t._allowedDateComparators=["yesterday","today","tomorrow","last7Days","lastWeek","thisWeek","nextWeek","lastMonth","thisMonth","nextMonth","lastYear","thisYear","nextYear"],t._colorSchemes=[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]},{name:"scheme28",colors:["#63BE7B","#FDD17F","#F8696B"]},{name:"scheme29",colors:["#F8696B","#FDD17F","#63BE7B"]},{name:"scheme30",colors:["#63BE7B","#FCFCFF","#F8696B"]},{name:"scheme31",colors:["#F8696B","#FCFCFF","#63BE7B"]},{name:"scheme32",colors:["#5A8AC6","#FCFCFF","#F8696B"]},{name:"scheme33",colors:["#F8696B","#FCFCFF","#5A8AC6"]},{name:"scheme34",colors:["#FCFCFF","#F8696B"]},{name:"scheme35",colors:["#F8696B","#FCFCFF"]},{name:"scheme36",colors:["#63BE7B","#FCFCFF"]},{name:"scheme37",colors:["#FCFCFF","#63BE7B"]},{name:"scheme38",colors:["#63BE7B","#FFEF9C"]},{name:"scheme39",colors:["#FFEF9C","#63BE7B"]},{name:"scheme40",colors:["#000000","#8b0000 ","#FFFF00","#FFFFFF"]},{name:"scheme41",colors:["#63BE7B","#FDD17F ","#F8696B","#FF69B4"]},{name:"scheme42",colors:["#63BE7B","#FDD17F ","#FDD17F","#F8696B"]},{name:"scheme00",colors:["#63BE7B","#FDD17F","#FDD17F","#FDD17F","#F8696B"]}]}format(e,t,o){const a=this,r=a.data;if(0===r.length)return;if(e?a.condition=e:e=a.condition,!e)return;void 0!==a.comparator&&null!==a.comparator||(a.comparator=o),t?a.columns=t:t=a.columns,a.color&&(a.color=/^#[0-9A-F]{6}$/i.test(a.color)?a.color:void 0),(!t||!Array.isArray(t)||Array.isArray(t)&&0===t.length)&&(t=a.columns=[]);let n={};for(let e=0;e<t.length;e++){const o=t[e];void 0!==r[0][o]&&(n[o]=a._validateColumnData(o))}return 0!==Object.keys(n).length?n:void 0}_applyColorScale(e){const t=this,o=e.length;function a(e){let t=0;for(;t<i;){if(e<=c[t].max)return t;t++}return Math.max(0,Math.min(i-1,t))}if(0===o)return;const r=void 0!==t.colorScheme?t._getSchemeColors():[t.color];if(0===r.length||void 0===r[0]||null===r[0])return;let n,l,s={},c={};const i=r.length-("iconSet"===t.condition?0:1),m=t._getColumnRange(e),F=parseFloat(t.min)||m.min,h=Math.max(F,parseFloat(t.max)||m.max);for(let e=0;e<i;e++)c[e]={min:c[e-1]?c[e-1].max:F,max:F+(e+1)/i*(h-F)};0===i&&(c[0]={min:F,max:h});for(let m=0;m<o;m++){let o=e[m]instanceof Date?e[m].getTime():e[m];o=Math.min(h,Math.max(F,o)),"number"==typeof o&&(n=a(o)||0,"iconSet"===t.condition?s[m]={"--icon-set":" ","--icon-set-color":r[n],"--icon-set-rotation-angle":t._getRotationAngle(n/(i-1)||0)+"deg"}:(l=1-((o-c[n].min)/(c[n].max-c[n].min)||0),s[m]=t._getCellStyle(t._mixColors(r[n],r[Math.min(n+1,i)],l))))}return s}_applyColorBar(e){const t=this,o=e.length,a=t._getColumnRange(e),r=t.min?parseFloat(t.min)||0:a.min,n=t.max?parseFloat(t.max)||0:a.max,l=void 0!==t.colorScheme?t._getSchemeColors():[t.color];let s,c="",i={};for(let e=0;e<l.length;e++)void 0!==l[e]&&null!==l[e]&&(c+=l[e]+",");if(c){c=c.slice(0,-1),s=1===l.length?l[0]:"-webkit-linear-gradient(left,"+c+")";for(let t=0;t<o;t++){let o=e[t]instanceof Date?e[t].getTime():e[t];o=Math.min(n,Math.max(r,e[t])),"number"==typeof o&&(i[t]={"--color-bar":" ","--bar-width":((o-r)/(n-r)*100||0)+"%","--bar-color":s})}return i}console.log("Invalid color/colorScheme detected.")}_applyRule(e){const t=this,o=e.length,a="string"==typeof t.condition?t.condition.trim():"";let r,n,l,s=parseFloat(t.min)||0,c=Math.max(s,parseFloat(t.max)||0);function i(i){switch(a){case"between":if(i instanceof Date&&(i=i.getTime()),i>=s&&i<=c)return i;break;case"contains":if((i+"").indexOf(r)>-1)return i;break;case"duplicate":{let t=0;for(let a=0;a<o;a++)if(e[a]===i&&t++,t>1)return i;break}case"dateOccur":{const e=t._getDateRange(i,r);if(!e)break;if(i=new Date(i),isNaN(i.getTime()))break;const o=i.getTime(),a=e.min.getTime(),n=e.max.getTime();if(o>=a&&o<=n)return i;break}case"doesNotContain":if((i+"").indexOf(r)<0)return i;break;case"equal":if("number"==typeof i&&i===parseFloat(r))return i;if("string"==typeof i&&0===i.localeCompare(r+""))return i;if("boolean"==typeof i&&i+""==r+"")return i;if(i instanceof Date&&i.getTime()===new Date(r).getTime())return i;break;case"greaterThan":if(i>parseFloat(r))return i;break;case"lessThan":if(i<parseFloat(r))return i;break;case"notEqual":if("number"==typeof i&&i!==parseFloat(r))return i;if("string"==typeof i&&0!==i.localeCompare(r+""))return i;if("boolean"==typeof i&&i+""!=r+"")return i;if(i instanceof Date&&i.getTime()!==new Date(r).getTime())return i;break;case"topNItems":case"bottomNItems":case"topNPercent":case"bottomNPercent":if(n||(n=e.slice(0).sort(0===a.indexOf("top")?(e,t)=>e<t?1:e>t?-1:0:(e,t)=>e>t?1:e<t?-1:0).slice(0,parseInt(a.indexOf("Percent")>0?o*r/100:r))),n.indexOf(i)>-1)return i;break;case"aboveAverage":case"belowAverage":if(!l){let t=0;e.map((e=>t+=parseFloat(e))),l=t/o}if("aboveAverage"===a&&i>l)return i;if("belowAverage"===a&&i<l)return i}return null}if(r="dateOccur"===a?"string"==typeof t.comparator&&t._allowedDateComparators.indexOf(t.comparator.trim())>-1?t.comparator.trim():void 0:Array.isArray(t.comparator)?t.comparator[0].trim():t.comparator,!e||0===e.length)return;if(["odd","even","duplicate","dateOccur","between","aboveAverage","belowAverage"].indexOf(a)<0&&0!==a.indexOf("everyN")&&null==r)return console.warn(t.condition+" requires a comparator."),[];if("odd"===a||"even"===a||0===a.indexOf("everyN"))return t._getAlternateItems(e);let m,F=[];for(let t=0;t<o;t++)m=i(e[t]),null!=m&&F.push(t);return F}_getAlternateItems(e){const t=this,o=e.length,a="string"==typeof t.condition?t.condition.trim():"",r=parseInt(t.min)||0,n=Math.max(r,parseInt(t.max)||o)-1,l=parseInt(t.comparator);let s=[],c=0;for(let e=0;e<=o;e++)if(!(e<r)){if(e>n)break;"even"===a&&(e+1)%2==0||"odd"===a&&(e+1)%2!=0?s.push(e):void 0===l||isNaN(l)||(c===l?(s.push(e),c=0):c++)}return s}_getColumnRange(e){const t=e.length;let o,a,r=0;for(let n=0;n<t;n++)a=e[n],a instanceof Date&&(a=a.getTime()),a>r&&(r=a),void 0===o&&(o=a),a<o&&(o=a);return{min:parseFloat(o)||0,max:parseFloat(r)||0}}_getCellStyle(e,t){var o=e;return{background:this._hexToRgba(e,t).toString(),color:this._getTextElementByColor(this._hexToRgba(e,.7)),border:o}}_getDateRange(e,t){let o,a;if(!(new Date(e)instanceof Date&&t))return;const r=new Date;switch(t){case"yesterday":case"today":case"tomorrow":"yesterday"===t?a=new Date(r.getFullYear(),r.getMonth(),r.getDate()-1):"today"===t?(a=new Date,a.setHours(0,0,0,0)):a=new Date(r.getFullYear(),r.getMonth(),r.getDate()+1),o=a;break;case"last7Days":a=new Date(r.getFullYear(),r.getMonth(),r.getDate()-6),o=new Date(r);break;case"lastWeek":case"thisWeek":case"nextWeek":a="lastWeek"===t?new Date(r.getFullYear(),r.getMonth(),r.getDate()-6-r.getDay()):"thisWeek"===t?new Date(r.getFullYear(),r.getMonth(),r.getDate()-Math.abs(1-r.getDay())):new Date(r.getFullYear(),r.getMonth(),r.getDate()+Math.abs(7-r.getDay())),o=new Date(a.getFullYear(),a.getMonth(),a.getDate()+6);break;case"lastMonth":case"thisMonth":case"nextMonth":"lastMonth"===t?(o=new Date(r.getFullYear(),r.getMonth(),0),a=new Date(o.getFullYear(),o.getMonth(),1)):"thisMonth"===t?(a=new Date(r.getFullYear(),r.getMonth(),1),o=new Date(r.getFullYear(),r.getMonth()+1,0)):(a=new Date(r.getFullYear(),r.getMonth()+1,1),o=new Date(r.getFullYear(),r.getMonth()+2,0));break;case"lastYear":case"thisYear":case"nextYear":"lastYear"===t?(a=new Date(r.getFullYear()-1,0,1),o=new Date(r.getFullYear()-1,12,0)):"thisYear"===t?(a=new Date(r.getFullYear(),0,1),o=new Date(r.getFullYear(),12,0)):(a=new Date(r.getFullYear()+1,0,1),o=new Date(r.getFullYear()+1,12,0))}return{min:a,max:o}}_getRotationAngle(e){let t=e;return e<.25?t=Math.round(e)?.25:0:e>.25&&e<.5?t=Math.round(e)?.5:.25:e>.5&&e<.75?t=Math.round(e)?.75:.5:e>.75&&e<1&&(t=Math.round(e)?1:.75),180*t}_getSchemeColors(){const e=this;let t;if("string"==typeof e.colorScheme)t=0===e.colorScheme.indexOf("scheme")?e._colorSchemes.filter((t=>t.name===e.colorScheme))[0]:void 0;else{if("number"!=typeof e.colorScheme)return[];t=e._colorSchemes[e.colorScheme]?e._colorSchemes[e.colorScheme]:void 0}return"object"==typeof t?t.colors:e._colorSchemes[0].colors}_getTextElementByColor(e){return.299*e.r+.587*e.g+.114*e.b>=125?"Black":"White"}_hexToRgba(e,t){const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);var a=function(){return this.alpha>1||void 0===this.alpha||null===this.alpha?this.alpha=1:this.alpha<0&&(this.alpha=0),"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"};return void 0===t?o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16),toString:a}:null:(t>1?t=1:t<0&&(t=0),o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16),alpha:t,toString:a}:null)}_mixColors(e,t,o){const a=e=>parseInt(e,16);let r,n="#";o=void 0!==o?o:.5,e=e.replace(/#/g,""),t=t.replace(/#/g,"");for(let l=0;l<=5;l+=2){const s=a(e.substr(l,2)),c=a(t.substr(l,2));for(r=Math.floor(c+(s-c)*o).toString(16);r.length<2;)r="0"+r;n+=r}return n}_shadeColor(e,t){var o=parseInt(e.slice(1),16),a=t<0?0:255,r=t<0?-1*t:t,n=o>>16,l=o>>8&255,s=255&o;return"#"+(16777216+65536*(Math.round((a-n)*r)+n)+256*(Math.round((a-l)*r)+l)+(Math.round((a-s)*r)+s)).toString(16).slice(1)}_validateColumnData(e){const t=this,o=[],a=t.data;let r,n={};for(let t=0;t<a.length;t++)a[t]&&o.push(a[t][e]);if("colorScale"===t.condition||"iconSet"===t.condition)return t._applyColorScale(o);if("colorBar"===t.condition)return t._applyColorBar(o);if(r=t._applyRule(o),r){if(t.color){for(let e=0;e<r.length;e++)n[r[e]]=t._getCellStyle(t.color);return n}console.warn('No color is provided. "color" property is not set.')}}});
/***/ }),
/***/ 2754:
/***/ (() => {
Smart.Utilities.Assign("NumericProcessor",class{constructor(t,e){switch(t[e]){case"integer":return new Smart.Utilities.IntegerNumericProcessor(t,e);case"floatingPoint":return new Smart.Utilities.DecimalNumericProcessor(t,e);case"complex":return new Smart.Utilities.ComplexNumericProcessor(t,e)}}}),Smart.Utilities.Assign("BaseNumericProcessor",class{constructor(t,e){const i=this;i.context=t,i._longestLabelSize=0,i.numericFormatProperty=e,i.regexScientificNotation=new RegExp(/^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)(Y|Z|E|P|T|G|M|k|m|u|n|p|f|a|z|y){1}$/),i.regexNoLeadingZero=new RegExp(/^(-)?[.]\d+$/),i.regexLeadingZero=new RegExp(/^[+\-]?(0+)[1-9]+|^[+\-]?(0{2,})[.]|^(0{2,})$/),i.prefixesToPowers={Y:24,Z:21,E:18,P:15,T:12,G:9,M:6,k:3,m:-3,u:-6,n:-9,p:-12,f:-15,a:-18,z:-21,y:-24},window.NIComplex?i.complexConstructor=window.NIComplex:i.complexConstructor=Smart.Utilities.Complex}prepareForValidation(t,e,i){const r=this.context,a=t||void 0!==e;if(i=(i=i.toString()).replace(/\s/g,""),i=r._discardDecimalSeparator(i),this.regexLeadingZero.test(i)){const t=this.regexLeadingZero.exec(i);i=t[1]?i.replace(t[1],""):t[2]?i.replace(t[2],"0"):i.replace(t[3],"0")}this.regexNoLeadingZero.test(i)?i="-"===i.charAt(0)?"-0"+i.slice(1):"0"+i:("integer"===r[this.numericFormatProperty]&&(10===r._radixNumber||a)||"floatingPoint"===r[this.numericFormatProperty])&&this.regexScientificNotation.test(i)&&(i=this.scientificToDecimal(i));let n,l=!1;if("complex"===r[this.numericFormatProperty]&&!1===r._regexSpecial.nonNumericValue.test(i))try{if(r._regexSpecial.exaValue.test(i)){const t=i.indexOf("E"),e=parseFloat(i.slice(0,t))*Math.pow(10,18),r=parseFloat(i.slice(t+1,-1));n=new this.complexConstructor(e,r)}else n=new this.complexConstructor(i);l=!0}catch(t){l=!1}if(!1!==l||!(!a&&!1===r._regex[r._radixNumber].test(i)||a&&!1===r._regex[10].test(i)))return{value:i,enteredComplexNumber:n};r._handleNonNumericValue(t,e,i)}isENotation(t){return new RegExp(/e/i).test(t.toString())}scientificToDecimal(t){const e=this.regexScientificNotation.exec(t),i=e[1],r=e[2];return parseFloat(i)*Math.pow(10,this.prefixesToPowers[r])}_createMeasureLabel(){const t=this.context,e=document.createElement("div");return e.className="smart-label",e.style.position="absolute",e.style.visibility="hidden","far"!==t.scalePosition?t._measureLabelScale=t.$.scaleNear:t._measureLabelScale=t.$.scaleFar,t._measureLabelScale.appendChild(e),e}_addMajorTickAndLabel(t,e,i,r,a){const n=this.context,l=n._settings.leftOrTop,o=this.valueToPx(r);let s="",c="";if(parseInt(o)>parseInt(n._measurements.trackLength))return{tick:s,label:c};if(n.logarithmicScale&&(t=n._formatLabel(Math.pow(10,r))),"smart-tank"===n.nodeName.toLowerCase()||n._intervalHasChanged){let e=n._tickIntervalHandler.labelsSize;if(a){n._labelDummy.innerHTML=t;let a=this.valueToPx(r),l=this.valueToPx(n._drawMax),o=this.valueToPx(n._drawMin),s=n._labelDummy[n._settings.size],c="vertical"===n.orientation?n._labelDummy.offsetWidth:n._labelDummy.offsetHeight,m=(s+e.minLabelSize)/2,u=(s+e.maxLabelSize)/2;i=n._normalLayout?a+u<l&&a-m>o:a-u>l&&a+m<o,c>this._longestLabelSize&&(this._longestLabelSize=c)}else this._longestLabelSize=Math.max(e.minLabelOtherSize,e.maxLabelOtherSize,this._longestLabelSize)}return n._tickValues.push(r),s='<div style="'+l+": "+o+'px;" class="smart-tick"></div>',!1!==i&&(void 0===e&&(n._labelDummy.innerHTML=t,e=n._labelDummy[n._settings.size]),c+='<div class="smart-label'+(a?" smart-label-middle":"")+'" style="'+l+": "+(o-e/2)+'px;">'+t+"</div>"),{tick:s,label:c}}getWordLength(t){switch(this.context._unsigned="u"===t.charAt(0),t){case"int8":case"uint8":return 8;case"int16":case"uint16":return 16;case"int32":case"uint32":return 32;case"int64":case"uint64":return 64}}getAngleByValue(t,e,i){const r=this.context;!1!==e&&r.logarithmicScale&&(t=Math.log10(t));const a=(t-r._drawMin)*r._angleRangeCoefficient;let n;return n=void 0===r.inverted||!r.inverted&&!r.rightToLeft||r.rightToLeft&&r.inverted?r.endAngle-a:r.startAngle+a,i?n:n*Math.PI/180+Math.PI/2}getValueByAngle(t,e){const i=this.context;let r,a,n;for(void 0===i.inverted||!i.inverted&&!i.rightToLeft||i.rightToLeft&&i.inverted?(r=i.endAngle,a=t):(r=t,a=i._normalizedStartAngle);r<a;)r+=360;if(n=(r-a)/i._angleDifference*i._range+parseFloat(i._drawMin),i.logarithmicScale){if(i.customInterval)return parseFloat(Math.pow(10,this.getCoercedValue(n,!0)).toFixed(12));n=Math.pow(10,n)}return e&&!i.coerce?Math.round(n):(n=this.createDescriptor(n,void 0,!0,!0),this.getCoercedValue(n,!1))}updateGaugeValue(t){const e=this.context,i=e.value;e.value=t,e._drawValue=e.logarithmicScale?Math.log10(t).toString():t,e._number=this.createDescriptor(e.value),e.$.digitalDisplay.value=t,e.$.fireEvent("change",{value:t,oldValue:i}),e._setAriaValue("valuenow"),delete e._valueBeforeCoercion}validateColorRange(t){const e=this.context;return Math.min(Math.max(t,e.min),e.max)}getActualValue(t){return this.context.logarithmicScale?Math.pow(10,t):t}drawGaugeLogarithmicScaleMinorTicks(t,e,i){const r=this.context;let a;e instanceof Smart.Utilities.BigNumber&&(e=parseFloat(e.toString()));for(let e in t)if(a=e,e>=0&&e%1==0)break;for(let t=parseFloat(a);t<r._drawMax;t+=e)for(let a=2;a<=9;a++){const n=a*Math.pow(10,t+e-1);n<r.max&&i(n)}for(let t=parseFloat(a);t>r._drawMin;t-=e)for(let e=2;e<=9;e++){const a=e*Math.pow(10,t-1);a>r.min&&i(a)}}_getAngleDifference(t,e){const i=Math.abs(e-t)%360;return i>180?360-i:i}addCustomTicks(){const t=this,e=t.context,i=!e.logarithmicScale;let r="",a="";function n(n){const l=e.customTicks[n],o=i?t.createDescriptor(l):Math.log10(l),s=n>0&&n<e.customTicks.length-1,c=t._addMajorTickAndLabel(e._formatLabel(l),void 0,!0,o,s);r+=c.tick,a+=c.label}if(t._longestLabelSize=0,e._tickValues=[],e._labelDummy=t._createMeasureLabel(),e._normalLayout)for(let t=0;t<e.customTicks.length;t++)n(t);else for(let t=e.customTicks.length-1;t>=0;t--)n(t);"smart-tank"===e.nodeName.toLowerCase()&&e._updateScaleWidth(t._longestLabelSize),e._appendTicksAndLabelsToScales(r,a)}addGaugeCustomTicks(){const t=this,e=t.context,i=e._distance,r=e._measurements.radius-i.majorTickDistance;let a,n;function l(i){const r=e.customTicks[i],l=t.createDescriptor(r),o=t.getAngleByValue(l,!0),s=i>0&&i<e.customTicks.length-1;a(o),n(o,r,s)}a="none"!==e.ticksVisibility&&!1!==e._plotTicks?function(t){e._drawTick(t,r,"major")}:function(){},n="none"!==e.labelsVisibility&&!1!==e._plotLabels?function(t,r,a){e._drawLabel(t,r,i.labelDistance,a)}:function(){};for(let t=e.customTicks.length-1;t>=0;t--)l(t)}}),Smart.Utilities.Assign("IntegerNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e);const i=this;i.context=t,i.defaultMins={int8:"-128",uint8:"0",int16:"-32768",uint16:"0",int32:"-2147483648",uint32:"0",int64:"-9223372036854775808",uint64:"0"},i.defaultMaxs={int8:"127",uint8:"255",int16:"32767",uint16:"65535",int32:"2147483647",uint32:"4294967295",int64:"9223372036854775807",uint64:"18446744073709551615"}}createDescriptor(t,e,i,r,a){const n=this.context;let l;if(t.constructor!==Smart.Utilities.BigNumber){let i=!a&&n._radixNumber?n._radixNumber:10;10===i&&e&&t.constructor!==Smart.Utilities.BigNumber&&this.isENotation(t)&&(t=Smart.Utilities.BigNumber.bigIntSupport?new Smart.Utilities.BigNumber(Math.round(t)):new Smart.Utilities.NumberRenderer(t).largeExponentialToDecimal()),l=n._toBigNumberDecimal?n._toBigNumberDecimal(t.toString(i,n._wordLengthNumber),i):new Smart.Utilities.BigNumber(t)}else l=new Smart.Utilities.BigNumber(t);return i&&(n._unsigned&&-1===l.compare(0)&&(l=l.set(0)),r&&(l=this.validate(l,n._minObject,n._maxObject)),l=this.round(l)),l}round(t){const e=this.context;if(t instanceof window.Smart.Utilities.BigNumber&&"bigint"==typeof t._d)return t;if(t instanceof window.Smart.Utilities.BigNumber==0||!e._wordLengthNumber||e._wordLengthNumber<64)return new Smart.Utilities.BigNumber(Math.round(t.toString()));const i=t.mod(1);return 1===i._d.length&&0===i._d[0]||((t=t.intPart())._s?(i._d[1]>5||5===i._d[1]&&i._d[2])&&(t=t.add(-1)):i._d[1]>4&&(t=t.add(1))),t}validate(t,e,i){let r;return r=-1===t.compare(e)?e:1===t.compare(i)?i:t,r}validateMinMax(t,e){const i=this.context;let r=this.defaultMins[i.wordLength],a=new Smart.Utilities.BigNumber(r),n=this.defaultMaxs[i.wordLength],l=new Smart.Utilities.BigNumber(n),o="date"!==i.mode;if(void 0===i._numberRenderer&&(i._numberRenderer=new Smart.Utilities.NumberRenderer),t&&o){null!==i.min&&(i.min=i.min.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.min)&&(i.min=this.scientificToDecimal(i.min)));let t=this.round(new Smart.Utilities.BigNumber(i.min));null===i.min||i._minIsNull&&i._initialized||!(t.compare(a)>=0)?(i._minIsNull=!0,i.min=r,i._minObject=a):i._minObject=t}if(e&&o){null!==i.max&&(i.max=i.max.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.max)&&(i.max=this.scientificToDecimal(i.max)));let t=this.round(new Smart.Utilities.BigNumber(i.max));null===i.max||i._maxIsNull&&i._initialized||!(t.compare(l)<=0)?(i._maxIsNull=!0,i.max=n,i._maxObject=l):i._maxObject=t}o||(i._minObject=new Smart.Utilities.BigNumber(i.min),i._maxObject=new Smart.Utilities.BigNumber(i.max)),this.compare(i._minObject,i._maxObject)||(i._minObject=a,i._maxObject=l,i._drawMin=i.logarithmicScale?0:r,i._drawMax=i.logarithmicScale?10:n,i.min=r,i.max=n),o||(i._minDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.min),i._maxDate=Smart.Utilities.DateTime.fromFullTimeStamp(i.max))}valueToPx(t){const e=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const i=this.context,r=new Smart.Utilities.BigNumber(i._measurements.trackLength).divide(new Smart.Utilities.BigNumber(i._range));let a;if(i._normalLayout){const e=i._drawMin instanceof Smart.Utilities.BigNumber?i._drawMin:new Smart.Utilities.BigNumber(i._drawMin);t=new Smart.Utilities.BigNumber(t),a=parseFloat(r.multiply(t.subtract(e)).toString())}else{const e=i._drawMax instanceof Smart.Utilities.BigNumber?i._drawMax:new Smart.Utilities.BigNumber(i._drawMax);a=parseFloat(this.round(e.subtract(t).multiply(r)).toString())}return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=e,a}pxToValue(t){const e=this.context,i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;let r;if(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,r=e._normalLayout?e._valuePerPx.multiply(t-e._trackStart):e._valuePerPx.multiply(e._trackEnd-t),r=this.round(r).toString(),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,e.logarithmicScale){let t=parseFloat(r)+parseFloat(e._drawMin);return new Smart.Utilities.BigNumber(Math.round(Math.pow(10,t)))}return this.createDescriptor(e._minObject.add(r),!1,!0,!0)}compare(t,e,i){if((null===t||null===e)&&t!==e)return!0;t.constructor!==Smart.Utilities.BigNumber&&(t=new Smart.Utilities.BigNumber(t));const r=t.compare(e);return!0!==i?0!==r:r}incrementDecrement(t,e,i){const r=this.context;let a;if(t.constructor!==Smart.Utilities.BigNumber&&(t=new Smart.Utilities.BigNumber(t)),"add"===e){if(a=t.add(i),void 0!==r._drawMax)return a.compare(r._drawMax)>0?new Smart.Utilities.BigNumber(r._drawMax):a}else if(a=t.subtract(i),void 0!==r._drawMin)return a.compare(r._drawMin)<0?new Smart.Utilities.BigNumber(r._drawMin):a;return a}render(t,e){const i=this.context;if(!i.scientificNotation&&!0===e)return new Smart.Utilities.NumberRenderer(new Smart.Utilities.BigNumber(t)).bigNumberToExponent(i.significantDigits);let r=t;return i.scientificNotation&&!0===e?r=new Smart.Utilities.NumberRenderer(r).toScientific(i.significantDigits,i.precisionDigits):"string"!=typeof t&&(r=t.toString(i._radixNumber,i._wordLengthNumber,i.leadingZeros)),r}addTicksAndLabels(){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const e=this.context,i=e._measurements.trackLength,r=e._normalLayout,a=e._majorTicksInterval,n=this.round(new Smart.Utilities.BigNumber(e._range).divide(a)),l=i/n,o=new Smart.Utilities.BigNumber(e._drawMin),s=new Smart.Utilities.BigNumber(e._drawMax);let c,m,u,g,d,p,h,b,f,_="",S="";e._tickValues=[],this._longestLabelSize=0,r?(c=o,m=a.add(c.subtract(c.mod(a))),u=m.subtract(c),d=e._formatLabel(o),p=e._tickIntervalHandler.labelsSize.minLabelSize,g=s,h=e._formatLabel(s),b=e._tickIntervalHandler.labelsSize.maxLabelSize):(c=s,m=c.subtract(c.mod(a)),u=c.subtract(m),d=e._formatLabel(s),p=e._tickIntervalHandler.labelsSize.maxLabelSize,g=o,h=e._formatLabel(o),b=e._tickIntervalHandler.labelsSize.minLabelSize),e._labelDummy=this._createMeasureLabel(),f=this._addMajorTickAndLabel(d,p,!0,c),_+=f.tick,S+=f.label;const x=u.divide(a).multiply(l);if(0!==m.compare(e.max)&&x.compare(i)<0){const t=e._formatLabel(m.toString()),i=x.compare(p)>0;f=this._addMajorTickAndLabel(t,void 0,i,m,!0),_+=f.tick,S+=f.label}f=this.addMiddleMajorTicks(n,l,x,u,r,a),_+=f.tick,S+=f.label,f=this._addMajorTickAndLabel(h,b,!0,g),_+=f.tick,S+=f.label,"date"!==e.mode&&(_+=this.addMinorTicks(r)),e._measureLabelScale.removeChild(e._labelDummy),delete e._labelDummy,delete e._measureLabelScale,"smart-tank"===e.nodeName.toLowerCase()&&e._updateScaleWidth(this._longestLabelSize),e._appendTicksAndLabelsToScales(_,S),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}addMiddleMajorTicks(t,e,i,r,a,n){const l=this.context;let o,s="",c="";for(let m=1;m<t;m++){let u,g=i.add(m*e);if(a?u=n.multiply(m).add(r.add(new Smart.Utilities.BigNumber(l._drawMin))):(u=new Smart.Utilities.BigNumber(l._drawMax).subtract(r).subtract(n.multiply(m)),m===t-1&&0===u.compare(0)&&(l._numberRenderer.numericValue=l._tickIntervalHandler.nearestPowerOfTen,o=l._numberRenderer.bigNumberToExponent(1))),0!==u.compare(l._drawMax)){let i=l._formatLabel(u.toString()),r=!0;l._labelDummy.innerHTML=o||i;let a=l._labelDummy[l._settings.size];g.add(a).compare(t*e)>=0&&(r=!1);const n=this._addMajorTickAndLabel(i,void 0,r,u,!0);s+=n.tick,c+=n.label}}return{tick:s,label:c}}addMinorTicks(t){function e(t){-1===r.indexOf(t)&&t%n==0&&(m+='<div style="'+l+": "+i._numericProcessor.valueToPx(t)+'px;" class="smart-tick smart-tick-minor"></div>')}const i=this.context,r=i._tickValues,a=i._tickIntervalHandler.nearestPowerOfTen,n=i._minorTicksInterval,l=i._settings.leftOrTop;let o,s,c,m="";if(t?(o=r[0],s=r[1],c=r[r.length-1]):(o=r[r.length-1],s=r[r.length-2],c=r[0]),i.logarithmicScale)!function(){let t=i._measurements.trackLength/r.length,e=.1;t<20?e=1:t>=20&&t<40?e=s-o>1?1:.5:t>=40&&t<80&&(e=.2);let a=Math.floor(i._drawMax),n=i._drawMax-a,c=i._drawMax-i._drawMin>r.length;for(let t=i._drawMax;t>0;t-=1){let r=n>0?Math.pow(10,t-n+1):Math.pow(10,t),a=r*e;for(let t=r;t>0;t-=a)if(t<i.max&&t>i.min){let e=new Smart.Utilities.BigNumber(Math.log10(t));(e%1==0&&c||!c)&&(m+='<div style="'+l+": "+i._numericProcessor.valueToPx(e)+'px;" class="smart-tick smart-tick-minor"></div>')}}}();else{for(let t=s;o.compare(t)<0;t=t.subtract(a))e(t);for(let t=s.add(a);c.compare(t)>0;t=t.add(a))e(t)}return m}validateCustomTicks(){const t=this.context,e="date"!==t.mode;let i=[];for(let r=0;r<t.customTicks.length;r++){let a=t.customTicks[r];e?a=this.createDescriptor(a,!1,!0):void 0===a._d&&(a=Smart.Utilities.DateTime.validateDate(a).getTimeStamp()),a.compare(t._minObject)>=0&&a.compare(t._maxObject)<=0&&i.push(a)}if(i.sort((function(t,e){return t.compare(e)})),e){for(let t=0;t<i.length;t++)i[t]=i[t].toString();i=i.filter((function(t,e,i){return!e||t!==i[e-1]}))}t.customTicks=i.slice(0)}addGaugeTicksAndLabels(){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const e=this.context,i=this,r=Math.max(e._tickIntervalHandler.labelsSize.minLabelSize,e._tickIntervalHandler.labelsSize.maxLabelSize),a=e._majorTicksInterval,n=e._minorTicksInterval,l={},o=e._distance,s=e._measurements.radius,c=s-o.majorTickDistance,m=s-o.minorTickDistance,u=new Smart.Utilities.BigNumber(e._drawMin),g=new Smart.Utilities.BigNumber(e._drawMax);let d,p,h,b,f,_;"none"!==e.ticksVisibility&&!1!==e._plotTicks?(d=function(t){e._drawTick(t,c,"major")},p=function(t){e._drawTick(i.getAngleByValue(t,!0),m,"minor")}):(d=function(){},p=function(){}),h="none"!==e.labelsVisibility&&!1!==e._plotLabels?function(t,i,r){e._drawLabel(t,i,o.labelDistance,r)}:function(){},void 0===e.inverted||!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(f=e.endAngle,_=e.startAngle):(f=e.startAngle,_=e.endAngle),b=i.getAngleByValue(u,!1),d(b),l[e._drawMin.toString()]=!0,h(b,e.min,!1);let S,x,v=u.subtract(u.mod(a));-1!==u.compare(0)&&(v=v.add(a));for(let t=new Smart.Utilities.BigNumber(v);-1!==t.compare(u);t=t.subtract(n))S=t;for(b=i.getAngleByValue(v,!1),d(b),l[v.toString()]=!0,2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(f,i.getAngleByValue(v,!1,!0))/360)>r&&h(b,this.getActualValue(v),-1===v.compare(g)),x=v.add(a);-1===x.compare(g.subtract(a));x=x.add(a))b=i.getAngleByValue(x,!1),d(b),l[x.toString()]=!0,h(b,this.getActualValue(x),!0);if(void 0===l[x.toString()]&&1!==x.compare(g)&&(b=i.getAngleByValue(x,!1),d(b),l[x.toString()]=!0,2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(_,i.getAngleByValue(x,!1,!0))/360)>=r&&h(b,this.getActualValue(x),!0),e._normalizedStartAngle!==e.endAngle&&(b=i.getAngleByValue(g,!1),d(b),2*Math.PI*e._measurements.innerRadius*(this._getAngleDifference(_,f)/360)>=r&&h(b,e.max,!1))),"date"!==e.mode){if(e.logarithmicScale)this.drawGaugeLogarithmicScaleMinorTicks(l,a,p);else for(let t=S;-1===t.compare(g);t=t.add(n))l[t.toString()]||p(t);Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}else Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}updateToolTipAndValue(t,e,i){const r=this.context,a=r.logarithmicScale;r._updateTooltipValue(t.toString()),a&&(t=parseFloat(Math.pow(10,parseFloat(t)).toFixed(11)));const n=(t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t)).toString();r._number=t,r._drawValue=a?Math.log10(n):t,0!==t.compare(e)&&i&&("numeric"===r.mode?(r.value=n,t=n):(e=r._valueDate,r._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(n),r.value=t,t=r._valueDate),r._programmaticValueIsSet||r.$.fireEvent("change",{value:t,oldValue:e}),r.$.hiddenInput&&(r.$.hiddenInput.value=t),r._setAriaValue("valuenow"))}validateInterval(t){const e=this.context,i=e._maxObject.subtract(e._minObject);e._validInterval=new Smart.Utilities.BigNumber(t),e._validInterval=this.round(e._validInterval),e._validInterval.compare(0)<=0&&(e._validInterval=new Smart.Utilities.BigNumber(1)),1===e._validInterval.compare(i)&&(e._validInterval=i),e.interval=e._validInterval.toString()}getCoercedValue(t,e,i){const r=this.context;if(!r.coerce)return t;const a=!r.logarithmicScale;let n,l;if(t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t),r.customInterval){const e=r.customTicks;if(0===e.length)return t;let l,o;if(a||i){n=r._minObject,l=n.subtract(t).abs(),o=n;for(let i=0;i<e.length;i++){const r=this.createDescriptor(e[i]),a=r.subtract(t).abs();-1===a.compare(l)&&(l=a,o=r)}}else{n=r._drawMin,l=Math.abs(n-parseFloat(t.toString())),o=n;for(let i=0;i<e.length;i++){const r=Math.log10(e[i]),a=Math.abs(r-t);a<l&&(l=a,o=r)}o=new Smart.Utilities.BigNumber(o)}return o}let o=r._validInterval;if("date"===r.mode){if("addYears"===r._dateIncrementMethod)return this.coerceYear(t);if("addMonths"===r._dateIncrementMethod)return this.coerceMonth(t);o=new Smart.Utilities.BigNumber(r._dateIntervalNumber).multiply(o)}!1!==e?(n=new Smart.Utilities.BigNumber(r._drawMin),l=new Smart.Utilities.BigNumber(r._drawMax)):(n=new Smart.Utilities.BigNumber(r.min),l=new Smart.Utilities.BigNumber(r.max));let s=t.subtract(n),c=s.mod(o);if(0===c.compare(0))return t;let m=s.subtract(c),u=m.add(o);if(s.subtract(m).abs().compare(s.subtract(u).abs())<0)return m.add(n);{const t=u.add(n);return t.compare(l)<=0?t:m.add(n)}}coerceMonth(t){const e=this.context,i=parseFloat(e._validInterval),r=Smart.Utilities.DateTime.fromFullTimeStamp(t),a=r.year(),n=r.month(),l=r.day(),o=e._minDate.year(),s=e._minDate.month(),c=12*(e._maxDate.year()-o-1)+12-s+e._maxDate.month();let m=12*(a-1-o)+(12-s)+n;1===i&&(-1!==[1,3,5,7,8,10,12].indexOf(n)?(l>16||16===l&&r.hour()>11)&&m++:2===n?r.isLeapYear(a)?(l>15||15===l&&r.hour()>11)&&m++:l>14&&m++:l>15&&m++),m=this.getCoercedTimePart(0,c,m,i);let u=e._minDate.addMonths(m,!0);return 1===u.compare(e._maxDate)&&(u=e._minDate.addMonths(m-i,!0)),e._drawValue=new Smart.Utilities.BigNumber(u.getTimeStamp()),e._drawValue}coerceYear(t){const e=this.context,i=parseFloat(e._validInterval),r=Smart.Utilities.DateTime.fromFullTimeStamp(t),a=e._maxDate.year(),n=Smart.Utilities.DateTime.getConstructorParameters(e._minDate);let l=r.year();r.month()>6&&l++;let o=this.getCoercedTimePart(e._minDate.year(),a,l,i);o>a&&(o-=i),n[0]=o,n.unshift(null);const s=new(Function.prototype.bind.apply(Smart.Utilities.DateTime,n));return e._drawValue=new Smart.Utilities.BigNumber(s.getTimeStamp()),e._drawValue}getCoercedTimePart(t,e,i,r){let a=i-t,n=a%r;if(0===n)return i;let l=parseFloat((a-n).toFixed(12)),o=l+r;if(e-t<=r)return i>=t+(e-t)/2?e:t;if(Math.abs(a-l)<Math.abs(a-o))return l+t;{const i=o+t;return i>e?l+t:i}}updateValue(t){const e=this.context;t=t instanceof Smart.Utilities.BigNumber?t:new Smart.Utilities.BigNumber(t);const i=this.validate(t,e._minObject,e._maxObject);let r,a,n=e.value;e._number=i,e._drawValue=e.logarithmicScale?Math.log10(i):i,"numeric"===e.mode?(r=t.toString(),e.value=r,a=this.compare(t,n)):(n=Smart.Utilities.DateTime.fromFullTimeStamp(n),e._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(t),e.value=t,r=t=e._valueDate,a=0!==t.compare(n)),e._programmaticValueIsSet||!a&&!e._scaleTypeChangedFlag||e.$.fireEvent("change",{value:r,oldValue:n}),e.$.hiddenInput&&(e.$.hiddenInput.value=t),e._setAriaValue("valuenow"),e._moveThumbBasedOnValue(e._drawValue)}getValuePerPx(t,e){const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const r=new Smart.Utilities.BigNumber(t).divide(e);return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,r}restrictValue(t){t[1].constructor===Smart.Utilities.BigNumber?-1===t[1].compare(t[0])&&t[1].set(t[0]):t[1]<t[0]&&(t[1]=t[0])}getAngleByValue(t,e,i){const r=this.context,a=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;if(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,r._wordLengthNumber<64)return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=a,super.getAngleByValue(parseFloat(t.toString()),e,i);t instanceof Smart.Utilities.BigNumber==0&&(t=new Smart.Utilities.BigNumber(t)),!1!==e&&r.logarithmicScale&&(t=new Smart.Utilities.BigNumber(Math.log10(t.toString())));const n=t.subtract(r._drawMin).multiply(r._angleRangeCoefficient);let l;return l=void 0===r.inverted||!r.inverted&&!r.rightToLeft||r.rightToLeft&&r.inverted?n.multiply(-1).add(r.endAngle):n.add(r.startAngle),l=parseFloat(l.toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=a,i?l:l*Math.PI/180+Math.PI/2}getValueByAngle(t){const e=this.context;if(e._wordLengthNumber<64)return super.getValueByAngle(t,!0);const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;let r,a,n,l;for(Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,void 0===e.inverted||!e.inverted&&!e.rightToLeft||e.rightToLeft&&e.inverted?(r=e.endAngle,a=t):(r=t,a=e._normalizedStartAngle);r<a;)r+=360;return n=new Smart.Utilities.BigNumber((r-a)/e._angleDifference).multiply(e._range).add(e._drawMin),e.logarithmicScale&&(n=new Smart.Utilities.BigNumber(Math.pow(10,n.toString()))),l=e.coerce?this.getCoercedValue(n,!1):this.round(n),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,new Smart.Utilities.BigNumber(l)}updateGaugeValue(t){if(t instanceof Smart.Utilities.BigNumber==0)return super.updateGaugeValue(t);const e=this.context,i=e._getEventValue();"numeric"===e.mode?(e.value=t.toString(),e.$.digitalDisplay.value=e.value):(e._valueDate=Smart.Utilities.DateTime.fromFullTimeStamp(t),e.value=t),e._drawValue=e.logarithmicScale?Math.log10(e.value).toString():e.value,e._number=t,e.$.fireEvent("change",{value:e._getEventValue(),oldValue:i}),e._setAriaValue("valuenow")}validateColorRange(t){const e=this.context;if(e._wordLengthNumber<64)return super.validateColorRange(t);t="numeric"===e.mode?new Smart.Utilities.BigNumber(t):(t=Smart.Utilities.DateTime.validateDate(t)).getTimeStamp();const i=new Smart.Utilities.BigNumber(e.min),r=new Smart.Utilities.BigNumber(e.max);return-1===t.compare(i)&&(t=i),1===t.compare(r)&&(t=r),t}lockRotation(t,e){const i=this.context;if(e instanceof Smart.Utilities.BigNumber==0&&(e=new Smart.Utilities.BigNumber(e)),t&&-1===e.compare(i._number)){if(i._lockCW=!0,-1===e.compare(i._maxObject))return new Smart.Utilities.BigNumber(i._maxObject)}else if(!t&&1===e.compare(i._number)&&(i._lockCCW=!0,1===e.compare(i._minObject)))return new Smart.Utilities.BigNumber(i._minObject)}getAngleRangeCoefficient(){const t=this.context,e=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,t._angleRangeCoefficient=new Smart.Utilities.BigNumber(t._angleDifference).divide(t._range),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=e}}),Smart.Utilities.Assign("DecimalNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e),this.context=t}getPreciseModulo(t,e,i){const r=t>=0?1:-1;if(t=Math.abs(t),e=Math.abs(e),void 0===i){const i=t.toExponential(),a=e.toExponential(),n=parseInt(i.slice(i.indexOf("e")+1),10),l=parseInt(a.slice(a.indexOf("e")+1),10),o=n<0?Math.abs(n):0,s=l<0?Math.abs(l):0,c=Math.max(o,s);if(this.roundCoefficient=c,t<e)return r*t;if(t===e)return 0;if((t<-1||t>1)&&(e<-1||e>1||1===e)){if(t%1==0&&e%1==0)return r*(t%e);{const i=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0;const a=r*parseFloat(new Smart.Utilities.BigNumber(t).mod(e).toString());return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=i,a}}const m=Math.pow(10,c);return r*(t*m%(e*m)/m)}return r*(Math.round(t*i)%Math.round(e*i))}createDescriptor(t,e,i,r){let a=parseFloat(t);return r&&(a=this.validate(a,this.context._minObject,this.context._maxObject)),a}round(t){return Math.round(t)}validate(t,e,i){let r;return r=t<e?e:t>i?i:t,r}validateMinMax(t,e){const i=this.context,r=void 0!==i._regexSpecial&&i._regexSpecial.inf.test(i.min),a=void 0!==i._regexSpecial&&i._regexSpecial.inf.test(i.max);t&&(null===i.min||r?(i.min=-1/0,i._minObject=-1/0):(i.min=i.min.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.min)&&(i.min=this.scientificToDecimal(i.min)),i._minObject=i._discardDecimalSeparator(i.min))),e&&(null===i.max||a?(i.max=1/0,i._maxObject=1/0):(i.max=i.max.toString().replace(/\s/g,""),this.regexScientificNotation.test(i.max)&&(i.max=this.scientificToDecimal(i.max)),i._maxObject=i._discardDecimalSeparator(i.max))),this.compare(i._minObject,i._maxObject)||(i._maxObject=parseFloat(i._maxObject)+1,i.max=i._maxObject)}valueToPx(t){const e=this.context,i=e._measurements.trackLength/e._range;let r;return r=e._normalLayout?i*(t-e._drawMin):i*(e._drawMax-t),Math.round(r)}pxToValue(t){const e=this.context;let i;if(i=e._normalLayout?(t-e._trackStart)*e._valuePerPx:(e._trackEnd-t)*e._valuePerPx,e.logarithmicScale){const t=i+parseFloat(e._drawMin);return Math.pow(10,t)}return this.validate(i+e._minObject,e._minObject,e._maxObject)}compare(t,e,i){return t=parseFloat(t),e=parseFloat(e),!0!==i?t!==e:t<e?-1:t>e?1:0}incrementDecrement(t,e,i){const r=this.context;let a;if("add"===e){if(a=parseFloat(t)+parseFloat(i),void 0!==r._drawMax)return a>parseFloat(r._drawMax)?r._drawMax:a}else if(a=parseFloat(t)-parseFloat(i),void 0!==r._drawMin)return a<parseFloat(r._drawMin)?r._drawMin:a;return a}render(t){const e=this.context;if(void 0!==e._regexSpecial&&e._regexSpecial.nonNumericValue.test(t))return t;{const i=new Smart.Utilities.NumberRenderer(t);return e.scientificNotation?i.toScientific(e.significantDigits,e.precisionDigits):i.toDigits(e.significantDigits,e.precisionDigits)}}addTicksAndLabels(){const t=this.context,e=t._measurements.trackLength,i=t._normalLayout,r=t._majorTicksInterval,a=Math.round(t._range/parseFloat(r.toString())),n=e/a,l=parseFloat(t._drawMin),o=parseFloat(t._drawMax);let s,c,m,u,g,d,p,h,b,f="",_="";t._tickValues=[],this._longestLabelSize=0,i?(s=l,c=t.logarithmicScale&&l<0&&-1!==l?parseFloat(s-this.getPreciseModulo(s,r)):parseFloat(s-this.getPreciseModulo(s,r)+parseFloat(r)),m=c-s,g=t._formatLabel(l),d=t._tickIntervalHandler.labelsSize.minLabelSize,u=o,p=t._formatLabel(o),h=t._tickIntervalHandler.labelsSize.maxLabelSize):(s=o,c=parseFloat(s-this.getPreciseModulo(s,r)),m=s-c,g=t._formatLabel(o),d=t._tickIntervalHandler.labelsSize.maxLabelSize,u=l,p=t._formatLabel(l),h=t._tickIntervalHandler.labelsSize.minLabelSize),t._labelDummy=this._createMeasureLabel(),b=this._addMajorTickAndLabel(g,d,!0,s),f+=b.tick,_+=b.label;const S=m/r*n;if(c.toString()!==t._drawMax.toString()&&S<e){const e=t._formatLabel(c.toString()),i=d<S;b=this._addMajorTickAndLabel(e,void 0,i,c,!0),f+=b.tick,_+=b.label}b=this.addMiddleMajorTicks(a,n,S,m,i,r),f+=b.tick,_+=b.label,b=this._addMajorTickAndLabel(p,h,!0,u),f+=b.tick,_+=b.label,f+=this.addMinorTicks(i),t._measureLabelScale.removeChild(t._labelDummy),delete t._labelDummy,delete t._measureLabelScale,"smart-tank"===t.nodeName.toLowerCase()&&t._updateScaleWidth(this._longestLabelSize),t._appendTicksAndLabelsToScales(f,_)}addMiddleMajorTicks(t,e,i,r,a,n){const l=this.context;let o="",s="";for(let c=1;c<t;c++){let m,u=c*e+i;if(m=a?parseFloat(l._drawMin)+n*c+r:parseFloat(l._drawMax)-n*c-r,m.toString()!==l._drawMax.toString()){let i=l._formatLabel(m.toString()),r=!0;l._labelDummy.innerHTML=i,u+l._labelDummy[l._settings.size]>=t*e&&(r=!1);const a=this._addMajorTickAndLabel(i,void 0,r,m,!0);o+=a.tick,s+=a.label}}return{tick:o,label:s}}addMinorTicks(t){function e(t){return parseFloat(t.toFixed(o))}function i(t){-1===a.indexOf(t)&&0===r._numericProcessor.getPreciseModulo(t,l,s)&&(d+='<div style="'+c+": "+r._numericProcessor.valueToPx(t)+'px;" class="smart-tick smart-tick-minor"></div>')}const r=this.context,a=r._tickValues,n=r._tickIntervalHandler.nearestPowerOfTen,l=r._minorTicksInterval,o=Math.log10(n)<0?Math.round(Math.abs(Math.log10(n))):0,s=Math.pow(10,o),c=r._settings.leftOrTop;let m,u,g,d="";if(t?(m=a[0],u=a[1],g=a[a.length-1]):(m=a[a.length-1],u=a[a.length-2],g=a[0]),r.logarithmicScale)!function(){let t=r._measurements.trackLength/a.length,e=.1;t<20?e=1:t>=20&&t<40?e=u-m>1?1:.5:t>=40&&t<80&&(e=.2);let i=Math.floor(r._drawMax),n=r._drawMax-i,l=r._drawMax-r._drawMin>a.length;for(let t=r._drawMax;t>r._drawMin-1;t-=1){let i=n>0?Math.pow(10,t-n+1):Math.pow(10,t),a=i*e;for(let t=i;t>0;t-=a)if(t<r.max&&t>r.min){let e=new Smart.Utilities.BigNumber(Math.log10(t));(e%1==0&&l||!l)&&(d+='<div style="'+c+": "+r._numericProcessor.valueToPx(e)+'px;" class="smart-tick smart-tick-minor"></div>')}}}();else{for(let t=u;t>m;t=e(t-n))i(t);for(let t=e(u+n);t<g;t=e(t+n))i(t)}return d}validateCustomTicks(){const t=this.context;let e=[];for(let i=0;i<t.customTicks.length;i++){const r=t.customTicks[i],a=this.createDescriptor(r);a>=t._minObject&&a<=t._maxObject&&e.push(a.toString())}e.sort((function(t,e){return t-e})),e=e.filter((function(t,e,i){return!e||t!==i[e-1]})),t.customTicks=e.slice(0)}addGaugeTicksAndLabels(){const t=this.context,e=this,i=Math.max(t._tickIntervalHandler.labelsSize.minLabelSize,t._tickIntervalHandler.labelsSize.maxLabelSize),r=t._majorTicksInterval,a=t._minorTicksInterval,n={},l=t._distance,o=t._measurements.radius,s=o-l.majorTickDistance,c=o-l.minorTickDistance;let m,u,g,d,p,h;"none"!==t.ticksVisibility&&!1!==t._plotTicks?(m=function(e){t._drawTick(e,s,"major")},u=function(i){t._drawTick(e.getAngleByValue(i,!0),c,"minor")}):(m=function(){},u=function(){}),g="none"!==t.labelsVisibility&&!1!==t._plotLabels?function(e,i,r){t._drawLabel(e,i,l.labelDistance,r)}:function(){},void 0===t.inverted||!t.inverted&&!t.rightToLeft||t.rightToLeft&&t.inverted?(p=t.endAngle,h=t.startAngle):(p=t.startAngle,h=t.endAngle),d=e.getAngleByValue(t._drawMin,!1),m(d),n[t._drawMin]=!0,g(d,t.min,!1);let b,f,_=t._drawMin-e.getPreciseModulo(t._drawMin,r);t._drawMin>=0&&(_+=r);for(let e=_;e>=t._drawMin;e-=a)b=e;for(d=e.getAngleByValue(_,!1),m(d),n[_]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(p,e.getAngleByValue(_,!1,!0))/360)>i&&g(d,this.getActualValue(_),_<t._drawMax),f=_+r;f<t._drawMax-r;f+=r)d=e.getAngleByValue(f,!1),m(d),n[f]=!0,g(d,this.getActualValue(f),!0);if(void 0===n[f]&&f<=t._drawMax&&(d=e.getAngleByValue(f,!1),m(d),n[f]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(h,e.getAngleByValue(f,!1,!0))/360)>=i&&g(d,this.getActualValue(f),!0),t._normalizedStartAngle!==t.endAngle&&(d=e.getAngleByValue(t._drawMax,!1),m(d),n[t._drawMax]=!0,2*Math.PI*t._measurements.innerRadius*(this._getAngleDifference(h,p)/360)>=i&&g(d,t.max,!1))),t.logarithmicScale)this.drawGaugeLogarithmicScaleMinorTicks(n,r,u);else for(let e=b;e<t._drawMax;e+=a)n[e]||u(e)}updateToolTipAndValue(t,e,i){const r=this.context,a=r.logarithmicScale;r._updateTooltipValue(t),a&&(t=parseFloat(Math.pow(10,parseFloat(t)).toFixed(11)));const n=t.toString();r._number=t,r._drawValue=a?Math.log10(n):t,n!==e&&i&&(r.value=r._discardDecimalSeparator(n),r._programmaticValueIsSet||r.$.fireEvent("change",{value:r.value,oldValue:e}),r.$.hiddenInput&&(r.$.hiddenInput.value=r.value),r._setAriaValue("valuenow"))}validateInterval(t){const e=this.context,i=e._maxObject-e._minObject;t<=0&&(t=1),e._validInterval=Math.min(parseFloat(t),i),e.interval=e._validInterval}getCoercedValue(t,e,i){const r=this.context;if(!r.coerce)return t;let a,n,l=!r.logarithmicScale;if(r.customInterval){const n=r.customTicks;if(0===n.length)return t;l=l||i,a=!1!==e?parseFloat(r._drawMin):r._minObject;let o=Math.abs(a-t),s=a;for(let e=0;e<n.length;e++){const i=this.createDescriptor(n[e]),r=l?i:Math.log10(i),a=Math.abs(r-t);a<o&&(o=a,s=r)}return s}!1!==e?(a=parseFloat(r._drawMin),n=parseFloat(r._drawMax)):(a=parseFloat(r.min),n=parseFloat(r.max));let o=t-a,s=this.getPreciseModulo(o,parseFloat(r.interval)),c=this.roundCoefficient;if(0===s)return t;0===this.roundCoefficient&&(c=12);let m=parseFloat((o-s).toFixed(c)),u=m+parseFloat(r.interval);if(r.max-r.min<=parseFloat(r.interval)&&l){let e=a,i=n;return t>=e+(i-e)/2?i:e}if(Math.abs(o-m)<Math.abs(o-u))return m+a;{const t=u+a;return t>n?m+a:t}}updateValue(t){const e=this.context,i=this.validate(t,e._minObject,e._maxObject),r=e.value;t.toString()!==r.toString()||e._scaleTypeChangedFlag?(e.value=t.toString(),e._number=i,e._programmaticValueIsSet||e.$.fireEvent("change",{value:e.value,oldValue:r})):e.value="string"==typeof t?t:t.toString(),e._drawValue=e.logarithmicScale?Math.log10(i).toString():i.toString(),e._moveThumbBasedOnValue(e._drawValue),e.$.hiddenInput&&(e.$.hiddenInput.value=e.value),e._setAriaValue("valuenow")}getValuePerPx(t,e){return parseFloat(t)/e}restrictValue(t){t[1]<t[0]&&(t[1]=t[0])}lockRotation(t,e){const i=this.context;if(t&&e<i._number){if(i._lockCW=!0,e<i._maxObject)return i._maxObject}else if(!t&&e>i._number&&(i._lockCCW=!0,e>i._minObject))return i._minObject}getAngleRangeCoefficient(){const t=this.context;t._angleRangeCoefficient=t._angleDifference/t._range}}),Smart.Utilities.Assign("ComplexNumericProcessor",class extends Smart.Utilities.BaseNumericProcessor{constructor(t,e){super(t,e),this.context=t}createDescriptor(t,e,i,r,a,n){let l;return l=n||(t.constructor===this.complexConstructor?new this.complexConstructor(t.realPart,t.imaginaryPart):new this.complexConstructor(t)),r&&(l=this.validate(l,this.context._minObject,this.context._maxObject)),l}validate(t,e,i){let r=t;return e!==-1/0?-1===this.compareComplexNumbers(t,e)&&(r=new this.complexConstructor(e.realPart,e.imaginaryPart)):i!==1/0&&1===this.compareComplexNumbers(t,i)&&(r=new this.complexConstructor(i.realPart,i.imaginaryPart)),r}compare(t,e,i){return!0!==i?0!==this.compareComplexNumbers(t,e):this.compareComplexNumbers(t,e)}validateMinMax(t,e){const i=this.context;t&&(null===i.min||i._regexSpecial.inf.test(i.min)?(i.min=-1/0,i._minObject=-1/0):i._minObject=new this.complexConstructor(i.min)),e&&(null===i.max||i._regexSpecial.inf.test(i.max)?(i.max=1/0,i._maxObject=1/0):i._maxObject=new this.complexConstructor(i.max))}incrementDecrement(t,e){let i=new this.complexConstructor(t.realPart,t.imaginaryPart),r=this.context._spinButtonsStepObject;return"add"===e?(i.realPart+=r.realPart,i.imaginaryPart+=r.imaginaryPart):(i.realPart-=r.realPart,i.imaginaryPart-=r.imaginaryPart),i}render(t){let e=t;if(!1===this.context._regexSpecial.nonNumericValue.test(t)){let t,i=e.realPart,r=e.imaginaryPart,a=this.context.significantDigits,n=this.context.precisionDigits;r>=0?t="+":(t="-",r=Math.abs(r));const l=new Smart.Utilities.NumberRenderer(i),o=new Smart.Utilities.NumberRenderer(r);this.context.scientificNotation?(i=l.toScientific(a,n),r=o.toScientific(a,n)):(i=l.toDigits(a,n),r=o.toDigits(a,n)),e=`${i} ${t} ${r}i`}return e}compareComplexNumbers(t,e){if(t instanceof this.complexConstructor==0||e instanceof this.complexConstructor==0)return-1;const i=t.realPart,r=e.realPart;if(i<r)return-1;if(i>r)return 1;{const i=t.imaginaryPart,r=e.imaginaryPart;return i<r?-1:i>r?1:0}}}),Smart.Utilities.Assign("NumberRenderer",class{constructor(t){const e=this;e.numericValue=t,e.powersToPrefixes={24:"Y",21:"Z",18:"E",15:"P",12:"T",9:"G",6:"M",3:"k",0:"","-3":"m","-6":"u","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},e.localizationObject={currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:",",defaultPrecision:2}}isENotation(t){return new RegExp(/e/i).test(t)}largeExponentialToDecimal(t){let e;void 0===t&&(t=this.numericValue,e=!0);let i=t.toString().toLowerCase(),r=i.indexOf("e"),a=new Smart.Utilities.BigNumber(i.slice(0,r)),n=i.slice(r+1,r+2);"+"!==n&&"-"!==n&&(i=i.slice(0,r)+"e+"+i.slice(r+1),n="+");let l=i.slice(r+2),o=new Smart.Utilities.BigNumber(10).pow(n+(e?Math.min(20,l):l));return a.multiply(o).toString()}bigNumberToExponent(t,e){let i=this.numericValue;i.constructor!==Smart.Utilities.BigNumber&&(i=new Smart.Utilities.BigNumber(i));const r=i._f;let a=i.toString();if(r<=10)return e?parseFloat(a).toExponential(null!==t?t-1:void 0):new Smart.Utilities.NumberRenderer(parseFloat(a)).toDigits(t);if(t>=r&&!e)return a;{let n;!1===i._s?n="":(n="-",a=a.slice(1)),parseFloat(a.slice(t,t+1))>=5&&(a=new Smart.Utilities.BigNumber(a.slice(0,t)).add(1).toString());let l=a.slice(1,t);if(e)t--,l.length>0&&t>l.length?l+="0".repeat(t-l.length):0===l.length&&(l="0".repeat(t));else for(;l.length>0&&"0"===l.charAt(l.length-1);)l=l.slice(0,l.length-1);const o=l.length>0?".":"",s=r-1;return n+a.slice(0,1)+o+l+"E+"+s}}toScientific(){const t=this;let e;if(e=t.numericValue._d?t.bigNumberToExponent(null!==arguments[0]?arguments[0]:arguments[1]+1,!0).toLowerCase():t.numericValue<=-1||t.numericValue>=1?Number(t.toDigits(arguments[0],arguments[1])).toExponential():Number(t.numericValue).toExponential(),isNaN(e))return e;const i=e.indexOf("e");let r=parseInt(e.slice(i+1),10),a=parseFloat(e.slice(0,i)),n=new Smart.Utilities.NumberRenderer(a);if(r<0){let e=n.toDigits(arguments[0],arguments[1]);if(e=parseFloat(e).toExponential(),"0"===e.charAt(e.length-1)){let e=0;for(;r%3!=0;)r--,e++;if(e){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,a=parseFloat(new Smart.Utilities.BigNumber(a).multiply(Math.pow(10,e)).toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]),n.numericValue=a/1e3;const i=n.toDigits(arguments[0],arguments[1]);return i>=1&&(a=i,r+=3),a+t.powersToPrefixes[r.toString()]}}let l=0;if(l=Math.abs(r)>24?r-r/Math.abs(r)*24:r%3,l>0)for(let t=0;t<l;t++)a*=10;else if(l<0){const t=Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=!0,a=parseFloat(new Smart.Utilities.BigNumber(a).multiply(Math.pow(10,l)).toString()),Smart.Utilities.BigNumber.ignoreBigIntNativeSupport=t}if(r>0){const t=a>=0?0:1,r=e.slice(t,i).length-l-2;r>=0&&(a=a.toFixed(r))}let o=Number(a).toExponential();o=parseFloat(o.charAt(o.length-1)),n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]);let s=Number(a).toExponential(),c=0;s=parseFloat(s.charAt(s.length-1)),s!==o&&s%3==0&&(a=parseFloat(a)/Math.pow(10,s),n.numericValue=a,a=n.toDigits(arguments[0],arguments[1]),c=s);const m=r-l+c;return a+t.powersToPrefixes[m.toString()]}bigNumberToScientific(){const t=this,e=t.numericValue._f-1,i=parseInt(e,10)%3,r=parseInt(e,10)-i;let a,n,l=t.numericValue.toString();if("-"===l.charAt(0)?(a="-",l=l.slice(1)):a="",null!==arguments[0])for(n=l.slice(0,arguments[0]),parseFloat(l.slice(arguments[0],arguments[0]+1))>=5&&(n=new Smart.Utilities.BigNumber(n).add(1).toString());n.length>1+i&&"0"===n.charAt(n.length-1);)n=n.slice(0,n.length-1);else null!==arguments[1]&&(n=l.slice(0,arguments[1]+1),parseFloat(l.slice(arguments[1]+1,arguments[1]+2))>=5&&(n=new Smart.Utilities.BigNumber(n).add(1).toString()),arguments[1]+i>n.length-1&&(n+="0".repeat(arguments[1]+i-n.length+1)));return n.length>1+i&&(n=n.slice(0,1+i)+"."+n.slice(1+i)),a+n+t.powersToPrefixes[r.toString()]}toDigits(t,e){const i=this;let r;return r=null!==t?i.applySignificantDigits(t):null!==e?i.applyPrecisionDigits(e):i.applySignificantDigits(8),r}applySignificantDigits(t){const e=this;function i(t){for(;"0"===t.charAt(t.length-1);)t=t.slice(0,-1);return"."===t.charAt(t.length-1)&&(t=t.slice(0,-1)),t}t=Math.max(1,Math.min(t,21));let r=parseFloat(e.numericValue).toPrecision(t).toUpperCase();if(-1!==r.indexOf("."))if(e.isENotation(r)){const t=r.indexOf("."),e=r.indexOf("E");let a=r.slice(t,e);a=i(a),r=r.slice(0,t)+a+r.slice(e)}else r=i(r);return r}applyPrecisionDigits(t){const e=this;t=Math.max(0,Math.min(t,20));let i=parseFloat(e.numericValue).toFixed(t);return e.isENotation(i)&&(i=e.largeExponentialToDecimal(i)+"."+"0".repeat(t)),i}getLogarithm(t){const e=this.numericValue;let i;if(void 0===t&&(t=10),10===t)try{i=Math.log10(e)}catch(t){i=Math.log(e)/Math.log(10)}else i=Math.log(e)/Math.log(t);return i}applySeparators(t,e){const i=this,r=(t=t.toString()).indexOf(".");if(-1!==r){const a=t.slice(0,r),n=t.slice(r+1);return i.applyThousandsSeparator(a,e)+i.localizationObject.decimalseparator+n}return i.applyThousandsSeparator(t,e)}applyThousandsSeparator(t,e){if(e)return t;let i="";"-"===(t=t.toString()).charAt(0)&&(i="-",t=t.slice(1));let r=t.split("").reverse();for(let t=2;t<r.length-1;t+=3)r[t]=this.localizationObject.thousandsseparator+r[t];return r.reverse(),r=r.join(""),i+r}formatNumber(t,e,i){const r=this;if(void 0===arguments[3]&&delete r._ignoreMinus,delete r._wordLengthNumber,!/^([a-zA-Z]\d*)$/g.test(e))try{return r.applyCustomFormat(t,e)}catch(e){return t.toString()}const a=e.slice(0,1);let n=e.slice(1);if(""!==n&&(isNaN(parseFloat(n))||parseFloat(n)<0||parseFloat(n)>99?n="":parseFloat(n)%1!=0&&(n=Math.round(n))),t._d)r.inputFormat="integer";else{if(t.imaginaryPart)return r.formatComplexNumber(t,e,a,n);r.inputFormat="floatingPoint"}let l,o=new Smart.Utilities.NumericProcessor(r,"inputFormat"),s=o.createDescriptor(t);switch(r._wordLengthNumber=o.getWordLength(i||"int32"),"integer"===r.inputFormat&&(s=o.round(s)),r.numericValue=s,a){case"C":case"c":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),l="floatingPoint"===r.inputFormat?r.applyPrecisionDigits(n):s.toString()+(n>0?"."+"0".repeat(n):""),l=r.applySeparators(l),"before"===r.localizationObject.currencysymbolposition?"-"===l.charAt(0)?"-"+r.localizationObject.currencysymbol+l.slice(1):r.localizationObject.currencysymbol+l:l+" "+r.localizationObject.currencysymbol;case"D":case"d":{if(l=s,"floatingPoint"===r.inputFormat&&(l=Math.round(s)),l=l.toString(),""===n)return l;let t="";"-"===l.charAt(0)&&(t="-",l=l.slice(1));const e=n-l.length;return e>0&&(l="0".repeat(e)+l),t+l}case"E":case"e":case"U":case"u":{""===n&&(n=6),l="floatingPoint"===r.inputFormat?s.toExponential(n):r.bigNumberToExponent(parseFloat(n)+1,!0).toLowerCase();const t=l.indexOf("e"),e=l.slice(t+2).length;return e<3&&(l=l.slice(0,t+2)+"0".repeat(3-e)+l.slice(t+2)),"u"===a.toLowerCase()?r.exponentialToSuperscript(r.applySeparators(l,!0)):("E"===a&&(l=l.toUpperCase()),r.applySeparators(l,!0))}case"F":case"f":case"N":case"n":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),l="floatingPoint"===r.inputFormat?r.applyPrecisionDigits(n):s.toString()+(n>0?"."+"0".repeat(n):""),r.applySeparators(l,"f"===a.toLowerCase());case"G":case"g":{if(""===n||"0"===n)if("floatingPoint"===r.inputFormat)n=15;else switch(i){case"int8":case"uint8":n=3;break;case"int16":case"uint16":n=5;break;case"int64":n=19;break;case"uint64":n=20;break;default:n=10}n=parseFloat(n);let e=r.formatNumber(t,"E"+n,i),l=e.indexOf("E");const o=parseInt(e.slice(l+1),10);if(o>-5&&o<n)return"floatingPoint"===r.inputFormat?r.applySeparators(r.applySignificantDigits(n),!0):s.toString();if(o>-100&&o<100&&(e=e.slice(0,l+2)+e.slice(l+3)),-1!==e.indexOf(r.localizationObject.decimalseparator)){for(;"0"===e.charAt(l-1);)e=e.slice(0,l-1)+e.slice(l),l=e.indexOf("E");e.charAt(l-1)===r.localizationObject.decimalseparator&&(e=e.slice(0,l-1)+e.slice(l))}return"g"===a&&(e=e.toLowerCase()),e}case"P":case"p":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),"floatingPoint"===r.inputFormat?(r.numericValue=100*s,l=r.applyPrecisionDigits(n)):l=s.multiply(100).toString()+(n>0?"."+"0".repeat(n):""),r.applySeparators(l)+" %";case"B":case"b":case"O":case"o":case"X":case"x":{let e;switch("integer"!==r.inputFormat&&(r.inputFormat="integer",o=new Smart.Utilities.NumericProcessor(r,"inputFormat"),s=o.round(o.createDescriptor(t))),a){case"B":case"b":e=2;break;case"O":case"o":e=8;break;default:e=16}if(l=s.toString(e,r._wordLengthNumber),""!==n){const t=parseFloat(n)-l.length;t>0&&(l="0".repeat(t)+l)}return"x"===a&&(l=l.toLowerCase()),l}case"S":case"s":return""===n&&(n=r.localizationObject.defaultPrecision),n=parseFloat(n),r.toScientific(null,n).replace(".",r.localizationObject.decimalseparator);default:return t.toString()}}formatComplexNumber(t,e,i){const r=this;switch(i){case"E":case"e":case"U":case"u":case"F":case"f":case"G":case"g":case"N":case"n":case"S":case"s":return t.imaginaryPart>=0?r.formatNumber(t.realPart,e)+" + "+r.formatNumber(t.imaginaryPart,e)+"i":r.formatNumber(t.realPart,e)+" - "+r.formatNumber(Math.abs(t.imaginaryPart),e)+"i";default:return t.toString()}}toString(t,e,i){return e?this.formatNumber(t,e,i):t.toString()}applyCustomFormat(t,e){const i=this,r=(e=(e=e.replace(/_.|\[\w*\]|\*/g,"")).replace(/\?/g,"#")).split(";");if("string"==typeof t&&isNaN(t))return r[r.length-1].replace(/"/g,"").replace(/@/g,t.toString());if(t._d)i.inputFormat="integer";else{if(t.imaginaryPart)return t.toString();t=parseFloat(t),i.inputFormat="floatingPoint"}let a=new Smart.Utilities.NumericProcessor(i,"inputFormat"),n=a.createDescriptor(t);"integer"===i.inputFormat&&(n=a.round(n)),i.numericProcessor=a;const l=i.getRelevantFormatSection(r,n);if(void 0===l)return t.toString();if(-1!==l.indexOf("@"))return r[r.length-1].replace(/"/g,"").replace(/@/g,t.toString());const o=-1!==l.replace(/".*"/g,"").indexOf("%"),s=i.getTextParts(l);if(-1!==s.main.toLowerCase().indexOf("e"))return i.applyCustomExponentialFormat(n,s,a);if(-1!==s.main.indexOf("/"))return i.applyCustomFractionalFormat(n,s,a);if(o&&("integer"===i.inputFormat?n=n.multiply(100):n*=100),""===s.main){if(!o)return s.suffix;let t=n.toString();return i._ignoreMinus&&"-"===t.charAt(0)&&(t=t.slice(1)),t+s.suffix}let c=s.main.replace(/[^0#,. \/]/g,""),m=c.indexOf(".");for(-1!==m&&(c=c.substring(0,m+1)+c.substring(m+1).replace(/\./g,""),"."===c.charAt(c.length-1)&&(c=c.slice(0,c.length-1)),0===m&&(c="#"+c));","===c.charAt(c.length-1);)c=c.slice(0,c.length-1),"floatingPoint"===i.inputFormat?n/=1e3:n=n.multiply(.001);"integer"===i.inputFormat&&(n=a.round(n));const u=-1!==c.indexOf(",");c=c.replace(/,/g,"");const g=c.split("."),d=g[0];let p=g[1],h="";if(1===g.length)return"floatingPoint"===i.inputFormat&&(n=a.round(n)),h=n.toString(),i.setTextParts(i.formatWholeNumber(h,d,u),s);h=n.toString();let b=h.split("."),f=i.formatWholeNumber(b[0],d,u),_=b[1]||"";if(p.length<=_.length&&(h=parseFloat(n.toFixed(p.length)).toString(),b=h.split("."),f=i.formatWholeNumber(b[0],d,u),_=b[1]||"",_))return i.setTextParts(f+i.localizationObject.decimalseparator+_.slice(0,p.length),s);p=p.slice(_.length-p.length);let S=p.lastIndexOf("0");return-1===S?""===_?i.setTextParts(f,s):i.setTextParts(f+i.localizationObject.decimalseparator+_,s):i.setTextParts(f+i.localizationObject.decimalseparator+_+"0".repeat(S+1),s)}getRelevantFormatSection(t,e){const i=this,r=i.numericProcessor.compare(e,0,!0);if(1===r)return t[0];let a,n;return t.length>=3?(i._ignoreMinus=!0,a=1,n=2):2===t.length?(i._ignoreMinus=!0,n=0,a=1):1===t.length&&(n=0,a=0),0===r?t[n]:-1===r?t[a]:void 0}getTextParts(t){const e=t.replace(/"[^"]*"/g,""),i=t.match(/"[^"]*"/g),r=e.search(/0|#|\./g),a=Math.max(e.lastIndexOf("0"),e.lastIndexOf("#"),e.lastIndexOf("."),e.lastIndexOf(",")),n=e.slice(r,a+1);if(""===n)return{prefix:"",main:"",suffix:t.replace(/"/g,"")};let l=t.indexOf(n),o=l+n.length;if(i)for(let e=0;e<i.length;e++){const r=t.indexOf(i[e]);l>=r&&o<=r+i[e].length&&(l=t.indexOf(n,r+i[e].length),o=l+n.length)}return{prefix:t.slice(0,l).replace(/"/g,""),main:n,suffix:t.slice(o).replace(/"/g,"")}}applyCustomExponentialFormat(t,e,i){const r=this;let a,n=e.main;const l=-1!==n.indexOf(",");n=n.replace(/[^0#.eE+-]/g,"");const o=n.toLowerCase().indexOf("e");n=n.substring(0,o+1)+n.substring(o+1).replace(/[eE\.]/g,"");const s=n.charAt(o),c=n.indexOf(".");-1!==c&&(n=n.substring(0,c+1)+n.substring(c+1).replace(/\./g,"")),"."===n.charAt(n.length-1)&&(n=n.slice(0,n.length-1));const m=n.split(s);let u=m[0];const g=u.split("."),d=g[0],p=g[1],h=m[1];let b=t.toString().split(".")[0].replace(/-/,""),f=0;if("0"===b&&i.compare(t,0)){let e=d.length-1;for(;0===parseInt(t);)f++,t*=10;b=t.toString().split(".")[0].replace(/-/,""),f+=e,t*=Math.pow(10,e)}if(l&&(u=u.slice(0,1)+","+u.slice(1)),b.length<=d.length)a=r.formatNumber(t,u,void 0,!0)+s+r.formatExponent(0-f,h);else{const e=b.length-d.length;let n="floatingPoint"===r.inputFormat?t/Math.pow(10,e):t.divide(Math.pow(10,e));p||(a=r.applyThousandsSeparator(i.round(n).toString(),!l)+s+r.formatExponent(e-f,h));let o=n.toString().split(".")[1]||"";o.length===p.length?a=r.applySeparators(n,!l)+s+r.formatExponent(e-f,h):o.length<p.length?a=r.formatNumber(n,u,void 0,!0)+s+r.formatExponent(e-f,h):(n="floatingPoint"===r.inputFormat?n.toFixed(p.length):n=i.round(t.divide(Math.pow(10,e-p.length))).divide(Math.pow(10,p.length)),a=r.formatNumber(parseFloat(n),u,void 0,!0)+s+r.formatExponent(e-f,h))}return r.setTextParts(a,e)}formatExponent(t,e){let i;return-1!==["+","-"].indexOf(e.charAt(0))&&(i=e.charAt(0),(t>0&&"-"===i||t<0&&"+"===i)&&(i=void 0)),t<0&&(t=Math.abs(t),i="-"),e=e.replace(/[+-]/g,""),(i||"")+(t=this.formatNumber(t,e,void 0,!0))}formatWholeNumber(t,e,i){const r=this;let a="";if("-"===t.charAt(0)&&(r._ignoreMinus||(a="-"),t=t.slice(1)),"0"===t){if(e==="#".repeat(e.length))return a;t=""}if(e.length<=t.length)return a+r.applyThousandsSeparator(t,!i);for(let i=(e=e.slice(0,e.length-t.length)).length-1;i>=0;i--)"0"===e.charAt(i)&&(t="0"+t);return a+r.applyThousandsSeparator(t,!i)}setTextParts(t,e){return e.prefix+t+e.suffix}applyCustomFractionalFormat(t,e,i){const r=this,a=/^([0#,]+[ ]+)?([0#,]+\/[0#,]+)$/;let n,l=e.main.trim();if(!a.test(l))return t.toString();const o=a.exec(l);if(o[2]=o[2].replace(/,/g,""),"integer"===r.inputFormat){const i=o[2].split("/");return void 0===o[1]?n=r.formatNumber(t,i[0],void 0,!0)+"/"+r.formatNumber(1,i[1],void 0,!0):(n=r.formatNumber(t,o[1].trim(),void 0,!0),-1!==o[2].indexOf("0")&&(n+=" "+r.formatNumber(0,i[0],void 0,!0)+"/"+r.formatNumber(1,i[1],void 0,!0))),r.setTextParts(n,e)}if(void 0===o[1])n=(t<0?"-":"")+r.formatAsFraction(Math.abs(t),o[2]);else{const e=o[1].trim(),a=o[2];n=r.formatNumber(parseInt(t,10),e,void 0,!0)+" "+r.formatAsFraction(i.getPreciseModulo(Math.abs(t),1),a)}return r.setTextParts(n.trim(),e)}formatAsFraction(t,e){const i=this,r=e.split("/");if(0===t)return-1===e.indexOf("0")?"":i.formatNumber(0,r[0],void 0,!0)+"/"+i.formatNumber(1,r[1],void 0,!0);if(t%1==0)return i.formatNumber(t,r[0],void 0,!0)+"/"+i.formatNumber(1,r[1],void 0,!0);const a=[];i.approximateFractions(t,a);const n=r[1].length>=2?2:1;let l=[],o=[];a.forEach((function(e,i){const r=e.denominator.toString().length,a=Math.abs(t-e.numerator/e.denominator);if(void 0===l[r])return o[r]=i,void(l[r]=a);a<l[r]&&(o[r]=i,l[r]=a)}));let s=o[n]?a[o[n]]:a[o[1]];return i.formatNumber(s.numerator,r[0],void 0,!0)+"/"+i.formatNumber(s.denominator,r[1],void 0,!0)}approximateFractions(t,e){const i=[0,1],r=[1,0],a=this.getMaxNumerator(t);let n,l=t,o=NaN;for(let s=2;s<1e3;s++){const c=Math.floor(l);if(i[s]=c*i[s-1]+i[s-2],Math.abs(i[s])>a)return;if(r[s]=c*r[s-1]+r[s-2],n=i[s]/r[s],n===o)return;if(e.push({numerator:i[s],denominator:r[s]}),n===t)return;o=n,l=1/(l-c)}}getMaxNumerator(t){let e=null,i=t.toString().indexOf("E");-1===i&&(i=t.toString().indexOf("e")),e=-1===i?t.toString():t.toString().substring(0,i);let r=null;const a=e.toString().indexOf(".");-1===a?r=e:0===a?r=e.substring(1,e.length):a<e.length&&(r=e.substring(0,a)+e.substring(a+1,e.length));let n=r;const l=n.toString().length,o=t;let s=o.toString().length;0===o&&(s=0);const c=l-s;for(let t=c;t>0&&n%2==0;t--)n/=2;for(let t=c;t>0&&n%5==0;t--)n/=5;return n}exponentialToSuperscript(t){const e=t.indexOf("e"),i=t.slice(e+1).replace(/0{1,2}/,"");let r=t.slice(0,e+1);return r=r.replace("e","×10"),r+=this.toSuperscript(i),r=r.replace("+",""),r}toSuperscript(t,e){const i="-0123456789",r="⁻⁰¹²³⁴⁵⁶⁷⁸⁹";let a="";for(let n=0;n<t.length;n++)if(!0===e){const e=r.indexOf(t.charAt(n));a+=-1!==e?i[e]:t[n]}else{const e=i.indexOf(t.charAt(n));a+=-1!==e?r[e]:t[n]}return a}});
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/* unused harmony exports ConditionalFormatter, TimeSpan, DateTime, DataAdapter, SvgRenderer, HTML5Renderer, Plot, Complex, FilterGroup, StringFilter, BooleanFilter, NumericFilter, DateFilter, CustomFilter, DataExporter, NumericProcessor, IntegerNumericProcessor, DecimalNumericProcessor, ComplexNumericProcessor, NumberRenderer */
/* harmony import */ var _smart_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6321);
/* harmony import */ var _smart_element_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_smart_element_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _smart_format_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2515);
/* harmony import */ var _smart_format_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_smart_format_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _smart_date_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2052);
/* harmony import */ var _smart_date_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_smart_date_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _smart_numeric_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2754);
/* harmony import */ var _smart_numeric_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_smart_numeric_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _smart_complex_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4232);
/* harmony import */ var _smart_complex_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_smart_complex_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _smart_draw_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9613);
/* harmony import */ var _smart_draw_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_smart_draw_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _smart_filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6170);
/* harmony import */ var _smart_filter_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_smart_filter_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _smart_export_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6802);
/* harmony import */ var _smart_export_js__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_smart_export_js__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _smart_data_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6057);
/* harmony import */ var _smart_data_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_smart_data_js__WEBPACK_IMPORTED_MODULE_8__);
/* Smart UI v15.2.0 (2023-04-20)
Copyright (c) 2011-2023 jQWidgets.
License: https://htmlelements.com/license/ */ //
class ConditionalFormatter extends Smart.Utilities.ConditionalFormatter { }
class TimeSpan extends Smart.Utilities.TimeSpan { }
class DateTime extends Smart.Utilities.DateTime { }
class DataAdapter extends Smart.DataAdapter { }
class SvgRenderer extends Smart.Utilities.SvgRenderer { }
class HTML5Renderer extends Smart.Utilities.HTML5Renderer { }
class Plot extends Smart.Utilities.Plot { }
class Complex extends Smart.Utilities.Complex { }
class FilterGroup extends Smart.Utilities.FilterGroup { }
class StringFilter extends Smart.Utilities.StringFilter { }
class BooleanFilter extends Smart.Utilities.BooleanFilter { }
class NumericFilter extends Smart.Utilities.NumericFilter { }
class DateFilter extends Smart.Utilities.DateFilter { }
class CustomFilter extends Smart.Utilities.CustomFilter { }
class DataExporter extends Smart.Utilities.DataExporter { }
class NumericProcessor extends Smart.Utilities.NumericProcessor { }
class IntegerNumericProcessor extends Smart.Utilities.IntegerNumericProcessor { }
class DecimalNumericProcessor extends Smart.Utilities.DecimalNumericProcessor { }
class ComplexNumericProcessor extends Smart.Utilities.ComplexNumericProcessor { }
class NumberRenderer extends Smart.Utilities.NumberRenderer { }
})();
/******/ })()
;