From 65f21e6830b11d6a5d514d5e08bcb5786ad53ca5 Mon Sep 17 00:00:00 2001 From: Olga Date: Thu, 16 Jul 2015 16:14:10 +0300 Subject: [PATCH 1/4] Fix (MS Office Excel 2010 styling) The row style isn't set correct In MS Office Excel 2010. It's better to set attribute 's' to all cells in the row. --- Excel/Worksheet.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Excel/Worksheet.js b/Excel/Worksheet.js index 58ad149..7f6eaaf 100755 --- a/Excel/Worksheet.js +++ b/Excel/Worksheet.js @@ -327,6 +327,8 @@ define(['underscore', './util', './RelationshipManager'], function (_, util, Rel } if(metadata.style) { cell.setAttribute('s', metadata.style); + } else if (this._rowInstructions[row] && this._rowInstructions[row].style !== undefined) { + cell.setAttribute('s', this._rowInstructions[row].style); } cell.setAttribute('r', util.positionToLetterRef(c + 1, row + 1)); rowNode.appendChild(cell); From fd1801b4ce60cb9f370fe79dc48a7eefff36c41d Mon Sep 17 00:00:00 2001 From: Olga Date: Thu, 16 Jul 2015 16:26:09 +0300 Subject: [PATCH 2/4] Fix (Libre Office styling) The style of columns doesn't work without set parameters "apply*" in Libre Office. --- Excel/StyleSheet.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Excel/StyleSheet.js b/Excel/StyleSheet.js index e880721..c4e8f44 100755 --- a/Excel/StyleSheet.js +++ b/Excel/StyleSheet.js @@ -370,9 +370,21 @@ define(['underscore', './util'], function (_, util) { while(a--) { xf.setAttribute(attributes[a], styleInstructions[attributes[a]]); } - if(styleInstructions.fillId) { + if (styleInstructions.fillId) { xf.setAttribute('applyFill', '1'); } + if (styleInstructions.fontId) { + xf.setAttribute('applyFont', '1'); + } + if (styleInstructions.borderId) { + xf.setAttribute('applyBorder', '1'); + } + if (styleInstructions.alignment) { + xf.setAttribute('applyAlignment', '1'); + } + if (styleInstructions.numFmtId) { + xf.setAttribute('applyNumberFormat', '1'); + } return xf; }, From af86af52372782738d40fafbf02664b3c061d6c2 Mon Sep 17 00:00:00 2001 From: olga_pulavska Date: Thu, 16 Jul 2015 17:36:01 +0300 Subject: [PATCH 3/4] updated compiled files --- dist/excel-builder.compiled.js | 84 ++++++++++++++---------- dist/excel-builder.compiled.min.js | 8 +-- dist/excel-builder.dist.js | 101 +++++++++++++++++------------ dist/excel-builder.dist.min.js | 8 +-- 4 files changed, 115 insertions(+), 86 deletions(-) diff --git a/dist/excel-builder.compiled.js b/dist/excel-builder.compiled.js index 0d32856..10d59c3 100644 --- a/dist/excel-builder.compiled.js +++ b/dist/excel-builder.compiled.js @@ -1343,7 +1343,7 @@ }).call(this); define('Excel/XMLDOM',['underscore'], function (_) { - + 'use strict'; var XMLDOM = function (ns, rootNodeName) { this.documentElement = this.createElement(rootNodeName); this.documentElement.setAttribute('xmlns', ns); @@ -1477,7 +1477,7 @@ define('Excel/XMLDOM',['underscore'], function (_) { * @module Excel/util */ define('Excel/util',['./XMLDOM'], function (XMLDOM) { - + "use strict"; var util = { _idSpaces: {}, @@ -1597,7 +1597,7 @@ define('Excel/Paths',{}); * @module Excel/RelationshipManager */ define('Excel/RelationshipManager',['underscore', './util', './Paths'], function (_, util, Paths) { - + "use strict"; var RelationshipManager = function () { this.relations = {}; this.lastId = 1; @@ -1652,7 +1652,7 @@ define('Excel/RelationshipManager',['underscore', './util', './Paths'], function * @module Excel/Drawings */ define('Excel/Drawings',['underscore', './RelationshipManager', './util'], function (_, RelationshipManager, util) { - + "use strict"; var Drawings = function () { this.drawings = []; this.relations = new RelationshipManager(); @@ -1694,7 +1694,7 @@ define('Excel/Drawings',['underscore', './RelationshipManager', './util'], funct return Drawings; }); define('Excel/Drawings/AbsoluteAnchor',['underscore', '../util'], function (_, util) { - + "use strict"; /** * * @param {Object} config @@ -1758,7 +1758,7 @@ define('Excel/Drawings/AbsoluteAnchor',['underscore', '../util'], function (_, u return AbsoluteAnchor; }); define('Excel/Drawings/Chart',['underscore', '../util'], function (_) { - + "use strict"; var Chart = function () { }; @@ -1768,7 +1768,7 @@ define('Excel/Drawings/Chart',['underscore', '../util'], function (_) { return Chart; }); define('Excel/Drawings/OneCellAnchor',['underscore', '../util'], function (_, util) { - + "use strict"; /** * * @param {Object} config @@ -1837,7 +1837,7 @@ define('Excel/Drawings/OneCellAnchor',['underscore', '../util'], function (_, ut return OneCellAnchor; }); define('Excel/Drawings/TwoCellAnchor',['underscore', '../util'], function (_, util) { - + 'use strict'; var TwoCellAnchor = function (config) { this.from = {xOff: 0, yOff: 0}; this.to = {xOff: 0, yOff: 0}; @@ -1920,7 +1920,7 @@ define('Excel/Drawings/TwoCellAnchor',['underscore', '../util'], function (_, ut define('Excel/Drawings/Drawing',[ 'underscore', './AbsoluteAnchor', './OneCellAnchor', './TwoCellAnchor' ], function (_, AbsoluteAnchor, OneCellAnchor, TwoCellAnchor) { - + "use strict"; /** * @constructor */ @@ -1956,7 +1956,7 @@ define('Excel/Drawings/Drawing',[ return Drawing; }); define('Excel/Drawings/Picture',['./Drawing', 'underscore', '../util'], function (Drawing, _, util) { - + "use strict"; var Picture = function () { this.media = null; this.id = _.uniqueId('Picture'); @@ -2059,7 +2059,7 @@ define('Excel/Drawings/Picture',['./Drawing', 'underscore', '../util'], function return Picture; }); define('Excel/Positioning',[], function () { - + "use strict"; return { /** * Converts pixel sizes to 'EMU's, which is what Open XML uses. @@ -2079,7 +2079,7 @@ define('Excel/Positioning',[], function () { * @module Excel/SharedStrings */ define('Excel/SharedStrings',['underscore', './util'], function (_, util) { - + "use strict"; var sharedStrings = function () { this.strings = {}; this.stringArray = []; @@ -2132,7 +2132,7 @@ define('Excel/SharedStrings',['underscore', './util'], function (_, util) { * @module Excel/StyleSheet */ define('Excel/StyleSheet',['underscore', './util'], function (_, util) { - + "use strict"; var StyleSheet = function () { this.id = _.uniqueId('StyleSheet'); this.cellStyles = [{ @@ -2500,9 +2500,21 @@ define('Excel/StyleSheet',['underscore', './util'], function (_, util) { while(a--) { xf.setAttribute(attributes[a], styleInstructions[attributes[a]]); } - if(styleInstructions.fillId) { + if (styleInstructions.fillId) { xf.setAttribute('applyFill', '1'); } + if (styleInstructions.fontId) { + xf.setAttribute('applyFont', '1'); + } + if (styleInstructions.borderId) { + xf.setAttribute('applyBorder', '1'); + } + if (styleInstructions.alignment) { + xf.setAttribute('applyAlignment', '1'); + } + if (styleInstructions.numFmtId) { + xf.setAttribute('applyNumberFormat', '1'); + } return xf; }, @@ -2793,7 +2805,7 @@ define('Excel/StyleSheet',['underscore', './util'], function (_, util) { * @module Excel/Table */ define('Excel/Table',['underscore', './util'], function (_, util) { - + "use strict"; var Table = function (config) { _.defaults(this, { name: "", @@ -2969,7 +2981,7 @@ define('Excel/Table',['underscore', './util'], function (_, util) { * @module Excel/Worksheet */ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], function (_, util, RelationshipManager) { - + "use strict"; /** * @constructor */ @@ -3291,6 +3303,8 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func } if(metadata.style) { cell.setAttribute('s', metadata.style); + } else if (this._rowInstructions[row] && this._rowInstructions[row].style !== undefined) { + cell.setAttribute('s', this._rowInstructions[row].style); } cell.setAttribute('r', util.positionToLetterRef(c + 1, row + 1)); rowNode.appendChild(cell); @@ -3502,7 +3516,7 @@ define('Excel/Workbook',[ './XMLDOM' ], function (require, _, util, StyleSheet, Worksheet, SharedStrings, RelationshipManager, Paths, XMLDOM) { - + "use strict"; var Workbook = function (config) { this.worksheets = []; this.tables = []; @@ -3910,7 +3924,7 @@ JSZip uses the library zlib.js released under the following license : zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define('JSZip',e):"undefined"!=typeof window?window.JSZip=e():"undefined"!=typeof global?global.JSZip=e():"undefined"!=typeof self&&(self.JSZip=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o>>8&255]<<16|L[e>>>16&255]<<8|L[e>>>24&255])>>32-d:L[e]>>8-d);if(8>d+b)k=k<>d-m-1&1,8===++b&&(b=0,f[a++]=L[k],k=0,a===f.length&&(f=ca(this)));f[a]=k;this.buffer=f;this.d=b;this.index=a};K.prototype.finish=function(){var e=this.buffer,d=this.index,c;0M;++M){for(var R=M,S=R,ha=7,R=R>>>1;R;R>>>=1)S<<=1,S|=R&1,--ha;ga[M]=(S<>>0}var L=ga;function ja(e){this.buffer=new (C?Uint16Array:Array)(2*e);this.length=0}ja.prototype.getParent=function(e){return 2*((e-2)/4|0)};ja.prototype.push=function(e,d){var c,f,a=this.buffer,b;c=this.length;a[this.length++]=d;for(a[this.length++]=e;0a[f])b=a[c],a[c]=a[f],a[f]=b,b=a[c+1],a[c+1]=a[f+1],a[f+1]=b,c=f;else break;return this.length}; ja.prototype.pop=function(){var e,d,c=this.buffer,f,a,b;d=c[0];e=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(b=0;;){a=2*b+2;if(a>=this.length)break;a+2c[a]&&(a+=2);if(c[a]>c[b])f=c[b],c[b]=c[a],c[a]=f,f=c[b+1],c[b+1]=c[a+1],c[a+1]=f;else break;b=a}return{index:e,value:d,length:this.length}};function ka(e,d){this.e=ma;this.f=0;this.input=C&&e instanceof Array?new Uint8Array(e):e;this.c=0;d&&(d.lazy&&(this.f=d.lazy),"number"===typeof d.compressionType&&(this.e=d.compressionType),d.outputBuffer&&(this.b=C&&d.outputBuffer instanceof Array?new Uint8Array(d.outputBuffer):d.outputBuffer),"number"===typeof d.outputIndex&&(this.c=d.outputIndex));this.b||(this.b=new (C?Uint8Array:Array)(32768))}var ma=2,T=[],U; @@ -6195,7 +6209,7 @@ function Ja(e,d,c){function f(a){var b=g[a][p[a]];b===d?(f(a+1),f(a+1)):--k[b];+ function pa(e){var d=new (C?Uint16Array:Array)(e.length),c=[],f=[],a=0,b,k,m,g;b=0;for(k=e.length;b>>=1}return d};ba("Zlib.RawDeflate",ka);ba("Zlib.RawDeflate.prototype.compress",ka.prototype.h);var Ka={NONE:0,FIXED:1,DYNAMIC:ma},V,La,$,Ma;if(Object.keys)V=Object.keys(Ka);else for(La in V=[],$=0,Ka)V[$++]=La;$=0;for(Ma=V.length;$a&&(a=c[n]),c[n]>=1;for(s=m;sa&&(a=c[n]),c[n]>=1;for(s=m;s>>=1;switch(c){case 0:var e=this.input,a=this.d,b=this.b,d=this.a,f=e.length,g=void 0,h=void 0,k=b.length,m=void 0;this.c=this.f=0;if(a+1>=f)throw Error("invalid uncompressed block header: LEN");g=e[a++]|e[a++]<<8;if(a+1>=f)throw Error("invalid uncompressed block header: NLEN");h=e[a++]|e[a++]<<8;if(g===~h)throw Error("invalid uncompressed block header: length verify");if(a+g>e.length)throw Error("input buffer is broken");switch(this.i){case w:for(;d+ g>b.length;){m=k-d;g-=m;if(q)b.set(e.subarray(a,a+m),d),d+=m,a+=m;else for(;m--;)b[d++]=e[a++];this.a=d;b=this.e();d=this.a}break;case v:for(;d+g>b.length;)b=this.e({o:2});break;default:throw Error("invalid inflate mode");}if(q)b.set(e.subarray(a,a+g),d),d+=g,a+=g;else for(;g--;)b[d++]=e[a++];this.d=a;this.a=d;this.b=b;break;case 1:this.j(y,z);break;case 2:A(this);break;default:throw Error("unknown BTYPE: "+c);}}return this.m()}; diff --git a/dist/excel-builder.compiled.min.js b/dist/excel-builder.compiled.min.js index 18ff8f3..8aeacb0 100644 --- a/dist/excel-builder.compiled.min.js +++ b/dist/excel-builder.compiled.min.js @@ -1,4 +1,4 @@ -(function(){var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.push,h=d.slice,i=d.concat,j=e.toString,k=e.hasOwnProperty,l=d.forEach,m=d.map,n=d.reduce,o=d.reduceRight,p=d.filter,q=d.every,r=d.some,s=d.indexOf,t=d.lastIndexOf,u=Array.isArray,v=Object.keys,w=f.bind,x=function(a){return a instanceof x?a:this instanceof x?void(this._wrapped=a):new x(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):a._=x,x.VERSION="1.6.0";var y=x.each=x.forEach=function(a,b,d){if(null==a)return a;if(l&&a.forEach===l)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;f>e;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=x.keys(a),e=0,f=g.length;f>e;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};x.map=x.collect=function(a,b,c){var d=[];return null==a?d:m&&a.map===m?a.map(b,c):(y(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var z="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),n&&a.reduce===n)return d&&(b=x.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(y(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(z);return c},x.reduceRight=x.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduceRight===o)return d&&(b=x.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=x.keys(a);f=g.length}if(y(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(z);return c},x.find=x.detect=function(a,b,c){var d;return A(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},x.filter=x.select=function(a,b,c){var d=[];return null==a?d:p&&a.filter===p?a.filter(b,c):(y(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},x.reject=function(a,b,c){return x.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},x.every=x.all=function(a,b,d){b||(b=x.identity);var e=!0;return null==a?e:q&&a.every===q?a.every(b,d):(y(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var A=x.some=x.any=function(a,b,d){b||(b=x.identity);var e=!1;return null==a?e:r&&a.some===r?a.some(b,d):(y(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};x.contains=x.include=function(a,b){return null==a?!1:s&&a.indexOf===s?-1!=a.indexOf(b):A(a,function(a){return a===b})},x.invoke=function(a,b){var c=h.call(arguments,2),d=x.isFunction(b);return x.map(a,function(a){return(d?b:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,x.property(b))},x.where=function(a,b){return x.filter(a,x.matches(b))},x.findWhere=function(a,b){return x.find(a,x.matches(b))},x.max=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-1/0,e=-1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},x.min=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;e>h&&(d=a,e=h)}),d},x.shuffle=function(a){var b,c=0,d=[];return y(a,function(a){b=x.random(c++),d[c-1]=d[b],d[b]=a}),d},x.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=x.values(a)),a[x.random(a.length-1)]):x.shuffle(a).slice(0,Math.max(0,b))};var B=function(a){return null==a?x.identity:x.isFunction(a)?a:x.property(a)};x.sortBy=function(a,b,c){return b=B(b),x.pluck(x.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=B(c),y(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};x.groupBy=C(function(a,b,c){x.has(a,b)?a[b].push(c):a[b]=[c]}),x.indexBy=C(function(a,b,c){a[b]=c}),x.countBy=C(function(a,b){x.has(a,b)?a[b]++:a[b]=1}),x.sortedIndex=function(a,b,c,d){c=B(c);for(var e=c.call(d,b),f=0,g=a.length;g>f;){var h=f+g>>>1;c.call(d,a[h])b?[]:h.call(a,0,b)},x.initial=function(a,b,c){return h.call(a,0,a.length-(null==b||c?1:b))},x.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:h.call(a,Math.max(a.length-b,0))},x.rest=x.tail=x.drop=function(a,b,c){return h.call(a,null==b||c?1:b)},x.compact=function(a){return x.filter(a,x.identity)};var D=function(a,b,c){return b&&x.every(a,x.isArray)?i.apply(c,a):(y(a,function(a){x.isArray(a)||x.isArguments(a)?b?g.apply(c,a):D(a,b,c):c.push(a)}),c)};x.flatten=function(a,b){return D(a,b,[])},x.without=function(a){return x.difference(a,h.call(arguments,1))},x.partition=function(a,b){var c=[],d=[];return y(a,function(a){(b(a)?c:d).push(a)}),[c,d]},x.uniq=x.unique=function(a,b,c,d){x.isFunction(b)&&(d=c,c=b,b=!1);var e=c?x.map(a,c,d):a,f=[],g=[];return y(e,function(c,d){(b?d&&g[g.length-1]===c:x.contains(g,c))||(g.push(c),f.push(a[d]))}),f},x.union=function(){return x.uniq(x.flatten(arguments,!0))},x.intersection=function(a){var b=h.call(arguments,1);return x.filter(x.uniq(a),function(a){return x.every(b,function(b){return x.contains(b,a)})})},x.difference=function(a){var b=i.apply(d,h.call(arguments,1));return x.filter(a,function(a){return!x.contains(b,a)})},x.zip=function(){for(var a=x.max(x.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;a>c;c++)b[c]=x.pluck(arguments,""+c);return b},x.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},x.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=x.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(s&&a.indexOf===s)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},x.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(t&&a.lastIndexOf===t)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},x.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var E=function(){};x.bind=function(a,b){var c,d;if(w&&a.bind===w)return w.apply(a,h.call(arguments,1));if(!x.isFunction(a))throw new TypeError;return c=h.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(h.call(arguments)));E.prototype=a.prototype;var e=new E;E.prototype=null;var f=a.apply(e,c.concat(h.call(arguments)));return Object(f)===f?f:e}},x.partial=function(a){var b=h.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===x&&(d[e]=arguments[c++]);for(;c=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||c.trailing===!1||(g=setTimeout(i,k)),f}},x.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=x.now()-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=x.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},x.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},x.wrap=function(a,b){return x.partial(b,a)},x.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},x.keys=function(a){if(!x.isObject(a))return[];if(v)return v(a);var b=[];for(var c in a)x.has(a,c)&&b.push(c);return b},x.values=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},x.pairs=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},x.invert=function(a){for(var b={},c=x.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},x.functions=x.methods=function(a){var b=[];for(var c in a)x.isFunction(a[c])&&b.push(c);return b.sort()},x.extend=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},x.pick=function(a){var b={},c=i.apply(d,h.call(arguments,1));return y(c,function(c){c in a&&(b[c]=a[c])}),b},x.omit=function(a){var b={},c=i.apply(d,h.call(arguments,1));for(var e in a)x.contains(c,e)||(b[e]=a[e]);return b},x.defaults=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},x.clone=function(a){return x.isObject(a)?x.isArray(a)?a.slice():x.extend({},a):a},x.tap=function(a,b){return b(a),a};var F=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof x&&(a=a._wrapped),b instanceof x&&(b=b._wrapped);var e=j.call(a);if(e!=j.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(x.isFunction(g)&&g instanceof g&&x.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,k=!0;if("[object Array]"==e){if(i=a.length,k=i==b.length)for(;i--&&(k=F(a[i],b[i],c,d)););}else{for(var l in a)if(x.has(a,l)&&(i++,!(k=x.has(b,l)&&F(a[l],b[l],c,d))))break;if(k){for(l in b)if(x.has(b,l)&&!i--)break;k=!i}}return c.pop(),d.pop(),k};x.isEqual=function(a,b){return F(a,b,[],[])},x.isEmpty=function(a){if(null==a)return!0;if(x.isArray(a)||x.isString(a))return 0===a.length;for(var b in a)if(x.has(a,b))return!1;return!0},x.isElement=function(a){return!(!a||1!==a.nodeType)},x.isArray=u||function(a){return"[object Array]"==j.call(a)},x.isObject=function(a){return a===Object(a)},y(["Arguments","Function","String","Number","Date","RegExp"],function(a){x["is"+a]=function(b){return j.call(b)=="[object "+a+"]"}}),x.isArguments(arguments)||(x.isArguments=function(a){return!(!a||!x.has(a,"callee"))}),"function"!=typeof/./&&(x.isFunction=function(a){return"function"==typeof a}),x.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},x.isNaN=function(a){return x.isNumber(a)&&a!=+a},x.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==j.call(a)},x.isNull=function(a){return null===a},x.isUndefined=function(a){return void 0===a},x.has=function(a,b){return k.call(a,b)},x.noConflict=function(){return a._=b,this},x.identity=function(a){return a},x.constant=function(a){return function(){return a}},x.property=function(a){return function(b){return b[a]}},x.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},x.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;a>e;e++)d[e]=b.call(c,e);return d},x.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},x.now=Date.now||function(){return(new Date).getTime()};var G={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};G.unescape=x.invert(G.escape);var H={escape:new RegExp("["+x.keys(G.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(G.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(a){x[a]=function(b){return null==b?"":(""+b).replace(H[a],function(b){return G[a][b]})}}),x.result=function(a,b){if(null==a)return void 0;var c=a[b];return x.isFunction(c)?c.call(a):c},x.mixin=function(a){y(x.functions(a),function(b){var c=x[b]=a[b];x.prototype[b]=function(){var a=[this._wrapped];return g.apply(a,arguments),M.call(this,c.apply(x,a))}})};var I=0;x.uniqueId=function(a){var b=++I+"";return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(a,b,c){var d;c=x.defaults({},c,x.templateSettings);var e=new RegExp([(c.escape||J).source,(c.interpolate||J).source,(c.evaluate||J).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(L,function(a){return"\\"+K[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,x);var i=function(a){return d.call(this,a,x)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},x.chain=function(a){return x(a).chain()};var M=function(a){return this._chain?x(a).chain():a};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];x.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],M.call(this,c)}}),y(["concat","join","slice"],function(a){var b=d[a];x.prototype[a]=function(){return M.call(this,b.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return x})}).call(this),define("Excel/XMLDOM",["underscore"],function(a){var b=function(a,b){this.documentElement=this.createElement(b),this.documentElement.setAttribute("xmlns",a)};return a.extend(b.prototype,{createElement:function(a){return new b.XMLNode({nodeName:a})},createTextNode:function(a){return new b.TextNode(a)},toString:function(){return this.documentElement.toString()}}),b.Node=function(){},b.Node.Create=function(a){switch(a.type){case"XML":return new b.XMLNode(a);case"TEXT":return new b.TextNode(a.nodeValue)}},b.TextNode=function(a){this.nodeValue=a},a.extend(b.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return a.escape(this.nodeValue)}}),b.XMLNode=function(a){if(this.nodeName=a.nodeName,this.children=[],this.nodeValue=a.nodeValue||"",this.attributes={},a.children)for(var c=0;c0&&(b+=" "+c.join(" "));for(var e="",f=0,g=this.children.length;g>f;f++)e+=this.children[f].toString();return b+=e?">"+e+"":"/>"},toJSON:function(){for(var a=[],b=0,c=this.children.length;c>b;b++)a.push(this.children[b].toJSON());return{nodeName:this.nodeName,children:a,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(a,b){return null===b?(delete this.attributes[a],void delete this[a]):(this.attributes[a]=b,void(this[a]=b))},setAttributeNS:function(a,b,c){this.setAttribute(b,c)},appendChild:function(a){this.children.push(a),this.firstChild=this.children[0]},cloneNode:function(){return new b.XMLNode(this.toJSON())}}),b}),define("Excel/util",["./XMLDOM"],function(a){var b={_idSpaces:{},uniqueId:function(a){return this._idSpaces[a]||(this._idSpaces[a]=1),this._idSpaces[a]++},createXmlDoc:function(b,c){if("undefined"==typeof document)return new a(b||null,c,null);if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||null,c,null);if(window.ActiveXObject){var d=new window.ActiveXObject("Microsoft.XMLDOM"),e=d.createElement(c);return e.setAttribute("xmlns",b),d.appendChild(e),d}throw"No xml document generator"},createElement:function(a,b,c){var d=a.createElement(b),e=!d.setAttributeNS;c=c||[];for(var f=c.length;f--;)e||-1===c[f][0].indexOf("xmlns")?d.setAttribute(c[f][0],c[f][1]):d.setAttributeNS("http://www.w3.org/2000/xmlns/",c[f][0],c[f][1]);return d},LETTER_REFS:{},positionToLetterRef:function(a,b){var c,d=1,e=a,f="",g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[a])return this.LETTER_REFS[a].concat(b);for(;e>0;)e-=Math.pow(26,d-1),c=e%Math.pow(26,d),e-=c,c/=Math.pow(26,d-1),f=g.charAt(c)+f,d+=1;return this.LETTER_REFS[a]=f,f.concat(b)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","package":"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}};return b}),define("Excel/Paths",{}),define("Excel/RelationshipManager",["underscore","./util","./Paths"],function(a,b,c){var d=function(){this.relations={},this.lastId=1};return a.uniqueId("rId"),a.extend(d.prototype,{importData:function(a){this.relations=a.relations,this.lastId=a.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(c,d){return this.relations[c.id]={id:a.uniqueId("rId"),schema:b.schemas[d]},this.relations[c.id].id},getRelationshipId:function(a){return this.relations[a.id]?this.relations[a.id].id:null},toXML:function(){var d=b.createXmlDoc(b.schemas.relationshipPackage,"Relationships"),e=d.documentElement;return a.each(this.relations,function(a,f){var g=b.createElement(d,"Relationship",[["Id",a.id],["Type",a.schema],["Target",c[f]]]);e.appendChild(g)}),d}}),d}),define("Excel/Drawings",["underscore","./RelationshipManager","./util"],function(a,b,c){var d=function(){this.drawings=[],this.relations=new b,this.id=a.uniqueId("Drawings")};return a.extend(d.prototype,{addDrawing:function(a){this.drawings.push(a)},getCount:function(){return this.drawings.length},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetDrawing,"xdr:wsDr"),b=a.documentElement;b.setAttribute("xmlns:xdr",c.schemas.spreadsheetDrawing),b.setAttribute("xmlns:a",c.schemas.drawing);for(var d=0,e=this.drawings.length;e>d;d++){var f=this.relations.getRelationshipId(this.drawings[d].getMediaData());f||(f=this.relations.addRelation(this.drawings[d].getMediaData(),this.drawings[d].getMediaType())),this.drawings[d].setRelationshipId(f),b.appendChild(this.drawings[d].toXML(a))}return a}}),d}),define("Excel/Drawings/AbsoluteAnchor",["underscore","../util"],function(a,b){var c=function(a){this.x=null,this.y=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b){this.x=a,this.y=b},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:absoluteAnchor"),e=b.createElement(a,"xdr:pos");e.setAttribute("x",this.x),e.setAttribute("y",this.y),d.appendChild(e);var f=b.createElement(a,"xdr:ext");return f.setAttribute("cx",this.width),f.setAttribute("cy",this.height),d.appendChild(f),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/Chart",["underscore","../util"],function(a){var b=function(){};return a.extend(b.prototype,{}),b}),define("Excel/Drawings/OneCellAnchor",["underscore","../util"],function(a,b){var c=function(a){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y,a.xOff,a.yOff),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b,c,d){this.x=a,this.y=b,void 0!==c&&(this.xOff=c),void 0!==d&&(this.yOff=d)},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:oneCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.xOff||0));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.yOff||0)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i),d.appendChild(e);var j=b.createElement(a,"xdr:ext");return j.setAttribute("cx",this.width),j.setAttribute("cy",this.height),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/TwoCellAnchor",["underscore","../util"],function(a,b){var c=function(a){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},a&&(this.setFrom(a.from.x,a.from.y,a.to.xOff,a.to.yOff),this.setTo(a.to.x,a.to.y,a.to.xOff,a.to.yOff))};return a.extend(c.prototype,{setFrom:function(a,b,c,d){this.from.x=a,this.from.y=b,void 0!==c&&(this.from.xOff=c),void 0!==d&&(this.from.yOff=c)},setTo:function(a,b,c,d){this.to.x=a,this.to.y=b,void 0!==c&&(this.to.xOff=c),void 0!==d&&(this.to.yOff=c)},toXML:function(a,c){var d=b.createElement(a,"xdr:twoCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.from.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.from.xOff));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.from.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.from.yOff)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i);var j=b.createElement(a,"xdr:to"),k=b.createElement(a,"xdr:col");k.appendChild(a.createTextNode(this.to.x));var l=b.createElement(a,"xdr:colOff");l.appendChild(a.createTextNode(this.from.xOff));var m=b.createElement(a,"xdr:row");m.appendChild(a.createTextNode(this.to.y));var n=b.createElement(a,"xdr:rowOff");return n.appendChild(a.createTextNode(this.from.yOff)),j.appendChild(k),j.appendChild(l),j.appendChild(m),j.appendChild(n),d.appendChild(e),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/Drawing",["underscore","./AbsoluteAnchor","./OneCellAnchor","./TwoCellAnchor"],function(a,b,c,d){var e=function(){this.id=a.uniqueId("Drawing")};return a.extend(e.prototype,{createAnchor:function(a,e){switch(e=e||{},e.drawing=this,a){case"absoluteAnchor":this.anchor=new b(e);break;case"oneCellAnchor":this.anchor=new c(e);break;case"twoCellAnchor":this.anchor=new d(e)}return this.anchor}}),e}),define("Excel/Drawings/Picture",["./Drawing","underscore","../util"],function(a,b,c){var d=function(){this.media=null,this.id=b.uniqueId("Picture"),this.pictureId=c.uniqueId("Picture"),this.fill={},this.mediaData=null};return d.prototype=new a,b.extend(d.prototype,{setMedia:function(a){this.mediaData=a},setDescription:function(a){this.description=a},setFillType:function(a){this.fill.type=a},setFillConfig:function(a){b.extend(this.fill,a)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(a){this.mediaData.rId=a},toXML:function(a){var b=c.createElement(a,"xdr:pic"),d=c.createElement(a,"xdr:nvPicPr"),e=c.createElement(a,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);d.appendChild(e);var f=c.createElement(a,"xdr:cNvPicPr");f.appendChild(c.createElement(a,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),d.appendChild(f),b.appendChild(d);var g=c.createElement(a,"xdr:blipFill");g.appendChild(c.createElement(a,"a:blip",[["xmlns:r",c.schemas.relationships],["r:embed",this.mediaData.rId]])),g.appendChild(c.createElement(a,"a:srcRect"));var h=c.createElement(a,"a:stretch");h.appendChild(c.createElement(a,"a:fillRect")),g.appendChild(h),b.appendChild(g);var i=c.createElement(a,"xdr:spPr",[["bwMode","auto"]]),j=c.createElement(a,"a:xfrm");i.appendChild(j);var k=c.createElement(a,"a:prstGeom",[["prst","rect"]]);return i.appendChild(k),b.appendChild(i),this.anchor.toXML(a,b)}}),d}),define("Excel/Positioning",[],function(){return{pixelsToEMUs:function(a){return Math.round(914400*a/96)}}}),define("Excel/SharedStrings",["underscore","./util"],function(a,b){var c=function(){this.strings={},this.stringArray=[],this.id=a.uniqueId("SharedStrings")};return a.extend(c.prototype,{addString:function(a){return this.strings[a]=this.stringArray.length,this.stringArray[this.stringArray.length]=a,this.strings[a]},exportData:function(){return this.strings},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"sst"),c=a.documentElement;this.stringArray.reverse();var d=this.stringArray.length;c.setAttribute("count",d),c.setAttribute("uniqueCount",d);var e=a.createElement("si"),f=a.createElement("t");f.appendChild(a.createTextNode("--placeholder--")),e.appendChild(f);for(var g=this.stringArray;d--;){var h=e.cloneNode(!0);h.firstChild.firstChild.nodeValue=g[d],c.appendChild(h)}return a}}),c}),define("Excel/StyleSheet",["underscore","./util"],function(a,b){var c=function(){this.id=a.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};return a.extend(c.prototype,{createSimpleFormatter:function(a){var b=this.masterCellFormats.length,c={id:b};switch(a){case"date":c.numFmtId=14}return this.masterCellFormats.push(c),c},createFill:function(a){var b=this.fills.length,c=a;return c.id=b,this.fills.push(c),c},createNumberFormatter:function(a){var b=this.numberFormatters.length+100,c={id:b,formatCode:a};return this.numberFormatters.push(c),c},createFormat:function(b){var c=this.masterCellFormats.length,d={id:c};if(b.font&&a.isObject(b.font))d.fontId=this.createFontStyle(b.font).id;else if(b.font){if(a.isNaN(parseInt(b.font,10)))throw"Passing a non-numeric font id is not supported";d.fontId=b.font}if(b.format&&a.isString(b.format))d.numFmtId=this.createNumberFormatter(b.format).id;else if(b.format){if(a.isNaN(parseInt(b.format,10)))throw"Invalid number formatter id";d.numFmtId=b.format}if(b.border&&a.isObject(b.border))d.borderId=this.createBorderFormatter(b.border).id;else if(b.border){if(a.isNaN(parseInt(b.border,10)))throw"Passing a non-numeric border id is not supported";d.borderId=b.border}if(b.fill&&a.isObject(b.fill))d.fillId=this.createFill(b.fill).id;else if(b.fill){if(a.isNaN(parseInt(b.fill,10)))throw"Passing a non-numeric fill id is not supported";d.fillId=b.fill}return b.alignment&&a.isObject(b.alignment)&&(d.alignment=a.pick(b.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(d),d},createDifferentialStyle:function(b){var c=this.differentialStyles.length,d={id:c};return b.font&&a.isObject(b.font)&&(d.font=b.font),b.border&&a.isObject(b.border)&&(d.border=a.defaults(b.border,{top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(d.underline=-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?b.underline:!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]);return c.fillId&&d.setAttribute("applyFill","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]); -return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),define("Excel/Table",["underscore","./util"],function(a,b){var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),define("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style&&p.setAttribute("s",r.style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(h.appendChild(0!==i?b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]]):b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},setColumnFormats:function(a){this.columnFormats=a}}),d}),define("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){a[c]=b instanceof i?b.toString():b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},define("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){function c(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){(function(){function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){(function(){function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288); -for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),define("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),define("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}); \ No newline at end of file +(function(){var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.push,h=d.slice,i=d.concat,j=e.toString,k=e.hasOwnProperty,l=d.forEach,m=d.map,n=d.reduce,o=d.reduceRight,p=d.filter,q=d.every,r=d.some,s=d.indexOf,t=d.lastIndexOf,u=Array.isArray,v=Object.keys,w=f.bind,x=function(a){return a instanceof x?a:this instanceof x?void(this._wrapped=a):new x(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):a._=x,x.VERSION="1.6.0";var y=x.each=x.forEach=function(a,b,d){if(null==a)return a;if(l&&a.forEach===l)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;f>e;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=x.keys(a),e=0,f=g.length;f>e;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};x.map=x.collect=function(a,b,c){var d=[];return null==a?d:m&&a.map===m?a.map(b,c):(y(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var z="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),n&&a.reduce===n)return d&&(b=x.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(y(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(z);return c},x.reduceRight=x.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduceRight===o)return d&&(b=x.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=x.keys(a);f=g.length}if(y(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(z);return c},x.find=x.detect=function(a,b,c){var d;return A(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},x.filter=x.select=function(a,b,c){var d=[];return null==a?d:p&&a.filter===p?a.filter(b,c):(y(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},x.reject=function(a,b,c){return x.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},x.every=x.all=function(a,b,d){b||(b=x.identity);var e=!0;return null==a?e:q&&a.every===q?a.every(b,d):(y(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var A=x.some=x.any=function(a,b,d){b||(b=x.identity);var e=!1;return null==a?e:r&&a.some===r?a.some(b,d):(y(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};x.contains=x.include=function(a,b){return null==a?!1:s&&a.indexOf===s?-1!=a.indexOf(b):A(a,function(a){return a===b})},x.invoke=function(a,b){var c=h.call(arguments,2),d=x.isFunction(b);return x.map(a,function(a){return(d?b:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,x.property(b))},x.where=function(a,b){return x.filter(a,x.matches(b))},x.findWhere=function(a,b){return x.find(a,x.matches(b))},x.max=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-(1/0),e=-(1/0);return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},x.min=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;e>h&&(d=a,e=h)}),d},x.shuffle=function(a){var b,c=0,d=[];return y(a,function(a){b=x.random(c++),d[c-1]=d[b],d[b]=a}),d},x.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=x.values(a)),a[x.random(a.length-1)]):x.shuffle(a).slice(0,Math.max(0,b))};var B=function(a){return null==a?x.identity:x.isFunction(a)?a:x.property(a)};x.sortBy=function(a,b,c){return b=B(b),x.pluck(x.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=B(c),y(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};x.groupBy=C(function(a,b,c){x.has(a,b)?a[b].push(c):a[b]=[c]}),x.indexBy=C(function(a,b,c){a[b]=c}),x.countBy=C(function(a,b){x.has(a,b)?a[b]++:a[b]=1}),x.sortedIndex=function(a,b,c,d){c=B(c);for(var e=c.call(d,b),f=0,g=a.length;g>f;){var h=f+g>>>1;c.call(d,a[h])b?[]:h.call(a,0,b)},x.initial=function(a,b,c){return h.call(a,0,a.length-(null==b||c?1:b))},x.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:h.call(a,Math.max(a.length-b,0))},x.rest=x.tail=x.drop=function(a,b,c){return h.call(a,null==b||c?1:b)},x.compact=function(a){return x.filter(a,x.identity)};var D=function(a,b,c){return b&&x.every(a,x.isArray)?i.apply(c,a):(y(a,function(a){x.isArray(a)||x.isArguments(a)?b?g.apply(c,a):D(a,b,c):c.push(a)}),c)};x.flatten=function(a,b){return D(a,b,[])},x.without=function(a){return x.difference(a,h.call(arguments,1))},x.partition=function(a,b){var c=[],d=[];return y(a,function(a){(b(a)?c:d).push(a)}),[c,d]},x.uniq=x.unique=function(a,b,c,d){x.isFunction(b)&&(d=c,c=b,b=!1);var e=c?x.map(a,c,d):a,f=[],g=[];return y(e,function(c,d){(b?d&&g[g.length-1]===c:x.contains(g,c))||(g.push(c),f.push(a[d]))}),f},x.union=function(){return x.uniq(x.flatten(arguments,!0))},x.intersection=function(a){var b=h.call(arguments,1);return x.filter(x.uniq(a),function(a){return x.every(b,function(b){return x.contains(b,a)})})},x.difference=function(a){var b=i.apply(d,h.call(arguments,1));return x.filter(a,function(a){return!x.contains(b,a)})},x.zip=function(){for(var a=x.max(x.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;a>c;c++)b[c]=x.pluck(arguments,""+c);return b},x.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},x.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=x.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(s&&a.indexOf===s)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},x.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(t&&a.lastIndexOf===t)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},x.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var E=function(){};x.bind=function(a,b){var c,d;if(w&&a.bind===w)return w.apply(a,h.call(arguments,1));if(!x.isFunction(a))throw new TypeError;return c=h.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(h.call(arguments)));E.prototype=a.prototype;var e=new E;E.prototype=null;var f=a.apply(e,c.concat(h.call(arguments)));return Object(f)===f?f:e}},x.partial=function(a){var b=h.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===x&&(d[e]=arguments[c++]);for(;c=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||c.trailing===!1||(g=setTimeout(i,k)),f}},x.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=x.now()-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=x.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},x.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},x.wrap=function(a,b){return x.partial(b,a)},x.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},x.keys=function(a){if(!x.isObject(a))return[];if(v)return v(a);var b=[];for(var c in a)x.has(a,c)&&b.push(c);return b},x.values=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},x.pairs=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},x.invert=function(a){for(var b={},c=x.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},x.functions=x.methods=function(a){var b=[];for(var c in a)x.isFunction(a[c])&&b.push(c);return b.sort()},x.extend=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},x.pick=function(a){var b={},c=i.apply(d,h.call(arguments,1));return y(c,function(c){c in a&&(b[c]=a[c])}),b},x.omit=function(a){var b={},c=i.apply(d,h.call(arguments,1));for(var e in a)x.contains(c,e)||(b[e]=a[e]);return b},x.defaults=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},x.clone=function(a){return x.isObject(a)?x.isArray(a)?a.slice():x.extend({},a):a},x.tap=function(a,b){return b(a),a};var F=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof x&&(a=a._wrapped),b instanceof x&&(b=b._wrapped);var e=j.call(a);if(e!=j.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(x.isFunction(g)&&g instanceof g&&x.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,k=!0;if("[object Array]"==e){if(i=a.length,k=i==b.length)for(;i--&&(k=F(a[i],b[i],c,d)););}else{for(var l in a)if(x.has(a,l)&&(i++,!(k=x.has(b,l)&&F(a[l],b[l],c,d))))break;if(k){for(l in b)if(x.has(b,l)&&!i--)break;k=!i}}return c.pop(),d.pop(),k};x.isEqual=function(a,b){return F(a,b,[],[])},x.isEmpty=function(a){if(null==a)return!0;if(x.isArray(a)||x.isString(a))return 0===a.length;for(var b in a)if(x.has(a,b))return!1;return!0},x.isElement=function(a){return!(!a||1!==a.nodeType)},x.isArray=u||function(a){return"[object Array]"==j.call(a)},x.isObject=function(a){return a===Object(a)},y(["Arguments","Function","String","Number","Date","RegExp"],function(a){x["is"+a]=function(b){return j.call(b)=="[object "+a+"]"}}),x.isArguments(arguments)||(x.isArguments=function(a){return!(!a||!x.has(a,"callee"))}),"function"!=typeof/./&&(x.isFunction=function(a){return"function"==typeof a}),x.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},x.isNaN=function(a){return x.isNumber(a)&&a!=+a},x.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==j.call(a)},x.isNull=function(a){return null===a},x.isUndefined=function(a){return void 0===a},x.has=function(a,b){return k.call(a,b)},x.noConflict=function(){return a._=b,this},x.identity=function(a){return a},x.constant=function(a){return function(){return a}},x.property=function(a){return function(b){return b[a]}},x.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},x.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;a>e;e++)d[e]=b.call(c,e);return d},x.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},x.now=Date.now||function(){return(new Date).getTime()};var G={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};G.unescape=x.invert(G.escape);var H={escape:new RegExp("["+x.keys(G.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(G.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(a){x[a]=function(b){return null==b?"":(""+b).replace(H[a],function(b){return G[a][b]})}}),x.result=function(a,b){if(null==a)return void 0;var c=a[b];return x.isFunction(c)?c.call(a):c},x.mixin=function(a){y(x.functions(a),function(b){var c=x[b]=a[b];x.prototype[b]=function(){var a=[this._wrapped];return g.apply(a,arguments),M.call(this,c.apply(x,a))}})};var I=0;x.uniqueId=function(a){var b=++I+"";return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(a,b,c){var d;c=x.defaults({},c,x.templateSettings);var e=new RegExp([(c.escape||J).source,(c.interpolate||J).source,(c.evaluate||J).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(L,function(a){return"\\"+K[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,x);var i=function(a){return d.call(this,a,x)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},x.chain=function(a){return x(a).chain()};var M=function(a){return this._chain?x(a).chain():a};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];x.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],M.call(this,c)}}),y(["concat","join","slice"],function(a){var b=d[a];x.prototype[a]=function(){return M.call(this,b.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return x})}).call(this),define("Excel/XMLDOM",["underscore"],function(a){"use strict";var b=function(a,b){this.documentElement=this.createElement(b),this.documentElement.setAttribute("xmlns",a)};return a.extend(b.prototype,{createElement:function(a){return new b.XMLNode({nodeName:a})},createTextNode:function(a){return new b.TextNode(a)},toString:function(){return this.documentElement.toString()}}),b.Node=function(){},b.Node.Create=function(a){switch(a.type){case"XML":return new b.XMLNode(a);case"TEXT":return new b.TextNode(a.nodeValue)}},b.TextNode=function(a){this.nodeValue=a},a.extend(b.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return a.escape(this.nodeValue)}}),b.XMLNode=function(a){if(this.nodeName=a.nodeName,this.children=[],this.nodeValue=a.nodeValue||"",this.attributes={},a.children)for(var c=0;c0&&(b+=" "+c.join(" "));for(var e="",f=0,g=this.children.length;g>f;f++)e+=this.children[f].toString();return b+=e?">"+e+"":"/>"},toJSON:function(){for(var a=[],b=0,c=this.children.length;c>b;b++)a.push(this.children[b].toJSON());return{nodeName:this.nodeName,children:a,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(a,b){return null===b?(delete this.attributes[a],void delete this[a]):(this.attributes[a]=b,void(this[a]=b))},setAttributeNS:function(a,b,c){this.setAttribute(b,c)},appendChild:function(a){this.children.push(a),this.firstChild=this.children[0]},cloneNode:function(){return new b.XMLNode(this.toJSON())}}),b}),define("Excel/util",["./XMLDOM"],function(a){"use strict";var b={_idSpaces:{},uniqueId:function(a){return this._idSpaces[a]||(this._idSpaces[a]=1),this._idSpaces[a]++},createXmlDoc:function(b,c){if("undefined"==typeof document)return new a(b||null,c,null);if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||null,c,null);if(window.ActiveXObject){var d=new window.ActiveXObject("Microsoft.XMLDOM"),e=d.createElement(c);return e.setAttribute("xmlns",b),d.appendChild(e),d}throw"No xml document generator"},createElement:function(a,b,c){var d=a.createElement(b),e=!d.setAttributeNS;c=c||[];for(var f=c.length;f--;)e||-1===c[f][0].indexOf("xmlns")?d.setAttribute(c[f][0],c[f][1]):d.setAttributeNS("http://www.w3.org/2000/xmlns/",c[f][0],c[f][1]);return d},LETTER_REFS:{},positionToLetterRef:function(a,b){var c,d=1,e=a,f="",g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[a])return this.LETTER_REFS[a].concat(b);for(;e>0;)e-=Math.pow(26,d-1),c=e%Math.pow(26,d),e-=c,c/=Math.pow(26,d-1),f=g.charAt(c)+f,d+=1;return this.LETTER_REFS[a]=f,f.concat(b)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","package":"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}};return b}),define("Excel/Paths",{}),define("Excel/RelationshipManager",["underscore","./util","./Paths"],function(a,b,c){"use strict";var d=function(){this.relations={},this.lastId=1};return a.uniqueId("rId"),a.extend(d.prototype,{importData:function(a){this.relations=a.relations,this.lastId=a.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(c,d){return this.relations[c.id]={id:a.uniqueId("rId"),schema:b.schemas[d]},this.relations[c.id].id},getRelationshipId:function(a){return this.relations[a.id]?this.relations[a.id].id:null},toXML:function(){var d=b.createXmlDoc(b.schemas.relationshipPackage,"Relationships"),e=d.documentElement;return a.each(this.relations,function(a,f){var g=b.createElement(d,"Relationship",[["Id",a.id],["Type",a.schema],["Target",c[f]]]);e.appendChild(g)}),d}}),d}),define("Excel/Drawings",["underscore","./RelationshipManager","./util"],function(a,b,c){"use strict";var d=function(){this.drawings=[],this.relations=new b,this.id=a.uniqueId("Drawings")};return a.extend(d.prototype,{addDrawing:function(a){this.drawings.push(a)},getCount:function(){return this.drawings.length},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetDrawing,"xdr:wsDr"),b=a.documentElement;b.setAttribute("xmlns:xdr",c.schemas.spreadsheetDrawing),b.setAttribute("xmlns:a",c.schemas.drawing);for(var d=0,e=this.drawings.length;e>d;d++){var f=this.relations.getRelationshipId(this.drawings[d].getMediaData());f||(f=this.relations.addRelation(this.drawings[d].getMediaData(),this.drawings[d].getMediaType())),this.drawings[d].setRelationshipId(f),b.appendChild(this.drawings[d].toXML(a))}return a}}),d}),define("Excel/Drawings/AbsoluteAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b){this.x=a,this.y=b},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:absoluteAnchor"),e=b.createElement(a,"xdr:pos");e.setAttribute("x",this.x),e.setAttribute("y",this.y),d.appendChild(e);var f=b.createElement(a,"xdr:ext");return f.setAttribute("cx",this.width),f.setAttribute("cy",this.height),d.appendChild(f),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/Chart",["underscore","../util"],function(a){"use strict";var b=function(){};return a.extend(b.prototype,{}),b}),define("Excel/Drawings/OneCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y,a.xOff,a.yOff),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b,c,d){this.x=a,this.y=b,void 0!==c&&(this.xOff=c),void 0!==d&&(this.yOff=d)},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:oneCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.xOff||0));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.yOff||0)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i),d.appendChild(e);var j=b.createElement(a,"xdr:ext");return j.setAttribute("cx",this.width),j.setAttribute("cy",this.height),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/TwoCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},a&&(this.setFrom(a.from.x,a.from.y,a.to.xOff,a.to.yOff),this.setTo(a.to.x,a.to.y,a.to.xOff,a.to.yOff))};return a.extend(c.prototype,{setFrom:function(a,b,c,d){this.from.x=a,this.from.y=b,void 0!==c&&(this.from.xOff=c),void 0!==d&&(this.from.yOff=c)},setTo:function(a,b,c,d){this.to.x=a,this.to.y=b,void 0!==c&&(this.to.xOff=c),void 0!==d&&(this.to.yOff=c)},toXML:function(a,c){var d=b.createElement(a,"xdr:twoCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.from.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.from.xOff));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.from.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.from.yOff)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i);var j=b.createElement(a,"xdr:to"),k=b.createElement(a,"xdr:col");k.appendChild(a.createTextNode(this.to.x));var l=b.createElement(a,"xdr:colOff");l.appendChild(a.createTextNode(this.from.xOff));var m=b.createElement(a,"xdr:row");m.appendChild(a.createTextNode(this.to.y));var n=b.createElement(a,"xdr:rowOff");return n.appendChild(a.createTextNode(this.from.yOff)),j.appendChild(k),j.appendChild(l),j.appendChild(m),j.appendChild(n),d.appendChild(e),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/Drawing",["underscore","./AbsoluteAnchor","./OneCellAnchor","./TwoCellAnchor"],function(a,b,c,d){"use strict";var e=function(){this.id=a.uniqueId("Drawing")};return a.extend(e.prototype,{createAnchor:function(a,e){switch(e=e||{},e.drawing=this,a){case"absoluteAnchor":this.anchor=new b(e);break;case"oneCellAnchor":this.anchor=new c(e);break;case"twoCellAnchor":this.anchor=new d(e)}return this.anchor}}),e}),define("Excel/Drawings/Picture",["./Drawing","underscore","../util"],function(a,b,c){"use strict";var d=function(){this.media=null,this.id=b.uniqueId("Picture"),this.pictureId=c.uniqueId("Picture"),this.fill={},this.mediaData=null};return d.prototype=new a,b.extend(d.prototype,{setMedia:function(a){this.mediaData=a},setDescription:function(a){this.description=a},setFillType:function(a){this.fill.type=a},setFillConfig:function(a){b.extend(this.fill,a)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(a){this.mediaData.rId=a},toXML:function(a){var b=c.createElement(a,"xdr:pic"),d=c.createElement(a,"xdr:nvPicPr"),e=c.createElement(a,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);d.appendChild(e);var f=c.createElement(a,"xdr:cNvPicPr");f.appendChild(c.createElement(a,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),d.appendChild(f),b.appendChild(d);var g=c.createElement(a,"xdr:blipFill");g.appendChild(c.createElement(a,"a:blip",[["xmlns:r",c.schemas.relationships],["r:embed",this.mediaData.rId]])),g.appendChild(c.createElement(a,"a:srcRect"));var h=c.createElement(a,"a:stretch");h.appendChild(c.createElement(a,"a:fillRect")),g.appendChild(h),b.appendChild(g);var i=c.createElement(a,"xdr:spPr",[["bwMode","auto"]]),j=c.createElement(a,"a:xfrm");i.appendChild(j);var k=c.createElement(a,"a:prstGeom",[["prst","rect"]]);return i.appendChild(k),b.appendChild(i),this.anchor.toXML(a,b)}}),d}),define("Excel/Positioning",[],function(){"use strict";return{pixelsToEMUs:function(a){return Math.round(914400*a/96)}}}),define("Excel/SharedStrings",["underscore","./util"],function(a,b){"use strict";var c=function(){this.strings={},this.stringArray=[],this.id=a.uniqueId("SharedStrings")};return a.extend(c.prototype,{addString:function(a){return this.strings[a]=this.stringArray.length,this.stringArray[this.stringArray.length]=a,this.strings[a]},exportData:function(){return this.strings},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"sst"),c=a.documentElement;this.stringArray.reverse();var d=this.stringArray.length;c.setAttribute("count",d),c.setAttribute("uniqueCount",d);var e=a.createElement("si"),f=a.createElement("t");f.appendChild(a.createTextNode("--placeholder--")),e.appendChild(f);for(var g=this.stringArray;d--;){var h=e.cloneNode(!0);h.firstChild.firstChild.nodeValue=g[d],c.appendChild(h)}return a}}),c}),define("Excel/StyleSheet",["underscore","./util"],function(a,b){"use strict";var c=function(){this.id=a.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};return a.extend(c.prototype,{createSimpleFormatter:function(a){var b=this.masterCellFormats.length,c={id:b};switch(a){case"date":c.numFmtId=14}return this.masterCellFormats.push(c),c},createFill:function(a){var b=this.fills.length,c=a;return c.id=b,this.fills.push(c),c},createNumberFormatter:function(a){var b=this.numberFormatters.length+100,c={id:b,formatCode:a};return this.numberFormatters.push(c),c},createFormat:function(b){var c=this.masterCellFormats.length,d={id:c};if(b.font&&a.isObject(b.font))d.fontId=this.createFontStyle(b.font).id;else if(b.font){if(a.isNaN(parseInt(b.font,10)))throw"Passing a non-numeric font id is not supported";d.fontId=b.font}if(b.format&&a.isString(b.format))d.numFmtId=this.createNumberFormatter(b.format).id;else if(b.format){if(a.isNaN(parseInt(b.format,10)))throw"Invalid number formatter id";d.numFmtId=b.format}if(b.border&&a.isObject(b.border))d.borderId=this.createBorderFormatter(b.border).id;else if(b.border){if(a.isNaN(parseInt(b.border,10)))throw"Passing a non-numeric border id is not supported";d.borderId=b.border}if(b.fill&&a.isObject(b.fill))d.fillId=this.createFill(b.fill).id;else if(b.fill){if(a.isNaN(parseInt(b.fill,10)))throw"Passing a non-numeric fill id is not supported";d.fillId=b.fill}return b.alignment&&a.isObject(b.alignment)&&(d.alignment=a.pick(b.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(d),d},createDifferentialStyle:function(b){var c=this.differentialStyles.length,d={id:c};return b.font&&a.isObject(b.font)&&(d.font=b.font),b.border&&a.isObject(b.border)&&(d.border=a.defaults(b.border,{top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?d.underline=b.underline:d.underline=!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]); +return c.fillId&&d.setAttribute("applyFill","1"),c.fontId&&d.setAttribute("applyFont","1"),c.borderId&&d.setAttribute("applyBorder","1"),c.alignment&&d.setAttribute("applyAlignment","1"),c.numFmtId&&d.setAttribute("applyNumberFormat","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),define("Excel/Table",["underscore","./util"],function(a,b){"use strict";var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),define("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){"use strict";var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style?p.setAttribute("s",r.style):this._rowInstructions[d]&&void 0!==this._rowInstructions[d].style&&p.setAttribute("s",this._rowInstructions[d].style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(0!==i?h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]])):h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},setColumnFormats:function(a){this.columnFormats=a}}),d}),define("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){"use strict";var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){b instanceof i?a[c]=b.toString():a[c]=b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},define("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],2:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b,c){"use strict";function d(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./utils"),d.base64=a("./base64"),d.compressions=a("./compressions"),b.exports=d},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./zipEntries");b.exports=function(a,b){var c,f,g,h;for(b=b||{},b.base64&&(a=d.decode(a)),f=new e(a,b),c=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},s=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},w=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||u.call(this,a,null,{dir:!0}),this.files[a]},x=function(a,b){var c,d=new l;return a._data instanceof l?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=k.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c)))):(c=o(a),(!c||0===c.length||a.options.dir)&&(b=k.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},y=function(a,b,c,d){var e,f,g=(c.compressedContent,this.utf8encode(b.name)),i=g!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=r(1,1)+r(this.crc32(g),4)+g,k+="up"+r(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=r(e,2),m+=r(f,2),m+=r(c.crc32,4),m+=r(c.compressedSize,4),m+=r(c.uncompressedSize,4),m+=r(g.length,2),m+=r(k.length,2);var n=h.LOCAL_FILE_HEADER+m+g+k,o=h.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+r(d,4)+g+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},z=function(){this.data=[]};z.prototype={append:function(a){a=g.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var A=function(a){this.data=new Uint8Array(a),this.index=0};A.prototype={append:function(a){0!==a.length&&(a=g.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var B={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new q(d.name,d._data,s(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(g.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,u.call(this,a,b,c),this},folder:function(a){ +if(!a)return this;if(g.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=w.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),f=255&(b^h),e=d[f],b=b>>>8^e;return-1^b},utf8encode:function(a){if(d){var b=d.encode(a);return g.transformTo("string",b)}if(f.nodebuffer)return g.transformTo("string",m(a,"utf-8"));for(var c=[],e=0,h=0;hi?c[e++]=String.fromCharCode(i):i>127&&2048>i?(c[e++]=String.fromCharCode(i>>6|192),c[e++]=String.fromCharCode(63&i|128)):(c[e++]=String.fromCharCode(i>>12|224),c[e++]=String.fromCharCode(i>>6&63|128),c[e++]=String.fromCharCode(63&i|128))}return c.join("")},utf8decode:function(a){var b=[],c=0,d=g.getTypeOf(a),h="string"!==d,i=0,j=0,k=0,l=0;if(e)return e.decode(g.transformTo("uint8array",a));if(f.nodebuffer)return g.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=B},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./utils"),i=a("./signature"),j=a("./zipEntry"),k=a("./support");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+h.pretty(b)+", expected "+h.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],19:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;else if(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var da,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);else if(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify"); +if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),define("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a,b){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),define("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}); \ No newline at end of file diff --git a/dist/excel-builder.dist.js b/dist/excel-builder.dist.js index 18eb979..4e9260f 100644 --- a/dist/excel-builder.dist.js +++ b/dist/excel-builder.dist.js @@ -1,7 +1,7 @@ (function (root) { /** - * @license almond 0.3.0 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. + * @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/almond for details */ @@ -46,12 +46,6 @@ var requirejs, require, define; //otherwise, assume it is a top-level require that will //be relative to baseUrl in the end. if (baseName) { - //Convert baseName to array, and lop off the last part, - //so that . matches that "directory" and not name of the baseName's - //module. For instance, baseName of "one/two/three", maps to - //"one/two/three.js", but we want the directory, "one/two" for - //this normalization. - baseParts = baseParts.slice(0, baseParts.length - 1); name = name.split('/'); lastIndex = name.length - 1; @@ -60,7 +54,11 @@ var requirejs, require, define; name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); } - name = baseParts.concat(name); + //Lop off the last part of baseParts, so that . matches the + //"directory" and not name of the baseName's module. For instance, + //baseName of "one/two/three", maps to "one/two/three.js", but we + //want the directory, "one/two" for this normalization. + name = baseParts.slice(0, baseParts.length - 1).concat(name); //start trimDots for (i = 0; i < name.length; i += 1) { @@ -410,6 +408,9 @@ var requirejs, require, define; requirejs._defined = defined; define = function (name, deps, callback) { + if (typeof name !== 'string') { + throw new Error('See almond README: incorrect module build, no module name'); + } //This module may not have dependencies if (!deps.splice) { @@ -1774,7 +1775,7 @@ var requirejs, require, define; }).call(this); define('Excel/XMLDOM',['underscore'], function (_) { - + 'use strict'; var XMLDOM = function (ns, rootNodeName) { this.documentElement = this.createElement(rootNodeName); this.documentElement.setAttribute('xmlns', ns); @@ -1908,7 +1909,7 @@ define('Excel/XMLDOM',['underscore'], function (_) { * @module Excel/util */ define('Excel/util',['./XMLDOM'], function (XMLDOM) { - + "use strict"; var util = { _idSpaces: {}, @@ -2028,7 +2029,7 @@ define('Excel/Paths',{}); * @module Excel/RelationshipManager */ define('Excel/RelationshipManager',['underscore', './util', './Paths'], function (_, util, Paths) { - + "use strict"; var RelationshipManager = function () { this.relations = {}; this.lastId = 1; @@ -2083,7 +2084,7 @@ define('Excel/RelationshipManager',['underscore', './util', './Paths'], function * @module Excel/Drawings */ define('Excel/Drawings',['underscore', './RelationshipManager', './util'], function (_, RelationshipManager, util) { - + "use strict"; var Drawings = function () { this.drawings = []; this.relations = new RelationshipManager(); @@ -2125,7 +2126,7 @@ define('Excel/Drawings',['underscore', './RelationshipManager', './util'], funct return Drawings; }); define('Excel/Drawings/AbsoluteAnchor',['underscore', '../util'], function (_, util) { - + "use strict"; /** * * @param {Object} config @@ -2189,7 +2190,7 @@ define('Excel/Drawings/AbsoluteAnchor',['underscore', '../util'], function (_, u return AbsoluteAnchor; }); define('Excel/Drawings/Chart',['underscore', '../util'], function (_) { - + "use strict"; var Chart = function () { }; @@ -2199,7 +2200,7 @@ define('Excel/Drawings/Chart',['underscore', '../util'], function (_) { return Chart; }); define('Excel/Drawings/OneCellAnchor',['underscore', '../util'], function (_, util) { - + "use strict"; /** * * @param {Object} config @@ -2268,7 +2269,7 @@ define('Excel/Drawings/OneCellAnchor',['underscore', '../util'], function (_, ut return OneCellAnchor; }); define('Excel/Drawings/TwoCellAnchor',['underscore', '../util'], function (_, util) { - + 'use strict'; var TwoCellAnchor = function (config) { this.from = {xOff: 0, yOff: 0}; this.to = {xOff: 0, yOff: 0}; @@ -2351,7 +2352,7 @@ define('Excel/Drawings/TwoCellAnchor',['underscore', '../util'], function (_, ut define('Excel/Drawings/Drawing',[ 'underscore', './AbsoluteAnchor', './OneCellAnchor', './TwoCellAnchor' ], function (_, AbsoluteAnchor, OneCellAnchor, TwoCellAnchor) { - + "use strict"; /** * @constructor */ @@ -2387,7 +2388,7 @@ define('Excel/Drawings/Drawing',[ return Drawing; }); define('Excel/Drawings/Picture',['./Drawing', 'underscore', '../util'], function (Drawing, _, util) { - + "use strict"; var Picture = function () { this.media = null; this.id = _.uniqueId('Picture'); @@ -2490,7 +2491,7 @@ define('Excel/Drawings/Picture',['./Drawing', 'underscore', '../util'], function return Picture; }); define('Excel/Positioning',[], function () { - + "use strict"; return { /** * Converts pixel sizes to 'EMU's, which is what Open XML uses. @@ -2510,7 +2511,7 @@ define('Excel/Positioning',[], function () { * @module Excel/SharedStrings */ define('Excel/SharedStrings',['underscore', './util'], function (_, util) { - + "use strict"; var sharedStrings = function () { this.strings = {}; this.stringArray = []; @@ -2563,7 +2564,7 @@ define('Excel/SharedStrings',['underscore', './util'], function (_, util) { * @module Excel/StyleSheet */ define('Excel/StyleSheet',['underscore', './util'], function (_, util) { - + "use strict"; var StyleSheet = function () { this.id = _.uniqueId('StyleSheet'); this.cellStyles = [{ @@ -2931,9 +2932,21 @@ define('Excel/StyleSheet',['underscore', './util'], function (_, util) { while(a--) { xf.setAttribute(attributes[a], styleInstructions[attributes[a]]); } - if(styleInstructions.fillId) { + if (styleInstructions.fillId) { xf.setAttribute('applyFill', '1'); } + if (styleInstructions.fontId) { + xf.setAttribute('applyFont', '1'); + } + if (styleInstructions.borderId) { + xf.setAttribute('applyBorder', '1'); + } + if (styleInstructions.alignment) { + xf.setAttribute('applyAlignment', '1'); + } + if (styleInstructions.numFmtId) { + xf.setAttribute('applyNumberFormat', '1'); + } return xf; }, @@ -3224,7 +3237,7 @@ define('Excel/StyleSheet',['underscore', './util'], function (_, util) { * @module Excel/Table */ define('Excel/Table',['underscore', './util'], function (_, util) { - + "use strict"; var Table = function (config) { _.defaults(this, { name: "", @@ -3400,7 +3413,7 @@ define('Excel/Table',['underscore', './util'], function (_, util) { * @module Excel/Worksheet */ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], function (_, util, RelationshipManager) { - + "use strict"; /** * @constructor */ @@ -3722,6 +3735,8 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func } if(metadata.style) { cell.setAttribute('s', metadata.style); + } else if (this._rowInstructions[row] && this._rowInstructions[row].style !== undefined) { + cell.setAttribute('s', this._rowInstructions[row].style); } cell.setAttribute('r', util.positionToLetterRef(c + 1, row + 1)); rowNode.appendChild(cell); @@ -3933,7 +3948,7 @@ define('Excel/Workbook',[ './XMLDOM' ], function (require, _, util, StyleSheet, Worksheet, SharedStrings, RelationshipManager, Paths, XMLDOM) { - + "use strict"; var Workbook = function (config) { this.worksheets = []; this.tables = []; @@ -4341,7 +4356,7 @@ JSZip uses the library zlib.js released under the following license : zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define('JSZip',e):"undefined"!=typeof window?window.JSZip=e():"undefined"!=typeof global?global.JSZip=e():"undefined"!=typeof self&&(self.JSZip=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o>>8&255]<<16|L[e>>>16&255]<<8|L[e>>>24&255])>>32-d:L[e]>>8-d);if(8>d+b)k=k<>d-m-1&1,8===++b&&(b=0,f[a++]=L[k],k=0,a===f.length&&(f=ca(this)));f[a]=k;this.buffer=f;this.d=b;this.index=a};K.prototype.finish=function(){var e=this.buffer,d=this.index,c;0M;++M){for(var R=M,S=R,ha=7,R=R>>>1;R;R>>>=1)S<<=1,S|=R&1,--ha;ga[M]=(S<>>0}var L=ga;function ja(e){this.buffer=new (C?Uint16Array:Array)(2*e);this.length=0}ja.prototype.getParent=function(e){return 2*((e-2)/4|0)};ja.prototype.push=function(e,d){var c,f,a=this.buffer,b;c=this.length;a[this.length++]=d;for(a[this.length++]=e;0a[f])b=a[c],a[c]=a[f],a[f]=b,b=a[c+1],a[c+1]=a[f+1],a[f+1]=b,c=f;else break;return this.length}; ja.prototype.pop=function(){var e,d,c=this.buffer,f,a,b;d=c[0];e=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(b=0;;){a=2*b+2;if(a>=this.length)break;a+2c[a]&&(a+=2);if(c[a]>c[b])f=c[b],c[b]=c[a],c[a]=f,f=c[b+1],c[b+1]=c[a+1],c[a+1]=f;else break;b=a}return{index:e,value:d,length:this.length}};function ka(e,d){this.e=ma;this.f=0;this.input=C&&e instanceof Array?new Uint8Array(e):e;this.c=0;d&&(d.lazy&&(this.f=d.lazy),"number"===typeof d.compressionType&&(this.e=d.compressionType),d.outputBuffer&&(this.b=C&&d.outputBuffer instanceof Array?new Uint8Array(d.outputBuffer):d.outputBuffer),"number"===typeof d.outputIndex&&(this.c=d.outputIndex));this.b||(this.b=new (C?Uint8Array:Array)(32768))}var ma=2,T=[],U; @@ -6626,7 +6641,7 @@ function Ja(e,d,c){function f(a){var b=g[a][p[a]];b===d?(f(a+1),f(a+1)):--k[b];+ function pa(e){var d=new (C?Uint16Array:Array)(e.length),c=[],f=[],a=0,b,k,m,g;b=0;for(k=e.length;b>>=1}return d};ba("Zlib.RawDeflate",ka);ba("Zlib.RawDeflate.prototype.compress",ka.prototype.h);var Ka={NONE:0,FIXED:1,DYNAMIC:ma},V,La,$,Ma;if(Object.keys)V=Object.keys(Ka);else for(La in V=[],$=0,Ka)V[$++]=La;$=0;for(Ma=V.length;$a&&(a=c[n]),c[n]>=1;for(s=m;sa&&(a=c[n]),c[n]>=1;for(s=m;s>>=1;switch(c){case 0:var e=this.input,a=this.d,b=this.b,d=this.a,f=e.length,g=void 0,h=void 0,k=b.length,m=void 0;this.c=this.f=0;if(a+1>=f)throw Error("invalid uncompressed block header: LEN");g=e[a++]|e[a++]<<8;if(a+1>=f)throw Error("invalid uncompressed block header: NLEN");h=e[a++]|e[a++]<<8;if(g===~h)throw Error("invalid uncompressed block header: length verify");if(a+g>e.length)throw Error("input buffer is broken");switch(this.i){case w:for(;d+ g>b.length;){m=k-d;g-=m;if(q)b.set(e.subarray(a,a+m),d),d+=m,a+=m;else for(;m--;)b[d++]=e[a++];this.a=d;b=this.e();d=this.a}break;case v:for(;d+g>b.length;)b=this.e({o:2});break;default:throw Error("invalid inflate mode");}if(q)b.set(e.subarray(a,a+g),d),d+=g,a+=g;else for(;g--;)b[d++]=e[a++];this.d=a;this.a=d;this.b=b;break;case 1:this.j(y,z);break;case 2:A(this);break;default:throw Error("unknown BTYPE: "+c);}}return this.m()}; diff --git a/dist/excel-builder.dist.min.js b/dist/excel-builder.dist.min.js index d14ab61..a56ee40 100644 --- a/dist/excel-builder.dist.min.js +++ b/dist/excel-builder.dist.min.js @@ -1,4 +1,4 @@ -!function(a){var b,c,d;!function(a){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(b,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(a,d.concat([b,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(b){if(e(r,b)){var c=r[b];delete r[b],t[b]=!0,m.apply(a,c)}if(!e(q,b)&&!e(t,b))throw new Error("No "+b);return q[b]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(b,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||b,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;ne;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=y.keys(a),e=0,f=g.length;f>e;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};y.map=y.collect=function(a,b,c){var d=[];return null==a?d:n&&a.map===n?a.map(b,c):(z(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var A="Reduce of empty array with no initial value";y.reduce=y.foldl=y.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduce===o)return d&&(b=y.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(z(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(A);return c},y.reduceRight=y.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),p&&a.reduceRight===p)return d&&(b=y.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=y.keys(a);f=g.length}if(z(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(A);return c},y.find=y.detect=function(a,b,c){var d;return B(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},y.filter=y.select=function(a,b,c){var d=[];return null==a?d:q&&a.filter===q?a.filter(b,c):(z(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},y.reject=function(a,b,c){return y.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},y.every=y.all=function(a,b,d){b||(b=y.identity);var e=!0;return null==a?e:r&&a.every===r?a.every(b,d):(z(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var B=y.some=y.any=function(a,b,d){b||(b=y.identity);var e=!1;return null==a?e:s&&a.some===s?a.some(b,d):(z(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};y.contains=y.include=function(a,b){return null==a?!1:t&&a.indexOf===t?-1!=a.indexOf(b):B(a,function(a){return a===b})},y.invoke=function(a,b){var c=i.call(arguments,2),d=y.isFunction(b);return y.map(a,function(a){return(d?b:a[b]).apply(a,c)})},y.pluck=function(a,b){return y.map(a,y.property(b))},y.where=function(a,b){return y.filter(a,y.matches(b))},y.findWhere=function(a,b){return y.find(a,y.matches(b))},y.max=function(a,b,c){if(!b&&y.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-1/0,e=-1/0;return z(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},y.min=function(a,b,c){if(!b&&y.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return z(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;e>h&&(d=a,e=h)}),d},y.shuffle=function(a){var b,c=0,d=[];return z(a,function(a){b=y.random(c++),d[c-1]=d[b],d[b]=a}),d},y.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=y.values(a)),a[y.random(a.length-1)]):y.shuffle(a).slice(0,Math.max(0,b))};var C=function(a){return null==a?y.identity:y.isFunction(a)?a:y.property(a)};y.sortBy=function(a,b,c){return b=C(b),y.pluck(y.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var D=function(a){return function(b,c,d){var e={};return c=C(c),z(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};y.groupBy=D(function(a,b,c){y.has(a,b)?a[b].push(c):a[b]=[c]}),y.indexBy=D(function(a,b,c){a[b]=c}),y.countBy=D(function(a,b){y.has(a,b)?a[b]++:a[b]=1}),y.sortedIndex=function(a,b,c,d){c=C(c);for(var e=c.call(d,b),f=0,g=a.length;g>f;){var h=f+g>>>1;c.call(d,a[h])b?[]:i.call(a,0,b)},y.initial=function(a,b,c){return i.call(a,0,a.length-(null==b||c?1:b))},y.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:i.call(a,Math.max(a.length-b,0))},y.rest=y.tail=y.drop=function(a,b,c){return i.call(a,null==b||c?1:b)},y.compact=function(a){return y.filter(a,y.identity)};var E=function(a,b,c){return b&&y.every(a,y.isArray)?j.apply(c,a):(z(a,function(a){y.isArray(a)||y.isArguments(a)?b?h.apply(c,a):E(a,b,c):c.push(a)}),c)};y.flatten=function(a,b){return E(a,b,[])},y.without=function(a){return y.difference(a,i.call(arguments,1))},y.partition=function(a,b){var c=[],d=[];return z(a,function(a){(b(a)?c:d).push(a)}),[c,d]},y.uniq=y.unique=function(a,b,c,d){y.isFunction(b)&&(d=c,c=b,b=!1);var e=c?y.map(a,c,d):a,f=[],g=[];return z(e,function(c,d){(b?d&&g[g.length-1]===c:y.contains(g,c))||(g.push(c),f.push(a[d]))}),f},y.union=function(){return y.uniq(y.flatten(arguments,!0))},y.intersection=function(a){var b=i.call(arguments,1);return y.filter(y.uniq(a),function(a){return y.every(b,function(b){return y.contains(b,a)})})},y.difference=function(a){var b=j.apply(e,i.call(arguments,1));return y.filter(a,function(a){return!y.contains(b,a)})},y.zip=function(){for(var a=y.max(y.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;a>c;c++)b[c]=y.pluck(arguments,""+c);return b},y.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},y.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=y.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(t&&a.indexOf===t)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},y.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(u&&a.lastIndexOf===u)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},y.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var F=function(){};y.bind=function(a,b){var c,d;if(x&&a.bind===x)return x.apply(a,i.call(arguments,1));if(!y.isFunction(a))throw new TypeError;return c=i.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(i.call(arguments)));F.prototype=a.prototype;var e=new F;F.prototype=null;var f=a.apply(e,c.concat(i.call(arguments)));return Object(f)===f?f:e}},y.partial=function(a){var b=i.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===y&&(d[e]=arguments[c++]);for(;c=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||c.trailing===!1||(g=setTimeout(i,k)),f}},y.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=y.now()-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=y.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},y.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},y.wrap=function(a,b){return y.partial(b,a)},y.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},y.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},y.keys=function(a){if(!y.isObject(a))return[];if(w)return w(a);var b=[];for(var c in a)y.has(a,c)&&b.push(c);return b},y.values=function(a){for(var b=y.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},y.pairs=function(a){for(var b=y.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},y.invert=function(a){for(var b={},c=y.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},y.functions=y.methods=function(a){var b=[];for(var c in a)y.isFunction(a[c])&&b.push(c);return b.sort()},y.extend=function(a){return z(i.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},y.pick=function(a){var b={},c=j.apply(e,i.call(arguments,1));return z(c,function(c){c in a&&(b[c]=a[c])}),b},y.omit=function(a){var b={},c=j.apply(e,i.call(arguments,1));for(var d in a)y.contains(c,d)||(b[d]=a[d]);return b},y.defaults=function(a){return z(i.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},y.clone=function(a){return y.isObject(a)?y.isArray(a)?a.slice():y.extend({},a):a},y.tap=function(a,b){return b(a),a};var G=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof y&&(a=a._wrapped),b instanceof y&&(b=b._wrapped);var e=k.call(a);if(e!=k.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(y.isFunction(g)&&g instanceof g&&y.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,j=!0;if("[object Array]"==e){if(i=a.length,j=i==b.length)for(;i--&&(j=G(a[i],b[i],c,d)););}else{for(var l in a)if(y.has(a,l)&&(i++,!(j=y.has(b,l)&&G(a[l],b[l],c,d))))break;if(j){for(l in b)if(y.has(b,l)&&!i--)break;j=!i}}return c.pop(),d.pop(),j};y.isEqual=function(a,b){return G(a,b,[],[])},y.isEmpty=function(a){if(null==a)return!0;if(y.isArray(a)||y.isString(a))return 0===a.length;for(var b in a)if(y.has(a,b))return!1;return!0},y.isElement=function(a){return!(!a||1!==a.nodeType)},y.isArray=v||function(a){return"[object Array]"==k.call(a)},y.isObject=function(a){return a===Object(a)},z(["Arguments","Function","String","Number","Date","RegExp"],function(a){y["is"+a]=function(b){return k.call(b)=="[object "+a+"]"}}),y.isArguments(arguments)||(y.isArguments=function(a){return!(!a||!y.has(a,"callee"))}),"function"!=typeof/./&&(y.isFunction=function(a){return"function"==typeof a}),y.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},y.isNaN=function(a){return y.isNumber(a)&&a!=+a},y.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==k.call(a)},y.isNull=function(a){return null===a},y.isUndefined=function(a){return void 0===a},y.has=function(a,b){return l.call(a,b)},y.noConflict=function(){return a._=b,this},y.identity=function(a){return a},y.constant=function(a){return function(){return a}},y.property=function(a){return function(b){return b[a]}},y.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},y.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;a>e;e++)d[e]=b.call(c,e);return d},y.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},y.now=Date.now||function(){return(new Date).getTime()};var H={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};H.unescape=y.invert(H.escape);var I={escape:new RegExp("["+y.keys(H.escape).join("")+"]","g"),unescape:new RegExp("("+y.keys(H.unescape).join("|")+")","g")};y.each(["escape","unescape"],function(a){y[a]=function(b){return null==b?"":(""+b).replace(I[a],function(b){return H[a][b]})}}),y.result=function(a,b){if(null==a)return void 0;var c=a[b];return y.isFunction(c)?c.call(a):c},y.mixin=function(a){z(y.functions(a),function(b){var c=y[b]=a[b];y.prototype[b]=function(){var a=[this._wrapped];return h.apply(a,arguments),N.call(this,c.apply(y,a))}})};var J=0;y.uniqueId=function(a){var b=++J+"";return a?a+b:b},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,L={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},M=/\\|'|\r|\n|\t|\u2028|\u2029/g;y.template=function(a,b,c){var d;c=y.defaults({},c,y.templateSettings);var e=new RegExp([(c.escape||K).source,(c.interpolate||K).source,(c.evaluate||K).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(M,function(a){return"\\"+L[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,y);var i=function(a){return d.call(this,a,y)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},y.chain=function(a){return y(a).chain()};var N=function(a){return this._chain?y(a).chain():a};y.mixin(y),z(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=e[a];y.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],N.call(this,c)}}),z(["concat","join","slice"],function(a){var b=e[a];y.prototype[a]=function(){return N.call(this,b.apply(this._wrapped,arguments))}}),y.extend(y.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof d&&d.amd&&d("underscore",[],function(){return y})}.call(this),d("Excel/XMLDOM",["underscore"],function(a){var b=function(a,b){this.documentElement=this.createElement(b),this.documentElement.setAttribute("xmlns",a)};return a.extend(b.prototype,{createElement:function(a){return new b.XMLNode({nodeName:a})},createTextNode:function(a){return new b.TextNode(a)},toString:function(){return this.documentElement.toString()}}),b.Node=function(){},b.Node.Create=function(a){switch(a.type){case"XML":return new b.XMLNode(a);case"TEXT":return new b.TextNode(a.nodeValue)}},b.TextNode=function(a){this.nodeValue=a},a.extend(b.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return a.escape(this.nodeValue)}}),b.XMLNode=function(a){if(this.nodeName=a.nodeName,this.children=[],this.nodeValue=a.nodeValue||"",this.attributes={},a.children)for(var c=0;c0&&(b+=" "+c.join(" "));for(var e="",f=0,g=this.children.length;g>f;f++)e+=this.children[f].toString();return b+=e?">"+e+"":"/>"},toJSON:function(){for(var a=[],b=0,c=this.children.length;c>b;b++)a.push(this.children[b].toJSON());return{nodeName:this.nodeName,children:a,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(a,b){return null===b?(delete this.attributes[a],void delete this[a]):(this.attributes[a]=b,void(this[a]=b))},setAttributeNS:function(a,b,c){this.setAttribute(b,c)},appendChild:function(a){this.children.push(a),this.firstChild=this.children[0]},cloneNode:function(){return new b.XMLNode(this.toJSON())}}),b}),d("Excel/util",["./XMLDOM"],function(a){var b={_idSpaces:{},uniqueId:function(a){return this._idSpaces[a]||(this._idSpaces[a]=1),this._idSpaces[a]++},createXmlDoc:function(b,c){if("undefined"==typeof document)return new a(b||null,c,null);if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||null,c,null);if(window.ActiveXObject){var d=new window.ActiveXObject("Microsoft.XMLDOM"),e=d.createElement(c);return e.setAttribute("xmlns",b),d.appendChild(e),d}throw"No xml document generator"},createElement:function(a,b,c){var d=a.createElement(b),e=!d.setAttributeNS;c=c||[];for(var f=c.length;f--;)e||-1===c[f][0].indexOf("xmlns")?d.setAttribute(c[f][0],c[f][1]):d.setAttributeNS("http://www.w3.org/2000/xmlns/",c[f][0],c[f][1]);return d},LETTER_REFS:{},positionToLetterRef:function(a,b){var c,d=1,e=a,f="",g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[a])return this.LETTER_REFS[a].concat(b);for(;e>0;)e-=Math.pow(26,d-1),c=e%Math.pow(26,d),e-=c,c/=Math.pow(26,d-1),f=g.charAt(c)+f,d+=1;return this.LETTER_REFS[a]=f,f.concat(b)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","package":"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}};return b}),d("Excel/Paths",{}),d("Excel/RelationshipManager",["underscore","./util","./Paths"],function(a,b,c){var d=function(){this.relations={},this.lastId=1};return a.uniqueId("rId"),a.extend(d.prototype,{importData:function(a){this.relations=a.relations,this.lastId=a.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(c,d){return this.relations[c.id]={id:a.uniqueId("rId"),schema:b.schemas[d]},this.relations[c.id].id},getRelationshipId:function(a){return this.relations[a.id]?this.relations[a.id].id:null},toXML:function(){var d=b.createXmlDoc(b.schemas.relationshipPackage,"Relationships"),e=d.documentElement;return a.each(this.relations,function(a,f){var g=b.createElement(d,"Relationship",[["Id",a.id],["Type",a.schema],["Target",c[f]]]);e.appendChild(g)}),d}}),d}),d("Excel/Drawings",["underscore","./RelationshipManager","./util"],function(a,b,c){var d=function(){this.drawings=[],this.relations=new b,this.id=a.uniqueId("Drawings")};return a.extend(d.prototype,{addDrawing:function(a){this.drawings.push(a)},getCount:function(){return this.drawings.length},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetDrawing,"xdr:wsDr"),b=a.documentElement;b.setAttribute("xmlns:xdr",c.schemas.spreadsheetDrawing),b.setAttribute("xmlns:a",c.schemas.drawing);for(var d=0,e=this.drawings.length;e>d;d++){var f=this.relations.getRelationshipId(this.drawings[d].getMediaData());f||(f=this.relations.addRelation(this.drawings[d].getMediaData(),this.drawings[d].getMediaType())),this.drawings[d].setRelationshipId(f),b.appendChild(this.drawings[d].toXML(a))}return a}}),d}),d("Excel/Drawings/AbsoluteAnchor",["underscore","../util"],function(a,b){var c=function(a){this.x=null,this.y=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b){this.x=a,this.y=b},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:absoluteAnchor"),e=b.createElement(a,"xdr:pos");e.setAttribute("x",this.x),e.setAttribute("y",this.y),d.appendChild(e);var f=b.createElement(a,"xdr:ext");return f.setAttribute("cx",this.width),f.setAttribute("cy",this.height),d.appendChild(f),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/Chart",["underscore","../util"],function(a){var b=function(){};return a.extend(b.prototype,{}),b}),d("Excel/Drawings/OneCellAnchor",["underscore","../util"],function(a,b){var c=function(a){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y,a.xOff,a.yOff),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b,c,d){this.x=a,this.y=b,void 0!==c&&(this.xOff=c),void 0!==d&&(this.yOff=d)},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:oneCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.xOff||0));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.yOff||0)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i),d.appendChild(e);var j=b.createElement(a,"xdr:ext");return j.setAttribute("cx",this.width),j.setAttribute("cy",this.height),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/TwoCellAnchor",["underscore","../util"],function(a,b){var c=function(a){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},a&&(this.setFrom(a.from.x,a.from.y,a.to.xOff,a.to.yOff),this.setTo(a.to.x,a.to.y,a.to.xOff,a.to.yOff))};return a.extend(c.prototype,{setFrom:function(a,b,c,d){this.from.x=a,this.from.y=b,void 0!==c&&(this.from.xOff=c),void 0!==d&&(this.from.yOff=c)},setTo:function(a,b,c,d){this.to.x=a,this.to.y=b,void 0!==c&&(this.to.xOff=c),void 0!==d&&(this.to.yOff=c)},toXML:function(a,c){var d=b.createElement(a,"xdr:twoCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.from.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.from.xOff));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.from.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.from.yOff)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i);var j=b.createElement(a,"xdr:to"),k=b.createElement(a,"xdr:col");k.appendChild(a.createTextNode(this.to.x));var l=b.createElement(a,"xdr:colOff");l.appendChild(a.createTextNode(this.from.xOff));var m=b.createElement(a,"xdr:row");m.appendChild(a.createTextNode(this.to.y));var n=b.createElement(a,"xdr:rowOff");return n.appendChild(a.createTextNode(this.from.yOff)),j.appendChild(k),j.appendChild(l),j.appendChild(m),j.appendChild(n),d.appendChild(e),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/Drawing",["underscore","./AbsoluteAnchor","./OneCellAnchor","./TwoCellAnchor"],function(a,b,c,d){var e=function(){this.id=a.uniqueId("Drawing")};return a.extend(e.prototype,{createAnchor:function(a,e){switch(e=e||{},e.drawing=this,a){case"absoluteAnchor":this.anchor=new b(e);break;case"oneCellAnchor":this.anchor=new c(e);break;case"twoCellAnchor":this.anchor=new d(e)}return this.anchor}}),e}),d("Excel/Drawings/Picture",["./Drawing","underscore","../util"],function(a,b,c){var d=function(){this.media=null,this.id=b.uniqueId("Picture"),this.pictureId=c.uniqueId("Picture"),this.fill={},this.mediaData=null};return d.prototype=new a,b.extend(d.prototype,{setMedia:function(a){this.mediaData=a},setDescription:function(a){this.description=a},setFillType:function(a){this.fill.type=a},setFillConfig:function(a){b.extend(this.fill,a)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(a){this.mediaData.rId=a},toXML:function(a){var b=c.createElement(a,"xdr:pic"),d=c.createElement(a,"xdr:nvPicPr"),e=c.createElement(a,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);d.appendChild(e);var f=c.createElement(a,"xdr:cNvPicPr");f.appendChild(c.createElement(a,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),d.appendChild(f),b.appendChild(d);var g=c.createElement(a,"xdr:blipFill");g.appendChild(c.createElement(a,"a:blip",[["xmlns:r",c.schemas.relationships],["r:embed",this.mediaData.rId]])),g.appendChild(c.createElement(a,"a:srcRect"));var h=c.createElement(a,"a:stretch");h.appendChild(c.createElement(a,"a:fillRect")),g.appendChild(h),b.appendChild(g);var i=c.createElement(a,"xdr:spPr",[["bwMode","auto"]]),j=c.createElement(a,"a:xfrm");i.appendChild(j);var k=c.createElement(a,"a:prstGeom",[["prst","rect"]]);return i.appendChild(k),b.appendChild(i),this.anchor.toXML(a,b)}}),d}),d("Excel/Positioning",[],function(){return{pixelsToEMUs:function(a){return Math.round(914400*a/96)}}}),d("Excel/SharedStrings",["underscore","./util"],function(a,b){var c=function(){this.strings={},this.stringArray=[],this.id=a.uniqueId("SharedStrings")};return a.extend(c.prototype,{addString:function(a){return this.strings[a]=this.stringArray.length,this.stringArray[this.stringArray.length]=a,this.strings[a]},exportData:function(){return this.strings},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"sst"),c=a.documentElement;this.stringArray.reverse();var d=this.stringArray.length;c.setAttribute("count",d),c.setAttribute("uniqueCount",d);var e=a.createElement("si"),f=a.createElement("t");f.appendChild(a.createTextNode("--placeholder--")),e.appendChild(f);for(var g=this.stringArray;d--;){var h=e.cloneNode(!0);h.firstChild.firstChild.nodeValue=g[d],c.appendChild(h)}return a}}),c}),d("Excel/StyleSheet",["underscore","./util"],function(a,b){var c=function(){this.id=a.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};return a.extend(c.prototype,{createSimpleFormatter:function(a){var b=this.masterCellFormats.length,c={id:b};switch(a){case"date":c.numFmtId=14}return this.masterCellFormats.push(c),c},createFill:function(a){var b=this.fills.length,c=a;return c.id=b,this.fills.push(c),c},createNumberFormatter:function(a){var b=this.numberFormatters.length+100,c={id:b,formatCode:a};return this.numberFormatters.push(c),c},createFormat:function(b){var c=this.masterCellFormats.length,d={id:c};if(b.font&&a.isObject(b.font))d.fontId=this.createFontStyle(b.font).id;else if(b.font){if(a.isNaN(parseInt(b.font,10)))throw"Passing a non-numeric font id is not supported";d.fontId=b.font}if(b.format&&a.isString(b.format))d.numFmtId=this.createNumberFormatter(b.format).id;else if(b.format){if(a.isNaN(parseInt(b.format,10)))throw"Invalid number formatter id";d.numFmtId=b.format}if(b.border&&a.isObject(b.border))d.borderId=this.createBorderFormatter(b.border).id;else if(b.border){if(a.isNaN(parseInt(b.border,10)))throw"Passing a non-numeric border id is not supported";d.borderId=b.border}if(b.fill&&a.isObject(b.fill))d.fillId=this.createFill(b.fill).id;else if(b.fill){if(a.isNaN(parseInt(b.fill,10)))throw"Passing a non-numeric fill id is not supported";d.fillId=b.fill}return b.alignment&&a.isObject(b.alignment)&&(d.alignment=a.pick(b.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(d),d},createDifferentialStyle:function(b){var c=this.differentialStyles.length,d={id:c};return b.font&&a.isObject(b.font)&&(d.font=b.font),b.border&&a.isObject(b.border)&&(d.border=a.defaults(b.border,{top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d -},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(d.underline=-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?b.underline:!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]);return c.fillId&&d.setAttribute("applyFill","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),d("Excel/Table",["underscore","./util"],function(a,b){var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),d("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style&&p.setAttribute("s",r.style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(h.appendChild(0!==i?b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]]):b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},setColumnFormats:function(a){this.columnFormats=a}}),d}),d("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){a[c]=b instanceof i?b.toString():b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},d("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof d&&d.amd?d("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof c&&c;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,a,b,d,e)}return d[h].exports}for(var g="function"==typeof c&&c,h=0;h>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b){function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":14}],5:[function(a,b,c){c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b){function c(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./utils"),c.base64=a("./base64"),c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b){var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},r=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},v=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||t.call(this,a,null,{dir:!0}),this.files[a]},w=function(a,b){var c,d=new k;return a._data instanceof k?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=j.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c)))):(c=n(a),(!c||0===c.length||a.options.dir)&&(b=j.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(f.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d -},x=function(a,b,c,d){var e,f,h=(c.compressedContent,this.utf8encode(b.name)),i=h!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=q(1,1)+q(this.crc32(h),4)+h,k+="up"+q(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=q(e,2),m+=q(f,2),m+=q(c.crc32,4),m+=q(c.compressedSize,4),m+=q(c.uncompressedSize,4),m+=q(h.length,2),m+=q(k.length,2);var n=g.LOCAL_FILE_HEADER+m+h+k,o=g.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+q(d,4)+h+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},y=function(){this.data=[]};y.prototype={append:function(a){a=f.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var z=function(a){this.data=new Uint8Array(a),this.index=0};z.prototype={append:function(a){0!==a.length&&(a=f.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new p(d.name,d._data,r(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(f.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,t.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(f.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=v.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),g=255&(b^h),e=d[g],b=b>>>8^e;return-1^b},utf8encode:function(a){if(c){var b=c.encode(a);return f.transformTo("string",b)}if(e.nodebuffer)return f.transformTo("string",l(a,"utf-8"));for(var d=[],g=0,h=0;hi?d[g++]=String.fromCharCode(i):i>127&&2048>i?(d[g++]=String.fromCharCode(i>>6|192),d[g++]=String.fromCharCode(63&i|128)):(d[g++]=String.fromCharCode(i>>12|224),d[g++]=String.fromCharCode(i>>6&63|128),d[g++]=String.fromCharCode(63&i|128))}return d.join("")},utf8decode:function(a){var b=[],c=0,g=f.getTypeOf(a),h="string"!==g,i=0,j=0,k=0,l=0;if(d)return d.decode(f.transformTo("uint8array",a));if(e.nodebuffer)return f.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=A},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b){function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b){function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":4}],14:[function(a,b,c){function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b){function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],19:[function(){(function(){function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,ab=new(o?Uint32Array:Array)($+_),bb=new(o?Uint32Array:Array)(316),cb=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)ab[V++]=H[U];for(U=0;_>U;U++)ab[V++]=J[U];if(!o)for(U=0,X=cb.length;X>U;++U)cb[U]=0;for(U=Y=0,X=ab.length;X>U;U+=V){for(V=1;X>U+V&&ab[U+V]===ab[U];++V);if(W=V,0===ab[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(bb[Y++]=17,bb[Y++]=Z-3,cb[17]++):(bb[Y++]=18,bb[Y++]=Z-11,cb[18]++),W-=Z;else if(bb[Y++]=ab[U],cb[ab[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),bb[Y++]=16,bb[Y++]=Z-3,cb[16]++,W-=Z}for(a=o?bb.subarray(0,Y):bb.slice(0,Y),L=i(cb,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var db,eb,fb,gb,hb,ib,jb,kb,lb=[I,H],mb=[K,J];for(hb=lb[0],ib=lb[1],jb=mb[0],kb=mb[1],db=0,eb=D.length;eb>db;++db)if(fb=D[db],R.a(hb[fb],ib[fb],m),fb>256)R.a(D[++db],D[++db],m),gb=D[++db],R.a(jb[gb],kb[gb],m),R.a(D[++db],D[++db],m);else if(256===fb)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(){(function(){function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258); -break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),d("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),d("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}),a.ExcelBuilder=c("excel-builder")}(window); \ No newline at end of file +!function(a){var b,c,d;!function(a){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(b,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(a,d.concat([b,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(b){if(e(r,b)){var c=r[b];delete r[b],t[b]=!0,m.apply(a,c)}if(!e(q,b)&&!e(t,b))throw new Error("No "+b);return q[b]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(b,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||b,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;ne;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=y.keys(a),e=0,f=g.length;f>e;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};y.map=y.collect=function(a,b,c){var d=[];return null==a?d:n&&a.map===n?a.map(b,c):(z(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var A="Reduce of empty array with no initial value";y.reduce=y.foldl=y.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduce===o)return d&&(b=y.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(z(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(A);return c},y.reduceRight=y.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),p&&a.reduceRight===p)return d&&(b=y.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=y.keys(a);f=g.length}if(z(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(A);return c},y.find=y.detect=function(a,b,c){var d;return B(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},y.filter=y.select=function(a,b,c){var d=[];return null==a?d:q&&a.filter===q?a.filter(b,c):(z(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},y.reject=function(a,b,c){return y.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},y.every=y.all=function(a,b,d){b||(b=y.identity);var e=!0;return null==a?e:r&&a.every===r?a.every(b,d):(z(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var B=y.some=y.any=function(a,b,d){b||(b=y.identity);var e=!1;return null==a?e:s&&a.some===s?a.some(b,d):(z(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};y.contains=y.include=function(a,b){return null==a?!1:t&&a.indexOf===t?-1!=a.indexOf(b):B(a,function(a){return a===b})},y.invoke=function(a,b){var c=i.call(arguments,2),d=y.isFunction(b);return y.map(a,function(a){return(d?b:a[b]).apply(a,c)})},y.pluck=function(a,b){return y.map(a,y.property(b))},y.where=function(a,b){return y.filter(a,y.matches(b))},y.findWhere=function(a,b){return y.find(a,y.matches(b))},y.max=function(a,b,c){if(!b&&y.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-(1/0),e=-(1/0);return z(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},y.min=function(a,b,c){if(!b&&y.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return z(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;e>h&&(d=a,e=h)}),d},y.shuffle=function(a){var b,c=0,d=[];return z(a,function(a){b=y.random(c++),d[c-1]=d[b],d[b]=a}),d},y.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=y.values(a)),a[y.random(a.length-1)]):y.shuffle(a).slice(0,Math.max(0,b))};var C=function(a){return null==a?y.identity:y.isFunction(a)?a:y.property(a)};y.sortBy=function(a,b,c){return b=C(b),y.pluck(y.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var D=function(a){return function(b,c,d){var e={};return c=C(c),z(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};y.groupBy=D(function(a,b,c){y.has(a,b)?a[b].push(c):a[b]=[c]}),y.indexBy=D(function(a,b,c){a[b]=c}),y.countBy=D(function(a,b){y.has(a,b)?a[b]++:a[b]=1}),y.sortedIndex=function(a,b,c,d){c=C(c);for(var e=c.call(d,b),f=0,g=a.length;g>f;){var h=f+g>>>1;c.call(d,a[h])b?[]:i.call(a,0,b)},y.initial=function(a,b,c){return i.call(a,0,a.length-(null==b||c?1:b))},y.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:i.call(a,Math.max(a.length-b,0))},y.rest=y.tail=y.drop=function(a,b,c){return i.call(a,null==b||c?1:b)},y.compact=function(a){return y.filter(a,y.identity)};var E=function(a,b,c){return b&&y.every(a,y.isArray)?j.apply(c,a):(z(a,function(a){y.isArray(a)||y.isArguments(a)?b?h.apply(c,a):E(a,b,c):c.push(a)}),c)};y.flatten=function(a,b){return E(a,b,[])},y.without=function(a){return y.difference(a,i.call(arguments,1))},y.partition=function(a,b){var c=[],d=[];return z(a,function(a){(b(a)?c:d).push(a)}),[c,d]},y.uniq=y.unique=function(a,b,c,d){y.isFunction(b)&&(d=c,c=b,b=!1);var e=c?y.map(a,c,d):a,f=[],g=[];return z(e,function(c,d){(b?d&&g[g.length-1]===c:y.contains(g,c))||(g.push(c),f.push(a[d]))}),f},y.union=function(){return y.uniq(y.flatten(arguments,!0))},y.intersection=function(a){var b=i.call(arguments,1);return y.filter(y.uniq(a),function(a){return y.every(b,function(b){return y.contains(b,a)})})},y.difference=function(a){var b=j.apply(e,i.call(arguments,1));return y.filter(a,function(a){return!y.contains(b,a)})},y.zip=function(){for(var a=y.max(y.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;a>c;c++)b[c]=y.pluck(arguments,""+c);return b},y.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},y.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=y.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(t&&a.indexOf===t)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},y.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(u&&a.lastIndexOf===u)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},y.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var F=function(){};y.bind=function(a,b){var c,d;if(x&&a.bind===x)return x.apply(a,i.call(arguments,1));if(!y.isFunction(a))throw new TypeError;return c=i.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(i.call(arguments)));F.prototype=a.prototype;var e=new F;F.prototype=null;var f=a.apply(e,c.concat(i.call(arguments)));return Object(f)===f?f:e}},y.partial=function(a){var b=i.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===y&&(d[e]=arguments[c++]);for(;c=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||c.trailing===!1||(g=setTimeout(i,k)),f}},y.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=y.now()-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=y.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},y.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},y.wrap=function(a,b){return y.partial(b,a)},y.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},y.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},y.keys=function(a){if(!y.isObject(a))return[];if(w)return w(a);var b=[];for(var c in a)y.has(a,c)&&b.push(c);return b},y.values=function(a){for(var b=y.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},y.pairs=function(a){for(var b=y.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},y.invert=function(a){for(var b={},c=y.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},y.functions=y.methods=function(a){var b=[];for(var c in a)y.isFunction(a[c])&&b.push(c);return b.sort()},y.extend=function(a){return z(i.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},y.pick=function(a){var b={},c=j.apply(e,i.call(arguments,1));return z(c,function(c){c in a&&(b[c]=a[c])}),b},y.omit=function(a){var b={},c=j.apply(e,i.call(arguments,1));for(var d in a)y.contains(c,d)||(b[d]=a[d]);return b},y.defaults=function(a){return z(i.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},y.clone=function(a){return y.isObject(a)?y.isArray(a)?a.slice():y.extend({},a):a},y.tap=function(a,b){return b(a),a};var G=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof y&&(a=a._wrapped),b instanceof y&&(b=b._wrapped);var e=k.call(a);if(e!=k.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(y.isFunction(g)&&g instanceof g&&y.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,j=!0;if("[object Array]"==e){if(i=a.length,j=i==b.length)for(;i--&&(j=G(a[i],b[i],c,d)););}else{for(var l in a)if(y.has(a,l)&&(i++,!(j=y.has(b,l)&&G(a[l],b[l],c,d))))break;if(j){for(l in b)if(y.has(b,l)&&!i--)break;j=!i}}return c.pop(),d.pop(),j};y.isEqual=function(a,b){return G(a,b,[],[])},y.isEmpty=function(a){if(null==a)return!0;if(y.isArray(a)||y.isString(a))return 0===a.length;for(var b in a)if(y.has(a,b))return!1;return!0},y.isElement=function(a){return!(!a||1!==a.nodeType)},y.isArray=v||function(a){return"[object Array]"==k.call(a)},y.isObject=function(a){return a===Object(a)},z(["Arguments","Function","String","Number","Date","RegExp"],function(a){y["is"+a]=function(b){return k.call(b)=="[object "+a+"]"}}),y.isArguments(arguments)||(y.isArguments=function(a){return!(!a||!y.has(a,"callee"))}),"function"!=typeof/./&&(y.isFunction=function(a){return"function"==typeof a}),y.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},y.isNaN=function(a){return y.isNumber(a)&&a!=+a},y.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==k.call(a)},y.isNull=function(a){return null===a},y.isUndefined=function(a){return void 0===a},y.has=function(a,b){return l.call(a,b)},y.noConflict=function(){return a._=b,this},y.identity=function(a){return a},y.constant=function(a){return function(){return a}},y.property=function(a){return function(b){return b[a]}},y.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},y.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;a>e;e++)d[e]=b.call(c,e);return d},y.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},y.now=Date.now||function(){return(new Date).getTime()};var H={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};H.unescape=y.invert(H.escape);var I={escape:new RegExp("["+y.keys(H.escape).join("")+"]","g"),unescape:new RegExp("("+y.keys(H.unescape).join("|")+")","g")};y.each(["escape","unescape"],function(a){y[a]=function(b){return null==b?"":(""+b).replace(I[a],function(b){return H[a][b]})}}),y.result=function(a,b){if(null==a)return void 0;var c=a[b];return y.isFunction(c)?c.call(a):c},y.mixin=function(a){z(y.functions(a),function(b){var c=y[b]=a[b];y.prototype[b]=function(){var a=[this._wrapped];return h.apply(a,arguments),N.call(this,c.apply(y,a))}})};var J=0;y.uniqueId=function(a){var b=++J+"";return a?a+b:b},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,L={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},M=/\\|'|\r|\n|\t|\u2028|\u2029/g;y.template=function(a,b,c){var d;c=y.defaults({},c,y.templateSettings);var e=new RegExp([(c.escape||K).source,(c.interpolate||K).source,(c.evaluate||K).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(M,function(a){return"\\"+L[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,y);var i=function(a){return d.call(this,a,y)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},y.chain=function(a){return y(a).chain()};var N=function(a){return this._chain?y(a).chain():a};y.mixin(y),z(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=e[a];y.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],N.call(this,c)}}),z(["concat","join","slice"],function(a){var b=e[a];y.prototype[a]=function(){return N.call(this,b.apply(this._wrapped,arguments))}}),y.extend(y.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof d&&d.amd&&d("underscore",[],function(){return y})}.call(this),d("Excel/XMLDOM",["underscore"],function(a){"use strict";var b=function(a,b){this.documentElement=this.createElement(b),this.documentElement.setAttribute("xmlns",a)};return a.extend(b.prototype,{createElement:function(a){return new b.XMLNode({nodeName:a})},createTextNode:function(a){return new b.TextNode(a)},toString:function(){return this.documentElement.toString()}}),b.Node=function(){},b.Node.Create=function(a){switch(a.type){case"XML":return new b.XMLNode(a);case"TEXT":return new b.TextNode(a.nodeValue)}},b.TextNode=function(a){this.nodeValue=a},a.extend(b.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return a.escape(this.nodeValue)}}),b.XMLNode=function(a){if(this.nodeName=a.nodeName,this.children=[],this.nodeValue=a.nodeValue||"",this.attributes={},a.children)for(var c=0;c0&&(b+=" "+c.join(" "));for(var e="",f=0,g=this.children.length;g>f;f++)e+=this.children[f].toString();return b+=e?">"+e+"":"/>"},toJSON:function(){for(var a=[],b=0,c=this.children.length;c>b;b++)a.push(this.children[b].toJSON());return{nodeName:this.nodeName,children:a,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(a,b){return null===b?(delete this.attributes[a],void delete this[a]):(this.attributes[a]=b,void(this[a]=b))},setAttributeNS:function(a,b,c){this.setAttribute(b,c)},appendChild:function(a){this.children.push(a),this.firstChild=this.children[0]},cloneNode:function(){return new b.XMLNode(this.toJSON())}}),b}),d("Excel/util",["./XMLDOM"],function(a){"use strict";var b={_idSpaces:{},uniqueId:function(a){return this._idSpaces[a]||(this._idSpaces[a]=1),this._idSpaces[a]++},createXmlDoc:function(b,c){if("undefined"==typeof document)return new a(b||null,c,null);if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||null,c,null);if(window.ActiveXObject){var d=new window.ActiveXObject("Microsoft.XMLDOM"),e=d.createElement(c);return e.setAttribute("xmlns",b),d.appendChild(e),d}throw"No xml document generator"},createElement:function(a,b,c){var d=a.createElement(b),e=!d.setAttributeNS;c=c||[];for(var f=c.length;f--;)e||-1===c[f][0].indexOf("xmlns")?d.setAttribute(c[f][0],c[f][1]):d.setAttributeNS("http://www.w3.org/2000/xmlns/",c[f][0],c[f][1]);return d},LETTER_REFS:{},positionToLetterRef:function(a,b){var c,d=1,e=a,f="",g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[a])return this.LETTER_REFS[a].concat(b);for(;e>0;)e-=Math.pow(26,d-1),c=e%Math.pow(26,d),e-=c,c/=Math.pow(26,d-1),f=g.charAt(c)+f,d+=1;return this.LETTER_REFS[a]=f,f.concat(b)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","package":"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}};return b}),d("Excel/Paths",{}),d("Excel/RelationshipManager",["underscore","./util","./Paths"],function(a,b,c){"use strict";var d=function(){this.relations={},this.lastId=1};return a.uniqueId("rId"),a.extend(d.prototype,{importData:function(a){this.relations=a.relations,this.lastId=a.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(c,d){return this.relations[c.id]={id:a.uniqueId("rId"),schema:b.schemas[d]},this.relations[c.id].id},getRelationshipId:function(a){return this.relations[a.id]?this.relations[a.id].id:null},toXML:function(){var d=b.createXmlDoc(b.schemas.relationshipPackage,"Relationships"),e=d.documentElement;return a.each(this.relations,function(a,f){var g=b.createElement(d,"Relationship",[["Id",a.id],["Type",a.schema],["Target",c[f]]]);e.appendChild(g)}),d}}),d}),d("Excel/Drawings",["underscore","./RelationshipManager","./util"],function(a,b,c){"use strict";var d=function(){this.drawings=[],this.relations=new b,this.id=a.uniqueId("Drawings")};return a.extend(d.prototype,{addDrawing:function(a){this.drawings.push(a)},getCount:function(){return this.drawings.length},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetDrawing,"xdr:wsDr"),b=a.documentElement;b.setAttribute("xmlns:xdr",c.schemas.spreadsheetDrawing),b.setAttribute("xmlns:a",c.schemas.drawing);for(var d=0,e=this.drawings.length;e>d;d++){var f=this.relations.getRelationshipId(this.drawings[d].getMediaData());f||(f=this.relations.addRelation(this.drawings[d].getMediaData(),this.drawings[d].getMediaType())),this.drawings[d].setRelationshipId(f),b.appendChild(this.drawings[d].toXML(a))}return a}}),d}),d("Excel/Drawings/AbsoluteAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b){this.x=a,this.y=b},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:absoluteAnchor"),e=b.createElement(a,"xdr:pos");e.setAttribute("x",this.x),e.setAttribute("y",this.y),d.appendChild(e);var f=b.createElement(a,"xdr:ext");return f.setAttribute("cx",this.width),f.setAttribute("cy",this.height),d.appendChild(f),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/Chart",["underscore","../util"],function(a){"use strict";var b=function(){};return a.extend(b.prototype,{}),b}),d("Excel/Drawings/OneCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y,a.xOff,a.yOff),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b,c,d){this.x=a,this.y=b,void 0!==c&&(this.xOff=c),void 0!==d&&(this.yOff=d)},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:oneCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.xOff||0));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.yOff||0)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i),d.appendChild(e);var j=b.createElement(a,"xdr:ext");return j.setAttribute("cx",this.width),j.setAttribute("cy",this.height),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/TwoCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},a&&(this.setFrom(a.from.x,a.from.y,a.to.xOff,a.to.yOff),this.setTo(a.to.x,a.to.y,a.to.xOff,a.to.yOff))};return a.extend(c.prototype,{setFrom:function(a,b,c,d){this.from.x=a,this.from.y=b,void 0!==c&&(this.from.xOff=c),void 0!==d&&(this.from.yOff=c)},setTo:function(a,b,c,d){this.to.x=a,this.to.y=b,void 0!==c&&(this.to.xOff=c),void 0!==d&&(this.to.yOff=c)},toXML:function(a,c){var d=b.createElement(a,"xdr:twoCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.from.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.from.xOff));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.from.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.from.yOff)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i);var j=b.createElement(a,"xdr:to"),k=b.createElement(a,"xdr:col");k.appendChild(a.createTextNode(this.to.x));var l=b.createElement(a,"xdr:colOff");l.appendChild(a.createTextNode(this.from.xOff));var m=b.createElement(a,"xdr:row");m.appendChild(a.createTextNode(this.to.y));var n=b.createElement(a,"xdr:rowOff");return n.appendChild(a.createTextNode(this.from.yOff)),j.appendChild(k),j.appendChild(l),j.appendChild(m),j.appendChild(n),d.appendChild(e),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/Drawing",["underscore","./AbsoluteAnchor","./OneCellAnchor","./TwoCellAnchor"],function(a,b,c,d){"use strict";var e=function(){this.id=a.uniqueId("Drawing")};return a.extend(e.prototype,{createAnchor:function(a,e){switch(e=e||{},e.drawing=this,a){case"absoluteAnchor":this.anchor=new b(e);break;case"oneCellAnchor":this.anchor=new c(e);break;case"twoCellAnchor":this.anchor=new d(e)}return this.anchor}}),e}),d("Excel/Drawings/Picture",["./Drawing","underscore","../util"],function(a,b,c){"use strict";var d=function(){this.media=null,this.id=b.uniqueId("Picture"),this.pictureId=c.uniqueId("Picture"),this.fill={},this.mediaData=null};return d.prototype=new a,b.extend(d.prototype,{setMedia:function(a){this.mediaData=a},setDescription:function(a){this.description=a},setFillType:function(a){this.fill.type=a},setFillConfig:function(a){b.extend(this.fill,a)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(a){this.mediaData.rId=a},toXML:function(a){var b=c.createElement(a,"xdr:pic"),d=c.createElement(a,"xdr:nvPicPr"),e=c.createElement(a,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);d.appendChild(e);var f=c.createElement(a,"xdr:cNvPicPr");f.appendChild(c.createElement(a,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),d.appendChild(f),b.appendChild(d);var g=c.createElement(a,"xdr:blipFill");g.appendChild(c.createElement(a,"a:blip",[["xmlns:r",c.schemas.relationships],["r:embed",this.mediaData.rId]])),g.appendChild(c.createElement(a,"a:srcRect"));var h=c.createElement(a,"a:stretch");h.appendChild(c.createElement(a,"a:fillRect")),g.appendChild(h),b.appendChild(g);var i=c.createElement(a,"xdr:spPr",[["bwMode","auto"]]),j=c.createElement(a,"a:xfrm");i.appendChild(j);var k=c.createElement(a,"a:prstGeom",[["prst","rect"]]);return i.appendChild(k),b.appendChild(i),this.anchor.toXML(a,b)}}),d}),d("Excel/Positioning",[],function(){"use strict";return{pixelsToEMUs:function(a){return Math.round(914400*a/96)}}}),d("Excel/SharedStrings",["underscore","./util"],function(a,b){"use strict";var c=function(){this.strings={},this.stringArray=[],this.id=a.uniqueId("SharedStrings")};return a.extend(c.prototype,{addString:function(a){return this.strings[a]=this.stringArray.length,this.stringArray[this.stringArray.length]=a,this.strings[a]},exportData:function(){return this.strings},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"sst"),c=a.documentElement;this.stringArray.reverse();var d=this.stringArray.length;c.setAttribute("count",d),c.setAttribute("uniqueCount",d);var e=a.createElement("si"),f=a.createElement("t");f.appendChild(a.createTextNode("--placeholder--")),e.appendChild(f);for(var g=this.stringArray;d--;){var h=e.cloneNode(!0);h.firstChild.firstChild.nodeValue=g[d],c.appendChild(h)}return a}}),c}),d("Excel/StyleSheet",["underscore","./util"],function(a,b){"use strict";var c=function(){this.id=a.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};return a.extend(c.prototype,{createSimpleFormatter:function(a){var b=this.masterCellFormats.length,c={id:b};switch(a){case"date":c.numFmtId=14}return this.masterCellFormats.push(c),c},createFill:function(a){var b=this.fills.length,c=a;return c.id=b,this.fills.push(c),c},createNumberFormatter:function(a){var b=this.numberFormatters.length+100,c={id:b,formatCode:a};return this.numberFormatters.push(c),c},createFormat:function(b){var c=this.masterCellFormats.length,d={id:c};if(b.font&&a.isObject(b.font))d.fontId=this.createFontStyle(b.font).id;else if(b.font){if(a.isNaN(parseInt(b.font,10)))throw"Passing a non-numeric font id is not supported";d.fontId=b.font}if(b.format&&a.isString(b.format))d.numFmtId=this.createNumberFormatter(b.format).id;else if(b.format){if(a.isNaN(parseInt(b.format,10)))throw"Invalid number formatter id";d.numFmtId=b.format}if(b.border&&a.isObject(b.border))d.borderId=this.createBorderFormatter(b.border).id;else if(b.border){if(a.isNaN(parseInt(b.border,10)))throw"Passing a non-numeric border id is not supported";d.borderId=b.border}if(b.fill&&a.isObject(b.fill))d.fillId=this.createFill(b.fill).id;else if(b.fill){if(a.isNaN(parseInt(b.fill,10)))throw"Passing a non-numeric fill id is not supported";d.fillId=b.fill}return b.alignment&&a.isObject(b.alignment)&&(d.alignment=a.pick(b.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(d),d},createDifferentialStyle:function(b){var c=this.differentialStyles.length,d={id:c};return b.font&&a.isObject(b.font)&&(d.font=b.font),b.border&&a.isObject(b.border)&&(d.border=a.defaults(b.border,{ +top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?d.underline=b.underline:d.underline=!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]);return c.fillId&&d.setAttribute("applyFill","1"),c.fontId&&d.setAttribute("applyFont","1"),c.borderId&&d.setAttribute("applyBorder","1"),c.alignment&&d.setAttribute("applyAlignment","1"),c.numFmtId&&d.setAttribute("applyNumberFormat","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),d("Excel/Table",["underscore","./util"],function(a,b){"use strict";var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),d("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){"use strict";var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style?p.setAttribute("s",r.style):this._rowInstructions[d]&&void 0!==this._rowInstructions[d].style&&p.setAttribute("s",this._rowInstructions[d].style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(0!==i?h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]])):h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},setColumnFormats:function(a){this.columnFormats=a}}),d}),d("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){"use strict";var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){b instanceof i?a[c]=b.toString():a[c]=b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},d("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof d&&d.amd?d("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof c&&c;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,a,b,d,e)}return d[h].exports}for(var g="function"==typeof c&&c,h=0;h>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],2:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b,c){"use strict";function d(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./utils"),d.base64=a("./base64"),d.compressions=a("./compressions"),b.exports=d},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./zipEntries");b.exports=function(a,b){var c,f,g,h;for(b=b||{},b.base64&&(a=d.decode(a)),f=new e(a,b),c=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},s=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},w=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||u.call(this,a,null,{dir:!0}),this.files[a]},x=function(a,b){var c,d=new l;return a._data instanceof l?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=k.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c)))):(c=o(a),(!c||0===c.length||a.options.dir)&&(b=k.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},y=function(a,b,c,d){var e,f,g=(c.compressedContent,this.utf8encode(b.name)),i=g!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=r(1,1)+r(this.crc32(g),4)+g,k+="up"+r(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=r(e,2),m+=r(f,2),m+=r(c.crc32,4),m+=r(c.compressedSize,4),m+=r(c.uncompressedSize,4),m+=r(g.length,2),m+=r(k.length,2);var n=h.LOCAL_FILE_HEADER+m+g+k,o=h.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+r(d,4)+g+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},z=function(){this.data=[]};z.prototype={append:function(a){a=g.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var A=function(a){this.data=new Uint8Array(a),this.index=0};A.prototype={append:function(a){0!==a.length&&(a=g.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var B={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new q(d.name,d._data,s(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(g.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,u.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(g.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=w.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),f=255&(b^h),e=d[f],b=b>>>8^e;return-1^b},utf8encode:function(a){if(d){var b=d.encode(a);return g.transformTo("string",b)}if(f.nodebuffer)return g.transformTo("string",m(a,"utf-8"));for(var c=[],e=0,h=0;hi?c[e++]=String.fromCharCode(i):i>127&&2048>i?(c[e++]=String.fromCharCode(i>>6|192),c[e++]=String.fromCharCode(63&i|128)):(c[e++]=String.fromCharCode(i>>12|224),c[e++]=String.fromCharCode(i>>6&63|128),c[e++]=String.fromCharCode(63&i|128))}return c.join("")},utf8decode:function(a){var b=[],c=0,d=g.getTypeOf(a),h="string"!==d,i=0,j=0,k=0,l=0;if(e)return e.decode(g.transformTo("uint8array",a));if(f.nodebuffer)return g.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=B},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./utils"),i=a("./signature"),j=a("./zipEntry"),k=a("./support");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+h.pretty(b)+", expected "+h.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],19:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;else if(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var da,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);else if(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={ +NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),d("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a,b){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),d("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}),a.ExcelBuilder=c("excel-builder")}(window); \ No newline at end of file From 956664a32e6265be4991159c0c9f3b324bc6e68a Mon Sep 17 00:00:00 2001 From: olga_pulavska Date: Fri, 2 Oct 2015 17:48:09 +0300 Subject: [PATCH 4/4] Added ability to freeze pane. --- Excel/Worksheet.js | 41 +++++++++++++++++++++++++++++- dist/excel-builder.compiled.js | 41 +++++++++++++++++++++++++++++- dist/excel-builder.compiled.min.js | 6 ++--- dist/excel-builder.dist.js | 41 +++++++++++++++++++++++++++++- dist/excel-builder.dist.min.js | 6 ++--- 5 files changed, 126 insertions(+), 9 deletions(-) diff --git a/Excel/Worksheet.js b/Excel/Worksheet.js index 7f6eaaf..941f10f 100755 --- a/Excel/Worksheet.js +++ b/Excel/Worksheet.js @@ -20,6 +20,7 @@ define(['underscore', './util', './RelationshipManager'], function (_, util, Rel this._tables = []; this._drawings = []; this._rowInstructions = {}; + this._freezePane = {}; this.initialize(config); }; _.extend(Worksheet.prototype, { @@ -51,6 +52,7 @@ define(['underscore', './util', './RelationshipManager'], function (_, util, Rel _footers: this._footers, _tables: this._tables, _rowInstructions: this._rowInstructions, + _freezePane: this._freezePane, name: this.name, id: this.id }; @@ -361,7 +363,12 @@ define(['underscore', './util', './RelationshipManager'], function (_, util, Rel ['ref', util.positionToLetterRef(1, 1)] ])); } - + + //added freeze pane + if (this._freezePane.cell) { + worksheet.appendChild(this.exportPane(doc)); + } + if(this.columns.length) { worksheet.appendChild(this.exportColumns(doc)); } @@ -446,6 +453,28 @@ define(['underscore', './util', './RelationshipManager'], function (_, util, Rel return cols; }, + /** + * Added frozen pane + * @param {XML Node} doc + * @returns {XML Node} + */ + exportPane: function (doc) { + var sheetViews = doc.createElement('sheetViews'), + sheetView = doc.createElement('sheetView'), + pane = doc.createElement('pane'); + + sheetView.setAttribute('workbookViewId', 0); + pane.setAttribute('xSplit', this._freezePane.xSplit); + pane.setAttribute('ySplit', this._freezePane.ySplit); + pane.setAttribute('topLeftCell', this._freezePane.cell); + pane.setAttribute('activePane', 'bottomRight'); + pane.setAttribute('state', 'frozen'); + + sheetView.appendChild(pane); + sheetViews.appendChild(sheetView); + return sheetViews; + }, + /** * Sets the page settings on a worksheet node. * @@ -503,6 +532,16 @@ define(['underscore', './util', './RelationshipManager'], function (_, util, Rel this.mergedCells.push([cell1, cell2]); }, + /** + * Added froze pane + * @param column - column number: 0, 1, 2 ... + * @param row - row number: 0, 1, 2 ... + * @param cell - 'A1' + */ + freezePane: function(column, row, cell) { + this._freezePane = {xSplit: column, ySplit: row, cell: cell}; + }, + /** * Expects an array containing an object full of column format definitions. * http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column.aspx diff --git a/dist/excel-builder.compiled.js b/dist/excel-builder.compiled.js index 10d59c3..5d92b2f 100644 --- a/dist/excel-builder.compiled.js +++ b/dist/excel-builder.compiled.js @@ -2996,6 +2996,7 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func this._tables = []; this._drawings = []; this._rowInstructions = {}; + this._freezePane = {}; this.initialize(config); }; _.extend(Worksheet.prototype, { @@ -3027,6 +3028,7 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func _footers: this._footers, _tables: this._tables, _rowInstructions: this._rowInstructions, + _freezePane: this._freezePane, name: this.name, id: this.id }; @@ -3337,7 +3339,12 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func ['ref', util.positionToLetterRef(1, 1)] ])); } - + + //added freeze pane + if (this._freezePane.cell) { + worksheet.appendChild(this.exportPane(doc)); + } + if(this.columns.length) { worksheet.appendChild(this.exportColumns(doc)); } @@ -3422,6 +3429,28 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func return cols; }, + /** + * Added frozen pane + * @param {XML Node} doc + * @returns {XML Node} + */ + exportPane: function (doc) { + var sheetViews = doc.createElement('sheetViews'), + sheetView = doc.createElement('sheetView'), + pane = doc.createElement('pane'); + + sheetView.setAttribute('workbookViewId', 0); + pane.setAttribute('xSplit', this._freezePane.xSplit); + pane.setAttribute('ySplit', this._freezePane.ySplit); + pane.setAttribute('topLeftCell', this._freezePane.cell); + pane.setAttribute('activePane', 'bottomRight'); + pane.setAttribute('state', 'frozen'); + + sheetView.appendChild(pane); + sheetViews.appendChild(sheetView); + return sheetViews; + }, + /** * Sets the page settings on a worksheet node. * @@ -3479,6 +3508,16 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func this.mergedCells.push([cell1, cell2]); }, + /** + * Added froze pane + * @param column - column number: 0, 1, 2 ... + * @param row - row number: 0, 1, 2 ... + * @param cell - 'A1' + */ + freezePane: function(column, row, cell) { + this._freezePane = {xSplit: column, ySplit: row, cell: cell}; + }, + /** * Expects an array containing an object full of column format definitions. * http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column.aspx diff --git a/dist/excel-builder.compiled.min.js b/dist/excel-builder.compiled.min.js index 8aeacb0..057862a 100644 --- a/dist/excel-builder.compiled.min.js +++ b/dist/excel-builder.compiled.min.js @@ -1,4 +1,4 @@ (function(){var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.push,h=d.slice,i=d.concat,j=e.toString,k=e.hasOwnProperty,l=d.forEach,m=d.map,n=d.reduce,o=d.reduceRight,p=d.filter,q=d.every,r=d.some,s=d.indexOf,t=d.lastIndexOf,u=Array.isArray,v=Object.keys,w=f.bind,x=function(a){return a instanceof x?a:this instanceof x?void(this._wrapped=a):new x(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):a._=x,x.VERSION="1.6.0";var y=x.each=x.forEach=function(a,b,d){if(null==a)return a;if(l&&a.forEach===l)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;f>e;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=x.keys(a),e=0,f=g.length;f>e;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};x.map=x.collect=function(a,b,c){var d=[];return null==a?d:m&&a.map===m?a.map(b,c):(y(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var z="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),n&&a.reduce===n)return d&&(b=x.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(y(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(z);return c},x.reduceRight=x.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduceRight===o)return d&&(b=x.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=x.keys(a);f=g.length}if(y(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(z);return c},x.find=x.detect=function(a,b,c){var d;return A(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},x.filter=x.select=function(a,b,c){var d=[];return null==a?d:p&&a.filter===p?a.filter(b,c):(y(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},x.reject=function(a,b,c){return x.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},x.every=x.all=function(a,b,d){b||(b=x.identity);var e=!0;return null==a?e:q&&a.every===q?a.every(b,d):(y(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var A=x.some=x.any=function(a,b,d){b||(b=x.identity);var e=!1;return null==a?e:r&&a.some===r?a.some(b,d):(y(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};x.contains=x.include=function(a,b){return null==a?!1:s&&a.indexOf===s?-1!=a.indexOf(b):A(a,function(a){return a===b})},x.invoke=function(a,b){var c=h.call(arguments,2),d=x.isFunction(b);return x.map(a,function(a){return(d?b:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,x.property(b))},x.where=function(a,b){return x.filter(a,x.matches(b))},x.findWhere=function(a,b){return x.find(a,x.matches(b))},x.max=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-(1/0),e=-(1/0);return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},x.min=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return y(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;e>h&&(d=a,e=h)}),d},x.shuffle=function(a){var b,c=0,d=[];return y(a,function(a){b=x.random(c++),d[c-1]=d[b],d[b]=a}),d},x.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=x.values(a)),a[x.random(a.length-1)]):x.shuffle(a).slice(0,Math.max(0,b))};var B=function(a){return null==a?x.identity:x.isFunction(a)?a:x.property(a)};x.sortBy=function(a,b,c){return b=B(b),x.pluck(x.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var C=function(a){return function(b,c,d){var e={};return c=B(c),y(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};x.groupBy=C(function(a,b,c){x.has(a,b)?a[b].push(c):a[b]=[c]}),x.indexBy=C(function(a,b,c){a[b]=c}),x.countBy=C(function(a,b){x.has(a,b)?a[b]++:a[b]=1}),x.sortedIndex=function(a,b,c,d){c=B(c);for(var e=c.call(d,b),f=0,g=a.length;g>f;){var h=f+g>>>1;c.call(d,a[h])b?[]:h.call(a,0,b)},x.initial=function(a,b,c){return h.call(a,0,a.length-(null==b||c?1:b))},x.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:h.call(a,Math.max(a.length-b,0))},x.rest=x.tail=x.drop=function(a,b,c){return h.call(a,null==b||c?1:b)},x.compact=function(a){return x.filter(a,x.identity)};var D=function(a,b,c){return b&&x.every(a,x.isArray)?i.apply(c,a):(y(a,function(a){x.isArray(a)||x.isArguments(a)?b?g.apply(c,a):D(a,b,c):c.push(a)}),c)};x.flatten=function(a,b){return D(a,b,[])},x.without=function(a){return x.difference(a,h.call(arguments,1))},x.partition=function(a,b){var c=[],d=[];return y(a,function(a){(b(a)?c:d).push(a)}),[c,d]},x.uniq=x.unique=function(a,b,c,d){x.isFunction(b)&&(d=c,c=b,b=!1);var e=c?x.map(a,c,d):a,f=[],g=[];return y(e,function(c,d){(b?d&&g[g.length-1]===c:x.contains(g,c))||(g.push(c),f.push(a[d]))}),f},x.union=function(){return x.uniq(x.flatten(arguments,!0))},x.intersection=function(a){var b=h.call(arguments,1);return x.filter(x.uniq(a),function(a){return x.every(b,function(b){return x.contains(b,a)})})},x.difference=function(a){var b=i.apply(d,h.call(arguments,1));return x.filter(a,function(a){return!x.contains(b,a)})},x.zip=function(){for(var a=x.max(x.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;a>c;c++)b[c]=x.pluck(arguments,""+c);return b},x.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},x.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=x.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(s&&a.indexOf===s)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},x.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(t&&a.lastIndexOf===t)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},x.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var E=function(){};x.bind=function(a,b){var c,d;if(w&&a.bind===w)return w.apply(a,h.call(arguments,1));if(!x.isFunction(a))throw new TypeError;return c=h.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(h.call(arguments)));E.prototype=a.prototype;var e=new E;E.prototype=null;var f=a.apply(e,c.concat(h.call(arguments)));return Object(f)===f?f:e}},x.partial=function(a){var b=h.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===x&&(d[e]=arguments[c++]);for(;c=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||c.trailing===!1||(g=setTimeout(i,k)),f}},x.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=x.now()-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=x.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},x.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},x.wrap=function(a,b){return x.partial(b,a)},x.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},x.keys=function(a){if(!x.isObject(a))return[];if(v)return v(a);var b=[];for(var c in a)x.has(a,c)&&b.push(c);return b},x.values=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},x.pairs=function(a){for(var b=x.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},x.invert=function(a){for(var b={},c=x.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},x.functions=x.methods=function(a){var b=[];for(var c in a)x.isFunction(a[c])&&b.push(c);return b.sort()},x.extend=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},x.pick=function(a){var b={},c=i.apply(d,h.call(arguments,1));return y(c,function(c){c in a&&(b[c]=a[c])}),b},x.omit=function(a){var b={},c=i.apply(d,h.call(arguments,1));for(var e in a)x.contains(c,e)||(b[e]=a[e]);return b},x.defaults=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},x.clone=function(a){return x.isObject(a)?x.isArray(a)?a.slice():x.extend({},a):a},x.tap=function(a,b){return b(a),a};var F=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof x&&(a=a._wrapped),b instanceof x&&(b=b._wrapped);var e=j.call(a);if(e!=j.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(x.isFunction(g)&&g instanceof g&&x.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,k=!0;if("[object Array]"==e){if(i=a.length,k=i==b.length)for(;i--&&(k=F(a[i],b[i],c,d)););}else{for(var l in a)if(x.has(a,l)&&(i++,!(k=x.has(b,l)&&F(a[l],b[l],c,d))))break;if(k){for(l in b)if(x.has(b,l)&&!i--)break;k=!i}}return c.pop(),d.pop(),k};x.isEqual=function(a,b){return F(a,b,[],[])},x.isEmpty=function(a){if(null==a)return!0;if(x.isArray(a)||x.isString(a))return 0===a.length;for(var b in a)if(x.has(a,b))return!1;return!0},x.isElement=function(a){return!(!a||1!==a.nodeType)},x.isArray=u||function(a){return"[object Array]"==j.call(a)},x.isObject=function(a){return a===Object(a)},y(["Arguments","Function","String","Number","Date","RegExp"],function(a){x["is"+a]=function(b){return j.call(b)=="[object "+a+"]"}}),x.isArguments(arguments)||(x.isArguments=function(a){return!(!a||!x.has(a,"callee"))}),"function"!=typeof/./&&(x.isFunction=function(a){return"function"==typeof a}),x.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},x.isNaN=function(a){return x.isNumber(a)&&a!=+a},x.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==j.call(a)},x.isNull=function(a){return null===a},x.isUndefined=function(a){return void 0===a},x.has=function(a,b){return k.call(a,b)},x.noConflict=function(){return a._=b,this},x.identity=function(a){return a},x.constant=function(a){return function(){return a}},x.property=function(a){return function(b){return b[a]}},x.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},x.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;a>e;e++)d[e]=b.call(c,e);return d},x.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},x.now=Date.now||function(){return(new Date).getTime()};var G={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};G.unescape=x.invert(G.escape);var H={escape:new RegExp("["+x.keys(G.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(G.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(a){x[a]=function(b){return null==b?"":(""+b).replace(H[a],function(b){return G[a][b]})}}),x.result=function(a,b){if(null==a)return void 0;var c=a[b];return x.isFunction(c)?c.call(a):c},x.mixin=function(a){y(x.functions(a),function(b){var c=x[b]=a[b];x.prototype[b]=function(){var a=[this._wrapped];return g.apply(a,arguments),M.call(this,c.apply(x,a))}})};var I=0;x.uniqueId=function(a){var b=++I+"";return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,K={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(a,b,c){var d;c=x.defaults({},c,x.templateSettings);var e=new RegExp([(c.escape||J).source,(c.interpolate||J).source,(c.evaluate||J).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(L,function(a){return"\\"+K[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,x);var i=function(a){return d.call(this,a,x)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},x.chain=function(a){return x(a).chain()};var M=function(a){return this._chain?x(a).chain():a};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];x.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],M.call(this,c)}}),y(["concat","join","slice"],function(a){var b=d[a];x.prototype[a]=function(){return M.call(this,b.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return x})}).call(this),define("Excel/XMLDOM",["underscore"],function(a){"use strict";var b=function(a,b){this.documentElement=this.createElement(b),this.documentElement.setAttribute("xmlns",a)};return a.extend(b.prototype,{createElement:function(a){return new b.XMLNode({nodeName:a})},createTextNode:function(a){return new b.TextNode(a)},toString:function(){return this.documentElement.toString()}}),b.Node=function(){},b.Node.Create=function(a){switch(a.type){case"XML":return new b.XMLNode(a);case"TEXT":return new b.TextNode(a.nodeValue)}},b.TextNode=function(a){this.nodeValue=a},a.extend(b.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return a.escape(this.nodeValue)}}),b.XMLNode=function(a){if(this.nodeName=a.nodeName,this.children=[],this.nodeValue=a.nodeValue||"",this.attributes={},a.children)for(var c=0;c0&&(b+=" "+c.join(" "));for(var e="",f=0,g=this.children.length;g>f;f++)e+=this.children[f].toString();return b+=e?">"+e+"":"/>"},toJSON:function(){for(var a=[],b=0,c=this.children.length;c>b;b++)a.push(this.children[b].toJSON());return{nodeName:this.nodeName,children:a,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(a,b){return null===b?(delete this.attributes[a],void delete this[a]):(this.attributes[a]=b,void(this[a]=b))},setAttributeNS:function(a,b,c){this.setAttribute(b,c)},appendChild:function(a){this.children.push(a),this.firstChild=this.children[0]},cloneNode:function(){return new b.XMLNode(this.toJSON())}}),b}),define("Excel/util",["./XMLDOM"],function(a){"use strict";var b={_idSpaces:{},uniqueId:function(a){return this._idSpaces[a]||(this._idSpaces[a]=1),this._idSpaces[a]++},createXmlDoc:function(b,c){if("undefined"==typeof document)return new a(b||null,c,null);if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||null,c,null);if(window.ActiveXObject){var d=new window.ActiveXObject("Microsoft.XMLDOM"),e=d.createElement(c);return e.setAttribute("xmlns",b),d.appendChild(e),d}throw"No xml document generator"},createElement:function(a,b,c){var d=a.createElement(b),e=!d.setAttributeNS;c=c||[];for(var f=c.length;f--;)e||-1===c[f][0].indexOf("xmlns")?d.setAttribute(c[f][0],c[f][1]):d.setAttributeNS("http://www.w3.org/2000/xmlns/",c[f][0],c[f][1]);return d},LETTER_REFS:{},positionToLetterRef:function(a,b){var c,d=1,e=a,f="",g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[a])return this.LETTER_REFS[a].concat(b);for(;e>0;)e-=Math.pow(26,d-1),c=e%Math.pow(26,d),e-=c,c/=Math.pow(26,d-1),f=g.charAt(c)+f,d+=1;return this.LETTER_REFS[a]=f,f.concat(b)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","package":"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}};return b}),define("Excel/Paths",{}),define("Excel/RelationshipManager",["underscore","./util","./Paths"],function(a,b,c){"use strict";var d=function(){this.relations={},this.lastId=1};return a.uniqueId("rId"),a.extend(d.prototype,{importData:function(a){this.relations=a.relations,this.lastId=a.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(c,d){return this.relations[c.id]={id:a.uniqueId("rId"),schema:b.schemas[d]},this.relations[c.id].id},getRelationshipId:function(a){return this.relations[a.id]?this.relations[a.id].id:null},toXML:function(){var d=b.createXmlDoc(b.schemas.relationshipPackage,"Relationships"),e=d.documentElement;return a.each(this.relations,function(a,f){var g=b.createElement(d,"Relationship",[["Id",a.id],["Type",a.schema],["Target",c[f]]]);e.appendChild(g)}),d}}),d}),define("Excel/Drawings",["underscore","./RelationshipManager","./util"],function(a,b,c){"use strict";var d=function(){this.drawings=[],this.relations=new b,this.id=a.uniqueId("Drawings")};return a.extend(d.prototype,{addDrawing:function(a){this.drawings.push(a)},getCount:function(){return this.drawings.length},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetDrawing,"xdr:wsDr"),b=a.documentElement;b.setAttribute("xmlns:xdr",c.schemas.spreadsheetDrawing),b.setAttribute("xmlns:a",c.schemas.drawing);for(var d=0,e=this.drawings.length;e>d;d++){var f=this.relations.getRelationshipId(this.drawings[d].getMediaData());f||(f=this.relations.addRelation(this.drawings[d].getMediaData(),this.drawings[d].getMediaType())),this.drawings[d].setRelationshipId(f),b.appendChild(this.drawings[d].toXML(a))}return a}}),d}),define("Excel/Drawings/AbsoluteAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b){this.x=a,this.y=b},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:absoluteAnchor"),e=b.createElement(a,"xdr:pos");e.setAttribute("x",this.x),e.setAttribute("y",this.y),d.appendChild(e);var f=b.createElement(a,"xdr:ext");return f.setAttribute("cx",this.width),f.setAttribute("cy",this.height),d.appendChild(f),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/Chart",["underscore","../util"],function(a){"use strict";var b=function(){};return a.extend(b.prototype,{}),b}),define("Excel/Drawings/OneCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y,a.xOff,a.yOff),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b,c,d){this.x=a,this.y=b,void 0!==c&&(this.xOff=c),void 0!==d&&(this.yOff=d)},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:oneCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.xOff||0));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.yOff||0)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i),d.appendChild(e);var j=b.createElement(a,"xdr:ext");return j.setAttribute("cx",this.width),j.setAttribute("cy",this.height),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/TwoCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},a&&(this.setFrom(a.from.x,a.from.y,a.to.xOff,a.to.yOff),this.setTo(a.to.x,a.to.y,a.to.xOff,a.to.yOff))};return a.extend(c.prototype,{setFrom:function(a,b,c,d){this.from.x=a,this.from.y=b,void 0!==c&&(this.from.xOff=c),void 0!==d&&(this.from.yOff=c)},setTo:function(a,b,c,d){this.to.x=a,this.to.y=b,void 0!==c&&(this.to.xOff=c),void 0!==d&&(this.to.yOff=c)},toXML:function(a,c){var d=b.createElement(a,"xdr:twoCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.from.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.from.xOff));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.from.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.from.yOff)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i);var j=b.createElement(a,"xdr:to"),k=b.createElement(a,"xdr:col");k.appendChild(a.createTextNode(this.to.x));var l=b.createElement(a,"xdr:colOff");l.appendChild(a.createTextNode(this.from.xOff));var m=b.createElement(a,"xdr:row");m.appendChild(a.createTextNode(this.to.y));var n=b.createElement(a,"xdr:rowOff");return n.appendChild(a.createTextNode(this.from.yOff)),j.appendChild(k),j.appendChild(l),j.appendChild(m),j.appendChild(n),d.appendChild(e),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),define("Excel/Drawings/Drawing",["underscore","./AbsoluteAnchor","./OneCellAnchor","./TwoCellAnchor"],function(a,b,c,d){"use strict";var e=function(){this.id=a.uniqueId("Drawing")};return a.extend(e.prototype,{createAnchor:function(a,e){switch(e=e||{},e.drawing=this,a){case"absoluteAnchor":this.anchor=new b(e);break;case"oneCellAnchor":this.anchor=new c(e);break;case"twoCellAnchor":this.anchor=new d(e)}return this.anchor}}),e}),define("Excel/Drawings/Picture",["./Drawing","underscore","../util"],function(a,b,c){"use strict";var d=function(){this.media=null,this.id=b.uniqueId("Picture"),this.pictureId=c.uniqueId("Picture"),this.fill={},this.mediaData=null};return d.prototype=new a,b.extend(d.prototype,{setMedia:function(a){this.mediaData=a},setDescription:function(a){this.description=a},setFillType:function(a){this.fill.type=a},setFillConfig:function(a){b.extend(this.fill,a)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(a){this.mediaData.rId=a},toXML:function(a){var b=c.createElement(a,"xdr:pic"),d=c.createElement(a,"xdr:nvPicPr"),e=c.createElement(a,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);d.appendChild(e);var f=c.createElement(a,"xdr:cNvPicPr");f.appendChild(c.createElement(a,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),d.appendChild(f),b.appendChild(d);var g=c.createElement(a,"xdr:blipFill");g.appendChild(c.createElement(a,"a:blip",[["xmlns:r",c.schemas.relationships],["r:embed",this.mediaData.rId]])),g.appendChild(c.createElement(a,"a:srcRect"));var h=c.createElement(a,"a:stretch");h.appendChild(c.createElement(a,"a:fillRect")),g.appendChild(h),b.appendChild(g);var i=c.createElement(a,"xdr:spPr",[["bwMode","auto"]]),j=c.createElement(a,"a:xfrm");i.appendChild(j);var k=c.createElement(a,"a:prstGeom",[["prst","rect"]]);return i.appendChild(k),b.appendChild(i),this.anchor.toXML(a,b)}}),d}),define("Excel/Positioning",[],function(){"use strict";return{pixelsToEMUs:function(a){return Math.round(914400*a/96)}}}),define("Excel/SharedStrings",["underscore","./util"],function(a,b){"use strict";var c=function(){this.strings={},this.stringArray=[],this.id=a.uniqueId("SharedStrings")};return a.extend(c.prototype,{addString:function(a){return this.strings[a]=this.stringArray.length,this.stringArray[this.stringArray.length]=a,this.strings[a]},exportData:function(){return this.strings},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"sst"),c=a.documentElement;this.stringArray.reverse();var d=this.stringArray.length;c.setAttribute("count",d),c.setAttribute("uniqueCount",d);var e=a.createElement("si"),f=a.createElement("t");f.appendChild(a.createTextNode("--placeholder--")),e.appendChild(f);for(var g=this.stringArray;d--;){var h=e.cloneNode(!0);h.firstChild.firstChild.nodeValue=g[d],c.appendChild(h)}return a}}),c}),define("Excel/StyleSheet",["underscore","./util"],function(a,b){"use strict";var c=function(){this.id=a.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};return a.extend(c.prototype,{createSimpleFormatter:function(a){var b=this.masterCellFormats.length,c={id:b};switch(a){case"date":c.numFmtId=14}return this.masterCellFormats.push(c),c},createFill:function(a){var b=this.fills.length,c=a;return c.id=b,this.fills.push(c),c},createNumberFormatter:function(a){var b=this.numberFormatters.length+100,c={id:b,formatCode:a};return this.numberFormatters.push(c),c},createFormat:function(b){var c=this.masterCellFormats.length,d={id:c};if(b.font&&a.isObject(b.font))d.fontId=this.createFontStyle(b.font).id;else if(b.font){if(a.isNaN(parseInt(b.font,10)))throw"Passing a non-numeric font id is not supported";d.fontId=b.font}if(b.format&&a.isString(b.format))d.numFmtId=this.createNumberFormatter(b.format).id;else if(b.format){if(a.isNaN(parseInt(b.format,10)))throw"Invalid number formatter id";d.numFmtId=b.format}if(b.border&&a.isObject(b.border))d.borderId=this.createBorderFormatter(b.border).id;else if(b.border){if(a.isNaN(parseInt(b.border,10)))throw"Passing a non-numeric border id is not supported";d.borderId=b.border}if(b.fill&&a.isObject(b.fill))d.fillId=this.createFill(b.fill).id;else if(b.fill){if(a.isNaN(parseInt(b.fill,10)))throw"Passing a non-numeric fill id is not supported";d.fillId=b.fill}return b.alignment&&a.isObject(b.alignment)&&(d.alignment=a.pick(b.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(d),d},createDifferentialStyle:function(b){var c=this.differentialStyles.length,d={id:c};return b.font&&a.isObject(b.font)&&(d.font=b.font),b.border&&a.isObject(b.border)&&(d.border=a.defaults(b.border,{top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?d.underline=b.underline:d.underline=!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]); -return c.fillId&&d.setAttribute("applyFill","1"),c.fontId&&d.setAttribute("applyFont","1"),c.borderId&&d.setAttribute("applyBorder","1"),c.alignment&&d.setAttribute("applyAlignment","1"),c.numFmtId&&d.setAttribute("applyNumberFormat","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),define("Excel/Table",["underscore","./util"],function(a,b){"use strict";var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),define("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){"use strict";var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style?p.setAttribute("s",r.style):this._rowInstructions[d]&&void 0!==this._rowInstructions[d].style&&p.setAttribute("s",this._rowInstructions[d].style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(0!==i?h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]])):h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},setColumnFormats:function(a){this.columnFormats=a}}),d}),define("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){"use strict";var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){b instanceof i?a[c]=b.toString():a[c]=b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},define("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],2:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b,c){"use strict";function d(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./utils"),d.base64=a("./base64"),d.compressions=a("./compressions"),b.exports=d},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./zipEntries");b.exports=function(a,b){var c,f,g,h;for(b=b||{},b.base64&&(a=d.decode(a)),f=new e(a,b),c=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},s=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},w=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||u.call(this,a,null,{dir:!0}),this.files[a]},x=function(a,b){var c,d=new l;return a._data instanceof l?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=k.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c)))):(c=o(a),(!c||0===c.length||a.options.dir)&&(b=k.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},y=function(a,b,c,d){var e,f,g=(c.compressedContent,this.utf8encode(b.name)),i=g!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=r(1,1)+r(this.crc32(g),4)+g,k+="up"+r(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=r(e,2),m+=r(f,2),m+=r(c.crc32,4),m+=r(c.compressedSize,4),m+=r(c.uncompressedSize,4),m+=r(g.length,2),m+=r(k.length,2);var n=h.LOCAL_FILE_HEADER+m+g+k,o=h.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+r(d,4)+g+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},z=function(){this.data=[]};z.prototype={append:function(a){a=g.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var A=function(a){this.data=new Uint8Array(a),this.index=0};A.prototype={append:function(a){0!==a.length&&(a=g.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var B={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new q(d.name,d._data,s(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(g.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,u.call(this,a,b,c),this},folder:function(a){ -if(!a)return this;if(g.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=w.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),f=255&(b^h),e=d[f],b=b>>>8^e;return-1^b},utf8encode:function(a){if(d){var b=d.encode(a);return g.transformTo("string",b)}if(f.nodebuffer)return g.transformTo("string",m(a,"utf-8"));for(var c=[],e=0,h=0;hi?c[e++]=String.fromCharCode(i):i>127&&2048>i?(c[e++]=String.fromCharCode(i>>6|192),c[e++]=String.fromCharCode(63&i|128)):(c[e++]=String.fromCharCode(i>>12|224),c[e++]=String.fromCharCode(i>>6&63|128),c[e++]=String.fromCharCode(63&i|128))}return c.join("")},utf8decode:function(a){var b=[],c=0,d=g.getTypeOf(a),h="string"!==d,i=0,j=0,k=0,l=0;if(e)return e.decode(g.transformTo("uint8array",a));if(f.nodebuffer)return g.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=B},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./utils"),i=a("./signature"),j=a("./zipEntry"),k=a("./support");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+h.pretty(b)+", expected "+h.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],19:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;else if(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var da,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);else if(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify"); -if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),define("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a,b){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),define("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}); \ No newline at end of file +return c.fillId&&d.setAttribute("applyFill","1"),c.fontId&&d.setAttribute("applyFont","1"),c.borderId&&d.setAttribute("applyBorder","1"),c.alignment&&d.setAttribute("applyAlignment","1"),c.numFmtId&&d.setAttribute("applyNumberFormat","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),define("Excel/Table",["underscore","./util"],function(a,b){"use strict";var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),define("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){"use strict";var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this._freezePane={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,_freezePane:this._freezePane,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style?p.setAttribute("s",r.style):this._rowInstructions[d]&&void 0!==this._rowInstructions[d].style&&p.setAttribute("s",this._rowInstructions[d].style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(0!==i?h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]])):h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this._freezePane.cell&&h.appendChild(this.exportPane(g)),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPane:function(a){var b=a.createElement("sheetViews"),c=a.createElement("sheetView"),d=a.createElement("pane");return c.setAttribute("workbookViewId",0),d.setAttribute("xSplit",this._freezePane.xSplit),d.setAttribute("ySplit",this._freezePane.ySplit),d.setAttribute("topLeftCell",this._freezePane.cell),d.setAttribute("activePane","bottomRight"),d.setAttribute("state","frozen"),c.appendChild(d),b.appendChild(c),b},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},freezePane:function(a,b,c){this._freezePane={xSplit:a,ySplit:b,cell:c}},setColumnFormats:function(a){this.columnFormats=a}}),d}),define("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){"use strict";var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){b instanceof i?a[c]=b.toString():a[c]=b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},define("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],2:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b,c){"use strict";function d(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./utils"),d.base64=a("./base64"),d.compressions=a("./compressions"),b.exports=d},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./zipEntries");b.exports=function(a,b){var c,f,g,h;for(b=b||{},b.base64&&(a=d.decode(a)),f=new e(a,b),c=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},s=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},w=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||u.call(this,a,null,{dir:!0}),this.files[a]},x=function(a,b){var c,d=new l;return a._data instanceof l?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=k.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c)))):(c=o(a),(!c||0===c.length||a.options.dir)&&(b=k.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},y=function(a,b,c,d){var e,f,g=(c.compressedContent,this.utf8encode(b.name)),i=g!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=r(1,1)+r(this.crc32(g),4)+g,k+="up"+r(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=r(e,2),m+=r(f,2),m+=r(c.crc32,4),m+=r(c.compressedSize,4),m+=r(c.uncompressedSize,4),m+=r(g.length,2),m+=r(k.length,2);var n=h.LOCAL_FILE_HEADER+m+g+k,o=h.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+r(d,4)+g+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},z=function(){this.data=[]};z.prototype={append:function(a){a=g.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var A=function(a){this.data=new Uint8Array(a),this.index=0};A.prototype={append:function(a){0!==a.length&&(a=g.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var B={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?"); +},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new q(d.name,d._data,s(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(g.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,u.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(g.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=w.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),f=255&(b^h),e=d[f],b=b>>>8^e;return-1^b},utf8encode:function(a){if(d){var b=d.encode(a);return g.transformTo("string",b)}if(f.nodebuffer)return g.transformTo("string",m(a,"utf-8"));for(var c=[],e=0,h=0;hi?c[e++]=String.fromCharCode(i):i>127&&2048>i?(c[e++]=String.fromCharCode(i>>6|192),c[e++]=String.fromCharCode(63&i|128)):(c[e++]=String.fromCharCode(i>>12|224),c[e++]=String.fromCharCode(i>>6&63|128),c[e++]=String.fromCharCode(63&i|128))}return c.join("")},utf8decode:function(a){var b=[],c=0,d=g.getTypeOf(a),h="string"!==d,i=0,j=0,k=0,l=0;if(e)return e.decode(g.transformTo("uint8array",a));if(f.nodebuffer)return g.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=B},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./utils"),i=a("./signature"),j=a("./zipEntry"),k=a("./support");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+h.pretty(b)+", expected "+h.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],19:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;else if(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var da,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);else if(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1; +c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),define("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a,b){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),define("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}); \ No newline at end of file diff --git a/dist/excel-builder.dist.js b/dist/excel-builder.dist.js index 4e9260f..fc65032 100644 --- a/dist/excel-builder.dist.js +++ b/dist/excel-builder.dist.js @@ -3428,6 +3428,7 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func this._tables = []; this._drawings = []; this._rowInstructions = {}; + this._freezePane = {}; this.initialize(config); }; _.extend(Worksheet.prototype, { @@ -3459,6 +3460,7 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func _footers: this._footers, _tables: this._tables, _rowInstructions: this._rowInstructions, + _freezePane: this._freezePane, name: this.name, id: this.id }; @@ -3769,7 +3771,12 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func ['ref', util.positionToLetterRef(1, 1)] ])); } - + + //added freeze pane + if (this._freezePane.cell) { + worksheet.appendChild(this.exportPane(doc)); + } + if(this.columns.length) { worksheet.appendChild(this.exportColumns(doc)); } @@ -3854,6 +3861,28 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func return cols; }, + /** + * Added frozen pane + * @param {XML Node} doc + * @returns {XML Node} + */ + exportPane: function (doc) { + var sheetViews = doc.createElement('sheetViews'), + sheetView = doc.createElement('sheetView'), + pane = doc.createElement('pane'); + + sheetView.setAttribute('workbookViewId', 0); + pane.setAttribute('xSplit', this._freezePane.xSplit); + pane.setAttribute('ySplit', this._freezePane.ySplit); + pane.setAttribute('topLeftCell', this._freezePane.cell); + pane.setAttribute('activePane', 'bottomRight'); + pane.setAttribute('state', 'frozen'); + + sheetView.appendChild(pane); + sheetViews.appendChild(sheetView); + return sheetViews; + }, + /** * Sets the page settings on a worksheet node. * @@ -3911,6 +3940,16 @@ define('Excel/Worksheet',['underscore', './util', './RelationshipManager'], func this.mergedCells.push([cell1, cell2]); }, + /** + * Added froze pane + * @param column - column number: 0, 1, 2 ... + * @param row - row number: 0, 1, 2 ... + * @param cell - 'A1' + */ + freezePane: function(column, row, cell) { + this._freezePane = {xSplit: column, ySplit: row, cell: cell}; + }, + /** * Expects an array containing an object full of column format definitions. * http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.column.aspx diff --git a/dist/excel-builder.dist.min.js b/dist/excel-builder.dist.min.js index a56ee40..37900fa 100644 --- a/dist/excel-builder.dist.min.js +++ b/dist/excel-builder.dist.min.js @@ -1,4 +1,4 @@ !function(a){var b,c,d;!function(a){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(b,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(a,d.concat([b,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(b){if(e(r,b)){var c=r[b];delete r[b],t[b]=!0,m.apply(a,c)}if(!e(q,b)&&!e(t,b))throw new Error("No "+b);return q[b]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(b,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||b,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;ne;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g=y.keys(a),e=0,f=g.length;f>e;e++)if(b.call(d,a[g[e]],g[e],a)===c)return;return a};y.map=y.collect=function(a,b,c){var d=[];return null==a?d:n&&a.map===n?a.map(b,c):(z(a,function(a,e,f){d.push(b.call(c,a,e,f))}),d)};var A="Reduce of empty array with no initial value";y.reduce=y.foldl=y.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduce===o)return d&&(b=y.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(z(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(A);return c},y.reduceRight=y.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),p&&a.reduceRight===p)return d&&(b=y.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=y.keys(a);f=g.length}if(z(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(A);return c},y.find=y.detect=function(a,b,c){var d;return B(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},y.filter=y.select=function(a,b,c){var d=[];return null==a?d:q&&a.filter===q?a.filter(b,c):(z(a,function(a,e,f){b.call(c,a,e,f)&&d.push(a)}),d)},y.reject=function(a,b,c){return y.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},y.every=y.all=function(a,b,d){b||(b=y.identity);var e=!0;return null==a?e:r&&a.every===r?a.every(b,d):(z(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var B=y.some=y.any=function(a,b,d){b||(b=y.identity);var e=!1;return null==a?e:s&&a.some===s?a.some(b,d):(z(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};y.contains=y.include=function(a,b){return null==a?!1:t&&a.indexOf===t?-1!=a.indexOf(b):B(a,function(a){return a===b})},y.invoke=function(a,b){var c=i.call(arguments,2),d=y.isFunction(b);return y.map(a,function(a){return(d?b:a[b]).apply(a,c)})},y.pluck=function(a,b){return y.map(a,y.property(b))},y.where=function(a,b){return y.filter(a,y.matches(b))},y.findWhere=function(a,b){return y.find(a,y.matches(b))},y.max=function(a,b,c){if(!b&&y.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.max.apply(Math,a);var d=-(1/0),e=-(1/0);return z(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;h>e&&(d=a,e=h)}),d},y.min=function(a,b,c){if(!b&&y.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);var d=1/0,e=1/0;return z(a,function(a,f,g){var h=b?b.call(c,a,f,g):a;e>h&&(d=a,e=h)}),d},y.shuffle=function(a){var b,c=0,d=[];return z(a,function(a){b=y.random(c++),d[c-1]=d[b],d[b]=a}),d},y.sample=function(a,b,c){return null==b||c?(a.length!==+a.length&&(a=y.values(a)),a[y.random(a.length-1)]):y.shuffle(a).slice(0,Math.max(0,b))};var C=function(a){return null==a?y.identity:y.isFunction(a)?a:y.property(a)};y.sortBy=function(a,b,c){return b=C(b),y.pluck(y.map(a,function(a,d,e){return{value:a,index:d,criteria:b.call(c,a,d,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.index-b.index}),"value")};var D=function(a){return function(b,c,d){var e={};return c=C(c),z(b,function(f,g){var h=c.call(d,f,g,b);a(e,h,f)}),e}};y.groupBy=D(function(a,b,c){y.has(a,b)?a[b].push(c):a[b]=[c]}),y.indexBy=D(function(a,b,c){a[b]=c}),y.countBy=D(function(a,b){y.has(a,b)?a[b]++:a[b]=1}),y.sortedIndex=function(a,b,c,d){c=C(c);for(var e=c.call(d,b),f=0,g=a.length;g>f;){var h=f+g>>>1;c.call(d,a[h])b?[]:i.call(a,0,b)},y.initial=function(a,b,c){return i.call(a,0,a.length-(null==b||c?1:b))},y.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:i.call(a,Math.max(a.length-b,0))},y.rest=y.tail=y.drop=function(a,b,c){return i.call(a,null==b||c?1:b)},y.compact=function(a){return y.filter(a,y.identity)};var E=function(a,b,c){return b&&y.every(a,y.isArray)?j.apply(c,a):(z(a,function(a){y.isArray(a)||y.isArguments(a)?b?h.apply(c,a):E(a,b,c):c.push(a)}),c)};y.flatten=function(a,b){return E(a,b,[])},y.without=function(a){return y.difference(a,i.call(arguments,1))},y.partition=function(a,b){var c=[],d=[];return z(a,function(a){(b(a)?c:d).push(a)}),[c,d]},y.uniq=y.unique=function(a,b,c,d){y.isFunction(b)&&(d=c,c=b,b=!1);var e=c?y.map(a,c,d):a,f=[],g=[];return z(e,function(c,d){(b?d&&g[g.length-1]===c:y.contains(g,c))||(g.push(c),f.push(a[d]))}),f},y.union=function(){return y.uniq(y.flatten(arguments,!0))},y.intersection=function(a){var b=i.call(arguments,1);return y.filter(y.uniq(a),function(a){return y.every(b,function(b){return y.contains(b,a)})})},y.difference=function(a){var b=j.apply(e,i.call(arguments,1));return y.filter(a,function(a){return!y.contains(b,a)})},y.zip=function(){for(var a=y.max(y.pluck(arguments,"length").concat(0)),b=new Array(a),c=0;a>c;c++)b[c]=y.pluck(arguments,""+c);return b},y.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},y.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=y.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(t&&a.indexOf===t)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},y.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(u&&a.lastIndexOf===u)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},y.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=new Array(d);d>e;)f[e++]=a,a+=c;return f};var F=function(){};y.bind=function(a,b){var c,d;if(x&&a.bind===x)return x.apply(a,i.call(arguments,1));if(!y.isFunction(a))throw new TypeError;return c=i.call(arguments,2),d=function(){if(!(this instanceof d))return a.apply(b,c.concat(i.call(arguments)));F.prototype=a.prototype;var e=new F;F.prototype=null;var f=a.apply(e,c.concat(i.call(arguments)));return Object(f)===f?f:e}},y.partial=function(a){var b=i.call(arguments,1);return function(){for(var c=0,d=b.slice(),e=0,f=d.length;f>e;e++)d[e]===y&&(d[e]=arguments[c++]);for(;c=k?(clearTimeout(g),g=null,h=j,f=a.apply(d,e),d=e=null):g||c.trailing===!1||(g=setTimeout(i,k)),f}},y.debounce=function(a,b,c){var d,e,f,g,h,i=function(){var j=y.now()-g;b>j?d=setTimeout(i,b-j):(d=null,c||(h=a.apply(f,e),f=e=null))};return function(){f=this,e=arguments,g=y.now();var j=c&&!d;return d||(d=setTimeout(i,b)),j&&(h=a.apply(f,e),f=e=null),h}},y.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},y.wrap=function(a,b){return y.partial(b,a)},y.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},y.after=function(a,b){return function(){return--a<1?b.apply(this,arguments):void 0}},y.keys=function(a){if(!y.isObject(a))return[];if(w)return w(a);var b=[];for(var c in a)y.has(a,c)&&b.push(c);return b},y.values=function(a){for(var b=y.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=a[b[e]];return d},y.pairs=function(a){for(var b=y.keys(a),c=b.length,d=new Array(c),e=0;c>e;e++)d[e]=[b[e],a[b[e]]];return d},y.invert=function(a){for(var b={},c=y.keys(a),d=0,e=c.length;e>d;d++)b[a[c[d]]]=c[d];return b},y.functions=y.methods=function(a){var b=[];for(var c in a)y.isFunction(a[c])&&b.push(c);return b.sort()},y.extend=function(a){return z(i.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},y.pick=function(a){var b={},c=j.apply(e,i.call(arguments,1));return z(c,function(c){c in a&&(b[c]=a[c])}),b},y.omit=function(a){var b={},c=j.apply(e,i.call(arguments,1));for(var d in a)y.contains(c,d)||(b[d]=a[d]);return b},y.defaults=function(a){return z(i.call(arguments,1),function(b){if(b)for(var c in b)void 0===a[c]&&(a[c]=b[c])}),a},y.clone=function(a){return y.isObject(a)?y.isArray(a)?a.slice():y.extend({},a):a},y.tap=function(a,b){return b(a),a};var G=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof y&&(a=a._wrapped),b instanceof y&&(b=b._wrapped);var e=k.call(a);if(e!=k.call(b))return!1;switch(e){case"[object String]":return a==String(b);case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;var g=a.constructor,h=b.constructor;if(g!==h&&!(y.isFunction(g)&&g instanceof g&&y.isFunction(h)&&h instanceof h)&&"constructor"in a&&"constructor"in b)return!1;c.push(a),d.push(b);var i=0,j=!0;if("[object Array]"==e){if(i=a.length,j=i==b.length)for(;i--&&(j=G(a[i],b[i],c,d)););}else{for(var l in a)if(y.has(a,l)&&(i++,!(j=y.has(b,l)&&G(a[l],b[l],c,d))))break;if(j){for(l in b)if(y.has(b,l)&&!i--)break;j=!i}}return c.pop(),d.pop(),j};y.isEqual=function(a,b){return G(a,b,[],[])},y.isEmpty=function(a){if(null==a)return!0;if(y.isArray(a)||y.isString(a))return 0===a.length;for(var b in a)if(y.has(a,b))return!1;return!0},y.isElement=function(a){return!(!a||1!==a.nodeType)},y.isArray=v||function(a){return"[object Array]"==k.call(a)},y.isObject=function(a){return a===Object(a)},z(["Arguments","Function","String","Number","Date","RegExp"],function(a){y["is"+a]=function(b){return k.call(b)=="[object "+a+"]"}}),y.isArguments(arguments)||(y.isArguments=function(a){return!(!a||!y.has(a,"callee"))}),"function"!=typeof/./&&(y.isFunction=function(a){return"function"==typeof a}),y.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},y.isNaN=function(a){return y.isNumber(a)&&a!=+a},y.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==k.call(a)},y.isNull=function(a){return null===a},y.isUndefined=function(a){return void 0===a},y.has=function(a,b){return l.call(a,b)},y.noConflict=function(){return a._=b,this},y.identity=function(a){return a},y.constant=function(a){return function(){return a}},y.property=function(a){return function(b){return b[a]}},y.matches=function(a){return function(b){if(b===a)return!0;for(var c in a)if(a[c]!==b[c])return!1;return!0}},y.times=function(a,b,c){for(var d=Array(Math.max(0,a)),e=0;a>e;e++)d[e]=b.call(c,e);return d},y.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))},y.now=Date.now||function(){return(new Date).getTime()};var H={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};H.unescape=y.invert(H.escape);var I={escape:new RegExp("["+y.keys(H.escape).join("")+"]","g"),unescape:new RegExp("("+y.keys(H.unescape).join("|")+")","g")};y.each(["escape","unescape"],function(a){y[a]=function(b){return null==b?"":(""+b).replace(I[a],function(b){return H[a][b]})}}),y.result=function(a,b){if(null==a)return void 0;var c=a[b];return y.isFunction(c)?c.call(a):c},y.mixin=function(a){z(y.functions(a),function(b){var c=y[b]=a[b];y.prototype[b]=function(){var a=[this._wrapped];return h.apply(a,arguments),N.call(this,c.apply(y,a))}})};var J=0;y.uniqueId=function(a){var b=++J+"";return a?a+b:b},y.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,L={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},M=/\\|'|\r|\n|\t|\u2028|\u2029/g;y.template=function(a,b,c){var d;c=y.defaults({},c,y.templateSettings);var e=new RegExp([(c.escape||K).source,(c.interpolate||K).source,(c.evaluate||K).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(M,function(a){return"\\"+L[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=new Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,y);var i=function(a){return d.call(this,a,y)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},y.chain=function(a){return y(a).chain()};var N=function(a){return this._chain?y(a).chain():a};y.mixin(y),z(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=e[a];y.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],N.call(this,c)}}),z(["concat","join","slice"],function(a){var b=e[a];y.prototype[a]=function(){return N.call(this,b.apply(this._wrapped,arguments))}}),y.extend(y.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof d&&d.amd&&d("underscore",[],function(){return y})}.call(this),d("Excel/XMLDOM",["underscore"],function(a){"use strict";var b=function(a,b){this.documentElement=this.createElement(b),this.documentElement.setAttribute("xmlns",a)};return a.extend(b.prototype,{createElement:function(a){return new b.XMLNode({nodeName:a})},createTextNode:function(a){return new b.TextNode(a)},toString:function(){return this.documentElement.toString()}}),b.Node=function(){},b.Node.Create=function(a){switch(a.type){case"XML":return new b.XMLNode(a);case"TEXT":return new b.TextNode(a.nodeValue)}},b.TextNode=function(a){this.nodeValue=a},a.extend(b.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return a.escape(this.nodeValue)}}),b.XMLNode=function(a){if(this.nodeName=a.nodeName,this.children=[],this.nodeValue=a.nodeValue||"",this.attributes={},a.children)for(var c=0;c0&&(b+=" "+c.join(" "));for(var e="",f=0,g=this.children.length;g>f;f++)e+=this.children[f].toString();return b+=e?">"+e+"":"/>"},toJSON:function(){for(var a=[],b=0,c=this.children.length;c>b;b++)a.push(this.children[b].toJSON());return{nodeName:this.nodeName,children:a,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(a,b){return null===b?(delete this.attributes[a],void delete this[a]):(this.attributes[a]=b,void(this[a]=b))},setAttributeNS:function(a,b,c){this.setAttribute(b,c)},appendChild:function(a){this.children.push(a),this.firstChild=this.children[0]},cloneNode:function(){return new b.XMLNode(this.toJSON())}}),b}),d("Excel/util",["./XMLDOM"],function(a){"use strict";var b={_idSpaces:{},uniqueId:function(a){return this._idSpaces[a]||(this._idSpaces[a]=1),this._idSpaces[a]++},createXmlDoc:function(b,c){if("undefined"==typeof document)return new a(b||null,c,null);if(document.implementation&&document.implementation.createDocument)return document.implementation.createDocument(b||null,c,null);if(window.ActiveXObject){var d=new window.ActiveXObject("Microsoft.XMLDOM"),e=d.createElement(c);return e.setAttribute("xmlns",b),d.appendChild(e),d}throw"No xml document generator"},createElement:function(a,b,c){var d=a.createElement(b),e=!d.setAttributeNS;c=c||[];for(var f=c.length;f--;)e||-1===c[f][0].indexOf("xmlns")?d.setAttribute(c[f][0],c[f][1]):d.setAttributeNS("http://www.w3.org/2000/xmlns/",c[f][0],c[f][1]);return d},LETTER_REFS:{},positionToLetterRef:function(a,b){var c,d=1,e=a,f="",g="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[a])return this.LETTER_REFS[a].concat(b);for(;e>0;)e-=Math.pow(26,d-1),c=e%Math.pow(26,d),e-=c,c/=Math.pow(26,d-1),f=g.charAt(c)+f,d+=1;return this.LETTER_REFS[a]=f,f.concat(b)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","package":"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"}};return b}),d("Excel/Paths",{}),d("Excel/RelationshipManager",["underscore","./util","./Paths"],function(a,b,c){"use strict";var d=function(){this.relations={},this.lastId=1};return a.uniqueId("rId"),a.extend(d.prototype,{importData:function(a){this.relations=a.relations,this.lastId=a.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(c,d){return this.relations[c.id]={id:a.uniqueId("rId"),schema:b.schemas[d]},this.relations[c.id].id},getRelationshipId:function(a){return this.relations[a.id]?this.relations[a.id].id:null},toXML:function(){var d=b.createXmlDoc(b.schemas.relationshipPackage,"Relationships"),e=d.documentElement;return a.each(this.relations,function(a,f){var g=b.createElement(d,"Relationship",[["Id",a.id],["Type",a.schema],["Target",c[f]]]);e.appendChild(g)}),d}}),d}),d("Excel/Drawings",["underscore","./RelationshipManager","./util"],function(a,b,c){"use strict";var d=function(){this.drawings=[],this.relations=new b,this.id=a.uniqueId("Drawings")};return a.extend(d.prototype,{addDrawing:function(a){this.drawings.push(a)},getCount:function(){return this.drawings.length},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetDrawing,"xdr:wsDr"),b=a.documentElement;b.setAttribute("xmlns:xdr",c.schemas.spreadsheetDrawing),b.setAttribute("xmlns:a",c.schemas.drawing);for(var d=0,e=this.drawings.length;e>d;d++){var f=this.relations.getRelationshipId(this.drawings[d].getMediaData());f||(f=this.relations.addRelation(this.drawings[d].getMediaData(),this.drawings[d].getMediaType())),this.drawings[d].setRelationshipId(f),b.appendChild(this.drawings[d].toXML(a))}return a}}),d}),d("Excel/Drawings/AbsoluteAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b){this.x=a,this.y=b},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:absoluteAnchor"),e=b.createElement(a,"xdr:pos");e.setAttribute("x",this.x),e.setAttribute("y",this.y),d.appendChild(e);var f=b.createElement(a,"xdr:ext");return f.setAttribute("cx",this.width),f.setAttribute("cy",this.height),d.appendChild(f),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/Chart",["underscore","../util"],function(a){"use strict";var b=function(){};return a.extend(b.prototype,{}),b}),d("Excel/Drawings/OneCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,a&&(this.setPos(a.x,a.y,a.xOff,a.yOff),this.setDimensions(a.width,a.height))};return a.extend(c.prototype,{setPos:function(a,b,c,d){this.x=a,this.y=b,void 0!==c&&(this.xOff=c),void 0!==d&&(this.yOff=d)},setDimensions:function(a,b){this.width=a,this.height=b},toXML:function(a,c){var d=b.createElement(a,"xdr:oneCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.xOff||0));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.yOff||0)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i),d.appendChild(e);var j=b.createElement(a,"xdr:ext");return j.setAttribute("cx",this.width),j.setAttribute("cy",this.height),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/TwoCellAnchor",["underscore","../util"],function(a,b){"use strict";var c=function(a){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},a&&(this.setFrom(a.from.x,a.from.y,a.to.xOff,a.to.yOff),this.setTo(a.to.x,a.to.y,a.to.xOff,a.to.yOff))};return a.extend(c.prototype,{setFrom:function(a,b,c,d){this.from.x=a,this.from.y=b,void 0!==c&&(this.from.xOff=c),void 0!==d&&(this.from.yOff=c)},setTo:function(a,b,c,d){this.to.x=a,this.to.y=b,void 0!==c&&(this.to.xOff=c),void 0!==d&&(this.to.yOff=c)},toXML:function(a,c){var d=b.createElement(a,"xdr:twoCellAnchor"),e=b.createElement(a,"xdr:from"),f=b.createElement(a,"xdr:col");f.appendChild(a.createTextNode(this.from.x));var g=b.createElement(a,"xdr:colOff");g.appendChild(a.createTextNode(this.from.xOff));var h=b.createElement(a,"xdr:row");h.appendChild(a.createTextNode(this.from.y));var i=b.createElement(a,"xdr:rowOff");i.appendChild(a.createTextNode(this.from.yOff)),e.appendChild(f),e.appendChild(g),e.appendChild(h),e.appendChild(i);var j=b.createElement(a,"xdr:to"),k=b.createElement(a,"xdr:col");k.appendChild(a.createTextNode(this.to.x));var l=b.createElement(a,"xdr:colOff");l.appendChild(a.createTextNode(this.from.xOff));var m=b.createElement(a,"xdr:row");m.appendChild(a.createTextNode(this.to.y));var n=b.createElement(a,"xdr:rowOff");return n.appendChild(a.createTextNode(this.from.yOff)),j.appendChild(k),j.appendChild(l),j.appendChild(m),j.appendChild(n),d.appendChild(e),d.appendChild(j),d.appendChild(c),d.appendChild(b.createElement(a,"xdr:clientData")),d}}),c}),d("Excel/Drawings/Drawing",["underscore","./AbsoluteAnchor","./OneCellAnchor","./TwoCellAnchor"],function(a,b,c,d){"use strict";var e=function(){this.id=a.uniqueId("Drawing")};return a.extend(e.prototype,{createAnchor:function(a,e){switch(e=e||{},e.drawing=this,a){case"absoluteAnchor":this.anchor=new b(e);break;case"oneCellAnchor":this.anchor=new c(e);break;case"twoCellAnchor":this.anchor=new d(e)}return this.anchor}}),e}),d("Excel/Drawings/Picture",["./Drawing","underscore","../util"],function(a,b,c){"use strict";var d=function(){this.media=null,this.id=b.uniqueId("Picture"),this.pictureId=c.uniqueId("Picture"),this.fill={},this.mediaData=null};return d.prototype=new a,b.extend(d.prototype,{setMedia:function(a){this.mediaData=a},setDescription:function(a){this.description=a},setFillType:function(a){this.fill.type=a},setFillConfig:function(a){b.extend(this.fill,a)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(a){this.mediaData.rId=a},toXML:function(a){var b=c.createElement(a,"xdr:pic"),d=c.createElement(a,"xdr:nvPicPr"),e=c.createElement(a,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);d.appendChild(e);var f=c.createElement(a,"xdr:cNvPicPr");f.appendChild(c.createElement(a,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),d.appendChild(f),b.appendChild(d);var g=c.createElement(a,"xdr:blipFill");g.appendChild(c.createElement(a,"a:blip",[["xmlns:r",c.schemas.relationships],["r:embed",this.mediaData.rId]])),g.appendChild(c.createElement(a,"a:srcRect"));var h=c.createElement(a,"a:stretch");h.appendChild(c.createElement(a,"a:fillRect")),g.appendChild(h),b.appendChild(g);var i=c.createElement(a,"xdr:spPr",[["bwMode","auto"]]),j=c.createElement(a,"a:xfrm");i.appendChild(j);var k=c.createElement(a,"a:prstGeom",[["prst","rect"]]);return i.appendChild(k),b.appendChild(i),this.anchor.toXML(a,b)}}),d}),d("Excel/Positioning",[],function(){"use strict";return{pixelsToEMUs:function(a){return Math.round(914400*a/96)}}}),d("Excel/SharedStrings",["underscore","./util"],function(a,b){"use strict";var c=function(){this.strings={},this.stringArray=[],this.id=a.uniqueId("SharedStrings")};return a.extend(c.prototype,{addString:function(a){return this.strings[a]=this.stringArray.length,this.stringArray[this.stringArray.length]=a,this.strings[a]},exportData:function(){return this.strings},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"sst"),c=a.documentElement;this.stringArray.reverse();var d=this.stringArray.length;c.setAttribute("count",d),c.setAttribute("uniqueCount",d);var e=a.createElement("si"),f=a.createElement("t");f.appendChild(a.createTextNode("--placeholder--")),e.appendChild(f);for(var g=this.stringArray;d--;){var h=e.cloneNode(!0);h.firstChild.firstChild.nodeValue=g[d],c.appendChild(h)}return a}}),c}),d("Excel/StyleSheet",["underscore","./util"],function(a,b){"use strict";var c=function(){this.id=a.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};return a.extend(c.prototype,{createSimpleFormatter:function(a){var b=this.masterCellFormats.length,c={id:b};switch(a){case"date":c.numFmtId=14}return this.masterCellFormats.push(c),c},createFill:function(a){var b=this.fills.length,c=a;return c.id=b,this.fills.push(c),c},createNumberFormatter:function(a){var b=this.numberFormatters.length+100,c={id:b,formatCode:a};return this.numberFormatters.push(c),c},createFormat:function(b){var c=this.masterCellFormats.length,d={id:c};if(b.font&&a.isObject(b.font))d.fontId=this.createFontStyle(b.font).id;else if(b.font){if(a.isNaN(parseInt(b.font,10)))throw"Passing a non-numeric font id is not supported";d.fontId=b.font}if(b.format&&a.isString(b.format))d.numFmtId=this.createNumberFormatter(b.format).id;else if(b.format){if(a.isNaN(parseInt(b.format,10)))throw"Invalid number formatter id";d.numFmtId=b.format}if(b.border&&a.isObject(b.border))d.borderId=this.createBorderFormatter(b.border).id;else if(b.border){if(a.isNaN(parseInt(b.border,10)))throw"Passing a non-numeric border id is not supported";d.borderId=b.border}if(b.fill&&a.isObject(b.fill))d.fillId=this.createFill(b.fill).id;else if(b.fill){if(a.isNaN(parseInt(b.fill,10)))throw"Passing a non-numeric fill id is not supported";d.fillId=b.fill}return b.alignment&&a.isObject(b.alignment)&&(d.alignment=a.pick(b.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(d),d},createDifferentialStyle:function(b){var c=this.differentialStyles.length,d={id:c};return b.font&&a.isObject(b.font)&&(d.font=b.font),b.border&&a.isObject(b.border)&&(d.border=a.defaults(b.border,{ -top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?d.underline=b.underline:d.underline=!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]);return c.fillId&&d.setAttribute("applyFill","1"),c.fontId&&d.setAttribute("applyFont","1"),c.borderId&&d.setAttribute("applyBorder","1"),c.alignment&&d.setAttribute("applyAlignment","1"),c.numFmtId&&d.setAttribute("applyNumberFormat","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),d("Excel/Table",["underscore","./util"],function(a,b){"use strict";var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),d("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){"use strict";var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style?p.setAttribute("s",r.style):this._rowInstructions[d]&&void 0!==this._rowInstructions[d].style&&p.setAttribute("s",this._rowInstructions[d].style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(0!==i?h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]])):h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},setColumnFormats:function(a){this.columnFormats=a}}),d}),d("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){"use strict";var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){b instanceof i?a[c]=b.toString():a[c]=b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},d("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof d&&d.amd?d("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof c&&c;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,a,b,d,e)}return d[h].exports}for(var g="function"==typeof c&&c,h=0;h>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],2:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b,c){"use strict";function d(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./utils"),d.base64=a("./base64"),d.compressions=a("./compressions"),b.exports=d},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./zipEntries");b.exports=function(a,b){var c,f,g,h;for(b=b||{},b.base64&&(a=d.decode(a)),f=new e(a,b),c=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},s=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},w=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||u.call(this,a,null,{dir:!0}),this.files[a]},x=function(a,b){var c,d=new l;return a._data instanceof l?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=k.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c)))):(c=o(a),(!c||0===c.length||a.options.dir)&&(b=k.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},y=function(a,b,c,d){var e,f,g=(c.compressedContent,this.utf8encode(b.name)),i=g!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=r(1,1)+r(this.crc32(g),4)+g,k+="up"+r(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=r(e,2),m+=r(f,2),m+=r(c.crc32,4),m+=r(c.compressedSize,4),m+=r(c.uncompressedSize,4),m+=r(g.length,2),m+=r(k.length,2);var n=h.LOCAL_FILE_HEADER+m+g+k,o=h.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+r(d,4)+g+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},z=function(){this.data=[]};z.prototype={append:function(a){a=g.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var A=function(a){this.data=new Uint8Array(a),this.index=0};A.prototype={append:function(a){0!==a.length&&(a=g.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var B={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new q(d.name,d._data,s(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(g.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,u.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(g.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=w.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),f=255&(b^h),e=d[f],b=b>>>8^e;return-1^b},utf8encode:function(a){if(d){var b=d.encode(a);return g.transformTo("string",b)}if(f.nodebuffer)return g.transformTo("string",m(a,"utf-8"));for(var c=[],e=0,h=0;hi?c[e++]=String.fromCharCode(i):i>127&&2048>i?(c[e++]=String.fromCharCode(i>>6|192),c[e++]=String.fromCharCode(63&i|128)):(c[e++]=String.fromCharCode(i>>12|224),c[e++]=String.fromCharCode(i>>6&63|128),c[e++]=String.fromCharCode(63&i|128))}return c.join("")},utf8decode:function(a){var b=[],c=0,d=g.getTypeOf(a),h="string"!==d,i=0,j=0,k=0,l=0;if(e)return e.decode(g.transformTo("uint8array",a));if(f.nodebuffer)return g.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=B},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./utils"),i=a("./signature"),j=a("./zipEntry"),k=a("./support");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+h.pretty(b)+", expected "+h.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],19:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;else if(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var da,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);else if(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={ -NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),d("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a,b){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),d("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}),a.ExcelBuilder=c("excel-builder")}(window); \ No newline at end of file +top:{},left:{},right:{},bottom:{},diagonal:{}})),b.fill&&a.isObject(b.fill)&&(d.fill=b.fill),b.alignment&&a.isObject(b.alignment)&&(d.alignment=b.alignment),b.format&&a.isString(b.format)&&(d.numFmt=b.format),this.differentialStyles[c]=d,d},createTableStyle:function(a){this.tableStyles.push(a)},createBorderFormatter:function(b){return a.defaults(b,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(b),b},createFontStyle:function(b){var c=this.fonts.length,d={id:c};return b.bold&&(d.bold=!0),b.italic&&(d.italic=!0),b.superscript&&(d.vertAlign="superscript"),b.subscript&&(d.vertAlign="subscript"),b.underline&&(-1!==a.indexOf(["double","singleAccounting","doubleAccounting"],b.underline)?d.underline=b.underline:d.underline=!0),b.strike&&(d.strike=!0),b.outline&&(d.outline=!0),b.shadow&&(d.shadow=!0),b.size&&(d.size=b.size),b.color&&(d.color=b.color),b.fontName&&(d.fontName=b.fontName),this.fonts.push(d),d},exportBorders:function(a){var b=a.createElement("borders");b.setAttribute("count",this.borders.length);for(var c=0,d=this.borders.length;d>c;c++)b.appendChild(this.exportBorder(a,this.borders[c]));return b},exportBorder:function(a,b){var c=a.createElement("border"),d=this,e=function(c){var e=a.createElement(c);return b[c].style&&e.setAttribute("style",b[c].style),b[c].color&&e.appendChild(d.exportColor(a,b[c].color)),e};return c.appendChild(e("left")),c.appendChild(e("right")),c.appendChild(e("top")),c.appendChild(e("bottom")),c.appendChild(e("diagonal")),c},exportColor:function(b,c){var d=b.createElement("color");return a.isString(c)?(d.setAttribute("rgb",c),d):(a.isUndefined(c.tint)||d.setAttribute("tint",c.tint),a.isUndefined(c.auto)||d.setAttribute("auto",!!c.auto),a.isUndefined(c.theme)||d.setAttribute("theme",c.theme),d)},exportMasterCellFormats:function(a){for(var c=b.createElement(a,"cellXfs",[["count",this.masterCellFormats.length]]),d=0,e=this.masterCellFormats.length;e>d;d++){var f=this.masterCellFormats[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportMasterCellStyles:function(a){for(var c=b.createElement(a,"cellStyleXfs",[["count",this.masterCellStyles.length]]),d=0,e=this.masterCellStyles.length;e>d;d++){var f=this.masterCellStyles[d];c.appendChild(this.exportCellFormatElement(a,f))}return c},exportCellFormatElement:function(b,c){var d=b.createElement("xf"),e=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],f=a.filter(a.keys(c),function(b){return-1!==a.indexOf(e,b)?!0:void 0});if(c.alignment){var g=c.alignment;d.appendChild(this.exportAlignment(b,g))}for(var h=f.length;h--;)d.setAttribute(f[h],c[f[h]]);return c.fillId&&d.setAttribute("applyFill","1"),c.fontId&&d.setAttribute("applyFont","1"),c.borderId&&d.setAttribute("applyBorder","1"),c.alignment&&d.setAttribute("applyAlignment","1"),c.numFmtId&&d.setAttribute("applyNumberFormat","1"),d},exportAlignment:function(b,c){for(var d=b.createElement("alignment"),e=a.keys(c),f=0,g=e.length;g>f;f++)d.setAttribute(e[f],c[e[f]]);return d},exportFonts:function(a){var b=a.createElement("fonts");b.setAttribute("count",this.fonts.length);for(var c=0,d=this.fonts.length;d>c;c++){var e=this.fonts[c];b.appendChild(this.exportFont(a,e))}return b},exportFont:function(a,b){var c=a.createElement("font");if(b.size){var d=a.createElement("sz");d.setAttribute("val",b.size),c.appendChild(d)}if(b.fontName){var e=a.createElement("name");e.setAttribute("val",b.fontName),c.appendChild(e)}if(b.bold&&c.appendChild(a.createElement("b")),b.italic&&c.appendChild(a.createElement("i")),b.vertAlign){var f=a.createElement("vertAlign");f.setAttribute("val",b.vertAlign),c.appendChild(f)}if(b.underline){var g=a.createElement("u");b.underline!==!0&&g.setAttribute("val",b.underline),c.appendChild(g)}return b.strike&&c.appendChild(a.createElement("strike")),b.shadow&&c.appendChild(a.createElement("shadow")),b.outline&&c.appendChild(a.createElement("outline")),b.color&&c.appendChild(this.exportColor(a,b.color)),c},exportFills:function(a){var b=a.createElement("fills");b.setAttribute("count",this.fills.length);for(var c=0,d=this.fills.length;d>c;c++){var e=this.fills[c];b.appendChild(this.exportFill(a,e))}return b},exportFill:function(a,b){var c,d=a.createElement("fill");return"pattern"===b.type?(c=this.exportPatternFill(a,b),d.appendChild(c)):"gradient"===b.type&&(c=this.exportGradientFill(a,b),d.appendChild(c)),d},exportGradientFill:function(a,b){var c=a.createElement("gradientFill");b.degree?c.setAttribute("degree",b.degree):b.left&&(c.setAttribute("left",b.left),c.setAttribute("right",b.right),c.setAttribute("top",b.top),c.setAttribute("bottom",b.bottom));var d=a.createElement("stop");d.setAttribute("position",b.start.pureAt||0);var e=a.createElement("color");"string"==typeof b.start||b.start.color?e.setAttribute("rgb",b.start.color||b.start):e.setAttribute("theme",b.start.theme);var f=a.createElement("stop"),g=a.createElement("color");return f.setAttribute("position",b.end.pureAt||1),"string"==typeof b.start||b.end.color?g.setAttribute("rgb",b.end.color||b.end):g.setAttribute("theme",b.end.theme),d.appendChild(e),f.appendChild(g),c.appendChild(d),c.appendChild(f),c},exportPatternFill:function(c,d){var e=b.createElement(c,"patternFill",[["patternType",d.patternType]]);d.bgColor||(d.bgColor="FFFFFFFF"),d.fgColor||(d.fgColor="FFFFFFFF");var f=c.createElement("bgColor");a.isString(d.bgColor)?f.setAttribute("rgb",d.bgColor):d.bgColor.theme?f.setAttribute("theme",d.bgColor.theme):f.setAttribute("rgb",d.bgColor.rbg);var g=c.createElement("fgColor");return a.isString(d.fgColor)?g.setAttribute("rgb",d.fgColor):d.fgColor.theme?g.setAttribute("theme",d.fgColor.theme):g.setAttribute("rgb",d.fgColor.rbg),e.appendChild(g),e.appendChild(f),e},exportNumberFormatters:function(a){var b=a.createElement("numFmts");b.setAttribute("count",this.numberFormatters.length);for(var c=0,d=this.numberFormatters.length;d>c;c++){var e=this.numberFormatters[c];b.appendChild(this.exportNumberFormatter(a,e))}return b},exportNumberFormatter:function(a,b){var c=a.createElement("numFmt");return c.setAttribute("numFmtId",b.id),c.setAttribute("formatCode",b.formatCode),c},exportCellStyles:function(c){var d=c.createElement("cellStyles");d.setAttribute("count",this.cellStyles.length);for(var e=0,f=this.cellStyles.length;f>e;e++){var g=this.cellStyles[e];delete g.id;var h=b.createElement(c,"cellStyle");d.appendChild(h);for(var i=a.keys(g),j=i.length;j--;)h.setAttribute(i[j],g[i[j]])}return d},exportDifferentialStyles:function(a){var b=a.createElement("dxfs");b.setAttribute("count",this.differentialStyles.length);for(var c=0,d=this.differentialStyles.length;d>c;c++){var e=this.differentialStyles[c];b.appendChild(this.exportDFX(a,e))}return b},exportDFX:function(a,b){var c=a.createElement("dxf");return b.font&&c.appendChild(this.exportFont(a,b.font)),b.fill&&c.appendChild(this.exportFill(a,b.fill)),b.border&&c.appendChild(this.exportBorder(a,b.border)),b.numFmt&&c.appendChild(this.exportNumberFormatter(a,b.numFmt)),b.alignment&&c.appendChild(this.exportAlignment(a,b.alignment)),c},exportTableStyles:function(a){var b=a.createElement("tableStyles");b.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&b.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var c=0,d=this.tableStyles.length;d>c;c++)b.appendChild(this.exportTableStyle(a,this.tableStyles[c]));return b},exportTableStyle:function(b,c){var d=b.createElement("tableStyle");d.setAttribute("name",c.name),d.setAttribute("pivot",0);var e=0;return a.each(c,function(a,c){if("name"!==c){e++;var f=b.createElement("tableStyleElement");f.setAttribute("type",c),f.setAttribute("dxfId",a),d.appendChild(f)}}),d.setAttribute("count",e),d},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"styleSheet"),c=a.documentElement;return c.appendChild(this.exportNumberFormatters(a)),c.appendChild(this.exportFonts(a)),c.appendChild(this.exportFills(a)),c.appendChild(this.exportBorders(a)),c.appendChild(this.exportMasterCellStyles(a)),c.appendChild(this.exportMasterCellFormats(a)),c.appendChild(this.exportCellStyles(a)),c.appendChild(this.exportDifferentialStyles(a)),this.tableStyles.length&&c.appendChild(this.exportTableStyles(a)),a}}),c}),d("Excel/Table",["underscore","./util"],function(a,b){"use strict";var c=function(b){a.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(b)};return a.extend(c.prototype,{initialize:function(b){this.displayName=a.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),a.extend(this,b)},setReferenceRange:function(a,b){this.ref=[a,b]},setTableColumns:function(b){a.each(b,function(a){this.addTableColumn(a)},this)},addTableColumn:function(b){if(a.isString(b)&&(b={name:b}),!b.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(b)},setSortState:function(a){this.sortState=a},toXML:function(){var a=b.createXmlDoc(b.schemas.spreadsheetml,"table"),c=a.documentElement;c.setAttribute("id",this.tableId),c.setAttribute("name",this.name),c.setAttribute("displayName",this.displayName);var d=this.ref[0],e=this.ref[1];if(c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1])),c.setAttribute("totalsRowCount",this.totalsRowCount),c.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&c.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&c.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),c.appendChild(this.exportAutoFilter(a)),c.appendChild(this.exportTableColumns(a)),c.appendChild(this.exportTableStyleInfo(a)),a},exportTableColumns:function(a){var b=a.createElement("tableColumns");b.setAttribute("count",this.tableColumns.length);for(var c=this.tableColumns,d=0,e=c.length;e>d;d++){var f=c[d],g=a.createElement("tableColumn");g.setAttribute("id",d+1),g.setAttribute("name",f.name),b.appendChild(g),f.totalsRowFunction&&g.setAttribute("totalsRowFunction",f.totalsRowFunction),f.totalsRowLabel&&g.setAttribute("totalsRowLabel",f.totalsRowLabel)}return b},exportAutoFilter:function(a){var c=a.createElement("autoFilter"),d=this.autoFilter[0],e=this.autoFilter[1];return c.setAttribute("ref",b.positionToLetterRef(d[0],d[1])+":"+b.positionToLetterRef(e[0],e[1]-this.totalsRowCount)),c},exportTableStyleInfo:function(a){var b=this.styleInfo,c=a.createElement("tableStyleInfo");return c.setAttribute("name",b.themeStyle),c.setAttribute("showFirstColumn",b.showFirstColumn?"1":"0"),c.setAttribute("showLastColumn",b.showLastColumn?"1":"0"),c.setAttribute("showColumnStripes",b.showColumnStripes?"1":"0"),c.setAttribute("showRowStripes",b.showRowStripes?"1":"0"),c},addAutoFilter:function(a,b){this.autoFilter=[a,b]}}),c}),d("Excel/Worksheet",["underscore","./util","./RelationshipManager"],function(a,b,c){"use strict";var d=function(a){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this._freezePane={},this.initialize(a)};return a.extend(d.prototype,{initialize:function(b){b=b||{},this.name=b.name,this.id=a.uniqueId("Worksheet"),this._timezoneOffset=60*(new Date).getTimezoneOffset()*1e3,b.columns&&this.setColumns(b.columns),this.relations=new c},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,_freezePane:this._freezePane,name:this.name,id:this.id}},importData:function(b){this.relations.importData(b.relations),delete b.relations,a.extend(this,b)},setSharedStringCollection:function(a){this.sharedStrings=a},addTable:function(a){this._tables.push(a),this.relations.addRelation(a,"table")},addDrawings:function(a){this._drawings.push(a),this.relations.addRelation(a,"drawingRelationship")},setRowInstructions:function(a,b){this._rowInstructions[a]=b},setHeader:function(b){if(!a.isArray(b))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=b},setFooter:function(b){if(!a.isArray(b))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=b},compilePageDetailPackage:function(a){return a=a||"",["&L",this.compilePageDetailPiece(a[0]||""),"&C",this.compilePageDetailPiece(a[1]||""),"&R",this.compilePageDetailPiece(a[2]||"")].join("")},compilePageDetailPiece:function(b){if(a.isString(b))return'&"-,Regular"'.concat(b);if(a.isObject(b)&&!a.isArray(b)){var c="";if(b.font||b.bold){var d=b.bold?"Bold":"Regular";c+='&"'+(b.font||"-"),c+=","+d+'"'}else c+='&"-,Regular"';return b.underline&&(c+="&U"),b.fontSize&&(c+="&"+b.fontSize),c+=b.text}if(a.isArray(b)){var e=this;return a.reduce(b,function(a,b){return a.concat(e.compilePageDetailPiece(b))},"")}},exportHeader:function(a){var b=a.createElement("oddHeader");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._headers))),b},exportFooter:function(a){var b=a.createElement("oddFooter");return b.appendChild(a.createTextNode(this.compilePageDetailPackage(this._footers))),b},_buildCache:function(a){var b=a.createElement("c"),c=a.createElement("v");c.appendChild(a.createTextNode("--temp--")),b.appendChild(c);var d=a.createElement("c"),e=a.createElement("f");e.appendChild(a.createTextNode("--temp--")),d.appendChild(e);var f=a.createElement("c");f.setAttribute("t","s");var g=a.createElement("v");return g.appendChild(a.createTextNode("--temp--")),f.appendChild(g),{number:b,date:b,string:f,formula:d}},collectSharedStrings:function(){for(var b=this.data,c=0,d={},e=0,f=b.length;f>e;e++){var g=b[e],h=g.length;c=h>c?h:c;for(var i=0;h>i;i++){var j=g[i],k=j&&j.metadata||{};j&&"object"==typeof j&&(j=j.value),k.type||"number"==typeof j&&(k.type="number"),"text"!==k.type&&k.type||"undefined"==typeof d[j]&&(d[j]=!0)}}return a.keys(d)},toXML:function(){var a,c,d,e=this.data,f=this.columns||[],g=b.createXmlDoc(b.schemas.spreadsheetml,"worksheet"),h=g.documentElement;h.setAttribute("xmlns:r",b.schemas.relationships),h.setAttribute("xmlns:mc",b.schemas.markupCompat);var i=0,j=b.createElement(g,"sheetData"),k=this._buildCache(g);for(d=0,c=e.length;c>d;d++){var l=e[d],m=l.length;i=m>i?m:i;for(var n=g.createElement("row"),o=0;m>o;o++){f[o]=f[o]||{};var p,q=l[o],r=q&&q.metadata||{};switch(q&&"object"==typeof q&&(q=q.value),r.type||"number"==typeof q&&(r.type="number"),r.type){case"number":p=k.number.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"date":p=k.date.cloneNode(!0),p.firstChild.firstChild.nodeValue=25569+(q-this._timezoneOffset)/864e5;break;case"formula":p=k.formula.cloneNode(!0),p.firstChild.firstChild.nodeValue=q;break;case"text":default:var s;s="undefined"!=typeof this.sharedStrings.strings[q]?this.sharedStrings.strings[q]:this.sharedStrings.addString(q),p=k.string.cloneNode(!0),p.firstChild.firstChild.nodeValue=s}r.style?p.setAttribute("s",r.style):this._rowInstructions[d]&&void 0!==this._rowInstructions[d].style&&p.setAttribute("s",this._rowInstructions[d].style),p.setAttribute("r",b.positionToLetterRef(o+1,d+1)),n.appendChild(p)}if(n.setAttribute("r",d+1),this._rowInstructions[d]){var t=this._rowInstructions[d];void 0!==t.height&&(n.setAttribute("customHeight","1"),n.setAttribute("ht",t.height)),void 0!==t.style&&(n.setAttribute("customFormat","1"),n.setAttribute("s",t.style))}j.appendChild(n)}if(0!==i?h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)+":"+b.positionToLetterRef(i,e.length)]])):h.appendChild(b.createElement(g,"dimension",[["ref",b.positionToLetterRef(1,1)]])),this._freezePane.cell&&h.appendChild(this.exportPane(g)),this.columns.length&&h.appendChild(this.exportColumns(g)),h.appendChild(j),this.mergedCells.length>0){var u=g.createElement("mergeCells");for(a=0,c=this.mergedCells.length;c>a;a++){var v=g.createElement("mergeCell");v.setAttribute("ref",this.mergedCells[a][0]+":"+this.mergedCells[a][1]),u.appendChild(v)}h.appendChild(u)}if(this.exportPageSettings(g,h),this._headers.length>0||this._footers.length>0){var w=g.createElement("headerFooter");this._headers.length>0&&w.appendChild(this.exportHeader(g)),this._footers.length>0&&w.appendChild(this.exportFooter(g)),h.appendChild(w)}if(this._tables.length>0){var x=g.createElement("tableParts");for(x.setAttribute("count",this._tables.length),a=0,c=this._tables.length;c>a;a++){var y=g.createElement("tablePart");y.setAttribute("r:id",this.relations.getRelationshipId(this._tables[a])),x.appendChild(y)}h.appendChild(x)}for(a=0,c=this._drawings.length;c>a;a++){var z=g.createElement("drawing");z.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[a])),h.appendChild(z)}return g},exportColumns:function(a){for(var c=b.createElement(a,"cols"),d=0,e=this.columns.length;e>d;d++){var f=this.columns[d],g=b.createElement(a,"col",[["min",f.min||d+1],["max",f.max||d+1]]);f.hidden&&g.setAttribute("hidden",1),f.bestFit&&g.setAttribute("bestFit",1),(f.customWidth||f.width)&&g.setAttribute("customWidth",1),f.width?g.setAttribute("width",f.width):g.setAttribute("width",9.140625),c.appendChild(g)}return c},exportPane:function(a){var b=a.createElement("sheetViews"),c=a.createElement("sheetView"),d=a.createElement("pane");return c.setAttribute("workbookViewId",0),d.setAttribute("xSplit",this._freezePane.xSplit),d.setAttribute("ySplit",this._freezePane.ySplit),d.setAttribute("topLeftCell",this._freezePane.cell),d.setAttribute("activePane","bottomRight"),d.setAttribute("state","frozen"),c.appendChild(d),b.appendChild(c),b},exportPageSettings:function(a,c){this._orientation&&c.appendChild(b.createElement(a,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(a){this._orientation=a},setColumns:function(a){this.columns=a},setData:function(a){this.data=a},mergeCells:function(a,b){this.mergedCells.push([a,b])},freezePane:function(a,b,c){this._freezePane={xSplit:a,ySplit:b,cell:c}},setColumnFormats:function(a){this.columnFormats=a}}),d}),d("Excel/Workbook",["require","underscore","./util","./StyleSheet","./Worksheet","./SharedStrings","./RelationshipManager","./Paths","./XMLDOM"],function(a,b,c,d,e,f,g,h,i){"use strict";var j=function(a){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(a)};return b.extend(j.prototype,{initialize:function(){this.id=b.uniqueId("Workbook"),this.styleSheet=new d,this.sharedStrings=new f,this.relations=new g,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(a){return a=a||{},b.defaults(a,{name:"Sheet ".concat(this.worksheets.length+1)}),new e(a)},getStyleSheet:function(){return this.styleSheet},addTable:function(a){this.tables.push(a)},addDrawings:function(a){this.drawings.push(a)},addMedia:function(a,b,c,d){var e=b.split("."),f=e[e.length-1];if(!d)switch(f.toLowerCase()){case"jpeg":case"jpg":d="image/jpeg";break;case"png":d="image/png";break;case"gif":d="image/gif";break;default:d=null}return this.media[b]||(this.media[b]={id:b,data:c,fileName:b,contentType:d,extension:f}),this.media[b]},addWorksheet:function(a){this.relations.addRelation(a,"worksheet"),a.setSharedStringCollection(this.sharedStrings),this.worksheets.push(a)},createContentTypes:function(){var a,b,d=c.createXmlDoc(c.schemas.contentTypes,"Types"),e=d.documentElement;e.appendChild(c.createElement(d,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),e.appendChild(c.createElement(d,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var f={};for(var g in this.media)this.media.hasOwnProperty(g)&&(f[this.media[g].extension]=this.media[g].contentType);for(var h in f)f.hasOwnProperty(h)&&e.appendChild(c.createElement(d,"Default",[["Extension",h],["ContentType",f[h]]]));for(e.appendChild(c.createElement(d,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),e.appendChild(c.createElement(d,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),a=0,b=this.worksheets.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/worksheets/sheet"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(a=0,b=this.tables.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/tables/table"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(a=0,b=this.drawings.length;b>a;a++)e.appendChild(c.createElement(d,"Override",[["PartName","/xl/drawings/drawing"+(a+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return d},toXML:function(){var a=c.createXmlDoc(c.schemas.spreadsheetml,"workbook"),b=a.documentElement;b.setAttribute("xmlns:r",c.schemas.relationships);for(var d=31,e=c.createElement(a,"sheets"),f=0,g=this.worksheets.length;g>f;f++){var h=a.createElement("sheet");null!=console&&this.worksheets[f].name.length>d,h.setAttribute("name",this.worksheets[f].name),h.setAttribute("sheetId",f+1),h.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[f])),e.appendChild(h)}return b.appendChild(e),a},createWorkbookRelationship:function(){var a=c.createXmlDoc(c.schemas.relationshipPackage,"Relationships"),b=a.documentElement;return b.appendChild(c.createElement(a,"Relationship",[["Id","rId1"],["Type",c.schemas.officeDocument],["Target","xl/workbook.xml"]])),a},_generateCorePaths:function(a){var b,c;for(h[this.styleSheet.id]="styles.xml",h[this.sharedStrings.id]="sharedStrings.xml",h[this.id]="/xl/workbook.xml",b=0,c=this.tables.length;c>b;b++)a["/xl/tables/table"+(b+1)+".xml"]=this.tables[b].toXML(),h[this.tables[b].id]="/xl/tables/table"+(b+1)+".xml";for(var d in this.media)if(this.media.hasOwnProperty(d)){var e=this.media[d];a["/xl/media/"+d]=e.data,h[d]="/xl/media/"+d}for(b=0,c=this.drawings.length;c>b;b++)a["/xl/drawings/drawing"+(b+1)+".xml"]=this.drawings[b].toXML(),h[this.drawings[b].id]="/xl/drawings/drawing"+(b+1)+".xml",a["/xl/drawings/_rels/drawing"+(b+1)+".xml.rels"]=this.drawings[b].relations.toXML()},_prepareFilesForPackaging:function(a){b.extend(a,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),b.each(a,function(b,c){if(-1!==c.indexOf(".xml")||-1!==c.indexOf(".rels")){b instanceof i?a[c]=b.toString():a[c]=b.xml||(new window.XMLSerializer).serializeToString(b);var d=a[c].replace(/xmlns=""/g,"");d=d.replace(/NS[\d]+:/g,""),d=d.replace(/xmlns:NS[\d]+=""/g,""),a[c]='\n'+d}})},generateFilesAsync:function(a){var b=a.requireJsPath,c=this;if(a.requireJsPath||(b=document.getElementById("requirejs")?document.getElementById("requirejs").src:""),!b)throw"Please add 'requirejs' to the script that includes requirejs, or specify the path as an argument";var d={},e=this.worksheets.length,f=this.worksheets.length,g=[],i={status:"Not Started",terminate:function(){for(var a=0;am;m++)g.push(this._createWorker(b,m,l(m)));return i},_createWorker:function(b,c,d){var e=new window.Worker(a.toUrl("./WorksheetExportWorker.js")),f=this;return e.addEventListener("error",d.error),e.addEventListener("message",function(a){switch(a.data.status){case"ready":e.postMessage({instruction:"start",data:f.worksheets[c].exportData()});break;case"sharedStrings":for(var b=0;bb;b++)a["/xl/worksheets/sheet"+(b+1)+".xml"]=this.worksheets[b].toXML(),h[this.worksheets[b].id]="worksheets/sheet"+(b+1)+".xml",a["/xl/worksheets/_rels/sheet"+(b+1)+".xml.rels"]=this.worksheets[b].relations.toXML();return this._prepareFilesForPackaging(a),a}}),j}),onmessage=function(a){if(a.data&&a.data.ziplib){importScripts(a.data.ziplib);var b=new JSZip,c=a.data.files;for(var d in c){var e=c[d];d=d.substr(1),b.file(d,e,{base64:!1})}postMessage({base64:!!a.data.base64}),postMessage({status:"done",data:b.generate({base64:!!a.data.base64})})}},d("Excel/ZipWorker",function(){}),!function(a){"object"==typeof exports?module.exports=a():"function"==typeof d&&d.amd?d("JSZip",a):"undefined"!=typeof window?window.JSZip=a():"undefined"!=typeof global?global.JSZip=a():"undefined"!=typeof self&&(self.JSZip=a())}(function(){return function a(b,d,e){function f(h,i){if(!d[h]){if(!b[h]){var j="function"==typeof c&&c;if(!i&&j)return j(h,!0);if(g)return g(h,!0);throw new Error("Cannot find module '"+h+"'")}var k=d[h]={exports:{}};b[h][0].call(k.exports,function(a){var c=b[h][1][a];return f(c?c:a)},k,k.exports,a,b,d,e)}return d[h].exports}for(var g="function"==typeof c&&c,h=0;h>2,h=(3&c)<<4|e>>4,i=(15&e)<<2|f>>6,j=63&f,isNaN(e)?i=j=64:isNaN(f)&&(j=64),k=k+d.charAt(g)+d.charAt(h)+d.charAt(i)+d.charAt(j);return k},c.decode=function(a,b){var c,e,f,g,h,i,j,k="",l=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,k+=String.fromCharCode(c),64!=i&&(k+=String.fromCharCode(e)),64!=j&&(k+=String.fromCharCode(f));return k}},{}],2:[function(a,b,c){"use strict";function d(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}d.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=d},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":6}],4:[function(a,b,c){"use strict";function d(a){this.data=null,this.length=0,this.index=0}var e=a("./utils");d.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(a){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return e.transformTo("string",this.readData(a))},readData:function(a){},lastIndexOfSignature:function(a){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=d},{"./utils":14}],5:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.date=null,c.compression=null},{}],6:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("zlibjs/bin/rawdeflate.min").Zlib,f=a("zlibjs/bin/rawinflate.min").Zlib;c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){var b=new e.RawDeflate(a);return b.compress()},c.uncompress=function(a){var b=new f.RawInflate(a);return b.decompress()}},{"zlibjs/bin/rawdeflate.min":19,"zlibjs/bin/rawinflate.min":20}],7:[function(a,b,c){"use strict";function d(a,b){this.files={},this.root="",a&&this.load(a,b),this.clone=function(){var a=new d;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a}}d.prototype=a("./object"),d.prototype.load=a("./load"),d.support=a("./support"),d.defaults=a("./defaults"),d.utils=a("./utils"),d.base64=a("./base64"),d.compressions=a("./compressions"),b.exports=d},{"./base64":1,"./compressions":3,"./defaults":5,"./load":8,"./object":9,"./support":12,"./utils":14}],8:[function(a,b,c){"use strict";var d=a("./base64"),e=a("./zipEntries");b.exports=function(a,b){var c,f,g,h;for(b=b||{},b.base64&&(a=d.decode(a)),f=new e(a,b),c=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},s=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},w=function(a){return"/"!=a.slice(-1)&&(a+="/"),this.files[a]||u.call(this,a,null,{dir:!0}),this.files[a]},x=function(a,b){var c,d=new l;return a._data instanceof l?(d.uncompressedSize=a._data.uncompressedSize,d.crc32=a._data.crc32,0===d.uncompressedSize||a.options.dir?(b=k.STORE,d.compressedContent="",d.crc32=0):a._data.compressionMethod===b.magic?d.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c)))):(c=o(a),(!c||0===c.length||a.options.dir)&&(b=k.STORE,c=""),d.uncompressedSize=c.length,d.crc32=this.crc32(c),d.compressedContent=b.compress(g.transformTo(b.compressInputType,c))),d.compressedSize=d.compressedContent.length,d.compressionMethod=b.magic,d},y=function(a,b,c,d){var e,f,g=(c.compressedContent,this.utf8encode(b.name)),i=g!==b.name,j=b.options,k="",l="";e=j.date.getHours(),e<<=6,e|=j.date.getMinutes(),e<<=5,e|=j.date.getSeconds()/2,f=j.date.getFullYear()-1980,f<<=4,f|=j.date.getMonth()+1,f<<=5,f|=j.date.getDate(),i&&(l=r(1,1)+r(this.crc32(g),4)+g,k+="up"+r(l.length,2)+l);var m="";m+="\n\x00",m+=i?"\x00\b":"\x00\x00",m+=c.compressionMethod,m+=r(e,2),m+=r(f,2),m+=r(c.crc32,4),m+=r(c.compressedSize,4),m+=r(c.uncompressedSize,4),m+=r(g.length,2),m+=r(k.length,2);var n=h.LOCAL_FILE_HEADER+m+g+k,o=h.CENTRAL_FILE_HEADER+"\x00"+m+"\x00\x00\x00\x00\x00\x00"+(b.options.dir===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+r(d,4)+g+k;return{fileRecord:n,dirRecord:o,compressedObject:c}},z=function(){this.data=[]};z.prototype={append:function(a){a=g.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}};var A=function(a){this.data=new Uint8Array(a),this.index=0};A.prototype={append:function(a){0!==a.length&&(a=g.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}};var B={load:function(a,b){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new q(d.name,d._data,s(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(g.isRegExp(a)){var d=a;return this.filter(function(a,b){return!b.options.dir&&d.test(a)})}return this.filter(function(b,c){return!c.options.dir&&b===a})[0]||null}return a=this.root+a,u.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(g.isRegExp(a))return this.filter(function(b,c){return c.options.dir&&a.test(b)});var b=this.root+a,c=w.call(this,b),d=this.clone();return d.root=c.name,d},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b)if(b.options.dir)for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;di;i++)h=c?a[i]:a.charCodeAt(i),f=255&(b^h),e=d[f],b=b>>>8^e;return-1^b},utf8encode:function(a){if(d){var b=d.encode(a);return g.transformTo("string",b)}if(f.nodebuffer)return g.transformTo("string",m(a,"utf-8"));for(var c=[],e=0,h=0;hi?c[e++]=String.fromCharCode(i):i>127&&2048>i?(c[e++]=String.fromCharCode(i>>6|192),c[e++]=String.fromCharCode(63&i|128)):(c[e++]=String.fromCharCode(i>>12|224),c[e++]=String.fromCharCode(i>>6&63|128),c[e++]=String.fromCharCode(63&i|128))}return c.join("")},utf8decode:function(a){var b=[],c=0,d=g.getTypeOf(a),h="string"!==d,i=0,j=0,k=0,l=0;if(e)return e.decode(g.transformTo("uint8array",a));if(f.nodebuffer)return g.transformTo("nodebuffer",a).toString("utf-8");for(;ij?(b[c++]=String.fromCharCode(j),i++):j>191&&224>j?(k=h?a[i+1]:a.charCodeAt(i+1),b[c++]=String.fromCharCode((31&j)<<6|63&k),i+=2):(k=h?a[i+1]:a.charCodeAt(i+1),l=h?a[i+2]:a.charCodeAt(i+2),b[c++]=String.fromCharCode((15&j)<<12|(63&k)<<6|63&l),i+=3);return b.join("")}};b.exports=B},{"./base64":1,"./compressedObject":2,"./compressions":3,"./defaults":5,"./nodeBuffer":17,"./signature":10,"./support":12,"./utils":14}],10:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],11:[function(a,b,c){"use strict";function d(a,b){this.data=a,b||(this.data=f.string2binary(this.data)),this.length=this.data.length,this.index=0}var e=a("./dataReader"),f=a("./utils");d.prototype=new e,d.prototype.byteAt=function(a){return this.data.charCodeAt(a)},d.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4,"./utils":14}],12:[function(a,b,c){var d=a("__browserify_process");if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer=!d.browser,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var e=new ArrayBuffer(0);try{c.blob=0===new Blob([e],{type:"application/zip"}).size}catch(f){try{var g=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,h=new g;h.append(e),c.blob=0===h.getBlob("application/zip").size}catch(f){c.blob=!1}}}},{__browserify_process:18}],13:[function(a,b,c){"use strict";function d(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var e=a("./dataReader");d.prototype=new e,d.prototype.byteAt=function(a){return this.data[a]},d.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},d.prototype.readData=function(a){this.checkOffset(a);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=d},{"./dataReader":4}],14:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{"array"===f||"nodebuffer"===f?d.push(String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e)))):d.push(String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":17,"./support":12}],15:[function(a,b,c){"use strict";function d(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var e=a("./stringReader"),f=a("./nodeBufferReader"),g=a("./uint8ArrayReader"),h=a("./utils"),i=a("./signature"),j=a("./zipEntry"),k=a("./support");d.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+h.pretty(b)+", expected "+h.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.binding=function(a){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(a){throw new Error("process.chdir is not supported")}},{}],19:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=n;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||b===l?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a,b){if(this.index="number"==typeof b?b:0,this.d=0,this.buffer=a instanceof(o?Uint8Array:Array)?a:new(o?Uint8Array:Array)(32768),2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&c(this)}function c(a){var b,c=a.buffer,d=c.length,e=new(o?Uint8Array:Array)(d<<1);if(o)e.set(c);else for(b=0;d>b;++b)e[b]=c[b];return a.buffer=e}function d(a){this.buffer=new(o?Uint16Array:Array)(2*a),this.length=0}function e(a,b){this.e=w,this.f=0,this.input=o&&a instanceof Array?new Uint8Array(a):a,this.c=0,b&&(b.lazy&&(this.f=b.lazy),"number"==typeof b.compressionType&&(this.e=b.compressionType),b.outputBuffer&&(this.b=o&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"==typeof b.outputIndex&&(this.c=b.outputIndex)),this.b||(this.b=new(o?Uint8Array:Array)(32768))}function f(a,b){this.length=a,this.g=b}function g(a,b){function c(a,b){var c,d=a.g,e=[],f=0;c=z[a.length],e[f++]=65535&c,e[f++]=c>>16&255,e[f++]=c>>24;var g;switch(m){case 1===d:g=[0,d-1,0];break;case 2===d:g=[1,d-2,0];break;case 3===d:g=[2,d-3,0];break;case 4===d:g=[3,d-4,0];break;case 6>=d:g=[4,d-5,1];break;case 8>=d:g=[5,d-7,1];break;case 12>=d:g=[6,d-9,2];break;case 16>=d:g=[7,d-13,2];break;case 24>=d:g=[8,d-17,3];break;case 32>=d:g=[9,d-25,3];break;case 48>=d:g=[10,d-33,4];break;case 64>=d:g=[11,d-49,4];break;case 96>=d:g=[12,d-65,5];break;case 128>=d:g=[13,d-97,5];break;case 192>=d:g=[14,d-129,6];break;case 256>=d:g=[15,d-193,6];break;case 384>=d:g=[16,d-257,7];break;case 512>=d:g=[17,d-385,7];break;case 768>=d:g=[18,d-513,8];break;case 1024>=d:g=[19,d-769,8];break;case 1536>=d:g=[20,d-1025,9];break;case 2048>=d:g=[21,d-1537,9];break;case 3072>=d:g=[22,d-2049,10];break;case 4096>=d:g=[23,d-3073,10];break;case 6144>=d:g=[24,d-4097,11];break;case 8192>=d:g=[25,d-6145,11];break;case 12288>=d:g=[26,d-8193,12];break;case 16384>=d:g=[27,d-12289,12];break;case 24576>=d:g=[28,d-16385,13];break;case 32768>=d:g=[29,d-24577,13];break;default:throw"invalid distance"}c=g,e[f++]=c[0],e[f++]=c[1],e[f++]=c[2];var h,i;for(h=0,i=e.length;i>h;++h)r[s++]=e[h];u[e[0]]++,v[e[3]]++,t=a.length+b-1,n=null}var d,e,f,g,i,j,k,n,p,q={},r=o?new Uint16Array(2*b.length):[],s=0,t=0,u=new(o?Uint32Array:Array)(286),v=new(o?Uint32Array:Array)(30),w=a.f;if(!o){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)v[f++]=0}for(u[256]=1,d=0,e=b.length;e>d;++d){for(f=i=0,g=3;g>f&&d+f!==e;++f)i=i<<8|b[d+f];if(q[i]===l&&(q[i]=[]),j=q[i],!(0=e){for(n&&c(n,-1),f=0,g=e-d;g>f;++f)p=b[d+f],r[s++]=p,++u[p];break}0h;h++){if(d=c[j-h-1],g=3,k>3){for(i=k;i>3;i--)if(a[d+i-1]!==a[b+i-1])continue a;g=k}for(;258>g&&l>b+g&&a[d+g]===a[b+g];)++g;if(g>k&&(e=d,k=g),258===g)break}return new f(k,b-e)}function i(a,b){var c,e,f,g,h,i=a.length,k=new d(572),l=new(o?Uint8Array:Array)(i);if(!o)for(g=0;i>g;g++)l[g]=0;for(g=0;i>g;++g)0g;++g)c[g]=k.pop(),e[g]=c[g].value;for(f=j(e,e.length,b),g=0,h=c.length;h>g;++g)l[c[g].index]=f[g];return l}function j(a,b,c){function d(a){var c=n[a][p[a]];c===b?(d(a+1),d(a+1)):--l[c],++p[a]}var e,f,g,h,i,j=new(o?Uint16Array:Array)(c),k=new(o?Uint8Array:Array)(c),l=new(o?Uint8Array:Array)(b),m=Array(c),n=Array(c),p=Array(c),q=(1<f;++f)r>q?k[f]=0:(k[f]=1,q-=r),q<<=1,j[c-2-f]=(j[c-1-f]/2|0)+b;for(j[0]=k[0],m[0]=Array(j[0]),n[0]=Array(j[0]),f=1;c>f;++f)j[f]>2*j[f-1]+k[f]&&(j[f]=2*j[f-1]+k[f]),m[f]=Array(j[f]),n[f]=Array(j[f]);for(e=0;b>e;++e)l[e]=c;for(g=0;ge;++e)p[e]=0;for(1===k[c-1]&&(--l[0],++p[c-1]),f=c-2;f>=0;--f){for(h=e=0,i=p[f+1],g=0;ga[e]?(m[f][g]=h,n[f][g]=b,i+=2):(m[f][g]=a[e],n[f][g]=e,++e);p[f]=0,1===k[f]&&d(f)}return l}function k(a){var b,c,d,e,f=new(o?Uint16Array:Array)(a.length),g=[],h=[],i=0;for(b=0,c=a.length;c>b;b++)g[a[b]]=(0|g[a[b]])+1;for(b=1,c=16;c>=b;b++)h[b]=i,i+=0|g[b],i<<=1;for(b=0,c=a.length;c>b;b++)for(i=h[a[b]],h[a[b]]+=1,d=f[b]=0,e=a[b];e>d;d++)f[b]=f[b]<<1|1&i,i>>>=1;return f}var l=void 0,m=!0,n=this,o="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;b.prototype.a=function(a,b,d){var e,f=this.buffer,g=this.index,h=this.d,i=f[g];if(d&&b>1&&(a=b>8?(u[255&a]<<24|u[a>>>8&255]<<16|u[a>>>16&255]<<8|u[a>>>24&255])>>32-b:u[a]>>8-b),8>b+h)i=i<e;++e)i=i<<1|a>>b-e-1&1,8===++h&&(h=0,f[g++]=u[i],i=0,g===f.length&&(f=c(this)));f[g]=i,this.buffer=f,this.d=h,this.index=g},b.prototype.finish=function(){var a,b=this.buffer,c=this.index;return 0p;++p){for(var r=p,s=r,t=7,r=r>>>1;r;r>>>=1)s<<=1,s|=1&r,--t;q[p]=(s<>>0}var u=q;d.prototype.getParent=function(a){return 2*((a-2)/4|0)},d.prototype.push=function(a,b){var c,d,e,f=this.buffer;for(c=this.length,f[this.length++]=b,f[this.length++]=a;c>0&&(d=this.getParent(c),f[c]>f[d]);)e=f[c],f[c]=f[d],f[d]=e,e=f[c+1],f[c+1]=f[d+1],f[d+1]=e,c=d;return this.length},d.prototype.pop=function(){var a,b,c,d,e,f=this.buffer;for(b=f[0],a=f[1],this.length-=2,f[0]=f[this.length],f[1]=f[this.length+1],e=0;(d=2*e+2,!(d>=this.length))&&(d+2f[d]&&(d+=2),f[d]>f[e]);)c=f[e],f[e]=f[d],f[d]=c,c=f[e+1],f[e+1]=f[d+1],f[d+1]=c,e=d;return{index:a,value:b,length:this.length}};var v,w=2,x=[];for(v=0;288>v;v++)switch(m){case 143>=v:x.push([v+48,8]);break;case 255>=v:x.push([v-144+400,9]);break;case 279>=v:x.push([v-256+0,7]);break;case 287>=v:x.push([v-280+192,8]);break;default:throw"invalid literal: "+v}e.prototype.h=function(){var a,c,d,e,f=this.input;switch(this.e){case 0:for(d=0,e=f.length;e>d;){c=o?f.subarray(d,d+65535):f.slice(d,d+65535),d+=c.length;var h=c,j=d===e,n=l,p=l,q=l,r=l,s=l,t=this.b,u=this.c;if(o){for(t=new Uint8Array(this.b.buffer);t.length<=u+h.length+5;)t=new Uint8Array(t.length<<1);t.set(this.b)}if(n=j?1:0,t[u++]=0|n,p=h.length,q=~p+65536&65535,t[u++]=255&p,t[u++]=p>>>8&255,t[u++]=255&q,t[u++]=q>>>8&255,o)t.set(h,u),u+=h.length,t=t.subarray(0,u);else{for(r=0,s=h.length;s>r;++r)t[u++]=h[r];t.length=u}this.c=u,this.b=t}break;case 1:var v=new b(o?new Uint8Array(this.b.buffer):this.b,this.c);v.a(1,1,m),v.a(1,2,m);var y,z,A,B=g(this,f);for(y=0,z=B.length;z>y;y++)if(A=B[y],b.prototype.a.apply(v,x[A]),A>256)v.a(B[++y],B[++y],m),v.a(B[++y],5),v.a(B[++y],B[++y],m);else if(256===A)break;this.b=v.finish(),this.c=this.b.length;break;case w:var C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R=new b(o?new Uint8Array(this.b.buffer):this.b,this.c),S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],T=Array(19);for(C=w,R.a(1,1,m),R.a(C,2,m),D=g(this,f),H=i(this.j,15),I=k(H),J=i(this.i,7),K=k(J),E=286;E>257&&0===H[E-1];E--);for(F=30;F>1&&0===J[F-1];F--);var U,V,W,X,Y,Z,$=E,_=F,aa=new(o?Uint32Array:Array)($+_),ba=new(o?Uint32Array:Array)(316),ca=new(o?Uint8Array:Array)(19);for(U=V=0;$>U;U++)aa[V++]=H[U];for(U=0;_>U;U++)aa[V++]=J[U];if(!o)for(U=0,X=ca.length;X>U;++U)ca[U]=0;for(U=Y=0,X=aa.length;X>U;U+=V){for(V=1;X>U+V&&aa[U+V]===aa[U];++V);if(W=V,0===aa[U])if(3>W)for(;00;)Z=138>W?W:138,Z>W-3&&W>Z&&(Z=W-3),10>=Z?(ba[Y++]=17,ba[Y++]=Z-3,ca[17]++):(ba[Y++]=18,ba[Y++]=Z-11,ca[18]++),W-=Z;else if(ba[Y++]=aa[U],ca[aa[U]]++,W--,3>W)for(;00;)Z=6>W?W:6,Z>W-3&&W>Z&&(Z=W-3),ba[Y++]=16,ba[Y++]=Z-3,ca[16]++,W-=Z}for(a=o?ba.subarray(0,Y):ba.slice(0,Y),L=i(ca,7),P=0;19>P;P++)T[P]=L[S[P]];for(G=19;G>4&&0===T[G-1];G--);for(M=k(L),R.a(E-257,5,m),R.a(F-1,5,m),R.a(G-4,4,m),P=0;G>P;P++)R.a(T[P],3,m);for(P=0,Q=a.length;Q>P;P++)if(N=a[P],R.a(M[N],L[N],m),N>=16){switch(P++,N){case 16:O=2;break;case 17:O=3;break;case 18:O=7;break;default:throw"invalid code: "+N}R.a(a[P],O,m)}var da,ea,fa,ga,ha,ia,ja,ka,la=[I,H],ma=[K,J];for(ha=la[0],ia=la[1],ja=ma[0],ka=ma[1],da=0,ea=D.length;ea>da;++da)if(fa=D[da],R.a(ha[fa],ia[fa],m),fa>256)R.a(D[++da],D[++da],m),ga=D[++da],R.a(ja[ga],ka[ga],m),R.a(D[++da],D[++da],m);else if(256===fa)break;this.b=R.finish(),this.c=this.b.length;break;default:throw"invalid compression type"}return this.b};var y=function(){function a(a){switch(m){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,a-31,2];case 42>=a:return[273,a-35,3]; +case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a}}var b,c,d=[];for(b=3;258>=b;b++)c=a(b),d[b]=c[2]<<24|c[1]<<16|c[0];return d}(),z=o?new Uint32Array(y):y;a("Zlib.RawDeflate",e),a("Zlib.RawDeflate.prototype.compress",e.prototype.h);var A,B,C,D,E={NONE:0,FIXED:1,DYNAMIC:w};if(Object.keys)A=Object.keys(E);else for(B in A=[],C=0,E)A[C++]=B;for(C=0,D=A.length;D>C;++C)B=A[C],a("Zlib.RawDeflate.CompressionType."+B,E[B])}).call(this)},{}],20:[function(a,b,c){(function(){"use strict";function a(a,b){var c=a.split("."),d=g;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b}function b(a){var b,c,d,e,f,g,i,j,k,l=a.length,m=0,n=Number.POSITIVE_INFINITY;for(j=0;l>j;++j)a[j]>m&&(m=a[j]),a[j]=d;){for(j=0;l>j;++j)if(a[j]===d){for(g=0,i=e,k=0;d>k;++k)g=g<<1|1&i,i>>=1;for(k=g;b>k;k+=f)c[k]=d<<16|j;++e}++d,e<<=1,f<<=1}return[c,m,n]}function c(a,b){switch(this.g=[],this.h=32768,this.c=this.f=this.d=this.k=0,this.input=h?new Uint8Array(a):a,this.l=!1,this.i=j,this.p=!1,(b||!(b={}))&&(b.index&&(this.d=b.index),b.bufferSize&&(this.h=b.bufferSize),b.bufferType&&(this.i=b.bufferType),b.resize&&(this.p=b.resize)),this.i){case i:this.a=32768,this.b=new(h?Uint8Array:Array)(32768+this.h+258);break;case j:this.a=0,this.b=new(h?Uint8Array:Array)(this.h),this.e=this.u,this.m=this.r,this.j=this.s;break;default:throw Error("invalid inflate mode")}}function d(a,b){for(var c,d=a.f,e=a.c,f=a.input,g=a.d,h=f.length;b>e;){if(g>=h)throw Error("input buffer is broken");d|=f[g++]<>>b,a.c=e-b,a.d=g,c}function e(a,b){for(var c,d,e=a.f,f=a.c,g=a.input,h=a.d,i=g.length,j=b[0],k=b[1];k>f&&!(h>=i);)e|=g[h++]<>>16,a.f=e>>d,a.c=f-d,a.d=h,65535&c}function f(a){function c(a,b,c){var f,g,h,i;for(i=0;a>i;)switch(f=e(this,b)){case 16:for(h=3+d(this,2);h--;)c[i++]=g;break;case 17:for(h=3+d(this,3);h--;)c[i++]=0;g=0;break;case 18:for(h=11+d(this,7);h--;)c[i++]=0;g=0;break;default:g=c[i++]=f}return c}var f,g,i,j,k=d(a,5)+257,l=d(a,5)+1,m=d(a,4)+4,o=new(h?Uint8Array:Array)(n.length);for(j=0;m>j;++j)o[n[j]]=d(a,3);if(!h)for(j=m,m=o.length;m>j;++j)o[n[j]]=0;f=b(o),g=new(h?Uint8Array:Array)(k),i=new(h?Uint8Array:Array)(l),a.j(b(c.call(a,k,f,g)),b(c.call(a,l,f,i)))}var g=this,h="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView,i=0,j=1;c.prototype.t=function(){for(;!this.l;){var a=d(this,3);switch(1&a&&(this.l=!0),a>>>=1){case 0:var b=this.input,c=this.d,e=this.b,g=this.a,k=b.length,l=void 0,m=void 0,n=e.length,o=void 0;if(this.c=this.f=0,c+1>=k)throw Error("invalid uncompressed block header: LEN");if(l=b[c++]|b[c++]<<8,c+1>=k)throw Error("invalid uncompressed block header: NLEN");if(m=b[c++]|b[c++]<<8,l===~m)throw Error("invalid uncompressed block header: length verify");if(c+l>b.length)throw Error("input buffer is broken");switch(this.i){case i:for(;g+l>e.length;){if(o=n-g,l-=o,h)e.set(b.subarray(c,c+o),g),g+=o,c+=o;else for(;o--;)e[g++]=b[c++];this.a=g,e=this.e(),g=this.a}break;case j:for(;g+l>e.length;)e=this.e({o:2});break;default:throw Error("invalid inflate mode")}if(h)e.set(b.subarray(c,c+l),g),g+=l,c+=l;else for(;l--;)e[g++]=b[c++];this.d=c,this.a=g,this.b=e;break;case 1:this.j(z,B);break;case 2:f(this);break;default:throw Error("unknown BTYPE: "+a)}}return this.m()};var k,l,m=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],n=h?new Uint16Array(m):m,o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],p=h?new Uint16Array(o):o,q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],r=h?new Uint8Array(q):q,s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],t=h?new Uint16Array(s):s,u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=h?new Uint8Array(u):u,w=new(h?Uint8Array:Array)(288);for(k=0,l=w.length;l>k;++k)w[k]=143>=k?8:255>=k?9:279>=k?7:8;var x,y,z=b(w),A=new(h?Uint8Array:Array)(30);for(x=0,y=A.length;y>x;++x)A[x]=5;var B=b(A);c.prototype.j=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length-258;256!==(g=e(this,a));)if(256>g)f>=k&&(this.a=f,c=this.e(),f=this.a),c[f++]=g;else for(h=g-257,j=p[h],0=k&&(this.a=f,c=this.e(),f=this.a);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.s=function(a,b){var c=this.b,f=this.a;this.n=a;for(var g,h,i,j,k=c.length;256!==(g=e(this,a));)if(256>g)f>=k&&(c=this.e(),k=c.length),c[f++]=g;else for(h=g-257,j=p[h],0k&&(c=this.e(),k=c.length);j--;)c[f]=c[f++-i];for(;8<=this.c;)this.c-=8,this.d--;this.a=f},c.prototype.e=function(){var a,b,c=new(h?Uint8Array:Array)(this.a-32768),d=this.a-32768,e=this.b;if(h)c.set(e.subarray(32768,c.length));else for(a=0,b=c.length;b>a;++a)c[a]=e[a+32768];if(this.g.push(c),this.k+=c.length,h)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];return this.a=32768,e},c.prototype.u=function(a){var b,c,d,e,f=this.input.length/this.d+1|0,g=this.input,i=this.b;return a&&("number"==typeof a.o&&(f=a.o),"number"==typeof a.q&&(f+=a.q)),2>f?(c=(g.length-this.d)/this.n[2],e=258*(c/2)|0,d=eb;++b)for(a=i[b],d=0,e=a.length;e>d;++d)j[f++]=a[d];for(b=32768,c=this.a;c>b;++b)j[f++]=g[b];return this.g=[],this.buffer=j},c.prototype.r=function(){var a,b=this.a;return h?this.p?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b),this.buffer=a},a("Zlib.RawInflate",c),a("Zlib.RawInflate.prototype.decompress",c.prototype.t);var C,D,E,F,G={ADAPTIVE:j,BLOCK:i};if(Object.keys)C=Object.keys(G);else for(D in C=[],E=0,G)C[E++]=D;for(E=0,F=C.length;F>E;++E)D=C[E],a("Zlib.RawInflate.BufferType."+D,G[D])}).call(this)},{}]},{},[7])(7)}),d("excel-builder",["require","underscore","./Excel/Workbook","JSZip"],function(a,b,c,d){var e={createWorkbook:function(){return new c},createFileAsync:function(b,c){b.generateFilesAsync({success:function(b){var d=new Worker(a.toUrl("./Excel/ZipWorker.js"));d.addEventListener("message",function(a,b){"done"==a.data.status&&c.success(a.data.data)}),d.postMessage({files:b,ziplib:a.toUrl("JSZip"),base64:!c||c.base64!==!1})},error:function(){c.error()}})},createFile:function(a,c){var e=new d,f=a.generateFiles();return b.each(f,function(a,b){b=b.substr(1),-1!==b.indexOf(".xml")||-1!==b.indexOf(".rel")?e.file(b,a,{base64:!1}):e.file(b,a,{base64:!0,binary:!0})}),e.generate(b.defaults(c||{},{type:"base64"}))}};return e}),d("buildtools/index",["../Excel/Drawings","../Excel/Drawings/AbsoluteAnchor","../Excel/Drawings/Chart","../Excel/Drawings/Drawing","../Excel/Drawings/OneCellAnchor","../Excel/Drawings/Picture","../Excel/Drawings/TwoCellAnchor","../Excel/Paths","../Excel/Positioning","../Excel/RelationshipManager","../Excel/SharedStrings","../Excel/StyleSheet","../Excel/Table","../Excel/Workbook","../Excel/Worksheet","../Excel/XMLDOM","../Excel/ZipWorker","../Excel/util","../excel-builder"],function(){}),a.ExcelBuilder=c("excel-builder")}(window); \ No newline at end of file