2 lines
490 KiB
JavaScript
2 lines
490 KiB
JavaScript
|
/* JeffreyWang压缩打包 lay-excel 1.5.0*/
|
||
|
function make_xlsx_lib(a){function b(){Fl(1252)}function c(){Gl(1200),b()}function d(a){for(var b=[],c=0,d=a.length;c<d;++c)b[c]=a.charCodeAt(c);return b}function e(a){for(var b=[],c=0;c<a.length>>1;++c)b[c]=String.fromCharCode(a.charCodeAt(2*c)+(a.charCodeAt(2*c+1)<<8));return b.join("")}function f(a){for(var b=[],c=0;c<a.length>>1;++c)b[c]=String.fromCharCode(a.charCodeAt(2*c+1)+(a.charCodeAt(2*c)<<8));return b.join("")}function g(a){return Ml?Buffer.alloc(a):new Array(a)}function h(a){return Ml?Buffer.allocUnsafe(a):new Array(a)}function i(a){if("undefined"==typeof ArrayBuffer)return Pl(a);for(var b=new ArrayBuffer(a.length),c=new Uint8Array(b),d=0;d!=a.length;++d)c[d]=255&a.charCodeAt(d);return b}function j(a){if(Array.isArray(a))return a.map(kq).join("");for(var b=[],c=0;c<a.length;++c)b[c]=kq(a[c]);return b.join("")}function k(a){if("undefined"==typeof Uint8Array)throw new Error("Unsupported");return new Uint8Array(a)}function l(a){if("undefined"==typeof ArrayBuffer)throw new Error("Unsupported");if(a instanceof ArrayBuffer)return l(new Uint8Array(a));for(var b=new Array(a.length),c=0;c<a.length;++c)b[c]=a[c];return b}function m(a){var b="number"==typeof a?Tl._table[a]:a;return b=b.replace(Yl,"(\\d+)"),new RegExp("^"+b+"$")}function n(a,b,c){var d=-1,e=-1,f=-1,g=-1,h=-1,i=-1;(b.match(Yl)||[]).forEach(function(a,b){var j=parseInt(c[b+1],10);switch(a.toLowerCase().charAt(0)){case"y":d=j;break;case"d":f=j;break;case"h":g=j;break;case"s":i=j;break;case"m":g>=0?h=j:e=j}}),i>=0&&-1==h&&e>=0&&(h=e,e=-1);var j=(""+(d>=0?d:(new Date).getFullYear())).slice(-4)+"-"+("00"+(e>=1?e:1)).slice(-2)+"-"+("00"+(f>=1?f:1)).slice(-2);7==j.length&&(j="0"+j),8==j.length&&(j="20"+j);var k=("00"+(g>=0?g:0)).slice(-2)+":"+("00"+(h>=0?h:0)).slice(-2)+":"+("00"+(i>=0?i:0)).slice(-2);return-1==g&&-1==h&&-1==i?j:-1==d&&-1==e&&-1==f?k:j+"T"+k}function o(a){return"string"==typeof a?i(a):Array.isArray(a)?k(a):a}function p(a,b,c){if(void 0!==_l&&_l.writeFileSync)return c?_l.writeFileSync(a,b,c):_l.writeFileSync(a,b);var d="utf8"==c?um(b):b;if("undefined"!=typeof IE_SaveFile)return IE_SaveFile(d,a);if("undefined"!=typeof Blob){var e=new Blob([o(d)],{type:"application/octet-stream"});if("undefined"!=typeof navigator&&navigator.msSaveBlob)return navigator.msSaveBlob(e,a);if("undefined"!=typeof saveAs)return saveAs(e,a);if("undefined"!=typeof URL&&"undefined"!=typeof document&&document.createElement&&URL.createObjectURL){var f=URL.createObjectURL(e);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&"undefined"!=typeof setTimeout&&setTimeout(function(){URL.revokeObjectURL(f)},6e4),chrome.downloads.download({url:f,filename:a,saveAs:!0});var g=document.createElement("a");if(null!=g.download)return g.download=a,g.href=f,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL&&"undefined"!=typeof setTimeout&&setTimeout(function(){URL.revokeObjectURL(f)},6e4),f}}if("undefined"!=typeof $&&"undefined"!=typeof File&&"undefined"!=typeof Folder)try{var h=File(a);return h.open("w"),h.encoding="binary",Array.isArray(b)&&(b=j(b)),h.write(b),h.close(),b}catch(a){if(!a.message||!a.message.match(/onstruct/))throw a}throw new Error("cannot save file "+a)}function q(a){if(void 0!==_l)return _l.readFileSync(a);if("undefined"!=typeof $&&"undefined"!=typeof File&&"undefined"!=typeof Folder)try{var b=File(a);b.open("r"),b.encoding="binary";var c=b.read();return b.close(),c}catch(a){if(!a.message||!a.message.match(/onstruct/))throw a}throw new Error("Cannot access file "+a)}function r(a){for(var b=Object.keys(a),c=[],d=0;d<b.length;++d)a.hasOwnProperty(b[d])&&c.push(b[d]);return c}function s(a,b){for(var c=[],d=r(a),e=0;e!==d.length;++e)null==c[a[d[e]][b]]&&(c[a[d[e]][b]]=d[e]);return c}function t(a){for(var b=[],c=r(a),d=0;d!==c.length;++d)b[a[c[d]]]=c[d];return b}function u(a){for(var b=[],c=r(a),d=0;d!==c.length;++d)b[a[c[d]]]=parseInt(c[d],10);return b}function v(a){for(var b=[],c=r(a),d=0;d!==c.length;++d)null==b[a[c[d]]]&&(b[a[c[d]]]=[]),b[a[c[d]]].push(c[d]);return b}function w(a,b
|