0% found this document useful (0 votes)
6K views309 pages

Jquery

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6K views309 pages

Jquery

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 309

/* Minification failed. Returning unminified contents.

(10556,21): run-time error JS1004: Expected ';'


(10556,31-33): run-time error JS1195: Expected expression: ||
(10556,57): run-time error JS1004: Expected ';'
*/
/*!
* jQuery JavaScript Library v3.0.0
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2016-06-09T18:02Z
*/
( function( global, factory ) {

"use strict";

if ( typeof module === "object" && typeof module.exports === "object" ) {

// For CommonJS and CommonJS-like environments where a proper `window`


// is present, execute the factory and get jQuery.
// For environments that do not have a `window` with a `document`
// (such as Node.js), expose a factory as module.exports.
// This accentuates the need for the creation of a real `window`.
// e.g. var jQuery = require("jquery")(window);
// See ticket #14549 for more info.
module.exports = global.document ?
factory( global, true ) :
function( w ) {
if ( !w.document ) {
throw new Error( "jQuery requires a window with a
document" );
}
return factory( w );
};
} else {
factory( global );
}

// Pass this if window is not defined yet


}( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode
should be common
// enough that all such attempts are guarded in a try block.
"use strict";

var arr = [];

var document = window.document;

var getProto = Object.getPrototypeOf;


var slice = arr.slice;

var concat = arr.concat;

var push = arr.push;

var indexOf = arr.indexOf;

var class2type = {};

var toString = class2type.toString;

var hasOwn = class2type.hasOwnProperty;

var fnToString = hasOwn.toString;

var ObjectFunctionString = fnToString.call( Object );

var support = {};

function DOMEval( code, doc ) {


doc = doc || document;

var script = doc.createElement( "script" );

script.text = code;
doc.head.appendChild( script ).parentNode.removeChild( script );
}

var
version = "3.0.0",

// Define a local copy of jQuery


jQuery = function( selector, context ) {

// The jQuery object is actually just the init constructor 'enhanced'


// Need init if jQuery is called (just allow error to be thrown if not
included)
return new jQuery.fn.init( selector, context );
},

// Support: Android <=4.0 only


// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

// Matches dashed string for camelizing


rmsPrefix = /^-ms-/,
rdashAlpha = /-([a-z])/g,

// Used by jQuery.camelCase as callback to replace()


fcamelCase = function( all, letter ) {
return letter.toUpperCase();
};

jQuery.fn = jQuery.prototype = {
// The current version of jQuery being used
jquery: version,

constructor: jQuery,

// The default length of a jQuery object is 0


length: 0,

toArray: function() {
return slice.call( this );
},

// Get the Nth element in the matched element set OR


// Get the whole matched element set as a clean array
get: function( num ) {
return num != null ?

// Return just the one element from the set


( num < 0 ? this[ num + this.length ] : this[ num ] ) :

// Return all the elements in a clean array


slice.call( this );
},

// Take an array of elements and push it onto the stack


// (returning the new matched element set)
pushStack: function( elems ) {

// Build a new jQuery matched element set


var ret = jQuery.merge( this.constructor(), elems );

// Add the old object onto the stack (as a reference)


ret.prevObject = this;

// Return the newly-formed element set


return ret;
},

// Execute a callback for every element in the matched set.


each: function( callback ) {
return jQuery.each( this, callback );
},

map: function( callback ) {


return this.pushStack( jQuery.map( this, function( elem, i ) {
return callback.call( elem, i, elem );
} ) );
},

slice: function() {
return this.pushStack( slice.apply( this, arguments ) );
},

first: function() {
return this.eq( 0 );
},

last: function() {
return this.eq( -1 );
},

eq: function( i ) {
var len = this.length,
j = +i + ( i < 0 ? len : 0 );
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
},

end: function() {
return this.prevObject || this.constructor();
},

// For internal use only.


// Behaves like an Array's method, not like a jQuery method.
push: push,
sort: arr.sort,
splice: arr.splice
};

jQuery.extend = jQuery.fn.extend = function() {


var options, name, src, copy, copyIsArray, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
deep = false;

// Handle a deep copy situation


if ( typeof target === "boolean" ) {
deep = target;

// Skip the boolean and the target


target = arguments[ i ] || {};
i++;
}

// Handle case when target is a string or something (possible in deep copy)


if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
target = {};
}

// Extend jQuery itself if only one argument is passed


if ( i === length ) {
target = this;
i--;
}

for ( ; i < length; i++ ) {

// Only deal with non-null/undefined values


if ( ( options = arguments[ i ] ) != null ) {

// Extend the base object


for ( name in options ) {
src = target[ name ];
copy = options[ name ];

// Prevent never-ending loop


if ( target === copy ) {
continue;
}

// Recurse if we're merging plain objects or arrays


if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {

if ( copyIsArray ) {
copyIsArray = false;
clone = src && jQuery.isArray( src ) ? src :
[];

} else {
clone = src && jQuery.isPlainObject( src ) ?
src : {};
}

// Never move original objects, clone them


target[ name ] = jQuery.extend( deep, clone, copy );

// Don't bring in undefined values


} else if ( copy !== undefined ) {
target[ name ] = copy;
}
}
}
}

// Return the modified object


return target;
};

jQuery.extend( {

// Unique for each copy of jQuery on the page


expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),

// Assume jQuery is ready without the ready module


isReady: true,

error: function( msg ) {


throw new Error( msg );
},

noop: function() {},

isFunction: function( obj ) {


return jQuery.type( obj ) === "function";
},

isArray: Array.isArray,

isWindow: function( obj ) {


return obj != null && obj === obj.window;
},

isNumeric: function( obj ) {

// As of jQuery 3.0, isNumeric is limited to


// strings and numbers (primitives or objects)
// that can be coerced to finite numbers (gh-2662)
var type = jQuery.type( obj );
return ( type === "number" || type === "string" ) &&

// parseFloat NaNs numeric-cast false positives ("")


// ...but misinterprets leading-number strings, particularly hex
literals ("0x...")
// subtraction forces infinities to NaN
!isNaN( obj - parseFloat( obj ) );
},

isPlainObject: function( obj ) {


var proto, Ctor;

// Detect obvious negatives


// Use toString instead of jQuery.type to catch host objects
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
return false;
}

proto = getProto( obj );

// Objects with no prototype (e.g., `Object.create( null )`) are plain


if ( !proto ) {
return true;
}

// Objects with prototype are plain iff they were constructed by a


global Object function
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
return typeof Ctor === "function" && fnToString.call( Ctor ) ===
ObjectFunctionString;
},

isEmptyObject: function( obj ) {


var name;
for ( name in obj ) {
return false;
}
return true;
},

type: function( obj ) {


if ( obj == null ) {
return obj + "";
}

// Support: Android <=2.3 only (functionish RegExp)


return typeof obj === "object" || typeof obj === "function" ?
class2type[ toString.call( obj ) ] || "object" :
typeof obj;
},

// Evaluates a script in a global context


globalEval: function( code ) {
DOMEval( code );
},
// Convert dashed to camelCase; used by the css and data modules
// Support: IE <=9 - 11, Edge 12 - 13
// Microsoft forgot to hump their vendor prefix (#9572)
camelCase: function( string ) {
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha,
fcamelCase );
},

nodeName: function( elem, name ) {


return elem.nodeName && elem.nodeName.toLowerCase() ===
name.toLowerCase();
},

each: function( obj, callback ) {


var length, i = 0;

if ( isArrayLike( obj ) ) {
length = obj.length;
for ( ; i < length; i++ ) {
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
break;
}
}
} else {
for ( i in obj ) {
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
break;
}
}
}

return obj;
},

// Support: Android <=4.0 only


trim: function( text ) {
return text == null ?
"" :
( text + "" ).replace( rtrim, "" );
},

// results is for internal usage only


makeArray: function( arr, results ) {
var ret = results || [];

if ( arr != null ) {
if ( isArrayLike( Object( arr ) ) ) {
jQuery.merge( ret,
typeof arr === "string" ?
[ arr ] : arr
);
} else {
push.call( ret, arr );
}
}

return ret;
},
inArray: function( elem, arr, i ) {
return arr == null ? -1 : indexOf.call( arr, elem, i );
},

// Support: Android <=4.0 only, PhantomJS 1 only


// push.apply(_, arraylike) throws on ancient WebKit
merge: function( first, second ) {
var len = +second.length,
j = 0,
i = first.length;

for ( ; j < len; j++ ) {


first[ i++ ] = second[ j ];
}

first.length = i;

return first;
},

grep: function( elems, callback, invert ) {


var callbackInverse,
matches = [],
i = 0,
length = elems.length,
callbackExpect = !invert;

// Go through the array, only saving the items


// that pass the validator function
for ( ; i < length; i++ ) {
callbackInverse = !callback( elems[ i ], i );
if ( callbackInverse !== callbackExpect ) {
matches.push( elems[ i ] );
}
}

return matches;
},

// arg is for internal usage only


map: function( elems, callback, arg ) {
var length, value,
i = 0,
ret = [];

// Go through the array, translating each of the items to their new


values
if ( isArrayLike( elems ) ) {
length = elems.length;
for ( ; i < length; i++ ) {
value = callback( elems[ i ], i, arg );

if ( value != null ) {
ret.push( value );
}
}

// Go through every key on the object,


} else {
for ( i in elems ) {
value = callback( elems[ i ], i, arg );

if ( value != null ) {
ret.push( value );
}
}
}

// Flatten any nested arrays


return concat.apply( [], ret );
},

// A global GUID counter for objects


guid: 1,

// Bind a function to a context, optionally partially applying any


// arguments.
proxy: function( fn, context ) {
var tmp, args, proxy;

if ( typeof context === "string" ) {


tmp = fn[ context ];
context = fn;
fn = tmp;
}

// Quick check to determine if target is callable, in the spec


// this throws a TypeError, but we will just return undefined.
if ( !jQuery.isFunction( fn ) ) {
return undefined;
}

// Simulated bind
args = slice.call( arguments, 2 );
proxy = function() {
return fn.apply( context || this,
args.concat( slice.call( arguments ) ) );
};

// Set the guid of unique handler to the same of original handler, so


it can be removed
proxy.guid = fn.guid = fn.guid || jQuery.guid++;

return proxy;
},

now: Date.now,

// jQuery.support is not used in Core but other projects attach their


// properties to it so it needs to exist.
support: support
} );

// JSHint would error on this code due to the Symbol not being defined in ES5.
// Defining this global in .jshintrc would create a danger of using the global
// unguarded in another place, it seems safer to just disable JSHint for these
// three lines.
/* jshint ignore: start */
if ( typeof Symbol === "function" ) {
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}
/* jshint ignore: end */

// Populate the class2type map


jQuery.each( "Boolean Number String Function Array Date RegExp Object Error
Symbol".split( " " ),
function( i, name ) {
class2type[ "[object " + name + "]" ] = name.toLowerCase();
} );

function isArrayLike( obj ) {

// Support: real iOS 8.2 only (not reproducible in simulator)


// `in` check used to prevent JIT error (gh-2145)
// hasOwn isn't used here due to false negatives
// regarding Nodelist length in IE
var length = !!obj && "length" in obj && obj.length,
type = jQuery.type( obj );

if ( type === "function" || jQuery.isWindow( obj ) ) {


return false;
}

return type === "array" || length === 0 ||


typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
* Sizzle CSS Selector Engine v2.3.0
* https://sizzlejs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2016-01-04
*/
(function( window ) {

var i,
support,
Expr,
getText,
isXML,
tokenize,
compile,
select,
outermostContext,
sortInput,
hasDuplicate,

// Local document vars


setDocument,
document,
docElem,
documentIsHTML,
rbuggyQSA,
rbuggyMatches,
matches,
contains,

// Instance-specific data
expando = "sizzle" + 1 * new Date(),
preferredDoc = window.document,
dirruns = 0,
done = 0,
classCache = createCache(),
tokenCache = createCache(),
compilerCache = createCache(),
sortOrder = function( a, b ) {
if ( a === b ) {
hasDuplicate = true;
}
return 0;
},

// Instance methods
hasOwn = ({}).hasOwnProperty,
arr = [],
pop = arr.pop,
push_native = arr.push,
push = arr.push,
slice = arr.slice,
// Use a stripped-down indexOf as it's faster than native
// https://jsperf.com/thor-indexof-vs-for/5
indexOf = function( list, elem ) {
var i = 0,
len = list.length;
for ( ; i < len; i++ ) {
if ( list[i] === elem ) {
return i;
}
}
return -1;
},

booleans = "checked|selected|async|autofocus|autoplay|controls|defer|
disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",

// Regular expressions

// http://www.w3.org/TR/css3-selectors/#whitespace
whitespace = "[\\x20\\t\\r\\n\\f]",

// http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",

// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors


attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
// Operator (capture 2)
"*([*^$|!~]?=)" + whitespace +
// "Attribute values must be CSS identifiers [capture 5] or strings
[capture 3 or capture 4]"
"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier
+ "))|)" + whitespace +
"*\\]",
pseudos = ":(" + identifier + ")(?:\\((" +
// To reduce the number of selectors needing tokenize in the preFilter,
prefer arguments:
// 1. quoted (capture 3; capture 4 or capture 5)
"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
// 2. simple (capture 6)
"((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
// 3. anything else (capture 2)
".*" +
")\\)|)",

// Leading and non-escaped trailing whitespace, capturing some non-whitespace


characters preceding the latter
rwhitespace = new RegExp( whitespace + "+", "g" ),
rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" +
whitespace + "+$", "g" ),

rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),


rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" +
whitespace + "*" ),

rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" +


whitespace + "*\\]", "g" ),

rpseudo = new RegExp( pseudos ),


ridentifier = new RegExp( "^" + identifier + "$" ),

matchExpr = {
"ID": new RegExp( "^#(" + identifier + ")" ),
"CLASS": new RegExp( "^\\.(" + identifier + ")" ),
"TAG": new RegExp( "^(" + identifier + "|[*])" ),
"ATTR": new RegExp( "^" + attributes ),
"PSEUDO": new RegExp( "^" + pseudos ),
"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)
(?:\\(" + whitespace +
"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
whitespace +
"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|
gt|lt|nth|first|last)(?:\\(" +
whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|
$)", "i" )
},

rinputs = /^(?:input|select|textarea|button)$/i,
rheader = /^h\d$/i,

rnative = /^[^{]+\{\s*\[native \w/,

// Easily-parseable/retrievable ID or TAG or CLASS selectors


rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,

rsibling = /[+~]/,

// CSS escapes
// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" +
whitespace + ")|.)", "ig" ),
funescape = function( _, escaped, escapedWhitespace ) {
var high = "0x" + escaped - 0x10000;
// NaN means non-codepoint
// Support: Firefox<24
// Workaround erroneous numeric interpretation of +"0x"
return high !== high || escapedWhitespace ?
escaped :
high < 0 ?
// BMP codepoint
String.fromCharCode( high + 0x10000 ) :
// Supplemental Plane codepoint (surrogate pair)
String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF |
0xDC00 );
},

// CSS string/identifier serialization


// https://drafts.csswg.org/cssom/#common-serializing-idioms
rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,
fcssescape = function( ch, asCodePoint ) {
if ( asCodePoint ) {

// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER


if ( ch === "\0" ) {
return "\uFFFD";
}

// Control characters and (dependent upon position) numbers get


escaped as code points
return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length -
1 ).toString( 16 ) + " ";
}

// Other potentially-special ASCII characters get backslash-escaped


return "\\" + ch;
},

// Used for iframes


// See setDocument()
// Removing the function wrapper causes a "Permission Denied"
// error in IE
unloadHandler = function() {
setDocument();
},

disabledAncestor = addCombinator(
function( elem ) {
return elem.disabled === true;
},
{ dir: "parentNode", next: "legend" }
);

// Optimize for push.apply( _, NodeList )


try {
push.apply(
(arr = slice.call( preferredDoc.childNodes )),
preferredDoc.childNodes
);
// Support: Android<4.0
// Detect silently failing push.apply
arr[ preferredDoc.childNodes.length ].nodeType;
} catch ( e ) {
push = { apply: arr.length ?

// Leverage slice if possible


function( target, els ) {
push_native.apply( target, slice.call(els) );
} :

// Support: IE<9
// Otherwise append directly
function( target, els ) {
var j = target.length,
i = 0;
// Can't trust NodeList.length
while ( (target[j++] = els[i++]) ) {}
target.length = j - 1;
}
};
}

function Sizzle( selector, context, results, seed ) {


var m, i, elem, nid, match, groups, newSelector,
newContext = context && context.ownerDocument,

// nodeType defaults to 9, since context defaults to document


nodeType = context ? context.nodeType : 9;

results = results || [];

// Return early from calls with invalid selector or context


if ( typeof selector !== "string" || !selector ||
nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {

return results;
}

// Try to shortcut find operations (as opposed to filters) in HTML documents


if ( !seed ) {

if ( ( context ? context.ownerDocument || context : preferredDoc ) !==


document ) {
setDocument( context );
}
context = context || document;

if ( documentIsHTML ) {

// If the selector is sufficiently simple, try using a "get*By*"


DOM method
// (excepting DocumentFragment context, where the methods don't
exist)
if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {

// ID selector
if ( (m = match[1]) ) {
// Document context
if ( nodeType === 9 ) {
if ( (elem = context.getElementById( m )) ) {

// Support: IE, Opera, Webkit


// TODO: identify versions
// getElementById can match elements by
name instead of ID
if ( elem.id === m ) {
results.push( elem );
return results;
}
} else {
return results;
}

// Element context
} else {

// Support: IE, Opera, Webkit


// TODO: identify versions
// getElementById can match elements by name
instead of ID
if ( newContext && (elem =
newContext.getElementById( m )) &&
contains( context, elem ) &&
elem.id === m ) {

results.push( elem );
return results;
}
}

// Type selector
} else if ( match[2] ) {
push.apply( results,
context.getElementsByTagName( selector ) );
return results;

// Class selector
} else if ( (m = match[3]) &&
support.getElementsByClassName &&
context.getElementsByClassName ) {

push.apply( results,
context.getElementsByClassName( m ) );
return results;
}
}

// Take advantage of querySelectorAll


if ( support.qsa &&
!compilerCache[ selector + " " ] &&
(!rbuggyQSA || !rbuggyQSA.test( selector )) ) {

if ( nodeType !== 1 ) {
newContext = context;
newSelector = selector;
// qSA looks outside Element context, which is not what we
want
// Thanks to Andrew Dupont for this workaround technique
// Support: IE <=8
// Exclude object elements
} else if ( context.nodeName.toLowerCase() !== "object" ) {

// Capture the context ID, setting it first if


necessary
if ( (nid = context.getAttribute( "id" )) ) {
nid = nid.replace( rcssescape, fcssescape );
} else {
context.setAttribute( "id", (nid = expando) );
}

// Prefix every selector in the list


groups = tokenize( selector );
i = groups.length;
while ( i-- ) {
groups[i] = "#" + nid + " " +
toSelector( groups[i] );
}
newSelector = groups.join( "," );

// Expand context for sibling selectors


newContext = rsibling.test( selector ) &&
testContext( context.parentNode ) ||
context;
}

if ( newSelector ) {
try {
push.apply( results,

newContext.querySelectorAll( newSelector )
);
return results;
} catch ( qsaError ) {
} finally {
if ( nid === expando ) {
context.removeAttribute( "id" );
}
}
}
}
}
}

// All others
return select( selector.replace( rtrim, "$1" ), context, results, seed );
}

/**
* Create key-value caches of limited size
* @returns {function(string, object)} Returns the Object data after storing it on
itself with
* property name the (space-suffixed) string and (if the cache is larger than
Expr.cacheLength)
* deleting the oldest entry
*/
function createCache() {
var keys = [];

function cache( key, value ) {


// Use (key + " ") to avoid collision with native prototype properties
(see Issue #157)
if ( keys.push( key + " " ) > Expr.cacheLength ) {
// Only keep the most recent entries
delete cache[ keys.shift() ];
}
return (cache[ key + " " ] = value);
}
return cache;
}

/**
* Mark a function for special use by Sizzle
* @param {Function} fn The function to mark
*/
function markFunction( fn ) {
fn[ expando ] = true;
return fn;
}

/**
* Support testing using an element
* @param {Function} fn Passed the created element and returns a boolean result
*/
function assert( fn ) {
var el = document.createElement("fieldset");

try {
return !!fn( el );
} catch (e) {
return false;
} finally {
// Remove from its parent by default
if ( el.parentNode ) {
el.parentNode.removeChild( el );
}
// release memory in IE
el = null;
}
}

/**
* Adds the same handler for all of the specified attrs
* @param {String} attrs Pipe-separated list of attributes
* @param {Function} handler The method that will be applied
*/
function addHandle( attrs, handler ) {
var arr = attrs.split("|"),
i = arr.length;

while ( i-- ) {
Expr.attrHandle[ arr[i] ] = handler;
}
}

/**
* Checks document order of two siblings
* @param {Element} a
* @param {Element} b
* @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a
follows b
*/
function siblingCheck( a, b ) {
var cur = b && a,
diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
a.sourceIndex - b.sourceIndex;

// Use IE sourceIndex if available on both nodes


if ( diff ) {
return diff;
}

// Check if b follows a
if ( cur ) {
while ( (cur = cur.nextSibling) ) {
if ( cur === b ) {
return -1;
}
}
}

return a ? 1 : -1;
}

/**
* Returns a function to use in pseudos for input types
* @param {String} type
*/
function createInputPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === type;
};
}

/**
* Returns a function to use in pseudos for buttons
* @param {String} type
*/
function createButtonPseudo( type ) {
return function( elem ) {
var name = elem.nodeName.toLowerCase();
return (name === "input" || name === "button") && elem.type === type;
};
}

/**
* Returns a function to use in pseudos for :enabled/:disabled
* @param {Boolean} disabled true for :disabled; false for :enabled
*/
function createDisabledPseudo( disabled ) {
// Known :disabled false positives:
// IE: *[disabled]:not(button, input, select, textarea, optgroup, option,
menuitem, fieldset)
// not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
return function( elem ) {

// Check form elements and option elements for explicit disabling


return "label" in elem && elem.disabled === disabled ||
"form" in elem && elem.disabled === disabled ||

// Check non-disabled form elements for fieldset[disabled]


ancestors
"form" in elem && elem.disabled === false && (
// Support: IE6-11+
// Ancestry is covered for us
elem.isDisabled === disabled ||

// Otherwise, assume any non-<option> under


fieldset[disabled] is disabled
/* jshint -W018 */
elem.isDisabled !== !disabled &&
("label" in elem || !disabledAncestor( elem )) !==
disabled
);
};
}

/**
* Returns a function to use in pseudos for positionals
* @param {Function} fn
*/
function createPositionalPseudo( fn ) {
return markFunction(function( argument ) {
argument = +argument;
return markFunction(function( seed, matches ) {
var j,
matchIndexes = fn( [], seed.length, argument ),
i = matchIndexes.length;

// Match elements found at the specified indexes


while ( i-- ) {
if ( seed[ (j = matchIndexes[i]) ] ) {
seed[j] = !(matches[j] = seed[j]);
}
}
});
});
}

/**
* Checks a node for validity as a Sizzle context
* @param {Element|Object=} context
* @returns {Element|Object|Boolean} The input node if acceptable, otherwise a
falsy value
*/
function testContext( context ) {
return context && typeof context.getElementsByTagName !== "undefined" &&
context;
}
// Expose support vars for convenience
support = Sizzle.support = {};

/**
* Detects XML nodes
* @param {Element|Object} elem An element or a document
* @returns {Boolean} True iff elem is a non-HTML XML node
*/
isXML = Sizzle.isXML = function( elem ) {
// documentElement is verified for cases where it doesn't yet exist
// (such as loading iframes in IE - #4833)
var documentElement = elem && (elem.ownerDocument || elem).documentElement;
return documentElement ? documentElement.nodeName !== "HTML" : false;
};

/**
* Sets document-related variables once based on the current document
* @param {Element|Object} [doc] An element or document object to use to set the
document
* @returns {Object} Returns the current document
*/
setDocument = Sizzle.setDocument = function( node ) {
var hasCompare, subWindow,
doc = node ? node.ownerDocument || node : preferredDoc;

// Return early if doc is invalid or already selected


if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
return document;
}

// Update global variables


document = doc;
docElem = document.documentElement;
documentIsHTML = !isXML( document );

// Support: IE 9-11, Edge


// Accessing iframe documents after unload throws "permission denied" errors
(jQuery #13936)
if ( preferredDoc !== document &&
(subWindow = document.defaultView) && subWindow.top !== subWindow ) {

// Support: IE 11, Edge


if ( subWindow.addEventListener ) {
subWindow.addEventListener( "unload", unloadHandler, false );

// Support: IE 9 - 10 only
} else if ( subWindow.attachEvent ) {
subWindow.attachEvent( "onunload", unloadHandler );
}
}

/* Attributes
---------------------------------------------------------------------- */

// Support: IE<8
// Verify that getAttribute really returns attributes and not properties
// (excepting IE8 booleans)
support.attributes = assert(function( el ) {
el.className = "i";
return !el.getAttribute("className");
});

/* getElement(s)By*
---------------------------------------------------------------------- */

// Check if getElementsByTagName("*") returns only elements


support.getElementsByTagName = assert(function( el ) {
el.appendChild( document.createComment("") );
return !el.getElementsByTagName("*").length;
});

// Support: IE<9
support.getElementsByClassName =
rnative.test( document.getElementsByClassName );

// Support: IE<10
// Check if getElementById returns elements by name
// The broken getElementById methods don't pick up programmatically-set
names,
// so use a roundabout getElementsByName test
support.getById = assert(function( el ) {
docElem.appendChild( el ).id = expando;
return !document.getElementsByName || !
document.getElementsByName( expando ).length;
});

// ID find and filter


if ( support.getById ) {
Expr.find["ID"] = function( id, context ) {
if ( typeof context.getElementById !== "undefined" &&
documentIsHTML ) {
var m = context.getElementById( id );
return m ? [ m ] : [];
}
};
Expr.filter["ID"] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
return elem.getAttribute("id") === attrId;
};
};
} else {
// Support: IE6/7
// getElementById is not reliable as a find shortcut
delete Expr.find["ID"];

Expr.filter["ID"] = function( id ) {
var attrId = id.replace( runescape, funescape );
return function( elem ) {
var node = typeof elem.getAttributeNode !== "undefined" &&
elem.getAttributeNode("id");
return node && node.value === attrId;
};
};
}

// Tag
Expr.find["TAG"] = support.getElementsByTagName ?
function( tag, context ) {
if ( typeof context.getElementsByTagName !== "undefined" ) {
return context.getElementsByTagName( tag );

// DocumentFragment nodes don't have gEBTN


} else if ( support.qsa ) {
return context.querySelectorAll( tag );
}
} :

function( tag, context ) {


var elem,
tmp = [],
i = 0,
// By happy coincidence, a (broken) gEBTN appears on
DocumentFragment nodes too
results = context.getElementsByTagName( tag );

// Filter out possible comments


if ( tag === "*" ) {
while ( (elem = results[i++]) ) {
if ( elem.nodeType === 1 ) {
tmp.push( elem );
}
}

return tmp;
}
return results;
};

// Class
Expr.find["CLASS"] = support.getElementsByClassName && function( className,
context ) {
if ( typeof context.getElementsByClassName !== "undefined" &&
documentIsHTML ) {
return context.getElementsByClassName( className );
}
};

/* QSA/matchesSelector
---------------------------------------------------------------------- */

// QSA and matchesSelector support

// matchesSelector(:active) reports false when true (IE9/Opera 11.5)


rbuggyMatches = [];

// qSa(:focus) reports false when true (Chrome 21)


// We allow this because of a bug in IE8/9 that throws an error
// whenever `document.activeElement` is accessed on an iframe
// So, we allow :focus to pass through QSA all the time to avoid the IE error
// See https://bugs.jquery.com/ticket/13378
rbuggyQSA = [];

if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {


// Build QSA regex
// Regex strategy adopted from Diego Perini
assert(function( el ) {
// Select is set to empty string on purpose
// This is to test IE's treatment of not explicitly
// setting a boolean content attribute,
// since its presence should be enough
// https://bugs.jquery.com/ticket/12359
docElem.appendChild( el ).innerHTML = "<a id='" + expando +
"'></a>" +
"<select id='" + expando + "-\r\\' msallowcapture=''>" +
"<option selected=''></option></select>";

// Support: IE8, Opera 11-12.16


// Nothing should be selected when empty strings follow ^= or $=
or *=
// The test attribute must be unknown in Opera but "safe" for
WinRT
// https://msdn.microsoft.com/en-
us/library/ie/hh465388.aspx#attribute_section
if ( el.querySelectorAll("[msallowcapture^='']").length ) {
rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
}

// Support: IE8
// Boolean attributes and "value" are not treated correctly
if ( !el.querySelectorAll("[selected]").length ) {
rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" +
booleans + ")" );
}

// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+,


PhantomJS<1.9.8+
if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
rbuggyQSA.push("~=");
}

// Webkit/Opera - :checked should return selected option elements


// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
// IE8 throws error here and will not see later tests
if ( !el.querySelectorAll(":checked").length ) {
rbuggyQSA.push(":checked");
}

// Support: Safari 8+, iOS 8+


// https://bugs.webkit.org/show_bug.cgi?id=136851
// In-page `selector#id sibling-combinator selector` fails
if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
rbuggyQSA.push(".#.+[+~]");
}
});

assert(function( el ) {
el.innerHTML = "<a href='' disabled='disabled'></a>" +
"<select disabled='disabled'><option/></select>";

// Support: Windows 8 Native Apps


// The type and name attributes are restricted during .innerHTML
assignment
var input = document.createElement("input");
input.setAttribute( "type", "hidden" );
el.appendChild( input ).setAttribute( "name", "D" );
// Support: IE8
// Enforce case-sensitivity of name attribute
if ( el.querySelectorAll("[name=d]").length ) {
rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
}

// FF 3.5 - :enabled/:disabled and hidden elements (hidden


elements are still enabled)
// IE8 throws error here and will not see later tests
if ( el.querySelectorAll(":enabled").length !== 2 ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}

// Support: IE9-11+
// IE's :disabled selector does not pick up the children of
disabled fieldsets
docElem.appendChild( el ).disabled = true;
if ( el.querySelectorAll(":disabled").length !== 2 ) {
rbuggyQSA.push( ":enabled", ":disabled" );
}

// Opera 10-11 does not throw on post-comma invalid pseudos


el.querySelectorAll("*,:x");
rbuggyQSA.push(",.*:");
});
}

if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||


docElem.webkitMatchesSelector ||
docElem.mozMatchesSelector ||
docElem.oMatchesSelector ||
docElem.msMatchesSelector) )) ) {

assert(function( el ) {
// Check to see if it's possible to do matchesSelector
// on a disconnected node (IE 9)
support.disconnectedMatch = matches.call( el, "*" );

// This should fail with an exception


// Gecko does not error, returns false instead
matches.call( el, "[s!='']:x" );
rbuggyMatches.push( "!=", pseudos );
});
}

rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );


rbuggyMatches = rbuggyMatches.length && new
RegExp( rbuggyMatches.join("|") );

/* Contains
---------------------------------------------------------------------- */
hasCompare = rnative.test( docElem.compareDocumentPosition );

// Element contains another


// Purposefully self-exclusive
// As in, an element does not contain itself
contains = hasCompare || rnative.test( docElem.contains ) ?
function( a, b ) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!( bup && bup.nodeType === 1 && (
adown.contains ?
adown.contains( bup ) :
a.compareDocumentPosition &&
a.compareDocumentPosition( bup ) & 16
));
} :
function( a, b ) {
if ( b ) {
while ( (b = b.parentNode) ) {
if ( b === a ) {
return true;
}
}
}
return false;
};

/* Sorting
---------------------------------------------------------------------- */

// Document order sorting


sortOrder = hasCompare ?
function( a, b ) {

// Flag for duplicate removal


if ( a === b ) {
hasDuplicate = true;
return 0;
}

// Sort on method existence if only one input has


compareDocumentPosition
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if ( compare ) {
return compare;
}

// Calculate position if both inputs belong to the same document


compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
a.compareDocumentPosition( b ) :

// Otherwise we know they are disconnected


1;

// Disconnected nodes
if ( compare & 1 ||
(!support.sortDetached && b.compareDocumentPosition( a ) ===
compare) ) {

// Choose the first element that is related to our preferred


document
if ( a === document || a.ownerDocument === preferredDoc &&
contains(preferredDoc, a) ) {
return -1;
}
if ( b === document || b.ownerDocument === preferredDoc &&
contains(preferredDoc, b) ) {
return 1;
}

// Maintain original order


return sortInput ?
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;
}

return compare & 4 ? -1 : 1;


} :
function( a, b ) {
// Exit early if the nodes are identical
if ( a === b ) {
hasDuplicate = true;
return 0;
}

var cur,
i = 0,
aup = a.parentNode,
bup = b.parentNode,
ap = [ a ],
bp = [ b ];

// Parentless nodes are either documents or disconnected


if ( !aup || !bup ) {
return a === document ? -1 :
b === document ? 1 :
aup ? -1 :
bup ? 1 :
sortInput ?
( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
0;

// If the nodes are siblings, we can do a quick check


} else if ( aup === bup ) {
return siblingCheck( a, b );
}

// Otherwise we need full lists of their ancestors for comparison


cur = a;
while ( (cur = cur.parentNode) ) {
ap.unshift( cur );
}
cur = b;
while ( (cur = cur.parentNode) ) {
bp.unshift( cur );
}

// Walk down the tree looking for a discrepancy


while ( ap[i] === bp[i] ) {
i++;
}

return i ?
// Do a sibling check if the nodes have a common ancestor
siblingCheck( ap[i], bp[i] ) :
// Otherwise nodes in our document sort first
ap[i] === preferredDoc ? -1 :
bp[i] === preferredDoc ? 1 :
0;
};

return document;
};

Sizzle.matches = function( expr, elements ) {


return Sizzle( expr, null, null, elements );
};

Sizzle.matchesSelector = function( elem, expr ) {


// Set document vars if needed
if ( ( elem.ownerDocument || elem ) !== document ) {
setDocument( elem );
}

// Make sure that attribute selectors are quoted


expr = expr.replace( rattributeQuotes, "='$1']" );

if ( support.matchesSelector && documentIsHTML &&


!compilerCache[ expr + " " ] &&
( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {

try {
var ret = matches.call( elem, expr );

// IE 9's matchesSelector returns false on disconnected nodes


if ( ret || support.disconnectedMatch ||
// As well, disconnected nodes are said to be in a
document
// fragment in IE 9
elem.document && elem.document.nodeType !== 11 ) {
return ret;
}
} catch (e) {}
}

return Sizzle( expr, document, null, [ elem ] ).length > 0;


};

Sizzle.contains = function( context, elem ) {


// Set document vars if needed
if ( ( context.ownerDocument || context ) !== document ) {
setDocument( context );
}
return contains( context, elem );
};

Sizzle.attr = function( elem, name ) {


// Set document vars if needed
if ( ( elem.ownerDocument || elem ) !== document ) {
setDocument( elem );
}
var fn = Expr.attrHandle[ name.toLowerCase() ],
// Don't get fooled by Object.prototype properties (jQuery #13807)
val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
fn( elem, name, !documentIsHTML ) :
undefined;

return val !== undefined ?


val :
support.attributes || !documentIsHTML ?
elem.getAttribute( name ) :
(val = elem.getAttributeNode(name)) && val.specified ?
val.value :
null;
};

Sizzle.escape = function( sel ) {


return (sel + "").replace( rcssescape, fcssescape );
};

Sizzle.error = function( msg ) {


throw new Error( "Syntax error, unrecognized expression: " + msg );
};

/**
* Document sorting and removing duplicates
* @param {ArrayLike} results
*/
Sizzle.uniqueSort = function( results ) {
var elem,
duplicates = [],
j = 0,
i = 0;

// Unless we *know* we can detect duplicates, assume their presence


hasDuplicate = !support.detectDuplicates;
sortInput = !support.sortStable && results.slice( 0 );
results.sort( sortOrder );

if ( hasDuplicate ) {
while ( (elem = results[i++]) ) {
if ( elem === results[ i ] ) {
j = duplicates.push( i );
}
}
while ( j-- ) {
results.splice( duplicates[ j ], 1 );
}
}

// Clear input after sorting to release objects


// See https://github.com/jquery/sizzle/pull/225
sortInput = null;

return results;
};

/**
* Utility function for retrieving the text value of an array of DOM nodes
* @param {Array|Element} elem
*/
getText = Sizzle.getText = function( elem ) {
var node,
ret = "",
i = 0,
nodeType = elem.nodeType;

if ( !nodeType ) {
// If no nodeType, this is expected to be an array
while ( (node = elem[i++]) ) {
// Do not traverse comment nodes
ret += getText( node );
}
} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
// Use textContent for elements
// innerText usage removed for consistency of new lines (jQuery #11153)
if ( typeof elem.textContent === "string" ) {
return elem.textContent;
} else {
// Traverse its children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
ret += getText( elem );
}
}
} else if ( nodeType === 3 || nodeType === 4 ) {
return elem.nodeValue;
}
// Do not include comment or processing instruction nodes

return ret;
};

Expr = Sizzle.selectors = {

// Can be adjusted by the user


cacheLength: 50,

createPseudo: markFunction,

match: matchExpr,

attrHandle: {},

find: {},

relative: {
">": { dir: "parentNode", first: true },
" ": { dir: "parentNode" },
"+": { dir: "previousSibling", first: true },
"~": { dir: "previousSibling" }
},

preFilter: {
"ATTR": function( match ) {
match[1] = match[1].replace( runescape, funescape );

// Move the given value to match[3] whether quoted or unquoted


match[3] = ( match[3] || match[4] || match[5] ||
"" ).replace( runescape, funescape );
if ( match[2] === "~=" ) {
match[3] = " " + match[3] + " ";
}

return match.slice( 0, 4 );
},

"CHILD": function( match ) {


/* matches from matchExpr["CHILD"]
1 type (only|nth|...)
2 what (child|of-type)
3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
4 xn-component of xn+y argument ([+-]?\d*n|)
5 sign of xn-component
6 x of xn-component
7 sign of y-component
8 y of y-component
*/
match[1] = match[1].toLowerCase();

if ( match[1].slice( 0, 3 ) === "nth" ) {


// nth-* requires argument
if ( !match[3] ) {
Sizzle.error( match[0] );
}

// numeric x and y parameters for Expr.filter.CHILD


// remember that false/true cast respectively to 0/1
match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * (
match[3] === "even" || match[3] === "odd" ) );
match[5] = +( ( match[7] + match[8] ) || match[3] === "odd"
);

// other types prohibit arguments


} else if ( match[3] ) {
Sizzle.error( match[0] );
}

return match;
},

"PSEUDO": function( match ) {


var excess,
unquoted = !match[6] && match[2];

if ( matchExpr["CHILD"].test( match[0] ) ) {
return null;
}

// Accept quoted arguments as-is


if ( match[3] ) {
match[2] = match[4] || match[5] || "";

// Strip excess characters from unquoted arguments


} else if ( unquoted && rpseudo.test( unquoted ) &&
// Get excess from tokenize (recursively)
(excess = tokenize( unquoted, true )) &&
// advance to the next closing parenthesis
(excess = unquoted.indexOf( ")", unquoted.length - excess )
- unquoted.length) ) {

// excess is a negative index


match[0] = match[0].slice( 0, excess );
match[2] = unquoted.slice( 0, excess );
}

// Return only captures needed by the pseudo filter method (type


and argument)
return match.slice( 0, 3 );
}
},

filter: {

"TAG": function( nodeNameSelector ) {


var nodeName = nodeNameSelector.replace( runescape,
funescape ).toLowerCase();
return nodeNameSelector === "*" ?
function() { return true; } :
function( elem ) {
return elem.nodeName && elem.nodeName.toLowerCase()
=== nodeName;
};
},

"CLASS": function( className ) {


var pattern = classCache[ className + " " ];

return pattern ||
(pattern = new RegExp( "(^|" + whitespace + ")" + className
+ "(" + whitespace + "|$)" )) &&
classCache( className, function( elem ) {
return pattern.test( typeof elem.className ===
"string" && elem.className || typeof elem.getAttribute !== "undefined" &&
elem.getAttribute("class") || "" );
});
},

"ATTR": function( name, operator, check ) {


return function( elem ) {
var result = Sizzle.attr( elem, name );

if ( result == null ) {
return operator === "!=";
}
if ( !operator ) {
return true;
}

result += "";

return operator === "=" ? result === check :


operator === "!=" ? result !== check :
operator === "^=" ? check && result.indexOf( check )
=== 0 :
operator === "*=" ? check && result.indexOf( check )
> -1 :
operator === "$=" ? check && result.slice(
-check.length ) === check :
operator === "~=" ? ( " " +
result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
operator === "|=" ? result === check || result.slice(
0, check.length + 1 ) === check + "-" :
false;
};
},

"CHILD": function( type, what, argument, first, last ) {


var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";

return first === 1 && last === 0 ?

// Shortcut for :nth-*(n)


function( elem ) {
return !!elem.parentNode;
} :

function( elem, context, xml ) {


var cache, uniqueCache, outerCache, node, nodeIndex,
start,
dir = simple !== forward ? "nextSibling" :
"previousSibling",
parent = elem.parentNode,
name = ofType && elem.nodeName.toLowerCase(),
useCache = !xml && !ofType,
diff = false;

if ( parent ) {

// :(first|last|only)-(child|of-type)
if ( simple ) {
while ( dir ) {
node = elem;
while ( (node = node[ dir ]) ) {
if ( ofType ?

node.nodeName.toLowerCase() === name :


node.nodeType === 1 ) {

return false;
}
}
// Reverse direction for :only-*
(if we haven't yet done so)
start = dir = type === "only" && !
start && "nextSibling";
}
return true;
}

start = [ forward ? parent.firstChild :


parent.lastChild ];

// non-xml :nth-child(...) stores cache data on


`parent`
if ( forward && useCache ) {

// Seek `elem` from a previously-cached


index

// ...in a gzip-friendly way


node = parent;
outerCache = node[ expando ] ||
(node[ expando ] = {});

// Support: IE <9 only


// Defend against cloned attroperties
(jQuery gh-1709)
uniqueCache = outerCache[ node.uniqueID ]
||
(outerCache[ node.uniqueID ] = {});

cache = uniqueCache[ type ] || [];


nodeIndex = cache[ 0 ] === dirruns &&
cache[ 1 ];
diff = nodeIndex && cache[ 2 ];
node = nodeIndex &&
parent.childNodes[ nodeIndex ];

while ( (node = ++nodeIndex && node &&


node[ dir ] ||

// Fallback to seeking `elem` from


the start
(diff = nodeIndex = 0) ||
start.pop()) ) {

// When found, cache indexes on


`parent` and break
if ( node.nodeType === 1 && ++diff
&& node === elem ) {
uniqueCache[ type ] =
[ dirruns, nodeIndex, diff ];
break;
}
}

} else {
// Use previously-cached element index if
available
if ( useCache ) {
// ...in a gzip-friendly way
node = elem;
outerCache = node[ expando ] ||
(node[ expando ] = {});

// Support: IE <9 only


// Defend against cloned
attroperties (jQuery gh-1709)
uniqueCache =
outerCache[ node.uniqueID ] ||
(outerCache[ node.uniqueID ]
= {});
cache = uniqueCache[ type ] || [];
nodeIndex = cache[ 0 ] === dirruns
&& cache[ 1 ];
diff = nodeIndex;
}

// xml :nth-child(...)
// or :nth-last-child(...) or :nth(-
last)?-of-type(...)
if ( diff === false ) {
// Use the same loop as above to
seek `elem` from the start
while ( (node = ++nodeIndex && node
&& node[ dir ] ||
(diff = nodeIndex = 0) ||
start.pop()) ) {

if ( ( ofType ?

node.nodeName.toLowerCase() === name :


node.nodeType === 1 ) &&
++diff ) {

// Cache the index of


each encountered element
if ( useCache ) {
outerCache = node[
expando ] || (node[ expando ] = {});

// Support: IE <9
only
// Defend against
cloned attroperties (jQuery gh-1709)
uniqueCache =
outerCache[ node.uniqueID ] ||
(outerCache[
node.uniqueID ] = {});

uniqueCache[ type ] = [ dirruns, diff ];


}

if ( node === elem ) {


break;
}
}
}
}
}

// Incorporate the offset, then check against


cycle size
diff -= last;
return diff === first || ( diff % first === 0
&& diff / first >= 0 );
}
};
},
"PSEUDO": function( pseudo, argument ) {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are
added with uppercase letters
// Remember that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[ pseudo ] ||
Expr.setFilters[ pseudo.toLowerCase() ] ||
Sizzle.error( "unsupported pseudo: " + pseudo );

// The user may use createPseudo to indicate that


// arguments are needed to create the filter function
// just as Sizzle does
if ( fn[ expando ] ) {
return fn( argument );
}

// But maintain support for old signatures


if ( fn.length > 1 ) {
args = [ pseudo, pseudo, "", argument ];
return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase()
) ?
markFunction(function( seed, matches ) {
var idx,
matched = fn( seed, argument ),
i = matched.length;
while ( i-- ) {
idx = indexOf( seed, matched[i] );
seed[ idx ] = !( matches[ idx ] =
matched[i] );
}
}) :
function( elem ) {
return fn( elem, 0, args );
};
}

return fn;
}
},

pseudos: {
// Potentially complex pseudos
"not": markFunction(function( selector ) {
// Trim the selector passed to compile
// to avoid treating leading and trailing
// spaces as combinators
var input = [],
results = [],
matcher = compile( selector.replace( rtrim, "$1" ) );

return matcher[ expando ] ?


markFunction(function( seed, matches, context, xml ) {
var elem,
unmatched = matcher( seed, null, xml, [] ),
i = seed.length;
// Match elements unmatched by `matcher`
while ( i-- ) {
if ( (elem = unmatched[i]) ) {
seed[i] = !(matches[i] = elem);
}
}
}) :
function( elem, context, xml ) {
input[0] = elem;
matcher( input, null, xml, results );
// Don't keep the element (issue #299)
input[0] = null;
return !results.pop();
};
}),

"has": markFunction(function( selector ) {


return function( elem ) {
return Sizzle( selector, elem ).length > 0;
};
}),

"contains": markFunction(function( text ) {


text = text.replace( runescape, funescape );
return function( elem ) {
return ( elem.textContent || elem.innerText ||
getText( elem ) ).indexOf( text ) > -1;
};
}),

// "Whether an element is represented by a :lang() selector


// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed
case-insensitively.
// The identifier C does not have to be a valid language name."
// http://www.w3.org/TR/selectors/#lang-pseudo
"lang": markFunction( function( lang ) {
// lang value must be a valid identifier
if ( !ridentifier.test(lang || "") ) {
Sizzle.error( "unsupported lang: " + lang );
}
lang = lang.replace( runescape, funescape ).toLowerCase();
return function( elem ) {
var elemLang;
do {
if ( (elemLang = documentIsHTML ?
elem.lang :
elem.getAttribute("xml:lang") ||
elem.getAttribute("lang")) ) {

elemLang = elemLang.toLowerCase();
return elemLang === lang ||
elemLang.indexOf( lang + "-" ) === 0;
}
} while ( (elem = elem.parentNode) && elem.nodeType ===
1 );
return false;
};
}),

// Miscellaneous
"target": function( elem ) {
var hash = window.location && window.location.hash;
return hash && hash.slice( 1 ) === elem.id;
},

"root": function( elem ) {


return elem === docElem;
},

"focus": function( elem ) {


return elem === document.activeElement && (!document.hasFocus ||
document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
},

// Boolean properties
"enabled": createDisabledPseudo( false ),
"disabled": createDisabledPseudo( true ),

"checked": function( elem ) {


// In CSS3, :checked should return both checked and selected
elements
// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
var nodeName = elem.nodeName.toLowerCase();
return (nodeName === "input" && !!elem.checked) || (nodeName ===
"option" && !!elem.selected);
},

"selected": function( elem ) {


// Accessing this property makes selected-by-default
// options in Safari work properly
if ( elem.parentNode ) {
elem.parentNode.selectedIndex;
}

return elem.selected === true;


},

// Contents
"empty": function( elem ) {
// http://www.w3.org/TR/selectors/#empty-pseudo
// :empty is negated by element (1) or content nodes (text: 3;
cdata: 4; entity ref: 5),
// but not by others (comment: 8; processing instruction: 7;
etc.)
// nodeType < 6 works because attributes (2) do not appear as
children
for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
if ( elem.nodeType < 6 ) {
return false;
}
}
return true;
},

"parent": function( elem ) {


return !Expr.pseudos["empty"]( elem );
},

// Element/input types
"header": function( elem ) {
return rheader.test( elem.nodeName );
},

"input": function( elem ) {


return rinputs.test( elem.nodeName );
},

"button": function( elem ) {


var name = elem.nodeName.toLowerCase();
return name === "input" && elem.type === "button" || name ===
"button";
},

"text": function( elem ) {


var attr;
return elem.nodeName.toLowerCase() === "input" &&
elem.type === "text" &&

// Support: IE<8
// New HTML5 attribute values (e.g., "search") appear with
elem.type === "text"
( (attr = elem.getAttribute("type")) == null ||
attr.toLowerCase() === "text" );
},

// Position-in-collection
"first": createPositionalPseudo(function() {
return [ 0 ];
}),

"last": createPositionalPseudo(function( matchIndexes, length ) {


return [ length - 1 ];
}),

"eq": createPositionalPseudo(function( matchIndexes, length, argument )


{
return [ argument < 0 ? argument + length : argument ];
}),

"even": createPositionalPseudo(function( matchIndexes, length ) {


var i = 0;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),

"odd": createPositionalPseudo(function( matchIndexes, length ) {


var i = 1;
for ( ; i < length; i += 2 ) {
matchIndexes.push( i );
}
return matchIndexes;
}),
"lt": createPositionalPseudo(function( matchIndexes, length, argument )
{
var i = argument < 0 ? argument + length : argument;
for ( ; --i >= 0; ) {
matchIndexes.push( i );
}
return matchIndexes;
}),

"gt": createPositionalPseudo(function( matchIndexes, length, argument )


{
var i = argument < 0 ? argument + length : argument;
for ( ; ++i < length; ) {
matchIndexes.push( i );
}
return matchIndexes;
})
}
};

Expr.pseudos["nth"] = Expr.pseudos["eq"];

// Add button/input type pseudos


for ( i in { radio: true, checkbox: true, file: true, password: true, image: true }
) {
Expr.pseudos[ i ] = createInputPseudo( i );
}
for ( i in { submit: true, reset: true } ) {
Expr.pseudos[ i ] = createButtonPseudo( i );
}

// Easy API for creating new setFilters


function setFilters() {}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();

tokenize = Sizzle.tokenize = function( selector, parseOnly ) {


var matched, match, tokens, type,
soFar, groups, preFilters,
cached = tokenCache[ selector + " " ];

if ( cached ) {
return parseOnly ? 0 : cached.slice( 0 );
}

soFar = selector;
groups = [];
preFilters = Expr.preFilter;

while ( soFar ) {

// Comma and first run


if ( !matched || (match = rcomma.exec( soFar )) ) {
if ( match ) {
// Don't consume trailing commas as valid
soFar = soFar.slice( match[0].length ) || soFar;
}
groups.push( (tokens = []) );
}

matched = false;

// Combinators
if ( (match = rcombinators.exec( soFar )) ) {
matched = match.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match[0].replace( rtrim, " " )
});
soFar = soFar.slice( matched.length );
}

// Filters
for ( type in Expr.filter ) {
if ( (match = matchExpr[ type ].exec( soFar )) && (!
preFilters[ type ] ||
(match = preFilters[ type ]( match ))) ) {
matched = match.shift();
tokens.push({
value: matched,
type: type,
matches: match
});
soFar = soFar.slice( matched.length );
}
}

if ( !matched ) {
break;
}
}

// Return the length of the invalid excess


// if we're just parsing
// Otherwise, throw an error or return tokens
return parseOnly ?
soFar.length :
soFar ?
Sizzle.error( selector ) :
// Cache the tokens
tokenCache( selector, groups ).slice( 0 );
};

function toSelector( tokens ) {


var i = 0,
len = tokens.length,
selector = "";
for ( ; i < len; i++ ) {
selector += tokens[i].value;
}
return selector;
}

function addCombinator( matcher, combinator, base ) {


var dir = combinator.dir,
skip = combinator.next,
key = skip || dir,
checkNonElements = base && key === "parentNode",
doneName = done++;

return combinator.first ?
// Check against closest ancestor/preceding element
function( elem, context, xml ) {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
return matcher( elem, context, xml );
}
}
} :

// Check against all ancestor/preceding elements


function( elem, context, xml ) {
var oldCache, uniqueCache, outerCache,
newCache = [ dirruns, doneName ];

// We can't set arbitrary data on XML nodes, so they don't


benefit from combinator caching
if ( xml ) {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
if ( matcher( elem, context, xml ) ) {
return true;
}
}
}
} else {
while ( (elem = elem[ dir ]) ) {
if ( elem.nodeType === 1 || checkNonElements ) {
outerCache = elem[ expando ] ||
(elem[ expando ] = {});

// Support: IE <9 only


// Defend against cloned attroperties (jQuery
gh-1709)
uniqueCache = outerCache[ elem.uniqueID ] ||
(outerCache[ elem.uniqueID ] = {});

if ( skip && skip ===


elem.nodeName.toLowerCase() ) {
elem = elem[ dir ] || elem;
} else if ( (oldCache = uniqueCache[ key ]) &&
oldCache[ 0 ] === dirruns &&
oldCache[ 1 ] === doneName ) {

// Assign to newCache so results back-


propagate to previous elements
return (newCache[ 2 ] = oldCache[ 2 ]);
} else {
// Reuse newcache so results back-
propagate to previous elements
uniqueCache[ key ] = newCache;

// A match means we're done; a fail means


we have to keep checking
if ( (newCache[ 2 ] = matcher( elem,
context, xml )) ) {
return true;
}
}
}
}
}
};
}

function elementMatcher( matchers ) {


return matchers.length > 1 ?
function( elem, context, xml ) {
var i = matchers.length;
while ( i-- ) {
if ( !matchers[i]( elem, context, xml ) ) {
return false;
}
}
return true;
} :
matchers[0];
}

function multipleContexts( selector, contexts, results ) {


var i = 0,
len = contexts.length;
for ( ; i < len; i++ ) {
Sizzle( selector, contexts[i], results );
}
return results;
}

function condense( unmatched, map, filter, context, xml ) {


var elem,
newUnmatched = [],
i = 0,
len = unmatched.length,
mapped = map != null;

for ( ; i < len; i++ ) {


if ( (elem = unmatched[i]) ) {
if ( !filter || filter( elem, context, xml ) ) {
newUnmatched.push( elem );
if ( mapped ) {
map.push( i );
}
}
}
}

return newUnmatched;
}

function setMatcher( preFilter, selector, matcher, postFilter, postFinder,


postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
postFinder = setMatcher( postFinder, postSelector );
}
return markFunction(function( seed, results, context, xml ) {
var temp, i, elem,
preMap = [],
postMap = [],
preexisting = results.length,

// Get initial elements from seed or context


elems = seed || multipleContexts( selector || "*",
context.nodeType ? [ context ] : context, [] ),

// Prefilter to get matcher input, preserving a map for seed-


results synchronization
matcherIn = preFilter && ( seed || !selector ) ?
condense( elems, preMap, preFilter, context, xml ) :
elems,

matcherOut = matcher ?
// If we have a postFinder, or filtered seed, or non-seed
postFilter or preexisting results,
postFinder || ( seed ? preFilter : preexisting ||
postFilter ) ?

// ...intermediate processing is necessary


[] :

// ...otherwise use results directly


results :
matcherIn;

// Find primary matches


if ( matcher ) {
matcher( matcherIn, matcherOut, context, xml );
}

// Apply postFilter
if ( postFilter ) {
temp = condense( matcherOut, postMap );
postFilter( temp, [], context, xml );

// Un-match failing elements by moving them back to matcherIn


i = temp.length;
while ( i-- ) {
if ( (elem = temp[i]) ) {
matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ]
= elem);
}
}
}

if ( seed ) {
if ( postFinder || preFilter ) {
if ( postFinder ) {
// Get the final matcherOut by condensing this
intermediate into postFinder contexts
temp = [];
i = matcherOut.length;
while ( i-- ) {
if ( (elem = matcherOut[i]) ) {
// Restore matcherIn since elem is not
yet a final match
temp.push( (matcherIn[i] = elem) );
}
}
postFinder( null, (matcherOut = []), temp, xml );
}

// Move matched elements from seed to results to keep them


synchronized
i = matcherOut.length;
while ( i-- ) {
if ( (elem = matcherOut[i]) &&
(temp = postFinder ? indexOf( seed, elem ) :
preMap[i]) > -1 ) {

seed[temp] = !(results[temp] = elem);


}
}
}

// Add elements to results, through postFinder if defined


} else {
matcherOut = condense(
matcherOut === results ?
matcherOut.splice( preexisting, matcherOut.length ) :
matcherOut
);
if ( postFinder ) {
postFinder( null, results, matcherOut, xml );
} else {
push.apply( results, matcherOut );
}
}
});
}

function matcherFromTokens( tokens ) {


var checkContext, matcher, j,
len = tokens.length,
leadingRelative = Expr.relative[ tokens[0].type ],
implicitRelative = leadingRelative || Expr.relative[" "],
i = leadingRelative ? 1 : 0,

// The foundational matcher ensures that elements are reachable from


top-level context(s)
matchContext = addCombinator( function( elem ) {
return elem === checkContext;
}, implicitRelative, true ),
matchAnyContext = addCombinator( function( elem ) {
return indexOf( checkContext, elem ) > -1;
}, implicitRelative, true ),
matchers = [ function( elem, context, xml ) {
var ret = ( !leadingRelative && ( xml || context !==
outermostContext ) ) || (
(checkContext = context).nodeType ?
matchContext( elem, context, xml ) :
matchAnyContext( elem, context, xml ) );
// Avoid hanging onto element (issue #299)
checkContext = null;
return ret;
} ];

for ( ; i < len; i++ ) {


if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
matchers = [ addCombinator(elementMatcher( matchers ),
matcher) ];
} else {
matcher = Expr.filter[ tokens[i].type ].apply( null,
tokens[i].matches );

// Return special upon seeing a positional matcher


if ( matcher[ expando ] ) {
// Find the next relative operator (if any) for proper
handling
j = ++i;
for ( ; j < len; j++ ) {
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
}
return setMatcher(
i > 1 && elementMatcher( matchers ),
i > 1 && toSelector(
// If the preceding token was a descendant
combinator, insert an implicit any-element `*`
tokens.slice( 0, i - 1 ).concat({ value:
tokens[ i - 2 ].type === " " ? "*" : "" })
).replace( rtrim, "$1" ),
matcher,
i < j && matcherFromTokens( tokens.slice( i, j ) ),
j < len && matcherFromTokens( (tokens = tokens.slice(
j )) ),
j < len && toSelector( tokens )
);
}
matchers.push( matcher );
}
}

return elementMatcher( matchers );


}

function matcherFromGroupMatchers( elementMatchers, setMatchers ) {


var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
setMatched = [],
contextBackup = outermostContext,
// We must always have either seed elements or outermost
context
elems = seed || byElement && Expr.find["TAG"]( "*",
outermost ),
// Use integer dirruns iff this is the outermost matcher
dirrunsUnique = (dirruns += contextBackup == null ? 1 :
Math.random() || 0.1),
len = elems.length;

if ( outermost ) {
outermostContext = context === document || context ||
outermost;
}

// Add elements passing elementMatchers directly to results


// Support: IE<9, Safari
// Tolerate NodeList properties (IE: "length"; Safari: <number>)
matching elements by id
for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
if ( byElement && elem ) {
j = 0;
if ( !context && elem.ownerDocument !== document ) {
setDocument( elem );
xml = !documentIsHTML;
}
while ( (matcher = elementMatchers[j++]) ) {
if ( matcher( elem, context || document, xml) )
{
results.push( elem );
break;
}
}
if ( outermost ) {
dirruns = dirrunsUnique;
}
}

// Track unmatched elements for set filters


if ( bySet ) {
// They will have gone through all possible matchers
if ( (elem = !matcher && elem) ) {
matchedCount--;
}

// Lengthen the array for every element, matched or


not
if ( seed ) {
unmatched.push( elem );
}
}
}

// `i` is now the count of elements visited above, and adding it


to `matchedCount`
// makes the latter nonnegative.
matchedCount += i;

// Apply set filters to unmatched elements


// NOTE: This can be skipped if there are no unmatched elements
(i.e., `matchedCount`
// equals `i`), unless we didn't visit _any_ elements in the
above loop because we have
// no element matchers and no seed.
// Incrementing an initially-string "0" `i` allows `i` to remain
a string only in that
// case, which will result in a "00" `matchedCount` that differs
from `i` but is also
// numerically zero.
if ( bySet && i !== matchedCount ) {
j = 0;
while ( (matcher = setMatchers[j++]) ) {
matcher( unmatched, setMatched, context, xml );
}

if ( seed ) {
// Reintegrate element matches to eliminate the need
for sorting
if ( matchedCount > 0 ) {
while ( i-- ) {
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] =
pop.call( results );
}
}
}

// Discard index placeholder values to get only


actual matches
setMatched = condense( setMatched );
}

// Add matches to results


push.apply( results, setMatched );

// Seedless set matches succeeding multiple successful


matchers stipulate sorting
if ( outermost && !seed && setMatched.length > 0 &&
( matchedCount + setMatchers.length ) > 1 ) {

Sizzle.uniqueSort( results );
}
}

// Override manipulation of globals by nested matchers


if ( outermost ) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}

return unmatched;
};

return bySet ?
markFunction( superMatcher ) :
superMatcher;
}

compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {


var i,
setMatchers = [],
elementMatchers = [],
cached = compilerCache[ selector + " " ];

if ( !cached ) {
// Generate a function of recursive functions that can be used to check
each element
if ( !match ) {
match = tokenize( selector );
}
i = match.length;
while ( i-- ) {
cached = matcherFromTokens( match[i] );
if ( cached[ expando ] ) {
setMatchers.push( cached );
} else {
elementMatchers.push( cached );
}
}

// Cache the compiled function


cached = compilerCache( selector,
matcherFromGroupMatchers( elementMatchers, setMatchers ) );

// Save selector and tokenization


cached.selector = selector;
}
return cached;
};

/**
* A low-level selection function that works with Sizzle's compiled
* selector functions
* @param {String|Function} selector A selector or a pre-compiled
* selector function built with Sizzle.compile
* @param {Element} context
* @param {Array} [results]
* @param {Array} [seed] A set of elements to match against
*/
select = Sizzle.select = function( selector, context, results, seed ) {
var i, tokens, token, type, find,
compiled = typeof selector === "function" && selector,
match = !seed && tokenize( (selector = compiled.selector ||
selector) );

results = results || [];

// Try to minimize operations if there is only one selector in the list and
no seed
// (the latter of which guarantees us context)
if ( match.length === 1 ) {

// Reduce context if the leading compound selector is an ID


tokens = match[0] = match[0].slice( 0 );
if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
support.getById && context.nodeType === 9 && documentIsHTML
&&
Expr.relative[ tokens[1].type ] ) {

context = ( Expr.find["ID"]( token.matches[0].replace(runescape,


funescape), context ) || [] )[0];
if ( !context ) {
return results;

// Precompiled matchers will still verify ancestry, so step up a


level
} else if ( compiled ) {
context = context.parentNode;
}

selector = selector.slice( tokens.shift().value.length );


}

// Fetch a seed set for right-to-left matching


i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
while ( i-- ) {
token = tokens[i];

// Abort if we hit a combinator


if ( Expr.relative[ (type = token.type) ] ) {
break;
}
if ( (find = Expr.find[ type ]) ) {
// Search, expanding context for leading sibling
combinators
if ( (seed = find(
token.matches[0].replace( runescape, funescape ),
rsibling.test( tokens[0].type ) &&
testContext( context.parentNode ) || context
)) ) {

// If seed is empty or no tokens remain, we can


return early
tokens.splice( i, 1 );
selector = seed.length && toSelector( tokens );
if ( !selector ) {
push.apply( results, seed );
return results;
}

break;
}
}
}
}

// Compile and execute a filtering function if one is not provided


// Provide `match` to avoid retokenization if we modified the selector above
( compiled || compile( selector, match ) )(
seed,
context,
!documentIsHTML,
results,
!context || rsibling.test( selector ) &&
testContext( context.parentNode ) || context
);
return results;
};

// One-time assignments
// Sort stability
support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;

// Support: Chrome 14-35+


// Always assume duplicates if they aren't passed to the comparison function
support.detectDuplicates = !!hasDuplicate;

// Initialize against the default document


setDocument();

// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)


// Detached nodes confoundingly follow *each other*
support.sortDetached = assert(function( el ) {
// Should return 1, but returns 4 (following)
return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
});

// Support: IE<8
// Prevent attribute/property "interpolation"
// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( el ) {
el.innerHTML = "<a href='#'></a>";
return el.firstChild.getAttribute("href") === "#" ;
}) ) {
addHandle( "type|href|height|width", function( elem, name, isXML ) {
if ( !isXML ) {
return elem.getAttribute( name, name.toLowerCase() === "type" ? 1
: 2 );
}
});
}

// Support: IE<9
// Use defaultValue in place of getAttribute("value")
if ( !support.attributes || !assert(function( el ) {
el.innerHTML = "<input/>";
el.firstChild.setAttribute( "value", "" );
return el.firstChild.getAttribute( "value" ) === "";
}) ) {
addHandle( "value", function( elem, name, isXML ) {
if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
return elem.defaultValue;
}
});
}

// Support: IE<9
// Use getAttributeNode to fetch booleans when getAttribute lies
if ( !assert(function( el ) {
return el.getAttribute("disabled") == null;
}) ) {
addHandle( booleans, function( elem, name, isXML ) {
var val;
if ( !isXML ) {
return elem[ name ] === true ? name.toLowerCase() :
(val = elem.getAttributeNode( name )) &&
val.specified ?
val.value :
null;
}
});
}

return Sizzle;

})( window );

jQuery.find = Sizzle;
jQuery.expr = Sizzle.selectors;

// Deprecated
jQuery.expr[ ":" ] = jQuery.expr.pseudos;
jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;
jQuery.escapeSelector = Sizzle.escape;

var dir = function( elem, dir, until ) {


var matched = [],
truncate = until !== undefined;

while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {


if ( elem.nodeType === 1 ) {
if ( truncate && jQuery( elem ).is( until ) ) {
break;
}
matched.push( elem );
}
}
return matched;
};

var siblings = function( n, elem ) {


var matched = [];

for ( ; n; n = n.nextSibling ) {
if ( n.nodeType === 1 && n !== elem ) {
matched.push( n );
}
}

return matched;
};

var rneedsContext = jQuery.expr.match.needsContext;

var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)


$/i );
var risSimple = /^.[^:#\[\.,]*$/;

// Implement the identical functionality for filter and not


function winnow( elements, qualifier, not ) {
if ( jQuery.isFunction( qualifier ) ) {
return jQuery.grep( elements, function( elem, i ) {
/* jshint -W018 */
return !!qualifier.call( elem, i, elem ) !== not;
} );

if ( qualifier.nodeType ) {
return jQuery.grep( elements, function( elem ) {
return ( elem === qualifier ) !== not;
} );

if ( typeof qualifier === "string" ) {


if ( risSimple.test( qualifier ) ) {
return jQuery.filter( qualifier, elements, not );
}

qualifier = jQuery.filter( qualifier, elements );


}

return jQuery.grep( elements, function( elem ) {


return ( indexOf.call( qualifier, elem ) > -1 ) !== not &&
elem.nodeType === 1;
} );
}

jQuery.filter = function( expr, elems, not ) {


var elem = elems[ 0 ];

if ( not ) {
expr = ":not(" + expr + ")";
}

return elems.length === 1 && elem.nodeType === 1 ?


jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
return elem.nodeType === 1;
} ) );
};

jQuery.fn.extend( {
find: function( selector ) {
var i, ret,
len = this.length,
self = this;

if ( typeof selector !== "string" ) {


return this.pushStack( jQuery( selector ).filter( function() {
for ( i = 0; i < len; i++ ) {
if ( jQuery.contains( self[ i ], this ) ) {
return true;
}
}
} ) );
}

ret = this.pushStack( [] );

for ( i = 0; i < len; i++ ) {


jQuery.find( selector, self[ i ], ret );
}

return len > 1 ? jQuery.uniqueSort( ret ) : ret;


},
filter: function( selector ) {
return this.pushStack( winnow( this, selector || [], false ) );
},
not: function( selector ) {
return this.pushStack( winnow( this, selector || [], true ) );
},
is: function( selector ) {
return !!winnow(
this,

// If this is a positional/relative selector, check membership in


the returned set
// so $("p:first").is("p:last") won't return true for a doc with
two "p".
typeof selector === "string" && rneedsContext.test( selector ) ?
jQuery( selector ) :
selector || [],
false
).length;
}
} );

// Initialize a jQuery object

// A central reference to the root jQuery(document)


var rootjQuery,

// A simple way to check for HTML strings


// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
// Strict HTML recognition (#11290: must start with <)
// Shortcut simple #id case for speed
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,

init = jQuery.fn.init = function( selector, context, root ) {


var match, elem;

// HANDLE: $(""), $(null), $(undefined), $(false)


if ( !selector ) {
return this;
}

// Method init() accepts an alternate rootjQuery


// so migrate can support jQuery.sub (gh-2101)
root = root || rootjQuery;
// Handle HTML strings
if ( typeof selector === "string" ) {
if ( selector[ 0 ] === "<" &&
selector[ selector.length - 1 ] === ">" &&
selector.length >= 3 ) {

// Assume that strings that start and end with <> are HTML
and skip the regex check
match = [ null, selector, null ];

} else {
match = rquickExpr.exec( selector );
}

// Match html or make sure no context is specified for #id


if ( match && ( match[ 1 ] || !context ) ) {

// HANDLE: $(html) -> $(array)


if ( match[ 1 ] ) {
context = context instanceof jQuery ? context[ 0 ] :
context;

// Option to run scripts is true for back-compat


// Intentionally let the error be thrown if parseHTML
is not present
jQuery.merge( this, jQuery.parseHTML(
match[ 1 ],
context && context.nodeType ?
context.ownerDocument || context : document,
true
) );

// HANDLE: $(html, props)


if ( rsingleTag.test( match[ 1 ] ) &&
jQuery.isPlainObject( context ) ) {
for ( match in context ) {

// Properties of context are called as


methods if possible
if ( jQuery.isFunction( this[ match ] ) )
{
this[ match ]( context[ match ] );

// ...and otherwise set as attributes


} else {
this.attr( match,
context[ match ] );
}
}
}

return this;

// HANDLE: $(#id)
} else {
elem = document.getElementById( match[ 2 ] );

if ( elem ) {
// Inject the element directly into the jQuery
object
this[ 0 ] = elem;
this.length = 1;
}
return this;
}

// HANDLE: $(expr, $(...))


} else if ( !context || context.jquery ) {
return ( context || root ).find( selector );

// HANDLE: $(expr, context)


// (which is just equivalent to: $(context).find(expr)
} else {
return this.constructor( context ).find( selector );
}

// HANDLE: $(DOMElement)
} else if ( selector.nodeType ) {
this[ 0 ] = selector;
this.length = 1;
return this;

// HANDLE: $(function)
// Shortcut for document ready
} else if ( jQuery.isFunction( selector ) ) {
return root.ready !== undefined ?
root.ready( selector ) :

// Execute immediately if ready is not present


selector( jQuery );
}

return jQuery.makeArray( selector, this );


};

// Give the init function the jQuery prototype for later instantiation
init.prototype = jQuery.fn;

// Initialize central reference


rootjQuery = jQuery( document );

var rparentsprev = /^(?:parents|prev(?:Until|All))/,

// Methods guaranteed to produce a unique set when starting from a unique set
guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};

jQuery.fn.extend( {
has: function( target ) {
var targets = jQuery( target, this ),
l = targets.length;
return this.filter( function() {
var i = 0;
for ( ; i < l; i++ ) {
if ( jQuery.contains( this, targets[ i ] ) ) {
return true;
}
}
} );
},

closest: function( selectors, context ) {


var cur,
i = 0,
l = this.length,
matched = [],
targets = typeof selectors !== "string" && jQuery( selectors );

// Positional selectors never match, since there's no _selection_


context
if ( !rneedsContext.test( selectors ) ) {
for ( ; i < l; i++ ) {
for ( cur = this[ i ]; cur && cur !== context; cur =
cur.parentNode ) {

// Always skip document fragments


if ( cur.nodeType < 11 && ( targets ?
targets.index( cur ) > -1 :

// Don't pass non-elements to Sizzle


cur.nodeType === 1 &&
jQuery.find.matchesSelector( cur,
selectors ) ) ) {

matched.push( cur );
break;
}
}
}
}

return this.pushStack( matched.length > 1 ?


jQuery.uniqueSort( matched ) : matched );
},

// Determine the position of an element within the set


index: function( elem ) {

// No argument, return index in parent


if ( !elem ) {
return ( this[ 0 ] && this[ 0 ].parentNode ) ?
this.first().prevAll().length : -1;
}

// Index in selector
if ( typeof elem === "string" ) {
return indexOf.call( jQuery( elem ), this[ 0 ] );
}
// Locate the position of the desired element
return indexOf.call( this,

// If it receives a jQuery object, the first element is used


elem.jquery ? elem[ 0 ] : elem
);
},

add: function( selector, context ) {


return this.pushStack(
jQuery.uniqueSort(
jQuery.merge( this.get(), jQuery( selector, context ) )
)
);
},

addBack: function( selector ) {


return this.add( selector == null ?
this.prevObject : this.prevObject.filter( selector )
);
}
} );

function sibling( cur, dir ) {


while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
return cur;
}

jQuery.each( {
parent: function( elem ) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function( elem ) {
return dir( elem, "parentNode" );
},
parentsUntil: function( elem, i, until ) {
return dir( elem, "parentNode", until );
},
next: function( elem ) {
return sibling( elem, "nextSibling" );
},
prev: function( elem ) {
return sibling( elem, "previousSibling" );
},
nextAll: function( elem ) {
return dir( elem, "nextSibling" );
},
prevAll: function( elem ) {
return dir( elem, "previousSibling" );
},
nextUntil: function( elem, i, until ) {
return dir( elem, "nextSibling", until );
},
prevUntil: function( elem, i, until ) {
return dir( elem, "previousSibling", until );
},
siblings: function( elem ) {
return siblings( ( elem.parentNode || {} ).firstChild, elem );
},
children: function( elem ) {
return siblings( elem.firstChild );
},
contents: function( elem ) {
return elem.contentDocument || jQuery.merge( [], elem.childNodes );
}
}, function( name, fn ) {
jQuery.fn[ name ] = function( until, selector ) {
var matched = jQuery.map( this, fn, until );

if ( name.slice( -5 ) !== "Until" ) {


selector = until;
}

if ( selector && typeof selector === "string" ) {


matched = jQuery.filter( selector, matched );
}

if ( this.length > 1 ) {

// Remove duplicates
if ( !guaranteedUnique[ name ] ) {
jQuery.uniqueSort( matched );
}

// Reverse order for parents* and prev-derivatives


if ( rparentsprev.test( name ) ) {
matched.reverse();
}
}

return this.pushStack( matched );


};
} );
var rnotwhite = ( /\S+/g );

// Convert String-formatted options into Object-formatted ones


function createOptions( options ) {
var object = {};
jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
object[ flag ] = true;
} );
return object;
}

/*
* Create a callback list using the following parameters:
*
* options: an optional list of space-separated options that will change how
* the callback list behaves or a more traditional option object
*
* By default a callback list will act like an event callback list and can be
* "fired" multiple times.
*
* Possible options:
*
* once: will ensure the callback list can only be fired once (like
a Deferred)
*
* memory: will keep track of previous values and will call any
callback added
* after the list has been fired right away with the
latest "memorized"
* values (like a Deferred)
*
* unique: will ensure a callback can only be added once (no
duplicate in the list)
*
* stopOnFalse: interrupt callings when a callback returns false
*
*/
jQuery.Callbacks = function( options ) {

// Convert options from String-formatted to Object-formatted if needed


// (we check in cache first)
options = typeof options === "string" ?
createOptions( options ) :
jQuery.extend( {}, options );

var // Flag to know if list is currently firing


firing,

// Last fire value for non-forgettable lists


memory,

// Flag to know if list was already fired


fired,

// Flag to prevent firing


locked,

// Actual callback list


list = [],

// Queue of execution data for repeatable lists


queue = [],

// Index of currently firing callback (modified by add/remove as


needed)
firingIndex = -1,

// Fire callbacks
fire = function() {

// Enforce single-firing
locked = options.once;

// Execute callbacks for all pending executions,


// respecting firingIndex overrides and runtime changes
fired = firing = true;
for ( ; queue.length; firingIndex = -1 ) {
memory = queue.shift();
while ( ++firingIndex < list.length ) {

// Run callback and check for early termination


if ( list[ firingIndex ].apply( memory[ 0 ],
memory[ 1 ] ) === false &&
options.stopOnFalse ) {

// Jump to end and forget the data so .add


doesn't re-fire
firingIndex = list.length;
memory = false;
}
}
}

// Forget the data if we're done with it


if ( !options.memory ) {
memory = false;
}

firing = false;

// Clean up if we're done firing for good


if ( locked ) {

// Keep an empty list if we have data for future add calls


if ( memory ) {
list = [];

// Otherwise, this object is spent


} else {
list = "";
}
}
},

// Actual Callbacks object


self = {

// Add a callback or a collection of callbacks to the list


add: function() {
if ( list ) {

// If we have memory from a past run, we should fire


after adding
if ( memory && !firing ) {
firingIndex = list.length - 1;
queue.push( memory );
}

( function add( args ) {


jQuery.each( args, function( _, arg ) {
if ( jQuery.isFunction( arg ) ) {
if ( !options.unique || !
self.has( arg ) ) {
list.push( arg );
}
} else if ( arg && arg.length &&
jQuery.type( arg ) !== "string" ) {

// Inspect recursively
add( arg );
}
} );
} )( arguments );

if ( memory && !firing ) {


fire();
}
}
return this;
},

// Remove a callback from the list


remove: function() {
jQuery.each( arguments, function( _, arg ) {
var index;
while ( ( index = jQuery.inArray( arg, list,
index ) ) > -1 ) {
list.splice( index, 1 );

// Handle firing indexes


if ( index <= firingIndex ) {
firingIndex--;
}
}
} );
return this;
},

// Check if a given callback is in the list.


// If no argument is given, return whether or not list has
callbacks attached.
has: function( fn ) {
return fn ?
jQuery.inArray( fn, list ) > -1 :
list.length > 0;
},

// Remove all callbacks from the list


empty: function() {
if ( list ) {
list = [];
}
return this;
},

// Disable .fire and .add


// Abort any current/pending executions
// Clear all callbacks and values
disable: function() {
locked = queue = [];
list = memory = "";
return this;
},
disabled: function() {
return !list;
},

// Disable .fire
// Also disable .add unless we have memory (since it would have
no effect)
// Abort any pending executions
lock: function() {
locked = queue = [];
if ( !memory && !firing ) {
list = memory = "";
}
return this;
},
locked: function() {
return !!locked;
},

// Call all callbacks with the given context and arguments


fireWith: function( context, args ) {
if ( !locked ) {
args = args || [];
args = [ context, args.slice ? args.slice() : args ];
queue.push( args );
if ( !firing ) {
fire();
}
}
return this;
},

// Call all the callbacks with the given arguments


fire: function() {
self.fireWith( this, arguments );
return this;
},

// To know if the callbacks have already been called at least


once
fired: function() {
return !!fired;
}
};

return self;
};

function Identity( v ) {
return v;
}
function Thrower( ex ) {
throw ex;
}

function adoptValue( value, resolve, reject ) {


var method;

try {

// Check for promise aspect first to privilege synchronous behavior


if ( value && jQuery.isFunction( ( method = value.promise ) ) ) {
method.call( value ).done( resolve ).fail( reject );
// Other thenables
} else if ( value && jQuery.isFunction( ( method = value.then ) ) ) {
method.call( value, resolve, reject );

// Other non-thenables
} else {

// Support: Android 4.0 only


// Strict mode functions invoked without .call/.apply get global-
object context
resolve.call( undefined, value );
}

// For Promises/A+, convert exceptions into rejections


// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks
appearing in
// Deferred#then to conditionally suppress rejection.
} catch ( /*jshint -W002 */ value ) {

// Support: Android 4.0 only


// Strict mode functions invoked without .call/.apply get global-object
context
reject.call( undefined, value );
}
}

jQuery.extend( {

Deferred: function( func ) {


var tuples = [

// action, add listener, callbacks,


// ... .then handlers, argument index, [final state]
[ "notify", "progress", jQuery.Callbacks( "memory" ),
jQuery.Callbacks( "memory" ), 2 ],
[ "resolve", "done", jQuery.Callbacks( "once memory" ),
jQuery.Callbacks( "once memory" ), 0, "resolved" ],
[ "reject", "fail", jQuery.Callbacks( "once memory" ),
jQuery.Callbacks( "once memory" ), 1, "rejected" ]
],
state = "pending",
promise = {
state: function() {
return state;
},
always: function() {
deferred.done( arguments ).fail( arguments );
return this;
},
"catch": function( fn ) {
return promise.then( null, fn );
},

// Keep pipe for back-compat


pipe: function( /* fnDone, fnFail, fnProgress */ ) {
var fns = arguments;

return jQuery.Deferred( function( newDefer ) {


jQuery.each( tuples, function( i, tuple ) {
// Map tuples (progress, done, fail) to
arguments (done, fail, progress)
var fn = jQuery.isFunction( fns[ tuple[ 4
] ] ) && fns[ tuple[ 4 ] ];

// deferred.progress(function() { bind to
newDefer or newDefer.notify })
// deferred.done(function() { bind to
newDefer or newDefer.resolve })
// deferred.fail(function() { bind to
newDefer or newDefer.reject })
deferred[ tuple[ 1 ] ]( function() {
var returned = fn &&
fn.apply( this, arguments );
if ( returned && jQuery.isFunction(
returned.promise ) ) {
returned.promise()
.progress( newDefer.noti
fy )
.done( newDefer.resolve
)
.fail( newDefer.reject )
;
} else {
newDefer[ tuple[ 0 ] + "With"
](
this,
fn ? [ returned ] :
arguments
);
}
} );
} );
fns = null;
} ).promise();
},
then: function( onFulfilled, onRejected, onProgress ) {
var maxDepth = 0;
function resolve( depth, deferred, handler, special )
{
return function() {
var that = this,
args = arguments,
mightThrow = function() {
var returned, then;

// Support: Promises/A+
section 2.3.3.3.3
//
https://promisesaplus.com/#point-59
// Ignore double-resolution
attempts
if ( depth < maxDepth ) {
return;
}

returned =
handler.apply( that, args );
// Support: Promises/A+
section 2.3.1
//
https://promisesaplus.com/#point-48
if ( returned ===
deferred.promise() ) {
throw new
TypeError( "Thenable self-resolution" );
}

// Support: Promises/A+
sections 2.3.3.1, 3.5
//
https://promisesaplus.com/#point-54
//
https://promisesaplus.com/#point-75
// Retrieve `then` only once
then = returned &&

// Support: Promises/A+
section 2.3.4
//
https://promisesaplus.com/#point-64
// Only check objects
and functions for thenability
( typeof returned ===
"object" ||
typeof returned
=== "function" ) &&
returned.then;

// Handle a returned thenable


if
( jQuery.isFunction( then ) ) {

// Special processors
(notify) just wait for resolution
if ( special ) {
then.call(
returned,

resolve( maxDepth, deferred, Identity, special ),

resolve( maxDepth, deferred, Thrower, special )


);

// Normal processors
(resolve) also hook into progress
} else {

// ...and
disregard older resolution values
maxDepth++;

then.call(
returned,

resolve( maxDepth, deferred, Identity, special ),


resolve( maxDepth, deferred, Thrower, special ),

resolve( maxDepth, deferred, Identity,

deferred.notifyWith )
);
}

// Handle all other returned


values
} else {

// Only substitute
handlers pass on context
// and multiple values
(non-spec behavior)
if ( handler !==
Identity ) {
that = undefined;
args =
[ returned ];
}

// Process the value(s)


// Default process is
resolve
( special ||
deferred.resolveWith )( that, args );
}
},

// Only normal processors (resolve)


catch and reject exceptions
process = special ?
mightThrow :
function() {
try {
mightThrow();
} catch ( e ) {

if
( jQuery.Deferred.exceptionHook ) {

jQuery.Deferred.exceptionHook( e,

process.stackTrace );
}

// Support:
Promises/A+ section 2.3.3.3.4.1
//
https://promisesaplus.com/#point-61
// Ignore post-
resolution exceptions
if ( depth + 1 >=
maxDepth ) {

// Only
substitute handlers pass on context
// and
multiple values (non-spec behavior)
if ( handler
!== Thrower ) {
that =
undefined;
args =
[ e ];
}

deferred.rejectWith( that, args );


}
}
};

// Support: Promises/A+ section 2.3.3.3.1


// https://promisesaplus.com/#point-57
// Re-resolve promises immediately to
dodge false rejection from
// subsequent errors
if ( depth ) {
process();
} else {

// Call an optional hook to record


the stack, in case of exception
// since it's otherwise lost when
execution goes async
if ( jQuery.Deferred.getStackHook )
{
process.stackTrace =
jQuery.Deferred.getStackHook();
}
window.setTimeout( process );
}
};
}

return jQuery.Deferred( function( newDefer ) {

// progress_handlers.add( ... )
tuples[ 0 ][ 3 ].add(
resolve(
0,
newDefer,
jQuery.isFunction( onProgress ) ?
onProgress :
Identity,
newDefer.notifyWith
)
);

// fulfilled_handlers.add( ... )
tuples[ 1 ][ 3 ].add(
resolve(
0,
newDefer,
jQuery.isFunction( onFulfilled ) ?
onFulfilled :
Identity
)
);

// rejected_handlers.add( ... )
tuples[ 2 ][ 3 ].add(
resolve(
0,
newDefer,
jQuery.isFunction( onRejected ) ?
onRejected :
Thrower
)
);
} ).promise();
},

// Get a promise for this deferred


// If obj is provided, the promise aspect is added to the
object
promise: function( obj ) {
return obj != null ? jQuery.extend( obj, promise ) :
promise;
}
},
deferred = {};

// Add list-specific methods


jQuery.each( tuples, function( i, tuple ) {
var list = tuple[ 2 ],
stateString = tuple[ 5 ];

// promise.progress = list.add
// promise.done = list.add
// promise.fail = list.add
promise[ tuple[ 1 ] ] = list.add;

// Handle state
if ( stateString ) {
list.add(
function() {

// state = "resolved" (i.e., fulfilled)


// state = "rejected"
state = stateString;
},

// rejected_callbacks.disable
// fulfilled_callbacks.disable
tuples[ 3 - i ][ 2 ].disable,

// progress_callbacks.lock
tuples[ 0 ][ 2 ].lock
);
}

// progress_handlers.fire
// fulfilled_handlers.fire
// rejected_handlers.fire
list.add( tuple[ 3 ].fire );

// deferred.notify = function() { deferred.notifyWith(...) }


// deferred.resolve = function() { deferred.resolveWith(...) }
// deferred.reject = function() { deferred.rejectWith(...) }
deferred[ tuple[ 0 ] ] = function() {
deferred[ tuple[ 0 ] + "With" ]( this === deferred ?
undefined : this, arguments );
return this;
};

// deferred.notifyWith = list.fireWith
// deferred.resolveWith = list.fireWith
// deferred.rejectWith = list.fireWith
deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
} );

// Make the deferred a promise


promise.promise( deferred );

// Call given func if any


if ( func ) {
func.call( deferred, deferred );
}

// All done!
return deferred;
},

// Deferred helper
when: function( singleValue ) {
var

// count of uncompleted subordinates


remaining = arguments.length,

// count of unprocessed arguments


i = remaining,

// subordinate fulfillment data


resolveContexts = Array( i ),
resolveValues = slice.call( arguments ),

// the master Deferred


master = jQuery.Deferred(),

// subordinate callback factory


updateFunc = function( i ) {
return function( value ) {
resolveContexts[ i ] = this;
resolveValues[ i ] = arguments.length > 1 ?
slice.call( arguments ) : value;
if ( !( --remaining ) ) {
master.resolveWith( resolveContexts,
resolveValues );
}
};
};

// Single- and empty arguments are adopted like Promise.resolve


if ( remaining <= 1 ) {
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve,
master.reject );

// Use .then() to unwrap secondary thenables (cf. gh-3000)


if ( master.state() === "pending" ||
jQuery.isFunction( resolveValues[ i ] &&
resolveValues[ i ].then ) ) {

return master.then();
}
}

// Multiple arguments are aggregated like Promise.all array elements


while ( i-- ) {
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
}

return master.promise();
}
} );

// These usually indicate a programmer mistake during development,


// warn about them ASAP rather than swallowing them by default.
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;

jQuery.Deferred.exceptionHook = function( error, stack ) {

// Support: IE 8 - 9 only
// Console exists when dev tools are open, which can happen at any time
if ( window.console && window.console.warn && error &&
rerrorNames.test( error.name ) ) {
window.console.warn( "jQuery.Deferred exception: " + error.message,
error.stack, stack );
}
};

// The deferred used on DOM ready


var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

readyList.then( fn );

return this;
};

jQuery.extend( {

// Is the DOM ready to be used? Set to true once it occurs.


isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See #6781
readyWait: 1,

// Hold (or release) the ready event


holdReady: function( hold ) {
if ( hold ) {
jQuery.readyWait++;
} else {
jQuery.ready( true );
}
},

// Handle when the DOM is ready


ready: function( wait ) {

// Abort if there are pending holds or we're already ready


if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
return;
}

// Remember that the DOM is ready


jQuery.isReady = true;

// If a normal DOM Ready event fired, decrement, and wait if need be


if ( wait !== true && --jQuery.readyWait > 0 ) {
return;
}

// If there are functions bound, to execute


readyList.resolveWith( document, [ jQuery ] );
}
} );

jQuery.ready.then = readyList.then;

// The ready event handler and self cleanup method


function completed() {
document.removeEventListener( "DOMContentLoaded", completed );
window.removeEventListener( "load", completed );
jQuery.ready();
}

// Catch cases where $(document).ready() is called


// after the browser event has already occurred.
// Support: IE <=9 - 10 only
// Older IE sometimes signals "interactive" too soon
if ( document.readyState === "complete" ||
( document.readyState !== "loading" && !document.documentElement.doScroll ) )
{

// Handle it asynchronously to allow scripts the opportunity to delay ready


window.setTimeout( jQuery.ready );

} else {

// Use the handy event callback


document.addEventListener( "DOMContentLoaded", completed );
// A fallback to window.onload, that will always work
window.addEventListener( "load", completed );
}

// Multifunctional method to get and set values of a collection


// The value/s can optionally be executed if it's a function
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
len = elems.length,
bulk = key == null;

// Sets many values


if ( jQuery.type( key ) === "object" ) {
chainable = true;
for ( i in key ) {
access( elems, fn, i, key[ i ], true, emptyGet, raw );
}

// Sets one value


} else if ( value !== undefined ) {
chainable = true;

if ( !jQuery.isFunction( value ) ) {
raw = true;
}

if ( bulk ) {

// Bulk operations run against the entire set


if ( raw ) {
fn.call( elems, value );
fn = null;

// ...except when executing function values


} else {
bulk = fn;
fn = function( elem, key, value ) {
return bulk.call( jQuery( elem ), value );
};
}
}

if ( fn ) {
for ( ; i < len; i++ ) {
fn(
elems[ i ], key, raw ?
value :
value.call( elems[ i ], i, fn( elems[ i ], key ) )
);
}
}
}

return chainable ?
elems :
// Gets
bulk ?
fn.call( elems ) :
len ? fn( elems[ 0 ], key ) : emptyGet;
};
var acceptData = function( owner ) {

// Accepts only:
// - Node
// - Node.ELEMENT_NODE
// - Node.DOCUMENT_NODE
// - Object
// - Any
/* jshint -W018 */
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};

function Data() {
this.expando = jQuery.expando + Data.uid++;
}

Data.uid = 1;

Data.prototype = {

cache: function( owner ) {

// Check if the owner object already has a cache


var value = owner[ this.expando ];

// If not, create one


if ( !value ) {
value = {};

// We can accept data for non-element nodes in modern browsers,


// but we should not, see #8335.
// Always return an empty object.
if ( acceptData( owner ) ) {

// If it is a node unlikely to be stringify-ed or looped


over
// use plain assignment
if ( owner.nodeType ) {
owner[ this.expando ] = value;

// Otherwise secure it in a non-enumerable property


// configurable must be true to allow the property to be
// deleted when data is removed
} else {
Object.defineProperty( owner, this.expando, {
value: value,
configurable: true
} );
}
}
}
return value;
},
set: function( owner, data, value ) {
var prop,
cache = this.cache( owner );

// Handle: [ owner, key, value ] args


// Always use camelCase key (gh-2257)
if ( typeof data === "string" ) {
cache[ jQuery.camelCase( data ) ] = value;

// Handle: [ owner, { properties } ] args


} else {

// Copy the properties one-by-one to the cache object


for ( prop in data ) {
cache[ jQuery.camelCase( prop ) ] = data[ prop ];
}
}
return cache;
},
get: function( owner, key ) {
return key === undefined ?
this.cache( owner ) :

// Always use camelCase key (gh-2257)


owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase(
key ) ];
},
access: function( owner, key, value ) {

// In cases where either:


//
// 1. No key was specified
// 2. A string key was specified, but no value provided
//
// Take the "read" path and allow the get method to determine
// which value to return, respectively either:
//
// 1. The entire cache object
// 2. The data stored at the key
//
if ( key === undefined ||
( ( key && typeof key === "string" ) && value === undefined
) ) {

return this.get( owner, key );


}

// When the key is not a string, or both a key and value


// are specified, set or extend (existing objects) with either:
//
// 1. An object of properties
// 2. A key and value
//
this.set( owner, key, value );

// Since the "set" path can have two possible entry points
// return the expected data based on which path was taken[*]
return value !== undefined ? value : key;
},
remove: function( owner, key ) {
var i,
cache = owner[ this.expando ];

if ( cache === undefined ) {


return;
}

if ( key !== undefined ) {

// Support array or space separated string of keys


if ( jQuery.isArray( key ) ) {

// If key is an array of keys...


// We always set camelCase keys, so remove that.
key = key.map( jQuery.camelCase );
} else {
key = jQuery.camelCase( key );

// If a key with the spaces exists, use it.


// Otherwise, create an array by matching non-whitespace
key = key in cache ?
[ key ] :
( key.match( rnotwhite ) || [] );
}

i = key.length;

while ( i-- ) {
delete cache[ key[ i ] ];
}
}

// Remove the expando if there's no more data


if ( key === undefined || jQuery.isEmptyObject( cache ) ) {

// Support: Chrome <=35 - 45


// Webkit & Blink performance suffers when deleting properties
// from DOM nodes, so set to undefined instead
// https://bugs.chromium.org/p/chromium/issues/detail?id=378607
(bug restricted)
if ( owner.nodeType ) {
owner[ this.expando ] = undefined;
} else {
delete owner[ this.expando ];
}
}
},
hasData: function( owner ) {
var cache = owner[ this.expando ];
return cache !== undefined && !jQuery.isEmptyObject( cache );
}
};
var dataPriv = new Data();

var dataUser = new Data();


// Implementation Summary
//
// 1. Enforce API surface and semantic compatibility with 1.9.x branch
// 2. Improve the module's maintainability by reducing the storage
// paths to a single mechanism.
// 3. Use the same single mechanism to support "private" and "user" data.
// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
// 5. Avoid exposing implementation details on user objects (eg. expando
properties)
// 6. Provide a clear path for implementation upgrade to WeakMap in 2014

var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,


rmultiDash = /[A-Z]/g;

function dataAttr( elem, key, data ) {


var name;

// If nothing was found internally, try to fetch any


// data from the HTML5 data-* attribute
if ( data === undefined && elem.nodeType === 1 ) {
name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
data = elem.getAttribute( name );

if ( typeof data === "string" ) {


try {
data = data === "true" ? true :
data === "false" ? false :
data === "null" ? null :

// Only convert to a number if it doesn't change the


string
+data + "" === data ? +data :
rbrace.test( data ) ? JSON.parse( data ) :
data;
} catch ( e ) {}

// Make sure we set the data so it isn't changed later


dataUser.set( elem, key, data );
} else {
data = undefined;
}
}
return data;
}

jQuery.extend( {
hasData: function( elem ) {
return dataUser.hasData( elem ) || dataPriv.hasData( elem );
},

data: function( elem, name, data ) {


return dataUser.access( elem, name, data );
},

removeData: function( elem, name ) {


dataUser.remove( elem, name );
},

// TODO: Now that all calls to _data and _removeData have been replaced
// with direct calls to dataPriv methods, these can be deprecated.
_data: function( elem, name, data ) {
return dataPriv.access( elem, name, data );
},

_removeData: function( elem, name ) {


dataPriv.remove( elem, name );
}
} );

jQuery.fn.extend( {
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;

// Gets all values


if ( key === undefined ) {
if ( this.length ) {
data = dataUser.get( elem );

if ( elem.nodeType === 1 && !dataPriv.get( elem,


"hasDataAttrs" ) ) {
i = attrs.length;
while ( i-- ) {

// Support: IE 11 only
// The attrs elements can be null (#14894)
if ( attrs[ i ] ) {
name = attrs[ i ].name;
if ( name.indexOf( "data-" ) === 0 ) {
name =
jQuery.camelCase( name.slice( 5 ) );
dataAttr( elem, name,
data[ name ] );
}
}
}
dataPriv.set( elem, "hasDataAttrs", true );
}
}

return data;
}

// Sets multiple values


if ( typeof key === "object" ) {
return this.each( function() {
dataUser.set( this, key );
} );
}

return access( this, function( value ) {


var data;

// The calling jQuery object (element matches) is not empty


// (and therefore has an element appears at this[ 0 ]) and the
// `value` parameter was not undefined. An empty jQuery object
// will result in `undefined` for elem = this[ 0 ] which will
// throw an exception if an attempt to read a data cache is made.
if ( elem && value === undefined ) {

// Attempt to get data from the cache


// The key will always be camelCased in Data
data = dataUser.get( elem, key );
if ( data !== undefined ) {
return data;
}

// Attempt to "discover" the data in


// HTML5 custom data-* attrs
data = dataAttr( elem, key );
if ( data !== undefined ) {
return data;
}

// We tried really hard, but the data doesn't exist.


return;
}

// Set the data...


this.each( function() {

// We always store the camelCased key


dataUser.set( this, key, value );
} );
}, null, value, arguments.length > 1, null, true );
},

removeData: function( key ) {


return this.each( function() {
dataUser.remove( this, key );
} );
}
} );

jQuery.extend( {
queue: function( elem, type, data ) {
var queue;

if ( elem ) {
type = ( type || "fx" ) + "queue";
queue = dataPriv.get( elem, type );

// Speed up dequeue by getting out quickly if this is just a


lookup
if ( data ) {
if ( !queue || jQuery.isArray( data ) ) {
queue = dataPriv.access( elem, type,
jQuery.makeArray( data ) );
} else {
queue.push( data );
}
}
return queue || [];
}
},

dequeue: function( elem, type ) {


type = type || "fx";

var queue = jQuery.queue( elem, type ),


startLength = queue.length,
fn = queue.shift(),
hooks = jQuery._queueHooks( elem, type ),
next = function() {
jQuery.dequeue( elem, type );
};

// If the fx queue is dequeued, always remove the progress sentinel


if ( fn === "inprogress" ) {
fn = queue.shift();
startLength--;
}

if ( fn ) {

// Add a progress sentinel to prevent the fx queue from being


// automatically dequeued
if ( type === "fx" ) {
queue.unshift( "inprogress" );
}

// Clear up the last queue stop function


delete hooks.stop;
fn.call( elem, next, hooks );
}

if ( !startLength && hooks ) {


hooks.empty.fire();
}
},

// Not public - generate a queueHooks object, or return the current one


_queueHooks: function( elem, type ) {
var key = type + "queueHooks";
return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
empty: jQuery.Callbacks( "once memory" ).add( function() {
dataPriv.remove( elem, [ type + "queue", key ] );
} )
} );
}
} );

jQuery.fn.extend( {
queue: function( type, data ) {
var setter = 2;

if ( typeof type !== "string" ) {


data = type;
type = "fx";
setter--;
}
if ( arguments.length < setter ) {
return jQuery.queue( this[ 0 ], type );
}

return data === undefined ?


this :
this.each( function() {
var queue = jQuery.queue( this, type, data );

// Ensure a hooks for this queue


jQuery._queueHooks( this, type );

if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {


jQuery.dequeue( this, type );
}
} );
},
dequeue: function( type ) {
return this.each( function() {
jQuery.dequeue( this, type );
} );
},
clearQueue: function( type ) {
return this.queue( type || "fx", [] );
},

// Get a promise resolved when queues of a certain type


// are emptied (fx is the type by default)
promise: function( type, obj ) {
var tmp,
count = 1,
defer = jQuery.Deferred(),
elements = this,
i = this.length,
resolve = function() {
if ( !( --count ) ) {
defer.resolveWith( elements, [ elements ] );
}
};

if ( typeof type !== "string" ) {


obj = type;
type = undefined;
}
type = type || "fx";

while ( i-- ) {
tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
if ( tmp && tmp.empty ) {
count++;
tmp.empty.add( resolve );
}
}
resolve();
return defer.promise( obj );
}
} );
var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );

var cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var isHiddenWithinTree = function( elem, el ) {

// isHiddenWithinTree might be called from jQuery#filter function;


// in that case, element will be second argument
elem = el || elem;

// Inline style trumps all


return elem.style.display === "none" ||
elem.style.display === "" &&

// Otherwise, check computed style


// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so
first confirm that elem is
// in the document.
jQuery.contains( elem.ownerDocument, elem ) &&

jQuery.css( elem, "display" ) === "none";


};

var swap = function( elem, options, callback, args ) {


var ret, name,
old = {};

// Remember the old values, and insert the new ones


for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
}

ret = callback.apply( elem, args || [] );

// Revert the old values


for ( name in options ) {
elem.style[ name ] = old[ name ];
}

return ret;
};

function adjustCSS( elem, prop, valueParts, tween ) {


var adjusted,
scale = 1,
maxIterations = 20,
currentValue = tween ?
function() { return tween.cur(); } :
function() { return jQuery.css( elem, prop, "" ); },
initial = currentValue(),
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? ""
: "px" ),
// Starting value computation is required for potential unit mismatches
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial
) &&
rcssNum.exec( jQuery.css( elem, prop ) );

if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {

// Trust units reported by jQuery.css


unit = unit || initialInUnit[ 3 ];

// Make sure we update the tween properties later on


valueParts = valueParts || [];

// Iteratively approximate from a nonzero starting point


initialInUnit = +initial || 1;

do {

// If previous iteration zeroed out, double until we get


*something*.
// Use string for doubling so we don't accidentally see scale as
unchanged below
scale = scale || ".5";

// Adjust and apply


initialInUnit = initialInUnit / scale;
jQuery.style( elem, prop, initialInUnit + unit );

// Update scale, tolerating zero or NaN from tween.cur()


// Break the loop if scale is unchanged or perfect, or if we've just
had enough.
} while (
scale !== ( scale = currentValue() / initial ) && scale !== 1 &&
--maxIterations
);
}

if ( valueParts ) {
initialInUnit = +initialInUnit || +initial || 0;

// Apply relative offset (+=/-=) if specified


adjusted = valueParts[ 1 ] ?
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
+valueParts[ 2 ];
if ( tween ) {
tween.unit = unit;
tween.start = initialInUnit;
tween.end = adjusted;
}
}
return adjusted;
}

var defaultDisplayMap = {};

function getDefaultDisplay( elem ) {


var temp,
doc = elem.ownerDocument,
nodeName = elem.nodeName,
display = defaultDisplayMap[ nodeName ];

if ( display ) {
return display;
}

temp = doc.body.appendChild( doc.createElement( nodeName ) ),


display = jQuery.css( temp, "display" );

temp.parentNode.removeChild( temp );

if ( display === "none" ) {


display = "block";
}
defaultDisplayMap[ nodeName ] = display;

return display;
}

function showHide( elements, show ) {


var display, elem,
values = [],
index = 0,
length = elements.length;

// Determine new display value for elements that need to change


for ( ; index < length; index++ ) {
elem = elements[ index ];
if ( !elem.style ) {
continue;
}

display = elem.style.display;
if ( show ) {

// Since we force visibility upon cascade-hidden elements, an


immediate (and slow)
// check is required in this first loop unless we have a nonempty
display value (either
// inline or about-to-be-restored)
if ( display === "none" ) {
values[ index ] = dataPriv.get( elem, "display" ) || null;
if ( !values[ index ] ) {
elem.style.display = "";
}
}
if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) {
values[ index ] = getDefaultDisplay( elem );
}
} else {
if ( display !== "none" ) {
values[ index ] = "none";

// Remember what we're overwriting


dataPriv.set( elem, "display", display );
}
}
}

// Set the display of the elements in a second loop to avoid constant reflow
for ( index = 0; index < length; index++ ) {
if ( values[ index ] != null ) {
elements[ index ].style.display = values[ index ];
}
}

return elements;
}

jQuery.fn.extend( {
show: function() {
return showHide( this, true );
},
hide: function() {
return showHide( this );
},
toggle: function( state ) {
if ( typeof state === "boolean" ) {
return state ? this.show() : this.hide();
}

return this.each( function() {


if ( isHiddenWithinTree( this ) ) {
jQuery( this ).show();
} else {
jQuery( this ).hide();
}
} );
}
} );
var rcheckableType = ( /^(?:checkbox|radio)$/i );

var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i );

var rscriptType = ( /^$|\/(?:java|ecma)script/i );

// We have to close these tags to support XHTML (#13200)


var wrapMap = {

// Support: IE <=9 only


option: [ 1, "<select multiple='multiple'>", "</select>" ],

// XHTML parsers do not magically insert elements in the


// same way that tag soup parsers do. So we cannot shorten
// this by omitting <tbody> or other required elements.
thead: [ 1, "<table>", "</table>" ],
col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],

_default: [ 0, "", "" ]


};

// Support: IE <=9 only


wrapMap.optgroup = wrapMap.option;

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;


wrapMap.th = wrapMap.td;

function getAll( context, tag ) {

// Support: IE <=9 - 11 only


// Use typeof to avoid zero-argument method invocation on host objects
(#15151)
var ret = typeof context.getElementsByTagName !== "undefined" ?
context.getElementsByTagName( tag || "*" ) :
typeof context.querySelectorAll !== "undefined" ?
context.querySelectorAll( tag || "*" ) :
[];

return tag === undefined || tag && jQuery.nodeName( context, tag ) ?


jQuery.merge( [ context ], ret ) :
ret;
}

// Mark scripts as having already been evaluated


function setGlobalEval( elems, refElements ) {
var i = 0,
l = elems.length;

for ( ; i < l; i++ ) {


dataPriv.set(
elems[ i ],
"globalEval",
!refElements || dataPriv.get( refElements[ i ], "globalEval" )
);
}
}

var rhtml = /<|&#?\w+;/;

function buildFragment( elems, context, scripts, selection, ignored ) {


var elem, tmp, tag, wrap, contains, j,
fragment = context.createDocumentFragment(),
nodes = [],
i = 0,
l = elems.length;

for ( ; i < l; i++ ) {


elem = elems[ i ];

if ( elem || elem === 0 ) {

// Add nodes directly


if ( jQuery.type( elem ) === "object" ) {

// Support: Android <=4.0 only, PhantomJS 1 only


// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
// Convert non-html into a text node
} else if ( !rhtml.test( elem ) ) {
nodes.push( context.createTextNode( elem ) );

// Convert html into DOM nodes


} else {
tmp = tmp ||
fragment.appendChild( context.createElement( "div" ) );

// Deserialize a standard representation


tag = ( rtagName.exec( elem ) || [ "", "" ] )
[ 1 ].toLowerCase();
wrap = wrapMap[ tag ] || wrapMap._default;
tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) +
wrap[ 2 ];

// Descend through wrappers to the right content


j = wrap[ 0 ];
while ( j-- ) {
tmp = tmp.lastChild;
}

// Support: Android <=4.0 only, PhantomJS 1 only


// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, tmp.childNodes );

// Remember the top-level container


tmp = fragment.firstChild;

// Ensure the created nodes are orphaned (#12392)


tmp.textContent = "";
}
}
}

// Remove wrapper from fragment


fragment.textContent = "";

i = 0;
while ( ( elem = nodes[ i++ ] ) ) {

// Skip elements already in the context collection (trac-4087)


if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
if ( ignored ) {
ignored.push( elem );
}
continue;
}

contains = jQuery.contains( elem.ownerDocument, elem );

// Append to fragment
tmp = getAll( fragment.appendChild( elem ), "script" );

// Preserve script evaluation history


if ( contains ) {
setGlobalEval( tmp );
}
// Capture executables
if ( scripts ) {
j = 0;
while ( ( elem = tmp[ j++ ] ) ) {
if ( rscriptType.test( elem.type || "" ) ) {
scripts.push( elem );
}
}
}
}

return fragment;
}

( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );

// Support: Android 4.0 - 4.3 only


// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );

div.appendChild( input );

// Support: Android <=4.1 only


// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone =
div.cloneNode( true ).cloneNode( true ).lastChild.checked;

// Support: IE <=11 only


// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
} )();
var documentElement = document.documentElement;

var
rkeyEvent = /^key/,
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;

function returnTrue() {
return true;
}

function returnFalse() {
return false;
}

// Support: IE <=9 only


// See #13393 for more info
function safeActiveElement() {
try {
return document.activeElement;
} catch ( err ) { }
}

function on( elem, types, selector, data, fn, one ) {


var origFn, type;

// Types can be a map of types/handlers


if ( typeof types === "object" ) {

// ( types-Object, selector, data )


if ( typeof selector !== "string" ) {

// ( types-Object, data )
data = data || selector;
selector = undefined;
}
for ( type in types ) {
on( elem, type, selector, data, types[ type ], one );
}
return elem;
}

if ( data == null && fn == null ) {

// ( types, fn )
fn = selector;
data = selector = undefined;
} else if ( fn == null ) {
if ( typeof selector === "string" ) {

// ( types, selector, fn )
fn = data;
data = undefined;
} else {

// ( types, data, fn )
fn = data;
data = selector;
selector = undefined;
}
}
if ( fn === false ) {
fn = returnFalse;
} else if ( !fn ) {
return elem;
}

if ( one === 1 ) {
origFn = fn;
fn = function( event ) {

// Can use an empty set, since event contains the info


jQuery().off( event );
return origFn.apply( this, arguments );
};
// Use same guid so caller can remove using origFn
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
}
return elem.each( function() {
jQuery.event.add( this, types, fn, data, selector );
} );
}

/*
* Helper functions for managing events -- not part of the public interface.
* Props to Dean Edwards' addEvent library for many of the ideas.
*/
jQuery.event = {

global: {},

add: function( elem, types, handler, data, selector ) {

var handleObjIn, eventHandle, tmp,


events, t, handleObj,
special, handlers, type, namespaces, origType,
elemData = dataPriv.get( elem );

// Don't attach events to noData or text/comment nodes (but allow plain


objects)
if ( !elemData ) {
return;
}

// Caller can pass in an object of custom data in lieu of the handler


if ( handler.handler ) {
handleObjIn = handler;
handler = handleObjIn.handler;
selector = handleObjIn.selector;
}

// Ensure that invalid selectors throw exceptions at attach time


// Evaluate against documentElement in case elem is a non-element node
(e.g., document)
if ( selector ) {
jQuery.find.matchesSelector( documentElement, selector );
}

// Make sure that the handler has a unique ID, used to find/remove it
later
if ( !handler.guid ) {
handler.guid = jQuery.guid++;
}

// Init the element's event structure and main handler, if this is the
first
if ( !( events = elemData.events ) ) {
events = elemData.events = {};
}
if ( !( eventHandle = elemData.handle ) ) {
eventHandle = elemData.handle = function( e ) {

// Discard the second event of a jQuery.event.trigger() and


// when an event is called after a page has unloaded
return typeof jQuery !== "undefined" &&
jQuery.event.triggered !== e.type ?
jQuery.event.dispatch.apply( elem, arguments ) :
undefined;
};
}

// Handle multiple events separated by a space


types = ( types || "" ).match( rnotwhite ) || [ "" ];
t = types.length;
while ( t-- ) {
tmp = rtypenamespace.exec( types[ t ] ) || [];
type = origType = tmp[ 1 ];
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

// There *must* be a type, no attaching namespace-only handlers


if ( !type ) {
continue;
}

// If event changes its type, use the special event handlers for
the changed type
special = jQuery.event.special[ type ] || {};

// If selector defined, determine special event api type,


otherwise given type
type = ( selector ? special.delegateType : special.bindType ) ||
type;

// Update special based on newly reset type


special = jQuery.event.special[ type ] || {};

// handleObj is passed to all event handlers


handleObj = jQuery.extend( {
type: type,
origType: origType,
data: data,
handler: handler,
guid: handler.guid,
selector: selector,
needsContext: selector &&
jQuery.expr.match.needsContext.test( selector ),
namespace: namespaces.join( "." )
}, handleObjIn );

// Init the event handler queue if we're the first


if ( !( handlers = events[ type ] ) ) {
handlers = events[ type ] = [];
handlers.delegateCount = 0;

// Only use addEventListener if the special events handler


returns false
if ( !special.setup ||
special.setup.call( elem, data, namespaces,
eventHandle ) === false ) {

if ( elem.addEventListener ) {
elem.addEventListener( type, eventHandle );
}
}
}

if ( special.add ) {
special.add.call( elem, handleObj );

if ( !handleObj.handler.guid ) {
handleObj.handler.guid = handler.guid;
}
}

// Add to the element's handler list, delegates in front


if ( selector ) {
handlers.splice( handlers.delegateCount++, 0, handleObj );
} else {
handlers.push( handleObj );
}

// Keep track of which events have ever been used, for event
optimization
jQuery.event.global[ type ] = true;
}

},

// Detach an event or set of events from an element


remove: function( elem, types, handler, selector, mappedTypes ) {

var j, origCount, tmp,


events, t, handleObj,
special, handlers, type, namespaces, origType,
elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );

if ( !elemData || !( events = elemData.events ) ) {


return;
}

// Once for each type.namespace in types; type may be omitted


types = ( types || "" ).match( rnotwhite ) || [ "" ];
t = types.length;
while ( t-- ) {
tmp = rtypenamespace.exec( types[ t ] ) || [];
type = origType = tmp[ 1 ];
namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();

// Unbind all events (on this namespace, if provided) for the


element
if ( !type ) {
for ( type in events ) {
jQuery.event.remove( elem, type + types[ t ],
handler, selector, true );
}
continue;
}

special = jQuery.event.special[ type ] || {};


type = ( selector ? special.delegateType : special.bindType ) ||
type;
handlers = events[ type ] || [];
tmp = tmp[ 2 ] &&
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" )
+ "(\\.|$)" );

// Remove matching events


origCount = j = handlers.length;
while ( j-- ) {
handleObj = handlers[ j ];

if ( ( mappedTypes || origType === handleObj.origType ) &&


( !handler || handler.guid === handleObj.guid ) &&
( !tmp || tmp.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector ||
selector === "**" && handleObj.selector ) ) {
handlers.splice( j, 1 );

if ( handleObj.selector ) {
handlers.delegateCount--;
}
if ( special.remove ) {
special.remove.call( elem, handleObj );
}
}
}

// Remove generic event handler if we removed something and no


more handlers exist
// (avoids potential for endless recursion during removal of
special event handlers)
if ( origCount && !handlers.length ) {
if ( !special.teardown ||
special.teardown.call( elem, namespaces,
elemData.handle ) === false ) {

jQuery.removeEvent( elem, type, elemData.handle );


}

delete events[ type ];


}
}

// Remove data and the expando if it's no longer used


if ( jQuery.isEmptyObject( events ) ) {
dataPriv.remove( elem, "handle events" );
}
},

dispatch: function( nativeEvent ) {

// Make a writable jQuery.Event from the native event object


var event = jQuery.event.fix( nativeEvent );

var i, j, ret, matched, handleObj, handlerQueue,


args = new Array( arguments.length ),
handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ]
|| [],
special = jQuery.event.special[ event.type ] || {};

// Use the fix-ed jQuery.Event rather than the (read-only) native event
args[ 0 ] = event;

for ( i = 1; i < arguments.length; i++ ) {


args[ i ] = arguments[ i ];
}

event.delegateTarget = this;

// Call the preDispatch hook for the mapped type, and let it bail if
desired
if ( special.preDispatch && special.preDispatch.call( this, event ) ===
false ) {
return;
}

// Determine handlers
handlerQueue = jQuery.event.handlers.call( this, event, handlers );

// Run delegates first; they may want to stop propagation beneath us


i = 0;
while ( ( matched = handlerQueue[ i++ ] ) && !
event.isPropagationStopped() ) {
event.currentTarget = matched.elem;

j = 0;
while ( ( handleObj = matched.handlers[ j++ ] ) &&
!event.isImmediatePropagationStopped() ) {

// Triggered event must either 1) have no namespace, or 2)


have namespace(s)
// a subset or equal to those in the bound event (both can
have no namespace).
if ( !event.rnamespace ||
event.rnamespace.test( handleObj.namespace ) ) {

event.handleObj = handleObj;
event.data = handleObj.data;

ret = ( ( jQuery.event.special[ handleObj.origType ]


|| {} ).handle ||
handleObj.handler ).apply( matched.elem,
args );

if ( ret !== undefined ) {


if ( ( event.result = ret ) === false ) {
event.preventDefault();
event.stopPropagation();
}
}
}
}
}

// Call the postDispatch hook for the mapped type


if ( special.postDispatch ) {
special.postDispatch.call( this, event );
}

return event.result;
},

handlers: function( event, handlers ) {


var i, matches, sel, handleObj,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;

// Support: IE <=9
// Find delegate handlers
// Black-hole SVG <use> instance trees (#13180)
//
// Support: Firefox <=42
// Avoid non-left-click in FF but don't block IE radio events (#3861,
gh-2343)
if ( delegateCount && cur.nodeType &&
( event.type !== "click" || isNaN( event.button ) || event.button
< 1 ) ) {

for ( ; cur !== this; cur = cur.parentNode || this ) {

// Don't check non-elements (#13208)


// Don't process clicks on disabled elements (#6911, #8165,
#11382, #11764)
if ( cur.nodeType === 1 && ( cur.disabled !== true ||
event.type !== "click" ) ) {
matches = [];
for ( i = 0; i < delegateCount; i++ ) {
handleObj = handlers[ i ];

// Don't conflict with Object.prototype


properties (#13203)
sel = handleObj.selector + " ";

if ( matches[ sel ] === undefined ) {


matches[ sel ] = handleObj.needsContext ?
jQuery( sel, this ).index( cur ) >
-1 :
jQuery.find( sel, this, null, [ cur
] ).length;
}
if ( matches[ sel ] ) {
matches.push( handleObj );
}
}
if ( matches.length ) {
handlerQueue.push( { elem: cur, handlers:
matches } );
}
}
}
}

// Add the remaining (directly-bound) handlers


if ( delegateCount < handlers.length ) {
handlerQueue.push( { elem: this, handlers:
handlers.slice( delegateCount ) } );
}
return handlerQueue;
},

addProp: function( name, hook ) {


Object.defineProperty( jQuery.Event.prototype, name, {
enumerable: true,
configurable: true,

get: jQuery.isFunction( hook ) ?


function() {
if ( this.originalEvent ) {
return hook( this.originalEvent );
}
} :
function() {
if ( this.originalEvent ) {
return this.originalEvent[ name ];
}
},

set: function( value ) {


Object.defineProperty( this, name, {
enumerable: true,
configurable: true,
writable: true,
value: value
} );
}
} );
},

fix: function( originalEvent ) {


return originalEvent[ jQuery.expando ] ?
originalEvent :
new jQuery.Event( originalEvent );
},

special: {
load: {

// Prevent triggered image.load events from bubbling to


window.load
noBubble: true
},
focus: {

// Fire native event if possible so blur/focus sequence is


correct
trigger: function() {
if ( this !== safeActiveElement() && this.focus ) {
this.focus();
return false;
}
},
delegateType: "focusin"
},
blur: {
trigger: function() {
if ( this === safeActiveElement() && this.blur ) {
this.blur();
return false;
}
},
delegateType: "focusout"
},
click: {

// For checkbox, fire native event so checked state will be right


trigger: function() {
if ( this.type === "checkbox" && this.click &&
jQuery.nodeName( this, "input" ) ) {
this.click();
return false;
}
},

// For cross-browser consistency, don't fire native .click() on


links
_default: function( event ) {
return jQuery.nodeName( event.target, "a" );
}
},

beforeunload: {
postDispatch: function( event ) {

// Support: Firefox 20+


// Firefox doesn't alert if the returnValue field is not
set.
if ( event.result !== undefined && event.originalEvent ) {
event.originalEvent.returnValue = event.result;
}
}
}
}
};

jQuery.removeEvent = function( elem, type, handle ) {

// This "if" is needed for plain objects


if ( elem.removeEventListener ) {
elem.removeEventListener( type, handle );
}
};

jQuery.Event = function( src, props ) {

// Allow instantiation without the 'new' keyword


if ( !( this instanceof jQuery.Event ) ) {
return new jQuery.Event( src, props );
}

// Event object
if ( src && src.type ) {
this.originalEvent = src;
this.type = src.type;

// Events bubbling up the document may have been marked as prevented


// by a handler lower down the tree; reflect the correct value.
this.isDefaultPrevented = src.defaultPrevented ||
src.defaultPrevented === undefined &&

// Support: Android <=2.3 only


src.returnValue === false ?
returnTrue :
returnFalse;

// Create target properties


// Support: Safari <=6 - 7 only
// Target should not be a text node (#504, #13143)
this.target = ( src.target && src.target.nodeType === 3 ) ?
src.target.parentNode :
src.target;

this.currentTarget = src.currentTarget;
this.relatedTarget = src.relatedTarget;

// Event type
} else {
this.type = src;
}

// Put explicitly provided properties onto the event object


if ( props ) {
jQuery.extend( this, props );
}

// Create a timestamp if incoming event doesn't have one


this.timeStamp = src && src.timeStamp || jQuery.now();

// Mark it as fixed
this[ jQuery.expando ] = true;
};

// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language


Binding
// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-
binding.html
jQuery.Event.prototype = {
constructor: jQuery.Event,
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse,
isSimulated: false,

preventDefault: function() {
var e = this.originalEvent;

this.isDefaultPrevented = returnTrue;

if ( e && !this.isSimulated ) {
e.preventDefault();
}
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = returnTrue;

if ( e && !this.isSimulated ) {
e.stopPropagation();
}
},
stopImmediatePropagation: function() {
var e = this.originalEvent;

this.isImmediatePropagationStopped = returnTrue;

if ( e && !this.isSimulated ) {
e.stopImmediatePropagation();
}

this.stopPropagation();
}
};

// Includes all common event props including KeyEvent and MouseEvent specific props
jQuery.each( {
altKey: true,
bubbles: true,
cancelable: true,
changedTouches: true,
ctrlKey: true,
detail: true,
eventPhase: true,
metaKey: true,
pageX: true,
pageY: true,
shiftKey: true,
view: true,
"char": true,
charCode: true,
key: true,
keyCode: true,
button: true,
buttons: true,
clientX: true,
clientY: true,
offsetX: true,
offsetY: true,
pointerId: true,
pointerType: true,
screenX: true,
screenY: true,
targetTouches: true,
toElement: true,
touches: true,

which: function( event ) {


var button = event.button;

// Add which for key events


if ( event.which == null && rkeyEvent.test( event.type ) ) {
return event.charCode != null ? event.charCode : event.keyCode;
}
// Add which for click: 1 === left; 2 === middle; 3 === right
if ( !event.which && button !== undefined &&
rmouseEvent.test( event.type ) ) {
return ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0
) ) );
}

return event.which;
}
}, jQuery.event.addProp );

// Create mouseenter/leave events using mouseover/out and event-time checks


// so that event delegation works in jQuery.
// Do the same for pointerenter/pointerleave and pointerover/pointerout
//
// Support: Safari 7 only
// Safari sends mouseenter too often; see:
// https://bugs.chromium.org/p/chromium/issues/detail?id=470258
// for the description of the bug (it existed in older Chrome versions as well).
jQuery.each( {
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function( orig, fix ) {
jQuery.event.special[ orig ] = {
delegateType: fix,
bindType: fix,

handle: function( event ) {


var ret,
target = this,
related = event.relatedTarget,
handleObj = event.handleObj;

// For mouseenter/leave call the handler if related is outside


the target.
// NB: No relatedTarget if the mouse left/entered the browser
window
if ( !related || ( related !== target && !
jQuery.contains( target, related ) ) ) {
event.type = handleObj.origType;
ret = handleObj.handler.apply( this, arguments );
event.type = fix;
}
return ret;
}
};
} );

jQuery.fn.extend( {

on: function( types, selector, data, fn ) {


return on( this, types, selector, data, fn );
},
one: function( types, selector, data, fn ) {
return on( this, types, selector, data, fn, 1 );
},
off: function( types, selector, fn ) {
var handleObj, type;
if ( types && types.preventDefault && types.handleObj ) {

// ( event ) dispatched jQuery.Event


handleObj = types.handleObj;
jQuery( types.delegateTarget ).off(
handleObj.namespace ?
handleObj.origType + "." + handleObj.namespace :
handleObj.origType,
handleObj.selector,
handleObj.handler
);
return this;
}
if ( typeof types === "object" ) {

// ( types-object [, selector] )
for ( type in types ) {
this.off( type, selector, types[ type ] );
}
return this;
}
if ( selector === false || typeof selector === "function" ) {

// ( types [, fn] )
fn = selector;
selector = undefined;
}
if ( fn === false ) {
fn = returnFalse;
}
return this.each( function() {
jQuery.event.remove( this, types, fn, selector );
} );
}
} );

var
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z]
[^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,

// Support: IE <=10 - 11, Edge 12 - 13


// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
rnoInnerhtml = /<script|<style|<link/i,

// checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
rscriptTypeMasked = /^true\/(.*)/,
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;

function manipulationTarget( elem, content ) {


if ( jQuery.nodeName( elem, "table" ) &&
jQuery.nodeName( content.nodeType !== 11 ? content :
content.firstChild, "tr" ) ) {

return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;


}
return elem;
}

// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
return elem;
}
function restoreScript( elem ) {
var match = rscriptTypeMasked.exec( elem.type );

if ( match ) {
elem.type = match[ 1 ];
} else {
elem.removeAttribute( "type" );
}

return elem;
}

function cloneCopyEvent( src, dest ) {


var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;

if ( dest.nodeType !== 1 ) {
return;
}

// 1. Copy private data: events, handlers, etc.


if ( dataPriv.hasData( src ) ) {
pdataOld = dataPriv.access( src );
pdataCur = dataPriv.set( dest, pdataOld );
events = pdataOld.events;

if ( events ) {
delete pdataCur.handle;
pdataCur.events = {};

for ( type in events ) {


for ( i = 0, l = events[ type ].length; i < l; i++ ) {
jQuery.event.add( dest, type, events[ type ][ i ] );
}
}
}
}

// 2. Copy user data


if ( dataUser.hasData( src ) ) {
udataOld = dataUser.access( src );
udataCur = jQuery.extend( {}, udataOld );

dataUser.set( dest, udataCur );


}
}

// Fix IE bugs, see support tests


function fixInput( src, dest ) {
var nodeName = dest.nodeName.toLowerCase();
// Fails to persist the checked state of a cloned checkbox or radio button.
if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
dest.checked = src.checked;

// Fails to return the selected option to the default selected state when
cloning options
} else if ( nodeName === "input" || nodeName === "textarea" ) {
dest.defaultValue = src.defaultValue;
}
}

function domManip( collection, args, callback, ignored ) {

// Flatten any nested arrays


args = concat.apply( [], args );

var fragment, first, scripts, hasScripts, node, doc,


i = 0,
l = collection.length,
iNoClone = l - 1,
value = args[ 0 ],
isFunction = jQuery.isFunction( value );

// We can't cloneNode fragments that contain checked, in WebKit


if ( isFunction ||
( l > 1 && typeof value === "string" &&
!support.checkClone && rchecked.test( value ) ) ) {
return collection.each( function( index ) {
var self = collection.eq( index );
if ( isFunction ) {
args[ 0 ] = value.call( this, index, self.html() );
}
domManip( self, args, callback, ignored );
} );
}

if ( l ) {
fragment = buildFragment( args, collection[ 0 ].ownerDocument, false,
collection, ignored );
first = fragment.firstChild;

if ( fragment.childNodes.length === 1 ) {
fragment = first;
}

// Require either new content or an interest in ignored elements to


invoke the callback
if ( first || ignored ) {
scripts = jQuery.map( getAll( fragment, "script" ), disableScript
);
hasScripts = scripts.length;

// Use the original fragment for the last item


// instead of the first because it can end up
// being emptied incorrectly in certain situations (#8070).
for ( ; i < l; i++ ) {
node = fragment;

if ( i !== iNoClone ) {
node = jQuery.clone( node, true, true );

// Keep references to cloned scripts for later


restoration
if ( hasScripts ) {

// Support: Android <=4.0 only, PhantomJS 1


only
// push.apply(_, arraylike) throws on ancient
WebKit
jQuery.merge( scripts, getAll( node, "script" )
);
}
}

callback.call( collection[ i ], node, i );


}

if ( hasScripts ) {
doc = scripts[ scripts.length - 1 ].ownerDocument;

// Reenable scripts
jQuery.map( scripts, restoreScript );

// Evaluate executable scripts on first document insertion


for ( i = 0; i < hasScripts; i++ ) {
node = scripts[ i ];
if ( rscriptType.test( node.type || "" ) &&
!dataPriv.access( node, "globalEval" ) &&
jQuery.contains( doc, node ) ) {

if ( node.src ) {

// Optional AJAX dependency, but won't


run scripts if not present
if ( jQuery._evalUrl ) {
jQuery._evalUrl( node.src );
}
} else {

DOMEval( node.textContent.replace( rcleanScript, "" ), doc );


}
}
}
}
}
}

return collection;
}

function remove( elem, selector, keepData ) {


var node,
nodes = selector ? jQuery.filter( selector, elem ) : elem,
i = 0;

for ( ; ( node = nodes[ i ] ) != null; i++ ) {


if ( !keepData && node.nodeType === 1 ) {
jQuery.cleanData( getAll( node ) );
}

if ( node.parentNode ) {
if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
setGlobalEval( getAll( node, "script" ) );
}
node.parentNode.removeChild( node );
}
}

return elem;
}

jQuery.extend( {
htmlPrefilter: function( html ) {
return html.replace( rxhtmlTag, "<$1></$2>" );
},

clone: function( elem, dataAndEvents, deepDataAndEvents ) {


var i, l, srcElements, destElements,
clone = elem.cloneNode( true ),
inPage = jQuery.contains( elem.ownerDocument, elem );

// Fix IE cloning issues


if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType
=== 11 ) &&
!jQuery.isXMLDoc( elem ) ) {

// We eschew Sizzle here for performance reasons:


https://jsperf.com/getall-vs-sizzle/2
destElements = getAll( clone );
srcElements = getAll( elem );

for ( i = 0, l = srcElements.length; i < l; i++ ) {


fixInput( srcElements[ i ], destElements[ i ] );
}
}

// Copy the events from the original to the clone


if ( dataAndEvents ) {
if ( deepDataAndEvents ) {
srcElements = srcElements || getAll( elem );
destElements = destElements || getAll( clone );

for ( i = 0, l = srcElements.length; i < l; i++ ) {


cloneCopyEvent( srcElements[ i ],
destElements[ i ] );
}
} else {
cloneCopyEvent( elem, clone );
}
}

// Preserve script evaluation history


destElements = getAll( clone, "script" );
if ( destElements.length > 0 ) {
setGlobalEval( destElements, !inPage && getAll( elem,
"script" ) );
}
// Return the cloned set
return clone;
},

cleanData: function( elems ) {


var data, elem, type,
special = jQuery.event.special,
i = 0;

for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {


if ( acceptData( elem ) ) {
if ( ( data = elem[ dataPriv.expando ] ) ) {
if ( data.events ) {
for ( type in data.events ) {
if ( special[ type ] ) {
jQuery.event.remove( elem, type );

// This is a shortcut to avoid


jQuery.event.remove's overhead
} else {
jQuery.removeEvent( elem, type,
data.handle );
}
}
}

// Support: Chrome <=35 - 45+


// Assign undefined instead of using delete, see
Data#remove
elem[ dataPriv.expando ] = undefined;
}
if ( elem[ dataUser.expando ] ) {

// Support: Chrome <=35 - 45+


// Assign undefined instead of using delete, see
Data#remove
elem[ dataUser.expando ] = undefined;
}
}
}
}
} );

jQuery.fn.extend( {
detach: function( selector ) {
return remove( this, selector, true );
},

remove: function( selector ) {


return remove( this, selector );
},

text: function( value ) {


return access( this, function( value ) {
return value === undefined ?
jQuery.text( this ) :
this.empty().each( function() {
if ( this.nodeType === 1 || this.nodeType === 11 ||
this.nodeType === 9 ) {
this.textContent = value;
}
} );
}, null, value, arguments.length );
},

append: function() {
return domManip( this, arguments, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType
=== 9 ) {
var target = manipulationTarget( this, elem );
target.appendChild( elem );
}
} );
},

prepend: function() {
return domManip( this, arguments, function( elem ) {
if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType
=== 9 ) {
var target = manipulationTarget( this, elem );
target.insertBefore( elem, target.firstChild );
}
} );
},

before: function() {
return domManip( this, arguments, function( elem ) {
if ( this.parentNode ) {
this.parentNode.insertBefore( elem, this );
}
} );
},

after: function() {
return domManip( this, arguments, function( elem ) {
if ( this.parentNode ) {
this.parentNode.insertBefore( elem, this.nextSibling );
}
} );
},

empty: function() {
var elem,
i = 0;

for ( ; ( elem = this[ i ] ) != null; i++ ) {


if ( elem.nodeType === 1 ) {

// Prevent memory leaks


jQuery.cleanData( getAll( elem, false ) );

// Remove any remaining nodes


elem.textContent = "";
}
}

return this;
},

clone: function( dataAndEvents, deepDataAndEvents ) {


dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents :
deepDataAndEvents;

return this.map( function() {


return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
} );
},

html: function( value ) {


return access( this, function( value ) {
var elem = this[ 0 ] || {},
i = 0,
l = this.length;

if ( value === undefined && elem.nodeType === 1 ) {


return elem.innerHTML;
}

// See if we can take a shortcut and just use innerHTML


if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
!wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )
[ 1 ].toLowerCase() ] ) {

value = jQuery.htmlPrefilter( value );

try {
for ( ; i < l; i++ ) {
elem = this[ i ] || {};

// Remove element nodes and prevent memory


leaks
if ( elem.nodeType === 1 ) {
jQuery.cleanData( getAll( elem,
false ) );
elem.innerHTML = value;
}
}

elem = 0;

// If using innerHTML throws an exception, use the fallback


method
} catch ( e ) {}
}

if ( elem ) {
this.empty().append( value );
}
}, null, value, arguments.length );
},

replaceWith: function() {
var ignored = [];

// Make the changes, replacing each non-ignored context element with


the new content
return domManip( this, arguments, function( elem ) {
var parent = this.parentNode;

if ( jQuery.inArray( this, ignored ) < 0 ) {


jQuery.cleanData( getAll( this ) );
if ( parent ) {
parent.replaceChild( elem, this );
}
}

// Force callback invocation


}, ignored );
}
} );

jQuery.each( {
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function( name, original ) {
jQuery.fn[ name ] = function( selector ) {
var elems,
ret = [],
insert = jQuery( selector ),
last = insert.length - 1,
i = 0;

for ( ; i <= last; i++ ) {


elems = i === last ? this : this.clone( true );
jQuery( insert[ i ] )[ original ]( elems );

// Support: Android <=4.0 only, PhantomJS 1 only


// .get() because push.apply(_, arraylike) throws on ancient
WebKit
push.apply( ret, elems.get() );
}

return this.pushStack( ret );


};
} );
var rmargin = ( /^margin/ );

var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var getStyles = function( elem ) {

// Support: IE <=11 only, Firefox <=30 (#15098, #14150)


// IE throws on elements created in popups
// FF meanwhile throws on frame elements through
"defaultView.getComputedStyle"
var view = elem.ownerDocument.defaultView;

if ( !view || !view.opener ) {
view = window;
}
return view.getComputedStyle( elem );
};

( function() {

// Executing both pixelPosition & boxSizingReliable tests require only one


layout
// so they're executed at the same time to save the second computation.
function computeStyleTests() {

// This is a singleton, we need to execute it only once


if ( !div ) {
return;
}

div.style.cssText =
"box-sizing:border-box;" +
"position:relative;display:block;" +
"margin:auto;border:1px;padding:1px;" +
"top:1%;width:50%";
div.innerHTML = "";
documentElement.appendChild( container );

var divStyle = window.getComputedStyle( div );


pixelPositionVal = divStyle.top !== "1%";

// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44


reliableMarginLeftVal = divStyle.marginLeft === "2px";
boxSizingReliableVal = divStyle.width === "4px";

// Support: Android 4.0 - 4.3 only


// Some styles come back with percentage values, even though they
shouldn't
div.style.marginRight = "50%";
pixelMarginRightVal = divStyle.marginRight === "4px";

documentElement.removeChild( container );

// Nullify the div so it wouldn't be stored in the memory and


// it will also be a sign that checks already performed
div = null;
}

var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal,


reliableMarginLeftVal,
container = document.createElement( "div" ),
div = document.createElement( "div" );

// Finish early in limited (non-browser) environments


if ( !div.style ) {
return;
}

// Support: IE <=9 - 11 only


// Style of cloned element affects source element cloned (#8908)
div.style.backgroundClip = "content-box";
div.cloneNode( true ).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";

container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
"padding:0;margin-top:1px;position:absolute";
container.appendChild( div );

jQuery.extend( support, {
pixelPosition: function() {
computeStyleTests();
return pixelPositionVal;
},
boxSizingReliable: function() {
computeStyleTests();
return boxSizingReliableVal;
},
pixelMarginRight: function() {
computeStyleTests();
return pixelMarginRightVal;
},
reliableMarginLeft: function() {
computeStyleTests();
return reliableMarginLeftVal;
}
} );
} )();

function curCSS( elem, name, computed ) {


var width, minWidth, maxWidth, ret,
style = elem.style;

computed = computed || getStyles( elem );

// Support: IE <=9 only


// getPropertyValue is only needed for .css('filter') (#12537)
if ( computed ) {
ret = computed.getPropertyValue( name ) || computed[ name ];

if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {


ret = jQuery.style( elem, name );
}

// A tribute to the "awesome hack by Dean Edwards"


// Android Browser returns percentage for some values,
// but width seems to be reliably pixels.
// This is against the CSSOM draft spec:
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) &&
rmargin.test( name ) ) {

// Remember the original values


width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;

// Put in the new values to get a computed value out


style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
// Revert the changed values
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}

return ret !== undefined ?

// Support: IE <=9 - 11 only


// IE returns zIndex value as an integer.
ret + "" :
ret;
}

function addGetHookIf( conditionFn, hookFn ) {

// Define the hook, we'll check on the first run if it's really needed.
return {
get: function() {
if ( conditionFn() ) {

// Hook not needed (or it's not possible to use it due


// to missing dependency), remove it.
delete this.get;
return;
}

// Hook needed; redefine it so that the support test is not


executed again.
return ( this.get = hookFn ).apply( this, arguments );
}
};
}

var

// Swappable if display is none or starts with table


// except "table", "table-cell", or "table-caption"
// See here for display values: https://developer.mozilla.org/en-
US/docs/CSS/display
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
cssNormalTransform = {
letterSpacing: "0",
fontWeight: "400"
},

cssPrefixes = [ "Webkit", "Moz", "ms" ],


emptyStyle = document.createElement( "div" ).style;

// Return a css property mapped to a potentially vendor prefixed property


function vendorPropName( name ) {

// Shortcut for names that are not vendor prefixed


if ( name in emptyStyle ) {
return name;
}

// Check for vendor prefixed names


var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
i = cssPrefixes.length;

while ( i-- ) {
name = cssPrefixes[ i ] + capName;
if ( name in emptyStyle ) {
return name;
}
}
}

function setPositiveNumber( elem, value, subtract ) {

// Any relative (+/-) values have already been


// normalized at this point
var matches = rcssNum.exec( value );
return matches ?

// Guard against undefined "subtract", e.g., when used as in cssHooks


Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] ||
"px" ) :
value;
}

function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {


var i = extra === ( isBorderBox ? "border" : "content" ) ?

// If we already have the right measurement, avoid augmentation


4 :

// Otherwise initialize for horizontal or vertical properties


name === "width" ? 1 : 0,

val = 0;

for ( ; i < 4; i += 2 ) {

// Both box models exclude margin, so add it if we want it


if ( extra === "margin" ) {
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
}

if ( isBorderBox ) {

// border-box includes padding, so remove it if we want content


if ( extra === "content" ) {
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true,
styles );
}

// At this point, extra isn't border nor margin, so remove border


if ( extra !== "margin" ) {
val -= jQuery.css( elem, "border" + cssExpand[ i ] +
"Width", true, styles );
}
} else {
// At this point, extra isn't content, so add padding
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles
);

// At this point, extra isn't content nor padding, so add border


if ( extra !== "padding" ) {
val += jQuery.css( elem, "border" + cssExpand[ i ] +
"Width", true, styles );
}
}
}

return val;
}

function getWidthOrHeight( elem, name, extra ) {

// Start with offset property, which is equivalent to the border-box value


var val,
valueIsBorderBox = true,
styles = getStyles( elem ),
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) ===
"border-box";

// Support: IE <=11 only


// Running getBoundingClientRect on a disconnected node
// in IE throws an error.
if ( elem.getClientRects().length ) {
val = elem.getBoundingClientRect()[ name ];
}

// Some non-html elements return undefined for offsetWidth, so check for


null/undefined
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
if ( val <= 0 || val == null ) {

// Fall back to computed then uncomputed css if necessary


val = curCSS( elem, name, styles );
if ( val < 0 || val == null ) {
val = elem.style[ name ];
}

// Computed unit is not pixels. Stop here and return.


if ( rnumnonpx.test( val ) ) {
return val;
}

// Check for style in case a browser which returns unreliable values


// for getComputedStyle silently falls back to the reliable elem.style
valueIsBorderBox = isBorderBox &&
( support.boxSizingReliable() || val === elem.style[ name ] );

// Normalize "", auto, and prepare for extra


val = parseFloat( val ) || 0;
}

// Use the active box-sizing model to add/subtract irrelevant styles


return ( val +
augmentWidthOrHeight(
elem,
name,
extra || ( isBorderBox ? "border" : "content" ),
valueIsBorderBox,
styles
)
) + "px";
}

jQuery.extend( {

// Add in style property hooks for overriding the default


// behavior of getting and setting a style property
cssHooks: {
opacity: {
get: function( elem, computed ) {
if ( computed ) {

// We should always get a number back from opacity


var ret = curCSS( elem, "opacity" );
return ret === "" ? "1" : ret;
}
}
}
},

// Don't automatically add "px" to these possibly-unitless properties


cssNumber: {
"animationIterationCount": true,
"columnCount": true,
"fillOpacity": true,
"flexGrow": true,
"flexShrink": true,
"fontWeight": true,
"lineHeight": true,
"opacity": true,
"order": true,
"orphans": true,
"widows": true,
"zIndex": true,
"zoom": true
},

// Add in properties whose names you wish to fix before


// setting or getting the value
cssProps: {
"float": "cssFloat"
},

// Get and set the style property on a DOM Node


style: function( elem, name, value, extra ) {

// Don't set styles on text and comment nodes


if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style
) {
return;
}
// Make sure that we're working with the right name
var ret, type, hooks,
origName = jQuery.camelCase( name ),
style = elem.style;

name = jQuery.cssProps[ origName ] ||


( jQuery.cssProps[ origName ] = vendorPropName( origName ) ||
origName );

// Gets hook for the prefixed version, then unprefixed version


hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

// Check if we're setting a value


if ( value !== undefined ) {
type = typeof value;

// Convert "+=" or "-=" to relative numbers (#7345)


if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[
1 ] ) {
value = adjustCSS( elem, name, ret );

// Fixes bug #9237


type = "number";
}

// Make sure that null and NaN values aren't set (#7116)
if ( value == null || value !== value ) {
return;
}

// If a number was passed in, add the unit (except for certain
CSS properties)
if ( type === "number" ) {
value += ret && ret[ 3 ] ||
( jQuery.cssNumber[ origName ] ? "" : "px" );
}

// background-* props affect original clone's values


if ( !support.clearCloneStyle && value === "" &&
name.indexOf( "background" ) === 0 ) {
style[ name ] = "inherit";
}

// If a hook was provided, use that value, otherwise just set the
specified value
if ( !hooks || !( "set" in hooks ) ||
( value = hooks.set( elem, value, extra ) ) !== undefined )
{

style[ name ] = value;


}

} else {

// If a hook was provided get the non-computed value from there


if ( hooks && "get" in hooks &&
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
return ret;
}

// Otherwise just get the value from the style object


return style[ name ];
}
},

css: function( elem, name, extra, styles ) {


var val, num, hooks,
origName = jQuery.camelCase( name );

// Make sure that we're working with the right name


name = jQuery.cssProps[ origName ] ||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) ||
origName );

// Try prefixed name followed by the unprefixed name


hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

// If a hook was provided get the computed value from there


if ( hooks && "get" in hooks ) {
val = hooks.get( elem, true, extra );
}

// Otherwise, if a way to get the computed value exists, use that


if ( val === undefined ) {
val = curCSS( elem, name, styles );
}

// Convert "normal" to computed value


if ( val === "normal" && name in cssNormalTransform ) {
val = cssNormalTransform[ name ];
}

// Make numeric if forced or a qualifier was provided and val looks


numeric
if ( extra === "" || extra ) {
num = parseFloat( val );
return extra === true || isFinite( num ) ? num || 0 : val;
}
return val;
}
} );

jQuery.each( [ "height", "width" ], function( i, name ) {


jQuery.cssHooks[ name ] = {
get: function( elem, computed, extra ) {
if ( computed ) {

// Certain elements can have dimension info if we invisibly


show them
// but it must have a current display style that would
benefit
return rdisplayswap.test( jQuery.css( elem, "display" ) )
&&

// Support: Safari 8+
// Table columns in Safari have non-zero offsetWidth
& zero
// getBoundingClientRect().width unless display is
changed.
// Support: IE <=11 only
// Running getBoundingClientRect on a disconnected
node
// in IE throws an error.
( !elem.getClientRects().length || !
elem.getBoundingClientRect().width ) ?
swap( elem, cssShow, function() {
return getWidthOrHeight( elem, name,
extra );
} ) :
getWidthOrHeight( elem, name, extra );
}
},

set: function( elem, value, extra ) {


var matches,
styles = extra && getStyles( elem ),
subtract = extra && augmentWidthOrHeight(
elem,
name,
extra,
jQuery.css( elem, "boxSizing", false, styles ) ===
"border-box",
styles
);

// Convert to pixels if value adjustment is needed


if ( subtract && ( matches = rcssNum.exec( value ) ) &&
( matches[ 3 ] || "px" ) !== "px" ) {

elem.style[ name ] = value;


value = jQuery.css( elem, name );
}

return setPositiveNumber( elem, value, subtract );


}
};
} );

jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,


function( elem, computed ) {
if ( computed ) {
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
elem.getBoundingClientRect().left -
swap( elem, { marginLeft: 0 }, function() {
return elem.getBoundingClientRect().left;
} )
) + "px";
}
}
);

// These hooks are used by animate to expand properties


jQuery.each( {
margin: "",
padding: "",
border: "Width"
}, function( prefix, suffix ) {
jQuery.cssHooks[ prefix + suffix ] = {
expand: function( value ) {
var i = 0,
expanded = {},

// Assumes a single number if not a string


parts = typeof value === "string" ? value.split( " " ) :
[ value ];

for ( ; i < 4; i++ ) {


expanded[ prefix + cssExpand[ i ] + suffix ] =
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
}

return expanded;
}
};

if ( !rmargin.test( prefix ) ) {
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
}
} );

jQuery.fn.extend( {
css: function( name, value ) {
return access( this, function( elem, name, value ) {
var styles, len,
map = {},
i = 0;

if ( jQuery.isArray( name ) ) {
styles = getStyles( elem );
len = name.length;

for ( ; i < len; i++ ) {


map[ name[ i ] ] = jQuery.css( elem, name[ i ],
false, styles );
}

return map;
}

return value !== undefined ?


jQuery.style( elem, name, value ) :
jQuery.css( elem, name );
}, name, value, arguments.length > 1 );
}
} );

function Tween( elem, options, prop, end, easing ) {


return new Tween.prototype.init( elem, options, prop, end, easing );
}
jQuery.Tween = Tween;

Tween.prototype = {
constructor: Tween,
init: function( elem, options, prop, end, easing, unit ) {
this.elem = elem;
this.prop = prop;
this.easing = easing || jQuery.easing._default;
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
},
cur: function() {
var hooks = Tween.propHooks[ this.prop ];

return hooks && hooks.get ?


hooks.get( this ) :
Tween.propHooks._default.get( this );
},
run: function( percent ) {
var eased,
hooks = Tween.propHooks[ this.prop ];

if ( this.options.duration ) {
this.pos = eased = jQuery.easing[ this.easing ](
percent, this.options.duration * percent, 0, 1,
this.options.duration
);
} else {
this.pos = eased = percent;
}
this.now = ( this.end - this.start ) * eased + this.start;

if ( this.options.step ) {
this.options.step.call( this.elem, this.now, this );
}

if ( hooks && hooks.set ) {


hooks.set( this );
} else {
Tween.propHooks._default.set( this );
}
return this;
}
};

Tween.prototype.init.prototype = Tween.prototype;

Tween.propHooks = {
_default: {
get: function( tween ) {
var result;

// Use a property on the element directly when it is not a DOM


element,
// or when there is no matching style property that exists.
if ( tween.elem.nodeType !== 1 ||
tween.elem[ tween.prop ] != null &&
tween.elem.style[ tween.prop ] == null ) {
return tween.elem[ tween.prop ];
}
// Passing an empty string as a 3rd parameter to .css will
automatically
// attempt a parseFloat and fallback to a string if the parse
fails.
// Simple values such as "10px" are parsed to Float;
// complex values such as "rotate(1rad)" are returned as-is.
result = jQuery.css( tween.elem, tween.prop, "" );

// Empty strings, null, undefined and "auto" are converted to 0.


return !result || result === "auto" ? 0 : result;
},
set: function( tween ) {

// Use step hook for back compat.


// Use cssHook if its there.
// Use .style if available and use plain properties where
available.
if ( jQuery.fx.step[ tween.prop ] ) {
jQuery.fx.step[ tween.prop ]( tween );
} else if ( tween.elem.nodeType === 1 &&
( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null
||
jQuery.cssHooks[ tween.prop ] ) ) {
jQuery.style( tween.elem, tween.prop, tween.now +
tween.unit );
} else {
tween.elem[ tween.prop ] = tween.now;
}
}
}
};

// Support: IE <=9 only


// Panic based approach to setting things on disconnected nodes
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function( tween ) {
if ( tween.elem.nodeType && tween.elem.parentNode ) {
tween.elem[ tween.prop ] = tween.now;
}
}
};

jQuery.easing = {
linear: function( p ) {
return p;
},
swing: function( p ) {
return 0.5 - Math.cos( p * Math.PI ) / 2;
},
_default: "swing"
};

jQuery.fx = Tween.prototype.init;

// Back compat <1.8 extension point


jQuery.fx.step = {};
var
fxNow, timerId,
rfxtypes = /^(?:toggle|show|hide)$/,
rrun = /queueHooks$/;

function raf() {
if ( timerId ) {
window.requestAnimationFrame( raf );
jQuery.fx.tick();
}
}

// Animations created synchronously will run synchronously


function createFxNow() {
window.setTimeout( function() {
fxNow = undefined;
} );
return ( fxNow = jQuery.now() );
}

// Generate parameters to create a standard animation


function genFx( type, includeWidth ) {
var which,
i = 0,
attrs = { height: type };

// If we include width, step value is 1 to do all cssExpand values,


// otherwise step value is 2 to skip over Left and Right
includeWidth = includeWidth ? 1 : 0;
for ( ; i < 4 ; i += 2 - includeWidth ) {
which = cssExpand[ i ];
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
}

if ( includeWidth ) {
attrs.opacity = attrs.width = type;
}

return attrs;
}

function createTween( value, prop, animation ) {


var tween,
collection = ( Animation.tweeners[ prop ] ||
[] ).concat( Animation.tweeners[ "*" ] ),
index = 0,
length = collection.length;
for ( ; index < length; index++ ) {
if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {

// We're done with this property


return tween;
}
}
}

function defaultPrefilter( elem, props, opts ) {


/* jshint validthis: true */
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
orig = {},
style = elem.style,
hidden = elem.nodeType && isHiddenWithinTree( elem ),
dataShow = dataPriv.get( elem, "fxshow" );

// Queue-skipping animations hijack the fx hooks


if ( !opts.queue ) {
hooks = jQuery._queueHooks( elem, "fx" );
if ( hooks.unqueued == null ) {
hooks.unqueued = 0;
oldfire = hooks.empty.fire;
hooks.empty.fire = function() {
if ( !hooks.unqueued ) {
oldfire();
}
};
}
hooks.unqueued++;

anim.always( function() {

// Ensure the complete handler is called before this completes


anim.always( function() {
hooks.unqueued--;
if ( !jQuery.queue( elem, "fx" ).length ) {
hooks.empty.fire();
}
} );
} );
}

// Detect show/hide animations


for ( prop in props ) {
value = props[ prop ];
if ( rfxtypes.test( value ) ) {
delete props[ prop ];
toggle = toggle || value === "toggle";
if ( value === ( hidden ? "hide" : "show" ) ) {

// Pretend to be hidden if this is a "show" and


// there is still data from a stopped show/hide
if ( value === "show" && dataShow && dataShow[ prop ] !==
undefined ) {
hidden = true;

// Ignore all other no-op show/hide data


} else {
continue;
}
}
orig[ prop ] = dataShow && dataShow[ prop ] ||
jQuery.style( elem, prop );
}
}

// Bail out if this is a no-op like .hide().hide()


propTween = !jQuery.isEmptyObject( props );
if ( !propTween && jQuery.isEmptyObject( orig ) ) {
return;
}

// Restrict "overflow" and "display" styles during box animations


if ( isBox && elem.nodeType === 1 ) {

// Support: IE <=9 - 11, Edge 12 - 13


// Record all 3 overflow attributes because IE does not infer the
shorthand
// from identically-valued overflowX and overflowY
opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

// Identify a display type, preferring old show/hide data over the CSS
cascade
restoreDisplay = dataShow && dataShow.display;
if ( restoreDisplay == null ) {
restoreDisplay = dataPriv.get( elem, "display" );
}
display = jQuery.css( elem, "display" );
if ( display === "none" ) {
if ( restoreDisplay ) {
display = restoreDisplay;
} else {

// Get nonempty value(s) by temporarily forcing visibility


showHide( [ elem ], true );
restoreDisplay = elem.style.display || restoreDisplay;
display = jQuery.css( elem, "display" );
showHide( [ elem ] );
}
}

// Animate inline elements as inline-block


if ( display === "inline" || display === "inline-block" &&
restoreDisplay != null ) {
if ( jQuery.css( elem, "float" ) === "none" ) {

// Restore the original display value at the end of pure


show/hide animations
if ( !propTween ) {
anim.done( function() {
style.display = restoreDisplay;
} );
if ( restoreDisplay == null ) {
display = style.display;
restoreDisplay = display === "none" ? "" :
display;
}
}
style.display = "inline-block";
}
}
}

if ( opts.overflow ) {
style.overflow = "hidden";
anim.always( function() {
style.overflow = opts.overflow[ 0 ];
style.overflowX = opts.overflow[ 1 ];
style.overflowY = opts.overflow[ 2 ];
} );
}

// Implement show/hide animations


propTween = false;
for ( prop in orig ) {

// General show/hide setup for this element animation


if ( !propTween ) {
if ( dataShow ) {
if ( "hidden" in dataShow ) {
hidden = dataShow.hidden;
}
} else {
dataShow = dataPriv.access( elem, "fxshow", { display:
restoreDisplay } );
}

// Store hidden/visible for toggle so `.stop().toggle()`


"reverses"
if ( toggle ) {
dataShow.hidden = !hidden;
}

// Show elements before animating them


if ( hidden ) {
showHide( [ elem ], true );
}

/* jshint -W083 */
anim.done( function() {

// The final step of a "hide" animation is actually hiding


the element
if ( !hidden ) {
showHide( [ elem ] );
}
dataPriv.remove( elem, "fxshow" );
for ( prop in orig ) {
jQuery.style( elem, prop, orig[ prop ] );
}
} );
}

// Per-property setup
propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
if ( !( prop in dataShow ) ) {
dataShow[ prop ] = propTween.start;
if ( hidden ) {
propTween.end = propTween.start;
propTween.start = 0;
}
}
}
}
function propFilter( props, specialEasing ) {
var index, name, easing, value, hooks;

// camelCase, specialEasing and expand cssHook pass


for ( index in props ) {
name = jQuery.camelCase( index );
easing = specialEasing[ name ];
value = props[ index ];
if ( jQuery.isArray( value ) ) {
easing = value[ 1 ];
value = props[ index ] = value[ 0 ];
}

if ( index !== name ) {


props[ name ] = value;
delete props[ index ];
}

hooks = jQuery.cssHooks[ name ];


if ( hooks && "expand" in hooks ) {
value = hooks.expand( value );
delete props[ name ];

// Not quite $.extend, this won't overwrite existing keys.


// Reusing 'index' because we have the correct "name"
for ( index in value ) {
if ( !( index in props ) ) {
props[ index ] = value[ index ];
specialEasing[ index ] = easing;
}
}
} else {
specialEasing[ name ] = easing;
}
}
}

function Animation( elem, properties, options ) {


var result,
stopped,
index = 0,
length = Animation.prefilters.length,
deferred = jQuery.Deferred().always( function() {

// Don't match elem in the :animated selector


delete tick.elem;
} ),
tick = function() {
if ( stopped ) {
return false;
}
var currentTime = fxNow || createFxNow(),
remaining = Math.max( 0, animation.startTime +
animation.duration - currentTime ),

// Support: Android 2.3 only


// Archaic crash bug won't allow us to use `1 - ( 0.5 ||
0 )` (#12497)
temp = remaining / animation.duration || 0,
percent = 1 - temp,
index = 0,
length = animation.tweens.length;

for ( ; index < length ; index++ ) {


animation.tweens[ index ].run( percent );
}

deferred.notifyWith( elem, [ animation, percent, remaining ] );

if ( percent < 1 && length ) {


return remaining;
} else {
deferred.resolveWith( elem, [ animation ] );
return false;
}
},
animation = deferred.promise( {
elem: elem,
props: jQuery.extend( {}, properties ),
opts: jQuery.extend( true, {
specialEasing: {},
easing: jQuery.easing._default
}, options ),
originalProperties: properties,
originalOptions: options,
startTime: fxNow || createFxNow(),
duration: options.duration,
tweens: [],
createTween: function( prop, end ) {
var tween = jQuery.Tween( elem, animation.opts, prop, end,
animation.opts.specialEasing[ prop ] ||
animation.opts.easing );
animation.tweens.push( tween );
return tween;
},
stop: function( gotoEnd ) {
var index = 0,

// If we are going to the end, we want to run all the


tweens
// otherwise we skip this part
length = gotoEnd ? animation.tweens.length : 0;
if ( stopped ) {
return this;
}
stopped = true;
for ( ; index < length ; index++ ) {
animation.tweens[ index ].run( 1 );
}

// Resolve when we played the last frame; otherwise, reject


if ( gotoEnd ) {
deferred.notifyWith( elem, [ animation, 1, 0 ] );
deferred.resolveWith( elem, [ animation, gotoEnd ] );
} else {
deferred.rejectWith( elem, [ animation, gotoEnd ] );
}
return this;
}
} ),
props = animation.props;

propFilter( props, animation.opts.specialEasing );

for ( ; index < length ; index++ ) {


result = Animation.prefilters[ index ].call( animation, elem, props,
animation.opts );
if ( result ) {
if ( jQuery.isFunction( result.stop ) ) {
jQuery._queueHooks( animation.elem,
animation.opts.queue ).stop =
jQuery.proxy( result.stop, result );
}
return result;
}
}

jQuery.map( props, createTween, animation );

if ( jQuery.isFunction( animation.opts.start ) ) {
animation.opts.start.call( elem, animation );
}

jQuery.fx.timer(
jQuery.extend( tick, {
elem: elem,
anim: animation,
queue: animation.opts.queue
} )
);

// attach callbacks from options


return animation.progress( animation.opts.progress )
.done( animation.opts.done, animation.opts.complete )
.fail( animation.opts.fail )
.always( animation.opts.always );
}

jQuery.Animation = jQuery.extend( Animation, {

tweeners: {
"*": [ function( prop, value ) {
var tween = this.createTween( prop, value );
adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
return tween;
} ]
},

tweener: function( props, callback ) {


if ( jQuery.isFunction( props ) ) {
callback = props;
props = [ "*" ];
} else {
props = props.match( rnotwhite );
}

var prop,
index = 0,
length = props.length;

for ( ; index < length ; index++ ) {


prop = props[ index ];
Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
Animation.tweeners[ prop ].unshift( callback );
}
},

prefilters: [ defaultPrefilter ],

prefilter: function( callback, prepend ) {


if ( prepend ) {
Animation.prefilters.unshift( callback );
} else {
Animation.prefilters.push( callback );
}
}
} );

jQuery.speed = function( speed, easing, fn ) {


var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
complete: fn || !fn && easing ||
jQuery.isFunction( speed ) && speed,
duration: speed,
easing: fn && easing || easing && !jQuery.isFunction( easing ) &&
easing
};

// Go to the end state if fx are off or if document is hidden


if ( jQuery.fx.off || document.hidden ) {
opt.duration = 0;

} else {
opt.duration = typeof opt.duration === "number" ?
opt.duration : opt.duration in jQuery.fx.speeds ?
jQuery.fx.speeds[ opt.duration ] :
jQuery.fx.speeds._default;
}

// Normalize opt.queue - true/undefined/null -> "fx"


if ( opt.queue == null || opt.queue === true ) {
opt.queue = "fx";
}

// Queueing
opt.old = opt.complete;

opt.complete = function() {
if ( jQuery.isFunction( opt.old ) ) {
opt.old.call( this );
}

if ( opt.queue ) {
jQuery.dequeue( this, opt.queue );
}
};
return opt;
};

jQuery.fn.extend( {
fadeTo: function( speed, to, easing, callback ) {

// Show any hidden elements after setting opacity to 0


return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show()

// Animate to the value specified


.end().animate( { opacity: to }, speed, easing, callback );
},
animate: function( prop, speed, easing, callback ) {
var empty = jQuery.isEmptyObject( prop ),
optall = jQuery.speed( speed, easing, callback ),
doAnimation = function() {

// Operate on a copy of prop so per-property easing won't


be lost
var anim = Animation( this, jQuery.extend( {}, prop ),
optall );

// Empty animations, or finishing resolves immediately


if ( empty || dataPriv.get( this, "finish" ) ) {
anim.stop( true );
}
};
doAnimation.finish = doAnimation;

return empty || optall.queue === false ?


this.each( doAnimation ) :
this.queue( optall.queue, doAnimation );
},
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
};

if ( typeof type !== "string" ) {


gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
}
if ( clearQueue && type !== false ) {
this.queue( type || "fx", [] );
}

return this.each( function() {


var dequeue = true,
index = type != null && type + "queueHooks",
timers = jQuery.timers,
data = dataPriv.get( this );

if ( index ) {
if ( data[ index ] && data[ index ].stop ) {
stopQueue( data[ index ] );
}
} else {
for ( index in data ) {
if ( data[ index ] && data[ index ].stop &&
rrun.test( index ) ) {
stopQueue( data[ index ] );
}
}
}

for ( index = timers.length; index--; ) {


if ( timers[ index ].elem === this &&
( type == null || timers[ index ].queue === type ) )
{

timers[ index ].anim.stop( gotoEnd );


dequeue = false;
timers.splice( index, 1 );
}
}

// Start the next in the queue if the last step wasn't forced.
// Timers currently will call their complete callbacks, which
// will dequeue but only if they were gotoEnd.
if ( dequeue || !gotoEnd ) {
jQuery.dequeue( this, type );
}
} );
},
finish: function( type ) {
if ( type !== false ) {
type = type || "fx";
}
return this.each( function() {
var index,
data = dataPriv.get( this ),
queue = data[ type + "queue" ],
hooks = data[ type + "queueHooks" ],
timers = jQuery.timers,
length = queue ? queue.length : 0;

// Enable finishing flag on private data


data.finish = true;

// Empty the queue first


jQuery.queue( this, type, [] );

if ( hooks && hooks.stop ) {


hooks.stop.call( this, true );
}

// Look for any active animations, and finish them


for ( index = timers.length; index--; ) {
if ( timers[ index ].elem === this && timers[ index ].queue
=== type ) {
timers[ index ].anim.stop( true );
timers.splice( index, 1 );
}
}
// Look for any animations in the old queue and finish them
for ( index = 0; index < length; index++ ) {
if ( queue[ index ] && queue[ index ].finish ) {
queue[ index ].finish.call( this );
}
}

// Turn off finishing flag


delete data.finish;
} );
}
} );

jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {


var cssFn = jQuery.fn[ name ];
jQuery.fn[ name ] = function( speed, easing, callback ) {
return speed == null || typeof speed === "boolean" ?
cssFn.apply( this, arguments ) :
this.animate( genFx( name, true ), speed, easing, callback );
};
} );

// Generate shortcuts for custom animations


jQuery.each( {
slideDown: genFx( "show" ),
slideUp: genFx( "hide" ),
slideToggle: genFx( "toggle" ),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },
fadeToggle: { opacity: "toggle" }
}, function( name, props ) {
jQuery.fn[ name ] = function( speed, easing, callback ) {
return this.animate( props, speed, easing, callback );
};
} );

jQuery.timers = [];
jQuery.fx.tick = function() {
var timer,
i = 0,
timers = jQuery.timers;

fxNow = jQuery.now();

for ( ; i < timers.length; i++ ) {


timer = timers[ i ];

// Checks the timer has not already been removed


if ( !timer() && timers[ i ] === timer ) {
timers.splice( i--, 1 );
}
}

if ( !timers.length ) {
jQuery.fx.stop();
}
fxNow = undefined;
};
jQuery.fx.timer = function( timer ) {
jQuery.timers.push( timer );
if ( timer() ) {
jQuery.fx.start();
} else {
jQuery.timers.pop();
}
};

jQuery.fx.interval = 13;
jQuery.fx.start = function() {
if ( !timerId ) {
timerId = window.requestAnimationFrame ?
window.requestAnimationFrame( raf ) :
window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
}
};

jQuery.fx.stop = function() {
if ( window.cancelAnimationFrame ) {
window.cancelAnimationFrame( timerId );
} else {
window.clearInterval( timerId );
}

timerId = null;
};

jQuery.fx.speeds = {
slow: 600,
fast: 200,

// Default speed
_default: 400
};

// Based off of the plugin by Clint Helfers, with permission.


//
https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/0
7/jquery-delay/
jQuery.fn.delay = function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
type = type || "fx";

return this.queue( type, function( next, hooks ) {


var timeout = window.setTimeout( next, time );
hooks.stop = function() {
window.clearTimeout( timeout );
};
} );
};

( function() {
var input = document.createElement( "input" ),
select = document.createElement( "select" ),
opt = select.appendChild( document.createElement( "option" ) );
input.type = "checkbox";

// Support: Android <=4.3 only


// Default value for a checkbox should be "on"
support.checkOn = input.value !== "";

// Support: IE <=11 only


// Must access selectedIndex to make default options select
support.optSelected = opt.selected;

// Support: IE <=11 only


// An input loses its value after becoming a radio
input = document.createElement( "input" );
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
} )();

var boolHook,
attrHandle = jQuery.expr.attrHandle;

jQuery.fn.extend( {
attr: function( name, value ) {
return access( this, jQuery.attr, name, value, arguments.length > 1 );
},

removeAttr: function( name ) {


return this.each( function() {
jQuery.removeAttr( this, name );
} );
}
} );

jQuery.extend( {
attr: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;

// Don't get/set attributes on text, comment and attribute nodes


if ( nType === 3 || nType === 8 || nType === 2 ) {
return;
}

// Fallback to prop when attributes are not supported


if ( typeof elem.getAttribute === "undefined" ) {
return jQuery.prop( elem, name, value );
}

// Attribute hooks are determined by the lowercase version


// Grab necessary hook if one is defined
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
( jQuery.expr.match.bool.test( name ) ? boolHook :
undefined );
}

if ( value !== undefined ) {


if ( value === null ) {
jQuery.removeAttr( elem, name );
return;
}

if ( hooks && "set" in hooks &&


( ret = hooks.set( elem, value, name ) ) !== undefined ) {
return ret;
}

elem.setAttribute( name, value + "" );


return value;
}

if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !==
null ) {
return ret;
}

ret = jQuery.find.attr( elem, name );

// Non-existent attributes return null, we normalize to undefined


return ret == null ? undefined : ret;
},

attrHooks: {
type: {
set: function( elem, value ) {
if ( !support.radioValue && value === "radio" &&
jQuery.nodeName( elem, "input" ) ) {
var val = elem.value;
elem.setAttribute( "type", value );
if ( val ) {
elem.value = val;
}
return value;
}
}
}
},

removeAttr: function( elem, value ) {


var name,
i = 0,
attrNames = value && value.match( rnotwhite );

if ( attrNames && elem.nodeType === 1 ) {


while ( ( name = attrNames[ i++ ] ) ) {
elem.removeAttribute( name );
}
}
}
} );

// Hooks for boolean attributes


boolHook = {
set: function( elem, value, name ) {
if ( value === false ) {

// Remove boolean attributes when set to false


jQuery.removeAttr( elem, name );
} else {
elem.setAttribute( name, name );
}
return name;
}
};

jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {


var getter = attrHandle[ name ] || jQuery.find.attr;

attrHandle[ name ] = function( elem, name, isXML ) {


var ret, handle,
lowercaseName = name.toLowerCase();

if ( !isXML ) {

// Avoid an infinite loop by temporarily removing this function


from the getter
handle = attrHandle[ lowercaseName ];
attrHandle[ lowercaseName ] = ret;
ret = getter( elem, name, isXML ) != null ?
lowercaseName :
null;
attrHandle[ lowercaseName ] = handle;
}
return ret;
};
} );

var rfocusable = /^(?:input|select|textarea|button)$/i,


rclickable = /^(?:a|area)$/i;

jQuery.fn.extend( {
prop: function( name, value ) {
return access( this, jQuery.prop, name, value, arguments.length > 1 );
},

removeProp: function( name ) {


return this.each( function() {
delete this[ jQuery.propFix[ name ] || name ];
} );
}
} );

jQuery.extend( {
prop: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;

// Don't get/set properties on text, comment and attribute nodes


if ( nType === 3 || nType === 8 || nType === 2 ) {
return;
}

if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {


// Fix name and attach hooks
name = jQuery.propFix[ name ] || name;
hooks = jQuery.propHooks[ name ];
}

if ( value !== undefined ) {


if ( hooks && "set" in hooks &&
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
return ret;
}

return ( elem[ name ] = value );


}

if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !==
null ) {
return ret;
}

return elem[ name ];


},

propHooks: {
tabIndex: {
get: function( elem ) {

// Support: IE <=9 - 11 only


// elem.tabIndex doesn't always return the
// correct value when it hasn't been explicitly set
//
https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/
getting-setting-and-removing-tabindex-values-with-javascript/
// Use proper attribute retrieval(#12072)
var tabindex = jQuery.find.attr( elem, "tabindex" );

return tabindex ?
parseInt( tabindex, 10 ) :
rfocusable.test( elem.nodeName ) ||
rclickable.test( elem.nodeName ) && elem.href ?
0 :
-1;
}
}
},

propFix: {
"for": "htmlFor",
"class": "className"
}
} );

// Support: IE <=11 only


// Accessing the selectedIndex property
// forces the browser to respect setting selected
// on the option
// The getter ensures a default option is selected
// when in an optgroup
if ( !support.optSelected ) {
jQuery.propHooks.selected = {
get: function( elem ) {
var parent = elem.parentNode;
if ( parent && parent.parentNode ) {
parent.parentNode.selectedIndex;
}
return null;
},
set: function( elem ) {
var parent = elem.parentNode;
if ( parent ) {
parent.selectedIndex;

if ( parent.parentNode ) {
parent.parentNode.selectedIndex;
}
}
}
};
}

jQuery.each( [
"tabIndex",
"readOnly",
"maxLength",
"cellSpacing",
"cellPadding",
"rowSpan",
"colSpan",
"useMap",
"frameBorder",
"contentEditable"
], function() {
jQuery.propFix[ this.toLowerCase() ] = this;
} );

var rclass = /[\t\r\n\f]/g;

function getClass( elem ) {


return elem.getAttribute && elem.getAttribute( "class" ) || "";
}

jQuery.fn.extend( {
addClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;

if ( jQuery.isFunction( value ) ) {
return this.each( function( j ) {
jQuery( this ).addClass( value.call( this, j,
getClass( this ) ) );
} );
}

if ( typeof value === "string" && value ) {


classes = value.match( rnotwhite ) || [];
while ( ( elem = this[ i++ ] ) ) {
curValue = getClass( elem );
cur = elem.nodeType === 1 &&
( " " + curValue + " " ).replace( rclass, " " );

if ( cur ) {
j = 0;
while ( ( clazz = classes[ j++ ] ) ) {
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
cur += clazz + " ";
}
}

// Only assign if different to avoid unneeded


rendering.
finalValue = jQuery.trim( cur );
if ( curValue !== finalValue ) {
elem.setAttribute( "class", finalValue );
}
}
}
}

return this;
},

removeClass: function( value ) {


var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;

if ( jQuery.isFunction( value ) ) {
return this.each( function( j ) {
jQuery( this ).removeClass( value.call( this, j,
getClass( this ) ) );
} );
}

if ( !arguments.length ) {
return this.attr( "class", "" );
}

if ( typeof value === "string" && value ) {


classes = value.match( rnotwhite ) || [];

while ( ( elem = this[ i++ ] ) ) {


curValue = getClass( elem );

// This expression is here for better compressibility (see


addClass)
cur = elem.nodeType === 1 &&
( " " + curValue + " " ).replace( rclass, " " );

if ( cur ) {
j = 0;
while ( ( clazz = classes[ j++ ] ) ) {

// Remove *all* instances


while ( cur.indexOf( " " + clazz + " " ) > -1 )
{
cur = cur.replace( " " + clazz + " ", " "
);
}
}

// Only assign if different to avoid unneeded


rendering.
finalValue = jQuery.trim( cur );
if ( curValue !== finalValue ) {
elem.setAttribute( "class", finalValue );
}
}
}
}

return this;
},

toggleClass: function( value, stateVal ) {


var type = typeof value;

if ( typeof stateVal === "boolean" && type === "string" ) {


return stateVal ? this.addClass( value ) :
this.removeClass( value );
}

if ( jQuery.isFunction( value ) ) {
return this.each( function( i ) {
jQuery( this ).toggleClass(
value.call( this, i, getClass( this ), stateVal ),
stateVal
);
} );
}

return this.each( function() {


var className, i, self, classNames;

if ( type === "string" ) {

// Toggle individual class names


i = 0;
self = jQuery( this );
classNames = value.match( rnotwhite ) || [];

while ( ( className = classNames[ i++ ] ) ) {

// Check each className given, space separated list


if ( self.hasClass( className ) ) {
self.removeClass( className );
} else {
self.addClass( className );
}
}

// Toggle whole class name


} else if ( value === undefined || type === "boolean" ) {
className = getClass( this );
if ( className ) {

// Store className if set


dataPriv.set( this, "__className__", className );
}

// If the element has a class name or if we're passed


`false`,
// then remove the whole classname (if there was one, the
above saved it).
// Otherwise bring back whatever was previously saved (if
anything),
// falling back to the empty string if nothing was stored.
if ( this.setAttribute ) {
this.setAttribute( "class",
className || value === false ?
"" :
dataPriv.get( this, "__className__" ) || ""
);
}
}
} );
},

hasClass: function( selector ) {


var className, elem,
i = 0;

className = " " + selector + " ";


while ( ( elem = this[ i++ ] ) ) {
if ( elem.nodeType === 1 &&
( " " + getClass( elem ) + " " ).replace( rclass, " " )
.indexOf( className ) > -1
) {
return true;
}
}

return false;
}
} );

var rreturn = /\r/g,


rspaces = /[\x20\t\r\n\f]+/g;

jQuery.fn.extend( {
val: function( value ) {
var hooks, ret, isFunction,
elem = this[ 0 ];

if ( !arguments.length ) {
if ( elem ) {
hooks = jQuery.valHooks[ elem.type ] ||
jQuery.valHooks[ elem.nodeName.toLowerCase() ];

if ( hooks &&
"get" in hooks &&
( ret = hooks.get( elem, "value" ) ) !== undefined
) {
return ret;
}

ret = elem.value;

return typeof ret === "string" ?

// Handle most common string cases


ret.replace( rreturn, "" ) :

// Handle cases where value is null/undef or number


ret == null ? "" : ret;
}

return;
}

isFunction = jQuery.isFunction( value );

return this.each( function( i ) {


var val;

if ( this.nodeType !== 1 ) {
return;
}

if ( isFunction ) {
val = value.call( this, i, jQuery( this ).val() );
} else {
val = value;
}

// Treat null/undefined as ""; convert numbers to string


if ( val == null ) {
val = "";

} else if ( typeof val === "number" ) {


val += "";

} else if ( jQuery.isArray( val ) ) {


val = jQuery.map( val, function( value ) {
return value == null ? "" : value + "";
} );
}

hooks = jQuery.valHooks[ this.type ] ||


jQuery.valHooks[ this.nodeName.toLowerCase() ];

// If set returns undefined, fall back to normal setting


if ( !hooks || !( "set" in hooks ) || hooks.set( this, val,
"value" ) === undefined ) {
this.value = val;
}
} );
}
} );
jQuery.extend( {
valHooks: {
option: {
get: function( elem ) {

var val = jQuery.find.attr( elem, "value" );


return val != null ?
val :

// Support: IE <=10 - 11 only


// option.text throws exceptions (#14686, #14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-
whitespace
jQuery.trim( jQuery.text( elem ) ).replace( rspaces,
" " );
}
},
select: {
get: function( elem ) {
var value, option,
options = elem.options,
index = elem.selectedIndex,
one = elem.type === "select-one",
values = one ? null : [],
max = one ? index + 1 : options.length,
i = index < 0 ?
max :
one ? index : 0;

// Loop through all the selected options


for ( ; i < max; i++ ) {
option = options[ i ];

// Support: IE <=9 only


// IE8-9 doesn't update selected after form reset
(#2551)
if ( ( option.selected || i === index ) &&

// Don't return options that are disabled


or in a disabled optgroup
!option.disabled &&
( !option.parentNode.disabled ||
!
jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {

// Get the specific value for the option


value = jQuery( option ).val();

// We don't need an array for one selects


if ( one ) {
return value;
}

// Multi-Selects return an array


values.push( value );
}
}
return values;
},

set: function( elem, value ) {


var optionSet, option,
options = elem.options,
values = jQuery.makeArray( value ),
i = options.length;

while ( i-- ) {
option = options[ i ];
if ( option.selected =

jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1


) {
optionSet = true;
}
}

// Force browsers to behave consistently when non-matching


value is set
if ( !optionSet ) {
elem.selectedIndex = -1;
}
return values;
}
}
}
} );

// Radios and checkboxes getter/setter


jQuery.each( [ "radio", "checkbox" ], function() {
jQuery.valHooks[ this ] = {
set: function( elem, value ) {
if ( jQuery.isArray( value ) ) {
return ( elem.checked =
jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
}
}
};
if ( !support.checkOn ) {
jQuery.valHooks[ this ].get = function( elem ) {
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
};
}
} );

// Return jQuery for attributes-only inclusion

var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;

jQuery.extend( jQuery.event, {

trigger: function( event, data, elem, onlyHandlers ) {


var i, cur, tmp, bubbleType, ontype, handle, special,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
namespaces = hasOwn.call( event, "namespace" ) ?
event.namespace.split( "." ) : [];

cur = tmp = elem = elem || document;

// Don't do events on text and comment nodes


if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
return;
}

// focus/blur morphs to focusin/out; ensure we're not firing them right


now
if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
return;
}

if ( type.indexOf( "." ) > -1 ) {

// Namespaced trigger; create a regexp to match event type in


handle()
namespaces = type.split( "." );
type = namespaces.shift();
namespaces.sort();
}
ontype = type.indexOf( ":" ) < 0 && "on" + type;

// Caller can pass in a jQuery.Event object, Object, or just an event


type string
event = event[ jQuery.expando ] ?
event :
new jQuery.Event( type, typeof event === "object" && event );

// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always
true)
event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join( "." );
event.rnamespace = event.namespace ?
new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) +
"(\\.|$)" ) :
null;

// Clean up the event in case it is being reused


event.result = undefined;
if ( !event.target ) {
event.target = elem;
}

// Clone any incoming data and prepend the event, creating the handler
arg list
data = data == null ?
[ event ] :
jQuery.makeArray( data, [ event ] );

// Allow special events to draw outside the lines


special = jQuery.event.special[ type ] || {};
if ( !onlyHandlers && special.trigger && special.trigger.apply( elem,
data ) === false ) {
return;
}

// Determine event propagation path in advance, per W3C events spec


(#9951)
// Bubble up to document, then to window; watch for a global
ownerDocument var (#9724)
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {

bubbleType = special.delegateType || type;


if ( !rfocusMorph.test( bubbleType + type ) ) {
cur = cur.parentNode;
}
for ( ; cur; cur = cur.parentNode ) {
eventPath.push( cur );
tmp = cur;
}

// Only add window if we got to document (e.g., not plain obj or


detached DOM)
if ( tmp === ( elem.ownerDocument || document ) ) {
eventPath.push( tmp.defaultView || tmp.parentWindow ||
window );
}
}

// Fire handlers on the event path


i = 0;
while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {

event.type = i > 1 ?
bubbleType :
special.bindType || type;

// jQuery handler
handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
dataPriv.get( cur, "handle" );
if ( handle ) {
handle.apply( cur, data );
}

// Native handler
handle = ontype && cur[ ontype ];
if ( handle && handle.apply && acceptData( cur ) ) {
event.result = handle.apply( cur, data );
if ( event.result === false ) {
event.preventDefault();
}
}
}
event.type = type;

// If nobody prevented the default action, do it now


if ( !onlyHandlers && !event.isDefaultPrevented() ) {

if ( ( !special._default ||
special._default.apply( eventPath.pop(), data ) === false )
&&
acceptData( elem ) ) {

// Call a native DOM method on the target with the same


name as the event.
// Don't do default actions on window, that's where global
variables be (#6170)
if ( ontype && jQuery.isFunction( elem[ type ] ) && !
jQuery.isWindow( elem ) ) {

// Don't re-trigger an onFOO event when we call its


FOO() method
tmp = elem[ ontype ];

if ( tmp ) {
elem[ ontype ] = null;
}

// Prevent re-triggering of the same event, since we


already bubbled it above
jQuery.event.triggered = type;
elem[ type ]();
jQuery.event.triggered = undefined;

if ( tmp ) {
elem[ ontype ] = tmp;
}
}
}
}

return event.result;
},

// Piggyback on a donor event to simulate a different one


// Used only for `focus(in | out)` events
simulate: function( type, elem, event ) {
var e = jQuery.extend(
new jQuery.Event(),
event,
{
type: type,
isSimulated: true
}
);

jQuery.event.trigger( e, null, elem );


}

} );

jQuery.fn.extend( {

trigger: function( type, data ) {


return this.each( function() {
jQuery.event.trigger( type, data, this );
} );
},
triggerHandler: function( type, data ) {
var elem = this[ 0 ];
if ( elem ) {
return jQuery.event.trigger( type, data, elem, true );
}
}
} );

jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
function( i, name ) {

// Handle event binding


jQuery.fn[ name ] = function( data, fn ) {
return arguments.length > 0 ?
this.on( name, null, data, fn ) :
this.trigger( name );
};
} );

jQuery.fn.extend( {
hover: function( fnOver, fnOut ) {
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
}
} );

support.focusin = "onfocusin" in window;

// Support: Firefox <=44


// Firefox doesn't have focus(in | out) events
// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
//
// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
// focus(in | out) events fire after focus & blur events,
// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-
focusevent-event-order
// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
if ( !support.focusin ) {
jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {

// Attach a single capturing handler on the document while someone


wants focusin/focusout
var handler = function( event ) {
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event
) );
};

jQuery.event.special[ fix ] = {
setup: function() {
var doc = this.ownerDocument || this,
attaches = dataPriv.access( doc, fix );

if ( !attaches ) {
doc.addEventListener( orig, handler, true );
}
dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
},
teardown: function() {
var doc = this.ownerDocument || this,
attaches = dataPriv.access( doc, fix ) - 1;

if ( !attaches ) {
doc.removeEventListener( orig, handler, true );
dataPriv.remove( doc, fix );

} else {
dataPriv.access( doc, fix, attaches );
}
}
};
} );
}
var location = window.location;

var nonce = jQuery.now();

var rquery = ( /\?/ );

// Cross-browser xml parsing


jQuery.parseXML = function( data ) {
var xml;
if ( !data || typeof data !== "string" ) {
return null;
}

// Support: IE 9 - 11 only
// IE throws on parseFromString with invalid input.
try {
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
} catch ( e ) {
xml = undefined;
}

if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {


jQuery.error( "Invalid XML: " + data );
}
return xml;
};

var
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
rsubmittable = /^(?:input|select|textarea|keygen)/i;

function buildParams( prefix, obj, traditional, add ) {


var name;

if ( jQuery.isArray( obj ) ) {
// Serialize array item.
jQuery.each( obj, function( i, v ) {
if ( traditional || rbracket.test( prefix ) ) {

// Treat each array item as a scalar.


add( prefix, v );

} else {

// Item is non-scalar (array or object), encode its numeric


index.
buildParams(
prefix + "[" + ( typeof v === "object" && v != null ?
i : "" ) + "]",
v,
traditional,
add
);
}
} );

} else if ( !traditional && jQuery.type( obj ) === "object" ) {

// Serialize object item.


for ( name in obj ) {
buildParams( prefix + "[" + name + "]", obj[ name ], traditional,
add );
}

} else {

// Serialize scalar item.


add( prefix, obj );
}
}

// Serialize an array of form elements or a set of


// key/values into a query string
jQuery.param = function( a, traditional ) {
var prefix,
s = [],
add = function( key, valueOrFunction ) {

// If value is a function, invoke it and use its return value


var value = jQuery.isFunction( valueOrFunction ) ?
valueOrFunction() :
valueOrFunction;

s[ s.length ] = encodeURIComponent( key ) + "=" +


encodeURIComponent( value == null ? "" : value );
};

// If an array was passed in, assume that it is an array of form elements.


if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {

// Serialize the form elements


jQuery.each( a, function() {
add( this.name, this.value );
} );
} else {

// If traditional, encode the "old" way (the way 1.3.2 or older


// did it), otherwise encode params recursively.
for ( prefix in a ) {
buildParams( prefix, a[ prefix ], traditional, add );
}
}

// Return the resulting serialization


return s.join( "&" );
};

jQuery.fn.extend( {
serialize: function() {
return jQuery.param( this.serializeArray() );
},
serializeArray: function() {
return this.map( function() {

// Can add propHook for "elements" to filter or add form elements


var elements = jQuery.prop( this, "elements" );
return elements ? jQuery.makeArray( elements ) : this;
} )
.filter( function() {
var type = this.type;

// Use .is( ":disabled" ) so that fieldset[disabled] works


return this.name && !jQuery( this ).is( ":disabled" ) &&
rsubmittable.test( this.nodeName ) && !
rsubmitterTypes.test( type ) &&
( this.checked || !rcheckableType.test( type ) );
} )
.map( function( i, elem ) {
var val = jQuery( this ).val();

return val == null ?


null :
jQuery.isArray( val ) ?
jQuery.map( val, function( val ) {
return { name: elem.name, value:
val.replace( rCRLF, "\r\n" ) };
} ) :
{ name: elem.name, value: val.replace( rCRLF,
"\r\n" ) };
} ).get();
}
} );

var
r20 = /%20/g,
rhash = /#.*$/,
rts = /([?&])_=[^&]*/,
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,

// #7653, #8125, #8152: local protocol detection


rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
rnoContent = /^(?:GET|HEAD)$/,
rprotocol = /^\/\//,

/* Prefilters
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an
example)
* 2) These are called:
* - BEFORE asking for a transport
* - AFTER param serialization (s.data is a string if s.processData is
true)
* 3) key is the dataType
* 4) the catchall symbol "*" can be used
* 5) execution will start with transport dataType and THEN continue down to
"*" if needed
*/
prefilters = {},

/* Transports bindings
* 1) key is the dataType
* 2) the catchall symbol "*" can be used
* 3) selection will start with transport dataType and THEN go to "*" if
needed
*/
transports = {},

// Avoid comment-prolog char sequence (#10098); must appease lint and evade
compression
allTypes = "*/".concat( "*" ),

// Anchor tag for parsing the document origin


originAnchor = document.createElement( "a" );
originAnchor.href = location.href;

// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport


function addToPrefiltersOrTransports( structure ) {

// dataTypeExpression is optional and defaults to "*"


return function( dataTypeExpression, func ) {

if ( typeof dataTypeExpression !== "string" ) {


func = dataTypeExpression;
dataTypeExpression = "*";
}

var dataType,
i = 0,
dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite )
|| [];

if ( jQuery.isFunction( func ) ) {

// For each dataType in the dataTypeExpression


while ( ( dataType = dataTypes[ i++ ] ) ) {

// Prepend if requested
if ( dataType[ 0 ] === "+" ) {
dataType = dataType.slice( 1 ) || "*";
( structure[ dataType ] = structure[ dataType ] || []
).unshift( func );
// Otherwise append
} else {
( structure[ dataType ] = structure[ dataType ] || []
).push( func );
}
}
}
};
}

// Base inspection function for prefilters and transports


function inspectPrefiltersOrTransports( structure, options, originalOptions,
jqXHR ) {

var inspected = {},


seekingTransport = ( structure === transports );

function inspect( dataType ) {


var selected;
inspected[ dataType ] = true;
jQuery.each( structure[ dataType ] || [], function( _,
prefilterOrFactory ) {
var dataTypeOrTransport = prefilterOrFactory( options,
originalOptions, jqXHR );
if ( typeof dataTypeOrTransport === "string" &&
!seekingTransport && !inspected[ dataTypeOrTransport ] ) {

options.dataTypes.unshift( dataTypeOrTransport );
inspect( dataTypeOrTransport );
return false;
} else if ( seekingTransport ) {
return !( selected = dataTypeOrTransport );
}
} );
return selected;
}

return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*"


);
}

// A special extend for ajax options


// that takes "flat" options (not to be deep extended)
// Fixes #9887
function ajaxExtend( target, src ) {
var key, deep,
flatOptions = jQuery.ajaxSettings.flatOptions || {};

for ( key in src ) {


if ( src[ key ] !== undefined ) {
( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )
[ key ] = src[ key ];
}
}
if ( deep ) {
jQuery.extend( true, target, deep );
}
return target;
}

/* Handles responses to an ajax request:


* - finds the right dataType (mediates between content-type and expected dataType)
* - returns the corresponding response
*/
function ajaxHandleResponses( s, jqXHR, responses ) {

var ct, type, finalDataType, firstDataType,


contents = s.contents,
dataTypes = s.dataTypes;

// Remove auto dataType and get content-type in the process


while ( dataTypes[ 0 ] === "*" ) {
dataTypes.shift();
if ( ct === undefined ) {
ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
}
}

// Check if we're dealing with a known content-type


if ( ct ) {
for ( type in contents ) {
if ( contents[ type ] && contents[ type ].test( ct ) ) {
dataTypes.unshift( type );
break;
}
}
}

// Check to see if we have a response for the expected dataType


if ( dataTypes[ 0 ] in responses ) {
finalDataType = dataTypes[ 0 ];
} else {

// Try convertible dataTypes


for ( type in responses ) {
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ]
] ) {
finalDataType = type;
break;
}
if ( !firstDataType ) {
firstDataType = type;
}
}

// Or just use first one


finalDataType = finalDataType || firstDataType;
}

// If we found a dataType
// We add the dataType to the list if needed
// and return the corresponding response
if ( finalDataType ) {
if ( finalDataType !== dataTypes[ 0 ] ) {
dataTypes.unshift( finalDataType );
}
return responses[ finalDataType ];
}
}

/* Chain conversions given the request and the original response


* Also sets the responseXXX fields on the jqXHR instance
*/
function ajaxConvert( s, response, jqXHR, isSuccess ) {
var conv2, current, conv, tmp, prev,
converters = {},

// Work with a copy of dataTypes in case we need to modify it for


conversion
dataTypes = s.dataTypes.slice();

// Create converters map with lowercased keys


if ( dataTypes[ 1 ] ) {
for ( conv in s.converters ) {
converters[ conv.toLowerCase() ] = s.converters[ conv ];
}
}

current = dataTypes.shift();

// Convert to each sequential dataType


while ( current ) {

if ( s.responseFields[ current ] ) {
jqXHR[ s.responseFields[ current ] ] = response;
}

// Apply the dataFilter if provided


if ( !prev && isSuccess && s.dataFilter ) {
response = s.dataFilter( response, s.dataType );
}

prev = current;
current = dataTypes.shift();

if ( current ) {

// There's only work to do if current dataType is non-auto


if ( current === "*" ) {

current = prev;

// Convert response if prev dataType is non-auto and differs from


current
} else if ( prev !== "*" && prev !== current ) {

// Seek a direct converter


conv = converters[ prev + " " + current ] || converters[ "*
" + current ];

// If none found, seek a pair


if ( !conv ) {
for ( conv2 in converters ) {

// If conv2 outputs current


tmp = conv2.split( " " );
if ( tmp[ 1 ] === current ) {

// If prev can be converted to accepted


input
conv = converters[ prev + " " +
tmp[ 0 ] ] ||
converters[ "* " + tmp[ 0 ] ];
if ( conv ) {

// Condense equivalence converters


if ( conv === true ) {
conv = converters[ conv2 ];

// Otherwise, insert the


intermediate dataType
} else if ( converters[ conv2 ] !==
true ) {
current = tmp[ 0 ];

dataTypes.unshift( tmp[ 1 ] );
}
break;
}
}
}
}

// Apply converter (if not an equivalence)


if ( conv !== true ) {

// Unless errors are allowed to bubble, catch and


return them
if ( conv && s.throws ) {
response = conv( response );
} else {
try {
response = conv( response );
} catch ( e ) {
return {
state: "parsererror",
error: conv ? e : "No conversion
from " + prev + " to " + current
};
}
}
}
}
}
}

return { state: "success", data: response };


}

jQuery.extend( {

// Counter for holding the number of active queries


active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {},

ajaxSettings: {
url: location.href,
type: "GET",
isLocal: rlocalProtocol.test( location.protocol ),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
throws: false,
traditional: false,
headers: {},
*/

accepts: {
"*": allTypes,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},

contents: {
xml: /\bxml\b/,
html: /\bhtml/,
json: /\bjson\b/
},

responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},

// Data converters
// Keys separate source (or catchall "*") and destination types with a
single space
converters: {

// Convert anything to text


"* text": String,

// Text to html (true = no transformation)


"text html": true,

// Evaluate text as a json expression


"text json": JSON.parse,

// Parse text as xml


"text xml": jQuery.parseXML
},

// For options that shouldn't be deep extended:


// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions: {
url: true,
context: true
}
},

// Creates a full fledged settings object into target


// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup: function( target, settings ) {
return settings ?

// Building a settings object


ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings )
:

// Extending ajaxSettings
ajaxExtend( jQuery.ajaxSettings, target );
},

ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),


ajaxTransport: addToPrefiltersOrTransports( transports ),

// Main method
ajax: function( url, options ) {

// If url is an object, simulate pre-1.5 signature


if ( typeof url === "object" ) {
options = url;
url = undefined;
}

// Force options to be an object


options = options || {};

var transport,

// URL without anti-cache param


cacheURL,

// Response headers
responseHeadersString,
responseHeaders,

// timeout handle
timeoutTimer,

// Url cleanup var


urlAnchor,

// Request state (becomes false upon send and true upon


completion)
completed,

// To know if global events are to be dispatched


fireGlobals,

// Loop variable
i,

// uncached part of the url


uncached,

// Create the final options object


s = jQuery.ajaxSetup( {}, options ),

// Callbacks context
callbackContext = s.context || s,

// Context for global events is callbackContext if it is a DOM


node or jQuery collection
globalEventContext = s.context &&
( callbackContext.nodeType || callbackContext.jquery ) ?
jQuery( callbackContext ) :
jQuery.event,

// Deferreds
deferred = jQuery.Deferred(),
completeDeferred = jQuery.Callbacks( "once memory" ),

// Status-dependent callbacks
statusCode = s.statusCode || {},

// Headers (they are sent all at once)


requestHeaders = {},
requestHeadersNames = {},

// Default abort message


strAbort = "canceled",

// Fake xhr
jqXHR = {
readyState: 0,

// Builds headers hashtable if needed


getResponseHeader: function( key ) {
var match;
if ( completed ) {
if ( !responseHeaders ) {
responseHeaders = {};
while ( ( match =
rheaders.exec( responseHeadersString ) ) ) {

responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];


}
}
match = responseHeaders[ key.toLowerCase() ];
}
return match == null ? null : match;
},
// Raw string
getAllResponseHeaders: function() {
return completed ? responseHeadersString : null;
},

// Caches the header


setRequestHeader: function( name, value ) {
if ( completed == null ) {
name =
requestHeadersNames[ name.toLowerCase() ] =
requestHeadersNames[ name.toLowerCase() ]
|| name;
requestHeaders[ name ] = value;
}
return this;
},

// Overrides response content-type header


overrideMimeType: function( type ) {
if ( completed == null ) {
s.mimeType = type;
}
return this;
},

// Status-dependent callbacks
statusCode: function( map ) {
var code;
if ( map ) {
if ( completed ) {

// Execute the appropriate callbacks


jqXHR.always( map[ jqXHR.status ] );
} else {

// Lazy-add the new callbacks in a way


that preserves old ones
for ( code in map ) {
statusCode[ code ] =
[ statusCode[ code ], map[ code ] ];
}
}
}
return this;
},

// Cancel the request


abort: function( statusText ) {
var finalText = statusText || strAbort;
if ( transport ) {
transport.abort( finalText );
}
done( 0, finalText );
return this;
}
};

// Attach deferreds
deferred.promise( jqXHR );
// Add protocol if not provided (prefilters might expect it)
// Handle falsy url in the settings object (#10093: consistency with
old signature)
// We also use the url parameter if available
s.url = ( ( url || s.url || location.href ) + "" )
.replace( rprotocol, location.protocol + "//" );

// Alias method option to type as per ticket #12004


s.type = options.method || options.type || s.method || s.type;

// Extract dataTypes list


s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnotwhite ) ||
[ "" ];

// A cross-domain request is in order when the origin doesn't match the


current origin.
if ( s.crossDomain == null ) {
urlAnchor = document.createElement( "a" );

// Support: IE <=8 - 11, Edge 12 - 13


// IE throws exception on accessing the href property if url is
malformed,
// e.g. http://example.com:80x/
try {
urlAnchor.href = s.url;

// Support: IE <=8 - 11 only


// Anchor's host property isn't correctly set when s.url is
relative
urlAnchor.href = urlAnchor.href;
s.crossDomain = originAnchor.protocol + "//" +
originAnchor.host !==
urlAnchor.protocol + "//" + urlAnchor.host;
} catch ( e ) {

// If there is an error parsing the URL, assume it is


crossDomain,
// it can be rejected by the transport if it is invalid
s.crossDomain = true;
}
}

// Convert data if not already a string


if ( s.data && s.processData && typeof s.data !== "string" ) {
s.data = jQuery.param( s.data, s.traditional );
}

// Apply prefilters
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );

// If request was aborted inside a prefilter, stop there


if ( completed ) {
return jqXHR;
}

// We can fire global events as of now if asked to


// Don't fire events if jQuery.event is undefined in an AMD-usage
scenario (#15118)
fireGlobals = jQuery.event && s.global;

// Watch for a new set of requests


if ( fireGlobals && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" );
}

// Uppercase the type


s.type = s.type.toUpperCase();

// Determine if request has content


s.hasContent = !rnoContent.test( s.type );

// Save the URL in case we're toying with the If-Modified-Since


// and/or If-None-Match header later on
// Remove hash to simplify url manipulation
cacheURL = s.url.replace( rhash, "" );

// More options handling for requests with no content


if ( !s.hasContent ) {

// Remember the hash so we can put it back


uncached = s.url.slice( cacheURL.length );

// If data is available, append data to url


if ( s.data ) {
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) +
s.data;

// #9682: remove data so that it's not used in an eventual


retry
delete s.data;
}

// Add anti-cache in uncached url if needed


if ( s.cache === false ) {
cacheURL = cacheURL.replace( rts, "" );
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" +
( nonce++ ) + uncached;
}

// Put hash and anti-cache on the URL that will be requested (gh-
1732)
s.url = cacheURL + uncached;

// Change '%20' to '+' if this is encoded form body content (gh-2658)


} else if ( s.data && s.processData &&
( s.contentType || "" ).indexOf( "application/x-www-form-
urlencoded" ) === 0 ) {
s.data = s.data.replace( r20, "+" );
}

// Set the If-Modified-Since and/or If-None-Match header, if in


ifModified mode.
if ( s.ifModified ) {
if ( jQuery.lastModified[ cacheURL ] ) {
jqXHR.setRequestHeader( "If-Modified-Since",
jQuery.lastModified[ cacheURL ] );
}
if ( jQuery.etag[ cacheURL ] ) {
jqXHR.setRequestHeader( "If-None-Match",
jQuery.etag[ cacheURL ] );
}
}

// Set the correct header, if data is being sent


if ( s.data && s.hasContent && s.contentType !== false ||
options.contentType ) {
jqXHR.setRequestHeader( "Content-Type", s.contentType );
}

// Set the Accepts header for the server, depending on the dataType
jqXHR.setRequestHeader(
"Accept",
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
s.accepts[ s.dataTypes[ 0 ] ] +
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + ";
q=0.01" : "" ) :
s.accepts[ "*" ]
);

// Check for headers option


for ( i in s.headers ) {
jqXHR.setRequestHeader( i, s.headers[ i ] );
}

// Allow custom headers/mimetypes and early abort


if ( s.beforeSend &&
( s.beforeSend.call( callbackContext, jqXHR, s ) === false ||
completed ) ) {

// Abort if not done already and return


return jqXHR.abort();
}

// Aborting is no longer a cancellation


strAbort = "abort";

// Install callbacks on deferreds


completeDeferred.add( s.complete );
jqXHR.done( s.success );
jqXHR.fail( s.error );

// Get transport
transport = inspectPrefiltersOrTransports( transports, s, options,
jqXHR );

// If no transport, we auto-abort
if ( !transport ) {
done( -1, "No Transport" );
} else {
jqXHR.readyState = 1;

// Send global event


if ( fireGlobals ) {
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
}
// If request was aborted inside ajaxSend, stop there
if ( completed ) {
return jqXHR;
}

// Timeout
if ( s.async && s.timeout > 0 ) {
timeoutTimer = window.setTimeout( function() {
jqXHR.abort( "timeout" );
}, s.timeout );
}

try {
completed = false;
transport.send( requestHeaders, done );
} catch ( e ) {

// Rethrow post-completion exceptions


if ( completed ) {
throw e;
}

// Propagate others as results


done( -1, e );
}
}

// Callback for when everything is done


function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;

// Ignore repeat invocations


if ( completed ) {
return;
}

completed = true;

// Clear timeout if it exists


if ( timeoutTimer ) {
window.clearTimeout( timeoutTimer );
}

// Dereference transport for early garbage collection


// (no matter how long the jqXHR object will be used)
transport = undefined;

// Cache response headers


responseHeadersString = headers || "";

// Set readyState
jqXHR.readyState = status > 0 ? 4 : 0;

// Determine if successful
isSuccess = status >= 200 && status < 300 || status === 304;

// Get response data


if ( responses ) {
response = ajaxHandleResponses( s, jqXHR, responses );
}

// Convert no matter what (that way responseXXX fields are always


set)
response = ajaxConvert( s, response, jqXHR, isSuccess );

// If successful, handle type chaining


if ( isSuccess ) {

// Set the If-Modified-Since and/or If-None-Match header,


if in ifModified mode.
if ( s.ifModified ) {
modified = jqXHR.getResponseHeader( "Last-
Modified" );
if ( modified ) {
jQuery.lastModified[ cacheURL ] = modified;
}
modified = jqXHR.getResponseHeader( "etag" );
if ( modified ) {
jQuery.etag[ cacheURL ] = modified;
}
}

// if no content
if ( status === 204 || s.type === "HEAD" ) {
statusText = "nocontent";

// if not modified
} else if ( status === 304 ) {
statusText = "notmodified";

// If we have data, let's convert it


} else {
statusText = response.state;
success = response.data;
error = response.error;
isSuccess = !error;
}
} else {

// Extract error from statusText and normalize for non-


aborts
error = statusText;
if ( status || !statusText ) {
statusText = "error";
if ( status < 0 ) {
status = 0;
}
}
}

// Set data for the fake xhr object


jqXHR.status = status;
jqXHR.statusText = ( nativeStatusText || statusText ) + "";

// Success/Error
if ( isSuccess ) {
deferred.resolveWith( callbackContext, [ success,
statusText, jqXHR ] );
} else {
deferred.rejectWith( callbackContext, [ jqXHR, statusText,
error ] );
}

// Status-dependent callbacks
jqXHR.statusCode( statusCode );
statusCode = undefined;

if ( fireGlobals ) {
globalEventContext.trigger( isSuccess ? "ajaxSuccess" :
"ajaxError",
[ jqXHR, s, isSuccess ? success : error ] );
}

// Complete
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ]
);

if ( fireGlobals ) {
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );

// Handle the global AJAX counter


if ( !( --jQuery.active ) ) {
jQuery.event.trigger( "ajaxStop" );
}
}
}

return jqXHR;
},

getJSON: function( url, data, callback ) {


return jQuery.get( url, data, callback, "json" );
},

getScript: function( url, callback ) {


return jQuery.get( url, undefined, callback, "script" );
}
} );

jQuery.each( [ "get", "post" ], function( i, method ) {


jQuery[ method ] = function( url, data, callback, type ) {

// Shift arguments if data argument was omitted


if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = undefined;
}

// The url can be an options object (which then must have .url)
return jQuery.ajax( jQuery.extend( {
url: url,
type: method,
dataType: type,
data: data,
success: callback
}, jQuery.isPlainObject( url ) && url ) );
};
} );

jQuery._evalUrl = function( url ) {


return jQuery.ajax( {
url: url,

// Make this explicit, since user can override this through ajaxSetup
(#11264)
type: "GET",
dataType: "script",
cache: true,
async: false,
global: false,
"throws": true
} );
};

jQuery.fn.extend( {
wrapAll: function( html ) {
var wrap;

if ( this[ 0 ] ) {
if ( jQuery.isFunction( html ) ) {
html = html.call( this[ 0 ] );
}

// The elements to wrap the target around


wrap = jQuery( html,
this[ 0 ].ownerDocument ).eq( 0 ).clone( true );

if ( this[ 0 ].parentNode ) {
wrap.insertBefore( this[ 0 ] );
}

wrap.map( function() {
var elem = this;

while ( elem.firstElementChild ) {
elem = elem.firstElementChild;
}

return elem;
} ).append( this );
}

return this;
},

wrapInner: function( html ) {


if ( jQuery.isFunction( html ) ) {
return this.each( function( i ) {
jQuery( this ).wrapInner( html.call( this, i ) );
} );
}
return this.each( function() {
var self = jQuery( this ),
contents = self.contents();

if ( contents.length ) {
contents.wrapAll( html );

} else {
self.append( html );
}
} );
},

wrap: function( html ) {


var isFunction = jQuery.isFunction( html );

return this.each( function( i ) {


jQuery( this ).wrapAll( isFunction ? html.call( this, i ) :
html );
} );
},

unwrap: function( selector ) {


this.parent( selector ).not( "body" ).each( function() {
jQuery( this ).replaceWith( this.childNodes );
} );
return this;
}
} );

jQuery.expr.pseudos.hidden = function( elem ) {


return !jQuery.expr.pseudos.visible( elem );
};
jQuery.expr.pseudos.visible = function( elem ) {
return !!( elem.offsetWidth || elem.offsetHeight ||
elem.getClientRects().length );
};

jQuery.ajaxSettings.xhr = function() {
try {
return new window.XMLHttpRequest();
} catch ( e ) {}
};

var xhrSuccessStatus = {

// File protocol always yields status code 0, assume 200


0: 200,

// Support: IE <=9 only


// #1450: sometimes IE returns 1223 when it should be 204
1223: 204
},
xhrSupported = jQuery.ajaxSettings.xhr();
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;

jQuery.ajaxTransport( function( options ) {


var callback, errorCallback;

// Cross domain only allowed if supported through XMLHttpRequest


if ( support.cors || xhrSupported && !options.crossDomain ) {
return {
send: function( headers, complete ) {
var i,
xhr = options.xhr();

xhr.open(
options.type,
options.url,
options.async,
options.username,
options.password
);

// Apply custom fields if provided


if ( options.xhrFields ) {
for ( i in options.xhrFields ) {
xhr[ i ] = options.xhrFields[ i ];
}
}

// Override mime type if needed


if ( options.mimeType && xhr.overrideMimeType ) {
xhr.overrideMimeType( options.mimeType );
}

// X-Requested-With header
// For cross-domain requests, seeing as conditions for a
preflight are
// akin to a jigsaw puzzle, we simply never set it to be
sure.
// (it can always be set on a per-request basis or even
using ajaxSetup)
// For same-domain requests, won't change header if already
provided.
if ( !options.crossDomain && !headers[ "X-Requested-With" ]
) {
headers[ "X-Requested-With" ] = "XMLHttpRequest";
}

// Set headers
for ( i in headers ) {
xhr.setRequestHeader( i, headers[ i ] );
}

// Callback
callback = function( type ) {
return function() {
if ( callback ) {
callback = errorCallback = xhr.onload =
xhr.onerror = xhr.onabort =
xhr.onreadystatechange = null;
if ( type === "abort" ) {
xhr.abort();
} else if ( type === "error" ) {

// Support: IE <=9 only


// On a manual native abort, IE9
throws
// errors on any property access
that is not readyState
if ( typeof xhr.status !== "number"
) {
complete( 0, "error" );
} else {
complete(

// File: protocol always


yields status 0; see #8605, #14207
xhr.status,
xhr.statusText
);
}
} else {
complete(

xhrSuccessStatus[ xhr.status ] || xhr.status,


xhr.statusText,

// Support: IE <=9 only


// IE9 has no XHR2 but throws
on binary (trac-11426)
// For XHR2 non-text, let the
caller handle it (gh-2498)
( xhr.responseType ||
"text" ) !== "text" ||
typeof xhr.responseText !==
"string" ?
{ binary: xhr.response }
:
{ text: xhr.responseText
},
xhr.getAllResponseHeaders()
);
}
}
};
};

// Listen to events
xhr.onload = callback();
errorCallback = xhr.onerror = callback( "error" );

// Support: IE 9 only
// Use onreadystatechange to replace onabort
// to handle uncaught aborts
if ( xhr.onabort !== undefined ) {
xhr.onabort = errorCallback;
} else {
xhr.onreadystatechange = function() {
// Check readyState before timeout as it
changes
if ( xhr.readyState === 4 ) {

// Allow onerror to be called first,


// but that will not handle a native
abort
// Also, save errorCallback to a variable
// as xhr.onerror cannot be accessed
window.setTimeout( function() {
if ( callback ) {
errorCallback();
}
} );
}
};
}

// Create the abort callback


callback = callback( "abort" );

try {

// Do send the request (this may raise an exception)


xhr.send( options.hasContent && options.data ||
null );
} catch ( e ) {

// #14683: Only rethrow if this hasn't been notified


as an error yet
if ( callback ) {
throw e;
}
}
},

abort: function() {
if ( callback ) {
callback();
}
}
};
}
} );

// Prevent auto-execution of scripts when no explicit dataType was provided (See


gh-2432)
jQuery.ajaxPrefilter( function( s ) {
if ( s.crossDomain ) {
s.contents.script = false;
}
} );

// Install script dataType


jQuery.ajaxSetup( {
accepts: {
script: "text/javascript, application/javascript, " +
"application/ecmascript, application/x-ecmascript"
},
contents: {
script: /\b(?:java|ecma)script\b/
},
converters: {
"text script": function( text ) {
jQuery.globalEval( text );
return text;
}
}
} );

// Handle cache's special case and crossDomain


jQuery.ajaxPrefilter( "script", function( s ) {
if ( s.cache === undefined ) {
s.cache = false;
}
if ( s.crossDomain ) {
s.type = "GET";
}
} );

// Bind script tag hack transport


jQuery.ajaxTransport( "script", function( s ) {

// This transport only deals with cross domain requests


if ( s.crossDomain ) {
var script, callback;
return {
send: function( _, complete ) {
script = jQuery( "<script>" ).prop( {
charset: s.scriptCharset,
src: s.url
} ).on(
"load error",
callback = function( evt ) {
script.remove();
callback = null;
if ( evt ) {
complete( evt.type === "error" ? 404 :
200, evt.type );
}
}
);

// Use native DOM manipulation to avoid our domManip AJAX


trickery
document.head.appendChild( script[ 0 ] );
},
abort: function() {
if ( callback ) {
callback();
}
}
};
}
} );

var oldCallbacks = [],


rjsonp = /(=)\?(?=&|$)|\?\?/;

// Default jsonp settings


jQuery.ajaxSetup( {
jsonp: "callback",
jsonpCallback: function() {
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++
) );
this[ callback ] = true;
return callback;
}
} );

// Detect, normalize options and install callbacks for jsonp requests


jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {

var callbackName, overwritten, responseContainer,


jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
"url" :
typeof s.data === "string" &&
( s.contentType || "" )
.indexOf( "application/x-www-form-urlencoded" ) === 0
&&
rjsonp.test( s.data ) && "data"
);

// Handle iff the expected data type is "jsonp" or we have a parameter to set
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {

// Get callback name, remembering preexisting value associated with it


callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
s.jsonpCallback() :
s.jsonpCallback;

// Insert callback into url or form data


if ( jsonProp ) {
s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" +
callbackName );
} else if ( s.jsonp !== false ) {
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" +
callbackName;
}

// Use data converter to retrieve json after script execution


s.converters[ "script json" ] = function() {
if ( !responseContainer ) {
jQuery.error( callbackName + " was not called" );
}
return responseContainer[ 0 ];
};

// Force json dataType


s.dataTypes[ 0 ] = "json";
// Install callback
overwritten = window[ callbackName ];
window[ callbackName ] = function() {
responseContainer = arguments;
};

// Clean-up function (fires after converters)


jqXHR.always( function() {

// If previous value didn't exist - remove it


if ( overwritten === undefined ) {
jQuery( window ).removeProp( callbackName );

// Otherwise restore preexisting value


} else {
window[ callbackName ] = overwritten;
}

// Save back as free


if ( s[ callbackName ] ) {

// Make sure that re-using the options doesn't screw things


around
s.jsonpCallback = originalSettings.jsonpCallback;

// Save the callback name for future use


oldCallbacks.push( callbackName );
}

// Call if it was a function and we have a response


if ( responseContainer && jQuery.isFunction( overwritten ) ) {
overwritten( responseContainer[ 0 ] );
}

responseContainer = overwritten = undefined;


} );

// Delegate to script
return "script";
}
} );

// Support: Safari 8 only


// In Safari 8 documents created via document.implementation.createHTMLDocument
// collapse sibling forms: the second one becomes a child of the first one.
// Because of that, this security measure has to be disabled in Safari 8.
// https://bugs.webkit.org/show_bug.cgi?id=137337
support.createHTMLDocument = ( function() {
var body = document.implementation.createHTMLDocument( "" ).body;
body.innerHTML = "<form></form><form></form>";
return body.childNodes.length === 2;
} )();

// Argument "data" should be string of html


// context (optional): If specified, the fragment will be created in this context,
// defaults to document
// keepScripts (optional): If true, will include scripts passed in the html string
jQuery.parseHTML = function( data, context, keepScripts ) {
if ( typeof data !== "string" ) {
return [];
}
if ( typeof context === "boolean" ) {
keepScripts = context;
context = false;
}

var base, parsed, scripts;

if ( !context ) {

// Stop scripts or inline event handlers from being executed


immediately
// by using document.implementation
if ( support.createHTMLDocument ) {
context = document.implementation.createHTMLDocument( "" );

// Set the base href for the created document


// so any parsed elements with URLs
// are based on the document's URL (gh-2965)
base = context.createElement( "base" );
base.href = document.location.href;
context.head.appendChild( base );
} else {
context = document;
}
}

parsed = rsingleTag.exec( data );


scripts = !keepScripts && [];

// Single tag
if ( parsed ) {
return [ context.createElement( parsed[ 1 ] ) ];
}

parsed = buildFragment( [ data ], context, scripts );

if ( scripts && scripts.length ) {


jQuery( scripts ).remove();
}

return jQuery.merge( [], parsed.childNodes );


};

/**
* Load a url into a page
*/
jQuery.fn.load = function( url, params, callback ) {
var selector, type, response,
self = this,
off = url.indexOf( " " );
if ( off > -1 ) {
selector = jQuery.trim( url.slice( off ) );
url = url.slice( 0, off );
}

// If it's a function
if ( jQuery.isFunction( params ) ) {

// We assume that it's the callback


callback = params;
params = undefined;

// Otherwise, build a param string


} else if ( params && typeof params === "object" ) {
type = "POST";
}

// If we have elements to modify, make the request


if ( self.length > 0 ) {
jQuery.ajax( {
url: url,

// If "type" variable is undefined, then "GET" method will be


used.
// Make value of this field explicit since
// user can override it through ajaxSetup method
type: type || "GET",
dataType: "html",
data: params
} ).done( function( responseText ) {

// Save response for use in complete callback


response = arguments;

self.html( selector ?

// If a selector was specified, locate the right elements


in a dummy div
// Exclude scripts to avoid IE 'Permission Denied' errors

jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector )


:

// Otherwise use the full result


responseText );

// If the request succeeds, this function gets "data", "status",


"jqXHR"
// but they are ignored because response was set above.
// If it fails, this function gets "jqXHR", "status", "error"
} ).always( callback && function( jqXHR, status ) {
self.each( function() {
callback.apply( this, response || [ jqXHR.responseText,
status, jqXHR ] );
} );
} );
}

return this;
};

// Attach a bunch of functions for handling common AJAX events


jQuery.each( [
"ajaxStart",
"ajaxStop",
"ajaxComplete",
"ajaxError",
"ajaxSuccess",
"ajaxSend"
], function( i, type ) {
jQuery.fn[ type ] = function( fn ) {
return this.on( type, fn );
};
} );

jQuery.expr.pseudos.animated = function( elem ) {


return jQuery.grep( jQuery.timers, function( fn ) {
return elem === fn.elem;
} ).length;
};

/**
* Gets a window from an element
*/
function getWindow( elem ) {
return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 &&
elem.defaultView;
}

jQuery.offset = {
setOffset: function( elem, options, i ) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft,
calculatePosition,
position = jQuery.css( elem, "position" ),
curElem = jQuery( elem ),
props = {};

// Set position first, in-case top/left are set even on static elem
if ( position === "static" ) {
elem.style.position = "relative";
}

curOffset = curElem.offset();
curCSSTop = jQuery.css( elem, "top" );
curCSSLeft = jQuery.css( elem, "left" );
calculatePosition = ( position === "absolute" || position === "fixed" )
&&
( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
// Need to be able to calculate position if either
// top or left is auto and position is either absolute or fixed
if ( calculatePosition ) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;

} else {
curTop = parseFloat( curCSSTop ) || 0;
curLeft = parseFloat( curCSSLeft ) || 0;
}

if ( jQuery.isFunction( options ) ) {

// Use jQuery.extend here to allow modification of coordinates


argument (gh-1848)
options = options.call( elem, i, jQuery.extend( {},
curOffset ) );
}

if ( options.top != null ) {
props.top = ( options.top - curOffset.top ) + curTop;
}
if ( options.left != null ) {
props.left = ( options.left - curOffset.left ) + curLeft;
}

if ( "using" in options ) {
options.using.call( elem, props );

} else {
curElem.css( props );
}
}
};

jQuery.fn.extend( {
offset: function( options ) {

// Preserve chaining for setter


if ( arguments.length ) {
return options === undefined ?
this :
this.each( function( i ) {
jQuery.offset.setOffset( this, options, i );
} );
}

var docElem, win, rect, doc,


elem = this[ 0 ];

if ( !elem ) {
return;
}

// Support: IE <=11 only


// Running getBoundingClientRect on a
// disconnected node in IE throws an error
if ( !elem.getClientRects().length ) {
return { top: 0, left: 0 };
}

rect = elem.getBoundingClientRect();

// Make sure element is not hidden (display: none)


if ( rect.width || rect.height ) {
doc = elem.ownerDocument;
win = getWindow( doc );
docElem = doc.documentElement;

return {
top: rect.top + win.pageYOffset - docElem.clientTop,
left: rect.left + win.pageXOffset - docElem.clientLeft
};
}

// Return zeros for disconnected and hidden elements (gh-2310)


return rect;
},

position: function() {
if ( !this[ 0 ] ) {
return;
}

var offsetParent, offset,


elem = this[ 0 ],
parentOffset = { top: 0, left: 0 };

// Fixed elements are offset from window (parentOffset = {top:0, left:


0},
// because it is its only offset parent
if ( jQuery.css( elem, "position" ) === "fixed" ) {

// Assume getBoundingClientRect is there when computed position


is fixed
offset = elem.getBoundingClientRect();

} else {

// Get *real* offsetParent


offsetParent = this.offsetParent();

// Get correct offsets


offset = this.offset();
if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
parentOffset = offsetParent.offset();
}

// Add offsetParent borders


parentOffset = {
top: parentOffset.top + jQuery.css( offsetParent[ 0 ],
"borderTopWidth", true ),
left: parentOffset.left + jQuery.css( offsetParent[ 0 ],
"borderLeftWidth", true )
};
}
// Subtract parent offsets and element margins
return {
top: offset.top - parentOffset.top - jQuery.css( elem,
"marginTop", true ),
left: offset.left - parentOffset.left - jQuery.css( elem,
"marginLeft", true )
};
},

// This method will return documentElement in the following cases:


// 1) For the element inside the iframe without offsetParent, this method
will return
// documentElement of the parent window
// 2) For the hidden or detached element
// 3) For body or html element, i.e. in case of the html node - it will
return itself
//
// but those exceptions were never presented as a real life use-cases
// and might be considered as more preferable results.
//
// This logic, however, is not guaranteed and can change at any point in the
future
offsetParent: function() {
return this.map( function() {
var offsetParent = this.offsetParent;

while ( offsetParent && jQuery.css( offsetParent, "position" )


=== "static" ) {
offsetParent = offsetParent.offsetParent;
}

return offsetParent || documentElement;


} );
}
} );

// Create scrollLeft and scrollTop methods


jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" },
function( method, prop ) {
var top = "pageYOffset" === prop;

jQuery.fn[ method ] = function( val ) {


return access( this, function( elem, method, val ) {
var win = getWindow( elem );

if ( val === undefined ) {


return win ? win[ prop ] : elem[ method ];
}

if ( win ) {
win.scrollTo(
!top ? val : win.pageXOffset,
top ? val : win.pageYOffset
);

} else {
elem[ method ] = val;
}
}, method, val, arguments.length );
};
} );

// Support: Safari <=7 - 9.1, Chrome <=37 - 49


// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
// getComputedStyle returns percent when specified for top/left/bottom/right;
// rather than make the css module depend on the offset module, just check for it
here
jQuery.each( [ "top", "left" ], function( i, prop ) {
jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
function( elem, computed ) {
if ( computed ) {
computed = curCSS( elem, prop );

// If curCSS returns percentage, fallback to offset


return rnumnonpx.test( computed ) ?
jQuery( elem ).position()[ prop ] + "px" :
computed;
}
}
);
} );

// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth


methods
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
function( defaultExtra, funcName ) {

// Margin is only for outerHeight, outerWidth


jQuery.fn[ funcName ] = function( margin, value ) {
var chainable = arguments.length && ( defaultExtra || typeof
margin !== "boolean" ),
extra = defaultExtra || ( margin === true || value === true
? "margin" : "border" );

return access( this, function( elem, type, value ) {


var doc;

if ( jQuery.isWindow( elem ) ) {

// $( window ).outerWidth/Height return w/h including


scrollbars (gh-1729)
return funcName.indexOf( "outer" ) === 0 ?
elem[ "inner" + name ] :
elem.document.documentElement[ "client" +
name ];
}

// Get document width or height


if ( elem.nodeType === 9 ) {
doc = elem.documentElement;

// Either scroll[Width/Height] or
offset[Width/Height] or client[Width/Height],
// whichever is greatest
return Math.max(
elem.body[ "scroll" + name ], doc[ "scroll" +
name ],
elem.body[ "offset" + name ], doc[ "offset" +
name ],
doc[ "client" + name ]
);
}

return value === undefined ?

// Get width or height on the element, requesting but


not forcing parseFloat
jQuery.css( elem, type, extra ) :

// Set width or height on the element


jQuery.style( elem, type, value, extra );
}, type, chainable ? margin : undefined, chainable );
};
} );
} );

jQuery.fn.extend( {

bind: function( types, data, fn ) {


return this.on( types, null, data, fn );
},
unbind: function( types, fn ) {
return this.off( types, null, fn );
},

delegate: function( selector, types, data, fn ) {


return this.on( types, selector, data, fn );
},
undelegate: function( selector, types, fn ) {

// ( namespace ) or ( selector, types [, fn] )


return arguments.length === 1 ?
this.off( selector, "**" ) :
this.off( types, selector || "**", fn );
}
} );

jQuery.parseJSON = JSON.parse;

// Register as a named AMD module, since jQuery can be concatenated with other
// files that may use define, but not via a proper concatenation script that
// understands anonymous AMD modules. A named AMD is safest and most robust
// way to register. Lowercase jquery is used because AMD module names are
// derived from file names, and jQuery is normally delivered in a lowercase
// file name. Do this after creating the global so that if an AMD module wants
// to call noConflict to hide this version of jQuery, it will work.

// Note that for maximum portability, libraries that are not jQuery should
// declare themselves as anonymous modules, and avoid setting a global if an
// AMD loader is present. jQuery is a special case. For more information, see
// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon

if ( typeof define === "function" && define.amd ) {


define( "jquery", [], function() {
return jQuery;
} );
}

var

// Map over jQuery in case of overwrite


_jQuery = window.jQuery,

// Map over the $ in case of overwrite


_$ = window.$;

jQuery.noConflict = function( deep ) {


if ( window.$ === jQuery ) {
window.$ = _$;
}

if ( deep && window.jQuery === jQuery ) {


window.jQuery = _jQuery;
}

return jQuery;
};

// Expose jQuery and $ identifiers, even in AMD


// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
// and CommonJS for browser emulators (#13566)
if ( !noGlobal ) {
window.jQuery = window.$ = jQuery;
}

return jQuery;
} ) );
;
/*! jQuery UI - v1.10.3 - 2013-05-03
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js,
jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js,
jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js,
jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js,
jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js,
jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js,
jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js,
jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-
scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-
transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js,
jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
(function(t,e){function i(e,i){var
n,o,a,r=e.nodeName.toLowerCase();return"area"===r?
(n=e.parentNode,o=n.name,e.href&&o&&"map"===n.nodeName.toLowerCase()?
(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a)):!1):(/input|select|textarea|button|
object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return
t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function()
{return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+
$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:
{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,
NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPL
Y:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:
9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s)
{return"number"==typeof i?this.each(function(){var e=this;setTimeout(function()
{t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}
(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|
relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?
this.parents().filter(function(){return/(relative|absolute|
fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")
+t.css(this,"overflow-y")+t.css(this,"overflow-
x"))}).eq(0):this.parents().filter(function(){return/(auto|
scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-
x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?
t(document):e},zIndex:function(i){if(i!==e)return
this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!
==document;){if(s=o.css("position"),
("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!
isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return
this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function()
{return this.each(function()
{o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],
{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i)
{return!!t.data(i,e)}}):function(e,i,s){return!!
t.data(e,s[3])},focusable:function(e){return i(e,!
isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var
s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!
n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s)
{function n(e,i,s,n){return t.each(o,function(){i-
=parseFloat(t.css(e,"padding"+this))||0,s&&(i-
=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-
=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:
["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.i
nnerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]
=function(i){return i===e?r["inner"+s].call(this):this.each(function()
{t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!
=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!
0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?
this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-
b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return
function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}
(t.fn.removeData)),t.ui.ie=!!/msie [\w.]
+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in
document.createElement("div"),t.fn.extend({disableSelection:function(){return
this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-
disableSelection",function(t){t.preventDefault()})},enableSelection:function()
{return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:
{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in
s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i)
{var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!
==t.element[0].parentNode.nodeType)for(s=0;n.length>s;s++)t.options[n[s][0]]&&n[s]
[1].apply(t.element,i)}},hasScroll:function(e,i)
{if("hidden"===t(e).css("overflow"))return!1;var
s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:
(e[s]=1,n=e[s]>0,e[s]=0,n)}})})(jQuery),function(t,e){var
i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var
i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o)
{}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")
[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!
t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return
this._createWidget?(arguments.length&&this._createWidget(t,i),e):new
r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:
[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return
t.isFunction(n)?(l[i]=function(){var t=function(){return
s.prototype[i].apply(this,arguments)},e=function(t){return
s.prototype[i].apply(this,t)};return function(){var
i,s=this._super,o=this._superApply;return
this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._supe
rApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?
h.widgetEventPrefix:i},l,
{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?
(t.each(a._childConstructors,function(e,i){var
s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete
a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.e
xtend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in
a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?
t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return
i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||
i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return
a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function()
{var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?
(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!
1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot
call methods on "+i+" prior to initialization; "+"attempted to call method
'"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||
{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function()
{},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEve
ntPrefix:"",defaultElement:"<div>",options:{disabled:!
1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)
[0],this.element=t(s),this.uuid=i+
+,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({}
,this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this
.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!
0,this.element,{remove:function(t)
{t.target===s&&this.destroy()}}),this.document=t(s.style?
s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||
this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._ge
tCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.no
op,_create:t.noop,_init:t.noop,destroy:function()
{this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetNam
e).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),thi
s.widget().unbind(this.eventNamespace).removeAttr("aria-
disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-
disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui
-state-hover"),this.focusable.removeClass("ui-state-
focus")},_destroy:t.noop,widget:function(){return
this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return
t.widget.extend({},this.options);if("string"==typeof
i)if(r={},n=i.split("."),i=n.shift(),n.length)
{for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a+
+)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?
null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?
null:this.options[i];r[i]=s}return
this._setOptions(r),this},_setOptions:function(t){var e;for(e in
t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return
this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-
disabled ui-state-disabled",!!e).attr("aria-
disabled",e),this.hoverable.removeClass("ui-state-
hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function()
{return this._setOption("disabled",!1)},disable:function(){return
this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof
i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):
(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||
a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof
r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||
t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?
o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split("
").join(this.eventNamespace+" ")
+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i()
{return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return
setTimeout(i,e||0)},_hoverable:function(e)
{this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e)
{t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e)
{t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e)
{this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e)
{t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e)
{t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var
n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?
e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEven
t)for(n
in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!
(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||
i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i)
{t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var
a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof
n&&(n={duration:n}),a=!
t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.e
ffect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i)
{t(this)[e](),o&&o.call(s[0]),i()})}})}(jQuery),function(t){var e=!
1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",
{version:"1.10.3",options:
{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:functi
on(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return
e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!
0===t.data(i.target,e.widgetName+".preventClickEvent")?
(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagatio
n(),!1):undefined}),this.started=!1},_mouseDestroy:function()
{this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbi
nd("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.wid
getName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e)
{this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var
s=this,n=1===i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?
t(i.target).closest(this.options.cancel).length:!1;return n&&!
o&&this._mouseCapture(i)?(this.mouseDelayMet=!
this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function()
{s.mouseDelayMet=!
0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._m
ouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):
(!
0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,th
is.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return
s._mouseMove(t)},this._mouseUpDelegate=function(t){return
s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegat
e).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!
0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||
9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?
(this._mouseDrag(e),e.preventDefault()):
(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouse
Start(this._mouseDownEvent,e)!==!1,this._mouseStarted?
this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e)
{return
t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mo
useup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStar
ted=!
1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".prevent
ClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return
Math.max(Math.abs(this._mouseDownEvent.pageX-
t.pageX),Math.abs(this._mouseDownEvent.pageY-
t.pageY))>=this.options.distance},_mouseDelayMet:function(){return
this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function()
{},_mouseStop:function(){},_mouseCapture:function(){return!0}})}
(jQuery),function(t){t.widget("ui.draggable",t.ui.mouse,
{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!
0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!
1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!
1,opacity:!1,refreshPositions:!1,revert:!
1,revertDuration:500,scope:"default",scroll:!
0,scrollSensitivity:20,scrollSpeed:20,snap:!
1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!
1,drag:null,start:null,stop:null},_create:function(){"original"!
==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||
(this.element[0].style.position="relative"),this.options.addClasses&&this.element.a
ddClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-
disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-
draggable ui-draggable-dragging ui-draggable-
disabled"),this._mouseDestroy()},_mouseCapture:function(e){var
i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-
handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!
0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix'
style='background:
#fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",posi
tion:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")
}),!0):!1)},_mouseStart:function(e){var i=this.options;return
this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-
dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=t
his),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollP
arent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.
offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.position
Abs=this.element.offset(),this.offset={top:this.offset.top-
this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!
1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-
this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}
),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=
e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.curso
rAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):
(this._cacheHelperProportions(),t.ui.ddmanager&&!
i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!
0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i)
{if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffs
et()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositio
nTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return
this._mouseUp({}),!1;this.position=s.position}return
this.options.axis&&"y"===this.options.axis||
(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.o
ptions.axis||
(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.dr
ag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!
this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.d
ropped,this.dropped=!1),"original"!==this.options.helper||
t.contains(this.element[0].ownerDocument,this.element[0])?
("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||
this.options.revert===!0||
t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?
t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,1
0),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!
1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-
iframeFix").each(function()
{this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e
),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return
this.helper.is(".ui-draggable-dragging")?
this._mouseUp({}):this._clear(),this},_getHandle:function(e){return
this.options.handle?!!
t(e.target).closest(this.element.find(this.options.handle)).length:!
0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?
t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?
this.element.clone().removeAttr("id"):this.element;return
s.parents("body").length||s.appendTo("parent"===i.appendTo?
this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|
absolute)/.test(s.css("position"))||
s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e)
{"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||
0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in
e&&(this.offset.click.left=this.helperProportions.width-
e.right+this.margins.left),"top"in
e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in
e&&(this.offset.click.top=this.helperProportions.height-
e.bottom+this.margins.top)},_getParentOffset:function(){var
e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent
[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.sc
rollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),
(this.offsetParent[0]===document.body||
this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&
t.ui.ie)&&(e={top:0,left:0}),{top:e.top+
(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+
(parseInt(this.offsetParent.css("borderLeftWidth"),10)||
0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var
t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||
0)+this.scrollParent.scrollTop(),left:t.left-
(parseInt(this.helper.css("left"),10)||
0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function()
{this.margins={left:parseInt(this.element.css("marginLeft"),10)||
0,top:parseInt(this.element.css("marginTop"),10)||
0,right:parseInt(this.element.css("marginRight"),10)||
0,bottom:parseInt(this.element.css("marginBottom"),10)||
0}},_cacheHelperProportions:function()
{this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHei
ght()}},_setContainment:function(){var e,i,s,n=this.options;return
n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-
this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-
this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()
+t(window).width()-this.helperProportions.width-
this.margins.left,t(window).scrollTop()+(t(window).height()||
document.body.parentNode.scrollHeight)-this.helperProportions.height-
this.margins.top],undefined):"document"===n.containment?(this.contai
nment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,
(t(document).height()||document.body.parentNode.scrollHeight)-
this.helperProportions.height-
this.margins.top],undefined):n.containment.constructor===Array?
(this.containment=n.containment,undefined):
("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containm
ent),s=i[0],s&&(e="hidden"!
==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+
(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+
(parseInt(i.css("paddingTop"),10)||0),(e?
Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-
(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||
0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?
Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-
(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||
0)-this.helperProportions.height-this.margins.top-
this.margins.bottom],this.relative_container=i),undefined):
(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||
(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||
this.scrollParent[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent;return this.offset.scroll||
(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),
{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-
("fixed"===this.cssPosition?-
this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.rel
ative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-
this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:funct
ion(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||
this.scrollParent[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||
(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&
&(this.containment&&(this.relative_container?
(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[
1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,
e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-
this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-
this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-
this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?
this.originalPageY+Math.round((l-
this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-
this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-
this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?
this.originalPageX+Math.round((h-
this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-
this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-
this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+
("fixed"===this.cssPosition?-
this.scrollParent.scrollTop():this.offset.scroll.top),left:h-
this.offset.click.left-this.offset.relative.left-this.offset.parent.left+
("fixed"===this.cssPosition?-
this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function()
{this.helper.removeClass("ui-draggable-
dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||
this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!
1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,
[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.
prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function()
{return{helper:this.helper,position:this.position,originalPosition:this.originalPos
ition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",
{start:function(e,i){var s=t(this).data("ui-
draggable"),n=s.options,o=t.extend({},i,
{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var
i=t.data(this,"ui-sortable");i&&!
i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i
.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var
s=t(this).data("ui-draggable"),n=t.extend({},i,
{item:s.element});t.each(s.sortables,function(){this.instance.isOver?
(this.instance.isOver=0,s.cancelHelperRemoval=!
0,this.instance.cancelHelperRemoval=!
1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance
._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original
"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):
(this.instance.cancelHelperRemoval=!
1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var
s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!
1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.
helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersec
tsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return
this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperPro
portions,this.instance.offset.click=s.offset.click,this!
==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.inst
ance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||
(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").app
endTo(this.instance.element).data("ui-sortable-item",!
0),this.instance.options._helper=this.instance.options.helper,this.instance.options
.helper=function(){return
i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!
0),this.instance._mouseStart(e,!0,!
0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.lef
t=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-
this.instance.offset.parent.left,this.instance.offset.parent.top-
=s.offset.parent.top-
this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.
element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentI
tem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,thi
s.instance.cancelHelperRemoval=!0,this.instance.options.revert=!
1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instanc
e._mouseStop(e,!
0),this.instance.options.helper=this.instance.options._helper,this.instance.current
Item.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trig
ger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",
{start:function(){var e=t("body"),i=t(this).data("ui-
draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.c
ursor)},stop:function(){var e=t(this).data("ui-
draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add
("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-
draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity"
,n.opacity)},stop:function(e,i){var s=t(this).data("ui-
draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugi
n.add("draggable","scroll",{start:function(){var e=t(this).data("ui-
draggable");e.scrollParent[0]!==document&&"HTML"!
==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:funct
ion(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!
==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||
(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?
i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-
i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollPa
rent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||
(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?
i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-
i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scroll
Parent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-
t(document).scrollTop()<s.scrollSensitivity?
n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-
(e.pageY-
t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).
scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-
t(document).scrollLeft()<s.scrollSensitivity?
n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-
(e.pageX-
t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document
).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!
s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable",
"snap",{start:function(){var e=t(this).data("ui-
draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?
i.snap.items||":data(ui-draggable)":i.snap).each(function(){var
i=t(this),s=i.offset();this!
==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerH
eight(),top:s.top,left:s.left})})},drag:function(e,i){var
s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-
draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.w
idth,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-
1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u]
.top,c=l+p.snapElements[u].height,r-g>v||m>h+g||l-g>b||_>c+g||!
t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?
(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.
element,e,t.extend(p._uiHash(),
{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!
==f.snapMode&&(s=g>=Math.abs(l-b),n=g>=Math.abs(c-_),o=g>=Math.abs(r-
v),a=g>=Math.abs(h-m),s&&(i.position.top=p._convertPositionTo("relative",{top:l-
p.helperProportio
ns.height,left:0}).top-
p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",
{top:c,left:0}).top-
p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-
p.helperProportions.width}).left-
p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",
{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!
==f.snapMode&&(s=g>=Math.abs(l-_),n=g>=Math.abs(c-b),o=g>=Math.abs(r-
m),a=g>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",
{top:l,left:0}).top-
p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-
p.helperProportions.height,left:0}).top-
p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",
{top:0,left:r}).left-
p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-
p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||
n||o||a||
d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),
{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||
d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-
draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i)
{return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||
0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i)
{t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("dra
ggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-
draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.z
Index)},stop:function(e,i){var s=t(this).data("ui-
draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}
(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",
{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!
1,addClasses:!0,greedy:!1,hoverClass:!
1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out
:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!
1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){return t.is(i)
},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offset
Height},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||
[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClas
s("ui-droppable")},_destroy:function(){for(var
e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e+
+)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-
disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?
i:function(t){return
t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e
){var
i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.optio
ns.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e)
{var
i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.op
tions.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e)
{var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!
==this.element[0]&&this.accept.call(this.element[0],i.currentItem||
i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass
),this._trigger("over",e,this.ui(i)))},_out:function(e){var
i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!
==this.element[0]&&this.accept.call(this.element[0],i.currentItem||
i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverCl
ass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||
t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!
==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-
dragging").each(function(){var e=t.data(this,"ui-droppable");return
e.options.greedy&&!
e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s
.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,
{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!
1:this.accept.call(this.element[0],s.currentItem||s.element)?
(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.
options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger
("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t)
{return{draggable:t.currentItem||
t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.interse
ct=function(t,i,s){if(!i.offset)return!1;var n,o,a=(t.positionAbs||
t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||
t.position.absolute).top,l=h+t.helperProportions.height,c=i.offset.left,u=c+i.propo
rtions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return
a>=c&&u>=r&&h>=d&&p>=l;case"intersect":return a+t.helperProportions.width/2>c&&u>r-
t.helperProportions.width/2&&h+t.helperProportions.height/2>d&&p>l-
t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||
t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||
t.position.absolute).top+(t.clickOffset||
t.offset.click).top,e(o,d,i.proportions.height)&&e(n,c,i.proportions.width);case"to
uch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(a>=c&&u>=a||r>=c&&u>=r||
c>a&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":
[]},prepareOffsets:function(e,i){var
s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?
i.type:null,r=(e.currentItem||e.element).find(":data(ui-
droppable)").addBack();t:for(s=0;o.length>s;s++)if(!(o[s].options.disabled||e&&!
o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n+
+)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue
t}o[s].visible="none"!
==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o
[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].of
fsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!
1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function()
{this.options&&(!
this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&
&(s=this._drop.call(this,i)||s),!
this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem
||e.element)&&(this.isout=!0,this.isover=!
1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i)
{e.element.parentsUntil("body").bind("scroll.droppable",function()
{e.options.refreshPositions||
t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i)
{e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanag
er.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!
this.greedyChild&&this.visible){var
s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!
a&&this.isover?"isout":a&&!
this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.ele
ment.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-
droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-
droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!
0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!
1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!
1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i)
{e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositio
ns||t.ui.ddmanager.prepareOffsets(e,i)}}}(jQuery),function(t){function e(t){return
parseInt(t,10)||0}function i(t){return!
isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,
{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!
1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!
1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!
1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start
:null,stop:null},_create:function(){var
e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-
resizable"),t.extend(this,{_aspectRatio:!!
r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionall
yResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-
helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|
img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow:
hidden;'></div>").css({position:this.element.css("position"),width:this.element.out
erWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.e
lement.css("left")})),this.element=this.element.parent().data("ui-
resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!
0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:thi
s.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRigh
t"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.cs
s({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle
=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this.
_proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom
:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("ma
rgin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-
handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-
resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-
sw",ne:".ui-resizable-ne",nw:".ui-resizable-
nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.ha
ndles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length
>i;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle
"+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-
gripsmall-diagonal-se"),this.handles[s]=".ui-
resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||
this.element;for(i in
this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[
i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.ma
tch(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|
nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|
n/.test(i)?"Top":/se|sw|
s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proport
ionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._ha
ndles=t(".ui-resizable-
handle",this.element).disableSelection(),this._handles.mouseover(function()
{a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|
e|s|w)/i)),a.axis=n&&n[1]?
n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-
resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-
resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||
a.resizing||(t(this).addClass("ui-resizable-
autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function()
{this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-
resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-
resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return
this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({po
sition:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top
"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize
",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e)
{var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||
t.contains(s,e.target))&&(n=!0);return!
this.options.disabled&&n},_mouseStart:function(i){var
s,n,o,a=this.options,r=this.element.position(),h=this.element;return
this.resizing=!0,/absolute/.test(h.css("position"))?
h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-
draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy()
,s=e(this.helper.css("left")),n=e(this.helper.css("top")),a.cont
ainment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||
0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._he
lper?{width:h.outerWidth(),height:h.outerHeight()}:
{width:h.width(),height:h.height()},this.originalSize=this._helper?
{width:h.outerWidth(),height:h.outerHeight()}:
{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeD
iff={width:h.outerWidth()-h.width(),height:h.outerHeight()-
h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio=
"number"==typeof a.aspectRatio?
a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-
resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-
resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!
0},_mouseDrag:function(e){var
i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h
=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||
0,d=e.pageY-o.top||0,p=this._change[a];return p?(i=p.apply(this,
[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||
e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(
i),this._propagate("resize",e),this.position.top!
==r&&(n.top=this.position.top+"px"),this.position.left!
==h&&(n.left=this.position.left+"px"),this.size.width!
==l&&(n.width=this.size.width+"px"),this.size.height!
==c&&(n.height=this.size.height+"px"),s.css(n),!
this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize
(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!
1},_mouseStop:function(e){this.resizing=!1;var
i,s,n,o,a,r,h,l=this.options,c=this;return
this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[
0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?
0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-
n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||
null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||
null,l.animate||this.element.css(t.extend(a,
{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._
helper&&!
l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.elemen
t.removeClass("ui-resizable-
resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!
1},_updateVirtualBoundaries:function(t){var
e,s,n,o,a,r=this.options;a={minWidth:i(r.minWidth)?
r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?
r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||
t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,s=a.maxHeight*thi
s.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHei
ght&&(a.minHeight=n),a.maxWidth>s&&(a.maxWidth=s),a.maxHeight>o&&(a.maxHeight=o)),t
his._vBoundaries=a},_updateCache:function(t)
{this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&
(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(thi
s.size.width=t.width)},_updateRatio:function(t){var
e=this.position,s=this.size,n=this.axis;return i(t.height)?
t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"
sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+
(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t)
{var
e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=i(t.
height)&&e.maxHeight&&e.maxHeight<t.height,a=i(t.width)&&e.minWidth&&e.minWidth>t.w
idth,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+
this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|
w/.test(s),u=/nw|ne|n/.test(s);return
a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.hei
ght=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-
e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||
t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||
(t.left=null):t.top=null,t},_proportionallyResize:function()
{if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||
this.element;for(t=0;this._proportionallyResizeElements.length>t;t++)
{if(n=this._proportionallyResizeElements[t],!
this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightW
idth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),
n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e
++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||
0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-
this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var
e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?
(this.helper=this.helper||t("<div
style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:thi
s.element.outerWidth()-1,height:this.element.outerHeight()-
1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+
"px",zIndex:+
+i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.eleme
nt},_change:{e:function(t,e)
{return{width:this.originalSize.width+e}},w:function(t,e){var
i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-
e}},n:function(t,e,i){var
s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-
i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s)
{return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,
[e,i,s]))},sw:function(e,i,s){return
t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,
[e,i,s]))},ne:function(e,i,s){return
t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,
[e,i,s]))},nw:function(e,i,s){return
t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,
[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,
[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function()
{return{originalElement:this.originalElement,element:this.element,helper:this.helpe
r,position:this.position,size:this.size,originalSize:this.originalSize,originalPosi
tion:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",
{stop:function(e){var i=t(this).data("ui-
resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.t
est(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?
0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-
a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||
null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||
null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),
{duration:s.animateDuration,easing:s.animateEasing,step:function(){var
s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"
),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)
};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._pr
opagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",
{start:function(){var i,s,n,o,a,r,h,l=t(this).data("ui-
resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?
d.get(0):/parent/.test(d)?
u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?
(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={
element:t(document),left:0,top:0,width:t(document).width(),height:t(document).heigh
t()||document.body.parentNode.scrollHeight}):
(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n)
{s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.po
sition(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-
s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.h
asScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?
p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))}
,resize:function(e){var i,s,n,o,a=t(this).data("ui-
resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||
e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!
==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?
h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-
h.left:a.position.left-
u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?
h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?
a.position.top-
h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=
a._helper?
h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.
top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)
+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)
+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/rela
tive|absolute/.test(a.containerElement.css("position")),n&&o&&(i-
=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.
width-
i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.heig
ht&&(a.size.height=a.parentData.height-
s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var
e=t(this).data("ui-
resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElem
ent,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-
e.sizeDiff.height;e._helper&&!
i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-
s.left,width:h,height:l}),e._helper&&!
i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-
s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",
{start:function(){var
e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var
e=t(this);e.data("ui-resizable-alsoresize",
{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("l
eft"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||
i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?
(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t)
{s(t)})},resize:function(e,i){var s=t(this).data("ui-
resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.heig
ht-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||
0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var
e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?
s:e.parents(i.originalElement[0]).length?["width","height"]:
["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||
0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||
n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e)
{h(t,e)})},stop:function(){t(this).removeData("resizable-
alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var
e=t(this).data("ui-
resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opa
city:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0
,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?
i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-
resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.
size.width})},stop:function(){var e=t(this).data("ui-
resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.
plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-
resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="
number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||
1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-
n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p
>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d
+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?
(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?
(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?
(e.size.width=d,e.size.height=p,e.position.left=o.left-c):
(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-
c)}})}(jQuery),function(t){t.widget("ui.selectable",t.ui.mouse,
{version:"1.10.3",options:{appendTo:"body",autoRefresh:!
0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,s
top:null,unselected:null,unselecting:null},_create:function(){var
e,i=this;this.element.addClass("ui-selectable"),this.dragged=!
1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-
selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-
item",{element:this,
$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHe
ight(),startselected:!1,selected:e.hasClass("ui-
selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-
unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-
selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-
helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-
selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable
ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var
i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||
(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).
append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.
autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function()
{var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.
$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-
unselecting"),s.unselecting=!0,i._trigger("unselecting",e,
{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var
s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.
$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-
selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!
s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,
{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!
1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled)
{var
i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return
o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-
o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-
item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||
o>i.right||i.top>h||
a>i.bottom):"fit"===n.tolerance&&(l=i.left>o&&r>i.right&&i.top>a&&h>i.bottom),l?
(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!
1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!
1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!
0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||
e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!
1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-
selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-
unselecting"),i.unselecting=!0),s._trigger("unselecting",e,
{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.
$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-
unselecting"),i.unselecting=!0,s._trigger("unselecting",e,
{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return
this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var
s=t.data(this,"selectable-item");s.$element.removeClass("ui-
unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,
{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var
s=t.data(this,"selectable-item");s.$element.removeClass("ui-
selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!
0,i._trigger("selected",e,
{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}
(jQuery),function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|
right/.test(t.css("float"))||/inline|table-
cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,
{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:
{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!
1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!
1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!
0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:
1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,re
ceive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function
(){var t=this.options;this.containerCache={},this.element.addClass("ui-
sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||
i(this.items[0].item):!
1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!
0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-
disabled"),this._mouseDestroy();for(var t=this.items.length-
1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return
this},_setOption:function(e,i){"disabled"===e?
(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!
i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i
){var s=null,n=!1,o=this;return this.reverting?!
1:this.options.disabled||"static"===this.options.type?!1:
(this._refreshItems(e),t(e.target).parents().each(function(){return
t.data(this,o.widgetName+"-item")===o?(s=t(this),!
1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!
this.options.handle||i||
(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!
0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!
1)},_mouseStart:function(e,i,s){var
n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helpe
r=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.sc
rollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.of
fset={top:this.offset.top-this.margins.top,left:this.offset.left-
this.margins.left},t.extend(this.offset,{click:{left:e.pageX-
this.offset.left,top:e.pageY-
this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}
),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position
"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.
originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.dom
Position={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()
[0]},this.helper[0]!
==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containm
ent&&this._setContainment(),a.cursor&&"auto"!
==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("
cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !
important; }
</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacit
y=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this
.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.c
ss("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!
==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),th
is._trigger("start",e,this._uiHash()),this._preserveHelperProportions||
this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)th
is.containers[n]._trigger("activate",e,this._uiHash(this));return
t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!
a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!
0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!
0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!
1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositio
nTo("absolute"),this.lastPositionAbs||
(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!
==document&&"HTML"!==this.scrollParent[0].tagName?
(this.overflowOffset.top+this.scrollParent[0].offsetHeight-
e.pageY<a.scrollSensitivity?
this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pag
eY-
this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this
.scrollParent[0].scrollTop-
a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-
e.pageX<a.scrollSensitivity?
this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.p
ageX-
this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=th
is.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-
t(document).scrollTop()<a.scrollSensitivity?
r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-
(e.pageY-
t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).
scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?
r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-
(e.pageX-
t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document
).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!
a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._conv
ertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||
(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.o
ptions.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-
1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.ins
tance===this.currentContainer&&n!
==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!
t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!
t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!
==this.options.tolerance&&!this._intersectsWithSides(s))break;
this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return
this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigge
r("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!
1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!
this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var
s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||
(a.left=n.left-this.offset.parent.left-this.margins.left+
(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!
==o||(a.top=n.top-this.offset.parent.top-this.margins.top+
(this.offsetParent[0]===document.body?
0:this.offsetParent[0].scrollTop)),this.reverting=!
0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function()
{s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging)
{this._mouseUp({target:null}),"original"===this.options.helper?
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-
helper"):this.currentItem.show();for(var e=this.containers.length-
1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.c
ontainers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiH
ash(this)),this.containers[e].containerCache.over=0)}return
this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.r
emoveChild(this.placeholder[0]),"original"!
==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove()
,t.extend(this,{helper:null,dragging:!1,reverting:!
1,_noFinalSort:null}),this.domPosition.prev?
t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend
(this.currentItem)),this},serialize:function(e){var
i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function()
{var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-
=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!
s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var
i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function()
{s.push(t(e.item||
this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var
e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s
+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.off
set.click.top,c=this.offset.click.left,u="x"===this.options.axis||
s+l>r&&h>s+l,d="y"===this.options.axis||
e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||
this.options.forcePointerForContainers||"pointer"!
==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[
this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-
this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-
this.helperProportions.height/2},_intersectsWithPointer:function(t){var
i="x"===this.options.axis||
e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.a
xis||
e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDr
agVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?
a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!
1},_intersectsWithSides:function(t){var
i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.
positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVe
rticalDirection(),o=this._getDragHorizontalDirection();return
this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!
i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-
this.lastPositionAbs.top;return 0!
==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var
t=this.positionAbs.left-this.lastPositionAbs.left;return 0!
==t&&(t>0?"right":"left")},refresh:function(t){return
this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var
t=this.options;return t.connectWith.constructor===String?
[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var
i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-
1;i>=0;i--)for(n=t(h[i]),s=n.length-
1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!
o.options.disabled&&r.push([t.isFunction(o.options.items)?
o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-
helper").not(".ui-sortable-
placeholder"),o]);for(r.push([t.isFunction(this.options.items)?
this.options.items.call(this.element,null,
{options:this.options,item:this.currentItem}):t(this.options.items,this.element).no
t(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-
1;i>=0;i--)r[i][0].each(function(){a.push(this)});return
t(a)},_removeCurrentsFromItems:function(){var
e=this.currentItem.find(":data("+this.widgetName+"-
item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i+
+)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e)
{this.items=[],this.containers=[this];var
i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?
this.options.items.call(this.element[0],e,
{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectW
ith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-
1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!
o.options.disabled&&(u.push([t.isFunction(o.options.items)?
o.options.items.call(o.element[0],e,
{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));
for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s+
+)h=t(r[s]),h.data(this.widgetName+"-
item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPosition
s:function(e)
{this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var
i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!
==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||
(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||
(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=
o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.c
ustom.refreshContainers.call(this);else for(i=this.containers.length-
1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.
left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containe
rCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCa
che.height=this.containers[i].element.outerHeight();return
this},_createPlaceholder:function(e){e=e||this;var
i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||
(i=s.placeholder,s.placeholder={element:function(){var
s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||
e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-
helper");return"tr"===s?e.currentItem.children().each(function()
{t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||
1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||
n.css("visibility","hidden"),n},update:function(t,n){(!i||
s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-
parseInt(e.currentItem.css("paddingTop")||0,10)-
parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||
n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||
0,10)-parseInt(e.currentItem.css("paddingRight")||
0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.c
urrentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactCont
ainers:function(s){var
n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!
t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWi
th(this.containers[n].containerCache))
{if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.conta
iners[n],g=n}else
this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._
uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers
.length)this.containers[g].containerCache.over||
(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].contai
nerCache.over=1);else{for(a=1e4,r=null,p=f.floating||
i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]
+this.offset.click[h],o=this.items.length-
1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.it
ems[o].item[0]!==this.currentItem[0]&&(!p||
e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height
))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o]
[l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-
c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!
this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])retur
n;r?this._rearrange(s,r,null,!
0):this._rearrange(s,null,this.containers[g].element,!
0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,
this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placehold
er.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over
",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:fu
nction(e){var i=this.options,s=t.isFunction(i.helper)?
t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?
this.currentItem.clone():this.currentItem;return s.parents("body").length||
t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)
[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.curr
entItem[0].style.width,height:this.currentItem[0].style.height,position:this.curren
tItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("le
ft")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!
s[0].style.height||i.forceHelperSize)&&s.height(this.curr
entItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof
e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in
e&&(this.offset.click.left=e.left+this.margins.left),"right"in
e&&(this.offset.click.left=this.helperProportions.width-
e.right+this.margins.left),"top"in
e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in
e&&(this.offset.click.top=this.helperProportions.height-
e.bottom+this.margins.top)},_getParentOffset:function()
{this.offsetParent=this.helper.offsetParent();var
e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent
[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.sc
rollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),
(this.offsetParent[0]===document.body||
this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&
t.ui.ie)&&(e={top:0,left:0}),{top:e.top+
(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+
(parseInt(this.offsetParent.css("borderLeftWidth"),10)||
0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var
t=this.currentItem.position();return{top:t.top-
(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-
(parseInt(this.helper.css("left"),10)||
0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function()
{this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||
0,top:parseInt(this.currentItem.css("marginTop"),10)||
0}},_cacheHelperProportions:function()
{this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHei
ght()}},_setContainment:function(){var
e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parent
Node),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-
this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-
this.offset.parent.top,t("document"===n.containment?document:window).width()-
this.helperProportions.width-this.margins.left,(t("document"===n.containment?
document:window).height()||document.body.parentNode.scrollHeight)-
this.helperProportions.height-this.margins.top]),/^(document|window|parent)
$/.test(n.containment)||(e=t(n.containment)
[0],i=t(n.containment).offset(),s="hidden"!
==t(e).css("overflow"),this.containment=[i.left+
(parseInt(t(e).css("borderLeftWidth"),10)||0)+
(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+
(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||
0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-
(parseInt(t(e).css("borderLeftWidth"),10)||0)-
(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-
this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-
(parseInt(t(e).css("borderTopWidth"),10)||0)-
(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-
this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var
s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent,o=/(html|
body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.
parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?
0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*
s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?
0:n.scrollLeft())*s}},_generatePosition:function(e){var
i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||
this.scrollParent[0]!
==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?
this.scrollParent:this.offsetParent,h=/(html|
body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||
this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||
(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.conta
inment&&(e.pageX-
this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.clic
k.left),e.pageY-
this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click
.top),e.pageX-
this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.clic
k.left),e.pageY-
this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click
.top)),n.grid&&(i=this.originalPageY+Math.round((a-
this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-
this.offset.click.top>=this.containment[1]&&i-
this.offset.click.top<=this.containment[3]?i:i-
this.offset.click.top>=this.containment[1]?i-
n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-
this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-
this.offset.click.left>=this.containment[0]&&s-
this.offset.click.left<=this.containment[2]?s:s-
this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-
this.offset.click.top-this.offset.relative.top-this.offset.parent.top+
("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?
0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-
this.offset.parent.left+("fixed"===this.cssPosition?-
this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s)
{i?
i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeh
older[0],"down"===this.direction?
e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var
n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!
s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!
this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.c
urrentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in
this._storedCSS)
("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="
");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else
this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t)
{this._trigger("receive",t,this._uiHash(this.fromOutside))}),!
this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-
sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||
s.push(function(t){this._trigger("update",t,this._uiHash())}),this!
==this.currentContainer&&(e||(s.push(function(t)
{this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e)
{t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.p
ush(function(t){return function(e)
{t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=
this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e)
{t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),thi
s.containers[i].containerCache.over&&(s.push(function(t){return function(e)
{t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.conta
iners[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").c
ss("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&
&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css
("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!
1,this.cancelHelperRemoval){if(!e)
{for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i+
+)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return
this.fromOutside=!1,!1}if(e||
this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeC
hild(this.placeholder[0]),this.helper[0]!
==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e)
{for(i=0;s.length>i;i+
+)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return
this.fromOutside=!1,!0},_trigger:function()
{t.Widget.prototype._trigger.apply(this,arguments)===!
1&&this.cancel()},_uiHash:function(e){var i=e||
this;return{helper:i.helper,placeholder:i.placeholder||
t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,
item:i.currentItem,sender:e?e.element:null}}})}(jQuery),function(t,e){var i="ui-
effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||
{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?
e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var
s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var
a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||"rgba";return h?(a=s[l]
(h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?
("0,0,0,0"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return
i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var
o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor
borderTopColor color columnRuleColor outlineColor textDecorationColor
textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\
(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?
(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\
(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?
(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},
{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t)
{return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])
([a-f0-9])([a-f0-9])/,parse:function(t)
{return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},
{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\
%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t)
{return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new
t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:
{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:
{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:
{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:
{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p
.style.cssText="background-
color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-
1,f(c,function(t,e)
{e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototy
pe,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;
(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var
u=this,d=t.type(n),p=this._rgba=[];return a!
==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?
(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n
instanceof l?f(c,function(t,e)
{n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var
o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||
null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!
0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o]
[3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!
0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||
o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?
s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return
f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var
s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||
o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var
o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-
a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n]
(h)},blend:function(e){if(1===this._rgba[3])return this;var
i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e)
{return(1-s)*n[e]+s*t}))},toRgbaString:function(){var
e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return
1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var
e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?
1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return
1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var
i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t)
{return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function()
{return
0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.
hsla.to=function(t){if(null==t[0]||null==t[1]||
null==t[2])return[null,null,null,t[3]];var
e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r
-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-
n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?
1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||
null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?
s*(1+i):s+i-s*i,r=2*s-
a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a
,e-1/3)),o]},f(c,function(s,n){var
o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!
this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var
n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return
f(o,function(t,e){var s=u["object"===r?
t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?
(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var
o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h]
(),c=l[i.idx];return"undefined"===a?c:
("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:
("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-
1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split("
");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var
o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!
d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;
(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.paren
tNode}catch(h){}n=n.blend(r&&"transparent"!==r?
r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h)
{}}},t.fx.step[i]=function(e){e.colorInit||
(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!
0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHoo
ks.borderColor={expand:function(t){var e={};return
f(["Top","Right","Bottom","Left"],function(i,s)
{e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue
:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"
#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c
0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:
[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var
i,s,n=e.ownerDocument.defaultView?
e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.le
ngth&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof
n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof
n[i]&&(o[i]=n[i]);return o}function s(e,i){var s,n,a={};for(s in i)n=i[s],e[s]!
==n&&(o[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(a[s]=n));return a}var
n=["add","remove","toggle"],o={border:1,borderBottom:1,borderColor:1,borderLeft:1,b
orderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle
","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i)
{t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!
t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||
(t.fn.addBack=function(t){return this.add(null==t?
this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,
r){var h=t.speed(o,a,r);return this.queue(function(){var
o,a=t(this),r=a.attr("class")||"",l=h.children?
a.find("*").addBack():a;l=l.map(function(){var
e=t(this);return{el:e,start:i(this)}}),o=function(){t.each(n,function(t,i)
{e[i]&&a[i+"Class"](e[i])})},o(),l=l.map(function(){return
this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),a.attr("class",r),l=
l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!
1,complete:function(){i.resolve(e)}});return
this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function()
{o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t)
{e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e)
{return function(i,s,n,o){return s?t.effects.animateClass.call(this,
{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e)
{return function(i,s,n,o){return arguments.length>1?
t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}
(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r)
{return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:
{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,
{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return
t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function
s(e,i,s,n){return
t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&
(n=i,s=null,i={}),("number"==typeof i||
t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s|
|i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?
t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e)
{return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||
t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!
0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s+
+)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var
n,o;for(o=0;s.length>o;o++)null!
==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e)
{return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e)
{var i,s;switch(t[0])
{case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/
e.height}switch(t[1])
{case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/
e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-
wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!
0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-
wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padd
ing:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}cat
ch(a){o=document.body}return e.wrap(s),(e[0]===o||
t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?
(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,
{position:e.css("position"),zIndex:e.css("z-
index")}),t.each(["top","left","bottom","right"],function(t,s)
{i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative"
,top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper
:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-
wrapper")&&(e.parent().replaceWith(e),(e[0]===i||
t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||
{},t.each(i,function(t,i){var
o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function()
{function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var
n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r]
(),s()):a.call(n[0],i,s)}var
i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return
t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function()
{i.complete&&i.complete.call(this)}):o===!1?
this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e)
{if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return
i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return
function(e){if(n(e))return t.apply(this,arguments);var
i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}
(t.fn.hide),toggle:function(t){return
function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var
i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}
(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return
t.each(["em","px","%","pt"],function(t,e)
{i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var
e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e)
{return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-
Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-
t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-
1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-
2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return
1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i)
{t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-
t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()}
(jQuery),function(t){var
e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottom
Width="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomW
idth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:
{},collapsible:!1,event:"click",header:"> li > :first-child,>
:not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-
s",header:"ui-icon-triangle-1-
e"},activate:null,beforeActivate:null},_create:function(){var
e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion
ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!
1&&null!=e.active||
(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this
._refresh()},_getCreateEventData:function()
{return{header:this.active,panel:this.active.length?
this.active.next():t(),content:this.active.length?
this.active.next():t()}},_createIcons:function(){var
e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon
"+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-
icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-
accordion-icons"))
},_destroyIcons:function(){this.headers.removeClass("ui-accordion-
icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var
t;this.element.removeClass("ui-accordion ui-widget ui-helper-
reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-
accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-
active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-
selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-
accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.
headers.next().css("display","").removeAttr("role").removeAttr("aria-
expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-
helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-
content-active ui-state-disabled").each(function(){/^ui-
accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!
==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e)
{return"active"===t?(this._activate(e),undefined):
("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this.
_setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||
this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disab
led"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!
e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var
i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!
1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case
i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case
i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case
i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-
1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e
)
{e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh
:function(){var e=this.options;this._processPanels(),e.active===!
1&&e.collapsible===!0||!this.headers.length?(e.active=!
1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!
t.contains(this.element[0],this.active[0])?
this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!
1,this.active=t()):this._activate(Math.max(0,e.active-
1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},
_processPanels:function()
{this.headers=this.element.find(this.options.header).addClass("ui-accordion-header
ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-
accordion-content ui-helper-reset ui-widget-content ui-corner-
bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function()
{var
i,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-
accordion-"+(this.element.attr("id")||+
+e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-
state-active ui-corner-top").removeClass("ui-corner-
all"),this.active.next().addClass("ui-accordion-content-
active").show(),this.headers.attr("role","tab").each(function(e){var
i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-
header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-
controls",o),n.attr("aria-
labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr(
{"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-
hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-
selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-
hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._s
etupEvents(s.event),"fill"===n?
(i=o.height(),this.element.siblings(":visible").each(function(){var
e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!
0))}),this.headers.each(function(){i-=t(this).outerHeight(!
0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-
t(this).innerHeight()
+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().
each(function()
{i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e
){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||
this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop})
)},_findActive:function(e){return"number"==typeof e?
this.headers.eq(e):t()},_setupEvents:function(e){var
i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e)
{i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(t
his.headers,i),this._on(this.headers.next(),
{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.heade
rs)},_eventHandler:function(e){var
i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,
r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?
t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||
this._trigger("beforeActivate",e,l)===!1||(i.active=a?!
1:this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-
accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-
header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||
(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-
active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-
icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass
("ui-accordion-content-active")))},_toggle:function(e){var
i=e.newPanel,s=this.prevShow.length?
this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!
0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):
(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-
hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?
s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return
0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-
expanded":"true","aria-hidden":"false"}).prev().attr({"aria-
selected":"true",tabIndex:0})},_animate:function(t,e,n){var
o,a,r,h=this,l=0,c=t.length&&(!e.length||
t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function()
{h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof
d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?
(o=t.show().outerHeight(),e.animate(i,{duration:r,easing:a,step:function(t,e)
{e.now=Math.round(t)}}),t.hide().animate(s,
{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!
==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-
e.outerHeight()-
l),l=0)}}),undefined):e.animate(i,r,a,p):t.animate(s,r,a,p)},_toggleComplete:functi
on(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-
active").prev().removeClass("ui-corner-top").addClass("ui-corner-
all"),e.length&&(e.parent()[0].className=e.parent()
[0].className),this._trigger("activate",null,t)}})}(jQuery),function(t){var
e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:
{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left
bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,r
esponse:null,search:null,select:null},pending:0,_create:function(){var
e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.
isMultiLine=o?!0:a?!
1:this.element.prop("isContentEditable"),this.valueMethod=this.element[o||
a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-
input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n)
{if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!
1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!
0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!
0,this._move("nextPage",n);break;case o.UP:e=!
0,this._keyEvent("previous",n);break;case o.DOWN:e=!
0,this._keyEvent("next",n);break;case o.ENTER:case
o.NUMPAD_ENTER:this.menu.active&&(e=!
0,n.preventDefault(),this.menu.select(n));break;case
o.TAB:this.menu.active&&this.menu.select(n);break;case
o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.
preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s)
{if(e)return e=!1,(!this.isMultiLine||
this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var
n=t.ui.keyCode;switch(s.keyCode){case
n.PAGE_UP:this._move("previousPage",s);break;case
n.PAGE_DOWN:this._move("nextPage",s);break;case
n.UP:this._keyEvent("previous",s);break;case
n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!
1,t.preventDefault(),undefined):
(this._searchTimeout(t),undefined)},focus:function()
{this.selectedItem=null,this.previous=this._value()},blur:function(t){return
this.cancelBlur?(delete this.cancelBlur,undefined):
(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._ini
tSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-
front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-
menu"),this._on(this.menu.element,{mousedown:function(e)
{e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete
this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-
item").length||this._delay(function(){var
e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||
s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i)
{if(this.isNewMenu&&(this.isNewMenu=!
1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return
this.menu.blur(),this.document.one("mousemove",function()
{t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-
autocomplete-item");!1!==this._trigger("focus",e,{item:s})?
e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveR
egion.text(s.value)},menuselect:function(t,e){var
i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!
==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay
(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,
{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selected
Item=i}}),this.liveRegion=t("<span>",{role:"status","aria-
live":"polite"}).addClass("ui-helper-hidden-
accessible").insertBefore(this.element),this._on(this.window,
{beforeunload:function()
{this.element.removeAttr("autocomplete")}})},_destroy:function()
{clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-
input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remov
e()},_setOption:function(t,e)
{this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.elemen
t.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_append
To:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?
t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-
front")),e.length||(e=this.document[0].body),e},_initSource:function(){var
e,i,s=this;t.isArray(this.options.source)?
(e=this.options.source,this.source=function(i,s)
{s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?
(i=this.options.source,this.source=function(e,n)
{s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t
){n(t)},error:function()
{n([])}})}):this.source=this.options.source},_searchTimeout:function(t)
{clearTimeout(this.searching),this.searching=this._delay(function(){this.term!
==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)}
,search:function(t,e){return t=null!=t?
t:this._value(),this.term=this._value(),t.length<this.options.minLength?
this.close(e):this._trigger("search",e)!==!1?
this._search(t):undefined},_search:function(t){this.pending+
+,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!
1,this.source({term:t},this._response())},_response:function(){var t=this,i=+
+e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||
t.element.removeClass("ui-autocomplete-loading")}},__response:function(t)
{t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!
this.options.disabled&&t&&t.length&&!this.cancelSearch?
(this._suggest(t),this._trigger("open")):this._close()},close:function(t)
{this.cancelSearch=!0,this._close(t)},_close:function(t)
{this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.
isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!
==this._value()&&this._trigger("change",t,
{item:this.selectedItem})},_normalize:function(e){return
e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?
{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||
e.label},e)})},_suggest:function(e){var
i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!
0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.elem
ent},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:
function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()
+1,this.element.outerWidth()))},_renderMenu:function(e,i){var
s=this;t.each(i,function(t,i)
{s._renderItemData(e,i)})},_renderItemData:function(t,e){return
this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i)
{return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e)
{return this.menu.element.is(":visible")?
this.menu.isFirstItem()&&/^previous/.test(t)||
this.menu.isLastItem()&&/^next/.test(t)?
(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):
(this.search(null,e),undefined)},widget:function(){return
this.menu.element},_value:function(){return
this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!
this.isMultiLine||
this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend
(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}
()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var
s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return
s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,
{options:{messages:{noResults:"No search results.",results:function(t){return t+
(t>1?" results are":" result is")+" available, use up and down arrow keys to
navigate."}}},__response:function(t){var
e;this._superApply(arguments),this.options.disabled||this.cancelSearch||
(e=t&&t.length?
this.options.messages.results(t.length):this.options.messages.noResults,this.liveRe
gion.text(e))}})}(jQuery),function(t){var e,i,s,n,o="ui-button ui-widget ui-state-
default ui-corner-all",a="ui-state-hover ui-state-active ",r="ui-button-icons-only
ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-
text-icon-secondary ui-button-text-only",h=function(){var
e=t(this);setTimeout(function(){e.find(":ui-
button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return
i&&(i=i.replace(/'/g,"\\'"),n=s?
t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function()
{return!this.form})),n};t.widget("ui.button",
{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!
0,label:null,icons:{primary:null,secondary:null}},_create:function()
{this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this
.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!
this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),t
his._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var
a=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-
state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?
this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElem
ent),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter"+this.ev
entNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-
active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||
t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t)
{r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind(
"focus"+this.eventNamespace,function()
{a.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function()
{a.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespac
e,function(){n||
a.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t)
{r.disabled||(n=!
1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t)
{r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?
this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||
n?!1:undefined}):"radio"===this.type?
this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||
n)return!1;t(this).addClass("ui-state-active"),a.buttonElement.attr("aria-
pressed","true");var e=a.element[0];l(e).not(e).map(function(){return
t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-
pressed","false")}):
(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return
r.disabled?!1:(t(this).addClass("ui-state-
active"),e=this,a.document.one("mouseup",function()
{e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return
r.disabled?!1:(t(this).removeClass("ui-state-
active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return
r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||
e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-
active"),undefined)}).bind("keyup"+this.eventNamespace+"
blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-
active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e)
{e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.di
sabled),this._resetButton()},_determineButtonType:function(){var
t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[typ
e=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type
||"radio"===this.type?
(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")
+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?
t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElem
ent.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-
hidden-
accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-
state-active"),this.buttonElement.prop("aria-
pressed",i)):this.buttonElement=this.element},widget:function(){return
this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-
accessible"),this.buttonElement.removeClass(o+" "+a+"
"+r).removeAttr("role").removeAttr("aria-
pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||
this.buttonElement.removeAttr("title")},_setOption:function(t,e){return
this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!
0):this.element.prop("disabled",!1),undefined):
(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input,
button")?this.element.is(":disabled"):this.element.hasClass("ui-button-
disabled");e!
==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?
l(this.element[0]).each(function(){t(this).is(":checked")?
t(this).button("widget").addClass("ui-state-active").attr("aria-
pressed","true"):t(this).button("widget").removeClass("ui-state-
active").attr("aria-
pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?
this.buttonElement.addClass("ui-state-active").attr("aria-
pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-
pressed","false"))},_resetButton:function(){if("input"===this.type)return
this.options.label&&this.element.val(this.options.label),undefined;var
e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass(
"ui-button-
text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s
.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-
button-text-icon"+(n?"s":s.primary?"-primary":"-
secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon
"+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-
secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-
button-icons-only":"ui-button-icon-only"),this.hasTitle||
e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join("
"))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button,
input[type=button], input[type=submit], input[type=reset], input[type=checkbox],
input[type=radio], a, :data(ui-button)"},_create:function()
{this.element.addClass("ui-buttonset")},_init:function()
{this.refresh()},_setOption:function(t,e)
{"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:functi
on(){var
e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options
.items).filter(":ui-button").button("refresh").end().not(":ui-
button").button().end().map(function(){return t(this).button("widget")
[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-
right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-
left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-
right").end().end()},_destroy:function(){this.element.removeClass("ui-
buttonset"),this.buttons.map(function(){return t(this).button("widget")
[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}
(jQuery),function(t,e){function i(){this._curInst=null,this._keyEvent=!
1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!
1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-
inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-
trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-
datepicker-disabled",this._unselectableClass="ui-datepicker-
unselectable",this._currentClass="ui-datepicker-current-
day",this._dayOverClass="ui-datepicker-days-cell-
over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText
:"Next",currentText:"Today",monthNames:
["January","February","March","April","May","June","July","August","September","Oct
ober","November","December"],monthNamesShort:
["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:
["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesSh
ort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:
["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay
:0,isRTL:!1,showMonthAfterYear:!
1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:
{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!
1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!
1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!
1,showWeek:!
1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,du
ration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:nu
ll,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,a
ltField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!
1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div
id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-
helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-
datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return
e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!
==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-
prev-hover"),-1!==this.className.indexOf("ui-datepicker-
next")&&t(this).removeClass("ui-datepicker-next-
hover")}).delegate(i,"mouseover",function()
{t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||
(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-
hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-
datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!
==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-
next-hover"))})}function n(e,i){t.extend(e,i);for(var s in
i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:
{version:"1.10.3"}});var o,a="datepicker";t.extend(i.prototype,
{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return
this.dpDiv},setDefaults:function(t){return n(this._defaults,t||
{}),this},_attachDatepicker:function(e,i){var
s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||
(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i
||{}),"input"===s?
this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i)
{var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\
$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,d
rawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-
widget ui-widget-content ui-helper-clearfix ui-corner-
all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var
s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||
(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).k
eypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.se
ttings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var
s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(
),a&&(i.append=t("<span
class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"]
(i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=
this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),
("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage
"),i.trigger=t(this._get(i,"buttonImageOnly")?
t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button
type='button'></button>").addClass(this._triggerClass).html(o?
t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"]
(i.trigger),i.trigger.click(function(){return
t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?
t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastI
nput!==e[0]?
(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._s
howDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!
t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/
[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n+
+)t[n].length>i&&(i=t[n].length,s=n);return
s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDa
te(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-
o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:
function(e,i){var s=t(e);s.hasClass(this.markerClassName)||
(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,thi
s._getDefaultDate(i),!
0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._di
sableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,
s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||
(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"'
style='position: absolute; top: -100px; width:
0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogI
nput),p=this._dialogInst=this._newInst(this._dialogInput,!
1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||
{}),i=i&&i.constructor===Date?
this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:
[r.pageX,r.pageY]:null,this._pos||
(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=d
ocument.documentElement.scrollLeft||
document.body.scrollLeft,d=document.documentElement.scrollTop||
document.body.scrollTop,this._pos=[l/2-100+u,c/2-
150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"
px"),p.settings.onSelect=s,this._inDialog=!
0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0])
,t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDa
tepicker:function(e){var
i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(
),t.removeData(e,a),"input"===i?
(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("f
ocus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",thi
s._doKeyPress).unbind("keyup",this._doKeyUp)):
("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatep
icker:function(e){var
i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCas
e(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function()
{this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):
("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeCl
ass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-
year").prop("disabled",!
1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?
null:t}))},_disableDatepicker:function(e){var
i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCas
e(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function()
{this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):
("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass
("ui-state-disabled"),s.find("select.ui-datepicker-month,
select.ui-datepicker-year").prop("disabled",!
0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?
null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicke
r:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e+
+)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return
t.data(e,a)}catch(i){throw"Missing instance data for this
datepicker"}},_optionDatepicker:function(i,s,o){var
a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof
s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?
t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof
s&&(a={},a[s]=o),c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatep
icker(i,!
0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),nu
ll!==h&&a.dateFormat!
==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!
==l&&a.dateFormat!
==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in
a&&(a.disabled?
this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),thi
s._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c
)),e)},_changeDatepicker:function(t,e,i)
{this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var
e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e)
{var
i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlt
ernate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!
i.inline&&this._setDateFromField(i,e),i?
this._getDate(i):null},_doKeyDown:function(e){var
i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-
rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case
9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return
n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDi
v),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.
datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?
o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;
case 27:t.datepicker._hideDatepicker();break;case
33:t.datepicker._adjustDate(e.target,e.ctrlKey?-
t.datepicker._get(o,"stepBigMonths"):-
t.datepicker._get(o,"stepMonths"),"M");break;case
34:t.datepicker._adjustDate(e.target,e.ctrlKey?
+t.datepicker._get(o,"stepBigMonths"):
+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||
e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:
(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||
e.metaKey;break;case 37:(e.ctrlKey||
e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||
e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-
t.datepicker._get(o,"stepBigMonths"):-
t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||
e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||
e.metaKey;break;case 39:(e.ctrlKey||
e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||
e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?
+t.datepicker._get(o,"stepBigMonths"):
+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||
e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||
e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?
t.datepicker._showDatepicker(this):a=!
1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var
s,n,o=t.datepicker._getInst(i.target);return t.datepicker._get(o,"constrainInput")?
(s=t.datepicker._possibleChars(t.datepicker._get(o,"dateFormat")),n=String.fromChar
Code(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||
s.indexOf(n)>-1):e},_doKeyUp:function(e){var
i,s=t.datepicker._getInst(e.target);if(s.input.val()!
==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?
s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromF
ield(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n
){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!
==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!
t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var
i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curIn
st!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!
0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._c
urInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!
1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateF
romField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||
(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a
=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!
a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i
.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-
1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dp
Div.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",d
isplay:"none",left:r.left+"px",top:r.top+"px"}),i.inline||
(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex
(t(e).zIndex()+1),t.datepicker._datepickerShowing=!
0,t.effects&&t.effects.effect[h]?
i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?
l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i)
)}},_updateDatepicker:function(e)
{this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandl
ers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var
i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-
multi-2 ui-datepicker-multi-3 ui-datepicker-multi-
4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-
multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")
+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")
+"Class"]("ui-datepicker-
rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._sho
uldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function()
{i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-
year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:fu
nction(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!
t.input.is(":focus")},_checkOffset:function(e,i,s){var
n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?
e.input.outerWidth():0,r=e.input?
e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?
0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?
0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-
=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-
=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-
=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-
=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var
i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||
t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return
i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var
i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||
this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=fun
ction(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||
t.effects[i])?
r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"sli
deUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!
1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?
r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({p
osition:"absolute",left:"0",top:"-
100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!
1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-
datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst)
{var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!
==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!
i.hasClass(t.datepicker.markerClassName)&&!
i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&
(!t.datepicker._inDialog||!t.blockUI)||
i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!
==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var
n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||
(this._adjustInstDate(o,i+("M"===s?
this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:functi
on(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?
(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n
.selectedYear=n.currentYear):(i=new
Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=
n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectM
onthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+
("M"===s?"Month":"Year")]=o["draw"+
("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notif
yChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var
o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||
(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o
.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(
o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var
i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var
s,n=t(e),o=this._getInst(n[0]);i=null!=i?
i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(
o,"onSelect"),s?s.apply(o.input?o.input[0]:null,
[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):
(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof
o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var
i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||
this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatC
onfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var
e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new
Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||
7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-
i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid
arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var
o,a,r,h,l=0,c=(n?n.shortYearCutoff:null)||
this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()
%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?
n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||
this._defaults.monthNamesShort,g=(n?n.monthNames:null)||
this._defaults.monthNames,m=-1,v=-1,_=-1,b=-1,y=!1,w=function(t){var
e=i.length>o+1&&i.charAt(o+1)===t;return e&&o++,e},k=function(t){var
e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?
3:2,n=RegExp("^\\d{1,"+i+"}"),o=s.substring(l).match(n);if(!o)throw"Missing number
at position "+l;return l+=o[0].length,parseInt(o[0],10)},x=function(i,n,o){var a=-
1,r=t.map(w(i)?o:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-
(t[1].length-e[1].length)});if(t.each(r,function(t,i){var n=i[1];return
s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(a=i[0],l+=n.length,!1):e}),-
1!==a)return a+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!
==i.charAt(o))throw"Unexpected literal at position "+l;l++};for(o=0;i.length>o;o+
+)if(y)"'"!==i.charAt(o)||w("'")?D():y=!1;else switch(i.charAt(o))
{case"d":_=k("d");break;case"D":x("D",d,p);break;case"o":b=k("o");break;case"m":v=k
("m");break;case"M":v=x("M",f,g);break;case"y":m=k("y");break;case"@":h=new
Date(k("@")),m=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new
Date((k("!")-this._ticksTo1970)/1e4),m=h.getFullYear(),v=h.getMonth()
+1,_=h.getDate();break;case"'":w("'")?D():y=!
0;break;default:D()}if(s.length>l&&(r=s.substr(l),!/^\s+/.test(r)))throw"Extra/unpa
rsed characters found in date: "+r;if(-1===m?m=(new
Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()
%100+(u>=m?0:-100)),b>-1)for(v=1,_=b;;){if(a=this._getDaysInMonth(m,v-
1),a>=_)break;v++,_-=a}if(h=this._daylightSavingAdjust(new Date(m,v-
1,_)),h.getFullYear()!==m||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid
date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D,
d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d
M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-
dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-
Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var
s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||
this._defaults.dayNames,a=(i?i.monthNamesShort:null)||
this._defaults.monthNamesShort,r=(i?i.monthNames:null)||
this._defaults.monthNames,h=function(e){var
i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var
s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?
s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?
u+=t.charAt(s):d=!1;else switch(t.charAt(s))
{case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"
o":u+=l("o",Math.round((new
Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new
Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()
+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?
e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()
%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()
+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!
0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!
1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e+
+,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else
switch(t.charAt(e))
{case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return
null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return
i},_get:function(t,i){return t.settings[i]!==e?
t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!
==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?
t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=t
his.parseDate(i,s,a)||n}catch(r)
{s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.draw
Year=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?
o.getMonth():0,t.currentYear=s?
o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return
this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new
Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return
e.setDate(e.getDate()+t),e},o=function(i){try{return
t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatC
onfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?
t.datepicker._getDate(e):null)||new
Date,o=n.getFullYear(),a=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|
M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d")
{case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);
break;case"m":case"M":a+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDaysInMont
h(o,a));break;case"y":case"Y":o+=parseInt(l[1],10),r=Math.min(r,t.datepicker._getDa
ysInMonth(o,a))}l=h.exec(i)}return new Date(o,a,r)},a=null==i||""===i?
s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new
Date(i.getTime());return a=a&&"Invalid Date"==""+a?
s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._d
aylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?
(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var
s=!
e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t
,e,new
Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.current
Month=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.se
lectedMonth&&o===t.selectedYear||i||
this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._forma
tDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?
null:this._daylightSavingAdjust(new
Date(t.currentYear,t.currentMonth,t.currentDay));return
e},_attachHandlers:function(e){var
i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-
handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-
i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function()
{t.datepicker._hideDatepicker()},today:function()
{t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,
+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!
1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!
1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!
1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-
handler")])})},_generateHTML:function(t){var
e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,k,x,D,C,I,P,T,M,S,z,A,H,E,N,W,O,F,R,L=new
Date,j=this._daylightSavingAdjust(new
Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(t,"isRTL"),B=this._get(
t,"showButtonPanel"),V=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsD
ateFormat"),U=this._getNumberOfMonths(t),q=this._get(t,"showCurrentAtPos"),Q=this._
get(t,"stepMonths"),X=1!==U[0]||1!==U[1],$=this._daylightSavingAdjust(t.currentDay?
new Date(t.currentYear,t.currentMonth,t.currentDay):new
Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.d
rawMonth-
q,te=t.drawYear;if(0>Z&&(Z+=12,te--),J)for(e=this._daylightSavingAdjust(new
Date(J.getFullYear(),J.getMonth()-U[0]*U[1]+1,J.getDate())),e=G&&G>e?
G:e;this._daylightSavingAdjust(new
Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t
,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-
Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-
datepicker-prev ui-corner-all' data-handler='prev' data-event='click'
title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")
+"'>"+i+"</span></a>":V?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-
disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")
+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?
this.formatDate(n,this._daylightSavingAdjust(new
Date(te,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,te,Z)?"<a
class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'
title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")
+"'>"+n+"</span></a>":V?"":"<a class='ui-datepicker-next ui-corner-all ui-state-
disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")
+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.
currentDay?$:j,a=K?
this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button
type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-
corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")
+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?
h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-
state-default ui-priority-secondary ui-corner-all' data-handler='today' data-
event='click'>"+a+"</button>":"")+(Y?"":h)
+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?
0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"
),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"befor
eShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=th
is._getDefaultDate(t),y="",k=0;U[0]>k;k++){for(x="",this.maxRows=4,D=0;U[1]>D;D++)
{if(C=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),I=" ui-corner-
all",P="",X){if(P+="<div class='ui-datepicker-group",U[1]>1)switch(D){case 0:P+="
ui-datepicker-group-first",I=" ui-corner-"+(Y?"right":"left");break;case U[1]-
1:P+=" ui-datepicker-group-last",I=" ui-corner-"+
(Y?"left":"right");break;default:P+=" ui-datepicker-group-
middle",I=""}P+="'>"}for(P+="<div class='ui-datepicker-header ui-widget-header ui-
helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===k?Y?o:s:"")+(/all|
right/.test(I)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,te,G,J,k>0||
D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",T=u?"<th
class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;7>w;w+
+)M=(w+c)%7,T+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span
title='"+d[M]+"'>"+p[M]
+"</span></th>";for(P+=T+"</tr></thead><tbody>",S=this._getDaysInMonth(te,Z),te===t
.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(th
is._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((z+S)/7),H=X?this.maxRows>A?
this.maxRows:A:A,this.maxRows=H,E=this._daylightSavingAdjust(new Date(te,Z,1-
z)),N=0;H>N;N++){for(P+="<tr>",W=u?"<td class='ui-datepicker-week-
col'>"+this._get(t,"calculateWeek")(E)+"</td>":"",w=0;7>w;w++)O=m?m.apply(t.input?
t.input[0]:null,[E]):[!0,""],F=E.getMonth()!==Z,R=F&&!_||!O[0]||G&&G>E||
J&&E>J,W+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-
datepicker-other-month":"")+
(E.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||
b.getTime()===E.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+
(R?"
"+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+
(E.getTime()===$.getTime()?" "+this._currentClass:"")+(E.getTime()===j.getTime()?"
ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":"
title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-
event='click' data-month='"+E.getMonth()+"' data-year='"+E.getFullYear()+"'")+">"+
(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+E.getDate()+"</span>":"<a
class='ui-state-default"+(E.getTime()===j.getTime()?" ui-state-highlight":"")+
(E.getTime()===$.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")
+"' href='#'>"+E.getDate()+"</a>")+"</td>",E.setDate(E.getDate()
+1),E=this._daylightSavingAdjust(E);P+=W+"</tr>"}Z++,Z>11&&(Z=0,te+
+),P+="</tbody></table>"+(X?"</div>"+(U[0]>0&&D===U[1]-1?"<div class='ui-
datepicker-row-break'></div>":""):""),x+=P}y+=x}return y+=l,t._keyEvent=!
1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var
h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._ge
t(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!
m)y+="<span class='ui-datepicker-month'>"+a[e]
+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select
class='ui-datepicker-month' data-handler='selectMonth' data-
event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||
n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")
+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!
t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-
year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new
Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?
i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?
d+parseInt(t,10):parseInt(t,10);return isNaN(e)?
d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?
Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year'
data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option
value='"+f+"'"+(f===i?" selected='selected'":"")
+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return
b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")
+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?
e:0),n=t.drawMonth+("M"===i?
e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?
e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new
Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.
drawYear=t.selectedYear=a.getFullYear(),
("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var
i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return
s&&n>s?s:n},_notifyChange:function(t){var
e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,
[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var
e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?
[1,e]:e},_getMinMaxDate:function(t,e){return
this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e)
{return 32-this._daylightSavingAdjust(new
Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new
Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var
n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(0>e?
e:n[0]*n[1]),1));return
0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(
t,o)},_isInRange:function(t,e){var
i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=t
his._get(t,"yearRange");return h&&(i=h.split(":"),s=(new
Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/
[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!
o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||
r>=e.getFullYear())},_getFormatConfig:function(t){var
e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new
Date).getFullYear()%100+parseInt(e,10),
{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,
"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"
monthNames")}},_formatDate:function(t,e,i,s){e||
(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selected
Year);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new
Date(s,i,e)):this._daylightSavingAdjust(new
Date(t.currentYear,t.currentMonth,t.currentDay));return
this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datep
icker=function(e){if(!this.length)return this;t.datepicker.initialized||
(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!
0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);
var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof
e||"isDisabled"!==e&&"getDate"!==e&&"widget"!
==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?
t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,
[this[0]].concat(i)):this.each(function(){"string"==typeof e?
t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,
[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Date
picker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new
i,t.datepicker.initialized=!1,t.datepicker.uuid=(new
Date).getTime(),t.datepicker.version="1.10.3"}(jQuery),function(t){var e={buttons:!
0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!
0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",
{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!
0,closeText:"close",dialogClass:"",draggable:!
0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,m
odal:!1,position:
{my:"center",at:"center",of:window,collision:"fit",using:function(e){var
i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!
0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:nu
ll,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null}
,_create:function()
{this.originalCss={display:this.element[0].style.display,width:this.element[0].styl
e.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.m
axHeight,height:this.element[0].style.height},this.originalPosition={parent:this.el
ement.parent(),index:this.element.parent().children().index(this.element)},this.ori
ginalTitle=this.element.attr("title"),this.options.title=this.options.title||
this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").ad
dClass("ui-dialog-content ui-widget-
content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),t
his.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable
&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function()
{this.options.autoOpen&&this.open()},_appendTo:function(){var
e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?
t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var
t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().remo
veClass("ui-dialog-content ui-widget-
content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!
0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.p
arent.children().eq(e.index),t.length&&t[0]!==this.element[0]?
t.before(this.element):e.parent.append(this.element)},widget:function(){return
this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var
i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!
1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||
t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide
,function(){i._trigger("close",e)}))},isOpen:function(){return
this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var
i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return
i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?
(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!
0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this.
_createOverlay(),this._moveToTop(null,!
0),this._show(this.uiDialog,this.options.show,function()
{e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusT
abbable:function(){var t=this.element.find("[autofocus]");t.length||
(t=this.element.find(":tabbable")),t.length||
(t=this.uiDialogButtonPane.find(":tabbable")),t.length||
(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||
(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var
e=this.document[0].activeElement,i=this.uiDialog[0]===e||
t.contains(this.uiDialog[0],e);i||
this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrappe
r:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-
content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-
1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,
{keydown:function(e){if(this.options.closeOnEscape&&!
e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return
e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var
i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target
!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!
==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):
(s.focus(1),e.preventDefault())}},mousedown:function(t)
{this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-
describedby]").length||this.uiDialog.attr({"aria-
describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var
e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header
ui-corner-all ui-helper-
clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,
{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||
this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({
label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!
1}).addClass("ui-dialog-titlebar-
close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,
{click:function(t)
{t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-
title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-
labelledby":e.attr("id")})},_title:function(t){this.options.title||
t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function()
{this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-
content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-
buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons
:function(){var e=this,i=this.options.buttons;return
this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||
t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):
(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?
{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function()
{n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete
s.icons,delete
s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDial
og.addClass("ui-dialog-
buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggabl
e:function(){function e(t){return{position:t.position,offset:t.offset}}var
i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-
dialog-titlebar-close",handle:".ui-dialog-
titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-
dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s)
{i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-
i.document.scrollLeft(),o.position.top-
i.document.scrollTop()],t(this).removeClass("ui-dialog-
dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:func
tion(){function e(t)
{return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.
position,size:t.size}
}var
i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typ
eof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-
content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeig
ht:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:func
tion(s,n){t(this).addClass("ui-dialog-
resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s)
{i._trigger("resize",t,e(s))},stop:function(n,o)
{s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-
resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)}
,_minHeight:function(){var t=this.options;return"auto"===t.height?
t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var
t=this.uiDialog.is(":visible");t||
this.uiDialog.show(),this.uiDialog.position(this.options.position),t||
this.uiDialog.hide()},_setOptions:function(s){var n=this,o=!
1,a={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(o=!0),t in
i&&(a[t]=s)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-
resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var
i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addC
lass(e),"disabled"!
==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"bu
ttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.butto
n({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!
e&&n.draggable("destroy"),!
i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n
.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof
e&&n.resizable("option","handles",e),s||e===!1||
this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-
dialog-title")))},_size:function(){var
t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"n
one",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({heigh
t:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-
t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-
t):"none","auto"===s.height?
this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.
max(0,s.height-t)),this.uiDialog.is(":data(ui-
resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blo
ckFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function()
{var e=t(this);return
t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).a
ppendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function()
{this.iframeBlocks&&(this.iframeBlocks.remove(),delete
this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-
dialog").length?!0:!!t(e.target).closest(".ui-
datepicker").length},_createOverlay:function(){if(this.options.modal){var
e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function()
{t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s)
{e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-
content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-
widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,
{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances+
+}},_destroyOverlay:function()
{this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.over
layInstances||
this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),
t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!
1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var
e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof
i&&"0"in i)&&(s=i.split?i.split(" "):
[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e)
{+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+"
"+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join("
")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototy
pe.options.position,e=this.uiDialog.is(":visible"),e||
this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}
(jQuery),function(t){var e=/up|down|vertical/,i=/up|left|vertical|
horizontal/;t.effects.effect.blind=function(s,n){var
o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.e
ffects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"widt
h",f=d?"top":"left",g=i.test(u),m={},v="show"===c;h.parent().is(".ui-effects-
wrapper")?
t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper
(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||
(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),
m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,
{duration:s.duration,easing:s.easing,queue:!1,complete:function()
{"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}
(jQuery),function(t){t.effects.effect.bounce=function(e,i){var
s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.e
ffects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=
e.distance,p=e.times||5,f=2*p+(c||l?
1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"lef
t"===u,b=a.queue(),y=b.length;for((c||
l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||
(d=a["top"===v?"outerHeight":"outerWidth"]
()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-
d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;p>s;s+
+)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?
2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function()
{l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.
apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(jQuery),function(t)
{t.effects.effect.clip=function(e,i){var
s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.e
ffects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical
"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.e
ffects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d]
(),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!
1,duration:e.duration,easing:e.easing,complete:function(){l||
a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}
(jQuery),function(t){t.effects.effect.drop=function(e,i){var
s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"]
,a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===
h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?
1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||
n["top"===l?"outerHeight":"outerWidth"](!
0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-
=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!
1,duration:e.duration,easing:e.easing,complete:function()
{"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}
(jQuery),function(t){t.effects.effect.explode=function(e,i){function s()
{b.push(this),b.length===u*d&&n()}function n()
{p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var
o,a,r,h,l,c,u=e.pieces?
Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide
"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerW
idth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*_,c=o-
(u-1)/2,a=0;d>a;a++)r=m.left+a*v,l=a-(d-
1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibi
lity:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-
explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?
l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?
0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(jQuery),function(t)
{t.effects.effect.fade=function(e,i){var
s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!
1,duration:e.duration,easing:e.easing,complete:i})}}(jQuery),function(t)
{t.effects.effect.fold=function(e,i){var
s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.eff
ects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)
%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:
["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effect
s.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:
[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?
{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?
n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function()
{l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}
(jQuery),function(t){t.effects.effect.highlight=function(e,i){var
s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e
.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=
0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color
||"#ffff99"}).animate(a,{queue:!
1,duration:e.duration,easing:e.easing,complete:function()
{"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(jQuery),function(t)
{t.effects.effect.pulsate=function(e,i){var
s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"h
ide"===o,l=2*(e.times||5)+(h?
1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((a||!
n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s+
+)n.animate({opacity:u},c,e.easing),u=1-
u;n.animate({opacity:u},c,e.easing),n.queue(function()
{r&&n.hide(),i()}),p>1&&d.splice.apply(d,
[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(jQuery),function(t)
{t.effects.effect.puff=function(e,i){var
s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,1
0)||
150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerW
idth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!
0,mode:n,complete:i,percent:o?a:100,from:o?h:
{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWi
dth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var
s=t(this),n=t.extend(!0,
{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||
(0===parseInt(e.percent,10)?0:"hide"===o?
0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerH
eight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?
a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!
==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?
{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.
width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show
"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity
=0)),s.effect(n)},t.effects.effect.size=function(e,i){var
s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overf
low","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l
=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidt
h","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLe
ft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!
==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?
r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:
a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"
toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||
("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:
{y:a.from.height/s.height,x:a.from.width/s.width},to:
{y:a.to.height/s.height,x:a.to.width/s.width}},("box"===g||"both"===g)&&(o.from.y!
==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t
.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!
==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t
.effects.setTransition(a,d,o.to.x,a.to))),("content"===g||"both"===g)&&o.from.y!
==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.fr
om),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.e
ffects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getB
aseline(m,s),a.from.top=(s.outerHeight-
a.outerHeight())*n.y,a.from.left=(s.outerWidth-
a.outerWidth())*n.x,a.to.top=(s.outerHeight-
a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),
("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=
d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").e
ach(function(){var
i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWid
th:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.
width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x}
,i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,oute
rWidth:s.width*o.to.x},o.from.y!
==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTr
ansition(i,u,o.to.y,i.to)),o.from.x!
==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTr
ansition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,functio
n(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!
1,duration:e.duration,easing:e.easing,complete:function()
{0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.r
estore(a,_),f||("static"===v?
a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],func
tion(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?
a.to.left:a.to.top;return"auto"===i?
n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(jQuery),function(t)
{t.effects.effect.shake=function(e,i){var
s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effec
ts.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||
3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r
||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show()
,t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-
=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s+
+)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u
/2,e.easing).queue(function()
{"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&
v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(jQuery),function(t)
{t.effects.effect.slide=function(e,i){var
s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effec
ts.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"=
==h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.dista
nce||n["top"===l?"outerHeight":"outerWidth"](!
0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?
isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!
1,duration:e.duration,easing:e.easing,complete:function()
{"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}
(jQuery),function(t){t.effects.effect.transfer=function(e,i){var
s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?
a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-
h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-
effects-
transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-
r,left:u.left-
h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).anima
te(c,e.duration,e.easing,function(){d.remove(),i()})}}(jQuery),function(t)
{t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:
{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right
top"},role:"menu",blur:null,focus:null,select:null},_create:function()
{this.activeMenu=this.element,this.mouseHandled=!
1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-
all").toggleClass("ui-menu-icons",!!this.element.find(".ui-
icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNam
espace,t.proxy(function(t)
{this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.elem
ent.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown
.ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled >
a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var
i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-
disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?
this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!
0]),this.active&&1===this.active.parents(".ui-
menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e)
{var i=t(e.currentTarget);i.siblings().children(".ui-state-
active").removeClass("ui-state-
active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-
menu":"collapseAll",focus:function(t,e){var i=this.active||
this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e)
{this._delay(function()
{t.contains(this.element[0],this.document[0].activeElement)||
this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,
{click:function(e){t(e.target).closest(".ui-menu").length||
this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function()
{this.element.removeAttr("aria-activedescendant").find(".ui-
menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-
menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-
labelledby").removeAttr("aria-expanded").removeAttr("aria-
hidden").removeAttr("aria-
disabled").removeUniqueId().show(),this.element.find(".ui-menu-
item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-
disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-
hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-
haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-
carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-
divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/
[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case
t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case
t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case
t.ui.keyCode.HOME:this._move("first","first",e);break;case
t.ui.keyCode.END:this._move("last","last",e);break;case
t.ui.keyCode.UP:this.previous(e);break;case
t.ui.keyCode.DOWN:this.next(e);break;case
t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!
this.active.is(".ui-state-disabled")&&this.expand(e);break;case
t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case
t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!
1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!
1,clearTimeout(this.filterTimer),o===n?a=!
0:o=n+o,r=RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-
item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&-1!
==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||
(o=String.fromCharCode(e.keyCode),r=RegExp("^"+i(o),"i"),s=this.activeMenu.children
(".ui-menu-item").filter(function(){return
r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?
(this.previousFilter=o,this.filterTimer=this._delay(function(){delete
this.previousFilter},1e3)):delete this.previousFilter):delete
this.previousFilter}h&&e.preventDefault()},_activate:function(t)
{this.active.is(".ui-state-disabled")||(this.active.children("a[aria-
haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var
e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":n
ot(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-
all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-
expanded":"false"}).each(function(){var
e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-
menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-
labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-
item):has(a)").addClass("ui-menu-
item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-
all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-
item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||
e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-
disabled").attr("aria-disabled","true"),this.active&&!
t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function()
{return{menu:"menuitem",listbox:"option"}
[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-
menu-
icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)
},focus:function(t,e){var
i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),
s=this.active.children("a").addClass("ui-state-
focus"),this.options.role&&this.element.attr("aria-
activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-
item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?
this._close():this.timer=this._delay(function()
{this._close()},this.delay),i=e.children(".ui-
menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.par
ent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var
i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWid
th"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-
this.activeMenu.offset().top-i-
s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),0>n?
this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-
a+r))},blur:function(t,e){e||
clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-
state-focus"),this.active=null,this._trigger("blur",t,
{item:this.active}))},_startOpening:function(t)
{clearTimeout(this.timer),"true"===t.attr("aria-
hidden")&&(this.timer=this._delay(function()
{this._close(),this._open(t)},this.delay))},_open:function(e){var
i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.el
ement.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-
hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-
expanded","true").position(i)},collapseAll:function(e,i)
{clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?
this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||
(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close
:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-
menu").hide().attr("aria-hidden","true").attr("aria-
expanded","false").end().find("a.ui-state-active").removeClass("ui-state-
active")},collapse:function(t){var
e=this.active&&this.active.parent().closest(".ui-menu-
item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t
){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-
item").first();e&&e.length&&(this._open(e.parent()),this._delay(function()
{this.focus(t,e)}))},next:function(t)
{this._move("next","first",t)},previous:function(t)
{this._move("prev","last",t)},isFirstItem:function(){return this.active&&!
this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return
this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i)
{var s;this.active&&(s="first"===t||"last"===t?
this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-
1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||
(s=this.activeMenu.children(".ui-menu-item")[e]
()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?
(this.isLastItem()||(this._hasScroll()?
(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-
item").each(function(){return i=t(this),0>i.offset().top-s-
n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")
[this.active?"last":"first"]())),undefined):
(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?
(this.isFirstItem()||(this._hasScroll()?
(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-
item").each(function(){return i=t(this),i.offset().top-
s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-
item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return
this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e)
{this.active=this.active||t(e.target).closest(".ui-menu-item");var
i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!
0),this._trigger("select",e,i)}})}(jQuery),function(t,e){function i(t,e,i)
{return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?
i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var
i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:
{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:
{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:
{top:i.pageY,left:i.pageX}}:
{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var
o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|
bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%
$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var
i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div
style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return
t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===
s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var
i=e.isWindow?"":e.element.css("overflow-
x"),s=e.isWindow?"":e.element.css("overflow-
y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"a
uto"===s&&e.height<e.element[0].scrollHeight;return{width:o?
t.position.scrollbarWidth():0,height:n?
t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||
window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||
{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?
i.width():i.outerWidth(),height:s?
i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return
f.apply(this,arguments);e=t.extend({},e);var
o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollIn
fo(y),k=(e.collision||"flip").split(" "),x={};return
_=n(b),b[0].preventDefault&&(e.at="left
top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(
){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?
s.concat(["center"]):c.test(s[0])?["center"].concat(s):
["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?
s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),x[this]=[t?t[0]:0,i?
i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])
[0]]}),1===k.length&&(k[1]=k[0]),"right"===e.at[0]?
v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?
v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(x.at,p,g),v.left+=o[0],v.top+=o[1],th
is.each(function(){var
n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"m
arginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")
+w.height,I=t.extend({},v),P=i(x.my,c.outerWidth(),c.outerHeight());"right"===e.my[
0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-
=d:"center"===e.my[1]&&(I.top-
=d/2),I.left+=P[0],I.top+=P[1],t.support.offsetFractions||
(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"
],function(i,s){t.ui.position[k[i]]&&t.ui.position[k[i]][s](I,
{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisio
nWidth:D,collisionHeight:C,offset:
[o[0]+P[0],o[1]+P[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t)
{var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:
{element:b,left:m.left,top:m.top,width:p,height:g},element:
{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:0>s?"left":i>0?"right
":"center",vertical:0>o?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="
center"),d>g&&g>r(n+o)&&(h.vertical="middle"),h.important=a(r(i),r(s))>a(r(n),r(o))
?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,
{using:l}))})},t.ui.position={fit:{left:function(t,e){var
i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-
e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?
h>0&&0>=l?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+o-
e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-
r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?
s.scrollTop:s.offset.top,o=e.within.height,r=t.top-
e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?
h>0&&0>=l?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+o-
e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:
{left:function(t,e){var
i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?
n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-
h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?
e.elemWidth:0,p="left"===e.at[0]?
e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?
(i=t.left+d+p+f+e.collisionWidth-a-o,(0>i||
r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,
(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var
i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?
n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-
h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?
e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-
e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-a-
o,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-
e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||
u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function()
{t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,ar
guments)},top:function()
{t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,argu
ments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")
[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={vis
ibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(
s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in
s)e.style[o]=s[o];e.appendChild(r),i=a||
document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position:
absolute; left:
10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTM
L="",i.removeChild(e)}()}(jQuery),function(t,e){t.widget("ui.progressbar",
{version:"1.10.3",options:
{max:100,value:0,change:null,complete:null},min:0,_create:function()
{this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("u
i-progressbar ui-widget ui-widget-content ui-corner-
all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div
class='ui-progressbar-value ui-widget-header ui-corner-
left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function()
{this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-
all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-
valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()
},value:function(t){return t===e?this.options.value:
(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrained
Value:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!
1,"number"!=typeof t&&(t=0),this.indeterminate?!
1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var
e=t.value;delete
t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshVa
lue()},_setOption:function(t,e)
{"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function()
{return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-
this.min)},_refreshValue:function(){var
e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||
e>this.min).toggleClass("ui-corner-
right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-
progressbar-indeterminate",this.indeterminate),this.indeterminate?
(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div
class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):
(this.element.attr({"aria-valuemax":this.options.max,"aria-
valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),thi
s.oldValue!
==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger(
"complete")}})}(jQuery),function(t){var e=5;t.widget("ui.slider",t.ui.mouse,
{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!
1,distance:0,max:100,min:0,orientation:"horizontal",range:!
1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:f
unction(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!
0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.a
ddClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+"
ui-corner-
all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._anima
teOff=!1},_refresh:function()
{this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()
},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-
handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle
ui-state-default ui-corner-all'
href='#'></a>",a=[];for(i=s.values&&s.values.length||
1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e+
+)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=th
is.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-
index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!
0&&(e.values?e.values.length&&2!==e.values.length?
e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)
):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?
this.range.removeClass("ui-slider-range-min ui-slider-range-
max").css({left:"",bottom:""}):
(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-
header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?"
ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var
t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEven
ts),this._hoverable(t),this._focusable(t)},_destroy:function()
{this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-
slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-
all"),this._mouseDestroy()},_mouseCapture:function(e){var
i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:
(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight(
)},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normVal
ueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e)
{var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||
c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:
(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-
active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-
handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-
o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||
0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||
0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!
0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var
e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return
this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return
this.handles.removeClass("ui-state-active"),this._mouseSliding=!
1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleInd
ex=null,this._clickOffset=null,this._animateOff=!1,!
1},_detectOrientation:function()
{this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_n
ormValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?
(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?
this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-
(this._clickOffset?
this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation
&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()
+s*n,this._trimAlignValue(o)},_start:function(t,e){var
i={handle:this.handles[e],value:this.value()};return
this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=t
his.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var
s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?
0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||
1===e&&s>i)&&(i=s),i!
==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,
{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!
1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,
{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var
i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.val
ues.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,
i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var
i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.val
ues.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=
e,this._trigger("change",t,i)}},value:function(t){return arguments.length?
(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,
0),undefined):this._value()},values:function(e,i){var
s,n,o;if(arguments.length>1)return
this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(nu
ll,e),undefined;if(!arguments.length)return this._values();if(!
t.isArray(arguments[0]))return this.options.values&&this.options.values.length?
this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>
o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_
setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!
0&&("min"===i?
(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.opti
ons.value=this._values(this.options.values.length-
1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.value
s.length),t.Widget.prototype._setOption.apply(this,arguments),e)
{case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-
horizontal ui-slider-vertical").addClass("ui-
slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=
!0,this._refreshValue(),this._change(null,0),this._animateOff=!
1;break;case"values":for(this._animateOff=!
0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!
1;break;case"min":case"max":this._animateOff=!
0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!
0,this._refresh(),this._animateOff=!1}},_value:function(){var
t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var
e,i,s;if(arguments.length)return
e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.opt
ions.values.length)
{for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[
s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return
this._valueMin();if(t>=this._valueMax())return this._valueMax();var
e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return
2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function()
{return this.options.min},_valueMax:function(){return
this.options.max},_refreshValue:function(){var
e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=this._animateOff?!
1:r.animate,c={};this.options.values&&this.options.values.length?
this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-
h._valueMin())),c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(
1,1)[l?"animate":"css"](c,r.animate),h.options.range===!
0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]
({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!
1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]
({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},
{queue:!1,duration:r.animate}))),e=i}):
(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?100*((s-n)/(o-
n)):0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1
)[l?"animate":"css"]
(c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)
[l?"animate":"css"]
({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?
"animate":"css"]({width:100-i+"%"},{queue:!
1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,
1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"=
==this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!
1,duration:r.animate}))},_handleEvents:{keydown:function(i){var
s,n,o,a,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case
t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case
t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case
t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!
this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-
active"),s=this._start(i,r),s===!
1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.l
ength?this.values(r):this.value(),i.keyCode){case
t.ui.keyCode.HOME:o=this._valueMin();break;case
t.ui.keyCode.END:o=this._valueMax();break;case
t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-
this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-
(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case
t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break
;case t.ui.keyCode.DOWN:case
t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-
a)}this._slide(i,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var
i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!
1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-
active"))}}})}(jQuery),function(t){function e(t){return function(){var
e=this.element.val();t.apply(this,arguments),this._refresh(),e!
==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",
{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:
{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-
n"},incremental:!
0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:nu
ll,stop:null},_create:function()
{this._setOption("max",this.options.max),this._setOption("min",this.options.min),th
is._setOption("step",this.options.step),this._value(this.element.val(),!
0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,
{beforeunload:function()
{this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var
e={},i=this.element;return t.each(["min","max","step"],function(t,s){var
n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t)
{this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function
(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?
(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!
==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e)
{if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-
1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=thi
s._delay(function()
{this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-
button":function(e){function i(){var
t=this.element[0]===this.document[0].activeElement;t||
(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var
s;s=this.element[0]===this.document[0].activeElement?
this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!
0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!
1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup
.ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return
t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:
(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void
0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var
t=this.uiSpinner=this.element.addClass("ui-spinner-
input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this
._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-
spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-
all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.heig
ht()),this.options.disabled&&this.disable()},_keydown:function(e){var
i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return
this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case
s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return
this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span
class='ui-spinner ui-widget ui-widget-content ui-corner-
all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-
spinner-up ui-corner-tr'><span class='ui-icon
"+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-
spinner-down ui-corner-br'>"+"<span class='ui-icon
"+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return
this.spinning||this._trigger("start",t)!==!1?(this.counter||
(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||
500,clearTimeout(this.timer),this.timer=this._delay(function()
{this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e)
{var i=this.value()||0;this.counter||
(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinni
ng&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter+
+)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?
i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var
t=this._precisionOf(this.options.step);return null!
==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisi
onOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-
1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?
s.min:0,i=t-
e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),nu
ll!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t)
{this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.c
ounter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e)
{if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return
this.options[t]=e,this.element.val(this._format(i)),void 0}
("max"===t||"min"===t||"step"===t)&&"string"==typeof
e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-
icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find("
.ui-
icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"dis
abled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):
(this.element.prop("disabled",!
1),this.buttons.button("enable")))},_setOptions:e(function(t)
{this._super(t),this._value(this.element.val())}),_parse:function(t)
{return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?
Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?
null:t},_format:function(t)
{return""===t?"":window.Globalize&&this.options.numberFormat?
Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:func
tion(){this.element.attr({"aria-valuemin":this.options.min,"aria-
valuemax":this.options.max,"aria-
valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!
==t&&(i=this._parse(t),null!==i&&(e||
(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_
destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!
1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-
valuemin").removeAttr("aria-valuemax").removeAttr("aria-
valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t)
{this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||
1)*this.options.step),this._stop())},stepDown:e(function(t)
{this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-
this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||
1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||
1)*this.options.page)}),value:function(t){return arguments.length?
(e(this._value).call(this,t),void
0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})}
(jQuery),function(t,e){function i(){return++n}function s(t){return
t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(loca
tion.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",
{version:"1.10.3",delay:300,options:{active:null,collapsible:!
1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActiv
ate:null,beforeLoad:null,load:null},_create:function(){var
e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-
widget-content ui-corner-all").toggleClass("ui-tabs-
collapsible",i.collapsible).delegate(".ui-tabs-nav >
li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-
disabled")&&e.preventDefault()}).delegate(".ui-tabs-
anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-
disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isAr
ray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui
-state-disabled"),function(t){return
e.tabs.index(t)}))).sort()),this.active=this.options.active!==!
1&&this.anchors.length?
this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.acti
ve)},_initialActive:function(){var
i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);retur
n null===i&&(n&&this.tabs.each(function(s,o){return t(o).attr("aria-controls")===n?
(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),
(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!
1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!
1&&this.anchors.length&&(i=0),i},_getCreateEventData:function()
{return{tab:this.active,panel:this.active.length?
this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var
s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),o=!0;if(!
this._handlePageNav
(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n+
+;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:o=!1,n--;break;case
t.ui.keyCode.END:n=this.anchors.length-1;break;case
t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return
i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case
t.ui.keyCode.ENTER:return
i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.ac
tive?!
1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focu
sNextTab(n,o),i.ctrlKey||(s.attr("aria-
selected","false"),this.tabs.eq(n).attr("aria-
selected","true"),this.activating=this._delay(function()
{this.option("active",n)},this.delay))}},_panelKeydown:function(e)
{this._handlePageNav(e)||
e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_
handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?
(this._activate(this._focusNextTab(this.options.active-1,!1)),!
0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?
(this._activate(this._focusNextTab(this.options.active+1,!0)),!
0):e},_findNextTab:function(e,i){function s(){return
e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!
==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return
e},_focusNextTab:function(t,e){return
t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i)
{return"active"===t?(this._activate(i),e):"disabled"===t?
(this._setupDisabled(i),e):
(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-
collapsible",i),i||this.options.active!==!1||
this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setup
HeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-
tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?
@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var
e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter("
.ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!
==!1&&this.anchors.length?this.active.length&&!
t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?
(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-
1),!1)):e.active=this.tabs.index(this.active):(e.active=!
1,this.active=t()),this._refresh()},_refresh:function()
{this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),t
his._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"a
ria-selected":"false",tabIndex:-
1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-
expanded":"false","aria-hidden":"true"}),this.active.length?
(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-
selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-
expanded":"true","aria-
hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var
e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-
helper-clearfix ui-widget-header ui-corner-
all").attr("role","tablist"),this.tabs=this.tablist.find(">
li:has(a[href])").addClass("ui-state-default ui-corner-
top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return
t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-
1}),this.panels=t(),this.anchors.each(function(i,n){var
o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-
controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):
(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||
(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-
live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-
controls",c),l.attr({"aria-controls":o.substring(1),"aria-
labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel
ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function()
{return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return
t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-
bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e)
{t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var
i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-
disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-
disabled").removeAttr("aria-
disabled");this.options.disabled=e},_setupEvents:function(e){var
i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e)
{i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),thi
s._on(this.anchors,i),this._on(this.tabs,
{keydown:"_tabKeydown"}),this._on(this.panels,
{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_
setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?
(i=s.height(),i-=this.element.outerHeight()-
this.element.height(),this.element.siblings(":visible").each(function(){var
e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!
0))}),this.element.children().not(this.panels).each(function(){i-
=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-
t(this).innerHeight()
+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(fun
ction()
{i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e)
{var
i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r
=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?
this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?
t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||
o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||
this._trigger("beforeActivate",e,c)===!1||(i.active=r?!
1:this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||
h.length||t.error("jQuery UI Tabs: Mismatching fragment
identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle
:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n()
{i.newTab.closest("li").addClass("ui-tabs-active ui-state-
active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var
o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?
this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-
tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-
active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-
hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?
i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return
0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-
expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-
selected":"true",tabIndex:0})},_activate:function(e){var
i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||
(s=this.active),i=s.find(".ui-tabs-anchor")
[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findAct
ive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t)
{return"string"==typeof
t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:funct
ion(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-
widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-
tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-
all").removeAttr("role"),this.anchors.removeClass("ui-tabs-
anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(t
his.panels).each(function(){t.data(this,"ui-tabs-destroy")?
t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-
disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-
panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-
busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-
hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function()
{var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-
controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-
controls")}),this.panels.show(),"content"!
==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var
s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?
t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!
==i?e:null})),this._setupDisabled(s))},disable:function(i){var
s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!
==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():
[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var
n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-
anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||
(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!
==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-
busy","true"),this.xhr.success(function(t){setTimeout(function()
{r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e)
{setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-
loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete
n.xhr},1)})))},_ajaxSettings:function(e,i,s){var
n=this;return{url:e.attr("href"),beforeSend:function(e,o){return
n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:
function(e){var i=t(e).attr("aria-controls");return
this.element.find(this._sanitizeSelector("#"+i))}})}(jQuery),function(t){function
e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-
tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var
i=e.data("ui-tooltip-id"),s=(e.attr("aria-
describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!
==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join("
")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var
s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var
e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!
0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left
bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!
1,close:null,open:null},_create:function()
{this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.
options.disabled&&this._disable()},_setOption:function(e,i){var
s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void
0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e)
{s._updateContent(e)}),void 0)},_disable:function(){var
e=this;t.each(this.tooltips,function(i,s){var
n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!
0)}),this.element.find(this.options.items).addBack().each(function(){var
e=t(this);e.is("[title]")&&e.data("ui-tooltip-
title",e.attr("title")).attr("title","")})},_enable:function()
{this.element.find(this.options.items).addBack().each(function(){var
e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-
title"))})},open:function(e){var i=this,s=t(e?
e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-
id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-
tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var
e,s=t(this);s.data("ui-tooltip-
open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!
0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("t
itle")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,
e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?
this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-
open")&&n._delay(function()
{e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void
0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var
a,r,h,l=t.extend({},this.options.position);
if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void
0;s.is("[title]")&&(i&&"mouseover"===i.type?
s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.fi
nd(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?
(this._on(this.document,
{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),th
is._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.d
elayedShow=setInterval(function()
{a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open"
,i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var
i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function()
{this._removeTooltip(a)}},i&&"mouseover"!==i.type||
(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!
0,s,r)}},close:function(e){var s=this,n=t(e?
e.currentTarget:this.element),o=this._find(n);this.closing||
(clearInterval(this.delayedShow),n.data("ui-tooltip-
title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!
0),this._hide(o,this.options.hide,function()
{s._removeTooltip(t(this))}),n.removeData("ui-tooltip-
open"),this._off(n,"mouseleave focusout keyup"),n[0]!
==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"m
ouseleave"===e.type&&t.each(this.parents,function(e,i)
{t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!
0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var
i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip
ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return
t("<div>").addClass("ui-tooltip-
content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find
:function(e){var i=e.data("ui-tooltip-id");return i?
t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete
this.tooltips[t.attr("id")]},_destroy:function(){var
e=this;t.each(this.tooltips,function(i,s){var
n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!
0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-
tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(jQuery);;
/*
Copyright (C) Federico Zivolo 2017
Distributed under the MIT License (license terms are at
http://opensource.org/licenses/MIT).
*/(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?
module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})
(this,function(){'use strict';function e(e){return e&&'[object
Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var
o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?
e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName)
{case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return
e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|
scroll)/.test(r+s+p)?e:n(o(e))}function r(e){var
o=e&&e.offsetParent,i=o&&o.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!
==['TD','TABLE'].indexOf(o.nodeName)&&'static'===t(o,'position')?r(o):o:e?
e.ownerDocument.documentElement:document.documentElement}function p(e){var
t=e.nodeName;return'BODY'!==t&&('HTML'===t||r(e.firstElementChild)===e)}function
s(e){return null===e.parentNode?e:s(e.parentNode)}function d(e,t){if(!e||!
e.nodeType||!t||!t.nodeType)return document.documentElement;var
o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=o?e:t,n=o?
t:e,a=document.createRange();a.setStart(i,0),a.setEnd(n,0);var
l=a.commonAncestorContainer;if(e!==l&&t!==l||i.contains(n))return p(l)?l:r(l);var
f=s(e);return f.host?d(f.host,t):d(e,s(t).host)}function a(e){var
t=1<arguments.length&&void 0!==arguments[1]?
arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',i=e.nodeName;if('BODY'===i|
|'HTML'===i){var
n=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||n;return
r[o]}return e[o]}function l(e,t){var o=2<arguments.length&&void 0!
==arguments[2]&&arguments[2],i=a(t,'top'),n=a(t,'left'),r=o?-1:1;return
e.top+=i*r,e.bottom+=i*r,e.left+=n*r,e.right+=n*r,e}function f(e,t){var
o='x'===t?'Left':'Top',i='Left'==o?'Right':'Bottom';return
parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+i+'Width'],10)}function
m(e,t,o,i){return
J(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],ie()?
o['offset'+e]+i['margin'+('Height'===e?'Top':'Left')]+i['margin'+
('Height'===e?'Bottom':'Right')]:0)}function h(){var
e=document.body,t=document.documentElement,o=ie()&&getComputedStyle(t);return{heigh
t:m('Height',e,t,o),width:m('Width',e,t,o)}}function c(e){return se({},e,
{right:e.left+e.width,bottom:e.top+e.height})}function g(e){var
o={};if(ie())try{o=e.getBoundingClientRect();var
i=a(e,'top'),n=a(e,'left');o.top+=i,o.left+=n,o.bottom+=i,o.right+=n}catch(e){}else
o=e.getBoundingClientRect();var r={left:o.left,top:o.top,width:o.right-
o.left,height:o.bottom-o.top},p='HTML'===e.nodeName?h():{},s=p.width||
e.clientWidth||r.right-r.left,d=p.height||e.clientHeight||r.bottom-
r.top,l=e.offsetWidth-s,m=e.offsetHeight-d;if(l||m){var g=t(e);l-=f(g,'x'),m-
=f(g,'y'),r.width-=l,r.height-=m}return c(r)}function u(e,o){var
i=ie(),r='HTML'===o.nodeName,p=g(e),s=g(o),d=n(e),a=t(o),f=parseFloat(a.borderTopWi
dth,10),m=parseFloat(a.borderLeftWidth,10),h=c({top:p.top-s.top-f,left:p.left-
s.left-m,width:p.width,height:p.height});if(h.marginTop=0,h.marginLeft=0,!i&&r){var
u=parseFloat(a.marginTop,10),b=parseFloat(a.marginLeft,10);h.top-=f-u,h.bottom-=f-
u,h.left-=m-b,h.right-=m-b,h.marginTop=u,h.marginLeft=b}return(i?
o.contains(d):o===d&&'BODY'!==d.nodeName)&&(h=l(h,o)),h}function b(e){var
t=e.ownerDocument.documentElement,o=u(e,t),i=J(t.clientWidth,window.innerWidth||
0),n=J(t.clientHeight,window.innerHeight||0),r=a(t),p=a(t,'left'),s={top:r-
o.top+o.marginTop,left:p-o.left+o.marginLeft,width:i,height:n};return c(s)}function
w(e){var i=e.nodeName;return'BODY'===i||'HTML'===i?!1:'fixed'===t(e,'position')||
w(o(e))}function y(e,t,i,r){var
p={top:0,left:0},s=d(e,t);if('viewport'===r)p=b(s);else{var a;'scrollParent'===r?
(a=n(o(t)),'BODY'===a.nodeName&&(a=e.ownerDocument.documentElement)):'window'===r?
a=e.ownerDocument.documentElement:a=r;var l=u(a,s);if('HTML'===a.nodeName&&!w(s))
{var f=h(),m=f.height,c=f.width;p.top+=l.top-
l.marginTop,p.bottom=m+l.top,p.left+=l.left-l.marginLeft,p.right=c+l.left}else
p=l}return p.left+=i,p.top+=i,p.right-=i,p.bottom-=i,p}function E(e){var
t=e.width,o=e.height;return t*o}function v(e,t,o,i,n){var
r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-
1===e.indexOf('auto'))return e;var p=y(o,i,r,n),s={top:{width:p.width,height:t.top-
p.top},right:{width:p.right-t.right,height:p.height},bottom:
{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-
p.left,height:p.height}},d=Object.keys(s).map(function(e){return se({key:e},s[e],
{area:E(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e)
{var t=e.width,i=e.height;return
t>=o.clientWidth&&i>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')
[1];return l+(f?'-'+f:'')}function O(e,t,o){var i=d(t,o);return u(o,i)}function
L(e){var t=getComputedStyle(e),o=parseFloat(t.marginTop)
+parseFloat(t.marginBottom),i=parseFloat(t.marginLeft)
+parseFloat(t.marginRight),n={width:e.offsetWidth+i,height:e.offsetHeight+o};return
n}function x(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return
e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function S(e,t,o)
{o=o.split('-')[0];var i=L(e),n={width:i.width,height:i.height},r=-1!
==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width
',a=r?'width':'height';return n[p]=t[p]+t[d]/2-i[d]/2,n[s]=o===s?t[s]-
i[a]:t[x(s)],n}function T(e,t){return Array.prototype.find?e.find(t):e.filter(t)
[0]}function D(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e)
{return e[t]===o});var i=T(e,function(e){return e[t]===o});return
e.indexOf(i)}function C(t,o,i){var n=void 0===i?t:t.slice(0,D(t,'name',i));return
n.forEach(function(t){t['function']&&console.warn('`modifier.function` is
deprecated, use `modifier.fn`!');var i=t['function']||
t.fn;t.enabled&&e(i)&&(o.offsets.popper=c(o.offsets.popper),o.offsets.reference=c(o
.offsets.reference),o=i(o,t))}),o}function N(){if(!this.state.isDestroyed){var
e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:
{}};e.offsets.reference=O(this.state,this.popper,this.reference),e.placement=v(this
.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modi
fiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlaceme
nt=e.placement,e.offsets.popper=S(this.popper,e.offsets.reference,e.placement),e.of
fsets.popper.position='absolute',e=C(this.modifiers,e),this.state.isCreated?
this.options.onUpdate(e):(this.state.isCreated=!
0,this.options.onCreate(e))}}function k(e,t){return e.some(function(e){var
o=e.name,i=e.enabled;return i&&o===t})}function W(e){for(var t=[!
1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length-
1;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return
r}return null}function P(){return this.state.isDestroyed=!
0,k(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-
placement'),this.popper.style.left='',this.popper.style.position='',this.popper.sty
le.top='',this.popper.style[W('transform')]=''),this.disableEventListeners(),this.o
ptions.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}functi
on B(e){var t=e.ownerDocument;return t?t.defaultView:window}function H(e,t,o,i){var
r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,
{passive:!0}),r||H(n(p.parentNode),t,o,i),i.push(p)}function A(e,t,o,i)
{o.updateBound=i,B(e).addEventListener('resize',o.updateBound,{passive:!0});var
r=n(e);return
H(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!
0,o}function I(){this.state.eventsEnabled||
(this.state=A(this.reference,this.options,this.state,this.scheduleUpdate))}function
M(e,t){return
B(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e
)
{e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents
=[],t.scrollElement=null,t.eventsEnabled=!1,t}function R()
{this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=M(
this.reference,this.state))}function U(e){return''!==e&&!
isNaN(parseFloat(e))&&isFinite(e)}function Y(e,t)
{Object.keys(t).forEach(function(o){var i='';-1!
==['width','height','top','right','bottom','left'].indexOf(o)&&U(t[o])&&(i='px'),e.
style[o]=t[o]+i})}function j(e,t){Object.keys(t).forEach(function(o){var i=t[o];!
1===i?e.removeAttribute(o):e.setAttribute(o,t[o])})}function F(e,t,o){var
i=T(e,function(e){var o=e.name;return o===t}),n=!!i&&e.some(function(e){return
e.name===o&&e.enabled&&e.order<i.order});if(!n){var
r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in
order to work, be sure to include it before '+r+'!')}return n}function K(e)
{return'end'===e?'start':'start'===e?'end':e}function q(e){var
t=1<arguments.length&&void 0!
==arguments[1]&&arguments[1],o=ae.indexOf(e),i=ae.slice(o+1).concat(ae.slice(0,o));
return t?i.reverse():i}function V(e,t,o,i){var n=e.match(/((?:\-|\+)?\d*\.?\d*)
(.*)/),r=+n[1],p=n[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p)
{case'%p':s=o;break;case'%':case'%r':default:s=i;}var d=c(s);return
d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?
J(document.documentElement.clientHeight,window.innerHeight||
0):J(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return
r}function z(e,t,o,i){var n=[0,0],r=-1!==['right','left'].indexOf(i),p=e.split(/(\
+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(T(p,function(e){return-1!
==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated
by white space(s) are deprecated, use a comma (,) instead.');var
d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),
[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,i){var
n=(1===i?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t)
{return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?
(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return
V(e,n,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,i){U(o)&&(n[t]
+=o*('-'===e[i-1]?-1:1))})}),n}function G(e,t){var
o,i=t.offset,n=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=n.split('-')
[0];return o=U(+i)?[+i,0]:z(i,p,s,d),'left'===d?(p.top+=o[0],p.left-
=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-
=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}for(var
_=Math.min,X=Math.floor,J=Math.max,Q='undefined'!=typeof window&&'undefined'!
=typeof document,Z=['Edge','Trident','Firefox'],
$=0,ee=0;ee<Z.length;ee+=1)if(Q&&0<=navigator.userAgent.indexOf(Z[ee]))
{$=1;break}var i,te=Q&&window.Promise,oe=te?function(e){var t=!1;return function()
{t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var
t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},$))}},ie=function()
{return void 0==i&&(i=-1!==navigator.appVersion.indexOf('MSIE
10')),i},ne=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a
class as a function')},re=function(){function e(e,t){for(var o,n=0;n<t.length;n+
+)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!
0),Object.defineProperty(e,o.key,o)}return function(t,o,i){return
o&&e(t.prototype,o),i&&e(t,i),t}}(),pe=function(e,t,o){return t in e?
Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!
0}):e[t]=o,e},se=Object.assign||function(e){for(var t,o=1;o<arguments.length;o+
+)for(var i in
t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return
e},de=['auto-start','auto','auto-end','top-start','top','top-end','right-
start','right','right-end','bottom-end','bottom','bottom-start','left-
end','left','left-
start'],ae=de.slice(3),le={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'coun
terclockwise'},fe=function(){function t(o,i){var n=this,r=2<arguments.length&&void
0!==arguments[2]?arguments[2]:{};ne(this,t),this.scheduleUpdate=function(){return
requestAnimationFrame(n.update)},this.update=oe(this.update.bind(this)),this.option
s=se({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:
[]},this.reference=o&&o.jquery?o[0]:o,this.popper=i&&i.jquery?
i[0]:i,this.options.modifiers={},Object.keys(se({},t.Defaults.modifiers,r.modifiers
)).forEach(function(e){n.options.modifiers[e]=se({},t.Defaults.modifiers[e]||
{},r.modifiers?r.modifiers[e]:
{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return
se({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-
t.order}),this.modifiers.forEach(function(t)
{t.enabled&&e(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.
update();var
p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnable
d=p}return re(t,[{key:'update',value:function(){return N.call(this)}},
{key:'destroy',value:function(){return P.call(this)}},
{key:'enableEventListeners',value:function(){return I.call(this)}},
{key:'disableEventListeners',value:function(){return R.call(this)}}]),t}();return
fe.Utils=('undefined'==typeof window?
global:window).PopperUtils,fe.placements=de,fe.Defaults={placement:'bottom',eventsE
nabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:
{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')
[0],i=t.split('-')[1];if(i){var n=e.offsets,r=n.reference,p=n.popper,s=-1!
==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:pe({},
d,r[d]),end:pe({},d,r[d]+r[a]-p[a])};e.offsets.popper=se({},p,l[i])}return
e}},offset:{order:200,enabled:!0,fn:G,offset:0},preventOverflow:
{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||
r(e.instance.popper);e.instance.reference===o&&(o=r(o));var
i=y(e.instance.popper,e.instance.reference,t.padding,o);t.boundaries=i;var
n=t.priority,p=e.offsets.popper,s={primary:function(e){var o=p[e];return
p[e]<i[e]&&!
t.escapeWithReference&&(o=J(p[e],i[e])),pe({},e,o)},secondary:function(e){var
o='right'===e?'left':'top',n=p[o];return p[e]>i[e]&&!
t.escapeWithReference&&(n=_(p[o],i[e]-('right'===e?
p.width:p.height))),pe({},o,n)}};return n.forEach(function(e){var t=-
1===['left','top'].indexOf(e)?'secondary':'primary';p=se({},p,s[t]
(e))}),e.offsets.popper=p,e},priority:
['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTog
ether:{order:400,enabled:!0,fn:function(e){var
t=e.offsets,o=t.popper,i=t.reference,n=e.placement.split('-')[0],r=X,p=-1!
==['top','bottom'].indexOf(n),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'he
ight';return o[s]<r(i[d])&&(e.offsets.popper[d]=r(i[d])-
o[a]),o[d]>r(i[s])&&(e.offsets.popper[d]=r(i[s])),e}},arrow:{order:500,enabled:!
0,fn:function(e,o){var i;if(!F(e.instance.modifiers,'arrow','keepTogether'))return
e;var n=o.element;if('string'==typeof n){if(n=e.instance.popper.querySelector(n),!
n)return e;}else if(!e.instance.popper.contains(n))return console.warn('WARNING:
`arrow.element` must be child of its popper element!'),e;var
r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!
==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase
(),h=a?'left':'top',g=a?'bottom':'right',u=L(n)[l];d[g]-
u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[g]-u)),d[m]+u>s[g]&&(e.offsets.popper[m]
+=d[m]+u-s[g]),e.offsets.popper=c(e.offsets.popper);var b=d[m]+d[l]/2-
u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f
+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=J(_(s[l]-
u,v),0),e.arrowElement=n,e.offsets.arrow=(i={},pe(i,m,Math.round(v)),pe(i,h,''),i),
e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t)
{if(k(e.instance.modifiers,'inner'))return
e;if(e.flipped&&e.placement===e.originalPlacement)return e;var
o=y(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement),i=e.place
ment.split('-')[0],n=x(i),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior)
{case le.FLIP:p=[i,n];break;case le.CLOCKWISE:p=q(i);break;case
le.COUNTERCLOCKWISE:p=q(i,!0);break;default:p=t.behavior;}return
p.forEach(function(s,d){if(i!==s||p.length===d+1)return e;i=e.placement.split('-')
[0],n=x(i);var
a=e.offsets.popper,l=e.offsets.reference,f=X,m='left'===i&&f(a.right)>f(l.left)||'r
ight'===i&&f(a.left)<f(l.right)||'top'===i&&f(a.bottom)>f(l.top)||'bottom'===i&&f(a
.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top)
,u=f(a.bottom)>f(o.bottom),b='left'===i&&h||'right'===i&&c||'top'===i&&g||'bottom'=
==i&&u,w=-1!==['top','bottom'].indexOf(i),y=!!
t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!
w&&'end'===r&&u);(m||b||y)&&(e.flipped=!0,(m||
b)&&(i=p[d+1]),y&&(r=K(r)),e.placement=i+
(r?'-'+r:''),e.offsets.popper=se({},e.offsets.popper,S(e.instance.popper,e.offsets.
reference,e.placement)),e=C(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',pa
dding:5,boundariesElement:'viewport'},inner:{order:700,enabled:!1,fn:function(e)
{var t=e.placement,o=t.split('-')[0],i=e.offsets,n=i.popper,r=i.reference,p=-1!
==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return
n[p?'left':'top']=r[o]-(s?
n[p?'width':'height']:0),e.placement=x(t),e.offsets.popper=c(n),e}},hide:
{order:800,enabled:!0,fn:function(e){if(!
F(e.instance.modifiers,'hide','preventOverflow'))return e;var
t=e.offsets.reference,o=T(e.instance.modifiers,function(e)
{return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||
t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-
out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-
of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t)
{var o=t.x,i=t.y,n=e.offsets.popper,p=T(e.instance.modifiers,function(e)
{return'applyStyle'===e.name}).gpuAcceleration;void 0!==p&&console.warn('WARNING:
`gpuAcceleration` option moved to `computeStyle` modifier and will not be supported
in future versions of Popper.js!');var s,d,a=void 0===p?
t.gpuAcceleration:p,l=r(e.instance.popper),f=g(l),m={position:n.position},h={left:X
(n.left),top:X(n.top),bottom:X(n.bottom),right:X(n.right)},c='bottom'===o?'top':'bo
ttom',u='right'===i?'left':'right',b=W('transform');if(d='bottom'==c?-
f.height+h.bottom:h.top,s='right'==u?-
f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px,
0)',m[c]=0,m[u]=0,m.willChange='transform';else{var w='bottom'==c?-
1:1,y='right'==u?-1:1;m[c]=d*w,m[u]=s*y,m.willChange=c+', '+u}var E={"x-
placement":e.placement};return
e.attributes=se({},E,e.attributes),e.styles=se({},m,e.styles),e.arrowStyles=se({},e
.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!
0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return
Y(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Obj
ect.keys(e.arrowStyles).length&&Y(e.arrowElement,e.arrowStyles),e},onLoad:function(
e,t,o,i,n){var
r=O(n,t,e),p=v(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.fli
p.padding);return t.setAttribute('x-placement',p),Y(t,
{position:'absolute'}),o},gpuAcceleration:void 0}}},fe});
//# sourceMappingURL=popper.min.js.map
;
// version 1.6.0
// http://welcome.totheinter.net/columnizer-jquery-plugin/
// created by: Adam Wulf @adamwulf, [email protected]

(function($){

$.fn.columnize = function(options) {

var defaults = {
// default width of columns
width: 400,
// optional # of columns instead of width
columns : false,
// true to build columns once regardless of window resize
// false to rebuild when content box changes bounds
buildOnce : false,
// an object with options if the text should overflow
// it's container if it can't fit within a specified height
overflow : false,
// this function is called after content is columnized
doneFunc : function(){},
// if the content should be columnized into a
// container node other than it's own node
target : false,
// re-columnizing when images reload might make things
// run slow. so flip this to true if it's causing delays
ignoreImageLoading : true,
// should columns float left or right
columnFloat : "left",
// ensure the last column is never the tallest column
lastNeverTallest : false,
// (int) the minimum number of characters to jump when splitting
// text nodes. smaller numbers will result in higher accuracy
// column widths, but will take slightly longer
accuracy : false,
// don't automatically layout columns, only use manual columnbreak
manualBreaks : false,
// previx for all the CSS classes used by this plugin
// default to empty string for backwards compatibility
cssClassPrefix : ""
};
options = $.extend(defaults, options);

if(typeof(options.width) == "string"){
options.width = parseInt(options.width,10);
if(isNaN(options.width)){
options.width = defaults.width;
}
}

return this.each(function() {
var $inBox = options.target ? $(options.target) : $(this);
var maxHeight = $(this).height();
var $cache = $('<div></div>'); // this is where we'll put the real
content
var lastWidth = 0;
var columnizing = false;
var manualBreaks = options.manualBreaks;
var cssClassPrefix = defaults.cssClassPrefix;
if(typeof(options.cssClassPrefix) == "string"){
cssClassPrefix = options.cssClassPrefix;
}

var adjustment = 0;

$cache.append($(this).contents().clone(true));

// images loading after dom load


// can screw up the column heights,
// so recolumnize after images load
if(!options.ignoreImageLoading && !options.target){
if(!$inBox.data("imageLoaded")){
$inBox.data("imageLoaded", true);
if($(this).find("img").length > 0){
// only bother if there are
// actually images...
var func = function($inBox,$cache){ return function()
{
if(!$inBox.data("firstImageLoaded")){
$inBox.data("firstImageLoaded",
"true");

$inBox.empty().append($cache.children().clone(true));
$inBox.columnize(options);
}
};
}($(this), $cache);
$(this).find("img").one("load", func);
$(this).find("img").one("abort", func);
return;
}
}
}

$inBox.empty();

columnizeIt();
if(!options.buildOnce){
$(window).resize(function() {
if(!options.buildOnce){
if($inBox.data("timeout")){
clearTimeout($inBox.data("timeout"));
}
$inBox.data("timeout", setTimeout(columnizeIt, 200));
}
});
}

function prefixTheClassName(className, withDot){


var dot = withDot ? "." : "";
if(cssClassPrefix.length){
return dot + cssClassPrefix + "-" + className;
}
return dot + className;
}

/**
* this fuction builds as much of a column as it can without
* splitting nodes in half. If the last node in the new column
* is a text node, then it will try to split that text node. otherwise
* it will leave the node in $pullOutHere and return with a height
* smaller than targetHeight.
*
* Returns a boolean on whether we did some splitting successfully at a
text point
* (so we know we don't need to split a real element). return false if the
caller should
* split a node if possible to end this column.
*
* @param putInHere, the jquery node to put elements into for the
current column
* @param $pullOutHere, the jquery node to pull elements out of
(uncolumnized html)
* @param $parentColumn, the jquery node for the currently column
that's being added to
* @param targetHeight, the ideal height for the column, get as close
as we can to this height
*/
function columnize($putInHere, $pullOutHere, $parentColumn,
targetHeight){
//
// add as many nodes to the column as we can,
// but stop once our height is too tall
while((manualBreaks || $parentColumn.height() < targetHeight) &&
$pullOutHere[0].childNodes.length){
var node = $pullOutHere[0].childNodes[0];
//
// Because we're not cloning, jquery will actually move the
element"
// http://welcome.totheinter.net/2009/03/19/the-
undocumented-life-of-jquerys-append/
if($(node).find(prefixTheClassName("columnbreak",
true)).length){
//
// our column is on a column break, so just end here
return;
}
if($(node).hasClass(prefixTheClassName("columnbreak"))){
//
// our column is on a column break, so just end here
return;
}
$putInHere.append(node);
}
if($putInHere[0].childNodes.length === 0) return;

// now we're too tall, so undo the last one


var kids = $putInHere[0].childNodes;
var lastKid = kids[kids.length-1];
$putInHere[0].removeChild(lastKid);
var $item = $(lastKid);

// now lets try to split that last node


// to fit as much of it as we can into this column
if($item[0].nodeType == 3){
// it's a text node, split it up
var oText = $item[0].nodeValue;
var counter2 = options.width / 18;
if(options.accuracy)
counter2 = options.accuracy;
var columnText;
var latestTextNode = null;
while($parentColumn.height() < targetHeight &&
oText.length){
var indexOfSpace = oText.indexOf(' ', counter2);
if (indexOfSpace != -1) {
columnText = oText.substring(0, oText.indexOf('
', counter2));
} else {
columnText = oText;
}
latestTextNode = document.createTextNode(columnText);
$putInHere.append(latestTextNode);

if(oText.length > counter2 && indexOfSpace != -1){


oText = oText.substring(indexOfSpace);
}else{
oText = "";
}
}
if($parentColumn.height() >= targetHeight && latestTextNode
!== null){
// too tall :(
$putInHere[0].removeChild(latestTextNode);
oText = latestTextNode.nodeValue + oText;
}
if(oText.length){
$item[0].nodeValue = oText;
}else{
return false; // we ate the whole text node, move on
to the next node
}
}
if($pullOutHere.contents().length){
$pullOutHere.prepend($item);
}else{
$pullOutHere.append($item);
}

return $item[0].nodeType == 3;
}

/**
* Split up an element, which is more complex than splitting text. We
need to create
* two copies of the element with it's contents divided between each
*/
function split($putInHere, $pullOutHere, $parentColumn, targetHeight){

if($putInHere.contents(":last").find(prefixTheClassName("columnbreak",
true)).length){
//
// our column is on a column break, so just end here
return;
}

if($putInHere.contents(":last").hasClass(prefixTheClassName("columnbreak"))){
//
// our column is on a column break, so just end here
return;
}
if($pullOutHere.contents().length){
var $cloneMe = $pullOutHere.contents(":first");
//
// make sure we're splitting an element
if($cloneMe.get(0).nodeType != 1) return;

//
// clone the node with all data and events
var $clone = $cloneMe.clone(true);
//
// need to support both .prop and .attr if .prop doesn't
exist.
// this is for backwards compatibility with older versions
of jquery.
if($cloneMe.hasClass(prefixTheClassName("columnbreak"))){
//
// ok, we have a columnbreak, so add it into
// the column and exit
$putInHere.append($clone);
$cloneMe.remove();
}else if (manualBreaks){
// keep adding until we hit a manual break
$putInHere.append($clone);
$cloneMe.remove();
}else if($clone.get(0).nodeType == 1 && !
$clone.hasClass(prefixTheClassName("dontend"))){
$putInHere.append($clone);
if($clone.is("img") && $parentColumn.height() <
targetHeight + 20){
//
// we can't split an img in half, so just add
it
// to the column and remove it from the
pullOutHere section
$cloneMe.remove();
}else if(!
$cloneMe.hasClass(prefixTheClassName("dontsplit")) && $parentColumn.height() <
targetHeight + 20){
//
// pretty close fit, and we're not allowed to
split it, so just
// add it to the column, remove from
pullOutHere, and be done
$cloneMe.remove();
}else if($clone.is("img") ||
$cloneMe.hasClass(prefixTheClassName("dontsplit"))){
//
// it's either an image that's too tall, or an
unsplittable node
// that's too tall. leave it in the pullOutHere
and we'll add it to the
// next column
$clone.remove();
}else{
//
// ok, we're allowed to split the node in half,
so empty out
// the node in the column we're building, and
start splitting
// it in half, leaving some of it in
pullOutHere
$clone.empty();
if(!columnize($clone, $cloneMe, $parentColumn,
targetHeight)){
// this node still has non-text nodes to
split
// add the split class and then recur

$cloneMe.addClass(prefixTheClassName("split"));
if($cloneMe.children().length){
split($clone, $cloneMe,
$parentColumn, targetHeight);
}
}else{
// this node only has text node children
left, add the
// split class and move on.

$cloneMe.addClass(prefixTheClassName("split"));
}
if($clone.get(0).childNodes.length === 0){
// it was split, but nothing is in it :(
$clone.remove();
}
}
}
}
}
function singleColumnizeIt() {
if ($inBox.data("columnized") && $inBox.children().length == 1) {
return;
}
$inBox.data("columnized", true);
$inBox.data("columnizing", true);

$inBox.empty();
$inBox.append($("<div class='"
+ prefixTheClassName("first") + " "
+ prefixTheClassName("last") + " "
+ prefixTheClassName("column") + " "
+ "' style='width:100%; float: " + options.columnFloat +
";'></div>")); //"
$col = $inBox.children().eq($inBox.children().length-1);
$destroyable = $cache.clone(true);
if(options.overflow){
targetHeight = options.overflow.height;
columnize($col, $destroyable, $col, targetHeight);
// make sure that the last item in the column isn't a
"dontend"
if(!$destroyable.contents().find(":first-
child").hasClass(prefixTheClassName("dontend"))){
split($col, $destroyable, $col, targetHeight);
}

while($col.contents(":last").length &&
checkDontEndColumn($col.contents(":last").get(0))){
var $lastKid = $col.contents(":last");
$lastKid.remove();
$destroyable.prepend($lastKid);
}

var html = "";


var div = document.createElement('DIV');
while($destroyable[0].childNodes.length > 0){
var kid = $destroyable[0].childNodes[0];
if(kid.attributes){
for(var i=0;i<kid.attributes.length;i++){

if(kid.attributes[i].nodeName.indexOf("jQuery") === 0){

kid.removeAttribute(kid.attributes[i].nodeName);
}
}
}
div.innerHTML = "";
div.appendChild($destroyable[0].childNodes[0]);
html += div.innerHTML;
}
var overflow = $(options.overflow.id)[0];
overflow.innerHTML = html;

}else{
$col.append($destroyable);
}
$inBox.data("columnizing", false);

if(options.overflow && options.overflow.doneFunc){


options.overflow.doneFunc();
}

/**
* returns true if the input dom node
* should not end a column.
* returns false otherwise
*/
function checkDontEndColumn(dom){
if(dom.nodeType == 3){
// text node. ensure that the text
// is not 100% whitespace
if(/^\s+$/.test(dom.nodeValue)){
//
// ok, it's 100% whitespace,
// so we should return checkDontEndColumn
// of the inputs previousSibling
if(!dom.previousSibling) return false;
return checkDontEndColumn(dom.previousSibling);
}
return false;
}
if(dom.nodeType != 1) return false;
if($(dom).hasClass(prefixTheClassName("dontend"))) return true;
if(dom.childNodes.length === 0) return false;
return checkDontEndColumn(dom.childNodes[dom.childNodes.length-
1]);
}

function columnizeIt() {
//reset adjustment var
adjustment = 0;
if(lastWidth == $inBox.width()) return;
lastWidth = $inBox.width();

var numCols = Math.round($inBox.width() / options.width);


var optionWidth = options.width;
var optionHeight = options.height;
if(options.columns) numCols = options.columns;
if(manualBreaks){
numCols = $cache.find(prefixTheClassName("columnbreak",
true)).length + 1;
optionWidth = false;
}

// if ($inBox.data("columnized") && numCols ==


$inBox.children().length) {
// return;
// }
if(numCols <= 1){
return singleColumnizeIt();
}
if($inBox.data("columnizing")) return;
$inBox.data("columnized", true);
$inBox.data("columnizing", true);

$inBox.empty();
$inBox.append($("<div style='width:" + (Math.floor(100 /
numCols))+ "%; float: " + options.columnFloat + ";'></div>")); //"
$col = $inBox.children(":last");
$col.append($cache.clone());
maxHeight = $col.height();
$inBox.empty();

var targetHeight = maxHeight / numCols;


var firstTime = true;
var maxLoops = 3;
var scrollHorizontally = false;
if(options.overflow){
maxLoops = 1;
targetHeight = options.overflow.height;
}else if(optionHeight && optionWidth){
maxLoops = 1;
targetHeight = optionHeight;
scrollHorizontally = true;
}

//
// We loop as we try and workout a good height to use. We know it
initially as an average
// but if the last column is higher than the first ones (which
can happen, depending on split
// points) we need to raise 'adjustment'. We try this over a few
iterations until we're 'solid'.
//
// also, lets hard code the max loops to 20. that's /a lot/ of
loops for columnizer,
// and should keep run aways in check. if somehow someone has
content combined with
// options that would cause an infinite loop, then this'll
definitely stop it.
for(var loopCount=0;loopCount<maxLoops && loopCount<20;loopCount+
+){
$inBox.empty();
var $destroyable, className, $col, $lastKid;
try{
$destroyable = $cache.clone(true);
}catch(e){
// jquery in ie6 can't clone with true
$destroyable = $cache.clone();
}
$destroyable.css("visibility", "hidden");
// create the columns
for (var i = 0; i < numCols; i++) {
/* create column */
className = (i === 0) ? prefixTheClassName("first") :
"";
className += " " + prefixTheClassName("column");
className = (i == numCols - 1) ?
(prefixTheClassName("last") + " " + className) : className;
$inBox.append($("<div class='" + className + "'
style='width:" + (Math.floor(100 / numCols))+ "%; float: " + options.columnFloat +
";'></div>")); //"
}

// fill all but the last column (unless overflowing)


i = 0;
while(i < numCols - (options.overflow ? 0 : 1) ||
scrollHorizontally && $destroyable.contents().length){
if($inBox.children().length <= i){
// we ran out of columns, make another
$inBox.append($("<div class='" + className + "'
style='width:" + (Math.floor(100 / numCols))+ "%; float: " + options.columnFloat +
";'></div>")); //"
}
$col = $inBox.children().eq(i);
if(scrollHorizontally){
$col.width(optionWidth + "px");
}
columnize($col, $destroyable, $col, targetHeight);
// make sure that the last item in the column isn't a
"dontend"
split($col, $destroyable, $col, targetHeight);

while($col.contents(":last").length &&
checkDontEndColumn($col.contents(":last").get(0))){
$lastKid = $col.contents(":last");
$lastKid.remove();
$destroyable.prepend($lastKid);
}
i++;

//
// https://github.com/adamwulf/Columnizer-jQuery-
Plugin/issues/47
//
// check for infinite loop.
//
// this could happen when a dontsplit or dontend item
is taller than the column
// we're trying to build, and its never actually
added to a column.
//
// this results in empty columns being added with the
dontsplit item
// perpetually waiting to get put into a column. lets
force the issue here
if($col.contents().length === 0 &&
$destroyable.contents().length){
//
// ok, we're building zero content columns.
this'll happen forever
// since nothing can ever get taken out of
destroyable.
//
// to fix, lets put 1 item from destroyable
into the empty column
// before we iterate
$col.append($destroyable.contents(":first"));
}else if(i == numCols - (options.overflow ? 0 : 1) &&
!options.overflow){
//
// ok, we're about to exit the while loop
because we're done with all
// columns except the last column.
//
// if $destroyable still has columnbreak nodes
in it, then we need to keep
// looping and creating more columns.

if($destroyable.find(prefixTheClassName("columnbreak", true)).length){
numCols ++;
}
}
}
if(options.overflow && !scrollHorizontally){
var IE6 = false /*@cc_on || @_jscript_version < 5.7
@*/;
var IE7 = (document.all) &&
(navigator.appVersion.indexOf("MSIE 7.") != -1);
if(IE6 || IE7){
var html = "";
var div = document.createElement('DIV');
while($destroyable[0].childNodes.length > 0){
var kid = $destroyable[0].childNodes[0];
for(i=0;i<kid.attributes.length;i++){

if(kid.attributes[i].nodeName.indexOf("jQuery") === 0){

kid.removeAttribute(kid.attributes[i].nodeName);
}
}
div.innerHTML = "";

div.appendChild($destroyable[0].childNodes[0]);
html += div.innerHTML;
}
var overflow = $(options.overflow.id)[0];
overflow.innerHTML = html;
}else{
$
(options.overflow.id).empty().append($destroyable.contents().clone(true));
}
}else if(!scrollHorizontally){
// the last column in the series
$col = $inBox.children().eq($inBox.children().length-
1);
$destroyable.contents().each( function() {
$col.append( $(this) );
});
var afterH = $col.height();
var diff = afterH - targetHeight;
var totalH = 0;
var min = 10000000;
var max = 0;
var lastIsMax = false;
var numberOfColumnsThatDontEndInAColumnBreak = 0;
$inBox.children().each(function($inBox){ return
function($item){
var $col = $inBox.children().eq($item);
var endsInBreak =
$col.children(":last").find(prefixTheClassName("columnbreak", true)).length;
if(!endsInBreak){
var h = $col.height();
lastIsMax = false;
totalH += h;
if(h > max) {
max = h;
lastIsMax = true;
}
if(h < min) min = h;
numberOfColumnsThatDontEndInAColumnBreak+
+;
}
};
}($inBox));

var avgH = totalH /


numberOfColumnsThatDontEndInAColumnBreak;
if(totalH === 0){
//
// all columns end in a column break,
// so we're done here
loopCount = maxLoops;
}else if(options.lastNeverTallest && lastIsMax){
// the last column is the tallest
// so allow columns to be taller
// and retry
//
// hopefully this'll mean more content fits
into
// earlier columns, so that the last column
// can be shorter than the rest
adjustment += 30;

targetHeight = targetHeight + 30;


if(loopCount == maxLoops-1) maxLoops++;
}else if(max - min > 30){
// too much variation, try again
targetHeight = avgH + 30;
}else if(Math.abs(avgH-targetHeight) > 20){
// too much variation, try again
targetHeight = avgH;
}else {
// solid, we're done
loopCount = maxLoops;
}
}else{
// it's scrolling horizontally, fix the width/classes
of the columns
$inBox.children().each(function(i){
$col = $inBox.children().eq(i);
$col.width(optionWidth + "px");
if(i === 0){

$col.addClass(prefixTheClassName("first"));
}else if(i==$inBox.children().length-1){

$col.addClass(prefixTheClassName("last"));
}else{

$col.removeClass(prefixTheClassName("first"));
$col.removeClass(prefixTheClassName("last"));
}
});
$inBox.width($inBox.children().length * optionWidth +
"px");
}
$inBox.append($("<br style='clear:both;'>"));
}
$inBox.find(prefixTheClassName("column", true)).find(":first" +
prefixTheClassName("removeiffirst", true)).remove();
$inBox.find(prefixTheClassName("column", true)).find(':last' +
prefixTheClassName("removeiflast", true)).remove();
$inBox.data("columnizing", false);

if(options.overflow){
options.overflow.doneFunc();
}
options.doneFunc();
}
});
};
})(jQuery);
;
/*!
* jQuery Selectbox plugin 0.2
*
* Copyright 2011-2012, Dimitar Ivanov (http://www.bulgaria-web-
developers.com/projects/javascript/selectbox/)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
license.
*
* Date: Tue Jul 17 19:58:36 2012 +0300
*/
(function ($, undefined) {
var PROP_NAME = 'selectbox',
FALSE = false,
TRUE = true;
/**
* Selectbox manager.
* Use the singleton instance of this class, $.selectbox, to interact with the
select box.
* Settings for (groups of) select boxes are maintained in an instance object,
* allowing multiple different settings on the same page
*/
function Selectbox() {
this._state = [];
this._defaults = { // Global defaults for all the select box instances
classHolder: "sbHolder",
classHolderDisabled: "sbHolderDisabled",
classSelector: "sbSelector",
classOptions: "sbOptions",
classGroup: "sbGroup",
classSub: "sbSub",
classDisabled: "sbDisabled",
classToggleOpen: "sbToggleOpen",
classToggle: "sbToggle",
classFocus: "sbFocus",
speed: 200,
effect: "fade", // "slide" or "fade"
onChange: null, //Define a callback function when the selectbox is
changed
onOpen: null, //Define a callback function when the selectbox is open
onClose: null //Define a callback function when the selectbox is closed
};
}

$.extend(Selectbox.prototype, {
/**
* Is the first field in a jQuery collection open as a selectbox
*
* @param {Object} target
* @return {Boolean}
*/
_isOpenSelectbox: function (target) {
if (!target) {
return FALSE;
}
var inst = this._getInst(target);
return inst.isOpen;
},
/**
* Is the first field in a jQuery collection disabled as a selectbox
*
* @param {HTMLElement} target
* @return {Boolean}
*/
_isDisabledSelectbox: function (target) {
if (!target) {
return FALSE;
}
var inst = this._getInst(target);
return inst.isDisabled;
},
/**
* Attach the select box to a jQuery selection.
*
* @param {HTMLElement} target
* @param {Object} settings
*/
_attachSelectbox: function (target, settings) {
if (this._getInst(target)) {
return FALSE;
}
var $target = $(target),
self = this,
inst = self._newInst($target),
sbHolder, sbSelector, sbToggle, sbOptions,
s = FALSE, optGroup = $target.find("optgroup"), opts =
$target.find("option"), olen = opts.length;

$target.attr("sb", inst.uid);

$.extend(inst.settings, self._defaults, settings);


self._state[inst.uid] = FALSE;
$target.hide();

function closeOthers() {
var key, sel,
uid = this.attr("id").split("_")[1];
for (key in self._state) {
if (key !== uid) {
if (self._state.hasOwnProperty(key)) {
sel = $("select[sb='" + key + "']")[0];
if (sel) {
self._closeSelectbox(sel);
}
}
}
}
}

sbHolder = $("<div>", {
"id": "sbHolder_" + inst.uid,
"class": inst.settings.classHolder,
"tabindex": $target.attr("tabindex")
});

sbSelector = $("<a>", {
"id": "sbSelector_" + inst.uid,
"href": "#",
"class": inst.settings.classSelector,
"click": function (e) {
e.preventDefault();
closeOthers.apply($(this), []);
var uid = $(this).attr("id").split("_")[1];
if (self._state[uid]) {
self._closeSelectbox(target);
} else {
self._openSelectbox(target);
}
}
});

sbToggle = $("<a>", {
"id": "sbToggle_" + inst.uid,
"href": "#",
"class": inst.settings.classToggle,
"click": function (e) {
e.preventDefault();
closeOthers.apply($(this), []);
var uid = $(this).attr("id").split("_")[1];
if (self._state[uid]) {
self._closeSelectbox(target);
} else {
self._openSelectbox(target);
}
}
});
sbToggle.appendTo(sbHolder);

sbOptions = $("<ul>", {
"id": "sbOptions_" + inst.uid,
"class": inst.settings.classOptions,
"css": {
"display": "none"
}
});
$target.children().each(function (i) {
var that = $(this), li, config = {};
if (that.is("option")) {
getOptions(that);
} else if (that.is("optgroup")) {
li = $("<li>");
$("<span>", {
"text": that.attr("label")
}).addClass(inst.settings.classGroup).appendTo(li);
li.appendTo(sbOptions);
if (that.is(":disabled")) {
config.disabled = true;
}
config.sub = true;
getOptions(that.find("option"), config);
}
});

function getOptions() {
var sub = arguments[1] && arguments[1].sub ? true : false,
disabled = arguments[1] && arguments[1].disabled ?
true : false;
arguments[0].each(function (i) {
var that = $(this),
li = $("<li>"),
child;
if (that.is(":selected")) {
sbSelector.text(that.text());
s = TRUE;
}
if (i === olen - 1) {
li.addClass("last");
}
if (!that.is(":disabled") && !disabled) {
child = $("<a>", {
"href": "#" + that.val(),
"rel": that.val()
}).text(that.text()).bind("click.sb", function (e) {
if (e && e.preventDefault) {
e.preventDefault();
}
var t = sbToggle,
$this = $(this),
uid = t.attr("id").split("_")[1];
self._changeSelectbox(target, $this.attr("rel"),
$this.text());
self._closeSelectbox(target);
}).bind("mouseover.sb", function () {
var $this = $(this);

$this.parent().siblings().find("a").removeClass(inst.settings.classFocus);
$this.addClass(inst.settings.classFocus);
}).bind("mouseout.sb", function () {
$(this).removeClass(inst.settings.classFocus);
});
if (sub) {
child.addClass(inst.settings.classSub);
}
if (that.is(":selected")) {
child.addClass(inst.settings.classFocus);
}
child.appendTo(li);
} else {
child = $("<span>", {
"text": that.text()
}).addClass(inst.settings.classDisabled);
if (sub) {
child.addClass(inst.settings.classSub);
}
child.appendTo(li);
}
li.appendTo(sbOptions);
});
}

if (!s) {
sbSelector.text(opts.first().text());
}

$.data(target, PROP_NAME, inst);

sbHolder.data("uid", inst.uid).bind("keydown.sb", function (e) {


var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0,
$this = $(this),
uid = $this.data("uid"),
inst = $this.siblings("select[sb='" + uid +
"']").data(PROP_NAME),
trgt = $this.siblings(["select[sb='", uid,
"']"].join("")).get(0),
$f = $this.find("ul").find("a." +
inst.settings.classFocus);
switch (key) {
case 37: //Arrow Left
case 38: //Arrow Up
if ($f.length > 0) {
var $next;
$("a", $this).removeClass(inst.settings.classFocus);
$next =
$f.parent().prevAll("li:has(a)").eq(0).find("a");
if ($next.length > 0) {
$next.addClass(inst.settings.classFocus).focus();
$("#sbSelector_" + uid).text($next.text());
}
}
break;
case 39: //Arrow Right
case 40: //Arrow Down
var $next;
$("a", $this).removeClass(inst.settings.classFocus);
if ($f.length > 0) {
$next =
$f.parent().nextAll("li:has(a)").eq(0).find("a");
} else {
$next = $this.find("ul").find("a").eq(0);
}
if ($next.length > 0) {
$next.addClass(inst.settings.classFocus).focus();
$("#sbSelector_" + uid).text($next.text());
}
break;
case 13: //Enter
if ($f.length > 0) {
self._changeSelectbox(trgt, $f.attr("rel"), $f.text());
}
self._closeSelectbox(trgt);
break;
case 9: //Tab
if (trgt) {
var inst = self._getInst(trgt);
if (inst/* && inst.isOpen*/) {
if ($f.length > 0) {
self._changeSelectbox(trgt, $f.attr("rel"),
$f.text());
}
self._closeSelectbox(trgt);
}
}
var i = parseInt($this.attr("tabindex"), 10);
if (!e.shiftKey) {
i++;
} else {
i--;
}
$("*[tabindex='" + i + "']").focus();
break;
case 27: //Escape
self._closeSelectbox(trgt);
break;
}
e.stopPropagation();
return false;
}).delegate("a", "mouseover", function (e) {
$(this).addClass(inst.settings.classFocus);
}).delegate("a", "mouseout", function (e) {
$(this).removeClass(inst.settings.classFocus);
});

sbSelector.appendTo(sbHolder);
sbOptions.appendTo(sbHolder);
sbHolder.insertAfter($target);

$("html").on('mousedown', function (e) {


e.stopPropagation();
$("select").selectbox('close');
});
$([".", inst.settings.classHolder, ", .",
inst.settings.classSelector].join("")).mousedown(function (e) {
e.stopPropagation();
});
},
/**
* Remove the selectbox functionality completely. This will return the
element back to its pre-init state.
*
* @param {HTMLElement} target
*/
_detachSelectbox: function (target) {
var inst = this._getInst(target);
if (!inst) {
return FALSE;
}
$("#sbHolder_" + inst.uid).remove();
$.data(target, PROP_NAME, null);
$(target).show();
},
/**
* Change selected attribute of the selectbox.
*
* @param {HTMLElement} target
* @param {String} value
* @param {String} text
*/
_changeSelectbox: function (target, value, text) {
var onChange,
inst = this._getInst(target);
if (inst) {
onChange = this._get(inst, 'onChange');
$("#sbSelector_" + inst.uid).text(text);
}
value = value.replace(/\'/g, "\\'");
$(target).find("option[value='" + value + "']").attr("selected", TRUE);
if (inst && onChange) {
onChange.apply((inst.input ? inst.input[0] : null), [value, inst]);
} else if (inst && inst.input) {
inst.input.trigger('change');
}
},
/**
* Enable the selectbox.
*
* @param {HTMLElement} target
*/
_enableSelectbox: function (target) {
var inst = this._getInst(target);
if (!inst || !inst.isDisabled) {
return FALSE;
}
$("#sbHolder_" +
inst.uid).removeClass(inst.settings.classHolderDisabled);
inst.isDisabled = FALSE;
$.data(target, PROP_NAME, inst);
},
/**
* Disable the selectbox.
*
* @param {HTMLElement} target
*/
_disableSelectbox: function (target) {
var inst = this._getInst(target);
if (!inst || inst.isDisabled) {
return FALSE;
}
$("#sbHolder_" + inst.uid).addClass(inst.settings.classHolderDisabled);
inst.isDisabled = TRUE;
$.data(target, PROP_NAME, inst);
},
/**
* Get or set any selectbox option. If no value is specified, will act as a
getter.
*
* @param {HTMLElement} target
* @param {String} name
* @param {Object} value
*/
_optionSelectbox: function (target, name, value) {
var inst = this._getInst(target);
if (!inst) {
return FALSE;
}
//TODO check name
inst[name] = value;
$.data(target, PROP_NAME, inst);
},
/**
* Call up attached selectbox
*
* @param {HTMLElement} target
*/
_openSelectbox: function (target) {
var inst = this._getInst(target);
//if (!inst || this._state[inst.uid] || inst.isDisabled) {
if (!inst || inst.isOpen || inst.isDisabled) {
return;
}
var el = $("#sbOptions_" + inst.uid),
viewportHeight = parseInt($(window).height(), 10),
offset = $("#sbHolder_" + inst.uid).offset(),
scrollTop = $(window).scrollTop(),
height = el.prev().height(),
diff = viewportHeight - (offset.top - scrollTop) - height /
2,
onOpen = this._get(inst, 'onOpen');
/**
el.css({
"maxHeight": (diff - height) + "px"
});
*/
if (el.children().length > 6)
{
el.css({
"maxHeight": "186px",
"top": "-186px"
});

} else {
var dynamicTop = el.height() / 2;
el.css({
"top": "-" + el.height() + "px"
});
}

inst.settings.effect === "fade" ? el.fadeIn(inst.settings.speed) :


el.slideDown(inst.settings.speed);
$("#sbToggle_" + inst.uid).addClass(inst.settings.classToggleOpen);
this._state[inst.uid] = TRUE;
inst.isOpen = TRUE;
if (onOpen) {
onOpen.apply((inst.input ? inst.input[0] : null), [inst]);
}
$.data(target, PROP_NAME, inst);
},
/**
* Close opened selectbox
*
* @param {HTMLElement} target
*/
_closeSelectbox: function (target) {
var inst = this._getInst(target);
//if (!inst || !this._state[inst.uid]) {
if (!inst || !inst.isOpen) {
return;
}
var onClose = this._get(inst, 'onClose');
inst.settings.effect === "fade" ? $("#sbOptions_" +
inst.uid).fadeOut(inst.settings.speed) : $("#sbOptions_" +
inst.uid).slideUp(inst.settings.speed);
$("#sbToggle_" + inst.uid).removeClass(inst.settings.classToggleOpen);
this._state[inst.uid] = FALSE;
inst.isOpen = FALSE;
if (onClose) {
onClose.apply((inst.input ? inst.input[0] : null), [inst]);
}
$.data(target, PROP_NAME, inst);
},
/**
* Create a new instance object
*
* @param {HTMLElement} target
* @return {Object}
*/
_newInst: function (target) {
var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1');
return {
id: id,
input: target,
uid: Math.floor(Math.random() * 99999999),
isOpen: FALSE,
isDisabled: FALSE,
settings: {}
};
},
/**
* Retrieve the instance data for the target control.
*
* @param {HTMLElement} target
* @return {Object} - the associated instance data
* @throws error if a jQuery problem getting data
*/
_getInst: function (target) {
try {
return $.data(target, PROP_NAME);
}
catch (err) {
throw 'Missing instance data for this selectbox';
}
},
/**
* Get a setting value, defaulting if necessary
*
* @param {Object} inst
* @param {String} name
* @return {Mixed}
*/
_get: function (inst, name) {
return inst.settings[name] !== undefined ? inst.settings[name] :
this._defaults[name];
}
});

/**
* Invoke the selectbox functionality.
*
* @param {Object|String} options
* @return {Object}
*/
$.fn.selectbox = function (options) {

var otherArgs = Array.prototype.slice.call(arguments, 1);


if (typeof options == 'string' && options == 'isDisabled') {
return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox,
[this[0]].concat(otherArgs));
}

if (options == 'option' && arguments.length == 2 && typeof arguments[1] ==


'string') {
return $.selectbox['_' + options + 'Selectbox'].apply($.selectbox,
[this[0]].concat(otherArgs));
}

return this.each(function () {
typeof options == 'string' ?
$.selectbox['_' + options + 'Selectbox'].apply($.selectbox,
[this].concat(otherArgs)) :
$.selectbox._attachSelectbox(this, options);
});
};

$.selectbox = new Selectbox(); // singleton instance


$.selectbox.version = "0.2";
})(jQuery);;
/**
* BxSlider v4.1.2 - Fully loaded, responsive content slider
* http://bxslider.com
*
* Copyright 2014, Steven Wanderski - http://stevenwanderski.com -
http://bxcreative.com
* Written while drinking Belgian ales and listening to jazz
*
* Released under the MIT license - http://opensource.org/licenses/MIT
*/
!function(t){var e={},s={mode:"horizontal",slideSelector:"",infiniteLoop:!
0,hideControlOnEnd:!
1,speed:500,easing:null,slideMargin:0,startSlide:0,randomStart:!1,captions:!
1,ticker:!1,tickerHover:!1,adaptiveHeight:!1,adaptiveHeightSpeed:500,video:!
1,useCSS:!0,preloadImages:"visible",responsive:!0,slideZIndex:50,touchEnabled:!
0,swipeThreshold:50,oneToOneTouch:!0,preventDefaultSwipeX:!0,preventDefaultSwipeY:!
1,pager:!0,pagerType:"full",pagerShortSeparator:" /
",pagerSelector:null,buildPager:null,pagerCustom:null,controls:!
0,nextText:"Next",prevText:"Prev",nextSelector:null,prevSelector:null,autoControls:
!1,startText:"Start",stopText:"Stop",autoControlsCombine:!
1,autoControlsSelector:null,auto:!1,pause:4e3,autoStart:!
0,autoDirection:"next",autoHover:!
1,autoDelay:0,minSlides:1,maxSlides:1,moveSlides:0,slideWidth:0,onSliderLoad:functi
on(){},onSlideBefore:function(){},onSlideAfter:function(){},onSlideNext:function()
{},onSlidePrev:function(){},onSliderResize:function(){}};t.fn.bxSlider=function(n)
{if(0==this.length)return this;if(this.length>1)return this.each(function()
{t(this).bxSlider(n)}),this;var o={},r=this;e.el=this;var
a=t(window).width(),l=t(window).height(),d=function()
{o.settings=t.extend({},s,n),o.settings.slideWidth=parseInt(o.settings.slideWidth),
o.children=r.children(o.settings.slideSelector),o.children.length<o.settings.minSli
des&&(o.settings.minSlides=o.children.length),o.children.length<o.settings.maxSlide
s&&(o.settings.maxSlides=o.children.length),o.settings.randomStart&&(o.settings.sta
rtSlide=Math.floor(Math.random()*o.children.length)),o.active={index:o.settings.sta
rtSlide},o.carousel=o.settings.minSlides>1||
o.settings.maxSlides>1,o.carousel&&(o.settings.preloadImages="all"),o.minThreshold=
o.settings.minSlides*o.settings.slideWidth+(o.settings.minSlides-
1)*o.settings.slideMargin,o.maxThreshold=o.settings.maxSlides*o.settings.slideWidth
+(o.settings.maxSlides-1)*o.settings.slideMargin,o.working=!
1,o.controls={},o.interval=null,o.animProp="vertical"==o.settings.mode?"top":"left"
,o.usingCSS=o.settings.useCSS&&"fade"!=o.settings.mode&&function(){var
t=document.createElement("div"),e=["WebkitPerspective","MozPerspective","OPerspecti
ve","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return
o.cssPrefix=e[i].replace("Perspective","").toLowerCase(),o.animProp="-"+o.cssPrefix
+"-transform",!0;return!1}
(),"vertical"==o.settings.mode&&(o.settings.maxSlides=o.settings.minSlides),r.data(
"origStyle",r.attr("style")),r.children(o.settings.slideSelector).each(function()
{t(this).data("origStyle",t(this).attr("style"))}),c()},c=function(){r.wrap('<div
class="bx-wrapper"><div class="bx-
viewport"></div></div>'),o.viewport=r.parent(),o.loader=t('<div class="bx-
loading"
/>'),o.viewport.prepend(o.loader),r.css({width:"horizontal"==o.settings.mode?
100*o.children.length+215+"%":"auto",position:"relative"}),o.usingCSS&&o.settings.e
asing?r.css("-"+o.cssPrefix+"-transition-timing-
function",o.settings.easing):o.settings.easing||
(o.settings.easing="swing"),f(),o.viewport.css({width:"100%",overflow:"hidden",posi
tion:"relative"}),o.viewport.parent().css({maxWidth:p()}),o.settings.pager||
o.viewport.parent().css({margin:"0 auto
0px"}),o.children.css({"float":"horizontal"==o.settings.mode?"left":"none",listStyl
e:"none",position:"relative"}),o.children.css("width",u()),"horizontal"==o.settings
.mode&&o.settings.slideMargin>0&&o.children.css("marginRight",o.settings.slideMargi
n),"vertical"==o.settings.mode&&o.settings.slideMargin>0&&o.children.css("marginBot
tom",o.settings.slideMargin),"fade"==o.settings.mode&&(o.children.css({position:"ab
solute",zIndex:0,display:"none"}),o.children.eq(o.settings.startSlide).css({zIndex:
o.settings.slideZIndex,display:"block"})),o.controls.el=t('<div class="bx-controls"
/>'),o.settings.captions&&P(),o.active.last=o.settings.startSlide==x()-
1,o.settings.video&&r.fitVids();var
e=o.children.eq(o.settings.startSlide);"all"==o.settings.preloadImages&&(e=o.childr
en),o.settings.ticker?o.settings.pager=!1:
(o.settings.pager&&T(),o.settings.controls&&C(),o.settings.auto&&o.settings.autoCon
trols&&E(),(o.settings.controls||o.settings.autoControls||
o.settings.pager)&&o.viewport.after(o.controls.el)),g(e,h)},g=function(e,i){var
s=e.find("img, iframe").length;if(0==s)return i(),void 0;var n=0;e.find("img,
iframe").each(function(){t(this).one("load",function(){+
+n==s&&i()}).each(function(){this.complete&&t(this).load()})})},h=function()
{if(o.settings.infiniteLoop&&"fade"!=o.settings.mode&&!o.settings.ticker){var
e="vertical"==o.settings.mode?
o.settings.minSlides:o.settings.maxSlides,i=o.children.slice(0,e).clone().addClass(
"bx-clone"),s=o.children.slice(-e).clone().addClass("bx-
clone");r.append(i).prepend(s)}o.loader.remove(),S(),"vertical"==o.settings.mode&&(
o.settings.adaptiveHeight=!
0),o.viewport.height(v()),r.redrawSlider(),o.settings.onSliderLoad(o.active.index),
o.initialized=!
0,o.settings.responsive&&t(window).bind("resize",Z),o.settings.auto&&o.settings.aut
oStart&&H(),o.settings.ticker&&L(),o.settings.pager&&q(o.settings.startSlide),o.set
tings.controls&&W(),o.settings.touchEnabled&&!o.settings.ticker&&O()},v=function()
{var e=0,s=t();if("vertical"==o.settings.mode||
o.settings.adaptiveHeight)if(o.carousel){var n=1==o.settings.moveSlides?
o.active.index:o.active.index*m();for(s=o.children.eq(n),i=1;i<=o.settings.maxSlide
s-1;i++)s=n+i>=o.children.length?s.add(o.children.eq(i-
1)):s.add(o.children.eq(n+i))}else s=o.children.eq(o.active.index);else
s=o.children;return"vertical"==o.settings.mode?(s.each(function()
{e+=t(this).outerHeight()}),o.settings.slideMargin>0&&(e+=o.settings.slideMargin*(o
.settings.minSlides-1))):e=Math.max.apply(Math,s.map(function(){return
t(this).outerHeight(!1)}).get()),e},p=function(){var t="100%";return
o.settings.slideWidth>0&&(t="horizontal"==o.settings.mode?
o.settings.maxSlides*o.settings.slideWidth+(o.settings.maxSlides-
1)*o.settings.slideMargin:o.settings.slideWidth),t},u=function(){var
t=o.settings.slideWidth,e=o.viewport.width();return 0==o.settings.slideWidth||
o.settings.slideWidth>e&&!o.carousel||"vertical"==o.settings.mode?
t=e:o.settings.maxSlides>1&&"horizontal"==o.settings.mode&&(e>o.maxThreshold||
e<o.minThreshold&&(t=(e-o.settings.slideMargin*(o.settings.minSlides-
1))/o.settings.minSlides)),t},f=function(){var
t=1;if("horizontal"==o.settings.mode&&o.settings.slideWidth>0)if(o.viewport.width()
<o.minThreshold)t=o.settings.minSlides;else
if(o.viewport.width()>o.maxThreshold)t=o.settings.maxSlides;else{var
e=o.children.first().width();t=Math.floor(o.viewport.width()/e)}else"vertical"==o.s
ettings.mode&&(t=o.settings.minSlides);return t},x=function(){var
t=0;if(o.settings.moveSlides>0)if(o.settings.infiniteLoop)t=o.children.length/m();e
lse for(var e=0,i=0;e<o.children.length;)++t,e=i+f(),i+=o.settings.moveSlides<=f()?
o.settings.moveSlides:f();else t=Math.ceil(o.children.length/f());return
t},m=function(){return o.settings.moveSlides>0&&o.settings.moveSlides<=f()?
o.settings.moveSlides:f()},S=function()
{if(o.children.length>o.settings.maxSlides&&o.active.last&&!
o.settings.infiniteLoop){if("horizontal"==o.settings.mode){var
t=o.children.last(),e=t.position();b(-(e.left-(o.viewport.width()-
t.width())),"reset",0)}else if("vertical"==o.settings.mode){var
i=o.children.length-o.settings.minSlides,e=o.children.eq(i).position();b(-
e.top,"reset",0)}}else{var
e=o.children.eq(o.active.index*m()).position();o.active.index==x()-
1&&(o.active.last=!0),void 0!=e&&("horizontal"==o.settings.mode?b(-
e.left,"reset",0):"vertical"==o.settings.mode&&b(-
e.top,"reset",0))}},b=function(t,e,i,s){if(o.usingCSS){var
n="vertical"==o.settings.mode?"translate3d(0, "+t+"px, 0)":"translate3d("+t+"px, 0,
0)";r.css("-"+o.cssPrefix+"-transition-duration",i/1e3+"s"),"slide"==e?
(r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd oTransitionEnd
MSTransitionEnd",function(){r.unbind("transitionend webkitTransitionEnd
oTransitionEnd MSTransitionEnd"),D()})):"reset"==e?
r.css(o.animProp,n):"ticker"==e&&(r.css("-"+o.cssPrefix+"-transition-timing-
function","linear"),r.css(o.animProp,n),r.bind("transitionend webkitTransitionEnd
oTransitionEnd MSTransitionEnd",function(){r.unbind("transitionend
webkitTransitionEnd oTransitionEnd
MSTransitionEnd"),b(s.resetValue,"reset",0),N()}))}else{var
a={};a[o.animProp]=t,"slide"==e?r.animate(a,i,o.settings.easing,function()
{D()}):"reset"==e?
r.css(o.animProp,t):"ticker"==e&&r.animate(a,speed,"linear",function()
{b(s.resetValue,"reset",0),N()})}},w=function(){for(var e="",i=x(),s=0;i>s;s++){var
n="";o.settings.buildPager&&t.isFunction(o.settings.buildPager)?
(n=o.settings.buildPager(s),o.pagerEl.addClass("bx-custom-pager")):
(n=s+1,o.pagerEl.addClass("bx-default-pager")),e+='<div class="bx-pager-item"><a
href="" data-slide-index="'+s+'" class="bx-pager-
link">'+n+"</a></div>"}o.pagerEl.html(e)},T=function(){o.settings.pagerCustom?
o.pagerEl=t(o.settings.pagerCustom):(o.pagerEl=t('<div class="bx-pager"
/>'),o.settings.pagerSelector?
t(o.settings.pagerSelector).html(o.pagerEl):o.controls.el.addClass("bx-has-
pager").append(o.pagerEl),w()),o.pagerEl.on("click","a",I)},C=function()
{o.controls.next=t('<a class="bx-next"
href="">'+o.settings.nextText+"</a>"),o.controls.prev=t('<a class="bx-prev"
href="">'+o.settings.prevText+"</a>"),o.controls.next.bind("click",y),o.controls.pr
ev.bind("click",z),o.settings.nextSelector&&t(o.settings.nextSelector).append(o.con
trols.next),o.settings.prevSelector&&t(o.settings.prevSelector).append(o.controls.p
rev),o.settings.nextSelector||o.settings.prevSelector||
(o.controls.directionEl=t('<div class="bx-controls-direction"
/>'),o.controls.directionEl.append(o.controls.prev).append(o.controls.next),o.contr
ols.el.addClass("bx-has-controls-
direction").append(o.controls.directionEl))},E=function(){o.controls.start=t('<div
class="bx-controls-auto-item"><a class="bx-start"
href="">'+o.settings.startText+"</a></div>"),o.controls.stop=t('<div class="bx-
controls-auto-item"><a
class="bx-stop"
href="">'+o.settings.stopText+"</a></div>"),o.controls.autoEl=t('<div class="bx-
controls-auto" />'),o.controls.autoEl.on("click",".bx-
start",k),o.controls.autoEl.on("click",".bx-
stop",M),o.settings.autoControlsCombine?
o.controls.autoEl.append(o.controls.start):o.controls.autoEl.append(o.controls.star
t).append(o.controls.stop),o.settings.autoControlsSelector?
t(o.settings.autoControlsSelector).html(o.controls.autoEl):o.controls.el.addClass("
bx-has-controls-
auto").append(o.controls.autoEl),A(o.settings.autoStart?"stop":"start")},P=function
(){o.children.each(function(){var e=t(this).find("img:first").attr("title");void 0!
=e&&(""+e).length&&t(this).append('<div class="bx-
caption"><span>'+e+"</span></div>")})},y=function(t)
{o.settings.auto&&r.stopAuto(),r.goToNextSlide(),t.preventDefault()},z=function(t)
{o.settings.auto&&r.stopAuto(),r.goToPrevSlide(),t.preventDefault()},k=function(t)
{r.startAuto(),t.preventDefault()},M=function(t)
{r.stopAuto(),t.preventDefault()},I=function(e){o.settings.auto&&r.stopAuto();var
i=t(e.currentTarget),s=parseInt(i.attr("data-slide-index"));s!
=o.active.index&&r.goToSlide(s),e.preventDefault()},q=function(e){var
i=o.children.length;return"short"==o.settings.pagerType?
(o.settings.maxSlides>1&&(i=Math.ceil(o.children.length/o.settings.maxSlides)),o.pa
gerEl.html(e+1+o.settings.pagerShortSeparator+i),void 0):
(o.pagerEl.find("a").removeClass("active"),o.pagerEl.each(function(i,s)
{t(s).find("a").eq(e).addClass("active")}),void 0)},D=function()
{if(o.settings.infiniteLoop){var t="";0==o.active.index?
t=o.children.eq(0).position():o.active.index==x()-1&&o.carousel?
t=o.children.eq((x()-1)*m()).position():o.active.index==o.children.length-
1&&(t=o.children.eq(o.children.length-
1).position()),t&&("horizontal"==o.settings.mode?b(-
t.left,"reset",0):"vertical"==o.settings.mode&&b(-t.top,"reset",0))}o.working=!
1,o.settings.onSlideAfter(o.children.eq(o.active.index),o.oldIndex,o.active.index)}
,A=function(t){o.settings.autoControlsCombine?
o.controls.autoEl.html(o.controls[t]):
(o.controls.autoEl.find("a").removeClass("active"),o.controls.autoEl.find("a:not(.b
x-"+t+")").addClass("active"))},W=function(){1==x()?
(o.controls.prev.addClass("disabled"),o.controls.next.addClass("disabled")):!
o.settings.infiniteLoop&&o.settings.hideControlOnEnd&&(0==o.active.index?
(o.controls.prev.addClass("disabled"),o.controls.next.removeClass("disabled")):o.ac
tive.index==x()-1?
(o.controls.next.addClass("disabled"),o.controls.prev.removeClass("disabled")):
(o.controls.prev.removeClass("disabled"),o.controls.next.removeClass("disabled")))}
,H=function(){o.settings.autoDelay>0?
setTimeout(r.startAuto,o.settings.autoDelay):r.startAuto(),o.settings.autoHover&&r.
hover(function(){o.interval&&(r.stopAuto(!0),o.autoPaused=!0)},function()
{o.autoPaused&&(r.startAuto(!0),o.autoPaused=null)})},L=function(){var
e=0;if("next"==o.settings.autoDirection)r.append(o.children.clone().addClass("bx-
clone"));else{r.prepend(o.children.clone().addClass("bx-clone"));var
i=o.children.first().position();e="horizontal"==o.settings.mode?-i.left:-
i.top}b(e,"reset",0),o.settings.pager=!1,o.settings.controls=!
1,o.settings.autoControls=!1,o.settings.tickerHover&&!
o.usingCSS&&o.viewport.hover(function(){r.stop()},function(){var
e=0;o.children.each(function(){e+="horizontal"==o.settings.mode?
t(this).outerWidth(!0):t(this).outerHeight(!0)});var
i=o.settings.speed/e,s="horizontal"==o.settings.mode?"left":"top",n=i*(e-
Math.abs(parseInt(r.css(s))));N(n)}),N()},N=function(t){speed=t?
t:o.settings.speed;var
e={left:0,top:0},i={left:0,top:0};"next"==o.settings.autoDirection?e=r.find(".bx-
clone").first().position():i=o.children.first().position();var
s="horizontal"==o.settings.mode?-e.left:-e.top,n="horizontal"==o.settings.mode?-
i.left:-i.top,a={resetValue:n};b(s,"ticker",speed,a)},O=function(){o.touch={start:
{x:0,y:0},end:{x:0,y:0}},o.viewport.bind("touchstart",X)},X=function(t)
{if(o.working)t.preventDefault();else{o.touch.originalPos=r.position();var
e=t.originalEvent;o.touch.start.x=e.changedTouches[0].pageX,o.touch.start.y=e.chang
edTouches[0].pageY,o.viewport.bind("touchmove",Y),o.viewport.bind("touchend",V)}},Y
=function(t){var e=t.originalEvent,i=Math.abs(e.changedTouches[0].pageX-
o.touch.start.x),s=Math.abs(e.changedTouches[0].pageY-
o.touch.start.y);if(3*i>s&&o.settings.preventDefaultSwipeX?
t.preventDefault():3*s>i&&o.settings.preventDefaultSwipeY&&t.preventDefault(),"fade
"!=o.settings.mode&&o.settings.oneToOneTouch){var
n=0;if("horizontal"==o.settings.mode){var r=e.changedTouches[0].pageX-
o.touch.start.x;n=o.touch.originalPos.left+r}else{var r=e.changedTouches[0].pageY-
o.touch.start.y;n=o.touch.originalPos.top+r}b(n,"reset",0)}},V=function(t)
{o.viewport.unbind("touchmove",Y);var
e=t.originalEvent,i=0;if(o.touch.end.x=e.changedTouches[0].pageX,o.touch.end.y=e.ch
angedTouches[0].pageY,"fade"==o.settings.mode){var s=Math.abs(o.touch.start.x-
o.touch.end.x);s>=o.settings.swipeThreshold&&(o.touch.start.x>o.touch.end.x?
r.goToNextSlide():r.goToPrevSlide(),r.stopAuto())}else{var
s=0;"horizontal"==o.settings.mode?(s=o.touch.end.x-
o.touch.start.x,i=o.touch.originalPos.left):(s=o.touch.end.y-
o.touch.start.y,i=o.touch.originalPos.top),!
o.settings.infiniteLoop&&(0==o.active.index&&s>0||o.active.last&&0>s)?
b(i,"reset",200):Math.abs(s)>=o.settings.swipeThreshold?(0>s?
r.goToNextSlide():r.goToPrevSlide(),r.stopAuto()):b(i,"reset",200)}o.viewport.unbin
d("touchend",V)},Z=function(){var e=t(window).width(),i=t(window).height();(a!=e||
l!
=i)&&(a=e,l=i,r.redrawSlider(),o.settings.onSliderResize.call(r,o.active.index))};r
eturn r.goToSlide=function(e,i){if(!o.working&&o.active.index!=e)if(o.working=!
0,o.oldIndex=o.active.index,o.active.index=0>e?x()-1:e>=x()?
0:e,o.settings.onSlideBefore(o.children.eq(o.active.index),o.oldIndex,o.active.inde
x),"next"==i?
o.settings.onSlideNext(o.children.eq(o.active.index),o.oldIndex,o.active.index):"pr
ev"==i&&o.settings.onSlidePrev(o.children.eq(o.active.index),o.oldIndex,o.active.in
dex),o.active.last=o.active.index>=x()-
1,o.settings.pager&&q(o.active.index),o.settings.controls&&W(),"fade"==o.settings.m
ode)o.settings.adaptiveHeight&&o.viewport.height()!
=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed),o.children.fi
lter(":visible").fadeOut(o.settings.speed).css({zIndex:0}),o.children.eq(o.active.i
ndex).css("zIndex",o.settings.slideZIndex+1).fadeIn(o.settings.speed,function()
{t(this).css("zIndex",o.settings.slideZIndex),D()});else{o.settings.adaptiveHeight&
&o.viewport.height()!
=v()&&o.viewport.animate({height:v()},o.settings.adaptiveHeightSpeed);var
s=0,n={left:0,top:0};if(!
o.settings.infiniteLoop&&o.carousel&&o.active.last)if("horizontal"==o.settings.mode
){var a=o.children.eq(o.children.length-1);n=a.position(),s=o.viewport.width()-
a.outerWidth()}else{var l=o.children.length-
o.settings.minSlides;n=o.children.eq(l).position()}else
if(o.carousel&&o.active.last&&"prev"==i){var d=1==o.settings.moveSlides?
o.settings.maxSlides-m():(x()-1)*m()-(o.children.length-
o.settings.maxSlides),a=r.children(".bx-clone").eq(d);n=a.position()}else
if("next"==i&&0==o.active.index)n=r.find("> .bx-
clone").eq(o.settings.maxSlides).position(),o.active.last=!1;else if(e>=0){var
c=e*m();n=o.children.eq(c).position()}if("undefined"!=typeof n){var
g="horizontal"==o.settings.mode?-(n.left-s):-
n.top;b(g,"slide",o.settings.speed)}}},r.goToNextSlide=function()
{if(o.settings.infiniteLoop||!o.active.last){var t=parseInt(o.active.index)
+1;r.goToSlide(t,"next")}},r.goToPrevSlide=function(){if(o.settings.infiniteLoop||
0!=o.active.index){var t=parseInt(o.active.index)-
1;r.goToSlide(t,"prev")}},r.startAuto=function(t){o.interval||
(o.interval=setInterval(function(){"next"==o.settings.autoDirection?
r.goToNextSlide():r.goToPrevSlide()},o.settings.pause),o.settings.autoControls&&1!
=t&&A("stop"))},r.stopAuto=function(t)
{o.interval&&(clearInterval(o.interval),o.interval=null,o.settings.autoControls&&1!
=t&&A("start"))},r.getCurrentSlide=function(){return
o.active.index},r.getCurrentSlideElement=function(){return
o.children.eq(o.active.index)},r.getSlideCount=function(){return
o.children.length},r.redrawSlider=function(){o.children.add(r.find(".bx-
clone")).outerWidth(u()),o.viewport.css("height",v()),o.settings.ticker||
S(),o.active.last&&(o.active.index=x()-1),o.active.index>=x()&&(o.active.last=!
0),o.settings.pager&&!
o.settings.pagerCustom&&(w(),q(o.active.index))},r.destroySlider=function()
{o.initialized&&(o.initialized=!1,t(".bx-
clone",this).remove(),o.children.each(function(){void 0!=t(this).data("origStyle")?
t(this).attr("style",t(this).data("origStyle")):t(this).removeAttr("style")}),void
0!=t(this).data("origStyle")?
this.attr("style",t(this).data("origStyle")):t(this).removeAttr("style"),t(this).un
wrap().unwrap(),o.controls.el&&o.controls.el.remove(),o.controls.next&&o.controls.n
ext.remove(),o.controls.prev&&o.controls.prev.remove(),o.pagerEl&&o.settings.contro
ls&&o.pagerEl.remove(),t(".bx-
caption",this).remove(),o.controls.autoEl&&o.controls.autoEl.remove(),clearInterval
(o.interval),o.settings.responsive&&t(window).unbind("resize",Z))},r.reloadSlider=f
unction(t){void 0!=t&&(n=t),r.destroySlider(),d()},d(),this}}(jQuery);;
/* == jquery mousewheel plugin == Version: 3.1.11, License: MIT License (MIT) */
!function(a){"function"==typeof define&&define.amd?
define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}
(function(a){function b(b){var g=b||
window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.ty
pe="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in
g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-
1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?
l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!
==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-
height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-
page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||
f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"]
(j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"]
(m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var
s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return
b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshi
ft(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||
a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return
k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var
e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in
document||document.documentMode>=9?["wheel"]:
["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.
event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--
j]]=a.event.mouseHooks;var
k=a.event.special.mousewheel={version:"3.1.11",setup:function()
{if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!
1);else this.onmousewheel=b;a.data(this,"mousewheel-line-
height",k.getLineHeight(this)),a.data(this,"mousewheel-page-
height",k.getPageHeight(this))},teardown:function()
{if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--
c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-
height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var
c=a(b)["offsetParent"in a.fn?"offsetParent":"parent"]();return c.length||
(c=a("body")),parseInt(c.css("fontSize"),10)},getPageHeight:function(b){return
a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!
0}};a.fn.extend({mousewheel:function(a){return a?
this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a)
{return this.unbind("mousewheel",a)}})});
/* == malihu jquery custom scrollbar plugin == Version: 3.0.2, License: MIT License
(MIT) */
(function(h,l,m,d){var
e="mCustomScrollbar",a="mCS",k=".mCustomScrollbar",f={setWidth:false,setHeight:fals
e,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDrag
gerLength:true,autoHideScrollbar:false,autoExpandScrollbar:false,alwaysShowScrollba
r:0,snapAmount:null,snapOffset:0,mouseWheel:
{enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaFactor:"auto",n
ormalizeDelta:false,invert:false,disableOver:
["select","option","keygen","datalist","textarea"]},scrollButtons:
{enable:false,scrollType:"stepless",scrollAmount:"auto"},keyboard:
{enable:true,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advan
ced:
{autoExpandHorizontalScroll:false,autoScrollOnFocus:"input,textarea,select,button,d
atalist,keygen,a[tabindex],area,object,
[contenteditable='true']",updateOnContentResize:true,updateOnImageLoad:true,updateO
nSelectorChange:false},theme:"light",callbacks:
{onScrollStart:false,onScroll:false,onTotalScroll:false,onTotalScrollBack:false,whi
leScrolling:false,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffs
ets:true},live:false,liveSelector:null},j=0,o={},c=function(p){if(o[p])
{clearTimeout(o[p]);g._delete.call(null,o[p])}},i=(l.attachEvent&&!
l.addEventListener)?1:0,n=false,b={init:function(q){var q=h.extend(true,
{},f,q),p=g._selector.call(this);if(q.live){var s=q.liveSelector||this.selector||
k,r=h(s);if(q.live==="off"){c(s);return}o[s]=setTimeout(function()
{r.mCustomScrollbar(q);if(q.live==="once"&&r.length)
{c(s)}},500)}else{c(s)}q.setWidth=(q.set_width)?
q.set_width:q.setWidth;q.setHeight=(q.set_height)?
q.set_height:q.setHeight;q.axis=(q.horizontalScroll)?"x":g._findAxis.call(null,q.ax
is);q.scrollInertia=q.scrollInertia<17?17:q.scrollInertia;if(typeof q.mouseWheel!
=="object"&&q.mouseWheel==true)
{q.mouseWheel={enable:true,scrollAmount:"auto",axis:"y",preventDefault:false,deltaF
actor:"auto",normalizeDelta:false,invert:false}}q.mouseWheel.scrollAmount=!
q.mouseWheelPixels?
q.mouseWheel.scrollAmount:q.mouseWheelPixels;q.mouseWheel.normalizeDelta=!
q.advanced.normalizeMouseWheelDelta?
q.mouseWheel.normalizeDelta:q.advanced.normalizeMouseWheelDelta;q.scrollButtons.scr
ollType=g._findScrollButtonsType.call(null,q.scrollButtons.scrollType);g._theme.cal
l(null,q);return h(p).each(function(){var u=h(this);if(!u.data(a)){u.data(a,{idx:+
+j,opt:q,scrollRatio:
{y:null,x:null},overflowed:null,bindEvents:false,tweenRunning:false,sequential:
{},langDir:u.css("direction"),cbOffsets:null,trigger:null});var
w=u.data(a).opt,v=u.data("mcs-axis"),t=u.data("mcs-scrollbar-
position"),x=u.data("mcs-theme");if(v){w.axis=v}if(t){w.scrollbarPosition=t}if(x)
{w.theme=x;g._theme.call(null,w)}g._pluginMarkup.call(this);b.update.call(null,u)}}
)},update:function(q){var p=q||g._selector.call(this);return h(p).each(function()
{var t=h(this);if(t.data(a)){var
v=t.data(a),u=v.opt,r=h("#mCSB_"+v.idx+"_container"),s=[h("#mCSB_"+v.idx+"_dragger_
vertical"),h("#mCSB_"+v.idx+"_dragger_horizontal")];if(!r.length)
{return}if(v.tweenRunning){g._stop.call(null,t)}if(t.hasClass("mCS_disabled"))
{t.removeClass("mCS_disabled")}if(t.hasClass("mCS_destroyed"))
{t.removeClass("mCS_destroyed")}g._maxHeight.call(this);g._expandContentHorizontall
y.call(this);if(u.axis!=="y"&&!u.advanced.autoExpandHorizontalScroll)
{r.css("width",g._contentWidth(r.children()))}v.overflowed=g._overflowed.call(this)
;g._scrollbarVisibility.call(this);if(u.autoDraggerLength)
{g._setDraggerLength.call(this)}g._scrollRatio.call(this);g._bindEvents.call(this);
var w=[Math.abs(r[0].offsetTop),Math.abs(r[0].offsetLeft)];if(u.axis!=="x"){if(!
v.overflowed[0]){g._resetContentPosition.call(this);if(u.axis==="y")
{g._unbindEvents.call(this)}else{if(u.axis==="yx"&&v.overflowed[1])
{g._scrollTo.call(this,t,w[1].toString(),
{dir:"x",dur:0,overwrite:"none"})}}}else{if(s[0].height()>s[0].parent().height())
{g._resetContentPosition.call(this)}else{g._scrollTo.call(this,t,w[0].toString(),
{dir:"y",dur:0,overwrite:"none"})}}}if(u.axis!=="y"){if(!v.overflowed[1])
{g._resetContentPosition.call(this);if(u.axis==="x")
{g._unbindEvents.call(this)}else{if(u.axis==="yx"&&v.overflowed[0])
{g._scrollTo.call(this,t,w[0].toString(),
{dir:"y",dur:0,overwrite:"none"})}}}else{if(s[1].width()>s[1].parent().width())
{g._resetContentPosition.call(this)}else{g._scrollTo.call(this,t,w[1].toString(),
{dir:"x",dur:0,overwrite:"none"})}}}g._autoUpdate.call(this)}})},scrollTo:function(
r,q){if(typeof r=="undefined"||r==null){return}var p=g._selector.call(this);return
h(p).each(function(){var u=h(this);if(u.data(a)){var
x=u.data(a),w=x.opt,v={trigger:"external",scrollInertia:w.scrollInertia,scrollEasin
g:"mcsEaseInOut",moveDragger:false,callbacks:true,onStart:true,onUpdate:true,onComp
lete:true},s=h.extend(true,{},v,q),y=g._arr.call(this,r),t=s.scrollInertia<17?
17:s.scrollInertia;y[0]=g._to.call(this,y[0],"y");y[1]=g._to.call(this,y[1],"x");if
(s.moveDragger)
{y[0]*=x.scrollRatio.y;y[1]*=x.scrollRatio.x}s.dur=t;setTimeout(function(){if(y[0]!
==null&&typeof y[0]!=="undefined"&&w.axis!=="x"&&x.overflowed[0])
{s.dir="y";s.overwrite="all";g._scrollTo.call(this,u,y[0].toString(),s)}if(y[1]!
==null&&typeof y[1]!=="undefined"&&w.axis!=="y"&&x.overflowed[1])
{s.dir="x";s.overwrite="none";g._scrollTo.call(this,u,y[1].toString(),s)}},60)}})},
stop:function(){var p=g._selector.call(this);return h(p).each(function(){var
q=h(this);if(q.data(a)){g._stop.call(null,q)}})},disable:function(q){var
p=g._selector.call(this);return h(p).each(function(){var r=h(this);if(r.data(a))
{var
t=r.data(a),s=t.opt;g._autoUpdate.call(this,"remove");g._unbindEvents.call(this);if
(q)
{g._resetContentPosition.call(this)}g._scrollbarVisibility.call(this,true);r.addCla
ss("mCS_disabled")}})},destroy:function(){var p=g._selector.call(this);return
h(p).each(function(){var s=h(this);if(s.data(a)){var
u=s.data(a),t=u.opt,q=h("#mCSB_"+u.idx),r=h("#mCSB_"+u.idx+"_container"),v=h(".mCSB
_"+u.idx+"_scrollbar");if(t.live)
{c(p)}g._autoUpdate.call(this,"remove");g._unbindEvents.call(this);g._resetContentP
osition.call(this);s.removeData(a);g._delete.call(null,this.mcs);v.remove();q.repla
ceWith(r.contents());s.removeClass(e+" _"+a+"_"+u.idx+" mCS-autoHide mCS-dir-rtl
mCS_no_scrollbar
mCS_disabled").addClass("mCS_destroyed")}})}},g={_selector:function(){return(typeof
h(this)!=="object"||h(this).length<1)?k:this},_theme:function(s){var
r=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],q=["rounded-
dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-
dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],p=["minimal","minimal-
dark"],u=["minimal","minimal-dark"],t=["minimal","minimal-
dark"];s.autoDraggerLength=h.inArray(s.theme,r)>-1?
false:s.autoDraggerLength;s.autoExpandScrollbar=h.inArray(s.theme,q)>-1?
false:s.autoExpandScrollbar;s.scrollButtons.enable=h.inArray(s.theme,p)>-1?
false:s.scrollButtons.enable;s.autoHideScrollbar=h.inArray(s.theme,u)>-1?
true:s.autoHideScrollbar;s.scrollbarPosition=h.inArray(s.theme,t)>-
1?"outside":s.scrollbarPosition},_findAxis:function(p){return(p==="yx"||p==="xy"||
p==="auto")?"yx":(p==="x"||
p==="horizontal")?"x":"y"},_findScrollButtonsType:function(p)
{return(p==="stepped"||p==="pixels"||p==="step"||
p==="click")?"stepped":"stepless"},_pluginMarkup:function(){var
y=h(this),x=y.data(a),r=x.opt,t=r.autoExpandScrollbar?"
mCSB_scrollTools_onDrag_expand":"",B=["<div id='mCSB_"+x.idx+"_scrollbar_vertical'
class='mCSB_scrollTools mCSB_"+x.idx+"_scrollbar mCS-"+r.theme+"
mCSB_scrollTools_vertical"+t+"'><div class='mCSB_draggerContainer'><div
id='mCSB_"+x.idx+"_dragger_vertical' class='mCSB_dragger'
style='position:absolute;' oncontextmenu='return false;'><div
class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail'
/></div></div>","<div id='mCSB_"+x.idx+"_scrollbar_horizontal'
class='mCSB_scrollTools mCSB_"+x.idx+"_scrollbar mCS-"+r.theme+"
mCSB_scrollTools_horizontal"+t+"'><div class='mCSB_draggerContainer'><div
id='mCSB_"+x.idx+"_dragger_horizontal' class='mCSB_dragger'
style='position:absolute;' oncontextmenu='return false;'><div
class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail'
/></div></div>"],u=r.axis==="yx"?"mCSB_vertical_horizontal":r.axis==="x"?"mCSB_hori
zontal":"mCSB_vertical",w=r.axis==="yx"?B[0]+B[1]:r.axis==="x"?
B[1]:B[0],v=r.axis==="yx"?"<div id='mCSB_"+x.idx+"_container_wrapper'
class='mCSB_container_wrapper' />":"",s=r.autoHideScrollbar?" mCS-
autoHide":"",p=(r.axis!=="x"&&x.langDir==="rtl")?" mCS-dir-rtl":"";if(r.setWidth)
{y.css("width",r.setWidth)}if(r.setHeight)
{y.css("height",r.setHeight)}r.setLeft=(r.axis!
=="y"&&x.langDir==="rtl")?"989999px":r.setLeft;y.addClass(e+"
_"+a+"_"+x.idx+s+p).wrapInner("<div id='mCSB_"+x.idx+"' class='mCustomScrollBox
mCS-"+r.theme+" "+u+"'><div id='mCSB_"+x.idx+"_container' class='mCSB_container'
style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";'
dir="+x.langDir+" /></div>");var
q=h("#mCSB_"+x.idx),z=h("#mCSB_"+x.idx+"_container");if(r.axis!=="y"&&!
r.advanced.autoExpandHorizontalScroll)
{z.css("width",g._contentWidth(z.children()))}if(r.scrollbarPosition==="outside")
{if(y.css("position")==="static")
{y.css("position","relative")}y.css("overflow","visible");q.addClass("mCSB_outside"
).after(w)}else{q.addClass("mCSB_inside").append(w);z.wrap(v)}g._scrollButtons.call
(this);var
A=[h("#mCSB_"+x.idx+"_dragger_vertical"),h("#mCSB_"+x.idx+"_dragger_horizontal")];A
[0].css("min-height",A[0].height());A[1].css("min-
width",A[1].width())},_contentWidth:function(p){return
Math.max.apply(Math,p.map(function(){return
h(this).outerWidth(true)}).get())},_expandContentHorizontally:function(){var
q=h(this),s=q.data(a),r=s.opt,p=h("#mCSB_"+s.idx+"_container");if(r.advanced.autoEx
pandHorizontalScroll&&r.axis!=="y")
{p.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper'
style='position:relative; left:0; width:999999px;' />").css({width:
(Math.ceil(p[0].getBoundingClientRect().right+0.4)-
Math.floor(p[0].getBoundingClientRect().left)),position:"relative"}).unwrap()}},_sc
rollButtons:function(){var
s=h(this),u=s.data(a),t=u.opt,q=h(".mCSB_"+u.idx+"_scrollbar:first"),r=["<a
href='#' class='mCSB_buttonUp' oncontextmenu='return false;' />","<a href='#'
class='mCSB_buttonDown' oncontextmenu='return false;' />","<a href='#'
class='mCSB_buttonLeft' oncontextmenu='return false;' />","<a href='#'
class='mCSB_buttonRight' oncontextmenu='return false;' />"],p=[(t.axis==="x"?
r[2]:r[0]),(t.axis==="x"?r[3]:r[1]),r[2],r[3]];if(t.scrollButtons.enable)
{q.prepend(p[0]).append(p[1]).next(".mCSB_scrollTools").prepend(p[2]).append(p[3])}
},_maxHeight:function(){var
t=h(this),w=t.data(a),v=w.opt,r=h("#mCSB_"+w.idx),q=t.css("max-
height"),s=q.indexOf("%")!==-1,p=t.css("box-sizing");if(q!=="none"){var u=s?
t.parent().height()*parseInt(q)/100:parseInt(q);if(p==="border-box"){u-
=((t.innerHeight()-t.height())+(t.outerHeight()-t.innerHeight()))}r.css("max-
height",Math.round(u))}},_setDraggerLength:function(){var
u=h(this),s=u.data(a),p=h("#mCSB_"+s.idx),v=h("#mCSB_"+s.idx+"_container"),y=[h("#m
CSB_"+s.idx+"_dragger_vertical"),h("#mCSB_"+s.idx+"_dragger_horizontal")],t=[p.heig
ht()/v.outerHeight(false),p.width()/v.outerWidth(false)],q=[parseInt(y[0].css("min-
height")),Math.round(t[0]*y[0].parent().height()),parseInt(y[1].css("min-
width")),Math.round(t[1]*y[1].parent().width())],r=i&&(q[1]<q[0])?
q[0]:q[1],x=i&&(q[3]<q[2])?q[2]:q[3];y[0].css({height:r,"max-height":
(y[0].parent().height()-10)}).find(".mCSB_dragger_bar").css({"line-
height":q[0]+"px"});y[1].css({width:x,"max-width":(y[1].parent().width()-
10)})},_scrollRatio:function(){var
t=h(this),v=t.data(a),q=h("#mCSB_"+v.idx),r=h("#mCSB_"+v.idx+"_container"),s=[h("#m
CSB_"+v.idx+"_dragger_vertical"),h("#mCSB_"+v.idx+"_dragger_horizontal")],u=[r.oute
rHeight(false)-q.height(),r.outerWidth(false)-q.width()],p=[u[0]/
(s[0].parent().height()-s[0].height()),u[1]/(s[1].parent().width()-
s[1].width())];v.scrollRatio={y:p[0],x:p[1]}},_onDragClasses:function(r,t,q){var
s=q?"mCSB_dragger_onDrag_expanded":"",p=["mCSB_dragger_onDrag","mCSB_scrollTools_on
Drag"],u=r.closest(".mCSB_scrollTools");if(t==="active"){r.toggleClass(p[0]+"
"+s);u.toggleClass(p[1]);r[0]._draggable=r[0]._draggable?0:1}else{if(!
r[0]._draggable){if(t==="hide")
{r.removeClass(p[0]);u.removeClass(p[1])}else{r.addClass(p[0]);u.addClass(p[1])}}}}
,_overflowed:function(){var
t=h(this),u=t.data(a),q=h("#mCSB_"+u.idx),s=h("#mCSB_"+u.idx+"_container"),r=u.over
flowed==null?s.height():s.outerHeight(false),p=u.overflowed==null?
s.width():s.outerWidth(false);return[r>q.height(),p>q.width()]},_resetContentPositi
on:function(){var
t=h(this),v=t.data(a),u=v.opt,q=h("#mCSB_"+v.idx),r=h("#mCSB_"+v.idx+"_container"),
s=[h("#mCSB_"+v.idx+"_dragger_vertical"),h("#mCSB_"+v.idx+"_dragger_horizontal")];g
._stop(t);if((u.axis!=="x"&&!v.overflowed[0])||(u.axis==="y"&&v.overflowed[0]))
{s[0].add(r).css("top",0)}if((u.axis!=="y"&&!v.overflowed[1])||
(u.axis==="x"&&v.overflowed[1])){var p=dx=0;if(v.langDir==="rtl"){p=q.width()-
r.outerWidth(false);dx=Math.abs(p/v.scrollRatio.x)}r.css("left",p);s[1].css("left",
dx)}},_bindEvents:function(){var r=h(this),t=r.data(a),s=t.opt;if(!t.bindEvents)
{g._draggable.call(this);if(s.contentTouchScroll)
{g._contentDraggable.call(this)}if(s.mouseWheel.enable){function q()
{p=setTimeout(function(){if(!h.event.special.mousewheel)
{q()}else{clearTimeout(p);g._mousewheel.call(r[0])}},1000)}var
p;q()}g._draggerRail.call(this);g._wrapperScroll.call(this);if(s.advanced.autoScrol
lOnFocus){g._focus.call(this)}if(s.scrollButtons.enable)
{g._buttons.call(this)}if(s.keyboard.enable)
{g._keyboard.call(this)}t.bindEvents=true}},_unbindEvents:function(){var
s=h(this),t=s.data(a),p=a+"_"+t.idx,u=".mCSB_"+t.idx+"_scrollbar",r=h("#mCSB_"+t.id
x+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+u+"
.mCSB_draggerContainer,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_hor
izontal,"+u+">a"),q=h("#mCSB_"+t.idx+"_container");if(t.bindEvents)
{h(m).unbind("."+p);r.each(function()
{h(this).unbind("."+p)});clearTimeout(s[0]._focusTimeout);g._delete.call(null,s[0].
_focusTimeout);clearTimeout(t.sequential.step);g._delete.call(null,t.sequential.ste
p);clearTimeout(q[0].onCompleteTimeout);g._delete.call(null,q[0].onCompleteTimeout)
;t.bindEvents=false}},_scrollbarVisibility:function(q){var
t=h(this),v=t.data(a),u=v.opt,p=h("#mCSB_"+v.idx+"_container_wrapper"),r=p.length?
p:h("#mCSB_"+v.idx+"_container"),w=[h("#mCSB_"+v.idx+"_scrollbar_vertical"),h("#mCS
B_"+v.idx+"_scrollbar_horizontal")],s=[w[0].find(".mCSB_dragger"),w[1].find(".mCSB_
dragger")];if(u.axis!=="x"){if(v.overflowed[0]&&!q)
{w[0].add(s[0]).add(w[0].children("a")).css("display","block");r.removeClass("mCS_n
o_scrollbar_y mCS_y_hidden")}else{if(u.alwaysShowScrollbar)
{if(u.alwaysShowScrollbar!==2)
{s[0].add(w[0].children("a")).css("display","none")}r.removeClass("mCS_y_hidden")}e
lse{w[0].css("display","none");r.addClass("mCS_y_hidden")}r.addClass("mCS_no_scroll
bar_y")}}if(u.axis!=="y"){if(v.overflowed[1]&&!q)
{w[1].add(s[1]).add(w[1].children("a")).css("display","block");r.removeClass("mCS_n
o_scrollbar_x mCS_x_hidden")}else{if(u.alwaysShowScrollbar)
{if(u.alwaysShowScrollbar!==2)
{s[1].add(w[1].children("a")).css("display","none")}r.removeClass("mCS_x_hidden")}e
lse{w[1].css("display","none");r.addClass("mCS_x_hidden")}r.addClass("mCS_no_scroll
bar_x")}}if(!v.overflowed[0]&&!v.overflowed[1])
{t.addClass("mCS_no_scrollbar")}else{t.removeClass("mCS_no_scrollbar")}},_coordinat
es:function(q){var p=q.type;switch(p)
{case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"p
ointerup":case"MSPointerUp":return[q.originalEvent.pageY,q.originalEvent.pageX];bre
ak;case"touchstart":case"touchmove":case"touchend":var
r=q.originalEvent.touches[0]||
q.originalEvent.changedTouches[0];return[r.pageY,r.pageX];break;default:return[q.pa
geY,q.pageX]}},_draggable:function(){var
u=h(this),s=u.data(a),p=s.opt,r=a+"_"+s.idx,t=["mCSB_"+s.idx+"_dragger_vertical","m
CSB_"+s.idx+"_dragger_horizontal"],v=h("#mCSB_"+s.idx+"_container"),w=h("#"+t[0]+",
#"+t[1]),A,y,z;w.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+"
MSPointerDown."+r,function(E){E.stopImmediatePropagation();E.preventDefault();if(!
g._mouseBtnLeft(E)){return}n=true;if(i){m.onselectstart=function(){return
false}}x(false);g._stop(u);A=h(this);var F=A.offset(),G=g._coordinates(E)[0]-
F.top,B=g._coordinates(E)[1]-F.left,D=A.height()+F.top,C=A.width()
+F.left;if(G<D&&G>0&&B<C&&B>0)
{y=G;z=B}g._onDragClasses(A,"active",p.autoExpandScrollbar)}).bind("touchmove."+r,f
unction(C){C.stopImmediatePropagation();C.preventDefault();var
D=A.offset(),E=g._coordinates(C)[0]-D.top,B=g._coordinates(C)[1]-
D.left;q(y,z,E,B)});h(m).bind("mousemove."+r+" pointermove."+r+"
MSPointerMove."+r,function(C){if(A){var D=A.offset(),E=g._coordinates(C)[0]-
D.top,B=g._coordinates(C)[1]-D.left;if(y===E)
{return}q(y,z,E,B)}}).add(w).bind("mouseup."+r+" touchend."+r+" pointerup."+r+"
MSPointerUp."+r,function(B){if(A)
{g._onDragClasses(A,"active",p.autoExpandScrollbar);A=null}n=false;if(i)
{m.onselectstart=null}x(true)});function x(B){var C=v.find("iframe");if(!C.length)
{return}var D=!B?"none":"auto";C.css("pointer-events",D)}function q(D,E,G,B)
{v[0].idleTimer=p.scrollInertia<233?250:0;if(A.attr("id")===t[1]){var
C="x",F=((A[0].offsetLeft-E)+B)*s.scrollRatio.x}else{var C="y",F=((A[0].offsetTop-
D)+G)*s.scrollRatio.y}g._scrollTo(u,F.toString(),
{dir:C,drag:true})}},_contentDraggable:function(){var
y=h(this),K=y.data(a),I=K.opt,F=a+"_"+K.idx,v=h("#mCSB_"+K.idx),z=h("#mCSB_"+K.idx+
"_container"),w=[h("#mCSB_"+K.idx+"_dragger_vertical"),h("#mCSB_"+K.idx+"_dragger_h
orizontal")],E,G,L,M,C=[],D=[],H,A,u,t,J,x,r=0,q,s=I.axis==="yx"?"none":"all";z.bin
d("touchstart."+F+" pointerdown."+F+" MSPointerDown."+F,function(N){if(!
g._pointerTouch(N)||n){return}var O=z.offset();E=g._coordinates(N)[0]-
O.top;G=g._coordinates(N)[1]-O.left}).bind("touchmove."+F+" pointermove."+F+"
MSPointerMove."+F,function(Q){if(!g._pointerTouch(Q)||n)
{return}Q.stopImmediatePropagation();A=g._getTime();var
P=v.offset(),S=g._coordinates(Q)[0]-P.top,U=g._coordinates(Q)[1]-
P.left,R="mcsLinearOut";C.push(S);D.push(U);if(K.overflowed[0]){var
O=w[0].parent().height()-w[0].height(),T=((E-S)>0&&(S-E)>-
(O*K.scrollRatio.y))}if(K.overflowed[1]){var N=w[1].parent().width()-
w[1].width(),V=((G-U)>0&&(U-G)>-(N*K.scrollRatio.x))}if(T||V)
{Q.preventDefault()}x=I.axis==="yx"?[(E-S),(G-U)]:I.axis==="x"?[null,(G-U)]:[(E-
S),null];z[0].idleTimer=250;if(K.overflowed[0])
{B(x[0],r,R,"y","all",true)}if(K.overflowed[1])
{B(x[1],r,R,"x",s,true)}});v.bind("touchstart."+F+" pointerdown."+F+"
MSPointerDown."+F,function(N){if(!g._pointerTouch(N)||n)
{return}N.stopImmediatePropagation();g._stop(y);H=g._getTime();var
O=v.offset();L=g._coordinates(N)[0]-O.top;M=g._coordinates(N)[1]-
O.left;C=[];D=[]}).bind("touchend."+F+" pointerup."+F+" MSPointerUp."+F,function(P)
{if(!g._pointerTouch(P)||n){return}P.stopImmediatePropagation();u=g._getTime();var
N=v.offset(),T=g._coordinates(P)[0]-N.top,V=g._coordinates(P)[1]-N.left;if((u-
A)>30){return}J=1000/(u-H);var Q="mcsEaseOut",R=J<2.5,W=R?[C[C.length-
2],D[D.length-2]]:[0,0];t=R?[(T-W[0]),(V-W[1])]:[T-L,V-M];var
O=[Math.abs(t[0]),Math.abs(t[1])];J=R?[Math.abs(t[0]/4),Math.abs(t[1]/4)]:[J,J];var
U=[Math.abs(z[0].offsetTop)-(t[0]*p((O[0]/J[0]),J[0])),Math.abs(z[0].offsetLeft)-
(t[1]*p((O[1]/J[1]),J[1]))];x=I.axis==="yx"?[U[0],U[1]]:I.axis==="x"?[null,U[1]]:
[U[0],null];q=[(O[0]*4)+I.scrollInertia,(O[1]*4)+I.scrollInertia];var
S=parseInt(I.contentTouchScroll)||0;x[0]=O[0]>S?x[0]:0;x[1]=O[1]>S?
x[1]:0;if(K.overflowed[0]){B(x[0],q[0],Q,"y",s,false)}if(K.overflowed[1])
{B(x[1],q[1],Q,"x",s,false)}});function p(P,N){var O=[N*1.5,N*2,N/1.5,N/2];if(P>90)
{return N>4?O[0]:O[3]}else{if(P>60){return N>3?O[3]:O[2]}else{if(P>30){return N>8?
O[1]:N>6?O[0]:N>4?N:O[2]}else{return N>8?N:O[3]}}}}function B(P,R,S,O,N,Q){if(!P)
{return}g._scrollTo(y,P.toString(),
{dur:R,scrollEasing:S,dir:O,overwrite:N,drag:Q})}},_mousewheel:function(){var
s=h(this),u=s.data(a),t=u.opt,q=a+"_"+u.idx,p=h("#mCSB_"+u.idx),r=[h("#mCSB_"+u.idx
+"_dragger_vertical"),h("#mCSB_"+u.
idx+"_dragger_horizontal")];p.bind("mousewheel."+q,function(z,D)
{g._stop(s);if(g._disableMousewheel(s,z.target)){return}var
B=t.mouseWheel.deltaFactor!=="auto"?parseInt(t.mouseWheel.deltaFactor):
(i&&z.deltaFactor<100)?100:z.deltaFactor<40?40:z.deltaFactor||100;if(t.axis==="x"||
t.mouseWheel.axis==="x"){var
w="x",C=[Math.round(B*u.scrollRatio.x),parseInt(t.mouseWheel.scrollAmount)],y=t.mou
seWheel.scrollAmount!=="auto"?C[1]:C[0]>=p.width()?
p.width()*0.9:C[0],E=Math.abs(h("#mCSB_"+u.idx+"_container")[0].offsetLeft),A=r[1]
[0].offsetLeft,x=r[1].parent().width()-r[1].width(),v=z.deltaX||z.deltaY||
D}else{var
w="y",C=[Math.round(B*u.scrollRatio.y),parseInt(t.mouseWheel.scrollAmount)],y=t.mou
seWheel.scrollAmount!=="auto"?C[1]:C[0]>=p.height()?
p.height()*0.9:C[0],E=Math.abs(h("#mCSB_"+u.idx+"_container")[0].offsetTop),A=r[0]
[0].offsetTop,x=r[0].parent().height()-r[0].height(),v=z.deltaY||D}if((w==="y"&&!
u.overflowed[0])||(w==="x"&&!u.overflowed[1])){return}if(t.mouseWheel.invert){v=-
v}if(t.mouseWheel.normalizeDelta){v=v<0?-1:1}if((v>0&&A!==0)||(v<0&&A!==x)||
t.mouseWheel.preventDefault)
{z.stopImmediatePropagation();z.preventDefault()}g._scrollTo(s,(E-
(v*y)).toString(),{dir:w})})},_disableMousewheel:function(r,t){var
p=t.nodeName.toLowerCase(),q=r.data(a).opt.mouseWheel.disableOver,s=["select","text
area"];return h.inArray(p,q)>-1&&!(h.inArray(p,s)>-1&&!
h(t).is(":focus"))},_draggerRail:function(){var
s=h(this),t=s.data(a),q=a+"_"+t.idx,r=h("#mCSB_"+t.idx+"_container"),u=r.parent(),p
=h(".mCSB_"+t.idx+"_scrollbar .mCSB_draggerContainer");p.bind("touchstart."+q+"
pointerdown."+q+" MSPointerDown."+q,function(v){n=true}).bind("touchend."+q+"
pointerup."+q+" MSPointerUp."+q,function(v){n=false}).bind("click."+q,function(z)
{if(h(z.target).hasClass("mCSB_draggerContainer")||
h(z.target).hasClass("mCSB_draggerRail")){g._stop(s);var
w=h(this),y=w.find(".mCSB_dragger");if(w.parent(".mCSB_scrollTools_horizontal").len
gth>0){if(!t.overflowed[1]){return}var v="x",x=z.pageX>y.offset().left?-
1:1,A=Math.abs(r[0].offsetLeft)-(x*(u.width()*0.9))}else{if(!t.overflowed[0])
{return}var v="y",x=z.pageY>y.offset().top?-1:1,A=Math.abs(r[0].offsetTop)-
(x*(u.height()*0.9))}g._scrollTo(s,A.toString(),
{dir:v,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var
r=h(this),t=r.data(a),s=t.opt,p=a+"_"+t.idx,q=h("#mCSB_"+t.idx+"_container"),u=q.pa
rent();q.bind("focusin."+p,function(x){var
w=h(m.activeElement),y=q.find(".mCustomScrollBox").length,v=0;if(!
w.is(s.advanced.autoScrollOnFocus))
{return}g._stop(r);clearTimeout(r[0]._focusTimeout);r[0]._focusTimer=y?
(v+17)*y:0;r[0]._focusTimeout=setTimeout(function(){var C=[w.offset().top-
q.offset().top,w.offset().left-
q.offset().left],B=[q[0].offsetTop,q[0].offsetLeft],z=[(B[0]+C[0]>=0&&B[0]+C[0]<u.h
eight()-w.outerHeight(false)),(B[1]+C[1]>=0&&B[0]+C[1]<u.width()-
w.outerWidth(false))],A=(s.axis==="yx"&&!z[0]&&!z[1])?"none":"all";if(s.axis!
=="x"&&!z[0]){g._scrollTo(r,C[0].toString(),
{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:A,dur:v})}if(s.axis!=="y"&&!z[1])
{g._scrollTo(r,C[1].toString(),
{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:A,dur:v})}},r[0]._focusTimer)})},_wr
apperScroll:function(){var
q=h(this),r=q.data(a),p=a+"_"+r.idx,s=h("#mCSB_"+r.idx+"_container").parent();s.bin
d("scroll."+p,function(t){s.scrollTop(0).scrollLeft(0)})},_buttons:function(){var
u=h(this),w=u.data(a),v=w.opt,p=w.sequential,r=a+"_"+w.idx,t=h("#mCSB_"+w.idx+"_con
tainer"),s=".mCSB_"+w.idx+"_scrollbar",q=h(s+">a");q.bind("mousedown."+r+"
touchstart."+r+" pointerdown."+r+" MSPointerDown."+r+" mouseup."+r+" touchend."+r+"
pointerup."+r+" MSPointerUp."+r+" mouseout."+r+" pointerout."+r+"
MSPointerOut."+r+" click."+r,function(z){z.preventDefault();if(!g._mouseBtnLeft(z))
{return}var
y=h(this).attr("class");p.type=v.scrollButtons.scrollType;switch(z.type)
{case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if(p.type==
="stepped")
{return}n=true;w.tweenRunning=false;x("on",y);break;case"mouseup":case"touchend":ca
se"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":
if(p.type==="stepped"){return}n=false;if(p.dir)
{x("off",y)}break;case"click":if(p.type!=="stepped"||w.tweenRunning)
{return}x("on",y);break}function x(A,B){p.scrollAmount=v.snapAmount||
v.scrollButtons.scrollAmount;g._sequentialScroll.call(this,u,A,B)}})},_keyboard:fun
ction(){var
u=h(this),t=u.data(a),q=t.opt,x=t.sequential,s=a+"_"+t.idx,r=h("#mCSB_"+t.idx),w=h(
"#mCSB_"+t.idx+"_container"),p=w.parent(),v="input,textarea,select,datalist,keygen,
[contenteditable='true']";r.attr("tabindex","0").bind("blur."+s+" keydown."+s+"
keyup."+s,function(D){switch(D.type){case"blur":if(t.tweenRunning&&x.dir)
{y("off",null)}break;case"keydown":case"keyup":var A=D.keyCode?
D.keyCode:D.which,B="on";if((q.axis!=="x"&&(A===38||A===40))||(q.axis!
=="y"&&(A===37||A===39))){if(((A===38||A===40)&&!t.overflowed[0])||((A===37||
A===39)&&!t.overflowed[1])){return}if(D.type==="keyup"){B="off"}if(!
h(m.activeElement).is(v))
{D.preventDefault();D.stopImmediatePropagation();y(B,A)}}else{if(A===33||A===34)
{if(t.overflowed[0]||t.overflowed[1])
{D.preventDefault();D.stopImmediatePropagation()}if(D.type==="keyup")
{g._stop(u);var C=A===34?-1:1;if(q.axis==="x"||(q.axis==="yx"&&t.overflowed[1]&&!
t.overflowed[0])){var z="x",E=Math.abs(w[0].offsetLeft)-
(C*(p.width()*0.9))}else{var z="y",E=Math.abs(w[0].offsetTop)-
(C*(p.height()*0.9))}g._scrollTo(u,E.toString(),
{dir:z,scrollEasing:"mcsEaseInOut"})}}else{if(A===35||A===36){if(!
h(m.activeElement).is(v)){if(t.overflowed[0]||t.overflowed[1])
{D.preventDefault();D.stopImmediatePropagation()}if(D.type==="keyup")
{if(q.axis==="x"||(q.axis==="yx"&&t.overflowed[1]&&!t.overflowed[0])){var
z="x",E=A===35?Math.abs(p.width()-w.outerWidth(false)):0}else{var z="y",E=A===35?
Math.abs(p.height()-w.outerHeight(false)):0}g._scrollTo(u,E.toString(),
{dir:z,scrollEasing:"mcsEaseInOut"})}}}}}break}function y(F,G)
{x.type=q.keyboard.scrollType;x.scrollAmount=q.snapAmount||
q.keyboard.scrollAmount;if(x.type==="stepped"&&t.tweenRunning)
{return}g._sequentialScroll.call(this,u,F,G)}})},_sequentialScroll:function(r,u,s)
{var
w=r.data(a),q=w.opt,y=w.sequential,x=h("#mCSB_"+w.idx+"_container"),p=y.type==="ste
pped"?true:false;switch(u){case"on":y.dir=[(s==="mCSB_buttonRight"||
s==="mCSB_buttonLeft"||s===39||s===37?"x":"y"),(s==="mCSB_buttonUp"||
s==="mCSB_buttonLeft"||s===38||s===37?-
1:1)];g._stop(r);if(g._isNumeric(s)&&y.type==="stepped")
{return}t(p);break;case"off":v();if(p||(w.tweenRunning&&y.dir))
{t(true)}break}function t(z){var F=y.type!=="stepped",J=!z?1000/60:F?
q.scrollInertia/1.5:q.scrollInertia,B=!z?2.5:F?
7.5:40,I=[Math.abs(x[0].offsetTop),Math.abs(x[0].offsetLeft)],E=[w.scrollRatio.y>10
?10:w.scrollRatio.y,w.scrollRatio.x>10?10:w.scrollRatio.x],C=y.dir[0]==="x"?I[1]+
(y.dir[1]*(E[1]*B)):I[0]+(y.dir[1]*(E[0]*B)),H=y.dir[0]==="x"?I[1]+
(y.dir[1]*parseInt(y.scrollAmount)):I[0]+
(y.dir[1]*parseInt(y.scrollAmount)),G=y.scrollAmount!=="auto"?H:C,D=!
z?"mcsLinear":F?"mcsLinearOut":"mcsEaseInOut",A=!z?false:true;if(z&&J<17)
{G=y.dir[0]==="x"?I[1]:I[0]}g._scrollTo(r,G.toString(),
{dir:y.dir[0],scrollEasing:D,dur:J,onComplete:A});if(z)
{y.dir=false;return}clearTimeout(y.step);y.step=setTimeout(function()
{t()},J)}function v(){clearTimeout(y.step);g._stop(r)}},_arr:function(r){var
q=h(this).data(a).opt,p=[];if(typeof r==="function"){r=r()}if(!(r instanceof
Array)){p[0]=r.y?r.y:r.x||q.axis==="x"?null:r;p[1]=r.x?r.x:r.y||q.axis==="y"?
null:r}else{p=r.length>1?[r[0],r[1]]:q.axis==="x"?[null,r[0]]:[r[0],null]}if(typeof
p[0]==="function"){p[0]=p[0]()}if(typeof p[1]==="function"){p[1]=p[1]()}return
p},_to:function(v,w){if(v==null||typeof v=="undefined"){return}var
C=h(this),B=C.data(a),u=B.opt,D=h("#mCSB_"+B.idx+"_container"),r=D.parent(),F=typeo
f v;if(!w){w=u.axis==="x"?"x":"y"}var q=w==="x"?
D.outerWidth(false):D.outerHeight(false),x=w==="x"?
D.offset().left:D.offset().top,E=w==="x"?
D[0].offsetLeft:D[0].offsetTop,z=w==="x"?"left":"top";switch(F)
{case"function":return v();break;case"object":if(v.nodeType){var A=w==="x"?
h(v).offset().left:h(v).offset().top}else{if(v.jquery){if(!v.length){return}var
A=w==="x"?v.offset().left:v.offset().top}}return A-
x;break;case"string":case"number":if(g._isNumeric.call(null,v)){return
Math.abs(v)}else{if(v.indexOf("%")!==-1){return
Math.abs(q*parseInt(v)/100)}else{if(v.indexOf("-=")!==-1){return Math.abs(E-
parseInt(v.split("-=")[1]))}else{if(v.indexOf("+=")!==-1){var
s=(E+parseInt(v.split("+=")[1]));return s>=0?0:Math.abs(s)}else{if(v.indexOf("px")!
==-1&&g._isNumeric.call(null,v.split("px")[0])){return Math.abs(v.split("px")
[0])}else{if(v==="top"||v==="left"){return 0}else{if(v==="bottom"){return
Math.abs(r.height()-D.outerHeight(false))}else{if(v==="right"){return
Math.abs(r.width()-D.outerWidth(false))}else{if(v==="first"||v==="last"){var
y=D.find(":"+v),A=w==="x"?h(y).offset().left:h(y).offset().top;return A-
x}else{if(h(v).length){var A=w==="x"?h(v).offset().left:h(v).offset().top;return A-
x}else{D.css(z,v);b.update.call(null,C[0]);return}}}}}}}}}}break}},_autoUpdate:func
tion(q){var t=h(this),F=t.data(a),z=F.opt,v=h("#mCSB_"+F.idx+"_container");if(q)
{clearTimeout(v[0].autoUpdate);g._delete.call(null,v[0].autoUpdate);return}var
s=v.parent(),p=[h("#mCSB_"+F.idx+"_scrollbar_vertical"),h("#mCSB_"+F.idx+"_scrollba
r_horizontal")],D=function(){return[p[0].is(":visible")?
p[0].outerHeight(true):0,p[1].is(":visible")?
p[1].outerWidth(true):0]},E=y(),x,u=[v.outerHeight(false),v.outerWidth(false),s.hei
ght(),s.width(),D()[0],D()[1]],H,B=G(),w;C();function C()
{clearTimeout(v[0].autoUpdate);v[0].autoUpdate=setTimeout(function()
{if(z.advanced.updateOnSelectorChange){x=y();if(x!==E)
{r();E=x;return}}if(z.advanced.updateOnContentResize)
{H=[v.outerHeight(false),v.outerWidth(false),s.height(),s.width(),D()[0],D()
[1]];if(H[0]!==u[0]||H[1]!==u[1]||H[2]!==u[2]||H[3]!==u[3]||H[4]!==u[4]||H[5]!
==u[5]){r();u=H}}if(z.advanced.updateOnImageLoad){w=G();if(w!==B)
{v.find("img").each(function()
{A(this.src)});B=w}}if(z.advanced.updateOnSelectorChange||
z.advanced.updateOnContentResize||z.adva
nced.updateOnImageLoad){C()}},60)}function G(){var
I=0;if(z.advanced.updateOnImageLoad){I=v.find("img").length}return I}function A(L)
{var I=new Image();function K(M,N){return function(){return
N.apply(M,arguments)}}function J()
{this.onload=null;r()}I.onload=K(I,J);I.src=L}function y()
{if(z.advanced.updateOnSelectorChange===true)
{z.advanced.updateOnSelectorChange="*"}var
I=0,J=v.find(z.advanced.updateOnSelectorChange);if(z.advanced.updateOnSelectorChang
e&&J.length>0){J.each(function(){I+=h(this).height()+h(this).width()})}return
I}function r()
{clearTimeout(v[0].autoUpdate);b.update.call(null,t[0])}},_snapAmount:function(r,p,
q){return(Math.round(r/p)*p-q)},_stop:function(p){var
r=p.data(a),q=h("#mCSB_"+r.idx+"_container,#mCSB_"+r.idx+"_container_wrapper,#mCSB_
"+r.idx+"_dragger_vertical,#mCSB_"+r.idx+"_dragger_horizontal");q.each(function()
{g._stopTween.call(this)})},_scrollTo:function(q,s,u){var
I=q.data(a),E=I.opt,D={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:fa
lse,dur:E.scrollInertia,overwrite:"all",callbacks:true,onStart:true,onUpdate:true,o
nComplete:true},u=h.extend(D,u),G=[u.dur,(u.drag?
0:u.dur)],v=h("#mCSB_"+I.idx),B=h("#mCSB_"+I.idx+"_container"),K=E.callbacks.onTota
lScrollOffset?g._arr.call(q,E.callbacks.onTotalScrollOffset):
[0,0],p=E.callbacks.onTotalScrollBackOffset?
g._arr.call(q,E.callbacks.onTotalScrollBackOffset):
[0,0];I.trigger=u.trigger;if(E.snapAmount)
{s=g._snapAmount(s,E.snapAmount,E.snapOffset)}switch(u.dir){case"x":var
x=h("#mCSB_"+I.idx+"_dragger_horizontal"),z="left",C=B[0].offsetLeft,H=[v.width()-
B.outerWidth(false),x.parent().width()-x.width()],r=[s,
(s/I.scrollRatio.x)],L=K[1],J=p[1],A=L>0?L/I.scrollRatio.x:0,w=J>0?
J/I.scrollRatio.x:0;break;case"y":var
x=h("#mCSB_"+I.idx+"_dragger_vertical"),z="top",C=B[0].offsetTop,H=[v.height()-
B.outerHeight(false),x.parent().height()-x.height()],r=[s,
(s/I.scrollRatio.y)],L=K[0],J=p[0],A=L>0?L/I.scrollRatio.y:0,w=J>0?
J/I.scrollRatio.y:0;break}if(r[1]<0){r=[0,0]}else{if(r[1]>=H[1])
{r=[H[0],H[1]]}else{r[0]=-r[0]}}clearTimeout(B[0].onCompleteTimeout);if(!
I.tweenRunning&&((C===0&&r[0]>=0)||(C===H[0]&&r[0]<=H[0])))
{return}g._tweenTo.call(null,x[0],z,Math.round(r[1]),G[1],u.scrollEasing);g._tweenT
o.call(null,B[0],z,Math.round(r[0]),G[0],u.scrollEasing,u.overwrite,
{onStart:function(){if(u.callbacks&&u.onStart&&!I.tweenRunning)
{if(t("onScrollStart"))
{F();E.callbacks.onScrollStart.call(q[0])}I.tweenRunning=true;g._onDragClasses(x);I
.cbOffsets=y()}},onUpdate:function(){if(u.callbacks&&u.onUpdate)
{if(t("whileScrolling"))
{F();E.callbacks.whileScrolling.call(q[0])}}},onComplete:function()
{if(u.callbacks&&u.onComplete){if(E.axis==="yx")
{clearTimeout(B[0].onCompleteTimeout)}var M=B[0].idleTimer||
0;B[0].onCompleteTimeout=setTimeout(function(){if(t("onScroll"))
{F();E.callbacks.onScroll.call(q[0])}if(t("onTotalScroll")&&r[1]>=H[1]-
A&&I.cbOffsets[0])
{F();E.callbacks.onTotalScroll.call(q[0])}if(t("onTotalScrollBack")&&r[1]<=w&&I.cbO
ffsets[1])
{F();E.callbacks.onTotalScrollBack.call(q[0])}I.tweenRunning=false;B[0].idleTimer=0
;g._onDragClasses(x,"hide")},M)}}});function t(M){return I&&E.callbacks[M]&&typeof
E.callbacks[M]==="function"}function y(){return[E.callbacks.alwaysTriggerOffsets||
C>=H[0]+L,E.callbacks.alwaysTriggerOffsets||C<=-J]}function F(){var
O=[B[0].offsetTop,B[0].offsetLeft],P=[x[0].offsetTop,x[0].offsetLeft],M=[B.outerHei
ght(false),B.outerWidth(false)],N=[v.height(),v.width()];q[0].mcs={content:B,top:O[
0],left:O[1],draggerTop:P[0],draggerLeft:P[1],topPct:Math.round((100*Math.abs(O[0])
)/(Math.abs(M[0])-N[0])),leftPct:Math.round((100*Math.abs(O[1]))/(Math.abs(M[1])-
N[1])),direction:u.dir}}},_tweenTo:function(r,u,s,q,A,t,J){var J=J||
{},G=J.onStart||function(){},B=J.onUpdate||function(){},H=J.onComplete||function()
{},z=g._getTime(),x,v=0,D=r.offsetTop,E=r.style;if(u==="left"){D=r.offsetLeft}var
y=s-D;r._mcsstop=0;if(t!=="none"){C()}p();function I(){if(r._mcsstop){return}if(!v)
{G.call()}v=g._getTime()-z;F();if(v>=r._mcstime){r._mcstime=(v>r._mcstime)?v+x-(v-
r._mcstime):v+x-1;if(r._mcstime<v+1){r._mcstime=v+1}}if(r._mcstime<q)
{r._mcsid=_request(I)}else{H.call()}}function F(){if(q>0)
{r._mcscurrVal=w(r._mcstime,D,y,q,A);E[u]=Math.round(r._mcscurrVal)
+"px"}else{E[u]=s+"px"}B.call()}function p(){x=1000/60;r._mcstime=v+x;_request=(!
l.requestAnimationFrame)?function(K){F();return
setTimeout(K,0.01)}:l.requestAnimationFrame;r._mcsid=_request(I)}function C()
{if(r._mcsid==null){return}if(!l.requestAnimationFrame)
{clearTimeout(r._mcsid)}else{l.cancelAnimationFrame(r._mcsid)}r._mcsid=null}functio
n w(M,L,Q,P,N){switch(N){case"linear":case"mcsLinear":return
Q*M/P+L;break;case"mcsLinearOut":M/=P;M--;return Q*Math.sqrt(1-M*M)
+L;break;case"easeInOutSmooth":M/=P/2;if(M<1){return Q/2*M*M+L}M--;return
-Q/2*(M*(M-2)-1)+L;break;case"easeInOutStrong":M/=P/2;if(M<1){return
Q/2*Math.pow(2,10*(M-1))+L}M--;return Q/2*(-Math.pow(2,-10*M)
+2)+L;break;case"easeInOut":case"mcsEaseInOut":M/=P/2;if(M<1){return Q/2*M*M*M+L}M-
=2;return Q/2*(M*M*M+2)+L;break;case"easeOutSmooth":M/=P;M--;return -Q*(M*M*M*M-
1)+L;break;case"easeOutStrong":return Q*(-Math.pow(2,-10*M/P)
+1)+L;break;case"easeOut":case"mcsEaseOut":default:var O=(M/=P)*M,K=O*M;return
L+Q*(0.499999999999997*K*O+-2.5*O*O+5.5*K+-6.5*O+4*M)}}},_getTime:function()
{if(l.performance&&l.performance.now){return
l.performance.now()}else{if(l.performance&&l.performance.webkitNow){return
l.performance.webkitNow()}else{if(Date.now){return Date.now()}else{return new
Date().getTime()}}}},_stopTween:function(){var p=this;if(p._mcsid==null)
{return}if(!l.requestAnimationFrame)
{clearTimeout(p._mcsid)}else{l.cancelAnimationFrame(p._mcsid)}p._mcsid=null;p._mcss
top=1},_delete:function(r){try{delete r}catch(q){r=null}},_mouseBtnLeft:function(p)
{return !(p.which&&p.which!==1)},_pointerTouch:function(q){var
p=q.originalEvent.pointerType;return !(p&&p!=="touch"&&p!
==2)},_isNumeric:function(p){return !
isNaN(parseFloat(p))&&isFinite(p)}};h.fn[e]=function(p){if(b[p]){return
b[p].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof
p==="object"||!p){return b.init.apply(this,arguments)}else{h.error("Method "+p+"
does not exist")}}};h[e]=function(p){if(b[p]){return
b[p].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof
p==="object"||!p){return b.init.apply(this,arguments)}else{h.error("Method "+p+"
does not exist")}}};h[e].defaults=f;l[e]=true;h(l).on('load', function(){h(k)[e]
()})})(jQuery,window,document);;
(function($){var i=function(e){if(!e)var
e=window.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()};
$.fn.checkbox=function(f)
{try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}var
g={cls:'jquery-checkbox',empty:'empty.png'};g=$.extend(g,f||{});var h=function(a)
{var b=a.checked;var c=a.disabled;var d=$
(a);if(a.stateInterval)clearInterval(a.stateInterval);a.stateInterval=setInterval(f
unction(){if(a.disabled!=c)d.trigger((c=!!
a.disabled)?'disable':'enable');if(a.checked!=b)d.trigger((b=!!
a.checked)?'check':'uncheck')},10);return d};return this.each(function(){var
a=this;var b=h(a);if(a.wrapper)a.wrapper.remove();a.wrapper=$('<span
class="'+g.cls+'"><span class="mark"><img src="'+g.empty+'"
/></span></span>');a.wrapperInner=a.wrapper.children('span:eq(0)');a.wrapper.hover(
function(e){a.wrapperInner.addClass(g.cls+'-hover');i(e)},function(e)
{a.wrapperInner.removeClass(g.cls+'-
hover');i(e)});b.css({position:'absolute',zIndex:-
1,visibility:'hidden'}).after(a.wrapper);var c=false;if(b.attr('id')){c=$
('label[for='+b.attr('id')+']');if(!c.length)c=false}if(!c){c=b.closest?
b.closest('label'):b.parents('label:eq(0)');if(!c.length)c=false}if(c)
{c.hover(function(e){a.wrapper.trigger('mouseover',[e])},function(e)
{a.wrapper.trigger('mouseout',[e])});c.click(function(e){b.trigger('click',
[e]);i(e);return false})}a.wrapper.click(function(e){b.trigger('click',
[e]);i(e);return false});b.click(function(e){i(e)});b.bind('disable',function()
{a.wrapperInner.addClass(g.cls+'-disabled')}).bind('enable',function()
{a.wrapperInner.removeClass(g.cls+'-disabled')});b.bind('check',function()
{a.wrapper.addClass(g.cls+'-checked')}).bind('uncheck',function()
{a.wrapper.removeClass(g.cls+'-checked')});$
('img',a.wrapper).bind('dragstart',function(){return
false}).bind('mousedown',function(){return
false});if(window.getSelection)a.wrapper.css('MozUserSelect','none');if(a.checked)a
.wrapper.addClass(g.cls+'-checked');if(a.disabled)a.wrapperInner.addClass(g.cls+'-
disabled')})}})(jQuery);;
// Underscore.js 1.6.0
// http://underscorejs.org
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters &
Editors
// Underscore may be freely distributed under the MIT license.
(function(){var
n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.pus
h,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.redu
ce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Arra
y.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this
instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?
("undefined"!=typeof
module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.
6.0";var A=j.each=j.forEach=function(n,t,e){if(null==n)return
n;if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var
u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var
a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return;return
n};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?
n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var O="Reduce of
empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var
u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return
e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?
r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return
r},j.reduceRight=j.foldr=function(n,t,r,e){var
u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return
e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i)
{var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?
r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return
r},j.find=j.detect=function(n,t,r){var e;return k(n,function(n,u,i){return
t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var
e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i)
{t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return
j.filter(n,function(n,e,u){return!
t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!
0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a)
{return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var k=j.some=j.any=function(n,t,e)
{t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):
(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!
u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?
n.indexOf(t)!=-1:k(n,function(n){return n===t})},j.invoke=function(n,t){var
r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?
t:n[t]).apply(n,r)})},j.pluck=function(n,t){return
j.map(n,j.property(t))},j.where=function(n,t){return
j.filter(n,j.matches(t))},j.findWhere=function(n,t){return
j.find(n,j.matches(t))},j.max=function(n,t,r){if(!
t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);var e=-
1/0,u=-1/0;return A(n,function(n,i,a){var o=t?
t.call(r,n,i,a):n;o>u&&(e=n,u=o)}),e},j.min=function(n,t,r){if(!
t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);var
e=1/0,u=1/0;return A(n,function(n,i,a){var o=t?
t.call(r,n,i,a):n;u>o&&(e=n,u=o)}),e},j.shuffle=function(n){var t,r=0,e=[];return
A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r)
{return null==t||r?(n.length!==+n.length&&(n=j.values(n)),n[j.random(n.length-
1)]):j.shuffle(n).slice(0,Math.max(0,t))};var E=function(n){return null==n?
j.identity:j.isFunction(n)?n:j.property(n)};j.sortBy=function(n,t,r){return
t=E(t),j.pluck(j.map(n,function(n,e,u)
{return{value:n,index:e,criteria:t.call(r,n,e,u)}}).sort(function(n,t){var
r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void
0)return-1}return n.index-t.index}),"value")};var F=function(n){return
function(t,r,e){var u={};return r=E(r),A(t,function(i,a){var
o=r.call(e,i,a,t);n(u,o,i)}),u}};j.groupBy=F(function(n,t,r){j.has(n,t)?
n[t].push(r):n[t]=[r]}),j.indexBy=F(function(n,t,r)
{n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]+
+:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=E(r);for(var
u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return
i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?
j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?
0:n.length===+n.length?
n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?
void 0:null==t||r?n[0]:0>t?[]:o.call(n,0,t)},j.initial=function(n,t,r){return
o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void
0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-
t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?
1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r)
{return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||
j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t)
{return M(n,t,[])},j.without=function(n){return
j.difference(n,o.call(arguments,1))},j.partition=function(n,t){var r=[],e=[];return
A(n,function(n){(t(n)?r:e).push(n)}),[r,e]},j.uniq=j.unique=function(n,t,r,e)
{j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return
A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||
(a.push(r),i.push(n[e]))}),i},j.union=function(){return
j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var
t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return
j.every(t,function(t){return j.contains(t,n)})})},j.difference=function(n){var
t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!
j.contains(t,n)})},j.zip=function(){for(var
n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r+
+)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t)
{if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e]
[0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var
e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-
1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e+
+)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-
1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?
n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return
u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||
0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new
Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var
r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!
j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!
(this instanceof e))return
n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new
R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return
Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return
function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u+
+)e[u]===j&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r+
+]);return n.apply(this,e)}},j.bindAll=function(n){var
t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed
function names");return A(t,function(t)
{n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||
(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?
r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var
r=o.call(arguments,2);return setTimeout(function(){return
n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,
[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var
e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?
0:j.now(),a=null,i=n.apply(e,u),e=u=null};return function(){var l=j.now();o||
r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?
(clearTimeout(a),a=null,o=l,i=n.apply(e,u),e=u=null):a||r.trailing===!1||
(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o,c=function(){var
l=j.now()-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u),i=u=null))};return
function(){i=this,u=arguments,a=j.now();var l=r&&!e;return e||
(e=setTimeout(c,t)),l&&(o=n.apply(i,u),i=u=null),o}},j.once=function(n){var t,r=!
1;return function(){return r?t:(r=!
0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return
j.partial(t,n)},j.compose=function(){var n=arguments;return function(){for(var
t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return
t[0]}},j.after=function(n,t){return function(){return--n<1?
t.apply(this,arguments):void 0}},j.keys=function(n){if(!
j.isObject(n))return[];if(w)return w(n);var t=[];for(var r in
n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var
t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return
e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u+
+)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var
t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return
t},j.functions=j.methods=function(n){var t=[];for(var r in
n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return
A(o.call(arguments,1),function(t){if(t)for(var r in
t)n[r]=t[r]}),n},j.pick=function(n){var
t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in
n&&(t[r]=n[r])}),t},j.omit=function(n){var
t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||
(t[u]=n[u]);return t},j.defaults=function(n){return
A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void
0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?
n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var
S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return
n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var
u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return
n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?
1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object
RegExp]":return

n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.i
gnoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var
i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!
==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof
o)&&"constructor"in n&&"constructor"in t)return!1;r.push(n),e.push(t);var c=0,f=!
0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--
&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!
(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!
c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],
[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||
j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!
0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n)
{return"[object Array]"==l.call(n)},j.isObject=function(n){return
n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],functio
n(n){j["is"+n]=function(t){return l.call(t)=="[object
"+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!
j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n)
{return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!
isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!
=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object
Boolean]"==l.call(n)},j.isNull=function(n){return
null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return
f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n)
{return n},j.constant=function(n){return function(){return
n}},j.property=function(n){return function(t){return t[n]}},j.matches=function(n)
{return function(t){if(t===n)return!0;for(var r in n)if(n[r]!==t[r])return!
1;return!0}},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u+
+)e[u]=t.call(r,u);return e},j.random=function(n,t){return
null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},j.now=Date.now||function()
{return(new Date).getTime()};var T={escape:
{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};T.unescape=j.invert(
T.escape);var I={escape:new RegExp("["+j.keys(T.escape).join("")
+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")
+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return
null==t?"":(""+t).replace(I[n],function(t){return T[n]
[t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return
j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var
r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return
a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n)
{var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)
%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/
(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2
029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var
e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,
(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|
$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return
a+=n.slice(i,o).replace(D,function(n)
{return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))
+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)
+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||
(a="with(obj||{}){\n"+a+"}\n"),a="var
__t,__p='',__j=Array.prototype.join,"+"print=function()
{__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new
Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return
e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+
(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var
z=function(n){return this._chain?
j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshi
ft"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return
t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete
r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var
t=e[n];j.prototype[n]=function(){return
z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,
{chain:function(){return this._chain=!0,this},value:function(){return
this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",
[],function(){return j})}).call(this);
;
/*
jQuery Zoom v1.7.1 - 2013-03-12
(c) 2013 Jack Moore - jacklmoore.com/zoom
license: http://www.opensource.org/licenses/mit-license.php
*/
(function ($) {
var defaults = {
url: false,
callback: false,
target: false,
duration: 120,
on: 'mouseover' // other options: 'grab', 'click', 'toggle'
};

// Core Zoom Logic, independent of event listeners.


$.zoom = function(target, source, img) {
var outerWidth,
outerHeight,
xRatio,
yRatio,
offset,
position = $(target).css('position');

// The parent element needs positioning so that the zoomed element can
be correctly positioned within.
$(target).css({
position: /(absolute|fixed)/.test() ? position : 'relative',
overflow: 'hidden'
});

$(img)
.addClass('zoomImg')
.css({
position: 'absolute',
top: 0,
left: 0,
opacity: 0,
width: img.width,
height: img.height,
border: 'none',
maxWidth: 'none'
})
.appendTo(target);

return {
init: function() {
outerWidth = $(target).outerWidth();
outerHeight = $(target).outerHeight();
xRatio = (img.width - outerWidth) / $(source).outerWidth();
yRatio = (img.height - outerHeight) / $
(source).outerHeight();
offset = $(source).offset();
},
move: function (e) {
var left = (e.pageX - offset.left),
top = (e.pageY - offset.top);

top = Math.max(Math.min(top, outerHeight), 0);


left = Math.max(Math.min(left, outerWidth), 0);

img.style.left = (left * -xRatio) + 'px';


img.style.top = (top * -yRatio) + 'px';
}
};
};

$.fn.zoom = function (options) {


return this.each(function () {
var
settings = $.extend({}, defaults, options || {}),
//target will display the zoomed iamge
target = settings.target || this,
//source will provide zoom location info (thumbnail)
source = this,
img = new Image(),
$img = $(img),
mousemove = 'mousemove',
clicked = false;

// If a url wasn't specified, look for an image element.


if (!settings.url) {
settings.url = $(source).find('img').attr('src');
if (!settings.url) {
return;
}
}

img.onload = function () {
var zoom = $.zoom(target, source, img);

function start(e) {
zoom.init();
zoom.move(e);

// Skip the fade-in for IE8 and lower since it chokes


on fading-in
// and changing position based on mousemovement at
the same time.
$img.stop()
.fadeTo($.support.opacity ? settings.duration : 0,
1);
}

function stop() {
$img.stop()
.fadeTo(settings.duration, 0);
}
if (settings.on === 'grab') {
$(source).on('mousedown',
function (e) {
$(document).one('mouseup',
function () {
stop();

$(document).off(mousemove,
zoom.move);
}
);

start(e);

$(document).on(mousemove, zoom.move);

e.preventDefault();
}
);
} else if (settings.on === 'click') {
$(source).on('click',
function (e) {
if (clicked) {
// bubble the event up to the
document to trigger the unbind.
return;
} else {
clicked = true;
start(e);
$(document).on(mousemove,
zoom.move);
$(document).one('click',
function () {
stop();
clicked = false;
$
(document).off(mousemove, zoom.move);
}
);
return false;
}
}
);
} else if (settings.on === 'toggle') {
$(source).on('click',
function (e) {
if (clicked) {
stop();
} else {
start(e);
}
clicked = !clicked;
}
);
} else {
zoom.init(); // Pre-emptively call init because IE7
will fire the mousemove handler before the hover handler.

$(source)
.on('mouseenter', start)
.on('mouseleave', stop)
.on(mousemove, zoom.move);
}

if ($.isFunction(settings.callback)) {
settings.callback.call(img);
}
};

img.src = settings.url;
});
};

$.fn.zoom.defaults = defaults;
}(window.jQuery));;
//fgnass.github.com/spin.js#v1.3.2

/**
* Copyright (c) 2011-2013 Felix Gnass
* Licensed under the MIT license
*/
(function(root, factory) {

/* CommonJS */
if (typeof exports == 'object') module.exports = factory()

/* AMD module */
else if (typeof define == 'function' && define.amd) define(factory)

/* Browser global */
else root.Spinner = factory()
}
(this, function() {
"use strict";

var prefixes = ['webkit', 'Moz', 'ms', 'O'] /* Vendor prefixes */


, animations = {} /* Animation rules keyed by their name */
, useCssAnimations /* Whether to use CSS animations or setTimeout */

/**
* Utility function to create elements. If no tag name is given,
* a DIV is created. Optionally properties can be passed.
*/
function createEl(tag, prop) {
var el = document.createElement(tag || 'div')
, n

for(n in prop) el[n] = prop[n]


return el
}

/**
* Appends children and returns the parent.
*/
function ins(parent /* child1, child2, ...*/) {
for (var i=1, n=arguments.length; i<n; i++)
parent.appendChild(arguments[i])
return parent
}

/**
* Insert a new stylesheet to hold the @keyframe or VML rules.
*/
var sheet = (function() {
var el = createEl('style', {type : 'text/css'})
ins(document.getElementsByTagName('head')[0], el)
return el.sheet || el.styleSheet
}())

/**
* Creates an opacity keyframe animation rule and returns its name.
* Since most mobile Webkits have timing issues with animation-delay,
* we create separate rules for each line/segment.
*/
function addAnimation(alpha, trail, i, lines) {
var name = ['opacity', trail, ~~(alpha*100), i, lines].join('-')
, start = 0.01 + i/lines * 100
, z = Math.max(1 - (1-alpha) / trail * (100-start), alpha)
, prefix = useCssAnimations.substring(0,
useCssAnimations.indexOf('Animation')).toLowerCase()
, pre = prefix && '-' + prefix + '-' || ''

if (!animations[name]) {
sheet.insertRule(
'@' + pre + 'keyframes ' + name + '{' +
'0%{opacity:' + z + '}' +
start + '%{opacity:' + alpha + '}' +
(start+0.01) + '%{opacity:1}' +
(start+trail) % 100 + '%{opacity:' + alpha + '}' +
'100%{opacity:' + z + '}' +
'}', sheet.cssRules.length)

animations[name] = 1
}

return name
}

/**
* Tries various vendor prefixes and returns the first supported property.
*/
function vendor(el, prop) {
var s = el.style
, pp
, i

prop = prop.charAt(0).toUpperCase() + prop.slice(1)


for(i=0; i<prefixes.length; i++) {
pp = prefixes[i]+prop
if(s[pp] !== undefined) return pp
}
if(s[prop] !== undefined) return prop
}

/**
* Sets multiple style properties at once.
*/
function css(el, prop) {
for (var n in prop)
el.style[vendor(el, n)||n] = prop[n]

return el
}

/**
* Fills in default values.
*/
function merge(obj) {
for (var i=1; i < arguments.length; i++) {
var def = arguments[i]
for (var n in def)
if (obj[n] === undefined) obj[n] = def[n]
}
return obj
}

/**
* Returns the absolute page-offset of the given element.
*/
function pos(el) {
var o = { x:el.offsetLeft, y:el.offsetTop }
while((el = el.offsetParent))
o.x+=el.offsetLeft, o.y+=el.offsetTop

return o
}

/**
* Returns the line color from the given string or array.
*/
function getColor(color, idx) {
return typeof color == 'string' ? color : color[idx % color.length]
}

// Built-in defaults

var defaults = {
lines: 12, // The number of lines to draw
length: 7, // The length of each line
width: 5, // The line thickness
radius: 10, // The radius of the inner circle
rotate: 0, // Rotation offset
corners: 1, // Roundness (0..1)
color: '#000', // #rgb or #rrggbb
direction: 1, // 1: clockwise, -1: counterclockwise
speed: 1, // Rounds per second
trail: 100, // Afterglow percentage
opacity: 1/4, // Opacity of the lines
fps: 20, // Frames per second when using setTimeout()
zIndex: 2e9, // Use a high z-index by default
className: 'spinner', // CSS class to assign to the element
top: 'auto', // center vertically
left: 'auto', // center horizontally
position: 'relative' // element position
}
/** The constructor */
function Spinner(o) {
if (typeof this == 'undefined') return new Spinner(o)
this.opts = merge(o || {}, Spinner.defaults, defaults)
}

// Global defaults that override the built-ins:


Spinner.defaults = {}

merge(Spinner.prototype, {

/**
* Adds the spinner to the given target element. If this instance is already
* spinning, it is automatically removed from its previous target b calling
* stop() internally.
*/
spin: function(target) {
this.stop()

var self = this


, o = self.opts
, el = self.el = css(createEl(0, {className: o.className}), {position:
o.position, width: 0, zIndex: o.zIndex})
, mid = o.radius+o.length+o.width
, ep // element position
, tp // target position

if (target) {
target.insertBefore(el, target.firstChild||null)
tp = pos(target)
ep = pos(el)
css(el, {
left: (o.left == 'auto' ? tp.x-ep.x + (target.offsetWidth >> 1) :
parseInt(o.left, 10) + mid) + 'px',
top: (o.top == 'auto' ? tp.y-ep.y + (target.offsetHeight >> 1) :
parseInt(o.top, 10) + mid) + 'px'
})
}

el.setAttribute('role', 'progressbar')
self.lines(el, self.opts)

if (!useCssAnimations) {
// No CSS animation support, use setTimeout() instead
var i = 0
, start = (o.lines - 1) * (1 - o.direction) / 2
, alpha
, fps = o.fps
, f = fps/o.speed
, ostep = (1-o.opacity) / (f*o.trail / 100)
, astep = f/o.lines

;(function anim() {
i++;
for (var j = 0; j < o.lines; j++) {
alpha = Math.max(1 - (i + (o.lines - j) * astep) % f * ostep,
o.opacity)
self.opacity(el, j * o.direction + start, alpha, o)
}
self.timeout = self.el && setTimeout(anim, ~~(1000/fps))
})()
}
return self
},

/**
* Stops and removes the Spinner.
*/
stop: function() {
var el = this.el
if (el) {
clearTimeout(this.timeout)
if (el.parentNode) el.parentNode.removeChild(el)
this.el = undefined
}
return this
},

/**
* Internal method that draws the individual lines. Will be overwritten
* in VML fallback mode below.
*/
lines: function(el, o) {
var i = 0
, start = (o.lines - 1) * (1 - o.direction) / 2
, seg

function fill(color, shadow) {


return css(createEl(), {
position: 'absolute',
width: (o.length+o.width) + 'px',
height: o.width + 'px',
background: color,
boxShadow: shadow,
transformOrigin: 'left',
transform: 'rotate(' + ~~(360/o.lines*i+o.rotate) + 'deg) translate(' +
o.radius+'px' +',0)',
borderRadius: (o.corners * o.width>>1) + 'px'
})
}

for (; i < o.lines; i++) {


seg = css(createEl(), {
position: 'absolute',
top: 1+~(o.width/2) + 'px',
transform: o.hwaccel ? 'translate3d(0,0,0)' : '',
opacity: o.opacity,
animation: useCssAnimations && addAnimation(o.opacity, o.trail, start + i
* o.direction, o.lines) + ' ' + 1/o.speed + 's linear infinite'
})

if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top:


2+'px'}))
ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)')))
}
return el
},

/**
* Internal method that adjusts the opacity of a single line.
* Will be overwritten in VML fallback mode below.
*/
opacity: function(el, i, val) {
if (i < el.childNodes.length) el.childNodes[i].style.opacity = val
}

})

function initVML() {

/* Utility function to create a VML tag */


function vml(tag, attr) {
return createEl('<' + tag + ' xmlns="urn:schemas-microsoft.com:vml"
class="spin-vml">', attr)
}

// No CSS transforms but VML support, add a CSS rule for VML elements:
sheet.addRule('.spin-vml', 'behavior:url(#default#VML)')

Spinner.prototype.lines = function(el, o) {
var r = o.length+o.width
, s = 2*r

function grp() {
return css(
vml('group', {
coordsize: s + ' ' + s,
coordorigin: -r + ' ' + -r
}),
{ width: s, height: s }
)
}

var margin = -(o.width+o.length)*2 + 'px'


, g = css(grp(), {position: 'absolute', top: margin, left: margin})
, i

function seg(i, dx, filter) {


ins(g,
ins(css(grp(), {rotation: 360 / o.lines * i + 'deg', left: ~~dx}),
ins(css(vml('roundrect', {arcsize: o.corners}), {
width: r,
height: o.width,
left: o.radius,
top: -o.width>>1,
filter: filter
}),
vml('fill', {color: getColor(o.color, i), opacity: o.opacity}),
vml('stroke', {opacity: 0}) // transparent stroke to fix color
bleeding upon opacity change
)
)
)
}
if (o.shadow)
for (i = 1; i <= o.lines; i++)
seg(i, -2,
'progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3
)')

for (i = 1; i <= o.lines; i++) seg(i)


return ins(el, g)
}

Spinner.prototype.opacity = function(el, i, val, o) {


var c = el.firstChild
o = o.shadow && o.lines || 0
if (c && i+o < c.childNodes.length) {
c = c.childNodes[i+o]; c = c && c.firstChild; c = c && c.firstChild
if (c) c.opacity = val
}
}
}

var probe = css(createEl('group'), {behavior: 'url(#default#VML)'})

if (!vendor(probe, 'transform') && probe.adj) initVML()


else useCssAnimations = vendor(probe, 'animation')

return Spinner

}));

function spinnerInit(destination) {
var opts = {
lines: 13, // The number of lines to draw
length: 7, // The length of each line
width: 4, // The line thickness
radius: 10, // The radius of the inner circle
corners: 1, // Corner roundness (0..1)
rotate: 0, // The rotation offset
color: '#284062', //'#FFFFFF', // #rgb or #rrggbb
speed: 1, // Rounds per second
trail: 60, // Afterglow percentage
shadow: false, // Whether to render a shadow
hwaccel: false, // Whether to use hardware acceleration
className: 'spinner', // The CSS class to assign to the spinner
zIndex: 2e9, // The z-index (defaults to 2000000000)
top: 'auto', // Top position relative to parent in px
left: 'auto', // Left position relative to parent in px
visibility: true
};

var target = document.getElementById(destination);


if (target != null) {
target.innerHTML = "";
var spinner = new Spinner(opts).spin(target);
target.style.visibility = "visible";
}
}

function spinnerEnd(destination) {
var target = document.getElementById(destination);
if (target != null) {
target.style.visibility = "hidden";
}
}
;
// Knockout JavaScript library v3.1.0
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)

(function() {(function(p){var A=this||(0,eval)


("this"),w=A.document,K=A.navigator,t=A.jQuery,C=A.JSON;(function(p)
{"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?
p(module.exports||exports):"function"===typeof define&&define.amd?
define(["exports"],p):p(A.ko={})})(function(z){function G(a,c){return null===a||
typeof a in M?a===c:!1}function N(a,c){var d;return function(){d||
(d=setTimeout(function(){d=p;a()},c))}}function O(a,c){var d;return function()
{clearTimeout(d);d=setTimeout(a,
c)}}function H(b,c,d,e){a.d[b]={init:function(b,h,g,k,l){var n,r;a.ba(function()
{var g=a.a.c(h()),k=!d!==!g,s=!r;if(s||c||k!
==n)s&&a.ca.fa()&&(r=a.a.lb(a.e.childNodes(b),!0)),k?(s||a.e.U(b,a.a.lb(r)),a.gb(e?
e(l,g):l,b)):a.e.da(b),n=k},null,{G:b});return{controlsDescendantBindings:!
0}}};a.g.aa[b]=!1;a.e.Q[b]=!0}var a="undefined"!==typeof z?z:{};a.b=function(b,c)
{for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-
1]]=c};a.s=function(a,c,d){a[c]=d};a.version="3.1.0";a.b("version",
a.version);a.a=function(){function b(a,b){for(var c in
a)a.hasOwnProperty(c)&&b(c,a[c])}function c(a,b){if(b)for(var c in
b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function d(a,b){a.__proto__=b;return
a}var e={__proto__:[]}instanceof
Array,f={},h={};f[K&&/Firefox\/2/i.test(K.userAgent)?"KeyboardEvent":"UIEvents"]=["
keyup","keydown","keypress"];f.MouseEvents="click dblclick mousedown mouseup
mousemove mouseover mouseout mouseenter mouseleave".split(" ");b(f,function(a,b)
{if(b.length)for(var c=0,
d=b.length;c<d;c++)h[b[c]]=a});var g={propertychange:!0},k=w&&function(){for(var
a=3,b=w.createElement("div"),c=b.getElementsByTagName("i");b.innerHTML="\x3c!--[if
gt IE "+ ++a+"]><i></i><![endif]--\x3e",c[0];);return 4<a?a:p}();return{mb:
["authenticity_token",/^__RequestVerificationToken(_.*)?$/],r:function(a,b){for(var
c=0,d=a.length;c<d;c++)b(a[c],c)},l:function(a,b){if("function"==typeof
Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var
c=0,d=a.length;c<d;c++)if(a[c]===
b)return c;return-1},hb:function(a,b,c){for(var d=0,e=a.length;d<e;d+
+)if(b.call(c,a[d],d))return a[d];return null},ma:function(b,c){var
d=a.a.l(b,c);0<d?b.splice(d,1):0===d&&b.shift()},ib:function(b){b=b||[];for(var
c=[],d=0,e=b.length;d<e;d++)0>a.a.l(c,b[d])&&c.push(b[d]);return
c},ya:function(a,b){a=a||[];for(var c=[],d=0,e=a.length;d<e;d+
+)c.push(b(a[d],d));return c},la:function(a,b){a=a||[];for(var
c=[],d=0,e=a.length;d<e;d++)b(a[d],d)&&c.push(a[d]);return c},$:function(a,b){if(b
instanceof Array)a.push.apply(a,
b);else for(var c=0,d=b.length;c<d;c++)a.push(b[c]);return a},Y:function(b,c,d){var
e=a.a.l(a.a.Sa(b),c);0>e?d&&b.push(c):d||b.splice(e,1)},na:e,extend:c,ra:d,sa:e?
d:c,A:b,Oa:function(a,b){if(!a)return a;var c={},d;for(d in
a)a.hasOwnProperty(d)&&(c[d]=b(a[d],d,a));return c},Fa:function(b)
{for(;b.firstChild;)a.removeNode(b.firstChild)},ec:function(b){b=a.a.R(b);for(var
c=w.createElement("div"),d=0,e=b.length;d<e;d++)c.appendChild(a.M(b[d]));return
c},lb:function(b,c){for(var d=0,e=b.length,g=[];d<
e;d++){var k=b[d].cloneNode(!0);g.push(c?a.M(k):k)}return g},U:function(b,c)
{a.a.Fa(b);if(c)for(var d=0,e=c.length;d<e;d+
+)b.appendChild(c[d])},Bb:function(b,c){var d=b.nodeType?[b]:b;if(0<d.length)
{for(var e=d[0],g=e.parentNode,k=0,h=c.length;k<h;k+
+)g.insertBefore(c[k],e);k=0;for(h=d.length;k<h;k+
+)a.removeNode(d[k])}},ea:function(a,b){if(a.length)
{for(b=8===b.nodeType&&b.parentNode||b;a.length&&a[0].parentNode!
==b;)a.shift();if(1<a.length){var c=a[0],d=a[a.length-1];for(a.length=0;c!
==d;)if(a.push(c),
c=c.nextSibling,!c)return;a.push(d)}}return a},Db:function(a,b){7>k?
a.setAttribute("selected",b):a.selected=b},ta:function(a){return null===a||
a===p?"":a.trim?a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+
$/g,"")},oc:function(b,c){for(var d=[],e=(b||"").split(c),g=0,k=e.length;g<k;g++)
{var h=a.a.ta(e[g]);""!==h&&d.push(h)}return d},kc:function(a,b){a=a||"";return
b.length>a.length?!1:a.substring(0,b.length)===b},Sb:function(a,b){if(a===b)return!
0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(3===
a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return
16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!
a},Ea:function(b){return a.a.Sb(b,b.ownerDocument.documentElement)},eb:function(b)
{return!!a.a.hb(b,a.a.Ea)},B:function(a){return
a&&a.tagName&&a.tagName.toLowerCase()},q:function(b,c,d){var e=k&&g[c];if(!
e&&t)t(b).bind(c,d);else if(e||"function"!=typeof
b.addEventListener)if("undefined"!=typeof b.attachEvent){var h=function(a)
{d.call(b,a)},f="on"+c;b.attachEvent(f,
h);a.a.u.ja(b,function(){b.detachEvent(f,h)})}else throw Error("Browser doesn't
support addEventListener or attachEvent");else b.addEventListener(c,d,!
1)},ha:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node
when calling triggerEvent");var
d;"input"===a.a.B(b)&&b.type&&"click"==c.toLowerCase()?
(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(t&&!d)t(b).trigger(c);else
if("function"==typeof w.createEvent)if("function"==typeof
b.dispatchEvent)d=w.createEvent(h[c]||"HTMLEvents"),
d.initEvent(c,!0,!0,A,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw
Error("The supplied element doesn't support dispatchEvent");else
if(d&&b.click)b.click();else if("undefined"!=typeof
b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support
triggering events");},c:function(b){return a.v(b)?b():b},Sa:function(b){return
a.v(b)?b.o():b},ua:function(b,c,d){if(c){var e=/\S+/g,g=b.className.match(e)||
[];a.a.r(c.match(e),function(b){a.a.Y(g,b,d)});b.className=g.join("
")}},Xa:function(b,
c){var d=a.a.c(c);if(null===d||d===p)d="";var e=a.e.firstChild(b);!e||3!
=e.nodeType||a.e.nextSibling(e)?a.e.U(b,
[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.Vb(b)},Cb:function(a,b)
{a.name=b;if(7>=k)try{a.mergeAttributes(w.createElement("<input
name='"+a.name+"'/>"),!1)}catch(c){}},Vb:function(a){9<=k&&(a=1==a.nodeType?
a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},Tb:function(a){if(k){var
b=a.style.width;a.style.width=0;a.style.width=b}},ic:function(b,c)
{b=a.a.c(b);c=a.a.c(c);for(var d=
[],e=b;e<=c;e++)d.push(e);return d},R:function(a){for(var
b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return
b},mc:6===k,nc:7===k,oa:k,ob:function(b,c){for(var
d=a.a.R(b.getElementsByTagName("input")).concat(a.a.R(b.getElementsByTagName("texta
rea"))),e="string"==typeof c?function(a){return a.name===c}:function(a){return
c.test(a.name)},g=[],k=d.length-1;0<=k;k--)e(d[k])&&g.push(d[k]);return
g},fc:function(b){return"string"==typeof b&&(b=a.a.ta(b))?C&&C.parse?C.parse(b):
(new Function("return "+b))():
null},Ya:function(b,c,d){if(!C||!C.stringify)throw Error("Cannot find
JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you
can overcome this by adding a script reference to json2.js, downloadable from
http://www.json.org/json2.js");return C.stringify(a.a.c(b),c,d)},gc:function(c,d,e)
{e=e||{};var g=e.params||{},k=e.includeFields||this.mb,h=c;if("object"==typeof
c&&"form"===a.a.B(c))for(var h=c.action,f=k.length-1;0<=f;f--)for(var
u=a.a.ob(c,k[f]),D=u.length-1;0<=D;D--)g[u[D].name]=
u[D].value;d=a.a.c(d);var
y=w.createElement("form");y.style.display="none";y.action=h;y.method="post";for(var
p in
d)c=w.createElement("input"),c.name=p,c.value=a.a.Ya(a.a.c(d[p])),y.appendChild(c);
b(g,function(a,b){var
c=w.createElement("input");c.name=a;c.value=b;y.appendChild(c)});w.body.appendChild
(y);e.submitter?e.submitter(y):y.submit();setTimeout(function()
{y.parentNode.removeChild(y)},0)}}}
();a.b("utils",a.a);a.b("utils.arrayForEach",a.a.r);a.b("utils.arrayFirst",a.a.hb);
a.b("utils.arrayFilter",
a.a.la);a.b("utils.arrayGetDistinctValues",a.a.ib);a.b("utils.arrayIndexOf",a.a.l);
a.b("utils.arrayMap",a.a.ya);a.b("utils.arrayPushAll",a.a.
$);a.b("utils.arrayRemoveItem",a.a.ma);a.b("utils.extend",a.a.extend);a.b("utils.fi
eldsIncludedWithJsonPost",a.a.mb);a.b("utils.getFormFields",a.a.ob);a.b("utils.peek
Observable",a.a.Sa);a.b("utils.postJson",a.a.gc);a.b("utils.parseJson",a.a.fc);a.b(
"utils.registerEventHandler",a.a.q);a.b("utils.stringifyJson",a.a.Ya);a.b("utils.ra
nge",a.a.ic);a.b("utils.toggleDomNodeCssClass",
a.a.ua);a.b("utils.triggerEvent",a.a.ha);a.b("utils.unwrapObservable",a.a.c);a.b("u
tils.objectForEach",a.a.A);a.b("utils.addOrRemoveItem",a.a.Y);a.b("unwrap",a.a.c);F
unction.prototype.bind||(Function.prototype.bind=function(a){var
c=this,d=Array.prototype.slice.call(arguments);a=d.shift();return function(){return
c.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});a.a.f=new function()
{function a(b,h){var g=b[d];if(!g||"null"===g||!e[g]){if(!h)return p;g=b[d]="ko"+c+
+;e[g]={}}return e[g]}
var c=0,d="__ko__"+(new Date).getTime(),e={};return{get:function(c,d){var e=a(c,!
1);return e===p?p:e[d]},set:function(c,d,e){if(e!==p||a(c,!1)!==p)a(c,!0)
[d]=e},clear:function(a){var b=a[d];return b?(delete e[b],a[d]=null,!0):!
1},L:function(){return c++
+d}}};a.b("utils.domData",a.a.f);a.b("utils.domData.clear",a.a.f.clear);a.a.u=new
function(){function b(b,c){var
e=a.a.f.get(b,d);e===p&&c&&(e=[],a.a.f.set(b,d,e));return e}function c(d){var
e=b(d,!1);if(e)for(var e=e.slice(0),k=0;k<e.length;k++)e[k](d);
a.a.f.clear(d);a.a.u.cleanExternalData(d);if(f[d.nodeType])for(e=d.firstChild;d=e;)
e=d.nextSibling,8===d.nodeType&&c(d)}var d=a.a.f.L(),e={1:!0,8:!0,9:!0},f={1:!0,9:!
0};return{ja:function(a,c){if("function"!=typeof c)throw Error("Callback must be a
function");b(a,!0).push(c)},Ab:function(c,e){var k=b(c,!
1);k&&(a.a.ma(k,e),0==k.length&&a.a.f.set(c,d,p))},M:function(b)
{if(e[b.nodeType]&&(c(b),f[b.nodeType])){var d=[];a.a.$
(d,b.getElementsByTagName("*"));for(var k=0,l=d.length;k<l;k++)c(d[k])}return b},
removeNode:function(b)
{a.M(b);b.parentNode&&b.parentNode.removeChild(b)},cleanExternalData:function(a)
{t&&"function"==typeof
t.cleanData&&t.cleanData([a])}}};a.M=a.a.u.M;a.removeNode=a.a.u.removeNode;a.b("cle
anNode",a.M);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.u);a.b(
"utils.domNodeDisposal.addDisposeCallback",a.a.u.ja);a.b("utils.domNodeDisposal.rem
oveDisposeCallback",a.a.u.Ab);(function(){a.a.Qa=function(b){var
c;if(t)if(t.parseHTML)c=t.parseHTML(b)||[];else{if((c=t.clean([b]))&&
c[0]){for(b=c[0];b.parentNode&&11!
==b.parentNode.nodeType;)b=b.parentNode;b.parentNode&&b.parentNode.removeChild(b)}}
else{var d=a.a.ta(b).toLowerCase();c=w.createElement("div");d=d.match(/^<(thead|
tbody|tfoot)/)&&[1,"<table>","</table>"]||!
d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!
d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||
[0,"",""];b="ignored<div>"+d[1]+b+d[2]+"</div>";for("function"==typeof A.innerShiv?
c.appendChild(A.innerShiv(b)):
c.innerHTML=b;d[0]--;)c=c.lastChild;c=a.a.R(c.lastChild.childNodes)}return
c};a.a.Va=function(b,c){a.a.Fa(b);c=a.a.c(c);if(null!==c&&c!==p)if("string"!=typeof
c&&(c=c.toString()),t)t(b).html(c);else for(var d=a.a.Qa(c),e=0;e<d.length;e+
+)b.appendChild(d[e])}})
();a.b("utils.parseHtmlFragment",a.a.Qa);a.b("utils.setHtml",a.a.Va);a.w=function()
{function b(c,e){if(c)if(8==c.nodeType){var f=a.w.xb(c.nodeValue);null!
=f&&e.push({Rb:c,cc:f})}else if(1==c.nodeType)for(var
f=0,h=c.childNodes,g=h.length;f<g;f++)b(h[f],
e)}var c={};return{Na:function(a){if("function"!=typeof a)throw Error("You can only
pass a function to ko.memoization.memoize()");var b=(4294967296*(1+Math.random())|
0).toString(16).substring(1)+(4294967296*(1+Math.random())|
0).toString(16).substring(1);c[b]=a;return"\x3c!--
[ko_memo:"+b+"]--\x3e"},Hb:function(a,b){var f=c[a];if(f===p)throw Error("Couldn't
find any memo with ID "+a+". Perhaps it's already been unmemoized.");try{return
f.apply(null,b||[]),!0}finally{delete c[a]}},Ib:function(c,e){var f=
[];b(c,f);for(var h=0,g=f.length;h<g;h++){var k=f[h].Rb,l=[k];e&&a.a.$
(l,e);a.w.Hb(f[h].cc,l);k.nodeValue="";k.parentNode&&k.parentNode.removeChild(k)}},
xb:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:null}}}
();a.b("memoization",a.w);a.b("memoization.memoize",a.w.Na);a.b("memoization.unmemo
ize",a.w.Hb);a.b("memoization.parseMemoText",a.w.xb);a.b("memoization.unmemoizeDomN
odeAndDescendants",a.w.Ib);a.Ga={throttle:function(b,c){b.throttleEvaluation=c;var
d=null;return a.h({read:b,write:function(a){clearTimeout(d);
d=setTimeout(function(){b(a)},c)}})},rateLimit:function(a,c){var
d,e,f;"number"==typeof c?d=c:(d=c.timeout,e=c.method);f="notifyWhenChangesStop"==e?
O:N;a.Ma(function(a){return f(a,d)})},notify:function(a,c)
{a.equalityComparer="always"==c?null:G}};var
M={undefined:1,"boolean":1,number:1,string:1};a.b("extenders",a.Ga);a.Fb=function(b
,c,d){this.target=b;this.za=c;this.Qb=d;this.sb=!
1;a.s(this,"dispose",this.F)};a.Fb.prototype.F=function(){this.sb=!
0;this.Qb()};a.N=function(){a.a.sa(this,a.N.fn);this.H=
{}};var F="change";z={V:function(b,c,d){var e=this;d=d||F;var f=new a.Fb(e,c?
b.bind(c):b,function(){a.a.ma(e.H[d],f)});e.o&&e.o();e.H[d]||
(e.H[d]=[]);e.H[d].push(f);return f},notifySubscribers:function(b,c){c=c||
F;if(this.qb(c))try{a.k.jb();for(var d=this.H[c].slice(0),e=0,f;f=d[e];++e)f.sb||
f.za(b)}finally{a.k.end()}},Ma:function(b){var c=this,d=a.v(c),e,f,h;c.ia||
(c.ia=c.notifySubscribers,c.notifySubscribers=function(a,b){b&&b!
==F?"beforeChange"===b?c.bb(a):c.ia(a,b):c.cb(a)});var g=b(function(){d&&
h===c&&(h=c());e=!1;c.Ka(f,h)&&c.ia(f=h)});c.cb=function(a){e=!
0;h=a;g()};c.bb=function(a){e||(f=a,c.ia(a,"beforeChange"))}},qb:function(a){return
this.H[a]&&this.H[a].length},Wb:function(){var b=0;a.a.A(this.H,function(a,d)
{b+=d.length});return b},Ka:function(a,c){return!this.equalityComparer||!
this.equalityComparer(a,c)},extend:function(b){var c=this;b&&a.a.A(b,function(b,e)
{var f=a.Ga[b];"function"==typeof f&&(c=f(c,e)||c)});return
c}};a.s(z,"subscribe",z.V);a.s(z,"extend",z.extend);a.s(z,"getSubscriptionsCount",
z.Wb);a.a.na&&a.a.ra(z,Function.prototype);a.N.fn=z;a.tb=function(a){return null!
=a&&"function"==typeof a.V&&"function"==typeof
a.notifySubscribers};a.b("subscribable",a.N);a.b("isSubscribable",a.tb);a.ca=a.k=fu
nction(){function b(a){d.push(e);e=a}function c(){e=d.pop()}var
d=[],e,f=0;return{jb:b,end:c,zb:function(b){if(e){if(!a.tb(b))throw Error("Only
subscribable things can act as dependencies");e.za(b,b.Kb||(b.Kb=+
+f))}},t:function(a,d,e){try{return b(),a.apply(d,e||
[])}finally{c()}},fa:function(){if(e)return e.ba.fa()},
pa:function(){if(e)return e.pa}}}
();a.b("computedContext",a.ca);a.b("computedContext.getDependenciesCount",a.ca.fa);
a.b("computedContext.isInitial",a.ca.pa);a.m=function(b){function c()
{if(0<arguments.length)return
c.Ka(d,arguments[0])&&(c.P(),d=arguments[0],c.O()),this;a.k.zb(c);return d}var
d=b;a.N.call(c);a.a.sa(c,a.m.fn);c.o=function(){return d};c.O=function()
{c.notifySubscribers(d)};c.P=function()
{c.notifySubscribers(d,"beforeChange")};a.s(c,"peek",c.o);a.s(c,"valueHasMutated",c
.O);a.s(c,"valueWillMutate",
c.P);return c};a.m.fn={equalityComparer:G};var
E=a.m.hc="__ko_proto__";a.m.fn[E]=a.m;a.a.na&&a.a.ra(a.m.fn,a.N.fn);a.Ha=function(b
,c){return null===b||b===p||b[E]===p?!1:b[E]===c?!0:a.Ha(b[E],c)};a.v=function(b)
{return a.Ha(b,a.m)};a.ub=function(b){return"function"==typeof
b&&b[E]===a.m||"function"==typeof b&&b[E]===a.h&&b.Yb?!0:!
1};a.b("observable",a.m);a.b("isObservable",a.v);a.b("isWriteableObservable",a.ub);
a.T=function(b){b=b||[];if("object"!=typeof b||!("length"in b))throw Error("The
argument passed when initializing an observable array must be an array, or null, or
undefined.");
b=a.m(b);a.a.sa(b,a.T.fn);return b.extend({trackArrayChanges:!
0})};a.T.fn={remove:function(b){for(var c=this.o(),d=[],e="function"!=typeof b||
a.v(b)?function(a){return a===b}:b,f=0;f<c.length;f++){var
h=c[f];e(h)&&(0===d.length&&this.P(),d.push(h),c.splice(f,1),f--)}d.length&&this.O(
);return d},removeAll:function(b){if(b===p){var
c=this.o(),d=c.slice(0);this.P();c.splice(0,c.length);this.O();return d}return b?
this.remove(function(c){return 0<=a.a.l(b,c)}):[]},destroy:function(b){var
c=this.o(),d=
"function"!=typeof b||a.v(b)?function(a){return a===b}:b;this.P();for(var
e=c.length-1;0<=e;e--)d(c[e])&&(c[e]._destroy=!0);this.O()},destroyAll:function(b)
{return b===p?this.destroy(function(){return!0}):b?this.destroy(function(c){return
0<=a.a.l(b,c)}):[]},indexOf:function(b){var c=this();return
a.a.l(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.P(),this.o()
[d]=c,this.O())}};a.a.r("pop push reverse shift sort splice unshift".split("
"),function(b){a.T.fn[b]=function(){var a=this.o();
this.P();this.kb(a,b,arguments);a=a[b].apply(a,arguments);this.O();return
a}});a.a.r(["slice"],function(b){a.T.fn[b]=function(){var a=this();return
a[b].apply(a,arguments)}});a.a.na&&a.a.ra(a.T.fn,a.m.fn);a.b("observableArray",a.T)
;var I="arrayChange";a.Ga.trackArrayChanges=function(b){function c(){if(!d){d=!
0;var c=b.notifySubscribers;b.notifySubscribers=function(a,b){b&&b!==F||++f;return
c.apply(this,arguments)};var k=[].concat(b.o()||[]);e=null;b.V(function(c)
{c=[].concat(c||[]);if(b.qb(I)){var d;
if(!e||1<f)e=a.a.Aa(k,c,{sparse:!
0});d=e;d.length&&b.notifySubscribers(d,I)}k=c;e=null;f=0})}}if(!b.kb){var d=!
1,e=null,f=0,h=b.V;b.V=b.subscribe=function(a,b,d){d===I&&c();return
h.apply(this,arguments)};b.kb=function(b,c,l){function h(a,b,c){return
r[r.length]={status:a,value:b,index:c}}if(d&&!f){var
r=[],m=b.length,q=l.length,s=0;switch(c){case "push":s=m;case
"unshift":for(c=0;c<q;c++)h("added",l[c],s+c);break;case "pop":s=m-1;case
"shift":m&&h("deleted",b[s],s);break;case "splice":c=Math.min(Math.max(0,
0>l[0]?m+l[0]:l[0]),m);for(var m=1===q?m:Math.min(c+(l[1]||0),m),q=c+q-
2,s=Math.max(m,q),B=[],u=[],D=2;c<s;++c,+
+D)c<m&&u.push(h("deleted",b[c],c)),c<q&&B.push(h("added",l[D],c));a.a.nb(u,B);brea
k;default:return}e=r}}}};a.ba=a.h=function(b,c,d){function e(){q=!
0;a.a.A(v,function(a,b){b.F()});v={};x=0;n=!1}function f(){var
a=g.throttleEvaluation;a&&0<=a?(clearTimeout(t),t=setTimeout(h,a)):g.wa?
g.wa():h()}function h(){if(!r&&!q){if(y&&y()){if(!m){p();return}}else m=!1;r=!
0;try{var b=v,d=x;a.k.jb({za:function(a,
c){q||(d&&b[c]?(v[c]=b[c],++x,delete b[c],--d):v[c]||(v[c]=a.V(f),++x))},ba:g,pa:!
x});v={};x=0;try{var e=c?s.call(c):s()}finally{a.k.end(),d&&a.a.A(b,function(a,b)
{b.F()}),n=!1}g.Ka(l,e)&&(g.notifySubscribers(l,"beforeChange"),l=e,g.wa&&!
g.throttleEvaluation||g.notifySubscribers(l))}finally{r=!1}x||p()}}function g()
{if(0<arguments.length){if("function"===typeof B)B.apply(c,arguments);else throw
Error("Cannot write a value to a ko.computed unless you specify a 'write' option.
If you wish to read the current value, don't pass any parameters.");
return this}n&&h();a.k.zb(g);return l}function k(){return n||0<x}var l,n=!0,r=!
1,m=!1,q=!1,s=b;s&&"object"==typeof s?(d=s,s=d.read):(d=d||{},s||
(s=d.read));if("function"!=typeof s)throw Error("Pass a function that returns the
value of the ko.computed");var B=d.write,u=d.disposeWhenNodeIsRemoved||d.G||
null,D=d.disposeWhen||d.Da,y=D,p=e,v={},x=0,t=null;c||
(c=d.owner);a.N.call(g);a.a.sa(g,a.h.fn);g.o=function(){n&&!x&&h();return
l};g.fa=function(){return x};g.Yb="function"===typeof d.write;g.F=function(){p()};
g.ga=k;var w=g.Ma;g.Ma=function(a){w.call(g,a);g.wa=function(){g.bb(l);n=!
0;g.cb(g)}};a.s(g,"peek",g.o);a.s(g,"dispose",g.F);a.s(g,"isActive",g.ga);a.s(g,"ge
tDependenciesCount",g.fa);u&&(m=!0,u.nodeType&&(y=function(){return!a.a.Ea(u)||
D&&D()}));!0!==d.deferEvaluation&&h();u&&k()&&u.nodeType&&(p=function()
{a.a.u.Ab(u,p);e()},a.a.u.ja(u,p));return g};a.$b=function(b){return
a.Ha(b,a.h)};z=a.m.hc;a.h[z]=a.m;a.h.fn={equalityComparer:G};a.h.fn[z]=a.h;a.a.na&&
a.a.ra(a.h.fn,a.N.fn);a.b("dependentObservable",
a.h);a.b("computed",a.h);a.b("isComputed",a.$b);(function(){function b(a,f,h){h=h||
new d;a=f(a);if("object"!=typeof a||null===a||a===p||a instanceof Date||a
instanceof String||a instanceof Number||a instanceof Boolean)return a;var g=a
instanceof Array?[]:{};h.save(a,g);c(a,function(c){var d=f(a[c]);switch(typeof d)
{case "boolean":case "number":case "string":case "function":g[c]=d;break;case
"object":case "undefined":var n=h.get(d);g[c]=n!==p?n:b(d,f,h)}});return g}function
c(a,b){if(a instanceof Array){for(var c=
0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in
a)b(c)}function d(){this.keys=[];this.ab=[]}a.Gb=function(c)
{if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want
to convert.");return b(c,function(b){for(var c=0;a.v(b)&&10>c;c++)b=b();return
b})};a.toJSON=function(b,c,d){b=a.Gb(b);return
a.a.Ya(b,c,d)};d.prototype={save:function(b,c){var d=a.a.l(this.keys,b);0<=d?
this.ab[d]=c:(this.keys.push(b),this.ab.push(c))},get:function(b)
{b=a.a.l(this.keys,
b);return 0<=b?this.ab[b]:p}}})();a.b("toJS",a.Gb);a.b("toJSON",a.toJSON);
(function(){a.i={p:function(b){switch(a.a.B(b)){case "option":return!
0===b.__ko__hasDomDataOptionValue__?a.a.f.get(b,a.d.options.Pa):7>=a.a.oa?
b.getAttributeNode("value")&&b.getAttributeNode("value").specified?
b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?
a.i.p(b.options[b.selectedIndex]):p;default:return b.value}},X:function(b,c,d)
{switch(a.a.B(b)){case "option":switch(typeof c){case
"string":a.a.f.set(b,a.d.options.Pa,
p);"__ko__hasDomDataOptionValue__"in b&&delete
b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.f.set(b,a.d.options.Pa,
c),b.__ko__hasDomDataOptionValue__=!0,b.value="number"===typeof c?c:""}break;case
"select":if(""===c||null===c)c=p;for(var e=-1,f=0,h=b.options.length,g;f<h;+
+f)if(g=a.i.p(b.options[f]),g==c||""==g&&c===p){e=f;break}if(d||0<=e||
c===p&&1<b.size)b.selectedIndex=e;break;default:if(null===c||
c===p)c="";b.value=c}}}})
();a.b("selectExtensions",a.i);a.b("selectExtensions.readValue",
a.i.p);a.b("selectExtensions.writeValue",a.i.X);a.g=function(){function b(b)
{b=a.a.ta(b);123===b.charCodeAt(0)&&(b=b.slice(1,-1));var
c=[],d=b.match(e),g,m,q=0;if(d){d.push(",");for(var s=0,B;B=d[s];++s){var
u=B.charCodeAt(0);if(44===u){if(0>=q){g&&c.push(m?{key:g,value:m.join("")}:
{unknown:g});g=m=q=0;continue}}else if(58===u){if(!m)continue}else
if(47===u&&s&&1<B.length)(u=d[s-1].match(f))&&!h[u[0]]&&(b=b.substr(b.indexOf(B)
+1),d=b.match(e),d.push(","),s=-1,B="/");else if(40===u||123===u||91===
u)++q;else if(41===u||125===u||93===u)--q;else if(!g&&!m){g=34===u||39===u?
B.slice(1,-1):B;continue}m?m.push(B):m=[B]}}return c}var
c=["true","false","null","undefined"],d=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z]
[$\w]*|\[.+\]))$/i,e=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:
[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|
[^\\s]","g"),f=/[\])"'A-Za-z0-9_$]+
$/,h={"in":1,"return":1,"typeof":1},g={};return{aa:[],W:g,Ra:b,qa:function(e,l)
{function f(b,e){var l,k=a.getBindingHandler(b);
if(k&&k.preprocess?e=k.preprocess(e,b,f):1){if(k=g[b])l=e,0<=a.a.l(c,l)?l=!1:
(k=l.match(d),l=null===k?!
1:k[1]?"Object("+k[1]+")"+k[2]:l),k=l;k&&m.push("'"+b+"':function(_z)
{"+l+"=_z}");q&&(e="function(){return "+e+" }");h.push("'"+b+"':"+e)}}l=l||{};var
h=[],m=[],q=l.valueAccessors,s="string"===typeof e?b(e):e;a.a.r(s,function(a)
{f(a.key||a.unknown,a.value)});m.length&&f("_ko_property_writers","{"+m.join(",")+"
}");return h.join(",")},bc:function(a,b){for(var c=0;c<a.length;c+
+)if(a[c].key==b)return!0;
return!1},va:function(b,c,d,e,g){if(b&&a.v(b))!a.ub(b)||g&&b.o()===e||b(e);else
if((b=c.get("_ko_property_writers"))&&b[d])b[d](e)}}}
();a.b("expressionRewriting",a.g);a.b("expressionRewriting.bindingRewriteValidators
",a.g.aa);a.b("expressionRewriting.parseObjectLiteral",a.g.Ra);a.b("expressionRewri
ting.preProcessBindings",a.g.qa);a.b("expressionRewriting._twoWayBindings",a.g.W);a
.b("jsonExpressionRewriting",a.g);a.b("jsonExpressionRewriting.insertPropertyAccess
orsIntoJson",a.g.qa);(function(){function b(a){return 8==
a.nodeType&&h.test(f?a.text:a.nodeValue)}function c(a){return
8==a.nodeType&&g.test(f?a.text:a.nodeValue)}function d(a,d){for(var
e=a,g=1,k=[];e=e.nextSibling;){if(c(e)&&(g--,0===g))return k;k.push(e);b(e)&&g+
+}if(!d)throw Error("Cannot find closing comment tag to match:
"+a.nodeValue);return null}function e(a,b){var c=d(a,b);return c?0<c.length?
c[c.length-1].nextSibling:a.nextSibling:null}var f=w&&"\x3c!--
test--\x3e"===w.createComment("test").text,h=f?/^\x3c!--\s*ko(?:\s+([\s\S]
+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,
g=f?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,k={ul:!0,ol:!0};a.e={Q:
{},childNodes:function(a){return b(a)?d(a):a.childNodes},da:function(c){if(b(c))
{c=a.e.childNodes(c);for(var d=0,e=c.length;d<e;d++)a.removeNode(c[d])}else
a.a.Fa(c)},U:function(c,d){if(b(c)){a.e.da(c);for(var
e=c.nextSibling,g=0,k=d.length;g<k;g++)e.parentNode.insertBefore(d[g],e)}else
a.a.U(c,d)},yb:function(a,c){b(a)?
a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?
a.insertBefore(c,a.firstChild):a.appendChild(c)},rb:function(c,
d,e){e?b(c)?c.parentNode.insertBefore(d,e.nextSibling):e.nextSibling?
c.insertBefore(d,e.nextSibling):c.appendChild(d):a.e.yb(c,d)},firstChild:function(a
){return b(a)?!a.nextSibling||c(a.nextSibling)?
null:a.nextSibling:a.firstChild},nextSibling:function(a){b(a)&&(a=e(a));return
a.nextSibling&&c(a.nextSibling)?null:a.nextSibling},Xb:b,lc:function(a)
{return(a=(f?a.text:a.nodeValue).match(h))?a[1]:null},wb:function(d)
{if(k[a.a.B(d)]){var g=d.firstChild;if(g){do if(1===g.nodeType){var
f;f=g.firstChild;
var h=null;if(f){do if(h)h.push(f);else if(b(f)){var q=e(f,!0);q?f=q:h=[f]}else
c(f)&&(h=[f]);while(f=f.nextSibling)}if(f=h)for(h=g.nextSibling,q=0;q<f.length;q+
+)h?d.insertBefore(f[q],h):d.appendChild(f[q])}while(g=g.nextSibling)}}}}})
();a.b("virtualElements",a.e);a.b("virtualElements.allowedBindings",a.e.Q);a.b("vir
tualElements.emptyNode",a.e.da);a.b("virtualElements.insertAfter",a.e.rb);a.b("virt
ualElements.prepend",a.e.yb);a.b("virtualElements.setDomNodeChildren",a.e.U);
(function(){a.J=function(){this.Nb=
{}};a.a.extend(a.J.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case
1:return null!=b.getAttribute("data-bind");case 8:return a.e.Xb(b);default:return!
1}},getBindings:function(a,c){var d=this.getBindingsString(a,c);return d?
this.parseBindingsString(d,c,a):null},getBindingAccessors:function(a,c){var
d=this.getBindingsString(a,c);return d?this.parseBindingsString(d,c,a,
{valueAccessors:!0}):null},getBindingsString:function(b){switch(b.nodeType){case
1:return b.getAttribute("data-bind");
case 8:return a.e.lc(b);default:return null}},parseBindingsString:function(b,c,d,e)
{try{var f=this.Nb,h=b+(e&&e.valueAccessors||""),g;if(!(g=f[h])){var
k,l="with($context){with($data||{}){return{"+a.g.qa(b,e)+"}}}";k=new
Function("$context","$element",l);g=f[h]=k}return g(c,d)}catch(n){throw
n.message="Unable to parse bindings.\nBindings value: "+b+"\nMessage:
"+n.message,n;}}});a.J.instance=new a.J})();a.b("bindingProvider",a.J);(function()
{function b(a){return function(){return a}}function c(a){return a()}
function d(b){return a.a.Oa(a.k.t(b),function(a,c){return function(){return b()
[c]}})}function e(a,b){return d(this.getBindings.bind(this,a,b))}function f(b,c,d)
{var e,g=a.e.firstChild(c),k=a.J.instance,f=k.preprocessNode;if(f)
{for(;e=g;)g=a.e.nextSibling(e),f.call(k,e);g=a.e.firstChild(c)}for(;e=g;)g=a.e.nex
tSibling(e),h(b,e,d)}function h(b,c,d){var e=!
0,g=1===c.nodeType;g&&a.e.wb(c);if(g&&d||
a.J.instance.nodeHasBindings(c))e=k(c,null,b,d).shouldBindDescendants;e&&!
n[a.a.B(c)]&&f(b,c,!g)}function g(b){var c=
[],d={},e=[];a.a.A(b,function y(g){if(!d[g]){var
k=a.getBindingHandler(g);k&&(k.after&&(e.push(g),a.a.r(k.after,function(c){if(b[c])
{if(-1!==a.a.l(e,c))throw Error("Cannot combine the following bindings, because
they have a cyclic dependency: "+e.join(",
"));y(c)}}),e.length--),c.push({key:g,pb:k}));d[g]=!0}});return c}function
k(b,d,k,f){var h=a.a.f.get(b,r);if(!d){if(h)throw Error("You cannot apply bindings
multiple times to the same element.");a.a.f.set(b,r,!0)}!h&&f&&a.Eb(b,k);var
l;if(d&&"function"!==
typeof d)l=d;else{var n=a.J.instance,m=n.getBindingAccessors||e,x=a.h(function()
{(l=d?d(k,b):m.call(n,b,k))&&k.D&&k.D();return l},null,{G:b});l&&x.ga()||
(x=null)}var t;if(l){var w=x?function(a){return function(){return c(x()
[a])}}:function(a){return l[a]},z=function(){return a.a.Oa(x?
x():l,c)};z.get=function(a){return l[a]&&c(w(a))};z.has=function(a){return a in
l};f=g(l);a.a.r(f,function(c){var
d=c.pb.init,e=c.pb.update,g=c.key;if(8===b.nodeType&&!a.e.Q[g])throw Error("The
binding '"+g+"' cannot be used with virtual elements");
try{"function"==typeof d&&a.k.t(function(){var a=d(b,w(g),z,k.
$data,k);if(a&&a.controlsDescendantBindings){if(t!==p)throw Error("Multiple
bindings ("+t+" and "+g+") are trying to control descendant bindings of the same
element. You cannot use these bindings together on the same
element.");t=g}}),"function"==typeof e&&a.h(function(){e(b,w(g),z,k.$data,k)},null,
{G:b})}catch(f){throw f.message='Unable to process binding "'+g+": "+l[g]
+'"\nMessage: '+f.message,f;}})}return{shouldBindDescendants:t===p}}
function l(b){return b&&b instanceof a.I?b:new a.I(b)}a.d={};var n={script:!
0};a.getBindingHandler=function(b){return a.d[b]};a.I=function(b,c,d,e){var
g=this,k="function"==typeof b&&!a.v(b),f,h=a.h(function(){var f=k?
b():b,l=a.a.c(f);c?(c.D&&c.D(),a.a.extend(g,c),h&&(g.D=h)):(g.$parents=[],g.
$root=l,g.ko=a);g.$rawData=f;g.$data=l;d&&(g[d]=l);e&&e(g,c,l);return g.
$data},null,{Da:function(){return f&&!a.a.eb(f)},G:!
0});h.ga()&&(g.D=h,h.equalityComparer=null,f=[],h.Jb=function(b)
{f.push(b);a.a.u.ja(b,
function(b){a.a.ma(f,b);f.length||
(h.F(),g.D=h=p)})})};a.I.prototype.createChildContext=function(b,c,d){return new
a.I(b,this,c,function(a,b){a.$parentContext=b;a.$parent=b.$data;a.$parents=(b.
$parents||[]).slice(0);a.$parents.unshift(a.
$parent);d&&d(a)})};a.I.prototype.extend=function(b){return new a.I(this.D||this.
$data,this,null,function(c,d){c.$rawData=d.$rawData;a.a.extend(c,"function"==typeof
b?b():b)})};var r=a.a.f.L(),m=a.a.f.L();a.Eb=function(b,c)
{if(2==arguments.length)a.a.f.set(b,m,c),
c.D&&c.D.Jb(b);else return a.a.f.get(b,m)};a.xa=function(b,c,d)
{1===b.nodeType&&a.e.wb(b);return k(b,c,l(d),!0)};a.Lb=function(c,e,g)
{g=l(g);return a.xa(c,"function"===typeof e?
d(e.bind(null,g,c)):a.a.Oa(e,b),g)};a.gb=function(a,b){1!==b.nodeType&&8!
==b.nodeType||f(l(a),b,!0)};a.fb=function(a,b){!t&&A.jQuery&&(t=A.jQuery);if(b&&1!
==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should
be your view model; second parameter should be a DOM node");b=b||
A.document.body;h(l(a),
b,!0)};a.Ca=function(b){switch(b.nodeType){case 1:case 8:var c=a.Eb(b);if(c)return
c;if(b.parentNode)return a.Ca(b.parentNode)}return p};a.Pb=function(b)
{return(b=a.Ca(b))?b.
$data:p};a.b("bindingHandlers",a.d);a.b("applyBindings",a.fb);a.b("applyBindingsToD
escendants",a.gb);a.b("applyBindingAccessorsToNode",a.xa);a.b("applyBindingsToNode"
,a.Lb);a.b("contextFor",a.Ca);a.b("dataFor",a.Pb)})();var
L={"class":"className","for":"htmlFor"};a.d.attr={update:function(b,c){var
d=a.a.c(c())||{};a.a.A(d,function(c,
d){d=a.a.c(d);var h=!1===d||null===d||d===p;h&&b.removeAttribute(c);8>=a.a.oa&&c in
L?(c=L[c],h?b.removeAttribute(c):b[c]=d):h||
b.setAttribute(c,d.toString());"name"===c&&a.a.Cb(b,h?"":d.toString())})}};
(function(){a.d.checked={after:["value","attr"],init:function(b,c,d){function e()
{return d.has("checkedValue")?a.a.c(d.get("checkedValue")):b.value}function f(){var
g=b.checked,f=r?e():g;if(!a.ca.pa()&&(!k||g)){var h=a.k.t(c);l?n!==f?
(g&&(a.a.Y(h,f,!0),a.a.Y(h,n,!1)),n=f):a.a.Y(h,f,g):a.g.va(h,d,"checked",
f,!0)}}function h(){var d=a.a.c(c());b.checked=l?0<=a.a.l(d,e()):g?d:e()===d}var
g="checkbox"==b.type,k="radio"==b.type;if(g||k){var l=g&&a.a.c(c())instanceof
Array,n=l?e():p,r=k||l;k&&!b.name&&a.d.uniqueName.init(b,function(){return!
0});a.ba(f,null,{G:b});a.a.q(b,"click",f);a.ba(h,null,{G:b})}}};a.g.W.checked=!
0;a.d.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})
();a.d.css={update:function(b,c){var d=a.a.c(c());"object"==typeof d?
a.a.A(d,function(c,d){d=a.a.c(d);a.a.ua(b,c,d)}):(d=String(d||
""),a.a.ua(b,b.__ko__cssValue,!1),b.__ko__cssValue=d,a.a.ua(b,d,!
0))}};a.d.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?
b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!
0)}};a.d.disable={update:function(b,c){a.d.enable.update(b,function(){return!
a.a.c(c())})}};a.d.event={init:function(b,c,d,e,f){var h=c()||
{};a.a.A(h,function(g){"string"==typeof g&&a.a.q(b,g,function(b){var h,n=c()
[g];if(n){try{var r=a.a.R(arguments);e=f.
$data;r.unshift(e);h=n.apply(e,r)}finally{!0!==h&&(b.preventDefault?
b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!
0,b.stopPropagation&&b.stopPropagation())}})})}};a.d.foreach={vb:function(b){return
function(){var c=b(),d=a.a.Sa(c);if(!d||"number"==typeof
d.length)return{foreach:c,templateEngine:a.K.Ja};a.a.c(c);return{foreach:d.data,as:
d.as,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd,beforeRemove:d.beforeR
emove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templ
ateEngine:a.K.Ja}}},init:function(b,
c){return a.d.template.init(b,a.d.foreach.vb(c))},update:function(b,c,d,e,f){return
a.d.template.update(b,a.d.foreach.vb(c),d,e,f)}};a.g.aa.foreach=!1;a.e.Q.foreach=!
0;a.d.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var
k=b.ownerDocument;if("activeElement"in k){var f;try{f=k.activeElement}catch(h)
{f=k.body}e=f===b}k=c();a.g.va(k,d,"hasfocus",e,!
0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!
0),h=e.bind(null,!1);a.a.q(b,"focus",f);a.a.q(b,"focusin",
f);a.a.q(b,"blur",h);a.a.q(b,"focusout",h)},update:function(b,c){var d=!!
a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?
b.focus():b.blur(),a.k.t(a.a.ha,null,
[b,d?"focusin":"focusout"]))}};a.g.W.hasfocus=!
0;a.d.hasFocus=a.d.hasfocus;a.g.W.hasFocus=!0;a.d.html={init:function()
{return{controlsDescendantBindings:!0}},update:function(b,c)
{a.a.Va(b,c())}};H("if");H("ifnot",!1,!0);H("with",!0,!1,function(a,c){return
a.createChildContext(c)});var J={};a.d.options={init:function(b){if("select"!==
a.a.B(b))throw Error("options binding applies only to SELECT
elements");for(;0<b.length;)b.remove(0);return{controlsDescendantBindings:!
0}},update:function(b,c,d){function e(){return a.a.la(b.options,function(a){return
a.selected})}function f(a,b,c){var d=typeof b;return"function"==d?b(a):"string"==d?
a[b]:c}function h(c,d){if(r.length){var
e=0<=a.a.l(r,a.i.p(d[0]));a.a.Db(d[0],e);m&&!e&&a.k.t(a.a.ha,null,
[b,"change"])}}var g=0!=b.length&&b.multiple?
b.scrollTop:null,k=a.a.c(c()),l=d.get("optionsIncludeDestroyed");
c={};var n,r;r=b.multiple?a.a.ya(e(),a.i.p):0<=b.selectedIndex?
[a.i.p(b.options[b.selectedIndex])]:[];k&&("undefined"==typeof
k.length&&(k=[k]),n=a.a.la(k,function(b){return l||b===p||null===b||!
a.a.c(b._destroy)}),d.has("optionsCaption")&&(k=a.a.c(d.get("optionsCaption")),null
!==k&&k!==p&&n.unshift(J)));var m=!1;c.beforeRemove=function(a)
{b.removeChild(a)};k=h;d.has("optionsAfterRender")&&(k=function(b,c)
{h(0,c);a.k.t(d.get("optionsAfterRender"),null,[c[0],b!==J?
b:p])});a.a.Ua(b,n,function(c,e,g){g.length&&
(r=g[0].selected?[a.i.p(g[0])]:[],m=!
0);e=b.ownerDocument.createElement("option");c===J?
(a.a.Xa(e,d.get("optionsCaption")),a.i.X(e,p)):
(g=f(c,d.get("optionsValue"),c),a.i.X(e,a.a.c(g)),c=f(c,d.get("optionsText"),g),a.a
.Xa(e,c));return[e]},c,k);a.k.t(function()
{d.get("valueAllowUnset")&&d.has("value")?a.i.X(b,a.a.c(d.get("value")),!0):
(b.multiple?r.length&&e().length<r.length:r.length&&0<=b.selectedIndex?
a.i.p(b.options[b.selectedIndex])!==r[0]:r.length||
0<=b.selectedIndex)&&a.a.ha(b,"change")});a.a.Tb(b);
g&&20<Math.abs(g-
b.scrollTop)&&(b.scrollTop=g)}};a.d.options.Pa=a.a.f.L();a.d.selectedOptions={after
:["options","foreach"],init:function(b,c,d){a.a.q(b,"change",function(){var
e=c(),f=[];a.a.r(b.getElementsByTagName("option"),function(b)
{b.selected&&f.push(a.i.p(b))});a.g.va(e,d,"selectedOptions",f)})},update:function(
b,c){if("select"!=a.a.B(b))throw Error("values binding applies only to SELECT
elements");var d=a.a.c(c());d&&"number"==typeof
d.length&&a.a.r(b.getElementsByTagName("option"),function(b){var c=
0<=a.a.l(d,a.i.p(b));a.a.Db(b,c)})}};a.g.W.selectedOptions=!
0;a.d.style={update:function(b,c){var d=a.a.c(c()||{});a.a.A(d,function(c,d)
{d=a.a.c(d);b.style[c]=d||""})}};a.d.submit={init:function(b,c,d,e,f)
{if("function"!=typeof c())throw Error("The value for a submit binding must be a
function");a.a.q(b,"submit",function(a){var d,e=c();try{d=e.call(f.
$data,b)}finally{!0!==d&&(a.preventDefault?a.preventDefault():a.returnValue=!
1)}})}};a.d.text={init:function(){return{controlsDescendantBindings:!0}},
update:function(b,c){a.a.Xa(b,c())}};a.e.Q.text=!
0;a.d.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ +
+a.d.uniqueName.Ob;a.a.Cb(b,d)}}};a.d.uniqueName.Ob=0;a.d.value={after:
["options","foreach"],init:function(b,c,d){function e(){g=!1;var
e=c(),f=a.i.p(b);a.g.va(e,d,"value",f)}var f=["change"],h=d.get("valueUpdate"),g=!
1;h&&("string"==typeof h&&(h=[h]),a.a.$(f,h),f=a.a.ib(f));!a.a.oa||"input"!
=b.tagName.toLowerCase()||"text"!=b.type||"off"==b.autocomplete||
b.form&&"off"==b.form.autocomplete||
-1!=a.a.l(f,"propertychange")||(a.a.q(b,"propertychange",function(){g=!
0}),a.a.q(b,"focus",function(){g=!1}),a.a.q(b,"blur",function()
{g&&e()}));a.a.r(f,function(c){var d=e;a.a.kc(c,"after")&&(d=function()
{setTimeout(e,0)},c=c.substring(5));a.a.q(b,c,d)})},update:function(b,c,d){var
e=a.a.c(c());c=a.i.p(b);if(e!==c)if("select"===a.a.B(b)){var
f=d.get("valueAllowUnset");d=function(){a.i.X(b,e,f)};d();f||e===a.i.p(b)?
setTimeout(d,0):a.k.t(a.a.ha,null,[b,"change"])}else a.i.X(b,e)}};a.g.W.value=!
0;a.d.visible=
{update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?
b.style.display="":!d&&e&&(b.style.display="none")}};(function(b)
{a.d[b]={init:function(c,d,e,f,h){return a.d.event.init.call(this,c,function(){var
a={};a[b]=d();return a},e,f,h)}}})("click");a.C=function()
{};a.C.prototype.renderTemplateSource=function(){throw Error("Override
renderTemplateSource");};a.C.prototype.createJavaScriptEvaluatorBlock=function()
{throw Error("Override
createJavaScriptEvaluatorBlock");};a.C.prototype.makeTemplateSource=
function(b,c){if("string"==typeof b){c=c||w;var d=c.getElementById(b);if(!d)throw
Error("Cannot find template with ID "+b);return new a.n.j(d)}if(1==b.nodeType||
8==b.nodeType)return new a.n.Z(b);throw Error("Unknown template type:
"+b);};a.C.prototype.renderTemplate=function(a,c,d,e)
{a=this.makeTemplateSource(a,e);return
this.renderTemplateSource(a,c,d)};a.C.prototype.isTemplateRewritten=function(a,c)
{return!1===this.allowTemplateRewriting?!
0:this.makeTemplateSource(a,c).data("isRewritten")};a.C.prototype.rewriteTemplate=
function(a,c,d)
{a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!
0)};a.b("templateEngine",a.C);a.Za=function(){function b(b,c,d,g)
{b=a.g.Ra(b);for(var k=a.g.aa,l=0;l<b.length;l++){var
n=b[l].key;if(k.hasOwnProperty(n)){var r=k[n];if("function"===typeof r)
{if(n=r(b[l].value))throw Error(n);}else if(!r)throw Error("This template engine
does not support the '"+n+"' binding within its
templates");}}d="ko.__tr_ambtns(function($context,$element){return(function()
{return{ "+a.g.qa(b,
{valueAccessors:!0})+" } })()},'"+d.toLowerCase()+"')";return
g.createJavaScriptEvaluatorBlock(d)+c}var c=/(<([a-z]+\d*)(?:\s+(?!data-
bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind\s*=\s*(["'])
([\s\S]*?)\3/gi,d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{Ub:function(b,c,d)
{c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return
a.Za.dc(b,c)},d)},dc:function(a,f){return a.replace(c,function(a,c,d,e,n){return
b(n,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e",
"#comment",f)})},Mb:function(b,c){return a.w.Na(function(d,g){var
k=d.nextSibling;k&&k.nodeName.toLowerCase()===c&&a.xa(k,b,g)})}}}
();a.b("__tr_ambtns",a.Za.Mb);(function(){a.n={};a.n.j=function(a)
{this.j=a};a.n.j.prototype.text=function(){var
b=a.a.B(this.j),b="script"===b?"text":"textarea"===b?"value":"innerHTML";if(0==argu
ments.length)return this.j[b];var c=arguments[0];"innerHTML"===b?
a.a.Va(this.j,c):this.j[b]=c};var b=a.a.f.L()+"_";a.n.j.prototype.data=function(c)
{if(1===arguments.length)return a.a.f.get(this.j,
b+c);a.a.f.set(this.j,b+c,arguments[1])};var c=a.a.f.L();a.n.Z=function(a)
{this.j=a};a.n.Z.prototype=new a.n.j;a.n.Z.prototype.text=function()
{if(0==arguments.length){var b=a.a.f.get(this.j,c)||{};b.$a===p&&b.Ba&&(b.
$a=b.Ba.innerHTML);return b.$a}a.a.f.set(this.j,c,
{$a:arguments[0]})};a.n.j.prototype.nodes=function()
{if(0==arguments.length)return(a.a.f.get(this.j,c)||{}).Ba;a.a.f.set(this.j,c,
{Ba:arguments[0]})};a.b("templateSources",a.n);a.b("templateSources.domElement",a.n
.j);a.b("templateSources.anonymousTemplate",
a.n.Z)})();(function(){function b(b,c,d){var e;for(c=a.e.nextSibling(c);b&&(e=b)!
==c;)b=a.e.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var
e=c[0],f=c[c.length-1],h=e.parentNode,m=a.J.instance,q=m.preprocessNode;if(q)
{b(e,f,function(a,b){var c=a.previousSibling,d=q.call(m,a);d&&(a===e&&(e=d[0]||
b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):
(c.push(e,f),a.a.ea(c,h))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||
a.fb(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==
b.nodeType||a.w.Ib(b,[d])});a.a.ea(c,h)}}function d(a){return a.nodeType?
a:0<a.length?a[0]:null}function e(b,e,h,n,r){r=r||{};var
m=b&&d(b),m=m&&m.ownerDocument,q=r.templateEngine||
f;a.Za.Ub(h,q,m);h=q.renderTemplate(h,n,r,m);if("number"!=typeof h.length||
0<h.length&&"number"!=typeof h[0].nodeType)throw Error("Template engine must return
an array of DOM nodes");m=!1;switch(e){case "replaceChildren":a.e.U(b,h);m=!
0;break;case "replaceNode":a.a.Bb(b,h);m=!0;break;case
"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+
e);}m&&(c(h,n),r.afterRender&&a.k.t(r.afterRender,null,[h,n.$data]));return h}var
f;a.Wa=function(b){if(b!=p&&!(b instanceof a.C))throw Error("templateEngine must
inherit from ko.templateEngine");f=b};a.Ta=function(b,c,h,n,r){h=h||
{};if((h.templateEngine||f)==p)throw Error("Set a template engine before calling
renderTemplate");r=r||"replaceChildren";if(n){var m=d(n);return a.h(function(){var
f=c&&c instanceof a.I?c:new a.I(a.a.c(c)),p=a.v(b)?b():"function"==typeof b?b(f.
$data,f):b,f=e(n,r,p,f,h);
"replaceNode"==r&&(n=f,m=d(n))},null,{Da:function(){return!m||!
a.a.Ea(m)},G:m&&"replaceNode"==r?m.parentNode:m})}return a.w.Na(function(d)
{a.Ta(b,c,h,d,"replaceNode")})};a.jc=function(b,d,f,h,r){function m(a,b)
{c(b,s);f.afterRender&&f.afterRender(b,a)}function q(a,c)
{s=r.createChildContext(a,f.as,function(a){a.$index=c});var d="function"==typeof b?
b(a,s):b;return e(null,"ignoreTargetNode",d,s,f)}var s;return a.h(function(){var
b=a.a.c(d)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.la(b,function(b){return
f.includeDestroyed||
b===p||null===b||!a.a.c(b._destroy)});a.k.t(a.a.Ua,null,[h,b,q,f,m])},null,
{G:h})};var h=a.a.f.L();a.d.template={init:function(b,c){var
d=a.a.c(c());"string"==typeof d||d.name?a.e.da(b):(d=a.e.childNodes(b),d=a.a.ec(d),
(new a.n.Z(b)).nodes(d));return{controlsDescendantBindings:!
0}},update:function(b,c,d,e,f){var m=c(),q;c=a.a.c(m);d=!0;e=null;"string"==typeof
c?c={}:(m=c.name,"if"in c&&(d=a.a.c(c["if"])),d&&"ifnot"in c&&(d=!
a.a.c(c.ifnot)),q=a.a.c(c.data));"foreach"in c?e=a.jc(m||b,d&&c.foreach||
[],c,b,f):d?(f="data"in c?f.createChildContext(q,c.as):f,e=a.Ta(m||
b,f,c,b)):a.e.da(b);f=e;(q=a.a.f.get(b,h))&&"function"==typeof
q.F&&q.F();a.a.f.set(b,h,f&&f.ga()?f:p)}};a.g.aa.template=function(b)
{b=a.g.Ra(b);return 1==b.length&&b[0].unknown||a.g.bc(b,"name")?null:"This template
engine does not support anonymous templates nested within its
templates"};a.e.Q.template=!0})
();a.b("setTemplateEngine",a.Wa);a.b("renderTemplate",a.Ta);a.a.nb=function(a,c,d)
{if(a.length&&c.length){var e,f,h,g,k;for(e=
f=0;(!d||e<d)&&(g=a[f]);++f){for(h=0;k=c[h];++h)if(g.value===k.value)
{g.moved=k.index;k.moved=g.index;c.splice(h,1);e=h=0;break}e+=h}}};a.a.Aa=function(
){function b(b,d,e,f,h){var
g=Math.min,k=Math.max,l=[],n,p=b.length,m,q=d.length,s=q-p||
1,t=p+q+1,u,w,y;for(n=0;n<=p;n++)for(w=u,l.push(u=[]),y=g(q,n+s),m=k(0,n-1);m<=y;m+
+)u[m]=m?n?b[n-1]===d[m-1]?w[m-1]:g(w[m]||t,u[m-1]||t)
+1:m+1:n+1;g=[];k=[];s=[];n=p;for(m=q;n||m;)q=l[n][m]-1,m&&q===l[n][m-1]?
k.push(g[g.length]={status:e,value:d[--m],index:m}):
n&&q===l[n-1][m]?s.push(g[g.length]={status:f,value:b[--n],index:n}):(--m,--
n,h.sparse||g.push({status:"retained",value:d[m]}));a.a.nb(k,s,10*p);return
g.reverse()}return function(a,d,e){e="boolean"===typeof e?{dontLimitMoves:e}:e||
{};a=a||[];d=d||[];return a.length<=d.length?
b(a,d,"added","deleted",e):b(d,a,"deleted","added",e)}}
();a.b("utils.compareArrays",a.a.Aa);(function(){function b(b,c,f,h,g){var
k=[],l=a.h(function(){var l=c(f,g,a.a.ea(k,b))||
[];0<k.length&&(a.a.Bb(k,l),h&&a.k.t(h,null,[f,
l,g]));k.length=0;a.a.$(k,l)},null,{G:b,Da:function(){return!
a.a.eb(k)}});return{S:k,h:l.ga()?l:p}}var c=a.a.f.L();a.a.Ua=function(d,e,f,h,g)
{function k(b,c){v=r[c];u!==c&&(z[b]=v);v.Ia(u+
+);a.a.ea(v.S,d);s.push(v);y.push(v)}function l(b,c){if(b)for(var
d=0,e=c.length;d<e;d++)c[d]&&a.a.r(c[d].S,function(a){b(a,d,c[d].ka)})}e=e||
[];h=h||{};var n=a.a.f.get(d,c)===p,r=a.a.f.get(d,c)||[],m=a.a.ya(r,function(a)
{return a.ka}),q=a.a.Aa(m,e,h.dontLimitMoves),s=[],t=0,u=0,w=[],y=[];e=[];for(var
z=[],m=[],
v,x=0,A,C;A=q[x];x++)switch(C=A.moved,A.status){case
"deleted":C===p&&(v=r[t],v.h&&v.h.F(),w.push.apply(w,a.a.ea(v.S,d)),h.beforeRemove&
&(e[x]=v,y.push(v)));t++;break;case "retained":k(x,t++);break;case "added":C!==p?
k(x,C):(v={ka:A.value,Ia:a.m(u++)},s.push(v),y.push(v),n||
(m[x]=v))}l(h.beforeMove,z);a.a.r(w,h.beforeRemove?a.M:a.removeNode);for(var
x=0,n=a.e.firstChild(d),E;v=y[x];x++){v.S||
a.a.extend(v,b(d,f,v.ka,g,v.Ia));for(t=0;q=v.S[t];n=q.nextSibling,E=q,t++)q!
==n&&a.e.rb(d,q,E);!v.Zb&&g&&(g(v.ka,
v.S,v.Ia),v.Zb=!
0)}l(h.beforeRemove,e);l(h.afterMove,z);l(h.afterAdd,m);a.a.f.set(d,c,s)}})
();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Ua);a.K=function()
{this.allowTemplateRewriting=!1};a.K.prototype=new
a.C;a.K.prototype.renderTemplateSource=function(b){var c=(9>a.a.oa?0:b.nodes)?
b.nodes():null;if(c)return a.a.R(c.cloneNode(!0).childNodes);b=b.text();return
a.a.Qa(b)};a.K.Ja=new a.K;a.Wa(a.K.Ja);a.b("nativeTemplateEngine",a.K);(function()
{a.La=function(){var a=this.ac=function(){if(!t||
!t.tmpl)return 0;try{if(0<=t.tmpl.tag.tmpl.open.toString().indexOf("__"))return
2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f){f=f||
{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to
jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||
(h=b.text()||"",h=t.template(null,"{{ko_with
$item.koBindingContext}}"+h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.
$data];e=t.extend({koBindingContext:e},f.templateOptions);e=t.tmpl(h,b,e);e.appendT
o(w.createElement("div"));
t.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a)
{return"{{ko_code ((function() { return "+a+" })
()) }}"};this.addTemplate=function(a,b){w.write("<script type='text/html'
id='"+a+"'>"+b+"\x3c/script>")};0<a&&(t.tmpl.tag.ko_code={open:"__.push($1 ||
'');"},t.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};a.La.prototype=new
a.C;var b=new a.La;0<b.ac&&a.Wa(b);a.b("jqueryTmplTemplateEngine",a.La)})()})})
();})();
;

You might also like