smart-webcomponents-angular
Version:
[](https://jqwidgets.com/license/)
6 lines (4 loc) • 65.7 kB
JavaScript
/* Smart UI v20.0.2 (2024-09-06)
Copyright (c) 2011-2024 jQWidgets.
License: https://htmlelements.com/license/ */ //
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,o);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 a?this.downloadFile(r,t.MIME,a):r}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}}}if(p.content=d,!t){const e=pdfMake.createPdf(p);return delete a.mergedCellsPDF,delete a.styleInfo,e}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,a){try{JSZip}catch(e){throw new Error("Missing reference to 'jszip.min.js'.")}const o=this;let l=o.style;if(e=o.processGroupingInformation(e,!0),o.data=e,o.getColumnsArray(),o.complexHeaderMergedCells=[],o.complexHeaderMergeInfo)for(let e in o.complexHeaderMergeInfo)if(Object.prototype.hasOwnProperty.call(o.complexHeaderMergeInfo,e)){const t=o.complexHeaderMergeInfo[e];if(t.from[0]===t.to[0]&&t.from[1]===t.to[1])continue;o.complexHeaderMergedCells.push({from:o.columnsArray[t.from[1]]+(t.from[0]+1),to:o.columnsArray[t.to[1]]+(t.to[0]+1)})}o.getConditionalFormatting(),l||(l=o.generateDefaultStyle(e));const r=o.generateSharedStrings(e),n=r.collection,s=r.xml,i=o.generateStyles(l),c=o.groupBy?o.generateSheet1WithGrouping(e,n):o.generateSheet1(e,n),p=o.generateAuxiliaryFiles(),m=new JSZip,f=m.folder("_rels"),d=m.folder("docProps"),h=m.folder("xl"),g=h.folder("_rels"),u=h.folder("theme"),y=h.folder("worksheets");f.file(".rels",p._relsRels),d.file("app.xml",p.docPropsAppXml),d.file("core.xml",p.docPropsCoreXml),g.file("workbook.xml.rels",p.xl_relsWorkbookXmlRels),u.file("theme1.xml",p.xlThemeTheme1Xml),y.file("sheet1.xml",c),h.file("sharedStrings.xml",s),h.file("styles.xml",i),h.file("workbook.xml",p.xlWorkbookXml),m.file("[Content_Types].xml",p.Content_TypesXml),m.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}).then((function(e){return!t&&a&&a(e),o.downloadFile(e,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",t)})),delete o.conditionalFormattingXLSX,delete o.complexHeaderMergeInfo,delete o.defaultRowHeight,delete o.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>",t?this.downloadFile(o,"application/xml",t):o}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){let t="$";if(e&&"string"==typeof e&&e.indexOf("c")>=0&&e.indexOf("x")>=0&&(t=e.substring(0,e.indexOf("x")),e=e.substring(1+e.indexOf("x"))),!/^([a-zA-Z]\d*)$/g.test(e))return e;let a=parseFloat(e.slice(1))||0,o=a>0?"."+"0".repeat(a):"";switch(e=e.slice(0,1)){case"C":case"c":return"$"!==t?"#,0"+o+" "+t:t+"#,0"+o;case"D":case"d":return a?"0".repeat(a):"0";case"E":case"e":return"0"+o+e+"000";case"F":case"f":return"0"+o;case"N":case"n":return"#,0"+o;case"P":case"p":return"#,0"+o+" %";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.d