/*! Copyright 2009-2021 SpryMedia Ltd. This source file is free software, available under the following license: MIT license - http://datatables.net/license/mit This source file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. For details please refer to: http://www.datatables.net FixedHeader 3.2.2 ©2009-2021 SpryMedia Ltd - datatables.net/license */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(b,h,g){b instanceof String&&(b=String(b));for(var l=b.length,k=0;k'), placeholder:null},footer:{host:null,floating:null,floatingParent:b('
'),placeholder:null}};this.dom.header.host=this.dom.thead.parent();this.dom.footer.host=this.dom.tfoot.parent();a=a.settings()[0];if(a._fixedHeader)throw"FixedHeader already initialised on table "+a.nTable.id;a._fixedHeader=this;this._constructor()};b.extend(t.prototype,{destroy:function(){var a=this.dom;this.s.dt.off(".dtfc");b(h).off(this.s.namespace);a.header.rightBlocker&&a.header.rightBlocker.remove(); a.header.leftBlocker&&a.header.leftBlocker.remove();a.footer.rightBlocker&&a.footer.rightBlocker.remove();a.footer.leftBlocker&&a.footer.leftBlocker.remove();this.c.header&&this._modeChange("in-place","header",!0);this.c.footer&&a.tfoot.length&&this._modeChange("in-place","footer",!0)},enable:function(a,d){this.s.enable=a;if(d||d===l)this._positions(),this._scroll(!0)},enabled:function(){return this.s.enable},headerOffset:function(a){a!==l&&(this.c.headerOffset=a,this.update());return this.c.headerOffset}, footerOffset:function(a){a!==l&&(this.c.footerOffset=a,this.update());return this.c.footerOffset},update:function(a){var d=this.s.dt.table().node();b(d).is(":visible")?this.enable(!0,!1):this.enable(!1,!1);0!==b(d).children("thead").length&&(this._positions(),this._scroll(a!==l?a:!0))},_constructor:function(){var a=this,d=this.s.dt;b(h).on("scroll"+this.s.namespace,function(){a._scroll()}).on("resize"+this.s.namespace,k.util.throttle(function(){a.s.position.windowHeight=b(h).height();a.update()}, 50));var c=b(".fh-fixedHeader");!this.c.headerOffset&&c.length&&(this.c.headerOffset=c.outerHeight());c=b(".fh-fixedFooter");!this.c.footerOffset&&c.length&&(this.c.footerOffset=c.outerHeight());d.on("column-reorder.dt.dtfc column-visibility.dt.dtfc column-sizing.dt.dtfc responsive-display.dt.dtfc",function(f,e){a.update()}).on("draw.dt.dtfc",function(f,e){a.update(e===d.settings()[0]?!1:!0)});d.on("destroy.dtfc",function(){a.destroy()});this._positions();this._scroll()},_clone:function(a,d){var c= this,f=this.s.dt,e=this.dom[a],p="header"===a?this.dom.thead:this.dom.tfoot;if("footer"!==a||!this._scrollEnabled())if(!d&&e.floating)e.floating.removeClass("fixedHeader-floating fixedHeader-locked");else{e.floating&&(null!==e.placeholder&&e.placeholder.remove(),this._unsize(a),e.floating.children().detach(),e.floating.remove());var q=b(f.table().node()),n=b(q.parent()),r=this._scrollEnabled();d=b(g).scrollLeft();var m=b(g).scrollTop();e.floating=b(f.table().node().cloneNode(!1)).attr("aria-hidden", "true").css({"table-layout":"fixed",top:0,left:0}).removeAttr("id").append(p);e.floatingParent.css({width:n.width(),overflow:"hidden",height:"fit-content",position:"fixed",left:r?q.offset().left+n.scrollLeft():0}).css("header"===a?{top:this.c.headerOffset,bottom:""}:{top:"",bottom:this.c.footerOffset}).addClass("footer"===a?"dtfh-floatingparentfoot":"dtfh-floatingparenthead").append(e.floating).appendTo("body");this._stickyPosition(e.floating,"-");a=function(){var u=n.scrollLeft();c.s.scrollLeft= {footer:u,header:u};e.floatingParent.scrollLeft(c.s.scrollLeft.header)};a();n.off("scroll.dtfh").on("scroll.dtfh",a);e.placeholder=p.clone(!1);e.placeholder.find("*[id]").removeAttr("id");e.host.prepend(e.placeholder);this._matchWidths(e.placeholder,e.floating);b(g).scrollTop(m).scrollLeft(d)}},_stickyPosition:function(a,d){if(this._scrollEnabled()){var c=this,f="rtl"===b(c.s.dt.table().node()).css("direction");a.find("th").each(function(){if("sticky"===b(this).css("position")){var e=b(this).css("right"), p=b(this).css("left");"auto"===e||f?"auto"!==p&&f&&(e=+p.replace(/px/g,"")+("-"===d?-1:1)*c.s.dt.settings()[0].oBrowser.barWidth,b(this).css("left",0u?e.tfootHeight:z+e.tfootHeight-u:c+this.c.headerOffset+e.theadHeight-m;m="header"===d?"top":"bottom";c=this.c[d+ "Offset"]-(0u&&q+this.c.headerOffsete||this.dom.header.floatingParent===l?a=!0:this.dom.header.floatingParent.css({top:this.c.headerOffset, position:"fixed"}).append(this.dom.header.floating)):n="below":n="in-place",(a||n!==this.s.headerMode)&&this._modeChange(n,"header",a),this._horizontal("header",p));var x={offset:{top:0,left:0},height:0},y={offset:{top:0,left:0},height:0};this.c.footer&&this.dom.tfoot.length&&(this.s.enable?!m.visible||m.tfootBottom+this.c.footerOffset<=r?m="in-place":e+m.tfootHeight+this.c.footerOffset>r&&u+this.c.footerOffsetq&&(d=q-f.top,r=r+(d>-x.height?d:0)-(x.offset.top+(d<-x.height?x.height:0)+y.height),0>r&&(r=0),c.outerHeight(r),Math.round(c.outerHeight())>=Math.round(r)?b(this.dom.tfoot.parent()).addClass("fixedHeader-floating"):b(this.dom.tfoot.parent()).removeClass("fixedHeader-floating"))); this.dom.header.floating&&this.dom.header.floatingParent.css("left",z-p);this.dom.footer.floating&&this.dom.footer.floatingParent.css("left",z-p);this.s.dt.settings()[0]._fixedColumns!==l&&(c=function(A,C,v){v===l&&(v=b("div.dtfc-"+A+"-"+C+"-blocker"),v=0===v.length?null:v.clone().appendTo("body").css("z-index",1));null!==v&&v.css({top:"top"===C?x.offset.top:y.offset.top,left:"right"===A?z+B-v.width():z});return v},this.dom.header.rightBlocker=c("right","top",this.dom.header.rightBlocker),this.dom.header.leftBlocker= c("left","top",this.dom.header.leftBlocker),this.dom.footer.rightBlocker=c("right","bottom",this.dom.footer.rightBlocker),this.dom.footer.leftBlocker=c("left","bottom",this.dom.footer.leftBlocker))}},_scrollEnabled:function(){var a=this.s.dt.settings()[0].oScroll;return""!==a.sY||""!==a.sX?!0:!1}});t.version="3.2.2";t.defaults={header:!0,footer:!1,headerOffset:0,footerOffset:0};b.fn.dataTable.FixedHeader=t;b.fn.DataTable.FixedHeader=t;b(g).on("init.dt.dtfh",function(a,d,c){"dt"===a.namespace&&(a= d.oInit.fixedHeader,c=k.defaults.fixedHeader,!a&&!c||d._fixedHeader||(c=b.extend({},c,a),!1!==a&&new t(d,c)))});k.Api.register("fixedHeader()",function(){});k.Api.register("fixedHeader.adjust()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.update()})});k.Api.register("fixedHeader.enable()",function(a){return this.iterator("table",function(d){d=d._fixedHeader;a=a!==l?a:!0;d&&a!==d.enabled()&&d.enable(a)})});k.Api.register("fixedHeader.enabled()",function(){if(this.context.length){var a= this.context[0]._fixedHeader;if(a)return a.enabled()}return!1});k.Api.register("fixedHeader.disable()",function(){return this.iterator("table",function(a){(a=a._fixedHeader)&&a.enabled()&&a.enable(!1)})});b.each(["header","footer"],function(a,d){k.Api.register("fixedHeader."+d+"Offset()",function(c){var f=this.context;return c===l?f.length&&f[0]._fixedHeader?f[0]._fixedHeader[d+"Offset"]():l:this.iterator("table",function(e){if(e=e._fixedHeader)e[d+"Offset"](c)})})});return t});