/*! Buttons for DataTables 1.5.6 ©2016-2019 SpryMedia Ltd - datatables.net/license */ (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(p){return d(p,window,document)}):"object"===typeof exports?module.exports=function(p,o){p||(p=window);if(!o||!o.fn.dataTable)o=require("datatables.net")(p,o).$;return d(o,p,p.document)}:d(jQuery,window,document)})(function(d,p,o,n){function t(a){var a=new j.Api(a),b=a.init().buttons||j.defaults.buttons;return(new m(a,b)).container()}var j=d.fn.dataTable,x=0,y=0,l=j.ext.buttons,m=function(a,b){if(!(this instanceof m))return function(b){return(new m(b,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});d.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},m.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new j.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+x++};this.dom={container:d("<"+this.c.dom.container.tag+"/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(m.prototype,{action:function(a,b){var c=this._nodeToButton(a);if(b===n)return c.conf.action;c.conf.action= b;return this},active:function(a,b){var c=this._nodeToButton(a),e=this.c.dom.button.active,c=d(c.node);if(b===n)return c.hasClass(e);c.toggleClass(e,b===n?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){for(var e=b.split("-"),c=this.s,d=0,g=e.length-1;d").addClass(u.className).attr("role","menu");h.conf._collection=h.collection; this._expandButton(h.buttons,h.conf.buttons,!0,e)}r.init&&r.init.call(i.button(h.node),i,d(h.node),r);g++}}}},_buildButton:function(a,b){var c=this.c.dom.button,e=this.c.dom.buttonLiner,i=this.c.dom.collection,g=this.s.dt,f=function(b){return"function"===typeof b?b(g,h,a):b};b&&i.button&&(c=i.button);b&&i.buttonLiner&&(e=i.buttonLiner);if(a.available&&!a.available(g,a))return!1;var k=function(a,b,c,e){e.action.call(b.button(c),a,b,c,e);d(b.table().node()).triggerHandler("buttons-action.dt",[b.button(c), b,c,e])},i=a.tag||c.tag,r=a.clickBlurs===n?!0:a.clickBlurs,h=d("<"+i+"/>").addClass(c.className).attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(b){b.preventDefault();!h.hasClass(c.disabled)&&a.action&&k(b,g,h,a);r&&h.blur()}).on("keyup.dtb",function(b){b.keyCode===13&&!h.hasClass(c.disabled)&&a.action&&k(b,g,h,a)});"a"===i.toLowerCase()&&h.attr("href","#");"button"===i.toLowerCase()&&h.attr("type","button");e.tag?(i=d("<"+ e.tag+"/>").html(f(a.text)).addClass(e.className),"a"===e.tag.toLowerCase()&&i.attr("href","#"),h.append(i)):h.html(f(a.text));!1===a.enabled&&h.addClass(c.disabled);a.className&&h.addClass(a.className);a.titleAttr&&h.attr("title",f(a.titleAttr));a.attr&&h.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+y++);e=(e=this.c.dom.buttonContainer)&&e.tag?d("<"+e.tag+"/>").addClass(e.className).append(h):h;this._addKey(a);this.c.buttonCreated&&(e=this.c.buttonCreated(a,e));return{conf:a,node:h.get(0), inserter:e,buttons:[],inCollection:b,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c").addClass(b).css("display","none").insertAfter(e).stop().fadeIn(c): d("div."+b).stop().fadeOut(c,function(){d(this).removeClass(b).remove()})};m.instanceSelector=function(a,b){if(!a)return d.map(b,function(a){return a.inst});var c=[],e=d.map(b,function(a){return a.name}),i=function(a){if(d.isArray(a))for(var f=0,k=a.length;f'+e.collectionTitle+"");e._collection.addClass(e.collectionLayout).css("display","none").insertAfter(j).stop().fadeIn(e.fade); g=e._collection.css("position");k&&"absolute"===g?e._collection.css({top:k.top,left:k.left}):"absolute"===g?(e._collection.css({top:a.top+c.outerHeight(),left:a.left}),k=f.offset().top+f.height(),k=a.top+c.outerHeight()+e._collection.outerHeight()-k,g=a.top-e._collection.outerHeight(),g=f.offset().top-g,(k>g||e.dropup)&&e._collection.css("top",a.top-e._collection.outerHeight()-5),e._collection.hasClass(e.rightAlignClassName)&&e._collection.css("left",a.left+c.outerWidth()-e._collection.outerWidth()), k=a.left+e._collection.outerWidth(),f=f.offset().left+f.width(),k>f&&e._collection.css("left",a.left-(k-f)),c=c.offset().left+e._collection.outerWidth(),c>d(p).width()&&e._collection.css("left",a.left-(c-d(p).width()))):(c=e._collection.height()/2,c>d(p).height()/2&&(c=d(p).height()/2),e._collection.css("marginTop",-1*c));e.background&&m.background(!0,e.backgroundClassName,e.fade,j);setTimeout(function(){d("div.dt-button-background").on("click.dtb-collection",function(){});d("body").on("click.dtb-collection", function(a){var b=d.fn.addBack?"addBack":"andSelf";d(a.target).parents()[b]().filter(e._collection).length||i()}).on("keyup.dtb-collection",function(a){a.keyCode===27&&i()});if(e.autoClose)b.on("buttons-action.b-internal",function(){i()})},10)}},background:!0,collectionLayout:"",collectionTitle:"",backgroundClassName:"dt-button-background",rightAlignClassName:"dt-button-right",autoClose:!1,fade:400,attr:{"aria-haspopup":!0}},copy:function(a,b){if(l.copyHtml5)return"copyHtml5";if(l.copyFlash&&l.copyFlash.available(a, b))return"copyFlash"},csv:function(a,b){if(l.csvHtml5&&l.csvHtml5.available(a,b))return"csvHtml5";if(l.csvFlash&&l.csvFlash.available(a,b))return"csvFlash"},excel:function(a,b){if(l.excelHtml5&&l.excelHtml5.available(a,b))return"excelHtml5";if(l.excelFlash&&l.excelFlash.available(a,b))return"excelFlash"},pdf:function(a,b){if(l.pdfHtml5&&l.pdfHtml5.available(a,b))return"pdfHtml5";if(l.pdfFlash&&l.pdfFlash.available(a,b))return"pdfFlash"},pageLength:function(a){var a=a.settings()[0].aLengthMenu,b=d.isArray(a[0])? a[0]:a,c=d.isArray(a[0])?a[1]:a;return{extend:"collection",text:function(a){return a.i18n("buttons.pageLength",{"-1":"Show all rows",_:"Show %d rows"},a.page.len())},className:"buttons-page-length",autoClose:!0,buttons:d.map(b,function(a,b){return{text:c[b],className:"button-page-length",action:function(b,c){c.page.len(a).draw()},init:function(b,c,d){var i=this,c=function(){i.active(b.page.len()===a)};b.on("length.dt"+d.namespace,c);c()},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}), init:function(a,b,c){var d=this;a.on("length.dt"+c.namespace,function(){d.text(c.text)})},destroy:function(a,b,c){a.off("length.dt"+c.namespace)}}}});j.Api.register("buttons()",function(a,b){b===n&&(b=a,a=n);this.selector.buttonGroup=a;var c=this.iterator(!0,"table",function(c){if(c._buttons)return m.buttonSelector(m.instanceSelector(a,c._buttons),b)},!0);c._groupSelector=a;return c});j.Api.register("button()",function(a,b){var c=this.buttons(a,b);1').html(a?"

"+a+"

":"").append(d("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body").fadeIn();c!==n&&0!==c&&(q=setTimeout(function(){e.buttons.info(!1)},c));return this}); j.Api.register("buttons.exportData()",function(a){if(this.context.length){var b=new j.Api(this.context[0]),c=d.extend(!0,{},{rows:null,columns:"",modifier:{search:"applied",order:"applied"},orthogonal:"display",stripHtml:!0,stripNewlines:!0,decodeEntities:!0,trim:!0,format:{header:function(a){return e(a)},footer:function(a){return e(a)},body:function(a){return e(a)}},customizeData:null},a),e=function(a){if("string"!==typeof a)return a;a=a.replace(/)<[^<]*)*<\/script>/gi, "");a=a.replace(//g,"");c.stripHtml&&(a=a.replace(/<[^>]*>/g,""));c.trim&&(a=a.replace(/^\s+|\s+$/g,""));c.stripNewlines&&(a=a.replace(/\n/g," "));c.decodeEntities&&(v.innerHTML=a,a=v.value);return a},a=b.columns(c.columns).indexes().map(function(a){var d=b.column(a).header();return c.format.header(d.innerHTML,a,d)}).toArray(),i=b.table().footer()?b.columns(c.columns).indexes().map(function(a){var d=b.column(a).footer();return c.format.footer(d?d.innerHTML:"",a,d)}).toArray():null,g= d.extend({},c.modifier);b.select&&"function"===typeof b.select.info&&g.selected===n&&b.rows(c.rows,d.extend({selected:!0},g)).any()&&d.extend(g,{selected:!0});for(var g=b.rows(c.rows,g).indexes().toArray(),f=b.cells(g,c.columns),g=f.render(c.orthogonal).toArray(),f=f.nodes().toArray(),k=a.length,m=[],h=0,l=0,p=0 title").text()))),b=b.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(c=s(c.extension))||(c=""),b+=c);c=s(a.title);c=null===c?null:-1!==c.indexOf("*")?c.replace("*",d("head > title").text()||"Exported data"):c;return{filename:b,title:c,messageTop:w(this, a.message||a.messageTop,"top"),messageBottom:w(this,a.messageBottom,"bottom")}});var s=function(a){return null===a||a===n?null:"function"===typeof a?a():a},w=function(a,b,c){b=s(b);if(null===b)return null;a=d("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},v=d("