Series Editor updated

New: Series Editor controls are always visible
New: Can shift-click to select series in editor
Fixed: Maximum form elements increased
This commit is contained in:
Mark McDowall 2012-09-14 20:24:34 -07:00
parent ad47bd275b
commit c181096b51
12 changed files with 2308 additions and 754 deletions

View File

@ -28,11 +28,19 @@ table.dataTable thead th {
*cursor: hand;
}
table.dataTable tfoot th
{
padding: 3px 18px 3px 10px;
border-top: 1px solid black;
font-weight: bold;
table.dataTable tfoot th {
font-family: "Segoe UI Light" , "Open Sans" , "Segoe UI" , sans-serif;
border-width: 300;
font-size: 17px;
padding: 2px;
border-style: none;
border-color: #EEEEEE;
padding-left: 7px;
text-align: left;
background-color: white;
font-weight: lighter;
cursor: pointer;
*cursor: hand;
}
table.dataTable td {

View File

@ -0,0 +1,60 @@
.masterControls {
margin-top: 10px;
overflow: hidden;
}
.checkboxColumn {
width: 110px;
text-align: center;
}
.buttons {
width: 600px;
text-align: center;
}
table input[type="text"], table select {
margin: 2px 2px;
}
td .path {
width: 300px;
}
td .backlogSetting {
width: 100px;
}
td .quality {
width: 120px;
}
th .footer-control {
width: 100px;
}
th .footer-control-quality {
width: 120px;
}
#stylized, .settingsForm {
overflow: hidden;
}
#stylized {
float: left;
}
#changesOverview {
margin-top: 15px;
float: left;
font-size: 20px;
}
#seriesEditorGrid tfoot {
background-color: lightgrey;
}
#editToggleMaster {
margin-left: 5px;
}

View File

@ -11,6 +11,7 @@ using NzbDrone.Core.Providers.Core;
using NzbDrone.Core.Repository;
using NzbDrone.Web.Filters;
using NzbDrone.Web.Models;
using TvdbLib.Exceptions;
namespace NzbDrone.Web.Controllers
{
@ -186,18 +187,34 @@ namespace NzbDrone.Web.Controllers
[HttpGet]
public JsonResult LookupSeries(string term)
{
var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel
{
Id = r.Id,
Title = r.SeriesName,
DisplayedTitle = r.FirstAired.Year > 1900 && !r.SeriesName.EndsWith("(" + r.FirstAired.Year + ")")
?string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
:r.SeriesName,
Banner = r.Banner.BannerPath,
Url = String.Format("http://www.thetvdb.com/?tab=series&id={0}", r.Id)
}).ToList();
try
{
var tvDbResults = _tvDbProvider.SearchSeries(term).Select(r => new TvDbSearchResultModel
{
Id = r.Id,
Title = r.SeriesName,
DisplayedTitle = r.FirstAired.Year > 1900 && !r.SeriesName.EndsWith("(" + r.FirstAired.Year + ")")
? string.Format("{0} ({1})", r.SeriesName, r.FirstAired.Year)
: r.SeriesName,
Banner = r.Banner.BannerPath,
Url = String.Format("http://www.thetvdb.com/?tab=series&id={0}", r.Id)
}).ToList();
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
return Json(tvDbResults, JsonRequestBehavior.AllowGet);
}
catch(TvdbNotAvailableException ex)
{
logger.WarnException("Unable to lookup series on TheTVDB", ex);
return JsonNotificationResult.Info("Lookup Failed", "TheTVDB is not available at this time.");
}
catch(Exception ex)
{
logger.WarnException("Unknown Error when looking up series on TheTVDB", ex);
return JsonNotificationResult.Info("Lookup Failed", "Unknown error while connecting to TheTVDB");
}
}
public ActionResult RootList()

View File

@ -153,6 +153,7 @@
<Compile Include="Controllers\SearchHistoryController.cs" />
<Compile Include="Helpers\Validation\RequiredIfAnyAttribute.cs" />
<Compile Include="Helpers\Validation\RequiredIfAttribute.cs" />
<Content Include="Content\SeriesEditor.css" />
<Content Include="Content\DataTables-1.9.0\media\css\jquery.dataTables.css" />
<Content Include="Content\DataTables-1.9.0\media\images\back.png" />
<Content Include="Content\DataTables-1.9.0\media\images\forward.png" />
@ -360,6 +361,8 @@
<Content Include="favicon.ico" />
<Content Include="Global.asax" />
<Content Include="Scripts\conditional-validation.js" />
<Content Include="Scripts\DataTables-1.9.0\media\js\FixedHeader.js" />
<Content Include="Scripts\DataTables-1.9.0\media\js\FixedHeader.min.js" />
<Content Include="Scripts\DataTables-1.9.0\media\js\jquery.dataTables.reloadAjax.js" />
<Content Include="Scripts\DataTables-1.9.0\media\js\jquery.dataTables.editable.js" />
<Content Include="Scripts\DataTables-1.9.0\media\js\jquery.dataTables.js" />
@ -388,6 +391,7 @@
<Content Include="Scripts\NzbDrone\addSeries.js" />
<Content Include="Scripts\NzbDrone\AutoComplete.js" />
<Content Include="Scripts\jquery.dataTables.4button.pagination.js" />
<Content Include="Scripts\NzbDrone\common.js" />
<Content Include="Scripts\NzbDrone\series.js" />
<Content Include="Scripts\NzbDrone\qualitySettings.js" />
<Content Include="Scripts\NzbDrone\grid.js" />

View File

@ -0,0 +1,937 @@
/*
* File: FixedHeader.js
* Version: 2.0.6
* Description: "Fix" a header at the top of the table, so it scrolls with the table
* Author: Allan Jardine (www.sprymedia.co.uk)
* Created: Wed 16 Sep 2009 19:46:30 BST
* Language: Javascript
* License: GPL v2 or BSD 3 point style
* Project: Just a little bit of fun - enjoy :-)
* Contact: www.sprymedia.co.uk/contact
*
* Copyright 2009-2012 Allan Jardine, all rights reserved.
*
* This source file is free software, under either the GPL v2 license or a
* BSD style license, available at:
* http://datatables.net/license_gpl2
* http://datatables.net/license_bsd
*/
/*
* Function: FixedHeader
* Purpose: Provide 'fixed' header, footer and columns on an HTML table
* Returns: object:FixedHeader - must be called with 'new'
* Inputs: mixed:mTable - target table
* 1. DataTable object - when using FixedHeader with DataTables, or
* 2. HTML table node - when using FixedHeader without DataTables
* object:oInit - initialisation settings, with the following properties (each optional)
* bool:top - fix the header (default true)
* bool:bottom - fix the footer (default false)
* bool:left - fix the left most column (default false)
* bool:right - fix the right most column (default false)
* int:zTop - fixed header zIndex
* int:zBottom - fixed footer zIndex
* int:zLeft - fixed left zIndex
* int:zRight - fixed right zIndex
*/
var FixedHeader = function ( mTable, oInit ) {
/* Sanity check - you just know it will happen */
if ( typeof this.fnInit != 'function' )
{
alert( "FixedHeader warning: FixedHeader must be initialised with the 'new' keyword." );
return;
}
var that = this;
var oSettings = {
"aoCache": [],
"oSides": {
"top": true,
"bottom": false,
"left": false,
"right": false
},
"oZIndexes": {
"top": 104,
"bottom": 103,
"left": 102,
"right": 101
},
"oMes": {
"iTableWidth": 0,
"iTableHeight": 0,
"iTableLeft": 0,
"iTableRight": 0, /* note this is left+width, not actually "right" */
"iTableTop": 0,
"iTableBottom": 0 /* note this is top+height, not actually "bottom" */
},
"oOffset": {
"top": 0
},
"nTable": null,
"bUseAbsPos": false,
"bFooter": false
};
/*
* Function: fnGetSettings
* Purpose: Get the settings for this object
* Returns: object: - settings object
* Inputs: -
*/
this.fnGetSettings = function () {
return oSettings;
};
/*
* Function: fnUpdate
* Purpose: Update the positioning and copies of the fixed elements
* Returns: -
* Inputs: -
*/
this.fnUpdate = function () {
this._fnUpdateClones();
this._fnUpdatePositions();
};
/*
* Function: fnPosition
* Purpose: Update the positioning of the fixed elements
* Returns: -
* Inputs: -
*/
this.fnPosition = function () {
this._fnUpdatePositions();
};
/* Let's do it */
this.fnInit( mTable, oInit );
/* Store the instance on the DataTables object for easy access */
if ( typeof mTable.fnSettings == 'function' )
{
mTable._oPluginFixedHeader = this;
}
};
/*
* Variable: FixedHeader
* Purpose: Prototype for FixedHeader
* Scope: global
*/
FixedHeader.prototype = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Initialisation
*/
/*
* Function: fnInit
* Purpose: The "constructor"
* Returns: -
* Inputs: {as FixedHeader function}
*/
fnInit: function ( oTable, oInit )
{
var s = this.fnGetSettings();
var that = this;
/* Record the user definable settings */
this.fnInitSettings( s, oInit );
/* DataTables specific stuff */
if ( typeof oTable.fnSettings == 'function' )
{
if ( typeof oTable.fnVersionCheck == 'functon' &&
oTable.fnVersionCheck( '1.6.0' ) !== true )
{
alert( "FixedHeader 2 required DataTables 1.6.0 or later. "+
"Please upgrade your DataTables installation" );
return;
}
var oDtSettings = oTable.fnSettings();
if ( oDtSettings.oScroll.sX != "" || oDtSettings.oScroll.sY != "" )
{
alert( "FixedHeader 2 is not supported with DataTables' scrolling mode at this time" );
return;
}
s.nTable = oDtSettings.nTable;
oDtSettings.aoDrawCallback.push( {
"fn": function () {
FixedHeader.fnMeasure();
that._fnUpdateClones.call(that);
that._fnUpdatePositions.call(that);
},
"sName": "FixedHeader"
} );
}
else
{
s.nTable = oTable;
}
s.bFooter = ($('>tfoot', s.nTable).length > 0) ? true : false;
/* "Detect" browsers that don't support absolute positioing - or have bugs */
s.bUseAbsPos = (jQuery.browser.msie && (jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0"));
/* Add the 'sides' that are fixed */
if ( s.oSides.top )
{
s.aoCache.push( that._fnCloneTable( "fixedHeader", "FixedHeader_Header", that._fnCloneThead ) );
}
if ( s.oSides.bottom )
{
s.aoCache.push( that._fnCloneTable( "fixedFooter", "FixedHeader_Footer", that._fnCloneTfoot ) );
}
if ( s.oSides.left )
{
s.aoCache.push( that._fnCloneTable( "fixedLeft", "FixedHeader_Left", that._fnCloneTLeft ) );
}
if ( s.oSides.right )
{
s.aoCache.push( that._fnCloneTable( "fixedRight", "FixedHeader_Right", that._fnCloneTRight ) );
}
/* Event listeners for window movement */
FixedHeader.afnScroll.push( function () {
that._fnUpdatePositions.call(that);
} );
jQuery(window).resize( function () {
FixedHeader.fnMeasure();
that._fnUpdateClones.call(that);
that._fnUpdatePositions.call(that);
} );
/* Get things right to start with */
FixedHeader.fnMeasure();
that._fnUpdateClones();
that._fnUpdatePositions();
},
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Support functions
*/
/*
* Function: fnInitSettings
* Purpose: Take the user's settings and copy them to our local store
* Returns: -
* Inputs: object:s - the local settings object
* object:oInit - the user's settings object
*/
fnInitSettings: function ( s, oInit )
{
if ( typeof oInit != 'undefined' )
{
if ( typeof oInit.top != 'undefined' ) {
s.oSides.top = oInit.top;
}
if ( typeof oInit.bottom != 'undefined' ) {
s.oSides.bottom = oInit.bottom;
}
if ( typeof oInit.left != 'undefined' ) {
s.oSides.left = oInit.left;
}
if ( typeof oInit.right != 'undefined' ) {
s.oSides.right = oInit.right;
}
if ( typeof oInit.zTop != 'undefined' ) {
s.oZIndexes.top = oInit.zTop;
}
if ( typeof oInit.zBottom != 'undefined' ) {
s.oZIndexes.bottom = oInit.zBottom;
}
if ( typeof oInit.zLeft != 'undefined' ) {
s.oZIndexes.left = oInit.zLeft;
}
if ( typeof oInit.zRight != 'undefined' ) {
s.oZIndexes.right = oInit.zRight;
}
if ( typeof oInit.offsetTop != 'undefined' ) {
s.oOffset.top = oInit.offsetTop;
}
}
/* Detect browsers which have poor position:fixed support so we can use absolute positions.
* This is much slower since the position must be updated for each scroll, but widens
* compatibility
*/
s.bUseAbsPos = (jQuery.browser.msie &&
(jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0"));
},
/*
* Function: _fnCloneTable
* Purpose: Clone the table node and do basic initialisation
* Returns: -
* Inputs: -
*/
_fnCloneTable: function ( sType, sClass, fnClone )
{
var s = this.fnGetSettings();
var nCTable;
/* We know that the table _MUST_ has a DIV wrapped around it, because this is simply how
* DataTables works. Therefore, we can set this to be relatively position (if it is not
* alreadu absolute, and use this as the base point for the cloned header
*/
if ( jQuery(s.nTable.parentNode).css('position') != "absolute" )
{
s.nTable.parentNode.style.position = "relative";
}
/* Just a shallow clone will do - we only want the table node */
nCTable = s.nTable.cloneNode( false );
nCTable.removeAttribute( 'id' );
var nDiv = document.createElement( 'div' );
nDiv.style.position = "absolute";
nDiv.style.top = "0px";
nDiv.style.left = "0px";
nDiv.className += " FixedHeader_Cloned "+sType+" "+sClass;
/* Set the zIndexes */
if ( sType == "fixedHeader" )
{
nDiv.style.zIndex = s.oZIndexes.top;
}
if ( sType == "fixedFooter" )
{
nDiv.style.zIndex = s.oZIndexes.bottom;
}
if ( sType == "fixedLeft" )
{
nDiv.style.zIndex = s.oZIndexes.left;
}
else if ( sType == "fixedRight" )
{
nDiv.style.zIndex = s.oZIndexes.right;
}
/* remove margins since we are going to poistion it absolutely */
nCTable.style.margin = "0";
/* Insert the newly cloned table into the DOM, on top of the "real" header */
nDiv.appendChild( nCTable );
document.body.appendChild( nDiv );
return {
"nNode": nCTable,
"nWrapper": nDiv,
"sType": sType,
"sPosition": "",
"sTop": "",
"sLeft": "",
"fnClone": fnClone
};
},
/*
* Function: _fnUpdatePositions
* Purpose: Get the current positioning of the table in the DOM
* Returns: -
* Inputs: -
*/
_fnMeasure: function ()
{
var
s = this.fnGetSettings(),
m = s.oMes,
jqTable = jQuery(s.nTable),
oOffset = jqTable.offset(),
iParentScrollTop = this._fnSumScroll( s.nTable.parentNode, 'scrollTop' ),
iParentScrollLeft = this._fnSumScroll( s.nTable.parentNode, 'scrollLeft' );
m.iTableWidth = jqTable.outerWidth();
m.iTableHeight = jqTable.outerHeight();
m.iTableLeft = oOffset.left + s.nTable.parentNode.scrollLeft;
m.iTableTop = oOffset.top + iParentScrollTop;
m.iTableRight = m.iTableLeft + m.iTableWidth;
m.iTableRight = FixedHeader.oDoc.iWidth - m.iTableLeft - m.iTableWidth;
m.iTableBottom = FixedHeader.oDoc.iHeight - m.iTableTop - m.iTableHeight;
},
/*
* Function: _fnSumScroll
* Purpose: Sum node parameters all the way to the top
* Returns: int: sum
* Inputs: node:n - node to consider
* string:side - scrollTop or scrollLeft
*/
_fnSumScroll: function ( n, side )
{
var i = n[side];
while ( n = n.parentNode )
{
if ( n.nodeName == 'HTML' || n.nodeName == 'BODY' )
{
break;
}
i = n[side];
}
return i;
},
/*
* Function: _fnUpdatePositions
* Purpose: Loop over the fixed elements for this table and update their positions
* Returns: -
* Inputs: -
*/
_fnUpdatePositions: function ()
{
var s = this.fnGetSettings();
this._fnMeasure();
for ( var i=0, iLen=s.aoCache.length ; i<iLen ; i++ )
{
if ( s.aoCache[i].sType == "fixedHeader" )
{
this._fnScrollFixedHeader( s.aoCache[i] );
}
else if ( s.aoCache[i].sType == "fixedFooter" )
{
this._fnScrollFixedFooter( s.aoCache[i] );
}
else if ( s.aoCache[i].sType == "fixedLeft" )
{
this._fnScrollHorizontalLeft( s.aoCache[i] );
}
else
{
this._fnScrollHorizontalRight( s.aoCache[i] );
}
}
},
/*
* Function: _fnUpdateClones
* Purpose: Loop over the fixed elements for this table and call their cloning functions
* Returns: -
* Inputs: -
*/
_fnUpdateClones: function ()
{
var s = this.fnGetSettings();
for ( var i=0, iLen=s.aoCache.length ; i<iLen ; i++ )
{
s.aoCache[i].fnClone.call( this, s.aoCache[i] );
}
},
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Scrolling functions
*/
/*
* Function: _fnScrollHorizontalLeft
* Purpose: Update the positioning of the scrolling elements
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnScrollHorizontalRight: function ( oCache )
{
var
s = this.fnGetSettings(),
oMes = s.oMes,
oWin = FixedHeader.oWin,
oDoc = FixedHeader.oDoc,
nTable = oCache.nWrapper,
iFixedWidth = jQuery(nTable).outerWidth();
if ( oWin.iScrollRight < oMes.iTableRight )
{
/* Fully right aligned */
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft+oMes.iTableWidth-iFixedWidth)+"px", 'left', nTable.style );
}
else if ( oMes.iTableLeft < oDoc.iWidth-oWin.iScrollRight-iFixedWidth )
{
/* Middle */
if ( s.bUseAbsPos )
{
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', (oDoc.iWidth-oWin.iScrollRight-iFixedWidth)+"px", 'left', nTable.style );
}
else
{
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop-oWin.iScrollTop)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', (oWin.iWidth-iFixedWidth)+"px", 'left', nTable.style );
}
}
else
{
/* Fully left aligned */
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
},
/*
* Function: _fnScrollHorizontalLeft
* Purpose: Update the positioning of the scrolling elements
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnScrollHorizontalLeft: function ( oCache )
{
var
s = this.fnGetSettings(),
oMes = s.oMes,
oWin = FixedHeader.oWin,
oDoc = FixedHeader.oDoc,
nTable = oCache.nWrapper,
iCellWidth = jQuery(nTable).outerWidth();
if ( oWin.iScrollLeft < oMes.iTableLeft )
{
/* Fully left align */
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
else if ( oWin.iScrollLeft < oMes.iTableLeft+oMes.iTableWidth-iCellWidth )
{
/* Middle */
if ( s.bUseAbsPos )
{
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oWin.iScrollLeft+"px", 'left', nTable.style );
}
else
{
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop-oWin.iScrollTop)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', "0px", 'left', nTable.style );
}
}
else
{
/* Fully right align */
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft+oMes.iTableWidth-iCellWidth)+"px", 'left', nTable.style );
}
},
/*
* Function: _fnScrollFixedFooter
* Purpose: Update the positioning of the scrolling elements
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnScrollFixedFooter: function ( oCache )
{
var
s = this.fnGetSettings(),
oMes = s.oMes,
oWin = FixedHeader.oWin,
oDoc = FixedHeader.oDoc,
nTable = oCache.nWrapper,
iTheadHeight = jQuery("thead", s.nTable).outerHeight(),
iCellHeight = jQuery(nTable).outerHeight();
if ( oWin.iScrollBottom < oMes.iTableBottom )
{
/* Below */
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+oMes.iTableHeight-iCellHeight)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
else if ( oWin.iScrollBottom < oMes.iTableBottom+oMes.iTableHeight-iCellHeight-iTheadHeight )
{
/* Middle */
if ( s.bUseAbsPos )
{
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oDoc.iHeight-oWin.iScrollBottom-iCellHeight)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
else
{
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oWin.iHeight-iCellHeight)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft-oWin.iScrollLeft)+"px", 'left', nTable.style );
}
}
else
{
/* Above */
this._fnUpdateCache( oCache, 'sPosition', 'absolute', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+iCellHeight)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
},
/*
* Function: _fnScrollFixedHeader
* Purpose: Update the positioning of the scrolling elements
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnScrollFixedHeader: function ( oCache )
{
var
s = this.fnGetSettings(),
oMes = s.oMes,
oWin = FixedHeader.oWin,
oDoc = FixedHeader.oDoc,
nTable = oCache.nWrapper,
iTbodyHeight = 0,
anTbodies = s.nTable.getElementsByTagName('tbody');
for (var i = 0; i < anTbodies.length; ++i) {
iTbodyHeight += anTbodies[i].offsetHeight;
}
if ( oMes.iTableTop > oWin.iScrollTop + s.oOffset.top )
{
/* Above the table */
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oMes.iTableTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
else if ( oWin.iScrollTop + s.oOffset.top > oMes.iTableTop+iTbodyHeight )
{
/* At the bottom of the table */
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', (oMes.iTableTop+iTbodyHeight)+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
else
{
/* In the middle of the table */
if ( s.bUseAbsPos )
{
this._fnUpdateCache( oCache, 'sPosition', "absolute", 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', oWin.iScrollTop+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', oMes.iTableLeft+"px", 'left', nTable.style );
}
else
{
this._fnUpdateCache( oCache, 'sPosition', 'fixed', 'position', nTable.style );
this._fnUpdateCache( oCache, 'sTop', s.oOffset.top+"px", 'top', nTable.style );
this._fnUpdateCache( oCache, 'sLeft', (oMes.iTableLeft-oWin.iScrollLeft)+"px", 'left', nTable.style );
}
}
},
/*
* Function: _fnUpdateCache
* Purpose: Check the cache and update cache and value if needed
* Returns: -
* Inputs: object:oCache - local cache object
* string:sCache - cache property
* string:sSet - value to set
* string:sProperty - object property to set
* object:oObj - object to update
*/
_fnUpdateCache: function ( oCache, sCache, sSet, sProperty, oObj )
{
if ( oCache[sCache] != sSet )
{
oObj[sProperty] = sSet;
oCache[sCache] = sSet;
}
},
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Cloning functions
*/
/*
* Function: _fnCloneThead
* Purpose: Clone the thead element
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnCloneThead: function ( oCache )
{
var s = this.fnGetSettings();
var nTable = oCache.nNode;
/* Set the wrapper width to match that of the cloned table */
oCache.nWrapper.style.width = jQuery(s.nTable).outerWidth()+"px";
/* Remove any children the cloned table has */
while ( nTable.childNodes.length > 0 )
{
jQuery('thead th', nTable).unbind( 'click' );
nTable.removeChild( nTable.childNodes[0] );
}
/* Clone the DataTables header */
var nThead = jQuery('thead', s.nTable).clone(true)[0];
nTable.appendChild( nThead );
/* Copy the widths across - apparently a clone isn't good enough for this */
jQuery("thead>tr th", s.nTable).each( function (i) {
jQuery("thead>tr th:eq("+i+")", nTable).width( jQuery(this).width() );
} );
jQuery("thead>tr td", s.nTable).each( function (i) {
jQuery("thead>tr td:eq("+i+")", nTable).width( jQuery(this).width() );
} );
},
/*
* Function: _fnCloneTfoot
* Purpose: Clone the tfoot element
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnCloneTfoot: function ( oCache )
{
var s = this.fnGetSettings();
var nTable = oCache.nNode;
/* Set the wrapper width to match that of the cloned table */
oCache.nWrapper.style.width = jQuery(s.nTable).outerWidth()+"px";
/* Remove any children the cloned table has */
while ( nTable.childNodes.length > 0 )
{
nTable.removeChild( nTable.childNodes[0] );
}
/* Clone the DataTables footer */
var nTfoot = jQuery('tfoot', s.nTable).clone(true)[0];
nTable.appendChild( nTfoot );
/* Copy the widths across - apparently a clone isn't good enough for this */
jQuery("tfoot:eq(0)>tr th", s.nTable).each( function (i) {
jQuery("tfoot:eq(0)>tr th:eq("+i+")", nTable).width( jQuery(this).width() );
} );
jQuery("tfoot:eq(0)>tr td", s.nTable).each( function (i) {
jQuery("tfoot:eq(0)>tr th:eq("+i+")", nTable)[0].style.width( jQuery(this).width() );
} );
},
/*
* Function: _fnCloneTLeft
* Purpose: Clone the left column
* Returns: -
* Inputs: object:oCache - the cached values for this fixed element
*/
_fnCloneTLeft: function ( oCache )
{
var s = this.fnGetSettings();
var nTable = oCache.nNode;
var nBody = $('tbody', s.nTable)[0];
var iCols = $('tbody tr:eq(0) td', s.nTable).length;
var bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"));
/* Remove any children the cloned table has */
while ( nTable.childNodes.length > 0 )
{
nTable.removeChild( nTable.childNodes[0] );
}
/* Is this the most efficient way to do this - it looks horrible... */
nTable.appendChild( jQuery("thead", s.nTable).clone(true)[0] );
nTable.appendChild( jQuery("tbody", s.nTable).clone(true)[0] );
if ( s.bFooter )
{
nTable.appendChild( jQuery("tfoot", s.nTable).clone(true)[0] );
}
/* Remove unneeded cells */
$('thead tr', nTable).each( function (k) {
$('th:gt(0)', this).remove();
} );
$('tfoot tr', nTable).each( function (k) {
$('th:gt(0)', this).remove();
} );
$('tbody tr', nTable).each( function (k) {
$('td:gt(0)', this).remove();
} );
this.fnEqualiseHeights( 'tbody', nBody.parentNode, nTable );
var iWidth = jQuery('thead tr th:eq(0)', s.nTable).outerWidth();
nTable.style.width = iWidth+"px";
oCache.nWrapper.style.width = iWidth+"px";
},
/*
* Function: _fnCloneTRight
* Purpose: Clone the right most colun
* Returns: -
* Inputs: object:oCache - the cahced values for this fixed element
*/
_fnCloneTRight: function ( oCache )
{
var s = this.fnGetSettings();
var nBody = $('tbody', s.nTable)[0];
var nTable = oCache.nNode;
var iCols = jQuery('tbody tr:eq(0) td', s.nTable).length;
var bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"));
/* Remove any children the cloned table has */
while ( nTable.childNodes.length > 0 )
{
nTable.removeChild( nTable.childNodes[0] );
}
/* Is this the most efficient way to do this - it looks horrible... */
nTable.appendChild( jQuery("thead", s.nTable).clone(true)[0] );
nTable.appendChild( jQuery("tbody", s.nTable).clone(true)[0] );
if ( s.bFooter )
{
nTable.appendChild( jQuery("tfoot", s.nTable).clone(true)[0] );
}
jQuery('thead tr th:not(:nth-child('+iCols+'n))', nTable).remove();
jQuery('tfoot tr th:not(:nth-child('+iCols+'n))', nTable).remove();
/* Remove unneeded cells */
$('tbody tr', nTable).each( function (k) {
$('td:lt('+(iCols-1)+')', this).remove();
} );
this.fnEqualiseHeights( 'tbody', nBody.parentNode, nTable );
var iWidth = jQuery('thead tr th:eq('+(iCols-1)+')', s.nTable).outerWidth();
nTable.style.width = iWidth+"px";
oCache.nWrapper.style.width = iWidth+"px";
},
/**
* Equalise the heights of the rows in a given table node in a cross browser way. Note that this
* is more or less lifted as is from FixedColumns
* @method fnEqualiseHeights
* @returns void
* @param {string} parent Node type - thead, tbody or tfoot
* @param {element} original Original node to take the heights from
* @param {element} clone Copy the heights to
* @private
*/
"fnEqualiseHeights": function ( parent, original, clone )
{
var that = this,
jqBoxHack = $(parent+' tr:eq(0)', original).children(':eq(0)'),
iBoxHack = jqBoxHack.outerHeight() - jqBoxHack.height(),
bRubbishOldIE = ($.browser.msie && ($.browser.version == "6.0" || $.browser.version == "7.0"));
/* Remove cells which are not needed and copy the height from the original table */
$(parent+' tr', clone).each( function (k) {
/* Can we use some kind of object detection here?! This is very nasty - damn browsers */
if ( $.browser.mozilla || $.browser.opera )
{
$(this).children().height( $(parent+' tr:eq('+k+')', original).outerHeight() );
}
else
{
$(this).children().height( $(parent+' tr:eq('+k+')', original).outerHeight() - iBoxHack );
}
if ( !bRubbishOldIE )
{
$(parent+' tr:eq('+k+')', original).height( $(parent+' tr:eq('+k+')', original).outerHeight() );
}
} );
}
};
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Static properties and methods
* We use these for speed! This information is common to all instances of FixedHeader, so no
* point if having them calculated and stored for each different instance.
*/
/*
* Variable: oWin
* Purpose: Store information about the window positioning
* Scope: FixedHeader
*/
FixedHeader.oWin = {
"iScrollTop": 0,
"iScrollRight": 0,
"iScrollBottom": 0,
"iScrollLeft": 0,
"iHeight": 0,
"iWidth": 0
};
/*
* Variable: oDoc
* Purpose: Store information about the document size
* Scope: FixedHeader
*/
FixedHeader.oDoc = {
"iHeight": 0,
"iWidth": 0
};
/*
* Variable: afnScroll
* Purpose: Array of functions that are to be used for the scrolling components
* Scope: FixedHeader
*/
FixedHeader.afnScroll = [];
/*
* Function: fnMeasure
* Purpose: Update the measurements for the window and document
* Returns: -
* Inputs: -
*/
FixedHeader.fnMeasure = function ()
{
var
jqWin = jQuery(window),
jqDoc = jQuery(document),
oWin = FixedHeader.oWin,
oDoc = FixedHeader.oDoc;
oDoc.iHeight = jqDoc.height();
oDoc.iWidth = jqDoc.width();
oWin.iHeight = jqWin.height();
oWin.iWidth = jqWin.width();
oWin.iScrollTop = jqWin.scrollTop();
oWin.iScrollLeft = jqWin.scrollLeft();
oWin.iScrollRight = oDoc.iWidth - oWin.iScrollLeft - oWin.iWidth;
oWin.iScrollBottom = oDoc.iHeight - oWin.iScrollTop - oWin.iHeight;
};
FixedHeader.VERSION = "2.0.6";
FixedHeader.prototype.VERSION = FixedHeader.VERSION;
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Global processing
*/
/*
* Just one 'scroll' event handler in FixedHeader, which calls the required components. This is
* done as an optimisation, to reduce calculation and proagation time
*/
jQuery(window).scroll( function () {
FixedHeader.fnMeasure();
for ( var i=0, iLen=FixedHeader.afnScroll.length ; i<iLen ; i++ )
{
FixedHeader.afnScroll[i]();
}
} );

