/*! Buttons for DataTables 2.0.0 ©2016-2021 SpryMedia Ltd - datatables.net/license */ (function(e){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(B){return e(B,window,document)}):"object"===typeof exports?module.exports=function(B,y){B||(B=window);y&&y.fn.dataTable||(y=require("datatables.net")(B,y).$);return e(y,B,B.document)}:e(jQuery,window,document)})(function(e,B,y,q){function I(a,b,c){e.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){e.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))} function L(a,b){a=new t.Api(a);b=b?b:a.init().buttons||t.defaults.buttons;return(new v(a,b)).container()}var t=e.fn.dataTable,O=0,P=0,z=t.ext.buttons,v=function(a,b){if(!(this instanceof v))return function(c){return(new v(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=e.extend(!0,{},v.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new t.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:e("<"+this.c.dom.container.tag+ "/>").addClass(this.c.dom.container.className)};this._constructor()};e.extend(v.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===q)return a.conf.action;a.conf.action=b;return this},active:function(a,b){var c=this._nodeToButton(a);a=this.c.dom.button.active;c=e(c.node);if(b===q)return c.hasClass(a);c.toggleClass(a,b===q?!0:b);return this},add:function(a,b){var c=this.s.buttons;if("string"===typeof b){b=b.split("-");var d=this.s;c=0;for(var h=b.length-1;c");m.conf._collection=m.collection;if(m.conf.split)for(var u=0;u'+this.c.dom.splitDropdown.text+""));this._expandButton(m.buttons,m.conf.buttons,m.conf.split,!b,b,g,m.conf)}m.conf.parent=l;f.init&&f.init.call(k.button(m.node),k,e(m.node),f);n++}}}},_buildButton:function(a,b,c,d){var h=this.c.dom.button,g=this.c.dom.buttonLiner, l=this.c.dom.collection,k=this.c.dom.splitCollection,n=this.c.dom.splitDropdownButton,p=this.s.dt,r=function(w){return"function"===typeof w?w(p,f,a):w};!c&&d&&k?h=n:!c&&b&&l.button&&(h=l.button);!c&&d&&k.buttonLiner?g=k.buttonLiner:!c&&b&&l.buttonLiner&&(g=l.buttonLiner);if(a.available&&!a.available(p,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var f=e(a.html);else{var m=function(w,A,C,F){F.action.call(A.button(C),w,A,C,F);e(A.table().node()).triggerHandler("buttons-action.dt", [A.button(C),A,C,F])};l=a.tag||h.tag;var u=a.clickBlurs===q?!0:a.clickBlurs;f=e("<"+l+"/>").addClass(h.className).addClass(d?this.c.dom.splitDropdownButton.className:"").attr("tabindex",this.s.dt.settings()[0].iTabIndex).attr("aria-controls",this.s.dt.table().node().id).on("click.dtb",function(w){w.preventDefault();!f.hasClass(h.disabled)&&a.action&&m(w,p,f,a);u&&f.trigger("blur")}).on("keyup.dtb",function(w){13===w.keyCode&&!f.hasClass(h.disabled)&&a.action&&m(w,p,f,a)});"a"===l.toLowerCase()&&f.attr("href", "#");"button"===l.toLowerCase()&&f.attr("type","button");g.tag?(l=e("<"+g.tag+"/>").html(r(a.text)).addClass(g.className),"a"===g.tag.toLowerCase()&&l.attr("href","#"),f.append(l)):f.html(r(a.text));!1===a.enabled&&f.addClass(h.disabled);a.className&&f.addClass(a.className);a.titleAttr&&f.attr("title",r(a.titleAttr));a.attr&&f.attr(a.attr);a.namespace||(a.namespace=".dt-button-"+P++);a.config!==q&&a.config.split&&(a.split=a.config.split)}g=(g=this.c.dom.buttonContainer)&&g.tag?e("<"+g.tag+"/>").addClass(g.className).append(f): f;this._addKey(a);this.c.buttonCreated&&(g=this.c.buttonCreated(a,g));if(c){var x=e("
").addClass(this.c.dom.splitWrapper.className);x.append(f);var D=e.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,attr:{"aria-haspopup":!0,"aria-expanded":!1},align:this.c.dom.splitDropdown.align,splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(D);var G=function(w,A,C,F){z.split.action.call(A.button(e("div.dt-btn-split-wrapper")[0]),w,A,C,F); e(A.table().node()).triggerHandler("buttons-action.dt",[A.button(C),A,C,F]);C.attr("aria-expanded",!0)},E=e('").on("click.dtb",function(w){w.preventDefault();!E.hasClass(h.disabled)&&D.action&&G(w,p,E,D);u&&E.trigger("blur")}).on("keyup.dtb",function(w){13===w.keyCode&&!E.hasClass(h.disabled)&&D.action&&G(w,p,E,D)});0===a.split.length&&E.addClass("dtb-hide-drop"); x.append(E).attr(D.attr)}return{conf:a,node:c?x.get(0):f.get(0),inserter:c?x:g,buttons:[],inCollection:b,isSplit:c,inSplit:d,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,d=b.length;c").addClass("dt-button-collection").addClass(h.collectionLayout).addClass(h.splitAlignClass).css("display", "none");a=e(a).addClass(h.contentClassName).attr("role","menu").appendTo(c);g.attr("aria-expanded","true");g.parents("body")[0]!==y.body&&(g=y.body.lastChild);h.popoverTitle?c.prepend('
'+h.popoverTitle+"
"):h.collectionTitle&&c.prepend('
'+h.collectionTitle+"
");I(c.insertAfter(g),h.fade);var k=e(b.table().container());d=c.css("position");"dt-container"===h.align&&(g=g.parent(),c.css("width",k.width()));if("absolute"=== d){var n=g.position();d=e(b.node()).position();c.css({top:e(e(b[0].node).parent()[0]).hasClass("dt-buttons")?d.top+g.outerHeight():n.top+g.outerHeight(),left:n.left});n=c.outerHeight();var p=k.offset().top+k.height();p=d.top+g.outerHeight()+n-p;var r=d.top-n,f=k.offset().top;d=d.top-n-5;(p>f-r||h.dropup)&&-dn+f&&(d-=n+f,k-=p+f,f=d>k?f+k:f+d);else if(c.hasClass(h.splitRightAlignClassName))f=u-p,d>n+f&&(d-=n+f,k-=p+ f,f=d>k?f+k:f+d);else if(c.hasClass(h.splitLeftAlignClassName)){if(f=m-n,kn+f)d-=n+f,k-=p+f,f=d>k?f+k:f+d}else f=d-n,kk?f+k:f+d)}else d=g.offset().top,f=0,f="button-right"===h.align?r-p:m-n;c.css("left",c.position().left+f)}else d=c.height()/2,d>e(B).height()/2&&(d=e(B).height()/2),c.css("marginTop",-1*d);h.background&&v.background(!0,h.backgroundClassName,h.fade,g);e("div.dt-button-background").on("click.dtb-collection",function(){});e("body").on("click.dtb-collection", function(x){var D=e.fn.addBack?"addBack":"andSelf",G=e(x.target).parent()[0];(!e(x.target).parents()[D]().filter(a).length&&!e(G).hasClass("dt-buttons")||e(x.target).hasClass("dt-button-background"))&&l()}).on("keyup.dtb-collection",function(x){27===x.keyCode&&l()});h.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(x,D,G,E){E[0]!==g[0]&&l()})},0);e(c).trigger("buttons-popover.dt")}});v.background=function(a,b,c,d){c===q&&(c=400);d||(d=y.body);a?I(e("
").addClass(b).css("display", "none").insertAfter(d),c):J(e("div."+b),c,function(){e(this).removeClass(b).remove()})};v.instanceSelector=function(a,b){if(a===q||null===a)return e.map(b,function(g){return g.inst});var c=[],d=e.map(b,function(g){return g.name}),h=function(g){if(Array.isArray(g))for(var l=0,k=g.length;l)<[^<]*)*<\/script>/gi,"");a=a.replace(//g,"");if(!b||b.stripHtml)a=a.replace(/<[^>]*>/g,"");if(!b||b.trim)a=a.replace(/^\s+|\s+$/g,"");if(!b||b.stripNewlines)a=a.replace(/\n/g," ");if(!b||b.decodeEntities)M.innerHTML=a,a=M.value;return a};v.defaults={buttons:["copy","excel","csv","pdf","print"],name:"main",tabIndex:0,dom:{container:{tag:"div",className:"dt-buttons"}, collection:{tag:"div",className:""},button:{tag:"button",className:"dt-button",active:"active",disabled:"disabled"},buttonLiner:{tag:"span",className:""},split:{tag:"div",className:"dt-button-split"},splitWrapper:{tag:"div",className:"dt-btn-split-wrapper"},splitDropdown:{tag:"button",text:"▼",className:"dt-btn-split-drop",align:"split-right",splitAlignClass:"dt-button-split-left"},splitDropdownButton:{tag:"button",className:"dt-btn-split-drop-button dt-button"},splitCollection:{tag:"div", className:"dt-button-split-collection"}}};v.version="2.0.0";e.extend(z,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",init:function(a,b,c){b.attr("aria-expanded",!1)},action:function(a,b,c,d){a.stopPropagation();d._collection.parents("body").length?this.popover(!1,d):this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",init:function(a,b,c){return b.attr("aria-expanded", !1)},action:function(a,b,c,d){a.stopPropagation();this.popover(d._collection,d)},attr:{"aria-haspopup":!0}},copy:function(a,b){if(z.copyHtml5)return"copyHtml5"},csv:function(a,b){if(z.csvHtml5&&z.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(z.excelHtml5&&z.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(z.pdfHtml5&&z.pdfHtml5.available(a,b))return"pdfHtml5"},pageLength:function(a){a=a.settings()[0].aLengthMenu;var b=[],c=[];if(Array.isArray(a[0]))b=a[0],c=a[1]; else for(var d=0;d"+a+"":"";I(e('
').html(a).append(e("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!==q&&0!==c&&(H=setTimeout(function(){d.buttons.info(!1)},c));this.on("destroy.btn-info",function(){d.buttons.info(!1)});return this});t.Api.register("buttons.exportData()", function(a){if(this.context.length)return Q(new t.Api(this.context[0]),a)});t.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==q&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===q||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*",e("head > title").text()).trim()),c=c.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""),(b=K(b.extension))||(b=""),c+=b);b=K(a.title);b=null===b?null:-1!==b.indexOf("*")? b.replace("*",e("head > title").text()||"Exported data"):b;return{filename:c,title:b,messageTop:N(this,a.message||a.messageTop,"top"),messageBottom:N(this,a.messageBottom,"bottom")}});var K=function(a){return null===a||a===q?null:"function"===typeof a?a():a},N=function(a,b,c){b=K(b);if(null===b)return null;a=e("caption",a.table().container()).eq(0);return"*"===b?a.css("caption-side")!==c?null:a.length?a.text():"":b},M=e("