!function($){function FreezeTable(table,options){var $table=$(table);this.el={$table:$table},this.ev={touchstart:!1},this.env={},this.timeout={},this.options=$.extend(!0,{},this.default_options,"object"==typeof options?options:{}),this.namespace=Math.floor(1e5*Math.random()+1),this.options.height&&!this.options.force_sticky_outer_heading?this.options._sticky_outer_heading=!1:this.options.force_sticky_outer_heading&&(this.options._sticky_outer_heading=!0),$table.trigger("before_freeze_table_build",this),this.build(),$table.trigger("after_freeze_table_build",this)}$.fn.freezeTable=function(options,source){return this.each((function(){var $this=$(this);if(!$this.hasClass("frzTbl-clone-table"))return"destroy"==options?($this.data("freezeTable")&&$this.data("freezeTable").destroy(),!0):$this.data("freezeTable")?"resize"==options?($this.data("freezeTable").table_resize_handler(),!0):"pause"==options?($this.data("freezeTable").pause=!0,!0):"unpause"==options?($this.data("freezeTable").pause=!1,!0):void 0:($this.data("freezeTable",new $.FreezeTable(this,options)),!0)}))},$.FreezeTable=FreezeTable,FreezeTable.prototype.default_options={left:0,right:0,heading:0,offset:0,wrapperWidth:0,wrapperHeight:0,tableWidth:!1,grab_and_scroll:0,grab_and_scroll_click_selectors:!1,captureScroll:!1,force_sticky_outer_heading:!1,_sticky_outer_heading:!0},FreezeTable.prototype.maybe_disable=function(){var settings=this.get_breakpoint_options(),$table=this.el.$table,$container=$table.closest(".frzTbl").length?$table.closest(".frzTbl"):$table.parent(),container_width=settings.wrapperWidth?settings.wrapperWidth:$container.width(),table_compressed_width=$table.outerWidth(),table_original_width=$table[0].style.width;return $table[0].style.width=table_original_width,$(window).off("resize.ft"+this.namespace),table_compressed_width<=container_width&&!settings.left&&!settings.right&&!settings.heading&&(this.unwrap(),$(window).on("resize.ft"+this.namespace,$.proxy(this,"throttle_build")),!0)},FreezeTable.prototype.throttle_build=function(){var _build=$.proxy(this,"build");clearTimeout(this.throttle_build_timeout),this.throttle_build_timeout=setTimeout(_build,300)},FreezeTable.prototype.build=function(){this.maybe_disable()||(this.el.$table.addClass("frzTbl-table"),this.tpl=$("#freeze-table-template").html(),this.insert_heading_in_template(),this.toggle_shadow_columns_in_template(),$(this.tpl).insertBefore(this.el.$table).attr("data-freeze-table-namespace",this.namespace).find(".frzTbl-table-placeholder").replaceWith(this.el.$table),this.build_element_store(),this.scroll_hijack(),this.grab_and_scroll(),this.el.$window.on("resize.ft"+this.namespace,$.proxy(this,"table_resize_handler","*window resize from "+this.namespace+"*")),this.update_env({windowWidth:$(window).width(),windowHeight:$(window).height(),heading_row_cells_width:this.get_heading_row_cells_width(),first_row_cells_width:this.get_first_row_cells_width(),breakpoint:this.current_breakpoint()}),this.attach_resize_observers(),this._table_resize_handler(),this.el.$wrapper.addClass("frzTbl--init"))},FreezeTable.prototype.scroll_hijack=function(){this.el.$window.on("scroll",$.proxy(this,"page_scroll")),this.page_scroll({target:document}),this.el.$wrapper.on("wheel",$.proxy(this,"wrapper_wheel")),this.el.$wrapper.on("touchstart touchmove touchend",$.proxy(this,"wrapper_touch")),this.el.$scrollOverlay.on("wheel scroll",$.proxy(this,"scrollOverlay_wheel"));var affected=[this.el.$scrollOverlay,this.el.$tableWrapper,this.el.$fixedHeadingWrapper];$.each(affected,(function(i,$elm){$elm[0].scrollTop=0,$elm[0].scrollLeft=0}))},FreezeTable.prototype.build_element_store=function(){this.el.$window=$(window),this.el.$wrapper=this.el.$table.closest(".frzTbl"),this.el.$scrollOverlay=this.el.$wrapper.children(".frzTbl-scroll-overlay"),this.el.$scrollOverlayInner=this.el.$scrollOverlay.children(".frzTbl-scroll-overlay__inner"),this.el.$contentWrapper=this.el.$wrapper.children(".frzTbl-content-wrapper"),this.el.$frozenColumnsWrapper=this.el.$contentWrapper.children(".frzTbl-frozen-columns-wrapper"),this.el.$frozenColumnsLeft=this.el.$frozenColumnsWrapper.children(".frzTbl-frozen-columns-wrapper__columns--left"),this.el.$frozenColumnsLeftSticky=this.el.$frozenColumnsLeft.children(".frzTbl-top-sticky"),this.el.$frozenColumnsRight=this.el.$frozenColumnsWrapper.children(".frzTbl-frozen-columns-wrapper__columns--right"),this.el.$frozenColumnsRightSticky=this.el.$frozenColumnsRight.children(".frzTbl-top-sticky"),this.el.$fixedHeadingWrapperOuter=this.el.$contentWrapper.children(".frzTbl-fixed-heading-wrapper-outer"),this.el.$fixedHeadingWrapper=this.el.$fixedHeadingWrapperOuter.children(".frzTbl-fixed-heading-wrapper"),this.el.$fixedHeadingLeftColumn=this.el.$fixedHeadingWrapperOuter.children(".frzTbl-fixed-heading-wrapper__columns--left"),this.el.$fixedHeadingRightColumn=this.el.$fixedHeadingWrapperOuter.children(".frzTbl-fixed-heading-wrapper__columns--right"),this.el.$fixedHeadingInner=this.el.$fixedHeadingWrapper.children(".frzTbl-fixed-heading-wrapper__inner"),this.el.$headingRowCells=this.el.$table.find("> thead > .wcpt-heading-row:last-child > .wcpt-heading"),this.el.$firstRowCells=this.el.$table.find("> tbody > .wcpt-row:first-child > .wcpt-cell"),this.el.$tableWrapper=this.el.$contentWrapper.children(".frzTbl-table-wrapper"),this.el.$tableInner=this.el.$tableWrapper.children(".frzTbl-table-wrapper__inner"),this.el.$tableWrapperSticky=this.el.$tableInner.children(".frzTbl-top-sticky")},FreezeTable.prototype.grab_and_scroll=function(){var _=this,$wrapper=_.el.$wrapper,$body=$("body");$wrapper.off("mousedown.freeze_table.grab_and_scroll"),$body.off("mousemove.freeze_table.grab_and_scroll_"+_.namespace),$body.off("mousemove.freeze_table.grab_and_scroll_"+_.namespace),$("img, a",$wrapper).off("dragstart.freeze_table.grab_and_scroll_"+_.namespace),$wrapper.removeClass("frzTbl--grab-and-scroll frzTbl--grab-and-scroll--grabbing"),this.get_breakpoint_options().grab_and_scroll&&(_.grab_and_scroll__grabbed=!1,_.grab_and_scroll__last_clientX=!1,_.grab_and_scroll__last_pos_x=!1,_.grab_and_scroll__last_clientY=!1,_.grab_and_scroll__last_pos_y=!1,_.grab_and_scroll__$el=!1,$wrapper.addClass("frzTbl--grab-and-scroll"),$wrapper.on("mousedown.freeze_table.grab_and_scroll",(function(e){3!==e.which&&"SELECT"!=e.target.tagName&&(_.grab_and_scroll__grabbed=!0,_.grab_and_scroll__first_clientX=e.clientX,_.grab_and_scroll__first_clientY=e.clientY,_.grab_and_scroll__last_clientX=e.clientX,_.grab_and_scroll__last_clientY=e.clientY,_.grab_and_scroll__$el=$(e.target).parentsUntil($wrapper),_.grab_and_scroll__$el__ev_handler_attached=!1,$wrapper.addClass("frzTbl--grab-and-scroll--grabbing"),_.el.$table.trigger("freeze_table__grab_and_scroll__start"),$body.one("mouseup",(function(){_.grab_and_scroll__grabbed=!1,$wrapper.removeClass("frzTbl--grab-and-scroll--grabbing"),_.el.$table.trigger("freeze_table__grab_and_scroll__stop"),_.timeout.grab_and_scroll=setTimeout((function(){_.grab_and_scroll__$el.off("click.freeze_table.grab_and_scroll_"+_.namespace)}),1)})))})),$body.on("mousemove.freeze_table.grab_and_scroll_"+_.namespace,(function(e){if(_.grab_and_scroll__grabbed){var diff_x=e.clientX-_.grab_and_scroll__last_clientX;_.grab_and_scroll__last_pos_x+=parseFloat(diff_x),_.horizontal_scroll(-diff_x),_.grab_and_scroll__last_clientX=e.clientX;var diff_y=e.clientY-_.grab_and_scroll__last_clientY;_.grab_and_scroll__last_pos_y+=parseFloat(diff_y),_.vertical_scroll(-diff_y),_.grab_and_scroll__last_clientY=e.clientY,(Math.abs(_.grab_and_scroll__last_clientX-_.grab_and_scroll__first_clientX)>2||Math.abs(_.grab_and_scroll__last_clientY-_.grab_and_scroll__first_clientY)>2)&&!_.grab_and_scroll__$el__ev_handler_attached&&(_.grab_and_scroll__$el.one("click.freeze_table.grab_and_scroll_"+_.namespace,(function(e){e.preventDefault(),e.stopPropagation()})),_.grab_and_scroll__$el__ev_handler_attached=!0),_.el.$table.trigger("freeze_table__grab_and_scroll__dragging")}})),$("img, a",$wrapper).on("dragstart.freeze_table.grab_and_scroll_"+_.namespace,(function(e){e.preventDefault()})))},FreezeTable.prototype.insert_heading_in_template=function(){if(this.get_breakpoint_options().heading){var $heading=this.clone_table();$heading.find("tbody").remove(),this.tpl=this.tpl.replace(/{{heading}}/g,$heading[0].outerHTML)}else this.tpl=this.tpl.replace(/{{heading}}/g,"")},FreezeTable.prototype.toggle_shadow_columns_in_template=function(){["left","right"].forEach(direction=>{var reg=new RegExp(`{{hide-${direction}-column}}`,"g");(settings=this.get_breakpoint_options()[direction])?this.tpl=this.tpl.replace(reg,""):this.tpl=this.tpl.replace(reg,"frzTbl-frozen-columns-wrapper__columns--empty")})},FreezeTable.prototype.resize_freeze_heading=function(){var settings=this.get_breakpoint_options(),offset=settings.offset&&"string"==typeof settings.offset?parseFloat(settings.offset.replace("px","")):settings.offset||0,heading_height=this.el.$table.children("thead").children("tr")[0].getBoundingClientRect().height,heading_width=this.el.$wrapper[0].getBoundingClientRect().width,gap_top=parseInt(this.el.$table.css("border-top-width")),heading_border=parseInt(this.el.$table.find("> thead > tr").css("border-bottom-width"));isNaN(offset)&&("string"==typeof offset?offset=$(offset).height():"object"==typeof offset&&(offset=offset.height())),gap_top%2&&--gap_top,gap_top*=.5,this.el.$fixedHeadingWrapperOuter.css({height:heading_height+gap_top+heading_border,top:parseFloat(offset)+"px",width:heading_width}),settings._sticky_outer_heading?this.el.$fixedHeadingWrapperOuter.show():this.el.$fixedHeadingWrapperOuter.hide(),settings.heading&&heading_height||this.el.$fixedHeadingWrapperOuter.css({position:"relative",top:"",width:""})},FreezeTable.prototype.freeze_columns=function(){var settings=this.get_breakpoint_options();this.el.$css||(this.el.$css=$(`<style id="freeze-table-css-${this.namespace}"></style>`),$("head").append(this.el.$css));var sticky_css="",offset_css="",border_fix_css="";["left","right"].forEach(direction=>{if(settings[direction]){for(var i=1,x=parseInt(settings[direction]),column_selectors=[],nth_filter="left"==direction?"nth-child":"nth-last-child",cumulative_width=0;i<=x;){var ft_container_selector=`[data-freeze-table-namespace="${this.namespace}"]`,heading_selector,cell_selector,column_selector_current=`${`${ft_container_selector} .wcpt-cell:${nth_filter}(${i})`}, ${`${ft_container_selector} .wcpt-heading:${nth_filter}(${i})`}`;column_selectors.push(column_selector_current),cumulative_width&&(offset_css+=` ${column_selector_current} { ${direction}: ${cumulative_width}px; }  `);var first_column_cell_selector,$column=$(`${ft_container_selector} .wcpt-table > tbody > .wcpt-row:first-child > .wcpt-cell:${nth_filter}(${i})`),columnWidth;if($column.length)cumulative_width+=$column[0].getBoundingClientRect().width;++i}column_selectors.join(", "),sticky_css+=column_selectors.join(", ")+` {position: sticky; ${direction}: 0; z-index: 1; transform: translateZ(0);} `,sticky_css+=column_selectors.join(", ").split(", ").join(":after, ")+':after  {content: ""; position: absolute; width: 0; height: 100%; right: 0; top: 0; border-right: inherit; background: inherit; transform: translateX(100%);} '}}),this.el.$css.html(sticky_css+offset_css+"")},FreezeTable.prototype.resize_column_shadows=function(){var settings=this.get_breakpoint_options(),$table=this.el.$table;if(settings.left){for(var cumulative_width=0,i=settings.left;i;){var $column,columnWidth;if(($column=$(`> tbody > tr > td:nth-child(${i})`,$table)).length)cumulative_width+=columnWidth=$column[0].getBoundingClientRect().width;--i}this.el.$frozenColumnsLeft.width(cumulative_width)}if(settings.right){for(var cumulative_width=0,i=settings.right;i;){var $column,columnWidth;if(($column=$(`> tbody > tr > td:nth-last-child(${i})`,$table)).length)cumulative_width+=columnWidth=$column[0].getBoundingClientRect().width;--i}this.el.$frozenColumnsRight.width(cumulative_width)}},FreezeTable.prototype.clone_table=function(){var $cloneTable=this.el.$table.clone();return $cloneTable.css({width:"","min-width":""}).addClass("frzTbl-clone-table"),$("> tbody > tr > td, > thead > tr > th",$cloneTable).each((function(){var $this=$(this);$this.attr({"data-index":$this.index()})})),$cloneTable},FreezeTable.prototype.resize_clone_cells=function(){var $table=this.el.$table,$cloneTables=this.get_clone_tables(),$cloneCells=$("> tbody > tr > td, > thead > tr > th",$cloneTables),dimensions=[];$cloneCells.each((function(){var $this=$(this),$row=$this.parent(),wrapper,selector="> "+($row.parent().is("thead")?"thead":"tbody")+" > tr:nth-child("+($row.index()+1)+") > *:nth-child("+(parseInt($this.attr("data-index"))+1)+")",$original=$(selector,$table);dimensions.push({width:$original[0].getBoundingClientRect().width,rowOuterHeight:$original.parent()[0].getBoundingClientRect().height})})),$cloneCells.each((function(i){var $this=$(this);$this.css({width:dimensions[i].width,minWidth:dimensions[i].width}),$this.parent().outerHeight(dimensions[i].rowOuterHeight)}));var $heading,heading_height=this.el.$table.children("thead")[0].getBoundingClientRect().height,gap_top=parseInt(this.el.$table.css("border-top-width"));gap_top%2&&--gap_top,gap_top*=.5},FreezeTable.prototype.get_clone_tables=function(){var $table=this.el.$table,$cloneTables=$();return $.each(this.el,(function(name,$el){var $childTables=$el.children().filter((function(){return $(this).is("table")&&this!==$table[0]}));$cloneTables=$cloneTables.add($childTables)})),$cloneTables},FreezeTable.prototype.page_scroll=function(e){if(e.target===document){var settings=this.get_breakpoint_options(),offset=settings.offset&&"string"==typeof settings.offset?parseFloat(settings.offset.replace("px","")):settings.offset||0,top_limit=offset,bottom_limit=offset+100,table_rect=this.el.$table[0].getBoundingClientRect(),border_collapse=this.el.$table.css("border-collapse"),border_spacing="separate"===border_collapse?parseInt(this.el.$table.css("border-spacing").split(" ")[1]):0;"separate"===border_collapse&&(table_rect={top:table_rect.top+border_spacing,bottom:table_rect.bottom-border_spacing});var scrolled_above_top=table_rect.top>=top_limit,scrolled_completely_above_top=table_rect.top>window.innerHeight,scrolled_below_bottom=table_rect.bottom<window.innerHeight,scrolled_completely_below_bottom=table_rect.bottom<=bottom_limit;scrolled_above_top?this.el.$wrapper.addClass("frzTbl--scrolled-above-top"):this.el.$wrapper.removeClass("frzTbl--scrolled-above-top"),scrolled_completely_above_top?this.el.$wrapper.addClass("frzTbl--scrolled-completely-above-top"):this.el.$wrapper.removeClass("frzTbl--scrolled-completely-above-top"),scrolled_below_bottom?this.el.$wrapper.addClass("frzTbl--scrolled-below-bottom"):this.el.$wrapper.removeClass("frzTbl--scrolled-below-bottom"),scrolled_completely_below_bottom?this.el.$wrapper.addClass("frzTbl--scrolled-completely-below-bottom"):this.el.$wrapper.removeClass("frzTbl--scrolled-completely-below-bottom")}},FreezeTable.prototype.wrapper_wheel=function(e){if(e.originalEvent.deltaY&&(!e.originalEvent.deltaX||Math.abs(e.originalEvent.deltaY/e.originalEvent.deltaX)>.1)&&!this.get_breakpoint_options().wrapperHeight)return!0;var $wrapper=this.el.$wrapper,scrolling="frzTbl--scrolling";$wrapper.addClass(scrolling),clearTimeout(this.timeout.scroll_clear),this.timeout.scroll_clear=setTimeout((function(){$wrapper.removeClass(scrolling)}),300),e.preventDefault(),this.options.captureScroll&&this.options.wrapperHeight||(this.el.$scrollOverlay[0].scrollHeight==this.el.$scrollOverlay.height()||e.originalEvent.deltaY>0&&this.el.$scrollOverlay[0].scrollTop+this.el.$scrollOverlay.height()==this.el.$scrollOverlayInner.height()||e.originalEvent.deltaY<0&&!this.el.$scrollOverlay[0].scrollTop)&&($("html")[0].scrollTop+=e.originalEvent.deltaY,$("body")[0].scrollTop+=e.originalEvent.deltaY)},FreezeTable.prototype.wrapper_touch=function(e){if("touchstart"==e.type&&this.el.$scrollOverlay.stop(!0),"touchmove"==e.type&&!1!==this.ev.prevClientX){var diffX=this.ev.prevClientX-e.originalEvent.touches[0].clientX,diffY,e2={originalEvent:{deltaX:diffX,deltaY:this.ev.prevClientY-e.originalEvent.touches[0].clientY}};this.scrollOverlay_wheel(e2),Math.abs(diffX)>5?this.ev.animScroll=20*diffX+this.el.$scrollOverlay[0].scrollLeft:this.ev.animScroll=!1}"touchend"==e.type?(this.ev.animScroll&&(this.el.$scrollOverlay.animate({scrollLeft:this.ev.animScroll},{specialEasing:{scrollLeft:"FreezeTable_easeOutQuad"}}),this.ev.animScroll=!1),this.ev.prevClientX=!1,this.ev.prevClientY=!1):(this.ev.prevClientX=e.originalEvent.touches[0].clientX,this.ev.prevClientY=e.originalEvent.touches[0].clientY)},FreezeTable.prototype.scrollOverlay_wheel=function(e){var deltaX=e.originalEvent.deltaX||0,deltaY=e.originalEvent.deltaY||0;this.horizontal_scroll(deltaX)},FreezeTable.prototype.horizontal_scroll=function(deltaX,deltaY){var $scrollOverlay=this.el.$scrollOverlay,scrollTop=this.layout_memory.scrollTop,scrollLeft=this.layout_memory.scrollLeft,scrollOverlayWidth=this.layout_memory.scrollOverlayWidth,scrollOverlayInnerWidth=this.layout_memory.scrollOverlayInnerWidth,mode="scroll";deltaX||(deltaX=0),deltaY||(deltaY=0),0==deltaX&&0==deltaY&&(deltaX=$scrollOverlay[0].scrollLeft-this.layout_memory.scrollLeft),scrollTop+=deltaY,(scrollLeft+=deltaX)<0&&(scrollLeft=0),scrollLeft+scrollOverlayWidth+1>scrollOverlayInnerWidth&&(scrollLeft=scrollOverlayInnerWidth-scrollOverlayWidth),this.layout_memory.scrollTop=scrollTop,this.layout_memory.scrollLeft=scrollLeft,$scrollOverlay[0].scrollTop=scrollTop,$scrollOverlay[0].scrollLeft=scrollLeft,this.el.$tableWrapper[0].scrollLeft=scrollLeft,this.el.$fixedHeadingWrapper[0].scrollLeft=scrollLeft,this.el.$wrapper.removeClass("frzTbl--scrolled-to-left-edge frzTbl--scrolled-to-right-edge"),scrollLeft||this.el.$wrapper.addClass("frzTbl--scrolled-to-left-edge"),scrollLeft+scrollOverlayWidth>=scrollOverlayInnerWidth&&this.el.$wrapper.addClass("frzTbl--scrolled-to-right-edge")},FreezeTable.prototype.vertical_scroll=function(deltaY){$("html")[0].scrollTop+=deltaY,$("body")[0].scrollTop+=deltaY},FreezeTable.prototype.get_breakpoint_options=function(){var settings=this.get_options(),current_bp=this.current_breakpoint(),ops;return current_bp?$.extend(!0,{},this.default_options,settings.breakpoint[current_bp]):settings},FreezeTable.prototype.get_options=function(){return $.extend(!0,{},this.options)},FreezeTable.prototype.table_resize_handler=function(source){var _table_resize_handler=$.proxy(this,"_table_resize_handler");clearTimeout(this.timeout.table_resize_handler),this.timeout.table_resize_handler=setTimeout(_table_resize_handler,100)},FreezeTable.prototype.table_resize_required=function(){return!!(this.has_heading_width_changed()||this.has_column_width_changed()||this.has_table_height_changed()||this.has_wrapper_width_changed())},FreezeTable.prototype.has_heading_width_changed=function(){if(!this.env.heading_row_cells_width)return!0;var _=this,change=!1;return this.el.$headingRowCells.each((function(i){$(this).width()!==_.env.heading_row_cells_width[i]&&(change=!0)})),change},FreezeTable.prototype.has_column_width_changed=function(){if(!this.env.first_row_cells_width)return!0;var _=this,change=!1;return this.el.$firstRowCells.each((function(i){$(this).width()!==_.env.first_row_cells_width[i]&&(change=!0)})),change},FreezeTable.prototype.has_table_height_changed=function(){return!this.env.tableHeight||this.env.tableHeight!==this.el.$table.height()},FreezeTable.prototype.has_wrapper_width_changed=function(){return!this.env.wrapperWidth||this.env.wrapperWidth!==this.el.$wrapper.width()},FreezeTable.prototype._table_resize_handler=function(){this.pause||(this.crossed_breakpoint()?this.reload():this.table_resize_required()&&(this.manage_overflow(),this.resize_clone_cells(),this.freeze_columns(),this.resize_column_shadows(),this.resize_freeze_heading(),1>Math.abs(this.el.$wrapper.innerWidth()-this.el.$table.outerWidth())&&this.el.$wrapper.addClass("frzTbl--scrolled-to-left-edge frzTbl--scrolled-to-right-edge"),this.update_env({wrapperWidth:this.el.$wrapper.width(),wrapperHeight:this.el.$wrapper.height(),tableWidth:this.el.$table.width(),tableHeight:this.el.$table.height()})))},FreezeTable.prototype.manage_overflow=function(){if(this.manage_overflow_required()){this.reset_overflow();var scrollLeft=this.el.$scrollOverlay[0].scrollLeft;this.controlled_overflow_qualified()?this.apply_controlled_overflow():this.unrestricted_overflow_qualified()?this.apply_unrestricted_overflow():this.apply_normal_overflow(),this.antiscroll(),this.el.$scrollOverlay[0].scrollLeft=scrollLeft}else this.apply_wrapper_sizing_for_current_mode()},FreezeTable.prototype.manage_overflow_required=function(){return!(!jQuery.isEmptyObject(this.env)&&this.env.wrapperWidth===this.el.$wrapper.width()&&this.env.tableWidth===this.el.$table.width())},FreezeTable.prototype.reset_overflow=function(){this.el.$wrapper.removeClass("frzTbl--controlled-overflow frzTbl--unrestricted-overflow frzTbl--normal-overflow frzTbl--intrinsic-height"),this.el.$table.css({"min-width":""}),this.el.$scrollOverlayInner.css({height:"",width:""}),this.el.$wrapper.css({height:""}),this.el.$tableInner.removeClass("frzTbl-table-wrapper__inner--deflate")},FreezeTable.prototype.horizontal_overflow_active=function(){var tw,ww;return this.el.$table.width()-this.el.$wrapper.width()>=5},FreezeTable.prototype.intrinsic_height_qualifies=function(){return!this.controlled_overflow_qualified()&&!this.horizontal_overflow_active()},FreezeTable.prototype.apply_intrinsic_dimensions=function(){this.el.$wrapper.addClass("frzTbl--intrinsic-height"),this.el.$wrapper.css({height:"",minHeight:""}),this.el.$scrollOverlayInner.css({height:"",width:"",minHeight:"",minWidth:""})},FreezeTable.prototype.apply_wrapper_sizing_for_current_mode=function(){this.intrinsic_height_qualifies()?this.apply_intrinsic_dimensions():this.resize_wrapper_and_scroll_to_table()},FreezeTable.prototype.finalize_overflow_layout=function(table_dimensions){this.intrinsic_height_qualifies()?this.apply_intrinsic_dimensions():this.resize_wrapper_and_scroll_to_table(table_dimensions)},FreezeTable.prototype.controlled_overflow_qualified=function(){var user_forced_table_width=this.get_parsed_user_forced_table_width();return!!(user_forced_table_width&&user_forced_table_width>this.el.$tableWrapper.width())},FreezeTable.prototype.apply_controlled_overflow=function(){this.el.$wrapper.addClass("frzTbl--controlled-overflow");var table_width=this.get_parsed_user_forced_table_width();this.el.$table.css({width:table_width});var table_height=this.el.$table.outerHeight();this.finalize_overflow_layout({width:table_width,height:table_height})},FreezeTable.prototype.get_parsed_user_forced_table_width=function(){var breakpoint_settings=this.get_breakpoint_options(),user_table_width=!!breakpoint_settings.tableWidth&&breakpoint_settings.tableWidth,table_wrapper_width=this.el.$wrapper.width();if(user_table_width&&("px"==(user_table_width=user_table_width.replaceAll(/\s/g,"")).slice(-2)&&(user_table_width=user_table_width.slice(0,-2)),"+"===user_table_width.charAt(0))){var _figure=user_table_width.substring(1);user_table_width=!isNaN(_figure)&&parseInt(user_table_width.substring(1))+table_wrapper_width}return user_table_width},FreezeTable.prototype.unrestricted_overflow_qualified=function(){var breakpoint_settings=this.get_breakpoint_options();return!(!breakpoint_settings.left&&!breakpoint_settings.right)},FreezeTable.prototype.apply_unrestricted_overflow=function(){this.el.$wrapper.addClass("frzTbl--unrestricted-overflow"),this.el.$tableInner.addClass("frzTbl-table-wrapper__inner--unrestrict-table-wrapper");var table_width=Math.max(this.el.$table.outerWidth(),this.el.$wrapper.innerWidth());table_height=this.el.$table.outerHeight(),table_width>this.el.$wrapper.width()&&++table_width,this.el.$tableInner.removeClass("frzTbl-table-wrapper__inner--unrestrict-table-wrapper"),this.el.$table.css({"min-width":table_width}),this.finalize_overflow_layout({width:table_width,height:table_height})},FreezeTable.prototype.apply_normal_overflow=function(){this.el.$wrapper.addClass("frzTbl--normal-overflow"),this.el.$tableInner.addClass("frzTbl-table-wrapper__inner--deflate");var table_width=this.el.$table.outerWidth(),table_height=this.el.$table.outerHeight();this.finalize_overflow_layout({width:table_width,height:table_height})},FreezeTable.prototype.resize_wrapper_and_scroll_to_table=function(table_dimensions){table_dimensions||(table_dimensions={}),this.el.$wrapper.removeClass("frzTbl--intrinsic-height"),table_dimensions.height||(table_dimensions.height=this.el.$table.outerHeight()),table_dimensions.width||(table_dimensions.width=this.el.$table.outerWidth()),this.el.$scrollOverlayInner.css({height:table_dimensions.height,width:table_dimensions.width}),this.el.$wrapper.css({height:table_dimensions.height})},FreezeTable.prototype.attach_resize_observers=function(e){var _=this;_.resize_observers||(_.resize_observers={container_observer:new ResizeObserver(()=>{_.table_resize_handler("*container resize*")}),table_observer:new ResizeObserver(()=>{_.table_resize_handler("*table resize*")}),heading_row_cells_observer:new ResizeObserver(()=>{_.table_resize_handler("*heading row cells resize*")}),first_row_cells_observer:new ResizeObserver(()=>{_.table_resize_handler("*first row cells resize*")})}),_.resize_observers.container_observer.observe(this.el.$wrapper[0]),_.resize_observers.table_observer.observe(this.el.$table[0]),$("> thead > tr:last-child > th",this.el.$table).each((function(){_.resize_observers.heading_row_cells_observer.observe(this)})),$("> tbody > tr:first-child > td",this.el.$table).each((function(){_.resize_observers.first_row_cells_observer.observe(this)}))},FreezeTable.prototype.disconnect_resize_observers=function(){for(var resize_observer in this.resize_observers)Object.hasOwn(this.resize_observers,resize_observer)&&this.resize_observers[resize_observer].disconnect()},FreezeTable.prototype.antiscroll=function(){var $scrollOverlay=this.el.$scrollOverlay;this.layout_memory={scrollTop:$scrollOverlay[0].scrollTop=0,scrollLeft:$scrollOverlay[0].scrollLeft=0,scrollOverlayWidth:$scrollOverlay.width(),scrollOverlayInnerWidth:this.el.$scrollOverlayInner.width()},this.el.$wrapper.antiscroll(),this.el.$wrapper.children("> .frzTbl-antiscroll-control-wrap").remove().end().children(".antiscroll-scrollbar-horizontal").wrap('<div class="frzTbl-antiscroll-control-wrap">'),this.el.$table.width()-this.el.$wrapper.width()<5?this.el.$wrapper.addClass("frzTbl--hide-antiscroll"):this.el.$wrapper.removeClass("frzTbl--show-antiscroll")},FreezeTable.prototype.crossed_breakpoint=function(){var crossed_breakpoint;return this.current_breakpoint()!==this.env.breakpoint},FreezeTable.prototype.update_env=function(new_data){this.env=$.extend(!0,{},this.env,new_data)},FreezeTable.prototype.get_heading_row_cells_width=function(){var arr=[];return this.el.$headingRowCells.each((function(i){arr.push($(this).width())})),arr},FreezeTable.prototype.get_first_row_cells_width=function(){var arr=[];return this.el.$firstRowCells.each((function(i){arr.push($(this).width())})),arr},FreezeTable.prototype.current_breakpoint=function(){var settings=this.get_options(),breakpoint=!1,windowWidth=$(window).width();return!!settings.breakpoint&&($.each(settings.breakpoint,(function(bp,bp_settings){var bp;if((bp=parseInt(bp))<windowWidth)return!0;(!breakpoint||bp<breakpoint)&&(breakpoint=bp)})),breakpoint)},FreezeTable.prototype.destroy=function(){this.clear_handlers(),this.clear_timeouts(),this.disconnect_resize_observers(),this.unwrap(),this.el.$table.removeData("freezeTable")},FreezeTable.prototype.clear_handlers=function(){this.el.$window.off("resize.ft"+this.namespace)},FreezeTable.prototype.clear_timeouts=function(){for(var timeout in this.timeout)Object.hasOwn(this.timeout,timeout)&&clearTimeout(timeout)},FreezeTable.prototype.unwrap=function(){var $table=this.el.$table,$wrapper=this.el.$wrapper;$table.removeClass("frzTbl-table").css({width:"","min-width":""}),$wrapper&&$wrapper.length&&($table.insertBefore($wrapper),$wrapper.remove())},FreezeTable.prototype.reload=function(options){var $table=this.el.$table,options=options||this.get_options();this.destroy(),$table.freezeTable(options)},$.extend($.easing,{FreezeTable_easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b}})}(jQuery);