View File

@ -0,0 +1,40 @@
/*
* File: FixedHeader.min.js
* Version: 2.0.6
* Author: Allan Jardine (www.sprymedia.co.uk)
*
* Copyright 2009-2011 Allan Jardine, all rights reserved.
*
* This source file is free software, under either the GPL v2 license or a
* BSD (3 point) style license, as supplied with this software.
*
* 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.
*/
var FixedHeader=function(a,c){if("function"!=typeof this.fnInit)alert("FixedHeader warning: FixedHeader must be initialised with the 'new' keyword.");else{var b={aoCache:[],oSides:{top:!0,bottom:!1,left:!1,right:!1},oZIndexes:{top:104,bottom:103,left:102,right:101},oMes:{iTableWidth:0,iTableHeight:0,iTableLeft:0,iTableRight:0,iTableTop:0,iTableBottom:0},oOffset:{top:0},nTable:null,bUseAbsPos:!1,bFooter:!1};this.fnGetSettings=function(){return b};this.fnUpdate=function(){this._fnUpdateClones();this._fnUpdatePositions()};
this.fnPosition=function(){this._fnUpdatePositions()};this.fnInit(a,c);"function"==typeof a.fnSettings&&(a._oPluginFixedHeader=this)}};
FixedHeader.prototype={fnInit:function(a,c){var b=this.fnGetSettings(),d=this;this.fnInitSettings(b,c);if("function"==typeof a.fnSettings){if("functon"==typeof a.fnVersionCheck&&!0!==a.fnVersionCheck("1.6.0")){alert("FixedHeader 2 required DataTables 1.6.0 or later. Please upgrade your DataTables installation");return}var e=a.fnSettings();if(""!=e.oScroll.sX||""!=e.oScroll.sY){alert("FixedHeader 2 is not supported with DataTables' scrolling mode at this time");return}b.nTable=e.nTable;e.aoDrawCallback.push({fn:function(){FixedHeader.fnMeasure();
d._fnUpdateClones.call(d);d._fnUpdatePositions.call(d)},sName:"FixedHeader"})}else b.nTable=a;b.bFooter=0<$(">tfoot",b.nTable).length?!0:!1;b.bUseAbsPos=jQuery.browser.msie&&("6.0"==jQuery.browser.version||"7.0"==jQuery.browser.version);b.oSides.top&&b.aoCache.push(d._fnCloneTable("fixedHeader","FixedHeader_Header",d._fnCloneThead));b.oSides.bottom&&b.aoCache.push(d._fnCloneTable("fixedFooter","FixedHeader_Footer",d._fnCloneTfoot));b.oSides.left&&b.aoCache.push(d._fnCloneTable("fixedLeft","FixedHeader_Left",
d._fnCloneTLeft));b.oSides.right&&b.aoCache.push(d._fnCloneTable("fixedRight","FixedHeader_Right",d._fnCloneTRight));FixedHeader.afnScroll.push(function(){d._fnUpdatePositions.call(d)});jQuery(window).resize(function(){FixedHeader.fnMeasure();d._fnUpdateClones.call(d);d._fnUpdatePositions.call(d)});FixedHeader.fnMeasure();d._fnUpdateClones();d._fnUpdatePositions()},fnInitSettings:function(a,c){if("undefined"!=typeof c&&("undefined"!=typeof c.top&&(a.oSides.top=c.top),"undefined"!=typeof c.bottom&&
(a.oSides.bottom=c.bottom),"undefined"!=typeof c.left&&(a.oSides.left=c.left),"undefined"!=typeof c.right&&(a.oSides.right=c.right),"undefined"!=typeof c.zTop&&(a.oZIndexes.top=c.zTop),"undefined"!=typeof c.zBottom&&(a.oZIndexes.bottom=c.zBottom),"undefined"!=typeof c.zLeft&&(a.oZIndexes.left=c.zLeft),"undefined"!=typeof c.zRight&&(a.oZIndexes.right=c.zRight),"undefined"!=typeof c.offsetTop))a.oOffset.top=c.offsetTop;a.bUseAbsPos=jQuery.browser.msie&&("6.0"==jQuery.browser.version||"7.0"==jQuery.browser.version)},
_fnCloneTable:function(a,c,b){var d=this.fnGetSettings(),e;"absolute"!=jQuery(d.nTable.parentNode).css("position")&&(d.nTable.parentNode.style.position="relative");e=d.nTable.cloneNode(!1);e.removeAttribute("id");var f=document.createElement("div");f.style.position="absolute";f.style.top="0px";f.style.left="0px";f.className+=" FixedHeader_Cloned "+a+" "+c;"fixedHeader"==a&&(f.style.zIndex=d.oZIndexes.top);"fixedFooter"==a&&(f.style.zIndex=d.oZIndexes.bottom);"fixedLeft"==a?f.style.zIndex=d.oZIndexes.left:
"fixedRight"==a&&(f.style.zIndex=d.oZIndexes.right);e.style.margin="0";f.appendChild(e);document.body.appendChild(f);return{nNode:e,nWrapper:f,sType:a,sPosition:"",sTop:"",sLeft:"",fnClone:b}},_fnMeasure:function(){var a=this.fnGetSettings(),c=a.oMes,b=jQuery(a.nTable),d=b.offset(),e=this._fnSumScroll(a.nTable.parentNode,"scrollTop");this._fnSumScroll(a.nTable.parentNode,"scrollLeft");c.iTableWidth=b.outerWidth();c.iTableHeight=b.outerHeight();c.iTableLeft=d.left+a.nTable.parentNode.scrollLeft;c.iTableTop=
d.top+e;c.iTableRight=c.iTableLeft+c.iTableWidth;c.iTableRight=FixedHeader.oDoc.iWidth-c.iTableLeft-c.iTableWidth;c.iTableBottom=FixedHeader.oDoc.iHeight-c.iTableTop-c.iTableHeight},_fnSumScroll:function(a,c){for(var b=a[c];(a=a.parentNode)&&!("HTML"==a.nodeName||"BODY"==a.nodeName);)b=a[c];return b},_fnUpdatePositions:function(){var a=this.fnGetSettings();this._fnMeasure();for(var c=0,b=a.aoCache.length;c<b;c++)"fixedHeader"==a.aoCache[c].sType?this._fnScrollFixedHeader(a.aoCache[c]):"fixedFooter"==
a.aoCache[c].sType?this._fnScrollFixedFooter(a.aoCache[c]):"fixedLeft"==a.aoCache[c].sType?this._fnScrollHorizontalLeft(a.aoCache[c]):this._fnScrollHorizontalRight(a.aoCache[c])},_fnUpdateClones:function(){for(var a=this.fnGetSettings(),c=0,b=a.aoCache.length;c<b;c++)a.aoCache[c].fnClone.call(this,a.aoCache[c])},_fnScrollHorizontalRight:function(a){var c=this.fnGetSettings(),b=c.oMes,d=FixedHeader.oWin,e=FixedHeader.oDoc,f=a.nWrapper,g=jQuery(f).outerWidth();d.iScrollRight<b.iTableRight?(this._fnUpdateCache(a,
"sPosition","absolute","position",f.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",f.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+b.iTableWidth-g+"px","left",f.style)):b.iTableLeft<e.iWidth-d.iScrollRight-g?c.bUseAbsPos?(this._fnUpdateCache(a,"sPosition","absolute","position",f.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",f.style),this._fnUpdateCache(a,"sLeft",e.iWidth-d.iScrollRight-g+"px","left",f.style)):(this._fnUpdateCache(a,"sPosition","fixed","position",f.style),
this._fnUpdateCache(a,"sTop",b.iTableTop-d.iScrollTop+"px","top",f.style),this._fnUpdateCache(a,"sLeft",d.iWidth-g+"px","left",f.style)):(this._fnUpdateCache(a,"sPosition","absolute","position",f.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",f.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",f.style))},_fnScrollHorizontalLeft:function(a){var c=this.fnGetSettings(),b=c.oMes,d=FixedHeader.oWin,e=a.nWrapper,f=jQuery(e).outerWidth();d.iScrollLeft<b.iTableLeft?(this._fnUpdateCache(a,
"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",e.style)):d.iScrollLeft<b.iTableLeft+b.iTableWidth-f?c.bUseAbsPos?(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft",d.iScrollLeft+"px","left",e.style)):(this._fnUpdateCache(a,"sPosition","fixed","position",e.style),this._fnUpdateCache(a,
"sTop",b.iTableTop-d.iScrollTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft","0px","left",e.style)):(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+b.iTableWidth-f+"px","left",e.style))},_fnScrollFixedFooter:function(a){var c=this.fnGetSettings(),b=c.oMes,d=FixedHeader.oWin,e=FixedHeader.oDoc,f=a.nWrapper,g=jQuery("thead",c.nTable).outerHeight(),h=jQuery(f).outerHeight();
d.iScrollBottom<b.iTableBottom?(this._fnUpdateCache(a,"sPosition","absolute","position",f.style),this._fnUpdateCache(a,"sTop",b.iTableTop+b.iTableHeight-h+"px","top",f.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",f.style)):d.iScrollBottom<b.iTableBottom+b.iTableHeight-h-g?c.bUseAbsPos?(this._fnUpdateCache(a,"sPosition","absolute","position",f.style),this._fnUpdateCache(a,"sTop",e.iHeight-d.iScrollBottom-h+"px","top",f.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",
f.style)):(this._fnUpdateCache(a,"sPosition","fixed","position",f.style),this._fnUpdateCache(a,"sTop",d.iHeight-h+"px","top",f.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft-d.iScrollLeft+"px","left",f.style)):(this._fnUpdateCache(a,"sPosition","absolute","position",f.style),this._fnUpdateCache(a,"sTop",b.iTableTop+h+"px","top",f.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",f.style))},_fnScrollFixedHeader:function(a){for(var c=this.fnGetSettings(),b=c.oMes,d=FixedHeader.oWin,e=
a.nWrapper,f=0,g=c.nTable.getElementsByTagName("tbody"),h=0;h<g.length;++h)f+=g[h].offsetHeight;b.iTableTop>d.iScrollTop+c.oOffset.top?(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",b.iTableTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",e.style)):d.iScrollTop+c.oOffset.top>b.iTableTop+f?(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",b.iTableTop+f+"px","top",e.style),this._fnUpdateCache(a,
"sLeft",b.iTableLeft+"px","left",e.style)):c.bUseAbsPos?(this._fnUpdateCache(a,"sPosition","absolute","position",e.style),this._fnUpdateCache(a,"sTop",d.iScrollTop+"px","top",e.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft+"px","left",e.style)):(this._fnUpdateCache(a,"sPosition","fixed","position",e.style),this._fnUpdateCache(a,"sTop",c.oOffset.top+"px","top",e.style),this._fnUpdateCache(a,"sLeft",b.iTableLeft-d.iScrollLeft+"px","left",e.style))},_fnUpdateCache:function(a,c,b,d,e){a[c]!=b&&(e[d]=
b,a[c]=b)},_fnCloneThead:function(a){var c=this.fnGetSettings(),b=a.nNode;for(a.nWrapper.style.width=jQuery(c.nTable).outerWidth()+"px";0<b.childNodes.length;)jQuery("thead th",b).unbind("click"),b.removeChild(b.childNodes[0]);a=jQuery("thead",c.nTable).clone(!0)[0];b.appendChild(a);jQuery("thead>tr th",c.nTable).each(function(a){jQuery("thead>tr th:eq("+a+")",b).width(jQuery(this).width())});jQuery("thead>tr td",c.nTable).each(function(a){jQuery("thead>tr td:eq("+a+")",b).width(jQuery(this).width())})},
_fnCloneTfoot:function(a){var c=this.fnGetSettings(),b=a.nNode;for(a.nWrapper.style.width=jQuery(c.nTable).outerWidth()+"px";0<b.childNodes.length;)b.removeChild(b.childNodes[0]);a=jQuery("tfoot",c.nTable).clone(!0)[0];b.appendChild(a);jQuery("tfoot:eq(0)>tr th",c.nTable).each(function(a){jQuery("tfoot:eq(0)>tr th:eq("+a+")",b).width(jQuery(this).width())});jQuery("tfoot:eq(0)>tr td",c.nTable).each(function(a){jQuery("tfoot:eq(0)>tr th:eq("+a+")",b)[0].style.width(jQuery(this).width())})},_fnCloneTLeft:function(a){var c=
this.fnGetSettings(),b=a.nNode,d=$("tbody",c.nTable)[0];for($("tbody tr:eq(0) td",c.nTable);0<b.childNodes.length;)b.removeChild(b.childNodes[0]);b.appendChild(jQuery("thead",c.nTable).clone(!0)[0]);b.appendChild(jQuery("tbody",c.nTable).clone(!0)[0]);c.bFooter&&b.appendChild(jQuery("tfoot",c.nTable).clone(!0)[0]);$("thead tr",b).each(function(){$("th:gt(0)",this).remove()});$("tfoot tr",b).each(function(){$("th:gt(0)",this).remove()});$("tbody tr",b).each(function(){$("td:gt(0)",this).remove()});
this.fnEqualiseHeights("tbody",d.parentNode,b);c=jQuery("thead tr th:eq(0)",c.nTable).outerWidth();b.style.width=c+"px";a.nWrapper.style.width=c+"px"},_fnCloneTRight:function(a){for(var c=this.fnGetSettings(),b=$("tbody",c.nTable)[0],d=a.nNode,e=jQuery("tbody tr:eq(0) td",c.nTable).length;0<d.childNodes.length;)d.removeChild(d.childNodes[0]);d.appendChild(jQuery("thead",c.nTable).clone(!0)[0]);d.appendChild(jQuery("tbody",c.nTable).clone(!0)[0]);c.bFooter&&d.appendChild(jQuery("tfoot",c.nTable).clone(!0)[0]);
jQuery("thead tr th:not(:nth-child("+e+"n))",d).remove();jQuery("tfoot tr th:not(:nth-child("+e+"n))",d).remove();$("tbody tr",d).each(function(){$("td:lt("+(e-1)+")",this).remove()});this.fnEqualiseHeights("tbody",b.parentNode,d);c=jQuery("thead tr th:eq("+(e-1)+")",c.nTable).outerWidth();d.style.width=c+"px";a.nWrapper.style.width=c+"px"},fnEqualiseHeights:function(a,c,b){var d=$(a+" tr:eq(0)",c).children(":eq(0)"),e=d.outerHeight()-d.height(),f=$.browser.msie&&("6.0"==$.browser.version||"7.0"==
$.browser.version);$(a+" tr",b).each(function(b){$.browser.mozilla||$.browser.opera?$(this).children().height($(a+" tr:eq("+b+")",c).outerHeight()):$(this).children().height($(a+" tr:eq("+b+")",c).outerHeight()-e);f||$(a+" tr:eq("+b+")",c).height($(a+" tr:eq("+b+")",c).outerHeight())})}};FixedHeader.oWin={iScrollTop:0,iScrollRight:0,iScrollBottom:0,iScrollLeft:0,iHeight:0,iWidth:0};FixedHeader.oDoc={iHeight:0,iWidth:0};FixedHeader.afnScroll=[];
FixedHeader.fnMeasure=function(){var a=jQuery(window),c=jQuery(document),b=FixedHeader.oWin,d=FixedHeader.oDoc;d.iHeight=c.height();d.iWidth=c.width();b.iHeight=a.height();b.iWidth=a.width();b.iScrollTop=a.scrollTop();b.iScrollLeft=a.scrollLeft();b.iScrollRight=d.iWidth-b.iScrollLeft-b.iWidth;b.iScrollBottom=d.iHeight-b.iScrollTop-b.iHeight};FixedHeader.VERSION="2.0.6";FixedHeader.prototype.VERSION=FixedHeader.VERSION;
jQuery(window).scroll(function(){FixedHeader.fnMeasure();for(var a=0,c=FixedHeader.afnScroll.length;a<c;a++)FixedHeader.afnScroll[a]()});

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/*
* File: jquery.dataTables.min.js
* Version: 1.9.0
* Version: 1.9.3
* Author: Allan Jardine (www.sprymedia.co.uk)
* Info: www.datatables.net
*
@ -15,139 +15,142 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
*/
(function(i,aa,k,l){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=i.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:k.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mDataProp:c.mDataProp?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===l||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=i.extend({},j.models.oSearch);else{c=a.aoPreSearchCols[d];
if(c.bRegex===l)c.bRegex=!0;if(c.bSmart===l)c.bSmart=!0;if(c.bCaseInsensitive===l)c.bCaseInsensitive=!0}E(a,d,null)}function E(a,b,c){b=a.aoColumns[b];if(c!==l&&null!==c){if(c.sType!==l)b.sType=c.sType,b._bAutoType=!1;i.extend(b,c);n(b,c,"sWidth","sWidthOrig");if(c.iDataSort!==l)b.aDataSort=[c.iDataSort];n(b,c,"aDataSort")}b.fnGetData=V(b.mDataProp);b.fnSetData=sa(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=!1;if(!b.bSortable||-1==i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting))b.sSortingClass=
a.oClasses.sSortableNone,b.sSortingClassJUI="";else if(b.bSortable||-1==i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortable,b.sSortingClassJUI=a.oClasses.sSortJUI;else if(-1!=i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableAsc,b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed;else if(-1==i.inArray("asc",b.asSorting)&&-1!=i.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableDesc,b.sSortingClassJUI=
a.oClasses.sSortJUIDescAllowed}function r(a){if(!1===a.oFeatures.bAutoWidth)return!1;ba(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function s(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,c==b)return d;return null}function t(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,d==b)return!0===a.aoColumns[d].bVisible?c:null;return null}function v(a){for(var b=0,c=0;c<a.aoColumns.length;c++)!0===
a.aoColumns[c].bVisible&&b++;return b}function B(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(null!==f)return f}return"string"}function D(a,b){for(var c=b.split(","),d=[],f=0,h=a.aoColumns.length;f<h;f++)for(var g=0;g<h;g++)if(a.aoColumns[f].sName==c[g]){d.push(g);break}return d}function x(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function I(a,b,c,d){var f,h,g,e,q;if(b)for(f=b.length-1;0<=f;f--){var m=b[f].aTargets;
i.isArray(m)||F(a,1,"aTargets must be an array of targets, not a "+typeof m);for(h=0,g=m.length;h<g;h++)if("number"===typeof m[h]&&0<=m[h]){for(;a.aoColumns.length<=m[h];)o(a);d(m[h],b[f])}else if("number"===typeof m[h]&&0>m[h])d(a.aoColumns.length+m[h],b[f]);else if("string"===typeof m[h])for(e=0,q=a.aoColumns.length;e<q;e++)("_all"==m[h]||i(a.aoColumns[e].nTh).hasClass(m[h]))&&d(e,b[f])}if(c)for(f=0,a=c.length;f<a;f++)d(f,c[f])}function G(a,b){var c;c=i.isArray(b)?b.slice():i.extend(!0,{},b);var d=
a.aoData.length;c=i.extend(!0,{},j.models.oRow,{_aData:c});a.aoData.push(c);for(var f,h=0,g=a.aoColumns.length;h<g;h++)if(c=a.aoColumns[h],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mDataProp&&J(a,d,h,R(a,d,h)),c._bAutoType&&"string"!=c.sType&&(f=w(a,d,h,"type"),null!==f&&""!==f))if(f=B(f),null===c.sType)c.sType=f;else if(c.sType!=f&&"html"!=c.sType)c.sType="string";a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ca(a,d);return d}function ta(a){var b,c,d,f,h,g,e,q,m;if(a.bDeferLoading||
null===a.sAjaxSource){e=a.nTBody.childNodes;for(b=0,c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){q=a.aoData.length;e[b]._DT_RowIndex=q;a.aoData.push(i.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(q);g=e[b].childNodes;h=0;for(d=0,f=g.length;d<f;d++)if(m=g[d].nodeName.toUpperCase(),"TD"==m||"TH"==m)J(a,q,h,i.trim(g[d].innerHTML)),h++}}e=S(a);g=[];for(b=0,c=e.length;b<c;b++)for(d=0,f=e[b].childNodes.length;d<f;d++)h=e[b].childNodes[d],m=h.nodeName.toUpperCase(),("TD"==m||
"TH"==m)&&g.push(h);for(f=0,e=a.aoColumns.length;f<e;f++){m=a.aoColumns[f];if(null===m.sTitle)m.sTitle=m.nTh.innerHTML;h=m._bAutoType;q="function"===typeof m.fnRender;var o=null!==m.sClass,r=m.bVisible,l,n;if(h||q||o||!r)for(b=0,c=a.aoData.length;b<c;b++){d=a.aoData[b];l=g[b*e+f];if(h&&"string"!=m.sType&&(n=w(a,b,f,"type"),""!==n))if(n=B(n),null===m.sType)m.sType=n;else if(m.sType!=n&&"html"!=m.sType)m.sType="string";if("function"===typeof m.mDataProp)l.innerHTML=w(a,b,f,"display");if(q)n=R(a,b,f),
l.innerHTML=n,m.bUseRendered&&J(a,b,f,n);o&&(l.className+=" "+m.sClass);r?d._anHidden[f]=null:(d._anHidden[f]=l,l.parentNode.removeChild(l));m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,l,w(a,b,f,"display"),d._aData,b,f)}}if(0!==a.aoRowCreatedCallback.length)for(b=0,c=a.aoData.length;b<c;b++)d=a.aoData[b],C(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}function K(a,b){return b._DT_RowIndex!==l?b._DT_RowIndex:null}function da(a,b,c){for(var b=L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===
c)return d;return-1}function W(a,b,c){for(var d=[],f=0,h=a.aoColumns.length;f<h;f++)d.push(w(a,b,f,c));return d}function w(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData,d))===l){if(a.iDrawError!=a.iDraw&&null===f.sDefaultContent)F(a,0,"Requested unknown parameter '"+f.mDataProp+"' from the data source for row "+b),a.iDrawError=a.iDraw;return f.sDefaultContent}if(null===c&&null!==f.sDefaultContent)c=f.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&
null===c?"":c}function J(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function V(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d){return a(b,d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a){for(var d=0,f=b.length;d<f;d++)if(a=a[b[d]],a===l)return l;return a}}return function(b){return b[a]}}function sa(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===
typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a,d){for(var f=0,h=b.length-1;f<h;f++)a=a[b[f]];a[b[b.length-1]]=d}}return function(b,d){b[a]=d}}function X(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ea(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);z(a)}function fa(a,b){for(var c=-1,d=0,f=a.length;d<f;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,
1)}function R(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mDataProp},w(a,b,c,"display"))}function ca(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=k.createElement("tr");c.nTr._DT_RowIndex=b;if(c._aData.DT_RowId)c.nTr.id=c._aData.DT_RowId;c._aData.DT_RowClass&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,h=a.aoColumns.length;f<h;f++){var g=a.aoColumns[f];d=k.createElement("td");d.innerHTML="function"===typeof g.fnRender&&
(!g.bUseRendered||null===g.mDataProp)?R(a,b,f):w(a,b,f,"display");if(null!==g.sClass)d.className=g.sClass;g.bVisible?(c.nTr.appendChild(d),c._anHidden[f]=null):c._anHidden[f]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,w(a,b,f,"display"),c._aData,b,f)}C(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function ua(a){var b,c,d;if(0!==a.nTHead.getElementsByTagName("th").length)for(b=0,d=a.aoColumns.length;b<d;b++){if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&
(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var f=k.createElement("tr");for(b=0,d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),f.appendChild(c);i(a.nTHead).html("")[0].appendChild(f);T(a.aoHeader,
a.nTHead)}i(a.nTHead).children("tr").attr("role","row");if(a.bJUI)for(b=0,d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=k.createElement("div");f.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(f);var h=k.createElement("span");h.className=a.oClasses.sSortIcon;f.appendChild(h);c.appendChild(f)}if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ga(a,a.aoColumns[b].nTh,b):i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&
i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=O(a,null,a.aoFooter);for(b=0,d=a.aoColumns.length;b<d;b++)if(c[b])a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&i(c[b]).addClass(a.aoColumns[b].sClass)}}function U(a,b,c){var d,f,h,g=[],e=[],i=a.aoColumns.length,m;c===l&&(c=!1);for(d=0,f=b.length;d<f;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(h=i-1;0<=h;h--)!a.aoColumns[h].bVisible&&!c&&g[d].splice(h,1);e.push([])}for(d=0,f=g.length;d<f;d++){if(a=g[d].nTr)for(;h=
a.firstChild;)a.removeChild(h);for(h=0,b=g[d].length;h<b;h++)if(m=i=1,e[d][h]===l){a.appendChild(g[d][h].cell);for(e[d][h]=1;g[d+i]!==l&&g[d][h].cell==g[d+i][h].cell;)e[d+i][h]=1,i++;for(;g[d][h+m]!==l&&g[d][h].cell==g[d][h+m].cell;){for(c=0;c<i;c++)e[d+c][h+m]=1;m++}g[d][h].cell.rowSpan=i;g[d][h].cell.colSpan=m}}}function y(a){var b,c,d=[],f=0,h=a.asStripeClasses.length;b=a.aoOpenRows.length;c=C(a,"aoPreDrawCallback","preDraw",[a]);if(-1===i.inArray(!1,c)){a.bDrawing=!0;if(a.iInitDisplayStart!==
l&&-1!=a.iInitDisplayStart)a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,z(a);if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!va(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=a._iDisplayStart;c=a._iDisplayEnd;if(a.oFeatures.bServerSide)g=0,c=a.aoData.length;for(;g<c;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&ca(a,a.aiDisplay[g]);
var q=e.nTr;if(0!==h){var m=a.asStripeClasses[f%h];if(e._sRowStripe!=m)i(q).removeClass(e._sRowStripe).addClass(m),e._sRowStripe=m}C(a,"aoRowCallback",null,[q,a.aoData[a.aiDisplay[g]]._aData,f,g]);d.push(q);f++;if(0!==b)for(e=0;e<b;e++)if(q==a.aoOpenRows[e].nParent){d.push(a.aoOpenRows[e].nTr);break}}}else{d[0]=k.createElement("tr");if(a.asStripeClasses[0])d[0].className=a.asStripeClasses[0];h=a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));if(1==a.iDraw&&null!==a.sAjaxSource&&
!a.oFeatures.bServerSide)h=a.oLanguage.sLoadingRecords;else if(a.oLanguage.sEmptyTable&&0===a.fnRecordsTotal())h=a.oLanguage.sEmptyTable;b=k.createElement("td");b.setAttribute("valign","top");b.colSpan=v(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=h;d[f].appendChild(b)}C(a,"aoHeaderCallback","header",[i(a.nTHead).children("tr")[0],X(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);C(a,"aoFooterCallback","footer",[i(a.nTFoot).children("tr")[0],X(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);
f=k.createDocumentFragment();b=k.createDocumentFragment();if(a.nTBody){h=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;b=a.nTBody.firstChild;)a.nTBody.removeChild(b);for(b=0,c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);null!==h&&h.appendChild(a.nTBody)}C(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(H(a,!1),a._bInitComplete||Y(a))}}function Z(a){a.oFeatures.bSort?
P(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(z(a),y(a))}function wa(a){var b=i("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=i('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,h,g,e,q,m,o,l=0;l<d.length;l++){h=0;g=d[l];if("<"==g){e=i("<div></div>")[0];q=d[l+1];if("'"==q||'"'==q){m="";for(o=2;d[l+o]!=q;)m+=d[l+o],
o++;"H"==m?m="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix":"F"==m&&(m="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix");-1!=m.indexOf(".")?(q=m.split("."),e.id=q[0].substr(1,q[0].length-1),e.className=q[1]):"#"==m.charAt(0)?e.id=m.substr(1,m.length-1):e.className=m;l+=o}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)f=xa(a),h=1;else if("f"==g&&a.oFeatures.bFilter)f=
ya(a),h=1;else if("r"==g&&a.oFeatures.bProcessing)f=za(a),h=1;else if("t"==g)f=Aa(a),h=1;else if("i"==g&&a.oFeatures.bInfo)f=Ba(a),h=1;else if("p"==g&&a.oFeatures.bPaginate)f=Ca(a),h=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(q=e.length;o<q;o++)if(g==e[o].cFeature){(f=e[o].fnInit(a))&&(h=1);break}}1==h&&null!==f&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(f),c.appendChild(f))}b.parentNode.replaceChild(a.nTableWrapper,b)}function T(a,b){var c=
i(b).children("tr"),d,f,h,g,e,q,m,j;a.splice(0,a.length);for(f=0,q=c.length;f<q;f++)a.push([]);for(f=0,q=c.length;f<q;f++)for(h=0,m=c[f].childNodes.length;h<m;h++)if(d=c[f].childNodes[h],"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var o=1*d.getAttribute("colspan"),l=1*d.getAttribute("rowspan"),o=!o||0===o||1===o?1:o,l=!l||0===l||1===l?1:l;for(g=0;a[f][g];)g++;j=g;for(e=0;e<o;e++)for(g=0;g<l;g++)a[f+g][j+e]={cell:d,unique:1==o?!0:!1},a[f+g].nTr=c[f]}}function O(a,b,c){var d=[];
if(!c)c=a.aoHeader,b&&(c=[],T(c,b));for(var b=0,f=c.length;b<f;b++)for(var h=0,g=c[b].length;h<g;h++)if(c[b][h].unique&&(!d[h]||!a.bSortCellsTop))d[h]=c[b][h].cell;return d}function va(a){if(a.bAjaxDataGet){a.iDraw++;H(a,!0);var b=Da(a);ha(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Ea(a,b)},a);return!1}return!0}function Da(a){var b=a.aoColumns.length,c=[],d,f;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:x(a)});c.push({name:"iDisplayStart",
value:a._iDisplayStart});c.push({name:"iDisplayLength",value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mDataProp,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),
c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==a.oFeatures.bSort){d=null!==a.aaSortingFixed?a.aaSortingFixed.length:0;var h=a.aaSorting.length;c.push({name:"iSortingCols",value:d+h});for(f=0;f<d;f++)c.push({name:"iSortCol_"+f,value:a.aaSortingFixed[f][0]}),c.push({name:"sSortDir_"+f,value:a.aaSortingFixed[f][1]});for(f=0;f<h;f++)c.push({name:"iSortCol_"+(f+d),value:a.aaSorting[f][0]}),c.push({name:"sSortDir_"+(f+d),value:a.aaSorting[f][1]});for(f=0;f<b;f++)c.push({name:"bSortable_"+
f,value:a.aoColumns[f].bSortable})}return c}function ha(a,b){C(a,"aoServerParams","serverParams",[b])}function Ea(a,b){if(b.sEcho!==l){if(1*b.sEcho<a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ea(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=x(a),c=b.sColumns!==l&&""!==c&&b.sColumns!=c,d;c&&(d=D(a,b.sColumns));for(var f=V(a.sAjaxDataProp)(b),h=0,g=f.length;h<g;h++)if(c){for(var e=
[],i=0,m=a.aoColumns.length;i<m;i++)e.push(f[h][d[i]]);G(a,e)}else G(a,f[h]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;y(a);a.bAjaxDataGet=!0;H(a,!1)}function ya(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=k.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";if(!a.aanFeatures.f)d.id=a.sTableId+"_filter";c=i("input",
d);c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=0,g=c.length;d<g;d++)c[d]!=i(this).parents("div.dataTables_filter")[0]&&i("input",c[d]).val(this.value);this.value!=b.sSearch&&M(a,{sSearch:this.value,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(13==a.keyCode)return!1});return d}function M(a,b,c){var d=a.oPreviousSearch,f=a.aoPreSearchCols,h=function(a){d.sSearch=
a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)h(b);else{Fa(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);h(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ga(a,f[b].sSearch,b,f[b].bRegex,f[b].bSmart,f[b].bCaseInsensitive);Ha(a)}a.bFiltered=!0;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;z(a);y(a);ia(a,0)}function Ha(a){for(var b=j.ext.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,h=0,g=a.aiDisplay.length;h<g;h++){var e=a.aiDisplay[h-
f];b[c](a,W(a,e,"filter"),e)||(a.aiDisplay.splice(h-f,1),f++)}}function Ga(a,b,c,d,f,h){if(""!==b)for(var g=0,b=ja(b,d,f,h),d=a.aiDisplay.length-1;0<=d;d--)f=ka(w(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(f)||(a.aiDisplay.splice(d,1),g++)}function Fa(a,b,c,d,f,h){d=ja(b,d,f,h);f=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||
f.sSearch.length>b.length||1==c||0!==b.indexOf(f.sSearch)){a.aiDisplay.splice(0,a.aiDisplay.length);ia(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function ia(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,a.asDataSearch.length);for(var c=b&&1===b?a.aiDisplayMaster:a.aiDisplay,d=0,f=c.length;d<f;d++)a.asDataSearch[d]=la(a,
W(a,c[d],"filter"))}}function la(a,b){var c="";if(a.__nTmpFilter===l)a.__nTmpFilter=k.createElement("div");for(var d=a.__nTmpFilter,f=0,h=a.aoColumns.length;f<h;f++)a.aoColumns[f].bSearchable&&(c+=ka(b[f],a.aoColumns[f].sType)+" ");if(-1!==c.indexOf("&"))d.innerHTML=c,c=d.textContent?d.textContent:d.innerText,c=c.replace(/\n/g," ").replace(/\r/g,"");return c}function ja(a,b,c,d){if(c)return a=b?a.split(" "):ma(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:ma(a);return RegExp(a,
d?"i":"")}function ka(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):null===a?"":a}function ma(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function Ba(a){var b=k.createElement("div");b.className=a.oClasses.sInfo;if(!a.aanFeatures.i)a.aoDrawCallback.push({fn:Ia,sName:"information"}),b.id=a.sTableId+"_info";a.nTable.setAttribute("aria-describedby",
a.sTableId+"_info");return b}function Ia(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a._iDisplayStart+1,c=a.fnDisplayEnd(),d=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),h=a.fnFormatNumber(b),g=a.fnFormatNumber(c),e=a.fnFormatNumber(d),q=a.fnFormatNumber(f);a.oScroll.bInfinite&&(h=a.fnFormatNumber(1));h=0===a.fnRecordsDisplay()&&a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix:0===a.fnRecordsDisplay()?a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",
e)+a.oLanguage.sInfoPostFix:a.fnRecordsDisplay()==a.fnRecordsTotal()?a.oLanguage.sInfo.replace("_START_",h).replace("_END_",g).replace("_TOTAL_",q)+a.oLanguage.sInfoPostFix:a.oLanguage.sInfo.replace("_START_",h).replace("_END_",g).replace("_TOTAL_",q)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix;null!==a.oLanguage.fnInfoCallback&&(h=a.oLanguage.fnInfoCallback.call(a.oInstance,a,b,c,d,f,h));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(h)}}
function $(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){$(a)},200);else{wa(a);ua(a);U(a,a.aoHeader);a.nTFoot&&U(a,a.aoFooter);H(a,!0);a.oFeatures.bAutoWidth&&ba(a);for(b=0,c=a.aoColumns.length;b<c;b++)if(null!==a.aoColumns[b].sWidth)a.aoColumns[b].nTh.style.width=p(a.aoColumns[b].sWidth);a.oFeatures.bSort?P(a):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),z(a),y(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ha(a,c),a.fnServerData.call(a.oInstance,
a.sAjaxSource,c,function(c){var h=""!==a.sAjaxDataProp?V(a.sAjaxDataProp)(c):c;for(b=0;b<h.length;b++)G(a,h[b]);a.iInitDisplayStart=d;a.oFeatures.bSort?P(a):(a.aiDisplay=a.aiDisplayMaster.slice(),z(a),y(a));H(a,!1);Y(a,c)},a)):a.oFeatures.bServerSide||(H(a,!1),Y(a))}}function Y(a,b){a._bInitComplete=!0;C(a,"aoInitComplete","init",[a,b])}function na(a){!a.sEmptyTable&&a.sZeroRecords&&n(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&a.sZeroRecords&&n(a,a,"sZeroRecords","sLoadingRecords")}function xa(a){if(a.oScroll.bInfinite)return null;
var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,f=a.aLengthMenu;if(2==f.length&&"object"===typeof f[0]&&"object"===typeof f[1])for(c=0,d=f[0].length;c<d;c++)b+='<option value="'+f[0][c]+'">'+f[1][c]+"</option>";else for(c=0,d=f.length;c<d;c++)b+='<option value="'+f[c]+'">'+f[c]+"</option>";b+="</select>";f=k.createElement("div");if(!a.aanFeatures.l)f.id=a.sTableId+"_length";f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";
i('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",!0);i("select",f).bind("change.DT",function(){var b=i(this).val(),f=a.aanFeatures.l;for(c=0,d=f.length;c<d;c++)f[c]!=this.parentNode&&i("select",f[c]).val(b);a._iDisplayLength=parseInt(b,10);z(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()&&(a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength,0>a._iDisplayStart))a._iDisplayStart=0;if(-1==a._iDisplayLength)a._iDisplayStart=0;y(a)});i("select",f).attr("aria-controls",a.sTableId);return f}
function z(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Ca(a){if(a.oScroll.bInfinite)return null;var b=k.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){z(a);y(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,
function(a){z(a);y(a)})},sName:"pagination"});return b}function oa(a,b){var c=a._iDisplayStart;if("number"===typeof b){if(a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay())a._iDisplayStart=0}else if("first"==b)a._iDisplayStart=0;else if("previous"==b){if(a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart)a._iDisplayStart=0}else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=
a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else F(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function za(a){var b=k.createElement("div");if(!a.aanFeatures.r)b.id=a.sTableId+"_processing";b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,
a.nTable);return b}function H(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,f=c.length;d<f;d++)c[d].style.visibility=b?"visible":"hidden";i(a.oInstance).trigger("processing",[a,b])}function Aa(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=k.createElement("div"),c=k.createElement("div"),d=k.createElement("div"),f=k.createElement("div"),h=k.createElement("div"),g=k.createElement("div"),e=a.nTable.cloneNode(!1),q=a.nTable.cloneNode(!1),m=a.nTable.getElementsByTagName("thead")[0],
j=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],o=a.oClasses;c.appendChild(d);h.appendChild(g);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(e);e.appendChild(m);null!==j&&(b.appendChild(h),g.appendChild(q),q.appendChild(j));b.className=o.sScrollWrapper;c.className=o.sScrollHead;d.className=o.sScrollHeadInner;f.className=o.sScrollBody;h.className=o.sScrollFoot;g.className=o.sScrollFootInner;if(a.oScroll.bAutoCss)c.style.overflow=
"hidden",c.style.position="relative",h.style.overflow="hidden",f.style.overflow="auto";c.style.border="0";c.style.width="100%";h.style.border="0";d.style.width="150%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";if(null!==j)q.removeAttribute("id"),q.style.marginLeft="0";d=i(a.nTable).children("caption");g=0;for(q=d.length;g<q;g++)e.appendChild(d[g]);if(""!==a.oScroll.sX){c.style.width=p(a.oScroll.sX);f.style.width=p(a.oScroll.sX);if(null!==j)h.style.width=p(a.oScroll.sX);
i(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(null!==j)h.scrollLeft=this.scrollLeft})}if(""!==a.oScroll.sY)f.style.height=p(a.oScroll.sY);a.aoDrawCallback.push({fn:Ja,sName:"scrolling"});a.oScroll.bInfinite&&i(f).scroll(function(){!a.bDrawing&&0!==i(this).scrollTop()&&i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()&&(oa(a,"next"),z(a),y(a))});a.nScrollHead=c;a.nScrollFoot=h;return b}function Ja(a){var b=a.nScrollHead.getElementsByTagName("div")[0],
c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,h,g,e,j,m,o,l,r=[],n=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,E=null!==a.nTFoot?n.getElementsByTagName("table")[0]:null,k=i.browser.msie&&7>=i.browser.version;g=a.nTable.getElementsByTagName("thead");0<g.length&&a.nTable.removeChild(g[0]);null!==a.nTFoot&&(j=a.nTable.getElementsByTagName("tfoot"),0<j.length&&a.nTable.removeChild(j[0]));g=a.nTHead.cloneNode(!0);a.nTable.insertBefore(g,a.nTable.childNodes[0]);null!==
a.nTFoot&&(j=a.nTFoot.cloneNode(!0),a.nTable.insertBefore(j,a.nTable.childNodes[1]));if(""===a.oScroll.sX)d.style.width="100%",b.parentNode.style.width="100%";var t=O(a,g);for(f=0,h=t.length;f<h;f++)o=s(a,f),t[f].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width=""},j.getElementsByTagName("tr"));f=i(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",k&&(i("tbody",d).height()>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=
p(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(""!==a.oScroll.sXInner)a.nTable.style.width=p(a.oScroll.sXInner);else if(f==i(d).width()&&i(d).height()<i(a.nTable).height()){if(a.nTable.style.width=p(f-a.oScroll.iBarWidth),i(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=p(f)}else a.nTable.style.width=p(f);f=i(a.nTable).outerWidth();h=a.nTHead.getElementsByTagName("tr");g=g.getElementsByTagName("tr");N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth=
"0";m.borderBottomWidth="0";m.height=0;l=i(a).width();b.style.width=p(l);r.push(l)},g,h);i(g).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;l=i(a).width();b.style.width=p(l);r.push(l)},e,j),i(e).height(0));N(function(a){a.innerHTML="";a.style.width=p(r.shift())},g);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=p(r.shift())},
e);if(i(a.nTable).outerWidth()<f){e=d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")?f+a.oScroll.iBarWidth:f;if(k&&(d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=p(e-a.oScroll.iBarWidth);d.style.width=p(e);b.parentNode.style.width=p(e);if(null!==a.nTFoot)n.parentNode.style.width=p(e);""===a.oScroll.sX?F(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):
""!==a.oScroll.sXInner&&F(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else if(d.style.width=p("100%"),b.parentNode.style.width=p("100%"),null!==a.nTFoot)n.parentNode.style.width=p("100%");if(""===a.oScroll.sY&&k)d.style.height=p(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=p(a.oScroll.sY),k=""!==a.oScroll.sX&&a.nTable.offsetWidth>
d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight))d.style.height=p(i(a.nTable).height()+k);k=i(a.nTable).outerWidth();c.style.width=p(k);b.style.width=p(k);if(null!==a.nTFoot)n.style.width=p(a.nTable.offsetWidth),E.style.width=p(a.nTable.offsetWidth);if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var h=0,g=b[d].childNodes.length;h<g;h++)1==b[d].childNodes[h].nodeType&&(c?a(b[d].childNodes[h],c[d].childNodes[h]):a(b[d].childNodes[h]))}
function Ka(a,b){if(!a||null===a||""===a)return 0;b||(b=k.getElementsByTagName("body")[0]);var c,d=k.createElement("div");d.style.width=p(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ba(a){var b=0,c,d=0,f=a.aoColumns.length,h,g=i("th",a.nTHead),e=a.nTable.getAttribute("width");for(h=0;h<f;h++)if(a.aoColumns[h].bVisible&&(d++,null!==a.aoColumns[h].sWidth)){c=Ka(a.aoColumns[h].sWidthOrig,a.nTable.parentNode);if(null!==c)a.aoColumns[h].sWidth=p(c);b++}if(f==g.length&&0===b&&
d==f&&""===a.oScroll.sX&&""===a.oScroll.sY)for(h=0;h<a.aoColumns.length;h++){if(c=i(g[h]).width(),null!==c)a.aoColumns[h].sWidth=p(c)}else{b=a.nTable.cloneNode(!1);h=a.nTHead.cloneNode(!0);d=k.createElement("tbody");c=k.createElement("tr");b.removeAttribute("id");b.appendChild(h);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=i("thead th",b);0===d.length&&(d=i("tbody tr:eq(0)>td",b));g=O(a,
h);for(h=d=0;h<f;h++){var j=a.aoColumns[h];j.bVisible&&null!==j.sWidthOrig&&""!==j.sWidthOrig?g[h-d].style.width=p(j.sWidthOrig):j.bVisible?g[h-d].style.width="":d++}for(h=0;h<f;h++)a.aoColumns[h].bVisible&&(d=La(a,h),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[h].sContentPadding&&(d.innerHTML+=a.aoColumns[h].sContentPadding),c.appendChild(d)));f=a.nTable.parentNode;f.appendChild(b);if(""!==a.oScroll.sX&&""!==a.oScroll.sXInner)b.style.width=p(a.oScroll.sXInner);else if(""!==a.oScroll.sX){if(b.style.width=
"",i(b).width()<f.offsetWidth)b.style.width=p(f.offsetWidth)}else if(""!==a.oScroll.sY)b.style.width=p(f.offsetWidth);else if(e)b.style.width=p(e);b.style.visibility="hidden";Ma(a,b);f=i("tbody tr:eq(0)",b).children();0===f.length&&(f=O(a,i("thead",b)[0]));if(""!==a.oScroll.sX){for(h=d=c=0;h<a.aoColumns.length;h++)a.aoColumns[h].bVisible&&(c=null===a.aoColumns[h].sWidthOrig?c+i(f[d]).outerWidth():c+(parseInt(a.aoColumns[h].sWidth.replace("px",""),10)+(i(f[d]).outerWidth()-i(f[d]).width())),d++);b.style.width=
p(c);a.nTable.style.width=p(c)}for(h=d=0;h<a.aoColumns.length;h++)if(a.aoColumns[h].bVisible){c=i(f[d]).width();if(null!==c&&0<c)a.aoColumns[h].sWidth=p(c);d++}f=i(b).css("width");a.nTable.style.width=-1!==f.indexOf("%")?f:p(i(b).outerWidth());b.parentNode.removeChild(b)}if(e)a.nTable.style.width=p(e)}function Ma(a,b){if(""===a.oScroll.sX&&""!==a.oScroll.sY)i(b).width(),b.style.width=p(i(b).outerWidth()-a.oScroll.iBarWidth);else if(""!==a.oScroll.sX)b.style.width=p(i(b).outerWidth())}function La(a,
b){var c=Na(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=k.createElement("td");d.innerHTML=w(a,c,b,"");return d}return L(a,c)[b]}function Na(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var h=w(a,f,b,"display")+"",h=h.replace(/<.*?>/g,"");if(h.length>c)c=h.length,d=f}return d}function p(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Oa(){var a=k.createElement("p"),b=a.style;b.width="100%";
b.height="200px";b.padding="0px";var c=k.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);k.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=c.clientWidth;k.body.removeChild(c);return b-a}function P(a,b){var c,d,f,h,g,e,o=[],m=[],r=j.ext.oSort,n=a.aoData,k=a.aoColumns,E=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||
null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],f=t(a,d),h=a.aoColumns[d].sSortDataType,j.ext.afnSortData[h]){g=j.ext.afnSortData[h](a,d,f);for(f=0,h=n.length;f<h;f++)J(a,f,d,g[f])}for(c=0,d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var p=o.length,s;for(c=0,d=n.length;c<d;c++)for(f=0;f<p;f++){s=k[o[f][0]].aDataSort;for(g=0,e=s.length;g<e;g++)h=k[s[g]].sType,h=r[(h?h:"string")+"-pre"],
n[c]._aSortData[s[g]]=h?h(w(a,c,s[g],"sort")):w(a,c,s[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,f,h,g;for(c=0;c<p;c++){g=k[o[c][0]].aDataSort;for(d=0,f=g.length;d<f;d++)if(h=k[g[d]].sType,h=r[(h?h:"string")+"-"+o[c][1]](n[a]._aSortData[g[d]],n[b]._aSortData[g[d]]),0!==h)return h}return r["numeric-asc"](m[a],m[b])})}(b===l||b)&&!a.oFeatures.bDeferRender&&Q(a);for(c=0,d=a.aoColumns.length;c<d;c++)f=k[c].nTh,f.removeAttribute("aria-sort"),f.removeAttribute("aria-label"),k[c].bSortable?
0<o.length&&o[0][0]==c?(f.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),f.setAttribute("aria-label",k[c].sTitle+("asc"==(k[c].asSorting[o[0][2]+1]?k[c].asSorting[o[0][2]+1]:k[c].asSorting[0])?E.sSortAscending:E.sSortDescending))):f.setAttribute("aria-label",k[c].sTitle+("asc"==k[c].asSorting[0]?E.sSortAscending:E.sSortDescending)):f.setAttribute("aria-label",k[c].sTitle);a.bSorted=!0;i(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),
a._iDisplayStart=0,z(a),y(a))}function ga(a,b,c,d){Pa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var h=function(){var d,h;if(b.shiftKey){for(var e=!1,i=0;i<a.aaSorting.length;i++)if(a.aaSorting[i][0]==c){e=!0;d=a.aaSorting[i][0];h=a.aaSorting[i][2]+1;a.aoColumns[d].asSorting[h]?(a.aaSorting[i][1]=a.aoColumns[d].asSorting[h],a.aaSorting[i][2]=h):a.aaSorting.splice(i,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],
h=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[h]||(h=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[h],a.aaSorting[0][2]=h):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));P(a)};a.oFeatures.bProcessing?(H(a,!0),setTimeout(function(){h();a.oFeatures.bServerSide||H(a,!1)},0)):h();"function"==typeof d&&d(a)}})}function Q(a){var b,c,d,f,h,g=a.aoColumns.length,e=a.oClasses;for(b=0;b<g;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(e.sSortAsc+
" "+e.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){h=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){h="asc"==f[c][1]?e.sSortAsc:e.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(h);a.bJUI&&(c=i("span."+e.sSortIcon,a.aoColumns[b].nTh),c.removeClass(e.sSortJUIAsc+" "+e.sSortJUIDesc+" "+e.sSortJUI+" "+e.sSortJUIAscAllowed+" "+e.sSortJUIDescAllowed),
c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==f[d][1]?e.sSortJUIAsc:e.sSortJUIDesc))}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);h=e.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)i(d).removeClass(h+"1 "+h+"2 "+h+"3");else if(d.length>=g)for(b=0;b<g;b++)if(-1!=d[b].className.indexOf(h+"1"))for(c=0,a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(h+"1",""));else if(-1!=d[b].className.indexOf(h+
"2"))for(c=0,a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(h+"2",""));else if(-1!=d[b].className.indexOf(h+"3"))for(c=0,a=d.length/g;c<a;c++)d[g*c+b].className=i.trim(d[g*c+b].className.replace(" "+h+"3",""));var e=1,j;for(b=0;b<f.length;b++){j=parseInt(f[b][0],10);for(c=0,a=d.length/g;c<a;c++)d[g*c+j].className+=" "+h+e;3>e&&e++}}}function pa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,
iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:i.extend(!0,[],a.aaSorting),oSearch:i.extend(!0,{},a.oPreviousSearch),aoSearchCols:i.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};for(b=0,c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);C(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Qa(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=C(a,"aoStateLoadParams","stateLoadParams",
[a,c]);if(-1===i.inArray(!1,d)){a.oLoadedState=i.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();i.extend(a.oPreviousSearch,c.oSearch);i.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];C(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Ra(a){for(var b=
aa.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=k.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function u(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function S(a){for(var b=[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a,
b){var c=[],d,f,h,e,i,j;f=0;var o=a.aoData.length;b!==l&&(f=b,o=b+1);for(h=f;h<o;h++)if(j=a.aoData[h],null!==j.nTr){f=[];for(e=0,i=j.nTr.childNodes.length;e<i;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&f.push(j.nTr.childNodes[e]);d=0;for(e=0,i=a.aoColumns.length;e<i;e++)a.aoColumns[e].bVisible?c.push(f[e-d]):(c.push(j._anHidden[e]),d++)}return c}function F(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"==
j.ext.sErrMode)alert(a);else throw a;else console!==l&&console.log&&console.log(a)}function n(a,b,c,d){d===l&&(d=c);b[c]!==l&&(a[d]=b[c])}function Sa(a,b){for(var c in a)a.hasOwnProperty(c)&&b[c]!==l&&("object"===typeof e[c]&&!1===i.isArray(b[c])?i.extend(!0,a[c],b[c]):a[c]=b[c]);return a}function Pa(a,b,c){i(a).bind("click.DT",b,function(b){c(b);a.blur()}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}function A(a,b,c,d){c&&a[b].push({fn:c,sName:d})}
function C(a,b,c,d){for(var b=a[b],f=[],h=b.length-1;0<=h;h--)f.push(b[h].fn.apply(a.oInstance,d));null!==c&&i(a.oInstance).trigger(c,d);return f}function Ta(a){return function(){var b=[u(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var Ua=aa.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,f=[],h=i.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===
b&&null!==d&&(d=Ua(d)),f.push((h?"":'"'+c+'":')+d);return(h?"[":"{")+f+(h?"]":"}")};this.$=function(a,b){var c,d,f=[],h=u(this[j.ext.iApiIndex]);b||(b={});b=i.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page)for(c=h._iDisplayStart,d=h.fnDisplayEnd();c<d;c++)f.push(h.aoData[h.aiDisplay[c]].nTr);else if("current"==b.order&&"none"==b.filter)for(c=0,d=h.aiDisplayMaster.length;c<d;c++)f.push(h.aoData[h.aiDisplayMaster[c]].nTr);else if("current"==b.order&&"applied"==b.filter)for(c=
0,d=h.aiDisplay.length;c<d;c++)f.push(h.aoData[h.aiDisplay[c]].nTr);else if("original"==b.order&&"none"==b.filter)for(c=0,d=h.aoData.length;c<d;c++)f.push(h.aoData[c].nTr);else if("original"==b.order&&"applied"==b.filter)for(c=0,d=h.aoData.length;c<d;c++)-1!==i.inArray(c,h.aiDisplay)&&f.push(h.aoData[c].nTr);else F(h,1,"Unknown selection options");d=i(f);c=d.filter(a);d=d.find(a);return i([].concat(i.makeArray(c),i.makeArray(d)))};this._=function(a,b){var c=[],d,f,h=this.$(a,b);for(d=0,f=h.length;d<
f;d++)c.push(this.fnGetData(h[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],d,f=u(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var h=0;h<a.length;h++){d=G(f,a[h]);if(-1==d)return c;c.push(d)}else{d=G(f,a);if(-1==d)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();(b===l||b)&&Z(f);return c};this.fnAdjustColumnSizing=function(a){var b=u(this[j.ext.iApiIndex]);r(b);a===l||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};
this.fnClearTable=function(a){var b=u(this[j.ext.iApiIndex]);ea(b);(a===l||a)&&y(b)};this.fnClose=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=u(this[j.ext.iApiIndex]),f,h,a="object"===typeof a?K(d,a):a,e=d.aoData.splice(a,1);for(f=0,h=d.aoData.length;f<h;f++)if(null!==d.aoData[f].nTr)d.aoData[f].nTr._DT_RowIndex=
f;f=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(f,1);fa(d.aiDisplayMaster,a);fa(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,e);if(d._iDisplayStart>=d.aiDisplay.length&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart))d._iDisplayStart=0;if(c===l||c)z(d),y(d);return e};this.fnDestroy=function(a){var b=u(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,f,e,a=a===l?!1:!0;b.bDestroying=!0;for(f=0,e=b.aoDestroyCallback.length;f<e;f++)b.aoDestroyCallback[f].fn();for(f=0,
e=b.aoColumns.length;f<e;f++)!1===b.aoColumns[f].bVisible&&this.fnSetColumnVis(f,!0);i(b.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(i(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(i(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);i(b.nTableWrapper).remove();b.aaSorting=
[];b.aaSortingFixed=[];Q(b);i(S(b)).removeClass(b.asStripeClasses.join(" "));i("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(i("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),i("th, td",b.nTHead).each(function(){var a=i("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();i(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):
a||c.appendChild(b.nTable);for(f=0,e=b.aoData.length;f<e;f++)null!==b.aoData[f].nTr&&d.appendChild(b.aoData[f].nTr);if(!0===b.oFeatures.bAutoWidth)b.nTable.style.width=p(b.sDestroyWidth);i(d).children("tr:even").addClass(b.asDestroyStripes[0]);i(d).children("tr:odd").addClass(b.asDestroyStripes[1]);for(f=0,e=j.settings.length;f<e;f++)j.settings[f]==b&&j.settings.splice(f,1);b=null};this.fnDraw=function(a){var b=u(this[j.ext.iApiIndex]);a?(z(b),y(b)):Z(b)};this.fnFilter=function(a,b,c,d,f,e){var g=
u(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===l||null===c)c=!1;if(d===l||null===d)d=!0;if(f===l||null===f)f=!0;if(e===l||null===e)e=!0;if(b===l||null===b){if(M(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:e},1),f&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i("input",b[c]).val(a)}}else i.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:e}),M(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=u(this[j.ext.iApiIndex]);if(a!==l){var d=
a;if("object"===typeof a){var f=a.nodeName.toLowerCase();"tr"===f?d=K(c,a):"td"===f&&(d=K(c,a.parentNode),b=da(c,d,a))}return b!==l?w(c,d,b,""):c.aoData[d]!==l?c.aoData[d]._aData:null}return X(c)};this.fnGetNodes=function(a){var b=u(this[j.ext.iApiIndex]);return a!==l?b.aoData[a]!==l?b.aoData[a].nTr:null:S(b)};this.fnGetPosition=function(a){var b=u(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();if("TR"==c)return K(b,a);return"TD"==c||"TH"==c?(c=K(b,a.parentNode),a=da(b,c,a),[c,t(b,a),a]):null};
this.fnIsOpen=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=u(this[j.ext.iApiIndex]),f=S(d);if(-1!==i.inArray(a,f)){this.fnClose(a);var f=k.createElement("tr"),e=k.createElement("td");f.appendChild(e);e.className=c;e.colSpan=v(d);"string"===typeof b?e.innerHTML=b:i(e).html(b);b=i("tr",d.nTBody);-1!=i.inArray(a,b)&&i(f).insertAfter(a);d.aoOpenRows.push({nTr:f,nParent:a});return f}};this.fnPageChange=
function(a,b){var c=u(this[j.ext.iApiIndex]);oa(c,a);z(c);(b===l||b)&&y(c)};this.fnSetColumnVis=function(a,b,c){var d=u(this[j.ext.iApiIndex]),f,e,g=d.aoColumns,i=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(f=e=0;f<a;f++)g[f].bVisible&&e++;m=e>=v(d);if(!m)for(f=a;f<g.length;f++)if(g[f].bVisible){o=f;break}for(f=0,e=i.length;f<e;f++)null!==i[f].nTr&&(m?i[f].nTr.appendChild(i[f]._anHidden[a]):i[f].nTr.insertBefore(i[f]._anHidden[a],L(d,f)[o]))}else for(f=0,e=i.length;f<e;f++)null!==i[f].nTr&&(o=L(d,
f)[a],i[f]._anHidden[a]=o,o.parentNode.removeChild(o));g[a].bVisible=b;U(d,d.aoHeader);d.nTFoot&&U(d,d.aoFooter);for(f=0,e=d.aoOpenRows.length;f<e;f++)d.aoOpenRows[f].nTr.colSpan=v(d);if(c===l||c)r(d),y(d);pa(d)}};this.fnSettings=function(){return u(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=u(this[j.ext.iApiIndex]);b.aaSorting=a;P(b)};this.fnSortListener=function(a,b,c){ga(u(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,f){var e=u(this[j.ext.iApiIndex]),b="object"===typeof b?
K(e,b):b;if(e.__fnUpdateDeep===l&&i.isArray(a)&&"object"===typeof a){e.aoData[b]._aData=a.slice();e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=l}else if(e.__fnUpdateDeep===l&&null!==a&&"object"===typeof a){e.aoData[b]._aData=i.extend(!0,{},a);e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=l}else{J(e,b,c,a);var a=w(e,b,c,"display"),g=e.aoColumns[c];null!==g.fnRender&&(a=R(e,b,c),g.bUseRendered&&
J(e,b,c,a));if(null!==e.aoData[b].nTr)L(e,b)[c].innerHTML=a}c=i.inArray(b,e.aiDisplay);e.asDataSearch[c]=la(e,W(e,b,"filter"));(f===l||f)&&r(e);(d===l||d)&&Z(e);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Ta,_fnInitialise:$,_fnInitComplete:Y,_fnLanguageCompat:na,_fnAddColumn:o,_fnColumnOptions:E,_fnAddData:G,_fnCreateTr:ca,_fnGatherData:ta,_fnBuildHead:ua,_fnDrawHead:U,_fnDraw:y,_fnReDraw:Z,_fnAjaxUpdate:va,_fnAjaxParameters:Da,_fnAjaxUpdateDraw:Ea,_fnServerParams:ha,
_fnAddOptionsHtml:wa,_fnFeatureHtmlTable:Aa,_fnScrollDraw:Ja,_fnAdjustColumnSizing:r,_fnFeatureHtmlFilter:ya,_fnFilterComplete:M,_fnFilterCustom:Ha,_fnFilterColumn:Ga,_fnFilter:Fa,_fnBuildSearchArray:ia,_fnBuildSearchRow:la,_fnFilterCreateSearch:ja,_fnDataToSearch:ka,_fnSort:P,_fnSortAttachListener:ga,_fnSortingClasses:Q,_fnFeatureHtmlPaginate:Ca,_fnPageChange:oa,_fnFeatureHtmlInfo:Ba,_fnUpdateInfo:Ia,_fnFeatureHtmlLength:xa,_fnFeatureHtmlProcessing:za,_fnProcessingDisplay:H,_fnVisibleToColumnIndex:s,
_fnColumnIndexToVisible:t,_fnNodeToDataIndex:K,_fnVisbleColumns:v,_fnCalculateEnd:z,_fnConvertToWidth:Ka,_fnCalculateColumnWidths:ba,_fnScrollingWidthAdjust:Ma,_fnGetWidestNode:La,_fnGetMaxLenString:Na,_fnStringToCss:p,_fnDetectType:B,_fnSettingsFromNode:u,_fnGetDataMaster:X,_fnGetTrNodes:S,_fnGetTdNodes:L,_fnEscapeRegex:ma,_fnDeleteIndex:fa,_fnReOrderIndex:D,_fnColumnOrdering:x,_fnLog:F,_fnClearTable:ea,_fnSaveState:pa,_fnLoadState:Qa,_fnCreateCookie:function(a,b,c,d,e){var h=new Date;h.setTime(h.getTime()+
1E3*c);var c=aa.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof i.parseJSON?i.parseJSON(b):eval("("+b+")"),b=e(a,g,h.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+h.toGMTString()+"; path="+c.join("/")+"/";e="";h=9999999999999;if(4096<(null!==Ra(a)?k.cookie.length:b.length+k.cookie.length)+10){for(var a=k.cookie.split(";"),j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var m=a[j].split("=");try{g=eval("("+
decodeURIComponent(m[1])+")")}catch(l){continue}if(g.iCreate&&g.iCreate<h)e=m[0],h=g.iCreate}if(""!==e)k.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}k.cookie=b},_fnReadCookie:Ra,_fnDetectHeader:T,_fnGetUniqueThs:O,_fnScrollBarWidth:Oa,_fnApplyToChildren:N,_fnMap:n,_fnGetRowData:W,_fnGetCellData:w,_fnSetCellData:J,_fnGetObjectDataFn:V,_fnSetObjectDataFn:sa,_fnApplyColumnDefs:I,_fnBindAction:Pa,_fnExtend:Sa,_fnCallbackReg:A,_fnCallbackFire:C,_fnJsonString:Ua,_fnRender:R,
_fnNodeToColumnIndex:da};i.extend(j.ext.oApi,this.oApi);for(var qa in j.ext.oApi)qa&&(this[qa]=Ta(qa));var ra=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var f=!1,h=!1;if("table"!=this.nodeName.toLowerCase())F(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{for(a=0,b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===l||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();
break}else{F(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var g=i.extend(!0,{},j.models.oSettings,{nTable:this,oApi:ra.oApi,oInit:e,sDestroyWidth:i(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===ra.length?
ra:i(this).dataTable();e||(e={});e.oLanguage&&na(e.oLanguage);e=Sa(i.extend(!0,{},j.defaults),e);n(g.oFeatures,e,"bPaginate");n(g.oFeatures,e,"bLengthChange");n(g.oFeatures,e,"bFilter");n(g.oFeatures,e,"bSort");n(g.oFeatures,e,"bInfo");n(g.oFeatures,e,"bProcessing");n(g.oFeatures,e,"bAutoWidth");n(g.oFeatures,e,"bSortClasses");n(g.oFeatures,e,"bServerSide");n(g.oFeatures,e,"bDeferRender");n(g.oScroll,e,"sScrollX","sX");n(g.oScroll,e,"sScrollXInner","sXInner");n(g.oScroll,e,"sScrollY","sY");n(g.oScroll,
e,"bScrollCollapse","bCollapse");n(g.oScroll,e,"bScrollInfinite","bInfinite");n(g.oScroll,e,"iScrollLoadGap","iLoadGap");n(g.oScroll,e,"bScrollAutoCss","bAutoCss");n(g,e,"asStripClasses","asStripeClasses");n(g,e,"asStripeClasses");n(g,e,"fnServerData");n(g,e,"fnFormatNumber");n(g,e,"sServerMethod");n(g,e,"aaSorting");n(g,e,"aaSortingFixed");n(g,e,"aLengthMenu");n(g,e,"sPaginationType");n(g,e,"sAjaxSource");n(g,e,"sAjaxDataProp");n(g,e,"iCookieDuration");n(g,e,"sCookiePrefix");n(g,e,"sDom");n(g,e,
"bSortCellsTop");n(g,e,"iTabIndex");n(g,e,"oSearch","oPreviousSearch");n(g,e,"aoSearchCols","aoPreSearchCols");n(g,e,"iDisplayLength","_iDisplayLength");n(g,e,"bJQueryUI","bJUI");n(g,e,"fnCookieCallback");n(g,e,"fnStateLoad");n(g,e,"fnStateSave");n(g.oLanguage,e,"fnInfoCallback");A(g,"aoDrawCallback",e.fnDrawCallback,"user");A(g,"aoServerParams",e.fnServerParams,"user");A(g,"aoStateSaveParams",e.fnStateSaveParams,"user");A(g,"aoStateLoadParams",e.fnStateLoadParams,"user");A(g,"aoStateLoaded",e.fnStateLoaded,
"user");A(g,"aoRowCallback",e.fnRowCallback,"user");A(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");A(g,"aoHeaderCallback",e.fnHeaderCallback,"user");A(g,"aoFooterCallback",e.fnFooterCallback,"user");A(g,"aoInitComplete",e.fnInitComplete,"user");A(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&g.oFeatures.bSort&&g.oFeatures.bSortClasses?A(g,"aoDrawCallback",Q,"server_side_sort_classes"):g.oFeatures.bDeferRender&&A(g,"aoDrawCallback",Q,"defer_sort_classes");if(e.bJQueryUI){if(i.extend(g.oClasses,
j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom)g.sDom='<"H"lfr>t<"F"ip>'}else i.extend(g.oClasses,j.ext.oStdClasses);i(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==g.oScroll.sY)g.oScroll.iBarWidth=Oa();if(g.iInitDisplayStart===l)g.iInitDisplayStart=e.iDisplayStart,g._iDisplayStart=e.iDisplayStart;if(e.bStateSave)g.oFeatures.bStateSave=!0,Qa(g,e),A(g,"aoDrawCallback",pa,"state_save");if(null!==e.iDeferLoading)g.bDeferLoading=!0,g._iRecordsTotal=e.iDeferLoading,
g._iRecordsDisplay=e.iDeferLoading;null!==e.aaData&&(h=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,i.getJSON(g.oLanguage.sUrl,null,function(a){na(a);i.extend(!0,g.oLanguage,e.oLanguage,a);$(g)}),f=!0):i.extend(!0,g.oLanguage,e.oLanguage);c=!1;d=i(this).children("tbody").children("tr");for(a=0,b=g.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(g.asStripeClasses[a])){c=!0;break}if(c)g.asDestroyStripes=["",""],i(d[0]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[0]+=
g.oClasses.sStripeOdd+" "),i(d[0]).hasClass(g.oClasses.sStripeEven)&&(g.asDestroyStripes[0]+=g.oClasses.sStripeEven),i(d[1]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeOdd+" "),i(d[1]).hasClass(g.oClasses.sStripeEven)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeEven),d.removeClass(g.asStripeClasses.join(" "));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(T(g.aoHeader,a[0]),c=O(g));if(null===e.aoColumns){d=[];for(a=0,b=c.length;a<b;a++)d.push(null)}else d=
e.aoColumns;for(a=0,b=d.length;a<b;a++){if(e.saved_aoColumns!==l&&e.saved_aoColumns.length==b)null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible;o(g,c?c[a]:null)}I(g,e.aoColumnDefs,d,function(a,b){E(g,a,b)});for(a=0,b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var r=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===l&&(g.aaSorting[a][2]=0);e.aaSorting===l&&g.saved_aaSorting===l&&(g.aaSorting[a][1]=r.asSorting[0]);for(c=0,d=r.asSorting.length;c<
d;c++)if(g.aaSorting[a][1]==r.asSorting[c]){g.aaSorting[a][2]=c;break}}Q(g);a=i(this).children("thead");0===a.length&&(a=[k.createElement("thead")],this.appendChild(a[0]));g.nTHead=a[0];a=i(this).children("tbody");0===a.length&&(a=[k.createElement("tbody")],this.appendChild(a[0]));g.nTBody=a[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live","polite");g.nTBody.setAttribute("aria-relevant","all");a=i(this).children("tfoot");if(0<a.length)g.nTFoot=a[0],T(g.aoFooter,g.nTFoot);
if(h)for(a=0;a<e.aaData.length;a++)G(g,e.aaData[a]);else ta(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===f&&$(g)}})};j.version="1.9.0";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:function(e){for(var i=function(e,i){for(;e.length<i;)e+="0";return e},l=j.ext.sVersion.split("."),e=e.split("."),r="",k="",t=0,v=e.length;t<v;t++)r+=i(l[t],3),k+=i(e[t],3);return parseInt(r,10)>=parseInt(k,10)},iApiIndex:0,ofnSearch:{},oApi:{},
oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mDataProp:null,nTh:null,nTf:null,sClass:null,
sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:["odd","even"],bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,
bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var i=e+"",e=i.split(""),j="",i=i.length,l=0;l<i;l++)0===l%3&&0!==l&&(j=this.oLanguage.sInfoThousands+j),j=e[i-l-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,l,k){k.jqXHR=i.ajax({url:e,
data:j,success:function(e){i(k.oInstance).trigger("xhr",k);l(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,i){"parsererror"==i&&alert("DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof i.parseJSON?i.parseJSON(e):eval("("+e+")")}catch(l){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,
(function(i,O,l,n){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=i.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=i.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d],
c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;r(a,d,null)}function r(a,b,c){var d=a.aoColumns[b];c!==n&&null!==c&&(c.mDataProp&&!c.mData&&(c.mData=c.mDataProp),c.sType!==n&&(d.sType=c.sType,d._bAutoType=!1),i.extend(d,c),p(d,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(d.aDataSort=[c.iDataSort]),p(d,c,"aDataSort"));var h=d.mRender?S(d.mRender):null,f=S(d.mData);d.fnGetData=function(a,b){var c=f(a,b);return d.mRender&&b&&""!==b?h(c,b,a):c};d.fnSetData=
ta(d.mData);a.oFeatures.bSort||(d.bSortable=!1);!d.bSortable||-1==i.inArray("asc",d.asSorting)&&-1==i.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableNone,d.sSortingClassJUI=""):d.bSortable||-1==i.inArray("asc",d.asSorting)&&-1==i.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortable,d.sSortingClassJUI=a.oClasses.sSortJUI):-1!=i.inArray("asc",d.asSorting)&&-1==i.inArray("desc",d.asSorting)?(d.sSortingClass=a.oClasses.sSortableAsc,d.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):
-1==i.inArray("asc",d.asSorting)&&-1!=i.inArray("desc",d.asSorting)&&(d.sSortingClass=a.oClasses.sSortableDesc,d.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;ca(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function G(a,b){var c=v(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function t(a,b){var c=v(a,"bVisible"),c=i.inArray(b,c);return-1!==c?c:null}function w(a){return v(a,"bVisible").length}
function v(a,b){var c=[];i.map(a.aoColumns,function(a,h){a[b]&&c.push(h)});return c}function D(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var h=b[d](a);if(null!==h)return h}return"string"}function y(a,b){for(var c=b.split(","),d=[],h=0,f=a.aoColumns.length;h<f;h++)for(var g=0;g<f;g++)if(a.aoColumns[h].sName==c[g]){d.push(g);break}return d}function H(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function ua(a,b,c,d){var h,f,
g,e,s;if(b)for(h=b.length-1;0<=h;h--){var m=b[h].aTargets;i.isArray(m)||E(a,1,"aTargets must be an array of targets, not a "+typeof m);f=0;for(g=m.length;f<g;f++)if("number"===typeof m[f]&&0<=m[f]){for(;a.aoColumns.length<=m[f];)o(a);d(m[f],b[h])}else if("number"===typeof m[f]&&0>m[f])d(a.aoColumns.length+m[f],b[h]);else if("string"===typeof m[f]){e=0;for(s=a.aoColumns.length;e<s;e++)("_all"==m[f]||i(a.aoColumns[e].nTh).hasClass(m[f]))&&d(e,b[h])}}if(c){h=0;for(a=c.length;h<a;h++)d(h,c[h])}}function J(a,
b){var c;c=i.isArray(b)?b.slice():i.extend(!0,{},b);var d=a.aoData.length,h=i.extend(!0,{},j.models.oRow);h._aData=c;a.aoData.push(h);for(var f,h=0,g=a.aoColumns.length;h<g;h++)c=a.aoColumns[h],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mData?I(a,d,h,T(a,d,h)):I(a,d,h,x(a,d,h)),c._bAutoType&&"string"!=c.sType&&(f=x(a,d,h,"type"),null!==f&&""!==f&&(f=D(f),null===c.sType?c.sType=f:c.sType!=f&&"html"!=c.sType&&(c.sType="string")));a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||da(a,
d);return d}function va(a){var b,c,d,h,f,g,e,s,m;if(a.bDeferLoading||null===a.sAjaxSource){e=a.nTBody.childNodes;b=0;for(c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){s=a.aoData.length;e[b]._DT_RowIndex=s;a.aoData.push(i.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(s);g=e[b].childNodes;d=f=0;for(h=g.length;d<h;d++)if(m=g[d].nodeName.toUpperCase(),"TD"==m||"TH"==m)I(a,s,f,i.trim(g[d].innerHTML)),f++}}e=U(a);g=[];b=0;for(c=e.length;b<c;b++){d=0;for(h=e[b].childNodes.length;d<
h;d++)f=e[b].childNodes[d],m=f.nodeName.toUpperCase(),("TD"==m||"TH"==m)&&g.push(f)}h=0;for(e=a.aoColumns.length;h<e;h++){m=a.aoColumns[h];null===m.sTitle&&(m.sTitle=m.nTh.innerHTML);f=m._bAutoType;s="function"===typeof m.fnRender;var o=null!==m.sClass,k=m.bVisible,r,n;if(f||s||o||!k){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],r=g[b*e+h],f&&"string"!=m.sType&&(n=x(a,b,h,"type"),""!==n&&(n=D(n),null===m.sType?m.sType=n:m.sType!=n&&"html"!=m.sType&&(m.sType="string"))),"function"===typeof m.mData&&
(r.innerHTML=x(a,b,h,"display")),s&&(n=T(a,b,h),r.innerHTML=n,m.bUseRendered&&I(a,b,h,n)),o&&(r.className+=" "+m.sClass),k?d._anHidden[h]=null:(d._anHidden[h]=r,r.parentNode.removeChild(r)),m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,r,x(a,b,h,"display"),d._aData,b,h)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],C(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}}function K(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function ea(a,b,c){for(var b=
L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===c)return d;return-1}function Y(a,b,c,d){for(var h=[],f=0,g=d.length;f<g;f++)h.push(x(a,b,d[f],c));return h}function x(a,b,c,d){var h=a.aoColumns[c];if((c=h.fnGetData(a.aoData[b]._aData,d))===n)return a.iDrawError!=a.iDraw&&null===h.sDefaultContent&&(E(a,0,"Requested unknown parameter "+("function"==typeof h.mData?"{mData function}":"'"+h.mData+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw),h.sDefaultContent;if(null===c&&null!==h.sDefaultContent)c=
h.sDefaultContent;else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function I(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function S(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d,h){return a(b,d,h)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,h){var f=h.split("."),g;if(""!==h){var e=0;for(g=f.length;e<g;e++){if(h=f[e].match(V)){f[e]=f[e].replace(V,"");""!==f[e]&&(a=a[f[e]]);
g=[];f.splice(0,e+1);for(var f=f.join("."),e=0,i=a.length;e<i;e++)g.push(b(a[e],d,f));a=h[0].substring(1,h[0].length-1);a=""===a?g:g.join(a);break}if(null===a||a[f[e]]===n)return n;a=a[f[e]]}}return a};return function(c,d){return b(c,d,a)}}return function(b){return b[a]}}function ta(a){if(null===a)return function(){};if("function"===typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("["))){var b=function(a,d,h){var h=h.split("."),f,g,e=0;for(g=
h.length-1;e<g;e++){if(f=h[e].match(V)){h[e]=h[e].replace(V,"");a[h[e]]=[];f=h.slice();f.splice(0,e+1);g=f.join(".");for(var i=0,m=d.length;i<m;i++)f={},b(f,d[i],g),a[h[e]].push(f);return}if(null===a[h[e]]||a[h[e]]===n)a[h[e]]={};a=a[h[e]]}a[h[h.length-1].replace(V,"")]=d};return function(c,d){return b(c,d,a)}}return function(b,d){b[a]=d}}function Z(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function fa(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,
a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);A(a)}function ga(a,b){for(var c=-1,d=0,h=a.length;d<h;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function T(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mData},x(a,b,c,"display"))}function da(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&&
i(c.nTr).addClass(c._aData.DT_RowClass);for(var h=0,f=a.aoColumns.length;h<f;h++){var g=a.aoColumns[h];d=l.createElement(g.sCellType);d.innerHTML="function"===typeof g.fnRender&&(!g.bUseRendered||null===g.mData)?T(a,b,h):x(a,b,h,"display");null!==g.sClass&&(d.className=g.sClass);g.bVisible?(c.nTr.appendChild(d),c._anHidden[h]=null):c._anHidden[h]=d;g.fnCreatedCell&&g.fnCreatedCell.call(a.oInstance,d,x(a,b,h,"display"),c._aData,b,h)}C(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function wa(a){var b,
c,d;if(0!==a.nTHead.getElementsByTagName("th").length){b=0;for(d=a.aoColumns.length;b<d;b++)if(c=a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var h=l.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=
a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),h.appendChild(c);i(a.nTHead).html("")[0].appendChild(h);W(a.aoHeader,a.nTHead)}i(a.nTHead).children("tr").attr("role","row");if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;h=l.createElement("div");h.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(h);var f=l.createElement("span");f.className=a.oClasses.sSortIcon;h.appendChild(f);c.appendChild(h)}}if(a.oFeatures.bSort)for(b=
0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ha(a,a.aoColumns[b].nTh,b):i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);""!==a.oClasses.sFooterTH&&i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=P(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)c[b]&&(a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&i(c[b]).addClass(a.aoColumns[b].sClass))}}function X(a,b,c){var d,h,f,g=[],e=[],i=a.aoColumns.length,m;c===n&&(c=!1);d=0;for(h=
b.length;d<h;d++){g[d]=b[d].slice();g[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&g[d].splice(f,1);e.push([])}d=0;for(h=g.length;d<h;d++){if(a=g[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=g[d].length;f<b;f++)if(m=i=1,e[d][f]===n){a.appendChild(g[d][f].cell);for(e[d][f]=1;g[d+i]!==n&&g[d][f].cell==g[d+i][f].cell;)e[d+i][f]=1,i++;for(;g[d][f+m]!==n&&g[d][f].cell==g[d][f+m].cell;){for(c=0;c<i;c++)e[d+c][f+m]=1;m++}g[d][f].cell.rowSpan=i;g[d][f].cell.colSpan=m}}}function z(a){var b=
C(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==i.inArray(!1,b))F(a,!1);else{var c,d,b=[],h=0,f=a.asStripeClasses.length;c=a.aoOpenRows.length;a.bDrawing=!0;a.iInitDisplayStart!==n&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,A(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!xa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var g=
a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(g=0,d=a.aoData.length);for(;g<d;g++){var e=a.aoData[a.aiDisplay[g]];null===e.nTr&&da(a,a.aiDisplay[g]);var s=e.nTr;if(0!==f){var m=a.asStripeClasses[h%f];e._sRowStripe!=m&&(i(s).removeClass(e._sRowStripe).addClass(m),e._sRowStripe=m)}C(a,"aoRowCallback",null,[s,a.aoData[a.aiDisplay[g]]._aData,h,g]);b.push(s);h++;if(0!==c)for(e=0;e<c;e++)if(s==a.aoOpenRows[e].nParent){b.push(a.aoOpenRows[e].nTr);break}}}else b[0]=l.createElement("tr"),a.asStripeClasses[0]&&
(b[0].className=a.asStripeClasses[0]),c=a.oLanguage,f=c.sZeroRecords,1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide?f=c.sLoadingRecords:c.sEmptyTable&&0===a.fnRecordsTotal()&&(f=c.sEmptyTable),c=l.createElement("td"),c.setAttribute("valign","top"),c.colSpan=w(a),c.className=a.oClasses.sRowEmpty,c.innerHTML=ia(a,f),b[h].appendChild(c);C(a,"aoHeaderCallback","header",[i(a.nTHead).children("tr")[0],Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);C(a,"aoFooterCallback","footer",[i(a.nTFoot).children("tr")[0],
Z(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);h=l.createDocumentFragment();c=l.createDocumentFragment();if(a.nTBody){f=a.nTBody.parentNode;c.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;c=a.nTBody.firstChild;)a.nTBody.removeChild(c);c=0;for(d=b.length;c<d;c++)h.appendChild(b[c]);a.nTBody.appendChild(h);null!==f&&f.appendChild(a.nTBody)}C(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(F(a,!1),
a._bInitComplete||$(a))}}function aa(a){a.oFeatures.bSort?Q(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(A(a),z(a))}function ya(a){var b=i("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=i('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),h,f,g,e,s,m,o,k=0;k<d.length;k++){f=0;g=d[k];if("<"==g){e=i("<div></div>")[0];s=d[k+
1];if("'"==s||'"'==s){m="";for(o=2;d[k+o]!=s;)m+=d[k+o],o++;"H"==m?m=a.oClasses.sJUIHeader:"F"==m&&(m=a.oClasses.sJUIFooter);-1!=m.indexOf(".")?(s=m.split("."),e.id=s[0].substr(1,s[0].length-1),e.className=s[1]):"#"==m.charAt(0)?e.id=m.substr(1,m.length-1):e.className=m;k+=o}c.appendChild(e);c=e}else if(">"==g)c=c.parentNode;else if("l"==g&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)h=za(a),f=1;else if("f"==g&&a.oFeatures.bFilter)h=Aa(a),f=1;else if("r"==g&&a.oFeatures.bProcessing)h=Ba(a),f=
1;else if("t"==g)h=Ca(a),f=1;else if("i"==g&&a.oFeatures.bInfo)h=Da(a),f=1;else if("p"==g&&a.oFeatures.bPaginate)h=Ea(a),f=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(s=e.length;o<s;o++)if(g==e[o].cFeature){(h=e[o].fnInit(a))&&(f=1);break}}1==f&&null!==h&&("object"!==typeof a.aanFeatures[g]&&(a.aanFeatures[g]=[]),a.aanFeatures[g].push(h),c.appendChild(h))}b.parentNode.replaceChild(a.nTableWrapper,b)}function W(a,b){var c=i(b).children("tr"),d,h,f,g,e,s,m,j;a.splice(0,a.length);
h=0;for(s=c.length;h<s;h++)a.push([]);h=0;for(s=c.length;h<s;h++){f=0;for(m=c[h].childNodes.length;f<m;f++)if(d=c[h].childNodes[f],"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var o=1*d.getAttribute("colspan"),k=1*d.getAttribute("rowspan"),o=!o||0===o||1===o?1:o,k=!k||0===k||1===k?1:k;for(g=0;a[h][g];)g++;j=g;for(e=0;e<o;e++)for(g=0;g<k;g++)a[h+g][j+e]={cell:d,unique:1==o?!0:!1},a[h+g].nTr=c[h]}}}function P(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],W(c,b)));for(var b=0,h=c.length;b<
h;b++)for(var f=0,g=c[b].length;f<g;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function xa(a){if(a.bAjaxDataGet){a.iDraw++;F(a,!0);var b=Fa(a);ja(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Ga(a,b)},a);return!1}return!0}function Fa(a){var b=a.aoColumns.length,c=[],d,h,f,g;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:H(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",
value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mData,c.push({name:"mDataProp_"+f,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==
a.oFeatures.bSort){var e=0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<d.length;f++){h=a.aoColumns[d[f][0]].aDataSort;for(g=0;g<h.length;g++)c.push({name:"iSortCol_"+e,value:h[g]}),c.push({name:"sSortDir_"+e,value:d[f][1]}),e++}c.push({name:"iSortingCols",value:e});for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ja(a,b){C(a,"aoServerParams","serverParams",[b])}function Ga(a,b){if(b.sEcho!==n){if(1*b.sEcho<
a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&fa(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=H(a),c=b.sColumns!==n&&""!==c&&b.sColumns!=c,d;c&&(d=y(a,b.sColumns));for(var h=S(a.sAjaxDataProp)(b),f=0,g=h.length;f<g;f++)if(c){for(var e=[],i=0,m=a.aoColumns.length;i<m;i++)e.push(h[f][d[i]]);J(a,e)}else J(a,h[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;z(a);a.bAjaxDataGet=
!0;F(a,!1)}function Aa(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=i('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value,
g=0,e=c.length;g<e;g++)c[g]!=i(this).parents("div.dataTables_filter")[0]&&i(c[g]._DT_Input).val(d);d!=b.sSearch&&M(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(a.keyCode==13)return false});return d}function M(a,b,c){var d=a.oPreviousSearch,h=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)f(b);
else{Ha(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ia(a,h[b].sSearch,b,h[b].bRegex,h[b].bSmart,h[b].bCaseInsensitive);Ja(a)}a.bFiltered=!0;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;A(a);z(a);ka(a,0)}function Ja(a){for(var b=j.ext.afnFiltering,c=v(a,"bSearchable"),d=0,h=b.length;d<h;d++)for(var f=0,g=0,e=a.aiDisplay.length;g<e;g++){var i=a.aiDisplay[g-f];b[d](a,Y(a,i,"filter",c),i)||(a.aiDisplay.splice(g-f,1),f++)}}function Ia(a,b,c,
d,h,f){if(""!==b)for(var g=0,b=la(b,d,h,f),d=a.aiDisplay.length-1;0<=d;d--)h=Ka(x(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(h)||(a.aiDisplay.splice(d,1),g++)}function Ha(a,b,c,d,h,f){d=la(b,d,h,f);h=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||h.sSearch.length>b.length||1==c||0!==b.indexOf(h.sSearch)){a.aiDisplay.splice(0,
a.aiDisplay.length);ka(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function ka(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch=[];for(var c=v(a,"bSearchable"),d=1===b?a.aiDisplayMaster:a.aiDisplay,h=0,f=d.length;h<f;h++)a.asDataSearch[h]=ma(a,Y(a,d[h],"filter",c))}}function ma(a,b){var c=b.join(" ");-1!==c.indexOf("&")&&(c=i("<div>").html(c).text());
return c.replace(/[\n\r]/g," ")}function la(a,b,c,d){if(c)return a=b?a.split(" "):na(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:na(a);return RegExp(a,d?"i":"")}function Ka(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function na(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)","g"),
"\\$1")}function Da(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:La,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function La(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),h=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),g;g=0===f&&f==h?b.sInfoEmpty:0===f?b.sInfoEmpty+" "+b.sInfoFiltered:f==h?b.sInfo:b.sInfo+
" "+b.sInfoFiltered;g+=b.sInfoPostFix;g=ia(a,g);null!==b.fnInfoCallback&&(g=b.fnInfoCallback.call(a.oInstance,a,c,d,h,f,g));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(g)}}function ia(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),h=a.fnRecordsDisplay(),h=a.fnFormatNumber(h),f=a.fnRecordsTotal(),f=a.fnFormatNumber(f);a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace("_START_",c).replace("_END_",d).replace("_TOTAL_",h).replace("_MAX_",
f)}function ba(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){ba(a)},200);else{ya(a);wa(a);X(a,a.aoHeader);a.nTFoot&&X(a,a.aoFooter);F(a,!0);a.oFeatures.bAutoWidth&&ca(a);b=0;for(c=a.aoColumns.length;b<c;b++)null!==a.aoColumns[b].sWidth&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?Q(a):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),A(a),z(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ja(a,
c),a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(c){var f=a.sAjaxDataProp!==""?S(a.sAjaxDataProp)(c):c;for(b=0;b<f.length;b++)J(a,f[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)Q(a);else{a.aiDisplay=a.aiDisplayMaster.slice();A(a);z(a)}F(a,false);$(a,c)},a)):a.oFeatures.bServerSide||(F(a,!1),$(a))}}function $(a,b){a._bInitComplete=!0;C(a,"aoInitComplete","init",[a,b])}function oa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&(a.sZeroRecords&&"No data available in table"===b.sEmptyTable)&&
p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(a.sZeroRecords&&"Loading..."===b.sLoadingRecords)&&p(a,a,"sZeroRecords","sLoadingRecords")}function za(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,h=a.aLengthMenu;if(2==h.length&&"object"===typeof h[0]&&"object"===typeof h[1]){c=0;for(d=h[0].length;c<d;c++)b+='<option value="'+h[0][c]+'">'+h[1][c]+"</option>"}else{c=0;for(d=h.length;c<d;c++)b+='<option value="'+h[c]+'">'+h[c]+"</option>"}b+=
"</select>";h=l.createElement("div");a.aanFeatures.l||(h.id=a.sTableId+"_length");h.className=a.oClasses.sLength;h.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";i('select option[value="'+a._iDisplayLength+'"]',h).attr("selected",!0);i("select",h).bind("change.DT",function(){var b=i(this).val(),h=a.aanFeatures.l;c=0;for(d=h.length;c<d;c++)h[c]!=this.parentNode&&i("select",h[c]).val(b);a._iDisplayLength=parseInt(b,10);A(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=
a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;z(a)});i("select",h).attr("aria-controls",a.sTableId);return h}function A(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Ea(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;
j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){A(a);z(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){A(a);z(a)})},sName:"pagination"});return b}function pa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-
a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else E(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Ba(a){var b=
l.createElement("div");a.aanFeatures.r||(b.id=a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function F(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,h=c.length;d<h;d++)c[d].style.visibility=b?"visible":"hidden";i(a.oInstance).trigger("processing",[a,b])}function Ca(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=
l.createElement("div"),h=l.createElement("div"),f=l.createElement("div"),g=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),m=a.nTable.getElementsByTagName("thead")[0],o=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],k=a.oClasses;c.appendChild(d);f.appendChild(g);h.appendChild(a.nTable);b.appendChild(c);b.appendChild(h);d.appendChild(e);e.appendChild(m);null!==o&&(b.appendChild(f),g.appendChild(j),j.appendChild(o));b.className=
k.sScrollWrapper;c.className=k.sScrollHead;d.className=k.sScrollHeadInner;h.className=k.sScrollBody;f.className=k.sScrollFoot;g.className=k.sScrollFootInner;a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",h.style.overflow="auto");c.style.border="0";c.style.width="100%";f.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==o&&(j.removeAttribute("id"),
j.style.marginLeft="0");d=i(a.nTable).children("caption");0<d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&o&&j.appendChild(d));""!==a.oScroll.sX&&(c.style.width=q(a.oScroll.sX),h.style.width=q(a.oScroll.sX),null!==o&&(f.style.width=q(a.oScroll.sX)),i(h).scroll(function(){c.scrollLeft=this.scrollLeft;if(o!==null)f.scrollLeft=this.scrollLeft}));""!==a.oScroll.sY&&(h.style.height=q(a.oScroll.sY));a.aoDrawCallback.push({fn:Ma,sName:"scrolling"});a.oScroll.bInfinite&&
i(h).scroll(function(){if(!a.bDrawing&&i(this).scrollTop()!==0&&i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()){pa(a,"next");A(a);z(a)}});a.nScrollHead=c;a.nScrollFoot=f;return b}function Ma(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,h,f,g,e,j,m,o,k,r=[],n=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,p=null!==a.nTFoot?n.getElementsByTagName("table")[0]:
null,l=a.oBrowser.bScrollOversize;i(a.nTable).children("thead, tfoot").remove();g=i(a.nTHead).clone()[0];a.nTable.insertBefore(g,a.nTable.childNodes[0]);null!==a.nTFoot&&(j=i(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]));""===a.oScroll.sX&&(d.style.width="100%",b.parentNode.style.width="100%");var t=P(a,g);h=0;for(f=t.length;h<f;h++)o=G(a,h),t[h].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width=""},j.getElementsByTagName("tr"));a.oScroll.bCollapse&&
""!==a.oScroll.sY&&(d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px");h=i(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",l&&(i("tbody",d).height()>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=q(a.oScroll.sXInner):h==i(d).width()&&i(d).height()<i(a.nTable).height()?(a.nTable.style.width=q(h-a.oScroll.iBarWidth),i(a.nTable).outerWidth()>h-a.oScroll.iBarWidth&&
(a.nTable.style.width=q(h))):a.nTable.style.width=q(h);h=i(a.nTable).outerWidth();f=a.nTHead.getElementsByTagName("tr");g=g.getElementsByTagName("tr");N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;k=i(a).width();b.style.width=q(k);r.push(k)},g,f);i(g).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth=
"0";m.borderBottomWidth="0";m.height=0;k=i(a).width();b.style.width=q(k);r.push(k)},e,j),i(e).height(0));N(function(a){a.innerHTML="";a.style.width=q(r.shift())},g);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=q(r.shift())},e);if(i(a.nTable).outerWidth()<h){e=d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")?h+a.oScroll.iBarWidth:h;if(l&&(d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=q(e-a.oScroll.iBarWidth);d.style.width=q(e);b.parentNode.style.width=
q(e);null!==a.nTFoot&&(n.parentNode.style.width=q(e));""===a.oScroll.sX?E(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==a.oScroll.sXInner&&E(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),b.parentNode.style.width=q("100%"),null!==a.nTFoot&&(n.parentNode.style.width=
q("100%"));""===a.oScroll.sY&&l&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),l=""!==a.oScroll.sX&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(a.nTable.offsetHeight+l)));l=i(a.nTable).outerWidth();c.style.width=q(l);b.style.width=q(l);c=i(a.nTable).height()>d.clientHeight||"scroll"==i(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+
"px":"0px";null!==a.nTFoot&&(p.style.width=q(l),n.style.width=q(l),n.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");i(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,h=b.length;d<h;d++)for(var f=0,g=b[d].childNodes.length;f<g;f++)1==b[d].childNodes[f].nodeType&&(c?a(b[d].childNodes[f],c[d].childNodes[f]):a(b[d].childNodes[f]))}function Na(a,b){if(!a||null===a||""===a)return 0;b||(b=l.getElementsByTagName("body")[0]);var c,d=l.createElement("div");d.style.width=
q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ca(a){var b=0,c,d=0,h=a.aoColumns.length,f,g=i("th",a.nTHead),e=a.nTable.getAttribute("width");for(f=0;f<h;f++)a.aoColumns[f].bVisible&&(d++,null!==a.aoColumns[f].sWidth&&(c=Na(a.aoColumns[f].sWidthOrig,a.nTable.parentNode),null!==c&&(a.aoColumns[f].sWidth=q(c)),b++));if(h==g.length&&0===b&&d==h&&""===a.oScroll.sX&&""===a.oScroll.sY)for(f=0;f<a.aoColumns.length;f++)c=i(g[f]).width(),null!==c&&(a.aoColumns[f].sWidth=q(c));else{b=
a.nTable.cloneNode(!1);f=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(f);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=i("thead th",b);0===d.length&&(d=i("tbody tr:eq(0)>td",b));g=P(a,f);for(f=d=0;f<h;f++){var j=a.aoColumns[f];j.bVisible&&null!==j.sWidthOrig&&""!==j.sWidthOrig?g[f-d].style.width=q(j.sWidthOrig):j.bVisible?g[f-
d].style.width="":d++}for(f=0;f<h;f++)a.aoColumns[f].bVisible&&(d=Oa(a,f),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[f].sContentPadding&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));h=a.nTable.parentNode;h.appendChild(b);""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.width=q(a.oScroll.sXInner):""!==a.oScroll.sX?(b.style.width="",i(b).width()<h.offsetWidth&&(b.style.width=q(h.offsetWidth))):""!==a.oScroll.sY?b.style.width=q(h.offsetWidth):e&&(b.style.width=q(e));b.style.visibility=
"hidden";Pa(a,b);h=i("tbody tr:eq(0)",b).children();0===h.length&&(h=P(a,i("thead",b)[0]));if(""!==a.oScroll.sX){for(f=d=c=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=null===a.aoColumns[f].sWidthOrig?c+i(h[d]).outerWidth():c+(parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(i(h[d]).outerWidth()-i(h[d]).width())),d++);b.style.width=q(c);a.nTable.style.width=q(c)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=i(h[d]).width(),null!==c&&0<c&&(a.aoColumns[f].sWidth=q(c)),
d++);h=i(b).css("width");a.nTable.style.width=-1!==h.indexOf("%")?h:q(i(b).outerWidth());b.parentNode.removeChild(b)}e&&(a.nTable.style.width=q(e))}function Pa(a,b){""===a.oScroll.sX&&""!==a.oScroll.sY?(i(b).width(),b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(b.style.width=q(i(b).outerWidth()))}function Oa(a,b){var c=Qa(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=x(a,c,b,"");return d}return L(a,c)[b]}function Qa(a,b){for(var c=
-1,d=-1,h=0;h<a.aoData.length;h++){var f=x(a,h,b,"display")+"",f=f.replace(/<.*?>/g,"");f.length>c&&(c=f.length,d=h)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Ra(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";
b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=c.clientWidth);l.body.removeChild(c);return b-a}function Q(a,b){var c,d,h,f,g,e,o=[],m=[],k=j.ext.oSort,r=a.aoData,l=a.aoColumns,p=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],h=t(a,d),f=
a.aoColumns[d].sSortDataType,j.ext.afnSortData[f])if(g=j.ext.afnSortData[f].call(a.oInstance,a,d,h),g.length===r.length){h=0;for(f=r.length;h<f;h++)I(a,h,d,g[h])}else E(a,0,"Returned data sort array (col "+d+") is the wrong length");c=0;for(d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var q=o.length,G;c=0;for(d=r.length;c<d;c++)for(h=0;h<q;h++){G=l[o[h][0]].aDataSort;g=0;for(e=G.length;g<e;g++)f=l[G[g]].sType,f=k[(f?f:"string")+"-pre"],r[c]._aSortData[G[g]]=f?f(x(a,c,G[g],"sort")):
x(a,c,G[g],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,h,f,g;for(c=0;c<q;c++){g=l[o[c][0]].aDataSort;d=0;for(h=g.length;d<h;d++)if(f=l[g[d]].sType,f=k[(f?f:"string")+"-"+o[c][1]](r[a]._aSortData[g[d]],r[b]._aSortData[g[d]]),0!==f)return f}return k["numeric-asc"](m[a],m[b])})}(b===n||b)&&!a.oFeatures.bDeferRender&&R(a);c=0;for(d=a.aoColumns.length;c<d;c++)f=l[c].sTitle.replace(/<.*?>/g,""),h=l[c].nTh,h.removeAttribute("aria-sort"),h.removeAttribute("aria-label"),l[c].bSortable?0<o.length&&
o[0][0]==c?(h.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),h.setAttribute("aria-label",f+("asc"==(l[c].asSorting[o[0][2]+1]?l[c].asSorting[o[0][2]+1]:l[c].asSorting[0])?p.sSortAscending:p.sSortDescending))):h.setAttribute("aria-label",f+("asc"==l[c].asSorting[0]?p.sSortAscending:p.sSortDescending)):h.setAttribute("aria-label",f);a.bSorted=!0;i(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,
A(a),z(a))}function ha(a,b,c,d){Sa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var f=function(){var d,f;if(b.shiftKey){for(var e=!1,i=0;i<a.aaSorting.length;i++)if(a.aaSorting[i][0]==c){e=!0;d=a.aaSorting[i][0];f=a.aaSorting[i][2]+1;a.aoColumns[d].asSorting[f]?(a.aaSorting[i][1]=a.aoColumns[d].asSorting[f],a.aaSorting[i][2]=f):a.aaSorting.splice(i,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],f=a.aaSorting[0][2]+
1,a.aoColumns[d].asSorting[f]||(f=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[f],a.aaSorting[0][2]=f):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));Q(a)};a.oFeatures.bProcessing?(F(a,!0),setTimeout(function(){f();a.oFeatures.bServerSide||F(a,!1)},0)):f();"function"==typeof d&&d(a)}})}function R(a){var b,c,d,h,f,e=a.aoColumns.length,j=a.oClasses;for(b=0;b<e;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+
" "+a.aoColumns[b].sSortingClass);h=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<h.length;c++)if(h[c][0]==b){f="asc"==h[c][1]?j.sSortAsc:j.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(f);a.bJUI&&(c=i("span."+j.sSortIcon,a.aoColumns[b].nTh),c.removeClass(j.sSortJUIAsc+" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),
c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==h[d][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)i(d).removeClass(f+"1 "+f+"2 "+f+"3");else if(d.length>=e)for(b=0;b<e;b++)if(-1!=d[b].className.indexOf(f+"1")){c=0;for(a=d.length/e;c<a;c++)d[e*c+b].className=i.trim(d[e*c+b].className.replace(f+"1",""))}else if(-1!=d[b].className.indexOf(f+
"2")){c=0;for(a=d.length/e;c<a;c++)d[e*c+b].className=i.trim(d[e*c+b].className.replace(f+"2",""))}else if(-1!=d[b].className.indexOf(f+"3")){c=0;for(a=d.length/e;c<a;c++)d[e*c+b].className=i.trim(d[e*c+b].className.replace(" "+f+"3",""))}var j=1,o;for(b=0;b<h.length;b++){o=parseInt(h[b][0],10);c=0;for(a=d.length/e;c<a;c++)d[e*c+o].className+=" "+f+j;3>j&&j++}}}function qa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,
iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:i.extend(!0,[],a.aaSorting),oSearch:i.extend(!0,{},a.oPreviousSearch),aoSearchCols:i.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};b=0;for(c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);C(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Ta(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=C(a,"aoStateLoadParams","stateLoadParams",
[a,c]);if(-1===i.inArray(!1,d)){a.oLoadedState=i.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();i.extend(a.oPreviousSearch,c.oSearch);i.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];C(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Ua(a){for(var b=
O.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function u(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function U(a){for(var b=[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a,
b){var c=[],d,h,f,e,i,j;h=0;var o=a.aoData.length;b!==n&&(h=b,o=b+1);for(f=h;f<o;f++)if(j=a.aoData[f],null!==j.nTr){h=[];e=0;for(i=j.nTr.childNodes.length;e<i;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&h.push(j.nTr.childNodes[e]);e=d=0;for(i=a.aoColumns.length;e<i;e++)a.aoColumns[e].bVisible?c.push(h[e-d]):(c.push(j._anHidden[e]),d++)}return c}function E(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"==
j.ext.sErrMode)alert(a);else throw Error(a);else O.console&&console.log&&console.log(a)}function p(a,b,c,d){d===n&&(d=c);b[c]!==n&&(a[d]=b[c])}function Va(a,b){var c,d;for(d in b)b.hasOwnProperty(d)&&(c=b[d],"object"===typeof e[d]&&null!==c&&!1===i.isArray(c)?i.extend(!0,a[d],c):a[d]=c);return a}function Sa(a,b,c){i(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}function B(a,b,c,d){c&&a[b].push({fn:c,
sName:d})}function C(a,b,c,d){for(var b=a[b],h=[],e=b.length-1;0<=e;e--)h.push(b[e].fn.apply(a.oInstance,d));null!==c&&i(a.oInstance).trigger(c,d);return h}function Wa(a){var b=i('<div style="position:absolute; top:0; left:0; height:1px; width:1px; overflow:hidden"><div style="position:absolute; top:1px; left:1px; width:100px; height:50px; overflow:scroll;"><div id="DT_BrowserTest" style="width:100%; height:10px;"></div></div></div>')[0];l.body.appendChild(b);a.oBrowser.bScrollOversize=100===i("#DT_BrowserTest",
b)[0].offsetWidth?!0:!1;l.body.removeChild(b)}function Xa(a){return function(){var b=[u(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var V=/\[.*?\]$/,Ya=O.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,h=[],e=i.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Ya(d)),h.push((e?"":'"'+c+'":')+d);return(e?"[":"{")+h+(e?"]":"}")};
this.$=function(a,b){var c,d,h=[],e;d=u(this[j.ext.iApiIndex]);var g=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=i.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c<d;c++)(e=g[o[c]].nTr)&&h.push(e)}else if("current"==b.order&&"none"==b.filter){c=0;for(d=k.length;c<d;c++)(e=g[k[c]].nTr)&&h.push(e)}else if("current"==b.order&&"applied"==b.filter){c=0;for(d=o.length;c<d;c++)(e=g[o[c]].nTr)&&h.push(e)}else if("original"==
b.order&&"none"==b.filter){c=0;for(d=g.length;c<d;c++)(e=g[c].nTr)&&h.push(e)}else if("original"==b.order&&"applied"==b.filter){c=0;for(d=g.length;c<d;c++)e=g[c].nTr,-1!==i.inArray(c,o)&&e&&h.push(e)}else E(d,1,"Unknown selection options");h=i(h);c=h.filter(a);h=h.find(a);return i([].concat(i.makeArray(c),i.makeArray(h)))};this._=function(a,b){var c=[],d,e,f=this.$(a,b);d=0;for(e=f.length;d<e;d++)c.push(this.fnGetData(f[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],
d,e=u(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var f=0;f<a.length;f++){d=J(e,a[f]);if(-1==d)return c;c.push(d)}else{d=J(e,a);if(-1==d)return c;c.push(d)}e.aiDisplay=e.aiDisplayMaster.slice();(b===n||b)&&aa(e);return c};this.fnAdjustColumnSizing=function(a){var b=u(this[j.ext.iApiIndex]);k(b);a===n||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=u(this[j.ext.iApiIndex]);fa(b);(a===n||a)&&z(b)};this.fnClose=
function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=u(this[j.ext.iApiIndex]),e,f,a="object"===typeof a?K(d,a):a,g=d.aoData.splice(a,1);e=0;for(f=d.aoData.length;e<f;e++)null!==d.aoData[e].nTr&&(d.aoData[e].nTr._DT_RowIndex=e);e=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(e,1);ga(d.aiDisplayMaster,
a);ga(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,g);d._iDisplayStart>=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)A(d),z(d);return g};this.fnDestroy=function(a){var b=u(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,e,f,a=a===n?!1:!0;b.bDestroying=!0;C(b,"aoDestroyCallback","destroy",[b]);e=0;for(f=b.aoColumns.length;e<f;e++)!1===b.aoColumns[e].bVisible&&this.fnSetColumnVis(e,!0);i(b.nTableWrapper).find("*").andSelf().unbind(".DT");
i("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(i(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(i(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);i(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];R(b);i(U(b)).removeClass(b.asStripeClasses.join(" "));i("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,
b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(i("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),i("th, td",b.nTHead).each(function(){var a=i("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();i(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);e=0;for(f=b.aoData.length;e<f;e++)null!==b.aoData[e].nTr&&d.appendChild(b.aoData[e].nTr);!0===b.oFeatures.bAutoWidth&&
(b.nTable.style.width=q(b.sDestroyWidth));i(d).children("tr:even").addClass(b.asDestroyStripes[0]);i(d).children("tr:odd").addClass(b.asDestroyStripes[1]);e=0;for(f=j.settings.length;e<f;e++)j.settings[e]==b&&j.settings.splice(e,1);b=null};this.fnDraw=function(a){var b=u(this[j.ext.iApiIndex]);!1===a?(A(b),z(b)):aa(b)};this.fnFilter=function(a,b,c,d,e,f){var g=u(this[j.ext.iApiIndex]);if(g.oFeatures.bFilter){if(c===n||null===c)c=!1;if(d===n||null===d)d=!0;if(e===n||null===e)e=!0;if(f===n||null===
f)f=!0;if(b===n||null===b){if(M(g,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f},1),e&&g.aanFeatures.f){b=g.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i(b[c]._DT_Input).val(a)}}else i.extend(g.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f}),M(g,g.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=u(this[j.ext.iApiIndex]);if(a!==n){var d=a;if("object"===typeof a){var e=a.nodeName.toLowerCase();"tr"===e?d=K(c,a):"td"===e&&(d=K(c,a.parentNode),b=ea(c,d,a))}return b!==
n?x(c,d,b,""):c.aoData[d]!==n?c.aoData[d]._aData:null}return Z(c)};this.fnGetNodes=function(a){var b=u(this[j.ext.iApiIndex]);return a!==n?b.aoData[a]!==n?b.aoData[a].nTr:null:U(b)};this.fnGetPosition=function(a){var b=u(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?K(b,a):"TD"==c||"TH"==c?(c=K(b,a.parentNode),a=ea(b,c,a),[c,t(b,a),a]):null};this.fnIsOpen=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};
this.fnOpen=function(a,b,c){var d=u(this[j.ext.iApiIndex]),e=U(d);if(-1!==i.inArray(a,e)){this.fnClose(a);var e=l.createElement("tr"),f=l.createElement("td");e.appendChild(f);f.className=c;f.colSpan=w(d);"string"===typeof b?f.innerHTML=b:i(f).html(b);b=i("tr",d.nTBody);-1!=i.inArray(a,b)&&i(e).insertAfter(a);d.aoOpenRows.push({nTr:e,nParent:a});return e}};this.fnPageChange=function(a,b){var c=u(this[j.ext.iApiIndex]);pa(c,a);A(c);(b===n||b)&&z(c)};this.fnSetColumnVis=function(a,b,c){var d=u(this[j.ext.iApiIndex]),
e,f,g=d.aoColumns,i=d.aoData,o,m;if(g[a].bVisible!=b){if(b){for(e=f=0;e<a;e++)g[e].bVisible&&f++;m=f>=w(d);if(!m)for(e=a;e<g.length;e++)if(g[e].bVisible){o=e;break}e=0;for(f=i.length;e<f;e++)null!==i[e].nTr&&(m?i[e].nTr.appendChild(i[e]._anHidden[a]):i[e].nTr.insertBefore(i[e]._anHidden[a],L(d,e)[o]))}else{e=0;for(f=i.length;e<f;e++)null!==i[e].nTr&&(o=L(d,e)[a],i[e]._anHidden[a]=o,o.parentNode.removeChild(o))}g[a].bVisible=b;X(d,d.aoHeader);d.nTFoot&&X(d,d.aoFooter);e=0;for(f=d.aoOpenRows.length;e<
f;e++)d.aoOpenRows[e].nTr.colSpan=w(d);if(c===n||c)k(d),z(d);qa(d)}};this.fnSettings=function(){return u(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=u(this[j.ext.iApiIndex]);b.aaSorting=a;Q(b)};this.fnSortListener=function(a,b,c){ha(u(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,e){var f=u(this[j.ext.iApiIndex]),b="object"===typeof b?K(f,b):b;if(i.isArray(a)&&c===n){f.aoData[b]._aData=a.slice();for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(x(f,b,c),b,c,!1,!1)}else if(i.isPlainObject(a)&&
c===n){f.aoData[b]._aData=i.extend(!0,{},a);for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(x(f,b,c),b,c,!1,!1)}else{I(f,b,c,a);var a=x(f,b,c,"display"),g=f.aoColumns[c];null!==g.fnRender&&(a=T(f,b,c),g.bUseRendered&&I(f,b,c,a));null!==f.aoData[b].nTr&&(L(f,b)[c].innerHTML=a)}c=i.inArray(b,f.aiDisplay);f.asDataSearch[c]=ma(f,Y(f,b,"filter",v(f,"bSearchable")));(e===n||e)&&k(f);(d===n||d)&&aa(f);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Xa,_fnInitialise:ba,_fnInitComplete:$,
_fnLanguageCompat:oa,_fnAddColumn:o,_fnColumnOptions:r,_fnAddData:J,_fnCreateTr:da,_fnGatherData:va,_fnBuildHead:wa,_fnDrawHead:X,_fnDraw:z,_fnReDraw:aa,_fnAjaxUpdate:xa,_fnAjaxParameters:Fa,_fnAjaxUpdateDraw:Ga,_fnServerParams:ja,_fnAddOptionsHtml:ya,_fnFeatureHtmlTable:Ca,_fnScrollDraw:Ma,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:Aa,_fnFilterComplete:M,_fnFilterCustom:Ja,_fnFilterColumn:Ia,_fnFilter:Ha,_fnBuildSearchArray:ka,_fnBuildSearchRow:ma,_fnFilterCreateSearch:la,_fnDataToSearch:Ka,_fnSort:Q,
_fnSortAttachListener:ha,_fnSortingClasses:R,_fnFeatureHtmlPaginate:Ea,_fnPageChange:pa,_fnFeatureHtmlInfo:Da,_fnUpdateInfo:La,_fnFeatureHtmlLength:za,_fnFeatureHtmlProcessing:Ba,_fnProcessingDisplay:F,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:t,_fnNodeToDataIndex:K,_fnVisbleColumns:w,_fnCalculateEnd:A,_fnConvertToWidth:Na,_fnCalculateColumnWidths:ca,_fnScrollingWidthAdjust:Pa,_fnGetWidestNode:Oa,_fnGetMaxLenString:Qa,_fnStringToCss:q,_fnDetectType:D,_fnSettingsFromNode:u,_fnGetDataMaster:Z,
_fnGetTrNodes:U,_fnGetTdNodes:L,_fnEscapeRegex:na,_fnDeleteIndex:ga,_fnReOrderIndex:y,_fnColumnOrdering:H,_fnLog:E,_fnClearTable:fa,_fnSaveState:qa,_fnLoadState:Ta,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1E3*c);var c=O.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),g;null!==e?(g="function"===typeof i.parseJSON?i.parseJSON(b):eval("("+b+")"),b=e(a,g,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+
"; path="+c.join("/")+"/";e="";f=9999999999999;if(4096<(null!==Ua(a)?l.cookie.length:b.length+l.cookie.length)+10){for(var a=l.cookie.split(";"),j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k=a[j].split("=");try{g=eval("("+decodeURIComponent(k[1])+")")}catch(r){continue}g.iCreate&&g.iCreate<f&&(e=k[0],f=g.iCreate)}""!==e&&(l.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/")}l.cookie=b},_fnReadCookie:Ua,_fnDetectHeader:W,_fnGetUniqueThs:P,_fnScrollBarWidth:Ra,_fnApplyToChildren:N,
_fnMap:p,_fnGetRowData:Y,_fnGetCellData:x,_fnSetCellData:I,_fnGetObjectDataFn:S,_fnSetObjectDataFn:ta,_fnApplyColumnDefs:ua,_fnBindAction:Sa,_fnExtend:Va,_fnCallbackReg:B,_fnCallbackFire:C,_fnJsonString:Ya,_fnRender:T,_fnNodeToColumnIndex:ea,_fnInfoMacros:ia,_fnBrowserDetect:Wa,_fnGetColumns:v};i.extend(j.ext.oApi,this.oApi);for(var ra in j.ext.oApi)ra&&(this[ra]=Xa(ra));var sa=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var h=!1,f=!1;if("table"!=this.nodeName.toLowerCase())E(null,
0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{a=0;for(b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===n||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{E(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,
1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var g=i.extend(!0,{},j.models.oSettings,{nTable:this,oApi:sa.oApi,oInit:e,sDestroyWidth:i(this).width(),sInstance:c,sTableId:c});j.settings.push(g);g.oInstance=1===sa.length?sa:i(this).dataTable();e||(e={});e.oLanguage&&oa(e.oLanguage);e=Va(i.extend(!0,{},j.defaults),e);p(g.oFeatures,e,"bPaginate");p(g.oFeatures,e,"bLengthChange");p(g.oFeatures,e,"bFilter");p(g.oFeatures,e,"bSort");p(g.oFeatures,e,"bInfo");
p(g.oFeatures,e,"bProcessing");p(g.oFeatures,e,"bAutoWidth");p(g.oFeatures,e,"bSortClasses");p(g.oFeatures,e,"bServerSide");p(g.oFeatures,e,"bDeferRender");p(g.oScroll,e,"sScrollX","sX");p(g.oScroll,e,"sScrollXInner","sXInner");p(g.oScroll,e,"sScrollY","sY");p(g.oScroll,e,"bScrollCollapse","bCollapse");p(g.oScroll,e,"bScrollInfinite","bInfinite");p(g.oScroll,e,"iScrollLoadGap","iLoadGap");p(g.oScroll,e,"bScrollAutoCss","bAutoCss");p(g,e,"asStripeClasses");p(g,e,"asStripClasses","asStripeClasses");
p(g,e,"fnServerData");p(g,e,"fnFormatNumber");p(g,e,"sServerMethod");p(g,e,"aaSorting");p(g,e,"aaSortingFixed");p(g,e,"aLengthMenu");p(g,e,"sPaginationType");p(g,e,"sAjaxSource");p(g,e,"sAjaxDataProp");p(g,e,"iCookieDuration");p(g,e,"sCookiePrefix");p(g,e,"sDom");p(g,e,"bSortCellsTop");p(g,e,"iTabIndex");p(g,e,"oSearch","oPreviousSearch");p(g,e,"aoSearchCols","aoPreSearchCols");p(g,e,"iDisplayLength","_iDisplayLength");p(g,e,"bJQueryUI","bJUI");p(g,e,"fnCookieCallback");p(g,e,"fnStateLoad");p(g,e,
"fnStateSave");p(g.oLanguage,e,"fnInfoCallback");B(g,"aoDrawCallback",e.fnDrawCallback,"user");B(g,"aoServerParams",e.fnServerParams,"user");B(g,"aoStateSaveParams",e.fnStateSaveParams,"user");B(g,"aoStateLoadParams",e.fnStateLoadParams,"user");B(g,"aoStateLoaded",e.fnStateLoaded,"user");B(g,"aoRowCallback",e.fnRowCallback,"user");B(g,"aoRowCreatedCallback",e.fnCreatedRow,"user");B(g,"aoHeaderCallback",e.fnHeaderCallback,"user");B(g,"aoFooterCallback",e.fnFooterCallback,"user");B(g,"aoInitComplete",
e.fnInitComplete,"user");B(g,"aoPreDrawCallback",e.fnPreDrawCallback,"user");g.oFeatures.bServerSide&&g.oFeatures.bSort&&g.oFeatures.bSortClasses?B(g,"aoDrawCallback",R,"server_side_sort_classes"):g.oFeatures.bDeferRender&&B(g,"aoDrawCallback",R,"defer_sort_classes");e.bJQueryUI?(i.extend(g.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(g.sDom='<"H"lfr>t<"F"ip>')):i.extend(g.oClasses,j.ext.oStdClasses);i(this).addClass(g.oClasses.sTable);if(""!==g.oScroll.sX||""!==
g.oScroll.sY)g.oScroll.iBarWidth=Ra();g.iInitDisplayStart===n&&(g.iInitDisplayStart=e.iDisplayStart,g._iDisplayStart=e.iDisplayStart);e.bStateSave&&(g.oFeatures.bStateSave=!0,Ta(g,e),B(g,"aoDrawCallback",qa,"state_save"));null!==e.iDeferLoading&&(g.bDeferLoading=!0,a=i.isArray(e.iDeferLoading),g._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,g._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(g.oLanguage.sUrl=e.oLanguage.sUrl,i.getJSON(g.oLanguage.sUrl,
null,function(a){oa(a);i.extend(true,g.oLanguage,e.oLanguage,a);ba(g)}),h=!0):i.extend(!0,g.oLanguage,e.oLanguage);null===e.asStripeClasses&&(g.asStripeClasses=[g.oClasses.sStripeOdd,g.oClasses.sStripeEven]);c=!1;d=i(this).children("tbody").children("tr");a=0;for(b=g.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(g.asStripeClasses[a])){c=!0;break}c&&(g.asDestroyStripes=["",""],i(d[0]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[0]+=g.oClasses.sStripeOdd+" "),i(d[0]).hasClass(g.oClasses.sStripeEven)&&
(g.asDestroyStripes[0]+=g.oClasses.sStripeEven),i(d[1]).hasClass(g.oClasses.sStripeOdd)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeOdd+" "),i(d[1]).hasClass(g.oClasses.sStripeEven)&&(g.asDestroyStripes[1]+=g.oClasses.sStripeEven),d.removeClass(g.asStripeClasses.join(" ")));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(W(g.aoHeader,a[0]),c=P(g));if(null===e.aoColumns){d=[];a=0;for(b=c.length;a<b;a++)d.push(null)}else d=e.aoColumns;a=0;for(b=d.length;a<b;a++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==
b&&(null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible),o(g,c?c[a]:null);ua(g,e.aoColumnDefs,d,function(a,b){r(g,a,b)});a=0;for(b=g.aaSorting.length;a<b;a++){g.aaSorting[a][0]>=g.aoColumns.length&&(g.aaSorting[a][0]=0);var k=g.aoColumns[g.aaSorting[a][0]];g.aaSorting[a][2]===n&&(g.aaSorting[a][2]=0);e.aaSorting===n&&g.saved_aaSorting===n&&(g.aaSorting[a][1]=k.asSorting[0]);c=0;for(d=k.asSorting.length;c<d;c++)if(g.aaSorting[a][1]==k.asSorting[c]){g.aaSorting[a][2]=c;break}}R(g);Wa(g);
a=i(this).children("caption").each(function(){this._captionSide=i(this).css("caption-side")});b=i(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));g.nTHead=b[0];b=i(this).children("tbody");0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));g.nTBody=b[0];g.nTBody.setAttribute("role","alert");g.nTBody.setAttribute("aria-live","polite");g.nTBody.setAttribute("aria-relevant","all");b=i(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==
g.oScroll.sX||""!==g.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);0<b.length&&(g.nTFoot=b[0],W(g.aoFooter,g.nTFoot));if(f)for(a=0;a<e.aaData.length;a++)J(g,e.aaData[a]);else va(g);g.aiDisplay=g.aiDisplayMaster.slice();g.bInitialised=!0;!1===h&&ba(g)}})};j.fnVersionCheck=function(e){for(var i=function(e,i){for(;e.length<i;)e+="0";return e},r=j.ext.sVersion.split("."),e=e.split("."),k="",l="",n=0,w=e.length;n<w;n++)k+=i(r[n],3),l+=i(e[n],3);return parseInt(k,10)>=parseInt(l,10)};
j.fnIsDataTable=function(e){for(var i=j.settings,r=0;r<i.length;r++)if(i[r].nTable===e||i[r].nScrollHead===e||i[r].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&i(k.nTable).is(":visible"))&&o.push(k.nTable)});return o};j.version="1.9.3";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},
oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,
sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,
bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var i=e+"",e=i.split(""),j="",i=i.length,k=0;k<i;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+j),j=e[i-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,n,k){k.jqXHR=i.ajax({url:e,data:j,success:function(e){e.sError&&k.oApi._fnLog(k,0,
e.sError);i(k.oInstance).trigger("xhr",[k,e]);n(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,i){"parsererror"==i&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof i.parseJSON?i.parseJSON(e):eval("("+e+")")}catch(n){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,
fnStateSave:function(e,i){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(i),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",
sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:i.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",
sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mDataProp:null,sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,
bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],
aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,
aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?
!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0};j.ext=i.extend(!0,{},j.models.ext);i.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",
sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",
sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",
sFooterTH:""});i.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",
sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",
sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default"});i.extend(j.ext.oPagination,
{two_button:{fnInit:function(e,j,l){var k=e.oLanguage.oPaginate,s=function(i){e.oApi._fnPageChange(e,i.data.action)&&l(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+
'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';i(j).append(k);var t=i("a",j),k=t[0],t=t[1];e.oApi._fnBindAction(k,{action:"previous"},s);e.oApi._fnBindAction(t,{action:"next"},s);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",t.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),t.setAttribute("aria-controls",e.sTableId)},fnUpdate:function(e){if(e.aanFeatures.p)for(var i=e.oClasses,j=e.aanFeatures.p,l=0,
k=j.length;l<k;l++)if(0!==j[l].childNodes.length)j[l].childNodes[0].className=0===e._iDisplayStart?i.sPagePrevDisabled:i.sPagePrevEnabled,j[l].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?i.sPageNextDisabled:i.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,l){var k=e.oLanguage.oPaginate,s=e.oClasses,t=function(i){e.oApi._fnPageChange(e,i.data.action)&&l(e)};i(j).append('<a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPageFirst+'">'+k.sFirst+
'</a><a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+s.sPageButton+" "+s.sPageLast+'">'+k.sLast+"</a>");var v=i("a",j),k=v[0],s=v[1],B=v[2],v=v[3];e.oApi._fnBindAction(k,{action:"first"},t);e.oApi._fnBindAction(s,{action:"previous"},t);e.oApi._fnBindAction(B,{action:"next"},t);e.oApi._fnBindAction(v,{action:"last"},
t);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",s.id=e.sTableId+"_previous",B.id=e.sTableId+"_next",v.id=e.sTableId+"_last"},fnUpdate:function(e,l){if(e.aanFeatures.p){var k=j.ext.oPagination.iFullNumbersShowPages,r=Math.floor(k/2),s=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),t=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,v="",B,D=e.oClasses,x,I=e.aanFeatures.p,G=function(i){e.oApi._fnBindAction(this,{page:i+B-1},function(i){e.oApi._fnPageChange(e,i.data.page);
l(e);i.preventDefault()})};s<k?(B=1,r=s):t<=r?(B=1,r=k):t>=s-r?(B=s-k+1,r=s):(B=t-Math.ceil(k/2)+1,r=B+k-1);for(k=B;k<=r;k++)v+=t!==k?'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButton+'">'+e.fnFormatNumber(k)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButtonActive+'">'+e.fnFormatNumber(k)+"</a>";for(k=0,r=I.length;k<r;k++)0!==I[k].childNodes.length&&(i("span:eq(0)",I[k]).html(v).children("a").each(G),x=I[k].getElementsByTagName("a"),x=[x[0],x[1],x[x.length-2],x[x.length-1]],i(x).removeClass(D.sPageButton+
" "+D.sPageButtonActive+" "+D.sPageButtonStaticDisabled),i([x[0],x[1]]).addClass(1==t?D.sPageButtonStaticDisabled:D.sPageButton),i([x[2],x[3]]).addClass(0===s||t===s||-1===e._iDisplayLength?D.sPageButtonStaticDisabled:D.sPageButton))}}}});i.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e="");return e.toLowerCase()},"string-asc":function(e,i){return e<i?-1:e>i?1:0},"string-desc":function(e,i){return e<i?1:e>i?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},
"html-asc":function(e,i){return e<i?-1:e>i?1:0},"html-desc":function(e,i){return e<i?1:e>i?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,i){return e-i},"date-desc":function(e,i){return i-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,i){return e-i},"numeric-desc":function(e,i){return i-e}});i.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==
typeof e)return null;var i,j=!1;i=e.charAt(0);if(-1=="0123456789-".indexOf(i))return null;for(var k=1;k<e.length;k++){i=e.charAt(k);if(-1=="0123456789.".indexOf(i))return null;if("."==i){if(j)return null;j=!0}}return"numeric"},function(e){var i=Date.parse(e);return null!==i&&!isNaN(i)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);i.fn.DataTable=j;i.fn.dataTable=j;i.fn.dataTableSettings=j.settings;i.fn.dataTableExt=
j.ext})(jQuery,window,document,void 0);
sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,
bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],
aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,
aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,
10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=i.extend(!0,{},j.models.ext);i.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",
sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",
sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",
sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"",sJUIHeader:"",sJUIFooter:""});i.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",
sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",
sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",
sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});i.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,n){var k=e.oLanguage.oPaginate,l=function(i){e.oApi._fnPageChange(e,i.data.action)&&n(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+
'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';i(j).append(k);var t=i("a",j),k=t[0],t=t[1];e.oApi._fnBindAction(k,{action:"previous"},
l);e.oApi._fnBindAction(t,{action:"next"},l);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",t.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),t.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var i=e.oClasses,j=e.aanFeatures.p,k=0,n=j.length;k<n;k++)0!==j[k].childNodes.length&&(j[k].childNodes[0].className=0===e._iDisplayStart?i.sPagePrevDisabled:i.sPagePrevEnabled,j[k].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?
i.sPageNextDisabled:i.sPageNextEnabled)}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,n){var k=e.oLanguage.oPaginate,l=e.oClasses,t=function(i){e.oApi._fnPageChange(e,i.data.action)&&n(e)};i(j).append('<a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+
e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var w=i("a",j),k=w[0],l=w[1],v=w[2],w=w[3];e.oApi._fnBindAction(k,{action:"first"},t);e.oApi._fnBindAction(l,{action:"previous"},t);e.oApi._fnBindAction(v,{action:"next"},t);e.oApi._fnBindAction(w,{action:"last"},t);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",v.id=e.sTableId+"_next",w.id=e.sTableId+"_last")},fnUpdate:function(e,o){if(e.aanFeatures.p){var l=j.ext.oPagination.iFullNumbersShowPages,
k=Math.floor(l/2),n=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),t=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,w="",v,D=e.oClasses,y,H=e.aanFeatures.p,O=function(i){e.oApi._fnBindAction(this,{page:i+v-1},function(i){e.oApi._fnPageChange(e,i.data.page);o(e);i.preventDefault()})};-1===e._iDisplayLength?t=k=v=1:n<l?(v=1,k=n):t<=k?(v=1,k=l):t>=n-k?(v=n-l+1,k=n):(v=t-Math.ceil(l/2)+1,k=v+l-1);for(l=v;l<=k;l++)w+=t!==l?'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButton+'">'+e.fnFormatNumber(l)+
"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButtonActive+'">'+e.fnFormatNumber(l)+"</a>";l=0;for(k=H.length;l<k;l++)0!==H[l].childNodes.length&&(i("span:eq(0)",H[l]).html(w).children("a").each(O),y=H[l].getElementsByTagName("a"),y=[y[0],y[1],y[y.length-2],y[y.length-1]],i(y).removeClass(D.sPageButton+" "+D.sPageButtonActive+" "+D.sPageButtonStaticDisabled),i([y[0],y[1]]).addClass(1==t?D.sPageButtonStaticDisabled:D.sPageButton),i([y[2],y[3]]).addClass(0===n||t===n||-1===e._iDisplayLength?
D.sPageButtonStaticDisabled:D.sPageButton))}}}});i.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,i){return e<i?-1:e>i?1:0},"string-desc":function(e,i){return e<i?1:e>i?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,i){return e<i?-1:e>i?1:0},"html-desc":function(e,i){return e<i?1:e>i?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===
e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,i){return e-i},"date-desc":function(e,i){return i-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,i){return e-i},"numeric-desc":function(e,i){return i-e}});i.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var i,j=!1;i=e.charAt(0);if(-1=="0123456789-".indexOf(i))return null;for(var k=1;k<e.length;k++){i=e.charAt(k);if(-1=="0123456789.".indexOf(i))return null;
if("."==i){if(j)return null;j=!0}}return"numeric"},function(e){var i=Date.parse(e);return null!==i&&!isNaN(i)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);i.fn.DataTable=j;i.fn.dataTable=j;i.fn.dataTableSettings=j.settings;i.fn.dataTableExt=j.ext})(jQuery,window,document,void 0);

View File

@ -0,0 +1,16 @@
(function ($) {
$.fn.enableCheckboxRangeSelection = function () {
var lastCheckbox = null;
var $spec = this;
$spec.unbind("click.checkboxrange");
$spec.bind("click.checkboxrange", function (e) {
if (lastCheckbox != null && (e.shiftKey || e.metaKey)) {
$spec.slice(
Math.min($spec.index(lastCheckbox), $spec.index(e.target)),
Math.max($spec.index(lastCheckbox), $spec.index(e.target)) + 1
).prop('checked', e.target.checked);
}
lastCheckbox = e.target;
});
};
})(jQuery);

View File

@ -5,53 +5,7 @@
@section HeaderContent
{
@Html.IncludeCss("Settings.css")
<style>
.checkboxColumn {
width: 95px;
text-align: center;
}
.masterControls {
margin-top: 10px;
overflow: hidden;
}
.buttons {
width: 600px;
text-align: center;
}
table input[type="text"], table select {
margin: 2px 2px;
}
td .path {
width: 300px;
}
td .backlogSetting {
width: 90px;
}
td .quality {
width: 120px;
}
#stylized, .settingsForm {
overflow: hidden;
}
#stylized {
float: left;
}
#changesOverview {
margin-top: 15px;
float: left;
font-size: 20px;
}
</style>
@Html.IncludeCss("SeriesEditor.css")
}
@section ActionMenu
@ -64,15 +18,17 @@
@using (Html.BeginForm("SaveEditor", "Series", FormMethod.Post, new { id = "SeriesEditor", name = "SeriesEditor" }))
{
<table id ="seriesEditorGrid" class="dataTable dataTablesGrid no-details">
<table id="seriesEditorGrid" class="dataTable dataTablesGrid no-details">
<thead>
<th width="14px">@Html.CheckBox("editToggleMaster", false, new { @class = "editToggleMaster" })</th>
<th>Title</th>
<th width="125px;">Quality</th>
<th class="checkboxColumn">Monitored</th>
<th class="checkboxColumn">Season Folder</th>
<th width="100px">Backlog Status</th>
<th width="310px">Path</th>
<tr>
<th width="14px">@Html.CheckBox("editToggleMaster", false, new { @class = "editToggleMaster" })</th>
<th>Title</th>
<th width="125px;">Quality</th>
<th class="checkboxColumn">Monitored</th>
<th class="checkboxColumn">Season Folder</th>
<th width="100px">Backlog Status</th>
<th width="310px">Path</th>
</tr>
</thead>
<tbody>
@ -81,38 +37,31 @@
Html.RenderPartial("EditorItem", series);
}
</tbody>
<tfoot>
<tr>
<th></th>
<th class="editing-count"></th>
<th>
@Html.DropDownList("masterQualitySelector", (SelectList)ViewData["MasterProfileSelectList"], new { @class = "footer-control-quality masterSelector master-quality", disabled = true })
</th>
<th>
@Html.DropDownList("masterMonitored", (SelectList)ViewData["BoolSelectList"], new { @class = "footer-control masterSelector master-monitored", disabled = true })
</th>
<th>
@Html.DropDownList("masterSeasonFolder", (SelectList)ViewData["BoolSelectList"], new { @class = "footer-control masterSelector master-season-folder", disabled = true })
</th>
<th>
@Html.DropDownList("masterBacklogSetting", (SelectList)ViewData["MasterBacklogSettingSelectList"], new { @class = "footer-control masterSelector master-backlog-setting", disabled = true })
</th>
<th>
<button id="series-editor-save" type="submit" class="save_button" disabled="disabled" title="Commit the settings from your series above to the database">
Save Changes
</button>
</th>
</tr>
</tfoot>
</table>
<div class="masterControls">
<div id="stylized" style="border-color: transparent;">
<div class="settingsForm">
<label class="labelClass">Quality Profile
<span class="small">Which Quality Profile should NzbDrone use to download episodes?</span>
</label>
@Html.DropDownList("masterQualitySelector", (SelectList)ViewData["MasterProfileSelectList"], new { @class = "inputClass masterSelector", disabled = true })
<label class="labelClass">Monitored
<span class="small">Should NzbDrone download episodes for this series?</span>
</label>
@Html.DropDownList("masterMonitored", (SelectList)ViewData["BoolSelectList"], new { @class = "inputClass masterSelector", disabled = true })
<label class="labelClass">Use Season Folder
<span class="small">Should downloaded episodes be stored in season folders?</span>
</label>
@Html.DropDownList("masterSeasonFolder", (SelectList)ViewData["BoolSelectList"], new { @class = "inputClass masterSelector", disabled = true })
<label class="labelClass">Backlog Status
<span class="small">Should NzbDrone perform backlog searches for this series?</span>
</label>
@Html.DropDownList("masterBacklogSetting", (SelectList)ViewData["MasterBacklogSettingSelectList"], new { @class = "inputClass masterSelector", disabled = true })
</div>
</div>
<div id="changesOverview" style="border-color: transparent;">
<div id="editingCount"></div>
</div>
</div>
<div class="buttons">
<button type="submit" class="save_button" disabled="disabled" title="Commit the settings from your series above to the database">
Save Changes</button>
</div>
}
@section Scripts
@ -130,6 +79,15 @@
"bInfo": false,
"bAutoWidth": false
});
new FixedHeader(oTable, { "top": true, "left": false, "right": false, "bottom": true });
$('.editToggle').enableCheckboxRangeSelection();
//$('.master-quality option[value=-10]').text('Quality...');
//$('.master-monitored option[value=-10]').text('Monitored...');
//$('.master-season-folder option[value=-10]').text('Season Folder...');
//$('.master-backlog-setting option[value=-10]').text('Backlog Setting...');
});
$(document).on('change', '.editToggleMaster', function () {
@ -147,55 +105,83 @@
$(this).attr("disabled", false);
});
$('#editingCount').text(selectedCount.length + ' series have been selected for editing');
$('.editing-count').text(selectedCount.length + ' series have been selected for editing');
if (selectedCount.length === 1) {
$('#editingCount').text(selectedCount.length + ' series has been selected for editing');
$('.editing-count').text(selectedCount.length + ' series has been selected for editing');
}
}
else {
$('.masterSelector').each(function () {
$(this).attr("disabled", true);
$('#editingCount').text('');
$('.editing-count').text('');
});
}
});
$(document).on('change', '.masterSelector', function () {
//Find selected values
var profileId = $('#masterQualitySelector').val();
var monitored = $('#masterMonitored').val();
var seasonFolder = $('#masterSeasonFolder').val();
var backlogStatus = $('#masterBacklogSetting').val();
$(document).on('change', '#masterQualitySelector', function () {
var profileId = $(this).val();
if (profileId === -10)
return;
var selected = $('.editToggle:checked');
selected.each(function() {
if (profileId != -10) {
$(this).parent('td').parent('.seriesEditRow').find('.quality').val(profileId);
}
if (monitored != -10) {
var monitoredBool = true;
if (monitored != 1)
monitoredBool = false;
$(this).parent('td').parent('.seriesEditRow').find('.monitored').prop('checked', monitoredBool);
}
if (seasonFolder != -10) {
var seasonFolderBool = true;
if (seasonFolder != 1)
seasonFolderBool = false;
$(this).parent('td').parent('.seriesEditRow').find('.seasonFolder').prop('checked', seasonFolderBool);
}
if (backlogStatus != -10) {
$(this).parent('td').parent('.seriesEditRow').find('.backlogSetting').val(backlogStatus);
}
selected.each(function () {
$(this).parent('td').parent('.seriesEditRow').find('.quality').val(profileId);
});
});
$(document).on('change', '#masterMonitored', function () {
var monitored = $(this).val();
if (monitored === -10)
return;
var monitoredBool = true;
if (monitored != 1)
monitoredBool = false;
var selected = $('.editToggle:checked');
selected.each(function () {
$(this).parent('td').parent('.seriesEditRow').find('.monitored').prop('checked', monitoredBool);
});
});
$(document).on('change', '#masterSeasonFolder', function () {
var seasonFolder = $(this).val();
if (seasonFolder === -10)
return;
var seasonFolderBool = true;
if (seasonFolder != 1)
seasonFolderBool = false;
var selected = $('.editToggle:checked');
selected.each(function () {
$(this).parent('td').parent('.seriesEditRow').find('.seasonFolder').prop('checked', seasonFolderBool);
});
});
$(document).on('change', '#masterBacklogSetting', function () {
var backlogStatus = $(this).val();
if (backlogStatus === -10)
return;
var selected = $('.editToggle:checked');
selected.each(function () {
$(this).parent('td').parent('.seriesEditRow').find('.backlogSetting').val(backlogStatus);
});
});
$(document).on('click', '#series-editor-save', function () {
$('#SeriesEditor').submit();
});
</script>
}

View File

@ -46,7 +46,9 @@
@Html.IncludeScript("DataTables-1.9.0/media/js/jquery.dataTables.editable.js")
@Html.IncludeScript("DataTables-1.9.0/media/js/jquery.jeditable.js")
@Html.IncludeScript("DataTables-1.9.0/media/js/jquery.dataTablesFilteringDelay.js")
@Html.IncludeScript("DataTables-1.9.0/media/js/FixedHeader.min.js")
@Html.IncludeScript("jquery.dataTables.4button.pagination.js")
@Html.IncludeScript("NzbDrone/common.js")
@RenderSection("Scripts", required: false)
</body>
</html>

View File

@ -10,6 +10,7 @@
<appSettings>
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />
</appSettings>
<system.web>
<trust level="Full" originUrl=".*" />