EOS/Scripts/kendo/2015.3.1111/kendo.ooxml.min.js
Nidhi Bhargava f0c1ab20e1 code push
2025-09-04 16:25:07 +05:30

9 lines
16 KiB
JavaScript

/*
* Kendo UI v2015.3.1111 (http://www.telerik.com/kendo-ui)
* Copyright 2015 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(e,define){define(["./kendo.core.min"],e)}(function(){return function(e,t){function n(e){var t=Math.floor(e/26)-1;return(t>=0?n(t):"")+String.fromCharCode(65+e%26)}function i(e,t){return n(t)+(e+1)}function o(e,t){return n(t)+"$"+(e+1)}function r(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function s(e){return(e/7*100+.5)/100}function a(e){return.75*e}function l(e){return 6>e.length&&(e=e.replace(/(\w)/g,function(e,t){return t+t})),e=e.substring(1).toUpperCase(),8>e.length&&(e="FF"+e),e}var c='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\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>',u=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\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>${creator}</dc:creator><cp:lastModifiedBy>${lastModifiedBy}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">${created}</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">${modified}</dcterms:modified></cp:coreProperties>'),d=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\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>${sheets.length}</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="${sheets.length}" baseType="lpstr"># for (var idx = 0; idx < sheets.length; idx++) { ## if (sheets[idx].options.title) { #<vt:lpstr>${sheets[idx].options.title}</vt:lpstr># } else { #<vt:lpstr>Sheet${idx+1}</vt:lpstr># } ## } #</vt:vector></TitlesOfParts><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>14.0300</AppVersion></Properties>'),h=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><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/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/># for (var idx = 1; idx <= count; idx++) { #<Override PartName="/xl/worksheets/sheet${idx}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+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>'),f=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" /><workbookPr defaultThemeVersion="124226" /><bookViews><workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" /></bookViews><sheets># for (var idx = 0; idx < sheets.length; idx++) { ## var options = sheets[idx].options; ## var name = options.name || options.title ## if (name) { #<sheet name="${name}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } else { #<sheet name="Sheet${idx+1}" sheetId="${idx+1}" r:id="rId${idx+1}" /># } ## } #</sheets># if (definedNames.length) { #<definedNames> # for (var di = 0; di < definedNames.length; di++) { #<definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="${definedNames[di].localSheetId}">${definedNames[di].name}!$${definedNames[di].from}:$${definedNames[di].to}</definedName> # } #</definedNames># } #<calcPr calcId="145621" /></workbook>'),p=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac"><dimension ref="A1" /><sheetViews><sheetView #if(index==0) {# tabSelected="1" #}# workbookViewId="0"># if (frozenRows || frozenColumns) { #<pane state="frozen"# if (frozenColumns) { # xSplit="${frozenColumns}"# } ## if (frozenRows) { # ySplit="${frozenRows}"# } # topLeftCell="${String.fromCharCode(65 + (frozenColumns || 0))}${(frozenRows || 0)+1}"/># } #</sheetView></sheetViews><sheetFormatPr x14ac:dyDescent="0.25" defaultRowHeight="#= defaults.rowHeight ? defaults.rowHeight * 0.75 : 15 #" # if (defaults.columnWidth) { # defaultColWidth="#= kendo.ooxml.toWidth(defaults.columnWidth) #" # } # /># if (columns && columns.length > 0) { #<cols># for (var ci = 0; ci < columns.length; ci++) { ## var column = columns[ci]; ## var columnIndex = typeof column.index === "number" ? column.index + 1 : (ci + 1); ## if (column.width) { #<col min="${columnIndex}" max="${columnIndex}" customWidth="1"# if (column.autoWidth) { # width="${((column.width*7+5)/7*256)/256}" bestFit="1"# } else { # width="#= kendo.ooxml.toWidth(column.width) #" # } #/># } ## } #</cols># } #<sheetData># for (var ri = 0; ri < data.length; ri++) { ## var row = data[ri]; ## var rowIndex = typeof row.index === "number" ? row.index + 1 : (ri + 1); #<row r="${rowIndex}" x14ac:dyDescent="0.25" # if (row.height) { # ht="#= kendo.ooxml.toHeight(row.height) #" customHeight="1" # } # ># for (var ci = 0; ci < row.data.length; ci++) { ## var cell = row.data[ci];#<c r="#=cell.ref#"# if (cell.style) { # s="#=cell.style#" # } ## if (cell.type) { # t="#=cell.type#"# } #># if (cell.formula != null) { #<f>${cell.formula}</f># } ## if (cell.value != null) { #<v>${cell.value}</v># } #</c># } #</row># } #</sheetData># if (filter) { #<autoFilter ref="${filter.from}:${filter.to}"/># } ## if (mergeCells.length) { #<mergeCells count="${mergeCells.length}"># for (var ci = 0; ci < mergeCells.length; ci++) { #<mergeCell ref="${mergeCells[ci]}"/># } #</mergeCells># } #<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" /></worksheet>'),g=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"># for (var idx = 1; idx <= count; idx++) { #<Relationship Id="rId${idx}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${idx}.xml" /># } #<Relationship Id="rId${count+1}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" /><Relationship Id="rId${count+2}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" /></Relationships>'),m=t.template('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="${count}" uniqueCount="${uniqueCount}"># for (var index in indexes) { #<si><t>${index.substring(1)}</t></si># } #</sst>'),v=t.template('<?xml version="1.0" encoding="UTF-8"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><numFmts count="${formats.length}"># for (var fi = 0; fi < formats.length; fi++) { ## var format = formats[fi]; #<numFmt formatCode="${format.format}" numFmtId="${165+fi}" /># } #</numFmts><fonts count="${fonts.length+1}" x14ac:knownFonts="1"><font><sz val="11" /><color theme="1" /><name val="Calibri" /><family val="2" /><scheme val="minor" /></font># for (var fi = 0; fi < fonts.length; fi++) { ## var font = fonts[fi]; #<font># if (font.fontSize) { #<sz val="${font.fontSize}" /># } else { #<sz val="11" /># } ## if (font.bold) { #<b/># } ## if (font.italic) { #<i/># } ## if (font.underline) { #<u/># } ## if (font.color) { #<color rgb="${font.color}" /># } else { #<color theme="1" /># } ## if (font.fontFamily) { #<name val="${font.fontFamily}" /><family val="2" /># } else { #<name val="Calibri" /><family val="2" /><scheme val="minor" /># } #</font># } #</fonts><fills count="${fills.length+1}"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill># for (var fi = 0; fi < fills.length; fi++) { ## var fill = fills[fi]; ## if (fill.background) { #<fill><patternFill patternType="solid"><fgColor rgb="${fill.background}"/></patternFill></fill># } ## } #</fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf borderId="0" fillId="0" fontId="0" /></cellStyleXfs><cellXfs count="${styles.length+1}"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/># for (var si = 0; si < styles.length; si++) { ## var style = styles[si]; #<xf xfId="0"# if (style.fontId) { # fontId="${style.fontId}" applyFont="1"# } ## if (style.fillId) { # fillId="${style.fillId}" applyFill="1"# } ## if (style.numFmtId) { # numFmtId="${style.numFmtId}" applyNumberFormat="1"# } ## if (style.textAlign || style.verticalAlign || style.wrap) { # applyAlignment="1"# } #># if (style.textAlign || style.verticalAlign || style.wrap) { #<alignment# if (style.textAlign) { # horizontal="${style.textAlign}"# } ## if (style.verticalAlign) { # vertical="${style.verticalAlign}"# } ## if (style.wrap) { # wrapText="1"# } #/># } #</xf># } #</cellXfs><dxfs count="0" /><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" /></styleSheet>'),_=t.timezone.remove(new Date(1900,0,0),"Etc/UTC"),w=t.Class.extend({init:function(e,t,n){this.options=e,this._strings=t,this._styles=n},toXML:function(e){var t,n,o,s,a,l;for(this._mergeCells=this.options.mergedCells||[],this._rowsByIndex=[],t=this.options.rows||[],n=0;t.length>n;n++)o=t[n].index,"number"!=typeof o&&(o=n),t[n].index=o,this._rowsByIndex[o]=t[n];for(s=[],n=0;t.length>n;n++)s.push(this._row(t[n],n));return s.sort(function(e,t){return e.index-t.index}),a=this.options.filter,a&&(a={from:i(r(this.options),a.from),to:i(r(this.options),a.to)}),l=this.options.freezePane||{},p({frozenColumns:this.options.frozenColumns||l.colSplit,frozenRows:this.options.frozenRows||l.rowSplit,columns:this.options.columns,defaults:this.options.defaults||{},data:s,index:e,mergeCells:this._mergeCells,filter:a})},_row:function(t){var n=[],i=0,o=this,r={};return e.each(t.cells,function(s,a){var l,c;a&&("number"==typeof a.index?(l=a.index,i=l-s):l=s+i,a.colSpan&&(i+=a.colSpan-1),c=o._cell(a,t.index,l),e.each(c,function(e,t){r[t.ref]||(r[t.ref]=!0,n.push(t))}))}),{data:n,height:t.height,index:t.index}},_lookupString:function(e){var t="$"+e,n=this._strings.indexes[t];return void 0!==n?e=n:(e=this._strings.indexes[t]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,e},_lookupStyle:function(n){var i,o=t.stringify(n);return"{}"==o?0:(i=e.inArray(o,this._styles),0>i&&(i=this._styles.push(o)-1),i+1)},_cell:function(e,n,o){var r,s,a,l,c,u,d,h,f,p,g;if(!e)return[];if(r=e.value,s={bold:e.bold,color:e.color,background:e.background,italic:e.italic,underline:e.underline,fontFamily:e.fontFamily||e.fontName,fontSize:e.fontSize,format:e.format,textAlign:e.textAlign||e.hAlign,verticalAlign:e.verticalAlign||e.vAlign,wrap:e.wrap},a=this.options.columns||[],l=a[o],l&&l.autoWidth&&(l.width=Math.max(l.width||0,(""+r).length)),c=typeof r,"string"===c?(r=this._lookupString(r),c="s"):"number"===c?c="n":"boolean"===c?(c="b",r=+r):r&&r.getTime?(c=null,r=(t.timezone.remove(r,"Etc/UTC")-_)/t.date.MS_PER_DAY+1,s.format||(s.format="mm-dd-yy")):(c=null,r=null),s=this._lookupStyle(s),u=[],d=i(n,o),u.push({value:r,formula:e.formula,type:c,style:s,ref:d}),h=e.colSpan||1,f=e.rowSpan||1,h>1||f>1){for(this._mergeCells.push(d+":"+i(n+f-1,o+h-1)),g=n+1;n+f>g;g++)for(this._rowsByIndex[g]||(this._rowsByIndex[g]={index:g,cells:[]}),p=o;o+h>p;p++)this._rowsByIndex[g].cells.splice(p,0,{});for(p=o+1;o+h>p;p++)u.push({ref:i(n,p)})}return u}}),b={General:0,0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49,"[$-404]e/m/d":27,"m/d/yy":30,t0:59,"t0.00":60,"t#,##0":61,"t#,##0.00":62,"t0%":67,"t0.00%":68,"t# ?/?":69,"t# ??/??":70},y=t.Class.extend({init:function(t){this.options=t||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._sheets=e.map(this.options.sheets||[],e.proxy(function(e){return e.defaults=this.options,new w(e,this._strings,this._styles)},this))},toDataURL:function(){var n,i,s,a,p,_,w,y,x,k,C,S,T;if("undefined"==typeof JSZip)throw Error("JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.");for(n=new JSZip,i=n.folder("docProps"),i.file("core.xml",u({creator:this.options.creator||"Kendo UI",lastModifiedBy:this.options.creator||"Kendo UI",created:this.options.date||(new Date).toJSON(),modified:this.options.date||(new Date).toJSON()})),s=this._sheets.length,i.file("app.xml",d({sheets:this._sheets})),a=n.folder("_rels"),a.file(".rels",c),p=n.folder("xl"),_=p.folder("_rels"),_.file("workbook.xml.rels",g({count:s})),p.file("workbook.xml",f({sheets:this._sheets,definedNames:e.map(this._sheets,function(e,t){var n=e.options,i=n.filter;return i&&void 0!==i.from&&void 0!==i.to?{localSheetId:t,name:n.name||n.title||"Sheet"+(t+1),from:o(r(n),i.from),to:o(r(n),i.to)}:void 0})})),w=p.folder("worksheets"),y=0;s>y;y++)w.file(t.format("sheet{0}.xml",y+1),this._sheets[y].toXML(y));return x=e.map(this._styles,e.parseJSON),k=function(e){return e.underline||e.bold||e.italic||e.color||e.fontFamily||e.fontSize},C=e.map(x,function(e){return e.color&&(e.color=l(e.color)),k(e)?e:void 0}),S=e.map(x,function(e){return e.format&&void 0===b[e.format]?e:void 0}),T=e.map(x,function(e){return e.background?(e.background=l(e.background),e):void 0}),p.file("styles.xml",v({fonts:C,fills:T,formats:S,styles:e.map(x,function(t){var n={};return k(t)&&(n.fontId=e.inArray(t,C)+1),t.background&&(n.fillId=e.inArray(t,T)+2),n.textAlign=t.textAlign,n.verticalAlign=t.verticalAlign,n.wrap=t.wrap,t.format&&(n.numFmtId=void 0!==b[t.format]?b[t.format]:165+e.inArray(t,S)),n})})),p.file("sharedStrings.xml",m(this._strings)),n.file("[Content_Types].xml",h({count:s})),"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"+n.generate({compression:"DEFLATE"})}});t.ooxml={Workbook:y,Worksheet:w,toWidth:s,toHeight:a}}(kendo.jQuery,kendo),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()});