/*! * HTML5 export buttons for Buttons and DataTables. * 2016 SpryMedia Ltd - datatables.net/license * * FileSaver.js (1.3.3) - MIT license * Copyright © 2016 Eli Grey - http://eligrey.com */ ! function (n) { "function" == typeof define && define.amd ? define(["jquery", "datatables.net", "datatables.net-buttons"], function (t) { return n(t, window, document) }) : "object" == typeof exports ? module.exports = function (t, e, o, l) { return t = t || window, (e = e || ("undefined" != typeof window ? require("jquery") : require("jquery")(t))).fn.dataTable || require("datatables.net")(t, e), e.fn.dataTable || require("datatables.net-buttons")(t, e), n(e, t, t.document) } : n(jQuery, window, document) }(function (C, T, y, t, e, k) { "use strict"; var o, l, n = C.fn.dataTable; function S() { return o || T.JSZip } function s() { return l || T.pdfMake } n.Buttons.pdfMake = function (t) { if (!t) return s(); l = t }, n.Buttons.jszip = function (t) { if (!t) return S(); o = t }; function N(t) { var e = "Sheet1"; return e = t.sheetName ? t.sheetName.replace(/[\[\]\*\/\\\?\:]/g, "") : e } function u(t, e) { for (var o = c(e), l = t.buttons.exportData(e.exportOptions), n = e.fieldBoundary, r = e.fieldSeparator, a = new RegExp(n, "g"), d = e.escapeChar !== k ? e.escapeChar : "\\", p = function (t) { for (var e = "", o = 0, l = t.length; o < l; o++) 0 < o && (e += r), e += n ? n + ("" + t[o]).replace(a, d + n) + n : t[o]; return e }, t = e.header ? p(l.header) + o : "", e = e.footer && l.footer ? o + p(l.footer) : "", i = [], s = 0, f = l.body.length; s < f; s++) i.push(p(l.body[s])); return { str: t + i.join(o) + e, rows: i.length } } function f() { var t; return -1 !== navigator.userAgent.indexOf("Safari") && -1 === navigator.userAgent.indexOf("Chrome") && -1 === navigator.userAgent.indexOf("Opera") && !!((t = navigator.userAgent.match(/AppleWebKit\/(\d+\.\d+)/)) && 1 < t.length && +t[1] < 603.1) } var O = function (d) { var p, i, s, f, m, y, e, u, c, l, t; if (!(void 0 === d || "undefined" != typeof navigator && /MSIE [1-9]\./.test(navigator.userAgent))) return t = d.document, p = function () { return d.URL || d.webkitURL || d }, i = t.createElementNS("http://www.w3.org/1999/xhtml", "a"), s = "download" in i, f = /constructor/i.test(d.HTMLElement) || d.safari, m = /CriOS\/[\d]+/.test(navigator.userAgent), y = function (t) { (d.setImmediate || d.setTimeout)(function () { throw t }, 0) }, e = 4e4, u = function (t) { setTimeout(function () { "string" == typeof t ? p().revokeObjectURL(t) : t.remove() }, e) }, c = function (t) { return /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob([String.fromCharCode(65279), t], { type: t.type }) : t }, t = (l = function (t, o, e) { e || (t = c(t)); var l, n, r = this, e = "application/octet-stream" === t.type, a = function () { for (var t = r, e = "writestart progress write writeend".split(" "), o = void 0, l = (e = [].concat(e)).length; l--;) { var n = t["on" + e[l]]; if ("function" == typeof n) try { n.call(t, o || t) } catch (t) { y(t) } } }; r.readyState = r.INIT, s ? (l = p().createObjectURL(t), setTimeout(function () { var t, e; i.href = l, i.download = o, t = i, e = new MouseEvent("click"), t.dispatchEvent(e), a(), u(l), r.readyState = r.DONE })) : (m || e && f) && d.FileReader ? ((n = new FileReader).onloadend = function () { var t = m ? n.result : n.result.replace(/^data:[^;]*;/, "data:attachment/file;"); d.open(t, "_blank") || (d.location.href = t), r.readyState = r.DONE, a() }, n.readAsDataURL(t), r.readyState = r.INIT) : (l = l || p().createObjectURL(t), !e && d.open(l, "_blank") || (d.location.href = l), r.readyState = r.DONE, a(), u(l)) }).prototype, "undefined" != typeof navigator && navigator.msSaveOrOpenBlob ? function (t, e, o) { return e = e || t.name || "download", o || (t = c(t)), navigator.msSaveOrOpenBlob(t, e) } : (t.abort = function () {}, t.readyState = t.INIT = 0, t.WRITING = 1, t.DONE = 2, t.error = t.onwritestart = t.onprogress = t.onwrite = t.onabort = t.onerror = t.onwriteend = null, function (t, e, o) { return new l(t, e || t.name || "download", o) }) }("undefined" != typeof self && self || void 0 !== T && T || this.content), c = (n.fileSave = O, function (t) { return t.newline || (navigator.userAgent.match(/Windows/) ? "\r\n" : "\n") }); function z(t) { for (var e = "A".charCodeAt(0), o = "Z".charCodeAt(0) - e + 1, l = ""; 0 <= t;) l = String.fromCharCode(t % o + e) + l, t = Math.floor(t / o) - 1; return l } try { var D, A = new XMLSerializer } catch (t) {} function E(t, e, o) { var l = t.createElement(e); return o && (o.attr && C(l).attr(o.attr), o.children && C.each(o.children, function (t, e) { l.appendChild(e) }), null !== o.text) && o.text !== k && l.appendChild(t.createTextNode(o.text)), l } var _ = { "_rels/.rels": '', "xl/_rels/workbook.xml.rels": '', "[Content_Types].xml": '', "xl/workbook.xml": '', "xl/worksheets/sheet1.xml": '', "xl/styles.xml": '' }, R = [{ match: /^\-?\d+\.\d%$/, style: 60, fmt: function (t) { return t / 100 } }, { match: /^\-?\d+\.?\d*%$/, style: 56, fmt: function (t) { return t / 100 } }, { match: /^\-?\$[\d,]+.?\d*$/, style: 57 }, { match: /^\-?£[\d,]+.?\d*$/, style: 58 }, { match: /^\-?€[\d,]+.?\d*$/, style: 59 }, { match: /^\-?\d+$/, style: 65 }, { match: /^\-?\d+\.\d{2}$/, style: 66 }, { match: /^\([\d,]+\)$/, style: 61, fmt: function (t) { return -1 * t.replace(/[\(\)]/g, "") } }, { match: /^\([\d,]+\.\d{2}\)$/, style: 62, fmt: function (t) { return -1 * t.replace(/[\(\)]/g, "") } }, { match: /^\-?[\d,]+$/, style: 63 }, { match: /^\-?[\d,]+\.\d{2}$/, style: 64 }, { match: /^[\d]{4}\-[01][\d]\-[0123][\d]$/, style: 67, fmt: function (t) { return Math.round(25569 + Date.parse(t) / 864e5) } }]; return n.ext.buttons.copyHtml5 = { className: "buttons-copy buttons-html5", text: function (t) { return t.i18n("buttons.copy", "Copy") }, action: function (t, e, o, l) { this.processing(!0); var n = this, r = u(e, l), a = e.buttons.exportInfo(l), d = c(l), p = r.str, i = C("
").css({ height: 1, width: 1, overflow: "hidden", position: "fixed", top: 0, left: 0 }), d = (a.title && (p = a.title + d + d + p), a.messageTop && (p = a.messageTop + d + d + p), a.messageBottom && (p = p + d + d + a.messageBottom), l.customize && (p = l.customize(p, l, e)), C("