/*! Buttons for DataTables 2.2.3 ©2016-2022 SpryMedia Ltd - datatables.net/license */ (function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(A){return d(A,window,document)}):"object"===typeof exports?module.exports=function(A,C){A||(A=window);C&&C.fn.dataTable||(C=require("datatables.net")(A,C).$);return d(C,A,A.document)}:d(jQuery,window,document)})(function(d,A,C,p){function I(a,b,c){d.fn.animate?a.stop().fadeIn(b,c):(a.css("display","block"),c&&c.call(a))}function J(a,b,c){d.fn.animate?a.stop().fadeOut(b,c):(a.css("display","none"),c&&c.call(a))} function L(a,b){a=new u.Api(a);b=b?b:a.init().buttons||u.defaults.buttons;return(new x(a,b)).container()}var u=d.fn.dataTable,O=0,P=0,D=u.ext.buttons,x=function(a,b){if(!(this instanceof x))return function(c){return(new x(c,a)).container()};"undefined"===typeof b&&(b={});!0===b&&(b={});Array.isArray(b)&&(b={buttons:b});this.c=d.extend(!0,{},x.defaults,b);b.buttons&&(this.c.buttons=b.buttons);this.s={dt:new u.Api(a),buttons:[],listenKeys:"",namespace:"dtb"+O++};this.dom={container:d("<"+this.c.dom.container.tag+ "/>").addClass(this.c.dom.container.className)};this._constructor()};d.extend(x.prototype,{action:function(a,b){a=this._nodeToButton(a);if(b===p)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=d(c.node);if(b===p)return c.hasClass(a);c.toggleClass(a,b===p?!0:b);return this},add:function(a,b,c){var e=this.s.buttons;if("string"===typeof b){b=b.split("-");var h=this.s;e=0;for(var f=b.length-1;e");k.conf._collection=k.collection;if(k.conf.split)for(var t=0;t'+this.c.dom.splitDropdown.text+""));this._expandButton(k.buttons,k.conf.buttons,k.conf.split,!b,b,f,k.conf)}k.conf.parent=g;n.init&&n.init.call(l.button(k.node),l,d(k.node),n);m++}}}},_buildButton:function(a,b,c,e){var h=this.c.dom.button,f=this.c.dom.buttonLiner,g=this.c.dom.collection,l=this.c.dom.splitCollection,m=this.c.dom.splitDropdownButton, r=this.s.dt,q=function(v){return"function"===typeof v?v(r,k,a):v};if(a.spacer){var n=d("").addClass("dt-button-spacer "+a.style+" "+h.spacerClass).html(q(a.text));return{conf:a,node:n,inserter:n,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}}!c&&e&&l?h=m:!c&&b&&g.button&&(h=g.button);!c&&e&&l.buttonLiner?f=l.buttonLiner:!c&&b&&g.buttonLiner&&(f=g.buttonLiner);if(a.available&&!a.available(r,a)&&!a.hasOwnProperty("html"))return!1;if(a.hasOwnProperty("html"))var k=d(a.html); else{var t=function(v,E,F,G){G.action.call(E.button(F),v,E,F,G);d(E.table().node()).triggerHandler("buttons-action.dt",[E.button(F),E,F,G])};g=a.tag||h.tag;var y=a.clickBlurs===p?!0:a.clickBlurs;k=d("<"+g+"/>").addClass(h.className).addClass(e?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(v){v.preventDefault();!k.hasClass(h.disabled)&&a.action&&t(v,r,k,a);y&&k.trigger("blur")}).on("keypress.dtb", function(v){13===v.keyCode&&(v.preventDefault(),!k.hasClass(h.disabled)&&a.action&&t(v,r,k,a))});"a"===g.toLowerCase()&&k.attr("href","#");"button"===g.toLowerCase()&&k.attr("type","button");f.tag?(g=d("<"+f.tag+"/>").html(q(a.text)).addClass(f.className),"a"===f.tag.toLowerCase()&&g.attr("href","#"),k.append(g)):k.html(q(a.text));!1===a.enabled&&k.addClass(h.disabled);a.className&&k.addClass(a.className);a.titleAttr&&k.attr("title",q(a.titleAttr));a.attr&&k.attr(a.attr);a.namespace||(a.namespace= ".dt-button-"+P++);a.config!==p&&a.config.split&&(a.split=a.config.split)}f=(f=this.c.dom.buttonContainer)&&f.tag?d("<"+f.tag+"/>").addClass(f.className).append(k):k;this._addKey(a);this.c.buttonCreated&&(f=this.c.buttonCreated(a,f));if(c){n=d("
").addClass(this.c.dom.splitWrapper.className);n.append(k);var w=d.extend(a,{text:this.c.dom.splitDropdown.text,className:this.c.dom.splitDropdown.className,closeButton:!1,attr:{"aria-haspopup":"dialog","aria-expanded":!1},align:this.c.dom.splitDropdown.align, splitAlignClass:this.c.dom.splitDropdown.splitAlignClass});this._addKey(w);var B=function(v,E,F,G){D.split.action.call(E.button(d("div.dt-btn-split-wrapper")[0]),v,E,F,G);d(E.table().node()).triggerHandler("buttons-action.dt",[E.button(F),E,F,G]);F.attr("aria-expanded",!0)},z=d('").on("click.dtb",function(v){v.preventDefault();v.stopPropagation(); z.hasClass(h.disabled)||B(v,r,z,w);y&&z.trigger("blur")}).on("keypress.dtb",function(v){13===v.keyCode&&(v.preventDefault(),z.hasClass(h.disabled)||B(v,r,z,w))});0===a.split.length&&z.addClass("dtb-hide-drop");n.append(z).attr(w.attr)}return{conf:a,node:c?n.get(0):k.get(0),inserter:c?n:f,buttons:[],inCollection:b,isSplit:c,inSplit:e,collection:null}},_nodeToButton:function(a,b){b||(b=this.s.buttons);for(var c=0,e=b.length;c").addClass("dt-button-collection").addClass(f.collectionLayout).addClass(f.splitAlignClass).addClass(e).css("display","none").attr({"aria-modal":!0,role:"dialog"});a=d(a).addClass(f.contentClassName).attr("role","menu").appendTo(m);g.attr("aria-expanded", "true");g.parents("body")[0]!==C.body&&(g=C.body.lastChild);f.popoverTitle?m.prepend('
'+f.popoverTitle+"
"):f.collectionTitle&&m.prepend('
'+f.collectionTitle+"
");f.closeButton&&m.prepend('
x
').addClass("dtb-collection-closeable");I(m.insertAfter(g),f.fade);c=d(b.table().container());var r=m.css("position");if("container"===f.span||"dt-container"===f.align)g=g.parent(),m.css("width", c.width());if("absolute"===r){var q=d(g[0].offsetParent);c=g.position();e=g.offset();var n=q.offset(),k=q.position(),t=A.getComputedStyle(q[0]);n.height=q.outerHeight();n.width=q.width()+parseFloat(t.paddingLeft);n.right=n.left+n.width;n.bottom=n.top+n.height;q=c.top+g.outerHeight();var y=c.left;m.css({top:q,left:y});t=A.getComputedStyle(m[0]);var w=m.offset();w.height=m.outerHeight();w.width=m.outerWidth();w.right=w.left+w.width;w.bottom=w.top+w.height;w.marginTop=parseFloat(t.marginTop);w.marginBottom= parseFloat(t.marginBottom);f.dropup&&(q=c.top-w.height-w.marginTop-w.marginBottom);if("button-right"===f.align||m.hasClass(f.rightAlignClassName))y=c.left-w.width+g.outerWidth();if("dt-container"===f.align||"container"===f.align)yn.width&&(y=n.width-w.width);k.left+y+w.width>d(A).width()&&(y=d(A).width()-w.width-k.left);0>e.left+y&&(y=-e.left);k.top+q+w.height>d(A).height()+d(A).scrollTop()&&(q=c.top-w.height-w.marginTop-w.marginBottom);k.top+qB&&(z=B);m.css("marginTop",-1*z)},r(),d(A).on("resize.dtb-collection",function(){r()});f.background&&x.background(!0,f.backgroundClassName,f.fade,f.backgroundHost||g);d("div.dt-button-background").on("click.dtb-collection",function(){});f.autoClose&&setTimeout(function(){b.on("buttons-action.b-internal",function(B,z,v,E){E[0]!==g[0]&&l()})},0);d(m).trigger("buttons-popover.dt");b.on("destroy",l); setTimeout(function(){h=!1;d("body").on("click.dtb-collection",function(B){if(!h){var z=d.fn.addBack?"addBack":"andSelf",v=d(B.target).parent()[0];(!d(B.target).parents()[z]().filter(a).length&&!d(v).hasClass("dt-buttons")||d(B.target).hasClass("dt-button-background"))&&l()}}).on("keyup.dtb-collection",function(B){27===B.keyCode&&l()}).on("keydown.dtb-collection",function(B){var z=d("a, button",a),v=C.activeElement;9===B.keyCode&&(-1===z.index(v)?(z.first().focus(),B.preventDefault()):B.shiftKey? v===z[0]&&(z.last().focus(),B.preventDefault()):v===z.last()[0]&&(z.first().focus(),B.preventDefault()))})},0)}}});x.background=function(a,b,c,e){c===p&&(c=400);e||(e=C.body);a?I(d("
").addClass(b).css("display","none").insertAfter(e),c):J(d("div."+b),c,function(){d(this).removeClass(b).remove()})};x.instanceSelector=function(a,b){if(a===p||null===a)return d.map(b,function(f){return f.inst});var c=[],e=d.map(b,function(f){return f.name}),h=function(f){if(Array.isArray(f))for(var g=0,l=f.length;g< l;g++)h(f[g]);else"string"===typeof f?-1!==f.indexOf(",")?h(f.split(",")):(f=d.inArray(f.trim(),e),-1!==f&&c.push(b[f].inst)):"number"===typeof f?c.push(b[f].inst):"object"===typeof f&&c.push(f)};h(a);return c};x.buttonSelector=function(a,b){for(var c=[],e=function(l,m,r){for(var q,n,k=0,t=m.length;k)<[^<]*)*<\/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};x.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",spacerClass:""},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"}}};x.version="2.2.3";d.extend(D,{collection:{text:function(a){return a.i18n("buttons.collection","Collection")},className:"buttons-collection",closeButton:!1,init:function(a,b,c){b.attr("aria-expanded",!1)},action:function(a, b,c,e){e._collection.parents("body").length?this.popover(!1,e):this.popover(e._collection,e);"keypress"===a.type&&d("a, button",e._collection).eq(0).focus()},attr:{"aria-haspopup":"dialog"}},split:{text:function(a){return a.i18n("buttons.split","Split")},className:"buttons-split",closeButton:!1,init:function(a,b,c){return b.attr("aria-expanded",!1)},action:function(a,b,c,e){this.popover(e._collection,e)},attr:{"aria-haspopup":"dialog"}},copy:function(a,b){if(D.copyHtml5)return"copyHtml5"},csv:function(a, b){if(D.csvHtml5&&D.csvHtml5.available(a,b))return"csvHtml5"},excel:function(a,b){if(D.excelHtml5&&D.excelHtml5.available(a,b))return"excelHtml5"},pdf:function(a,b){if(D.pdfHtml5&&D.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 e=0;e"+a+"":"";I(d('
').html(a).append(d("
")["string"===typeof b?"html":"append"](b)).css("display","none").appendTo("body"));c!== p&&0!==c&&(H=setTimeout(function(){e.buttons.info(!1)},c));this.on("destroy.btn-info",function(){e.buttons.info(!1)});return this});u.Api.register("buttons.exportData()",function(a){if(this.context.length)return Q(new u.Api(this.context[0]),a)});u.Api.register("buttons.exportInfo()",function(a){a||(a={});var b=a;var c="*"===b.filename&&"*"!==b.title&&b.title!==p&&null!==b.title&&""!==b.title?b.title:b.filename;"function"===typeof c&&(c=c());c===p||null===c?c=null:(-1!==c.indexOf("*")&&(c=c.replace("*", d("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("*",d("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===p?null:"function"===typeof a?a():a},N=function(a,b,c){b=K(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},M=d("