/* Minification failed. Returning unminified contents.
(23288,44-45): run-time warning JS1195: Expected expression: >
(23292,18-19): run-time warning JS1195: Expected expression: ,
(23293,36-37): run-time warning JS1193: Expected ',' or ')': :
(23293,55-56): run-time warning JS1195: Expected expression: >
(23311,33-34): run-time warning JS1004: Expected ';': P
(23334,18-19): run-time warning JS1195: Expected expression: ,
(23335,35-36): run-time warning JS1195: Expected expression: >
(23337,17-18): run-time warning JS1002: Syntax error: }
(23341,43-44): run-time warning JS1004: Expected ';': :
(23343,29-30): run-time warning JS1004: Expected ';': :
(23346,37-38): run-time warning JS1004: Expected ';': :
(23352,37-38): run-time warning JS1004: Expected ';': :
(23353,26-27): run-time warning JS1195: Expected expression: ,
(23358,25-26): run-time warning JS1002: Syntax error: }
(23363,27-28): run-time warning JS1197: Too many errors. The file might not be a JavaScript file: )
 */
/*!
 * jQuery JavaScript Library v2.1.1
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2014-05-01T17:11Z
 */

(function( global, factory ) {

	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 inherently posses a window with a document
		// (such as Node.js), expose a jQuery-making 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 ) {

// Can't do this because several apps including ASP.NET trace
// the stack via arguments.caller.callee and Firefox dies if
// you try to trace through "use strict" call chains. (#13335)
// Support: Firefox 18+
//

var arr = [];

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 support = {};



var
	// Use the correct document accordingly with window argument (sandbox)
	document = window.document,

	version = "2.1.1",

	// 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.1
	// Make sure we trim BOM and NBSP
	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,

	// Matches dashed string for camelizing
	rmsPrefix = /^-ms-/,
	rdashAlpha = /-([\da-z])/gi,

	// 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,

	// Start with an empty selector
	selector: "",

	// 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;
		ret.context = this.context;

		// Return the newly-formed element set
		return ret;
	},

	// Execute a callback for every element in the matched set.
	// (You can seed the arguments with an array of args, but this is
	// only used internally.)
	each: function( callback, args ) {
		return jQuery.each( this, callback, args );
	},

	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(null);
	},

	// 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() {},

	// See test/unit/core.js for details concerning isFunction.
	// Since version 1.3, DOM methods and functions like alert
	// aren't supported. They return false on IE (#2968).
	isFunction: function( obj ) {
		return jQuery.type(obj) === "function";
	},

	isArray: Array.isArray,

	isWindow: function( obj ) {
		return obj != null && obj === obj.window;
	},

	isNumeric: function( obj ) {
		// parseFloat NaNs numeric-cast false positives (null|true|false|"")
		// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
		// subtraction forces infinities to NaN
		return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
	},

	isPlainObject: function( obj ) {
		// Not plain objects:
		// - Any object or value whose internal [[Class]] property is not "[object Object]"
		// - DOM nodes
		// - window
		if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
			return false;
		}

		if ( obj.constructor &&
				!hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
			return false;
		}

		// If the function hasn't returned already, we're confident that
		// |obj| is a plain object, created by {} or constructed with new Object
		return true;
	},

	isEmptyObject: function( obj ) {
		var name;
		for ( name in obj ) {
			return false;
		}
		return true;
	},

	type: function( obj ) {
		if ( obj == null ) {
			return obj + "";
		}
		// Support: Android < 4.0, iOS < 6 (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 ) {
		var script,
			indirect = eval;

		code = jQuery.trim( code );

		if ( code ) {
			// If the code includes a valid, prologue position
			// strict mode pragma, execute code by injecting a
			// script tag into the document.
			if ( code.indexOf("use strict") === 1 ) {
				script = document.createElement("script");
				script.text = code;
				document.head.appendChild( script ).parentNode.removeChild( script );
			} else {
			// Otherwise, avoid the DOM node creation, insertion
			// and removal by using an indirect global eval
				indirect( code );
			}
		}
	},

	// Convert dashed to camelCase; used by the css and data modules
	// 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();
	},

	// args is for internal usage only
	each: function( obj, callback, args ) {
		var value,
			i = 0,
			length = obj.length,
			isArray = isArraylike( obj );

		if ( args ) {
			if ( isArray ) {
				for ( ; i < length; i++ ) {
					value = callback.apply( obj[ i ], args );

					if ( value === false ) {
						break;
					}
				}
			} else {
				for ( i in obj ) {
					value = callback.apply( obj[ i ], args );

					if ( value === false ) {
						break;
					}
				}
			}

		// A special, fast, case for the most common use of each
		} else {
			if ( isArray ) {
				for ( ; i < length; i++ ) {
					value = callback.call( obj[ i ], i, obj[ i ] );

					if ( value === false ) {
						break;
					}
				}
			} else {
				for ( i in obj ) {
					value = callback.call( obj[ i ], i, obj[ i ] );

					if ( value === false ) {
						break;
					}
				}
			}
		}

		return obj;
	},

	// Support: Android<4.1
	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 );
	},

	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 value,
			i = 0,
			length = elems.length,
			isArray = isArraylike( elems ),
			ret = [];

		// Go through the array, translating each of the items to their new values
		if ( isArray ) {
			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
});

// Populate the class2type map
jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
	class2type[ "[object " + name + "]" ] = name.toLowerCase();
});

function isArraylike( obj ) {
	var length = obj.length,
		type = jQuery.type( obj );

	if ( type === "function" || jQuery.isWindow( obj ) ) {
		return false;
	}

	if ( obj.nodeType === 1 && length ) {
		return true;
	}

	return type === "array" || length === 0 ||
		typeof length === "number" && length > 0 && ( length - 1 ) in obj;
}
var Sizzle =
/*!
 * Sizzle CSS Selector Engine v1.10.19
 * http://sizzlejs.com/
 *
 * Copyright 2013 jQuery Foundation, Inc. and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2014-04-18
 */
(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" + -(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;
	},

	// General-purpose constants
	strundefined = typeof undefined,
	MAX_NEGATIVE = 1 << 31,

	// Instance methods
	hasOwn = ({}).hasOwnProperty,
	arr = [],
	pop = arr.pop,
	push_native = arr.push,
	push = arr.push,
	slice = arr.slice,
	// Use a stripped-down indexOf if we can't use a native one
	indexOf = arr.indexOf || function( elem ) {
		var i = 0,
			len = this.length;
		for ( ; i < len; i++ ) {
			if ( this[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

	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
	whitespace = "[\\x20\\t\\r\\n\\f]",
	// http://www.w3.org/TR/css3-syntax/#characters
	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",

	// Loosely modeled on CSS identifier characters
	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
	identifier = characterEncoding.replace( "w", "w#" ),

	// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
		// Operator (capture 2)
		"*([*^$|!~]?=)" + whitespace +
		// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
		"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
		"*\\]",

	pseudos = ":(" + characterEncoding + ")(?:\\((" +
		// 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
	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( "^#(" + characterEncoding + ")" ),
		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
		"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 = /[+~]/,
	rescape = /'|\\/g,

	// 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 );
	};

// 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 match, elem, m, nodeType,
		// QSA vars
		i, groups, old, nid, newContext, newSelector;

	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
		setDocument( context );
	}

	context = context || document;
	results = results || [];

	if ( !selector || typeof selector !== "string" ) {
		return results;
	}

	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
		return [];
	}

	if ( documentIsHTML && !seed ) {

		// Shortcuts
		if ( (match = rquickExpr.exec( selector )) ) {
			// Speed-up: Sizzle("#ID")
			if ( (m = match[1]) ) {
				if ( nodeType === 9 ) {
					elem = context.getElementById( m );
					// Check parentNode to catch when Blackberry 4.6 returns
					// nodes that are no longer in the document (jQuery #6963)
					if ( elem && elem.parentNode ) {
						// Handle the case where IE, Opera, and Webkit return items
						// by name instead of ID
						if ( elem.id === m ) {
							results.push( elem );
							return results;
						}
					} else {
						return results;
					}
				} else {
					// Context is not a document
					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
						contains( context, elem ) && elem.id === m ) {
						results.push( elem );
						return results;
					}
				}

			// Speed-up: Sizzle("TAG")
			} else if ( match[2] ) {
				push.apply( results, context.getElementsByTagName( selector ) );
				return results;

			// Speed-up: Sizzle(".CLASS")
			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
				push.apply( results, context.getElementsByClassName( m ) );
				return results;
			}
		}

		// QSA path
		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
			nid = old = expando;
			newContext = context;
			newSelector = nodeType === 9 && selector;

			// qSA works strangely on Element-rooted queries
			// We can work around this by specifying an extra ID on the root
			// and working up from there (Thanks to Andrew Dupont for the technique)
			// IE 8 doesn't work on object elements
			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
				groups = tokenize( selector );

				if ( (old = context.getAttribute("id")) ) {
					nid = old.replace( rescape, "\\$&" );
				} else {
					context.setAttribute( "id", nid );
				}
				nid = "[id='" + nid + "'] ";

				i = groups.length;
				while ( i-- ) {
					groups[i] = nid + toSelector( groups[i] );
				}
				newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
				newSelector = groups.join(",");
			}

			if ( newSelector ) {
				try {
					push.apply( results,
						newContext.querySelectorAll( newSelector )
					);
					return results;
				} catch(qsaError) {
				} finally {
					if ( !old ) {
						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 div and expects a boolean result
 */
function assert( fn ) {
	var div = document.createElement("div");

	try {
		return !!fn( div );
	} catch (e) {
		return false;
	} finally {
		// Remove from its parent by default
		if ( div.parentNode ) {
			div.parentNode.removeChild( div );
		}
		// release memory in IE
		div = 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 = attrs.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 &&
			( ~b.sourceIndex || MAX_NEGATIVE ) -
			( ~a.sourceIndex || MAX_NEGATIVE );

	// 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 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 !== strundefined && 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,
		doc = node ? node.ownerDocument || node : preferredDoc,
		parent = doc.defaultView;

	// If no document and documentElement is available, return
	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
		return document;
	}

	// Set our document
	document = doc;
	docElem = doc.documentElement;

	// Support tests
	documentIsHTML = !isXML( doc );

	// Support: IE>8
	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
	// IE6-8 do not support the defaultView property so parent will be undefined
	if ( parent && parent !== parent.top ) {
		// IE11 does not have attachEvent, so all must suffer
		if ( parent.addEventListener ) {
			parent.addEventListener( "unload", function() {
				setDocument();
			}, false );
		} else if ( parent.attachEvent ) {
			parent.attachEvent( "onunload", function() {
				setDocument();
			});
		}
	}

	/* Attributes
	---------------------------------------------------------------------- */

	// Support: IE<8
	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
	support.attributes = assert(function( div ) {
		div.className = "i";
		return !div.getAttribute("className");
	});

	/* getElement(s)By*
	---------------------------------------------------------------------- */

	// Check if getElementsByTagName("*") returns only elements
	support.getElementsByTagName = assert(function( div ) {
		div.appendChild( doc.createComment("") );
		return !div.getElementsByTagName("*").length;
	});

	// Check if getElementsByClassName can be trusted
	support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
		div.innerHTML = "<div class='a'></div><div class='a i'></div>";

		// Support: Safari<4
		// Catch class over-caching
		div.firstChild.className = "i";
		// Support: Opera<10
		// Catch gEBCN failure to find non-leading classes
		return div.getElementsByClassName("i").length === 2;
	});

	// Support: IE<10
	// Check if getElementById returns elements by name
	// The broken getElementById methods don't pick up programatically-set names,
	// so use a roundabout getElementsByName test
	support.getById = assert(function( div ) {
		docElem.appendChild( div ).id = expando;
		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
	});

	// ID find and filter
	if ( support.getById ) {
		Expr.find["ID"] = function( id, context ) {
			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
				var m = context.getElementById( id );
				// Check parentNode to catch when Blackberry 4.6 returns
				// nodes that are no longer in the document #6963
				return m && m.parentNode ? [ 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 !== strundefined && elem.getAttributeNode("id");
				return node && node.value === attrId;
			};
		};
	}

	// Tag
	Expr.find["TAG"] = support.getElementsByTagName ?
		function( tag, context ) {
			if ( typeof context.getElementsByTagName !== strundefined ) {
				return context.getElementsByTagName( tag );
			}
		} :
		function( tag, context ) {
			var elem,
				tmp = [],
				i = 0,
				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 !== strundefined && 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 http://bugs.jquery.com/ticket/13378
	rbuggyQSA = [];

	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
		// Build QSA regex
		// Regex strategy adopted from Diego Perini
		assert(function( div ) {
			// 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
			// http://bugs.jquery.com/ticket/12359
			div.innerHTML = "<select msallowclip=''><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
			// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
			if ( div.querySelectorAll("[msallowclip^='']").length ) {
				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
			}

			// Support: IE8
			// Boolean attributes and "value" are not treated correctly
			if ( !div.querySelectorAll("[selected]").length ) {
				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
			}

			// 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 ( !div.querySelectorAll(":checked").length ) {
				rbuggyQSA.push(":checked");
			}
		});

		assert(function( div ) {
			// Support: Windows 8 Native Apps
			// The type and name attributes are restricted during .innerHTML assignment
			var input = doc.createElement("input");
			input.setAttribute( "type", "hidden" );
			div.appendChild( input ).setAttribute( "name", "D" );

			// Support: IE8
			// Enforce case-sensitivity of name attribute
			if ( div.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 ( !div.querySelectorAll(":enabled").length ) {
				rbuggyQSA.push( ":enabled", ":disabled" );
			}

			// Opera 10-11 does not throw on post-comma invalid pseudos
			div.querySelectorAll("*,:x");
			rbuggyQSA.push(",.*:");
		});
	}

	if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
		docElem.webkitMatchesSelector ||
		docElem.mozMatchesSelector ||
		docElem.oMatchesSelector ||
		docElem.msMatchesSelector) )) ) {

		assert(function( div ) {
			// Check to see if it's possible to do matchesSelector
			// on a disconnected node (IE 9)
			support.disconnectedMatch = matches.call( div, "div" );

			// This should fail with an exception
			// Gecko does not error, returns false instead
			matches.call( div, "[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 does not implement inclusive descendent
	// 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 === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
				return -1;
			}
			if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
				return 1;
			}

			// Maintain original order
			return sortInput ?
				( indexOf.call( sortInput, a ) - indexOf.call( 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 === doc ? -1 :
				b === doc ? 1 :
				aup ? -1 :
				bup ? 1 :
				sortInput ?
				( indexOf.call( sortInput, a ) - indexOf.call( 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 doc;
};

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 &&
		( !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.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 !== strundefined && 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 + " " ).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, outerCache, node, diff, nodeIndex, start,
						dir = simple !== forward ? "nextSibling" : "previousSibling",
						parent = elem.parentNode,
						name = ofType && elem.nodeName.toLowerCase(),
						useCache = !xml && !ofType;

					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
							outerCache = parent[ expando ] || (parent[ expando ] = {});
							cache = outerCache[ type ] || [];
							nodeIndex = cache[0] === dirruns && cache[1];
							diff = cache[0] === dirruns && 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 ) {
									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
									break;
								}
							}

						// Use previously-cached element index if available
						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
							diff = cache[1];

						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
						} else {
							// 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 ) {
										(node[ expando ] || (node[ expando ] = {}))[ 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.call( 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 );
					return !results.pop();
				};
		}),

		"has": markFunction(function( selector ) {
			return function( elem ) {
				return Sizzle( selector, elem ).length > 0;
			};
		}),

		"contains": markFunction(function( text ) {
			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": function( elem ) {
			return elem.disabled === false;
		},

		"disabled": function( elem ) {
			return elem.disabled === 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,
		checkNonElements = base && dir === "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, outerCache,
				newCache = [ dirruns, doneName ];

			// We can't set arbitrary data on XML nodes, so they don't benefit from dir 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 ] = {});
						if ( (oldCache = outerCache[ dir ]) &&
							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
							outerCache[ dir ] = 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.call( 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.call( checkContext, elem ) > -1;
		}, implicitRelative, true ),
		matchers = [ function( elem, context, xml ) {
			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
				(checkContext = context).nodeType ?
					matchContext( elem, context, xml ) :
					matchAnyContext( elem, context, xml ) );
		} ];

	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;
			}

			// Add elements passing elementMatchers directly to results
			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
			// 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;
					while ( (matcher = elementMatchers[j++]) ) {
						if ( matcher( elem, context, 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 );
					}
				}
			}

			// Apply set filters to unmatched elements
			matchedCount += i;
			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 no seed and only one group
	if ( match.length === 1 ) {

		// Take a shortcut and set the context if the root 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,
		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
// 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( div1 ) {
	// Should return 1, but returns 4 (following)
	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
});

// Support: IE<8
// Prevent attribute/property "interpolation"
// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
if ( !assert(function( div ) {
	div.innerHTML = "<a href='#'></a>";
	return div.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( div ) {
	div.innerHTML = "<input/>";
	div.firstChild.setAttribute( "value", "" );
	return div.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( div ) {
	return div.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;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = Sizzle.uniqueSort;
jQuery.text = Sizzle.getText;
jQuery.isXMLDoc = Sizzle.isXML;
jQuery.contains = Sizzle.contains;



var rneedsContext = jQuery.expr.match.needsContext;

var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);



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 ) >= 0 ) !== not;
	});
}

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,
			len = this.length,
			ret = [],
			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;
					}
				}
			}) );
		}

		for ( i = 0; i < len; i++ ) {
			jQuery.find( selector, self[ i ], ret );
		}

		// Needed because $( selector, context ) becomes $( context ).find( selector )
		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
		ret.selector = this.selector ? this.selector + " " + selector : selector;
		return 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 <)
	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,

	init = jQuery.fn.init = function( selector, context ) {
		var match, elem;

		// HANDLE: $(""), $(null), $(undefined), $(false)
		if ( !selector ) {
			return this;
		}

		// 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;

					// 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] );

					// Check parentNode to catch when Blackberry 4.6 returns
					// nodes that are no longer in the document #6963
					if ( elem && elem.parentNode ) {
						// Inject the element directly into the jQuery object
						this.length = 1;
						this[0] = elem;
					}

					this.context = document;
					this.selector = selector;
					return this;
				}

			// HANDLE: $(expr, $(...))
			} else if ( !context || context.jquery ) {
				return ( context || rootjQuery ).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.context = this[0] = selector;
			this.length = 1;
			return this;

		// HANDLE: $(function)
		// Shortcut for document ready
		} else if ( jQuery.isFunction( selector ) ) {
			return typeof rootjQuery.ready !== "undefined" ?
				rootjQuery.ready( selector ) :
				// Execute immediately if ready is not present
				selector( jQuery );
		}

		if ( selector.selector !== undefined ) {
			this.selector = selector.selector;
			this.context = selector.context;
		}

		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.extend({
	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;
	},

	sibling: function( n, elem ) {
		var matched = [];

		for ( ; n; n = n.nextSibling ) {
			if ( n.nodeType === 1 && n !== elem ) {
				matched.push( n );
			}
		}

		return matched;
	}
});

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 = [],
			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
				jQuery( selectors, context || this.context ) :
				0;

		for ( ; i < l; i++ ) {
			for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
				// Always skip document fragments
				if ( cur.nodeType < 11 && (pos ?
					pos.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.unique( matched ) : matched );
	},

	// Determine the position of an element within
	// the matched set of elements
	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.unique(
				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 jQuery.dir( elem, "parentNode" );
	},
	parentsUntil: function( elem, i, until ) {
		return jQuery.dir( elem, "parentNode", until );
	},
	next: function( elem ) {
		return sibling( elem, "nextSibling" );
	},
	prev: function( elem ) {
		return sibling( elem, "previousSibling" );
	},
	nextAll: function( elem ) {
		return jQuery.dir( elem, "nextSibling" );
	},
	prevAll: function( elem ) {
		return jQuery.dir( elem, "previousSibling" );
	},
	nextUntil: function( elem, i, until ) {
		return jQuery.dir( elem, "nextSibling", until );
	},
	prevUntil: function( elem, i, until ) {
		return jQuery.dir( elem, "previousSibling", until );
	},
	siblings: function( elem ) {
		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
	},
	children: function( elem ) {
		return jQuery.sibling( 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.unique( matched );
			}

			// Reverse order for parents* and prev-derivatives
			if ( rparentsprev.test( name ) ) {
				matched.reverse();
			}
		}

		return this.pushStack( matched );
	};
});
var rnotwhite = (/\S+/g);



// String to Object options format cache
var optionsCache = {};

// Convert String-formatted options into Object-formatted ones and store in cache
function createOptions( options ) {
	var object = optionsCache[ options ] = {};
	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" ?
		( optionsCache[ options ] || createOptions( options ) ) :
		jQuery.extend( {}, options );

	var // Last fire value (for non-forgettable lists)
		memory,
		// Flag to know if list was already fired
		fired,
		// Flag to know if list is currently firing
		firing,
		// First callback to fire (used internally by add and fireWith)
		firingStart,
		// End of the loop when firing
		firingLength,
		// Index of currently firing callback (modified by remove if needed)
		firingIndex,
		// Actual callback list
		list = [],
		// Stack of fire calls for repeatable lists
		stack = !options.once && [],
		// Fire callbacks
		fire = function( data ) {
			memory = options.memory && data;
			fired = true;
			firingIndex = firingStart || 0;
			firingStart = 0;
			firingLength = list.length;
			firing = true;
			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
					memory = false; // To prevent further calls using add
					break;
				}
			}
			firing = false;
			if ( list ) {
				if ( stack ) {
					if ( stack.length ) {
						fire( stack.shift() );
					}
				} else if ( memory ) {
					list = [];
				} else {
					self.disable();
				}
			}
		},
		// Actual Callbacks object
		self = {
			// Add a callback or a collection of callbacks to the list
			add: function() {
				if ( list ) {
					// First, we save the current length
					var start = list.length;
					(function add( args ) {
						jQuery.each( args, function( _, arg ) {
							var type = jQuery.type( arg );
							if ( type === "function" ) {
								if ( !options.unique || !self.has( arg ) ) {
									list.push( arg );
								}
							} else if ( arg && arg.length && type !== "string" ) {
								// Inspect recursively
								add( arg );
							}
						});
					})( arguments );
					// Do we need to add the callbacks to the
					// current firing batch?
					if ( firing ) {
						firingLength = list.length;
					// With memory, if we're not firing then
					// we should call right away
					} else if ( memory ) {
						firingStart = start;
						fire( memory );
					}
				}
				return this;
			},
			// Remove a callback from the list
			remove: function() {
				if ( list ) {
					jQuery.each( arguments, function( _, arg ) {
						var index;
						while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
							list.splice( index, 1 );
							// Handle firing indexes
							if ( firing ) {
								if ( index <= firingLength ) {
									firingLength--;
								}
								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 && list.length );
			},
			// Remove all callbacks from the list
			empty: function() {
				list = [];
				firingLength = 0;
				return this;
			},
			// Have the list do nothing anymore
			disable: function() {
				list = stack = memory = undefined;
				return this;
			},
			// Is it disabled?
			disabled: function() {
				return !list;
			},
			// Lock the list in its current state
			lock: function() {
				stack = undefined;
				if ( !memory ) {
					self.disable();
				}
				return this;
			},
			// Is it locked?
			locked: function() {
				return !stack;
			},
			// Call all callbacks with the given context and arguments
			fireWith: function( context, args ) {
				if ( list && ( !fired || stack ) ) {
					args = args || [];
					args = [ context, args.slice ? args.slice() : args ];
					if ( firing ) {
						stack.push( args );
					} else {
						fire( args );
					}
				}
				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;
};


jQuery.extend({

	Deferred: function( func ) {
		var tuples = [
				// action, add listener, listener list, final state
				[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
				[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
				[ "notify", "progress", jQuery.Callbacks("memory") ]
			],
			state = "pending",
			promise = {
				state: function() {
					return state;
				},
				always: function() {
					deferred.done( arguments ).fail( arguments );
					return this;
				},
				then: function( /* fnDone, fnFail, fnProgress */ ) {
					var fns = arguments;
					return jQuery.Deferred(function( newDefer ) {
						jQuery.each( tuples, function( i, tuple ) {
							var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
							// deferred[ done | fail | progress ] for forwarding actions to newDefer
							deferred[ tuple[1] ](function() {
								var returned = fn && fn.apply( this, arguments );
								if ( returned && jQuery.isFunction( returned.promise ) ) {
									returned.promise()
										.done( newDefer.resolve )
										.fail( newDefer.reject )
										.progress( newDefer.notify );
								} else {
									newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
								}
							});
						});
						fns = null;
					}).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 = {};

		// Keep pipe for back-compat
		promise.pipe = promise.then;

		// Add list-specific methods
		jQuery.each( tuples, function( i, tuple ) {
			var list = tuple[ 2 ],
				stateString = tuple[ 3 ];

			// promise[ done | fail | progress ] = list.add
			promise[ tuple[1] ] = list.add;

			// Handle state
			if ( stateString ) {
				list.add(function() {
					// state = [ resolved | rejected ]
					state = stateString;

				// [ reject_list | resolve_list ].disable; progress_list.lock
				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
			}

			// deferred[ resolve | reject | notify ]
			deferred[ tuple[0] ] = function() {
				deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
				return this;
			};
			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( subordinate /* , ..., subordinateN */ ) {
		var i = 0,
			resolveValues = slice.call( arguments ),
			length = resolveValues.length,

			// the count of uncompleted subordinates
			remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,

			// the master Deferred. If resolveValues consist of only a single Deferred, just use that.
			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),

			// Update function for both resolve and progress values
			updateFunc = function( i, contexts, values ) {
				return function( value ) {
					contexts[ i ] = this;
					values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
					if ( values === progressValues ) {
						deferred.notifyWith( contexts, values );
					} else if ( !( --remaining ) ) {
						deferred.resolveWith( contexts, values );
					}
				};
			},

			progressValues, progressContexts, resolveContexts;

		// add listeners to Deferred subordinates; treat others as resolved
		if ( length > 1 ) {
			progressValues = new Array( length );
			progressContexts = new Array( length );
			resolveContexts = new Array( length );
			for ( ; i < length; i++ ) {
				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
					resolveValues[ i ].promise()
						.done( updateFunc( i, resolveContexts, resolveValues ) )
						.fail( deferred.reject )
						.progress( updateFunc( i, progressContexts, progressValues ) );
				} else {
					--remaining;
				}
			}
		}

		// if we're not waiting on anything, resolve the master
		if ( !remaining ) {
			deferred.resolveWith( resolveContexts, resolveValues );
		}

		return deferred.promise();
	}
});


// The deferred used on DOM ready
var readyList;

jQuery.fn.ready = function( fn ) {
	// Add the callback
	jQuery.ready.promise().done( 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 ] );

		// Trigger any bound ready events
		if ( jQuery.fn.triggerHandler ) {
			jQuery( document ).triggerHandler( "ready" );
			jQuery( document ).off( "ready" );
		}
	}
});

/**
 * The ready event handler and self cleanup method
 */
function completed() {
	document.removeEventListener( "DOMContentLoaded", completed, false );
	window.removeEventListener( "load", completed, false );
	jQuery.ready();
}

jQuery.ready.promise = function( obj ) {
	if ( !readyList ) {

		readyList = jQuery.Deferred();

		// Catch cases where $(document).ready() is called after the browser event has already occurred.
		// we once tried to use readyState "interactive" here, but it caused issues like the one
		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
		if ( document.readyState === "complete" ) {
			// Handle it asynchronously to allow scripts the opportunity to delay ready
			setTimeout( jQuery.ready );

		} else {

			// Use the handy event callback
			document.addEventListener( "DOMContentLoaded", completed, false );

			// A fallback to window.onload, that will always work
			window.addEventListener( "load", completed, false );
		}
	}
	return readyList.promise( obj );
};

// Kick off the DOM ready check even if the user does not
jQuery.ready.promise();




// Multifunctional method to get and set values of a collection
// The value/s can optionally be executed if it's a function
var access = jQuery.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 ) {
			jQuery.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;
};


/**
 * Determines whether an object can have data
 */
jQuery.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() {
	// Support: Android < 4,
	// Old WebKit does not have Object.preventExtensions/freeze method,
	// return new empty object instead with no [[set]] accessor
	Object.defineProperty( this.cache = {}, 0, {
		get: function() {
			return {};
		}
	});

	this.expando = jQuery.expando + Math.random();
}

Data.uid = 1;
Data.accepts = jQuery.acceptData;

Data.prototype = {
	key: function( owner ) {
		// We can accept data for non-element nodes in modern browsers,
		// but we should not, see #8335.
		// Always return the key for a frozen object.
		if ( !Data.accepts( owner ) ) {
			return 0;
		}

		var descriptor = {},
			// Check if the owner object already has a cache key
			unlock = owner[ this.expando ];

		// If not, create one
		if ( !unlock ) {
			unlock = Data.uid++;

			// Secure it in a non-enumerable, non-writable property
			try {
				descriptor[ this.expando ] = { value: unlock };
				Object.defineProperties( owner, descriptor );

			// Support: Android < 4
			// Fallback to a less secure definition
			} catch ( e ) {
				descriptor[ this.expando ] = unlock;
				jQuery.extend( owner, descriptor );
			}
		}

		// Ensure the cache object
		if ( !this.cache[ unlock ] ) {
			this.cache[ unlock ] = {};
		}

		return unlock;
	},
	set: function( owner, data, value ) {
		var prop,
			// There may be an unlock assigned to this node,
			// if there is no entry for this "owner", create one inline
			// and set the unlock as though an owner entry had always existed
			unlock = this.key( owner ),
			cache = this.cache[ unlock ];

		// Handle: [ owner, key, value ] args
		if ( typeof data === "string" ) {
			cache[ data ] = value;

		// Handle: [ owner, { properties } ] args
		} else {
			// Fresh assignments by object are shallow copied
			if ( jQuery.isEmptyObject( cache ) ) {
				jQuery.extend( this.cache[ unlock ], data );
			// Otherwise, copy the properties one-by-one to the cache object
			} else {
				for ( prop in data ) {
					cache[ prop ] = data[ prop ];
				}
			}
		}
		return cache;
	},
	get: function( owner, key ) {
		// Either a valid cache is found, or will be created.
		// New caches will be created and the unlock returned,
		// allowing direct access to the newly created
		// empty data object. A valid owner object must be provided.
		var cache = this.cache[ this.key( owner ) ];

		return key === undefined ?
			cache : cache[ key ];
	},
	access: function( owner, key, value ) {
		var stored;
		// 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) ) {

			stored = this.get( owner, key );

			return stored !== undefined ?
				stored : this.get( owner, jQuery.camelCase(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, name, camel,
			unlock = this.key( owner ),
			cache = this.cache[ unlock ];

		if ( key === undefined ) {
			this.cache[ unlock ] = {};

		} else {
			// Support array or space separated string of keys
			if ( jQuery.isArray( key ) ) {
				// If "name" is an array of keys...
				// When data is initially created, via ("key", "val") signature,
				// keys will be converted to camelCase.
				// Since there is no way to tell _how_ a key was added, remove
				// both plain key and camelCase key. #12786
				// This will only penalize the array argument path.
				name = key.concat( key.map( jQuery.camelCase ) );
			} else {
				camel = jQuery.camelCase( key );
				// Try the string as a key before any manipulation
				if ( key in cache ) {
					name = [ key, camel ];
				} else {
					// If a key with the spaces exists, use it.
					// Otherwise, create an array by matching non-whitespace
					name = camel;
					name = name in cache ?
						[ name ] : ( name.match( rnotwhite ) || [] );
				}
			}

			i = name.length;
			while ( i-- ) {
				delete cache[ name[ i ] ];
			}
		}
	},
	hasData: function( owner ) {
		return !jQuery.isEmptyObject(
			this.cache[ owner[ this.expando ] ] || {}
		);
	},
	discard: function( owner ) {
		if ( owner[ this.expando ] ) {
			delete this.cache[ owner[ this.expando ] ];
		}
	}
};
var data_priv = new Data();

var data_user = 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, "-$1" ).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 ) ? jQuery.parseJSON( data ) :
					data;
			} catch( e ) {}

			// Make sure we set the data so it isn't changed later
			data_user.set( elem, key, data );
		} else {
			data = undefined;
		}
	}
	return data;
}

jQuery.extend({
	hasData: function( elem ) {
		return data_user.hasData( elem ) || data_priv.hasData( elem );
	},

	data: function( elem, name, data ) {
		return data_user.access( elem, name, data );
	},

	removeData: function( elem, name ) {
		data_user.remove( elem, name );
	},

	// TODO: Now that all calls to _data and _removeData have been replaced
	// with direct calls to data_priv methods, these can be deprecated.
	_data: function( elem, name, data ) {
		return data_priv.access( elem, name, data );
	},

	_removeData: function( elem, name ) {
		data_priv.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 = data_user.get( elem );

				if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
					i = attrs.length;
					while ( i-- ) {

						// Support: IE11+
						// 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 ] );
							}
						}
					}
					data_priv.set( elem, "hasDataAttrs", true );
				}
			}

			return data;
		}

		// Sets multiple values
		if ( typeof key === "object" ) {
			return this.each(function() {
				data_user.set( this, key );
			});
		}

		return access( this, function( value ) {
			var data,
				camelKey = jQuery.camelCase( key );

			// 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
				// with the key as-is
				data = data_user.get( elem, key );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to get data from the cache
				// with the key camelized
				data = data_user.get( elem, camelKey );
				if ( data !== undefined ) {
					return data;
				}

				// Attempt to "discover" the data in
				// HTML5 custom data-* attrs
				data = dataAttr( elem, camelKey, undefined );
				if ( data !== undefined ) {
					return data;
				}

				// We tried really hard, but the data doesn't exist.
				return;
			}

			// Set the data...
			this.each(function() {
				// First, attempt to store a copy or reference of any
				// data that might've been store with a camelCased key.
				var data = data_user.get( this, camelKey );

				// For HTML5 data-* attribute interop, we have to
				// store property names with dashes in a camelCase form.
				// This might not apply to all properties...*
				data_user.set( this, camelKey, value );

				// *... In the case of properties that might _actually_
				// have dashes, we need to also store a copy of that
				// unchanged property.
				if ( key.indexOf("-") !== -1 && data !== undefined ) {
					data_user.set( this, key, value );
				}
			});
		}, null, value, arguments.length > 1, null, true );
	},

	removeData: function( key ) {
		return this.each(function() {
			data_user.remove( this, key );
		});
	}
});


jQuery.extend({
	queue: function( elem, type, data ) {
		var queue;

		if ( elem ) {
			type = ( type || "fx" ) + "queue";
			queue = data_priv.get( elem, type );

			// Speed up dequeue by getting out quickly if this is just a lookup
			if ( data ) {
				if ( !queue || jQuery.isArray( data ) ) {
					queue = data_priv.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 intended for public consumption - generates a queueHooks object, or returns the current one
	_queueHooks: function( elem, type ) {
		var key = type + "queueHooks";
		return data_priv.get( elem, key ) || data_priv.access( elem, key, {
			empty: jQuery.Callbacks("once memory").add(function() {
				data_priv.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 = data_priv.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 cssExpand = [ "Top", "Right", "Bottom", "Left" ];

var isHidden = function( elem, el ) {
		// isHidden might be called from jQuery#filter function;
		// in that case, element will be second argument
		elem = el || elem;
		return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
	};

var rcheckableType = (/^(?:checkbox|radio)$/i);



(function() {
	var fragment = document.createDocumentFragment(),
		div = fragment.appendChild( document.createElement( "div" ) ),
		input = document.createElement( "input" );

	// #11217 - WebKit loses check when the name is after the checked attribute
	// Support: Windows Web Apps (WWA)
	// `name` and `type` need .setAttribute for WWA
	input.setAttribute( "type", "radio" );
	input.setAttribute( "checked", "checked" );
	input.setAttribute( "name", "t" );

	div.appendChild( input );

	// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
	// old WebKit doesn't clone checked state correctly in fragments
	support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

	// Make sure textarea (and checkbox) defaultValue is properly cloned
	// Support: IE9-IE11+
	div.innerHTML = "<textarea>x</textarea>";
	support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
})();
var strundefined = typeof undefined;



support.focusinBubbles = "onfocusin" in window;


var
	rkeyEvent = /^key/,
	rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
	rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;

function returnTrue() {
	return true;
}

function returnFalse() {
	return false;
}

function safeActiveElement() {
	try {
		return document.activeElement;
	} catch ( err ) { }
}

/*
 * 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 = data_priv.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;
		}

		// 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 !== strundefined && 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, false );
					}
				}
			}

			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 = data_priv.hasData( elem ) && data_priv.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 the expando if it's no longer used
		if ( jQuery.isEmptyObject( events ) ) {
			delete elemData.handle;
			data_priv.remove( elem, "events" );
		}
	},

	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(".") >= 0 ) {
			// 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.namespace_re = 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 = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
			if ( handle ) {
				handle.apply( cur, data );
			}

			// Native handler
			handle = ontype && cur[ ontype ];
			if ( handle && handle.apply && jQuery.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) &&
				jQuery.acceptData( elem ) ) {

				// Call a native DOM method on the target with the same name 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;
	},

	dispatch: function( event ) {

		// Make a writable jQuery.Event from the native event object
		event = jQuery.event.fix( event );

		var i, j, ret, matched, handleObj,
			handlerQueue = [],
			args = slice.call( arguments ),
			handlers = ( data_priv.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;
		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.namespace_re || event.namespace_re.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;

		// Find delegate handlers
		// Black-hole SVG <use> instance trees (#13180)
		// Avoid non-left-click bubbling in Firefox (#3861)
		if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {

			for ( ; cur !== this; cur = cur.parentNode || this ) {

				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
				if ( 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 ) >= 0 :
								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;
	},

	// Includes some event props shared by KeyEvent and MouseEvent
	props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),

	fixHooks: {},

	keyHooks: {
		props: "char charCode key keyCode".split(" "),
		filter: function( event, original ) {

			// Add which for key events
			if ( event.which == null ) {
				event.which = original.charCode != null ? original.charCode : original.keyCode;
			}

			return event;
		}
	},

	mouseHooks: {
		props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
		filter: function( event, original ) {
			var eventDoc, doc, body,
				button = original.button;

			// Calculate pageX/Y if missing and clientX/Y available
			if ( event.pageX == null && original.clientX != null ) {
				eventDoc = event.target.ownerDocument || document;
				doc = eventDoc.documentElement;
				body = eventDoc.body;

				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
			}

			// Add which for click: 1 === left; 2 === middle; 3 === right
			// Note: button is not normalized, so don't use it
			if ( !event.which && button !== undefined ) {
				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
			}

			return event;
		}
	},

	fix: function( event ) {
		if ( event[ jQuery.expando ] ) {
			return event;
		}

		// Create a writable copy of the event object and normalize some properties
		var i, prop, copy,
			type = event.type,
			originalEvent = event,
			fixHook = this.fixHooks[ type ];

		if ( !fixHook ) {
			this.fixHooks[ type ] = fixHook =
				rmouseEvent.test( type ) ? this.mouseHooks :
				rkeyEvent.test( type ) ? this.keyHooks :
				{};
		}
		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;

		event = new jQuery.Event( originalEvent );

		i = copy.length;
		while ( i-- ) {
			prop = copy[ i ];
			event[ prop ] = originalEvent[ prop ];
		}

		// Support: Cordova 2.5 (WebKit) (#13255)
		// All events should have a target; Cordova deviceready doesn't
		if ( !event.target ) {
			event.target = document;
		}

		// Support: Safari 6.0+, Chrome < 28
		// Target should not be a text node (#504, #13143)
		if ( event.target.nodeType === 3 ) {
			event.target = event.target.parentNode;
		}

		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
	},

	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;
				}
			}
		}
	},

	simulate: function( type, elem, event, bubble ) {
		// Piggyback on a donor event to simulate a different one.
		// Fake originalEvent to avoid donor's stopPropagation, but if the
		// simulated event prevents default then we do the same on the donor.
		var e = jQuery.extend(
			new jQuery.Event(),
			event,
			{
				type: type,
				isSimulated: true,
				originalEvent: {}
			}
		);
		if ( bubble ) {
			jQuery.event.trigger( e, null, elem );
		} else {
			jQuery.event.dispatch.call( elem, e );
		}
		if ( e.isDefaultPrevented() ) {
			event.preventDefault();
		}
	}
};

jQuery.removeEvent = function( elem, type, handle ) {
	if ( elem.removeEventListener ) {
		elem.removeEventListener( type, handle, false );
	}
};

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 < 4.0
				src.returnValue === false ?
			returnTrue :
			returnFalse;

	// 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
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
jQuery.Event.prototype = {
	isDefaultPrevented: returnFalse,
	isPropagationStopped: returnFalse,
	isImmediatePropagationStopped: returnFalse,

	preventDefault: function() {
		var e = this.originalEvent;

		this.isDefaultPrevented = returnTrue;

		if ( e && e.preventDefault ) {
			e.preventDefault();
		}
	},
	stopPropagation: function() {
		var e = this.originalEvent;

		this.isPropagationStopped = returnTrue;

		if ( e && e.stopPropagation ) {
			e.stopPropagation();
		}
	},
	stopImmediatePropagation: function() {
		var e = this.originalEvent;

		this.isImmediatePropagationStopped = returnTrue;

		if ( e && e.stopImmediatePropagation ) {
			e.stopImmediatePropagation();
		}

		this.stopPropagation();
	}
};

// Create mouseenter/leave events using mouseover/out and event-time checks
// Support: Chrome 15+
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 mousenter/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;
		}
	};
});

// Create "bubbling" focus and blur events
// Support: Firefox, Chrome, Safari
if ( !support.focusinBubbles ) {
	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 ), true );
			};

		jQuery.event.special[ fix ] = {
			setup: function() {
				var doc = this.ownerDocument || this,
					attaches = data_priv.access( doc, fix );

				if ( !attaches ) {
					doc.addEventListener( orig, handler, true );
				}
				data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
			},
			teardown: function() {
				var doc = this.ownerDocument || this,
					attaches = data_priv.access( doc, fix ) - 1;

				if ( !attaches ) {
					doc.removeEventListener( orig, handler, true );
					data_priv.remove( doc, fix );

				} else {
					data_priv.access( doc, fix, attaches );
				}
			}
		};
	});
}

jQuery.fn.extend({

	on: function( types, selector, data, fn, /*INTERNAL*/ 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 ) {
				this.on( type, selector, data, types[ type ], one );
			}
			return this;
		}

		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 this;
		}

		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 this.each( function() {
			jQuery.event.add( this, types, fn, data, selector );
		});
	},
	one: function( types, selector, data, fn ) {
		return this.on( 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 );
		});
	},

	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 );
		}
	}
});


var
	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
	rtagName = /<([\w:]+)/,
	rhtml = /<|&#?\w+;/,
	rnoInnerhtml = /<(?:script|style|link)/i,
	// checked="checked" or checked
	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
	rscriptType = /^$|\/(?:java|ecma)script/i,
	rscriptTypeMasked = /^true\/(.*)/,
	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,

	// We have to close these tags to support XHTML (#13200)
	wrapMap = {

		// Support: IE 9
		option: [ 1, "<select multiple='multiple'>", "</select>" ],

		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
wrapMap.optgroup = wrapMap.option;

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

// Support: 1.x compatibility
// Manipulating tables requires a tbody
function manipulationTarget( elem, content ) {
	return jQuery.nodeName( elem, "table" ) &&
		jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?

		elem.getElementsByTagName("tbody")[0] ||
			elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
		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;
}

// Mark scripts as having already been evaluated
function setGlobalEval( elems, refElements ) {
	var i = 0,
		l = elems.length;

	for ( ; i < l; i++ ) {
		data_priv.set(
			elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
		);
	}
}

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 ( data_priv.hasData( src ) ) {
		pdataOld = data_priv.access( src );
		pdataCur = data_priv.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 ( data_user.hasData( src ) ) {
		udataOld = data_user.access( src );
		udataCur = jQuery.extend( {}, udataOld );

		data_user.set( dest, udataCur );
	}
}

function getAll( context, tag ) {
	var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
			context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
			[];

	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
		jQuery.merge( [ context ], ret ) :
		ret;
}

// Support: IE >= 9
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;
	}
}

jQuery.extend({
	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
		var i, l, srcElements, destElements,
			clone = elem.cloneNode( true ),
			inPage = jQuery.contains( elem.ownerDocument, elem );

		// Support: IE >= 9
		// Fix Cloning issues
		if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
				!jQuery.isXMLDoc( elem ) ) {

			// We eschew Sizzle here for performance reasons: http://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;
	},

	buildFragment: function( elems, context, scripts, selection ) {
		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: QtWebKit
					// jQuery.merge because push.apply(_, arraylike) throws
					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 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];

					// Descend through wrappers to the right content
					j = wrap[ 0 ];
					while ( j-- ) {
						tmp = tmp.lastChild;
					}

					// Support: QtWebKit
					// jQuery.merge because push.apply(_, arraylike) throws
					jQuery.merge( nodes, tmp.childNodes );

					// Remember the top-level container
					tmp = fragment.firstChild;

					// Fixes #12346
					// Support: Webkit, IE
					tmp.textContent = "";
				}
			}
		}

		// Remove wrapper from fragment
		fragment.textContent = "";

		i = 0;
		while ( (elem = nodes[ i++ ]) ) {

			// #4087 - If origin and destination elements are the same, and this is
			// that element, do not do anything
			if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
				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;
	},

	cleanData: function( elems ) {
		var data, elem, type, key,
			special = jQuery.event.special,
			i = 0;

		for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
			if ( jQuery.acceptData( elem ) ) {
				key = elem[ data_priv.expando ];

				if ( key && (data = data_priv.cache[ key ]) ) {
					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 );
							}
						}
					}
					if ( data_priv.cache[ key ] ) {
						// Discard any remaining `private` data
						delete data_priv.cache[ key ];
					}
				}
			}
			// Discard any remaining `user` data
			delete data_user.cache[ elem[ data_user.expando ] ];
		}
	}
});

jQuery.fn.extend({
	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 this.domManip( arguments, function( elem ) {
			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
				var target = manipulationTarget( this, elem );
				target.appendChild( elem );
			}
		});
	},

	prepend: function() {
		return this.domManip( 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 this.domManip( arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this );
			}
		});
	},

	after: function() {
		return this.domManip( arguments, function( elem ) {
			if ( this.parentNode ) {
				this.parentNode.insertBefore( elem, this.nextSibling );
			}
		});
	},

	remove: function( selector, keepData /* Internal Use Only */ ) {
		var elem,
			elems = selector ? jQuery.filter( selector, this ) : this,
			i = 0;

		for ( ; (elem = elems[i]) != null; i++ ) {
			if ( !keepData && elem.nodeType === 1 ) {
				jQuery.cleanData( getAll( elem ) );
			}

			if ( elem.parentNode ) {
				if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
					setGlobalEval( getAll( elem, "script" ) );
				}
				elem.parentNode.removeChild( elem );
			}
		}

		return this;
	},

	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 = value.replace( rxhtmlTag, "<$1></$2>" );

				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 arg = arguments[ 0 ];

		// Make the changes, replacing each context element with the new content
		this.domManip( arguments, function( elem ) {
			arg = this.parentNode;

			jQuery.cleanData( getAll( this ) );

			if ( arg ) {
				arg.replaceChild( elem, this );
			}
		});

		// Force removal if there was no new content (e.g., from empty arguments)
		return arg && (arg.length || arg.nodeType) ? this : this.remove();
	},

	detach: function( selector ) {
		return this.remove( selector, true );
	},

	domManip: function( args, callback ) {

		// Flatten any nested arrays
		args = concat.apply( [], args );

		var fragment, first, scripts, hasScripts, node, doc,
			i = 0,
			l = this.length,
			set = this,
			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 this.each(function( index ) {
				var self = set.eq( index );
				if ( isFunction ) {
					args[ 0 ] = value.call( this, index, self.html() );
				}
				self.domManip( args, callback );
			});
		}

		if ( l ) {
			fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
			first = fragment.firstChild;

			if ( fragment.childNodes.length === 1 ) {
				fragment = first;
			}

			if ( first ) {
				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: QtWebKit
							// jQuery.merge because push.apply(_, arraylike) throws
							jQuery.merge( scripts, getAll( node, "script" ) );
						}
					}

					callback.call( this[ 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 || "" ) &&
							!data_priv.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 {
								jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
							}
						}
					}
				}
			}
		}

		return this;
	}
});

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: QtWebKit
			// .get() because push.apply(_, arraylike) throws
			push.apply( ret, elems.get() );
		}

		return this.pushStack( ret );
	};
});


var iframe,
	elemdisplay = {};

/**
 * Retrieve the actual display of a element
 * @param {String} name nodeName of the element
 * @param {Object} doc Document object
 */
// Called only from within defaultDisplay
function actualDisplay( name, doc ) {
	var style,
		elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),

		// getDefaultComputedStyle might be reliably used only on attached element
		display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?

			// Use of this method is a temporary fix (more like optmization) until something better comes along,
			// since it was removed from specification and supported only in FF
			style.display : jQuery.css( elem[ 0 ], "display" );

	// We don't have any data stored on the element,
	// so use "detach" method as fast way to get rid of the element
	elem.detach();

	return display;
}

/**
 * Try to determine the default display value of an element
 * @param {String} nodeName
 */
function defaultDisplay( nodeName ) {
	var doc = document,
		display = elemdisplay[ nodeName ];

	if ( !display ) {
		display = actualDisplay( nodeName, doc );

		// If the simple way fails, read from inside an iframe
		if ( display === "none" || !display ) {

			// Use the already-created iframe if possible
			iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );

			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
			doc = iframe[ 0 ].contentDocument;

			// Support: IE
			doc.write();
			doc.close();

			display = actualDisplay( nodeName, doc );
			iframe.detach();
		}

		// Store the correct default display
		elemdisplay[ nodeName ] = display;
	}

	return display;
}
var rmargin = (/^margin/);

var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );

var getStyles = function( elem ) {
		return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
	};



function curCSS( elem, name, computed ) {
	var width, minWidth, maxWidth, ret,
		style = elem.style;

	computed = computed || getStyles( elem );

	// Support: IE9
	// getPropertyValue is only needed for .css('filter') in IE9, see #12537
	if ( computed ) {
		ret = computed.getPropertyValue( name ) || computed[ name ];
	}

	if ( computed ) {

		if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
			ret = jQuery.style( elem, name );
		}

		// Support: iOS < 6
		// A tribute to the "awesome hack by Dean Edwards"
		// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
		// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
		if ( 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
		// 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.
				// Since there are no other hooks for marginRight, remove the whole object.
				delete this.get;
				return;
			}

			// Hook needed; redefine it so that the support test is not executed again.

			return (this.get = hookFn).apply( this, arguments );
		}
	};
}


(function() {
	var pixelPositionVal, boxSizingReliableVal,
		docElem = document.documentElement,
		container = document.createElement( "div" ),
		div = document.createElement( "div" );

	if ( !div.style ) {
		return;
	}

	div.style.backgroundClip = "content-box";
	div.cloneNode( true ).style.backgroundClip = "";
	support.clearCloneStyle = div.style.backgroundClip === "content-box";

	container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
		"position:absolute";
	container.appendChild( div );

	// Executing both pixelPosition & boxSizingReliable tests require only one layout
	// so they're executed at the same time to save the second computation.
	function computePixelPositionAndBoxSizingReliable() {
		div.style.cssText =
			// Support: Firefox<29, Android 2.3
			// Vendor-prefix box-sizing
			"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
			"box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
			"border:1px;padding:1px;width:4px;position:absolute";
		div.innerHTML = "";
		docElem.appendChild( container );

		var divStyle = window.getComputedStyle( div, null );
		pixelPositionVal = divStyle.top !== "1%";
		boxSizingReliableVal = divStyle.width === "4px";

		docElem.removeChild( container );
	}

	// Support: node.js jsdom
	// Don't assume that getComputedStyle is a property of the global object
	if ( window.getComputedStyle ) {
		jQuery.extend( support, {
			pixelPosition: function() {
				// This test is executed only once but we still do memoizing
				// since we can use the boxSizingReliable pre-computing.
				// No need to check if the test was already performed, though.
				computePixelPositionAndBoxSizingReliable();
				return pixelPositionVal;
			},
			boxSizingReliable: function() {
				if ( boxSizingReliableVal == null ) {
					computePixelPositionAndBoxSizingReliable();
				}
				return boxSizingReliableVal;
			},
			reliableMarginRight: function() {
				// Support: Android 2.3
				// Check if div with explicit width and no margin-right incorrectly
				// gets computed margin-right based on width of container. (#3333)
				// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
				// This support function is only executed once so no memoizing is needed.
				var ret,
					marginDiv = div.appendChild( document.createElement( "div" ) );

				// Reset CSS: box-sizing; display; margin; border; padding
				marginDiv.style.cssText = div.style.cssText =
					// Support: Firefox<29, Android 2.3
					// Vendor-prefix box-sizing
					"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
					"box-sizing:content-box;display:block;margin:0;border:0;padding:0";
				marginDiv.style.marginRight = marginDiv.style.width = "0";
				div.style.width = "1px";
				docElem.appendChild( container );

				ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );

				docElem.removeChild( container );

				return ret;
			}
		});
	}
})();


// A method for quickly swapping in/out CSS properties to get correct calculations.
jQuery.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;
};


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]).+)/,
	rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
	rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),

	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
	cssNormalTransform = {
		letterSpacing: "0",
		fontWeight: "400"
	},

	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];

// return a css property mapped to a potentially vendor prefixed property
function vendorPropName( style, name ) {

	// shortcut for names that are not vendor prefixed
	if ( name in style ) {
		return name;
	}

	// check for vendor prefixed names
	var capName = name[0].toUpperCase() + name.slice(1),
		origName = name,
		i = cssPrefixes.length;

	while ( i-- ) {
		name = cssPrefixes[ i ] + capName;
		if ( name in style ) {
			return name;
		}
	}

	return origName;
}

function setPositiveNumber( elem, value, subtract ) {
	var matches = rnumsplit.exec( value );
	return matches ?
		// Guard against undefined "subtract", e.g., when used as in cssHooks
		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "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 valueIsBorderBox = true,
		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
		styles = getStyles( elem ),
		isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";

	// 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;
		}

		// we need the 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";
}

function showHide( elements, show ) {
	var display, elem, hidden,
		values = [],
		index = 0,
		length = elements.length;

	for ( ; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}

		values[ index ] = data_priv.get( elem, "olddisplay" );
		display = elem.style.display;
		if ( show ) {
			// Reset the inline display of this element to learn if it is
			// being hidden by cascaded rules or not
			if ( !values[ index ] && display === "none" ) {
				elem.style.display = "";
			}

			// Set elements which have been overridden with display: none
			// in a stylesheet to whatever the default browser style is
			// for such an element
			if ( elem.style.display === "" && isHidden( elem ) ) {
				values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
			}
		} else {
			hidden = isHidden( elem );

			if ( display !== "none" || !hidden ) {
				data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
			}
		}
	}

	// Set the display of most of the elements in a second loop
	// to avoid the constant reflow
	for ( index = 0; index < length; index++ ) {
		elem = elements[ index ];
		if ( !elem.style ) {
			continue;
		}
		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
			elem.style.display = show ? values[ index ] || "" : "none";
		}
	}

	return elements;
}

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: {
		"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: {
		// normalize float css property
		"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( style, origName ) );

		// gets hook for the prefixed version
		// followed by the unprefixed version
		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];

		// Check if we're setting a value
		if ( value !== undefined ) {
			type = typeof value;

			// convert relative number strings (+= or -=) to relative numbers. #7345
			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
				value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
				// Fixes bug #9237
				type = "number";
			}

			// Make sure that null and NaN values aren't set. See: #7116
			if ( value == null || value !== value ) {
				return;
			}

			// If a number was passed in, add 'px' to the (except for certain CSS properties)
			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
				value += "px";
			}

			// Fixes #8908, it can be done more correctly by specifying setters in cssHooks,
			// but it would mean to define eight (for every problematic property) identical functions
			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( elem.style, origName ) );

		// gets hook for the prefixed version
		// followed by the unprefixed version
		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 ];
		}

		// Return, converting to number if forced or a qualifier was provided and val looks numeric
		if ( extra === "" || extra ) {
			num = parseFloat( val );
			return extra === true || jQuery.isNumeric( 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
				// however, it must have a current display style that would benefit from this
				return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
					jQuery.swap( elem, cssShow, function() {
						return getWidthOrHeight( elem, name, extra );
					}) :
					getWidthOrHeight( elem, name, extra );
			}
		},

		set: function( elem, value, extra ) {
			var styles = extra && getStyles( elem );
			return setPositiveNumber( elem, value, extra ?
				augmentWidthOrHeight(
					elem,
					name,
					extra,
					jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
					styles
				) : 0
			);
		}
	};
});

// Support: Android 2.3
jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
	function( elem, computed ) {
		if ( computed ) {
			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
			// Work around by temporarily setting element display to inline-block
			return jQuery.swap( elem, { "display": "inline-block" },
				curCSS, [ elem, "marginRight" ] );
		}
	}
);

// 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 );
	},
	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 ( isHidden( this ) ) {
				jQuery( this ).show();
			} else {
				jQuery( this ).hide();
			}
		});
	}
});


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 || "swing";
		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;

			if ( tween.elem[ tween.prop ] != null &&
				(!tween.elem.style || 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
			// so, 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 its
			// available and use plain properties where available
			if ( jQuery.fx.step[ tween.prop ] ) {
				jQuery.fx.step[ tween.prop ]( tween );
			} else if ( tween.elem.style && ( 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: IE9
// 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;
	}
};

jQuery.fx = Tween.prototype.init;

// Back Compat <1.8 extension point
jQuery.fx.step = {};




var
	fxNow, timerId,
	rfxtypes = /^(?:toggle|show|hide)$/,
	rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
	rrun = /queueHooks$/,
	animationPrefilters = [ defaultPrefilter ],
	tweeners = {
		"*": [ function( prop, value ) {
			var tween = this.createTween( prop, value ),
				target = tween.cur(),
				parts = rfxnum.exec( value ),
				unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

				// Starting value computation is required for potential unit mismatches
				start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
					rfxnum.exec( jQuery.css( tween.elem, prop ) ),
				scale = 1,
				maxIterations = 20;

			if ( start && start[ 3 ] !== unit ) {
				// Trust units reported by jQuery.css
				unit = unit || start[ 3 ];

				// Make sure we update the tween properties later on
				parts = parts || [];

				// Iteratively approximate from a nonzero starting point
				start = +target || 1;

				do {
					// If previous iteration zeroed out, double until we get *something*
					// Use a string for doubling factor so we don't accidentally see scale as unchanged below
					scale = scale || ".5";

					// Adjust and apply
					start = start / scale;
					jQuery.style( tween.elem, prop, start + unit );

				// Update scale, tolerating zero or NaN from tween.cur()
				// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
				} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
			}

			// Update tween properties
			if ( parts ) {
				start = tween.start = +start || +target || 0;
				tween.unit = unit;
				// If a +=/-= token was provided, we're doing a relative animation
				tween.end = parts[ 1 ] ?
					start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
					+parts[ 2 ];
			}

			return tween;
		} ]
	};

// Animations created synchronously will run synchronously
function createFxNow() {
	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,
	// if we don't include width, 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 = ( tweeners[ prop ] || [] ).concat( 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, tween, hooks, oldfire, display, checkDisplay,
		anim = this,
		orig = {},
		style = elem.style,
		hidden = elem.nodeType && isHidden( elem ),
		dataShow = data_priv.get( elem, "fxshow" );

	// handle queue: false promises
	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() {
			// doing this makes sure that the complete handler will be called
			// before this completes
			anim.always(function() {
				hooks.unqueued--;
				if ( !jQuery.queue( elem, "fx" ).length ) {
					hooks.empty.fire();
				}
			});
		});
	}

	// height/width overflow pass
	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
		// Make sure that nothing sneaks out
		// Record all 3 overflow attributes because IE9-10 do not
		// change the overflow attribute when overflowX and
		// overflowY are set to the same value
		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];

		// Set display property to inline-block for height/width
		// animations on inline elements that are having width/height animated
		display = jQuery.css( elem, "display" );

		// Test default display if display is currently "none"
		checkDisplay = display === "none" ?
			data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;

		if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
			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 ];
		});
	}

	// show/hide pass
	for ( prop in props ) {
		value = props[ prop ];
		if ( rfxtypes.exec( value ) ) {
			delete props[ prop ];
			toggle = toggle || value === "toggle";
			if ( value === ( hidden ? "hide" : "show" ) ) {

				// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
				if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
					hidden = true;
				} else {
					continue;
				}
			}
			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );

		// Any non-fx value stops us from restoring the original display value
		} else {
			display = undefined;
		}
	}

	if ( !jQuery.isEmptyObject( orig ) ) {
		if ( dataShow ) {
			if ( "hidden" in dataShow ) {
				hidden = dataShow.hidden;
			}
		} else {
			dataShow = data_priv.access( elem, "fxshow", {} );
		}

		// store state if its toggle - enables .stop().toggle() to "reverse"
		if ( toggle ) {
			dataShow.hidden = !hidden;
		}
		if ( hidden ) {
			jQuery( elem ).show();
		} else {
			anim.done(function() {
				jQuery( elem ).hide();
			});
		}
		anim.done(function() {
			var prop;

			data_priv.remove( elem, "fxshow" );
			for ( prop in orig ) {
				jQuery.style( elem, prop, orig[ prop ] );
			}
		});
		for ( prop in orig ) {
			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );

			if ( !( prop in dataShow ) ) {
				dataShow[ prop ] = tween.start;
				if ( hidden ) {
					tween.end = tween.start;
					tween.start = prop === "width" || prop === "height" ? 1 : 0;
				}
			}
		}

	// If this is a noop like .hide().hide(), restore an overwritten display value
	} else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
		style.display = display;
	}
}

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 wont overwrite keys already present.
			// also - reusing 'index' from above 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 = animationPrefilters.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 ),
				// 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: {} }, 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.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 = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
		if ( 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, {

	tweener: function( props, callback ) {
		if ( jQuery.isFunction( props ) ) {
			callback = props;
			props = [ "*" ];
		} else {
			props = props.split(" ");
		}

		var prop,
			index = 0,
			length = props.length;

		for ( ; index < length ; index++ ) {
			prop = props[ index ];
			tweeners[ prop ] = tweeners[ prop ] || [];
			tweeners[ prop ].unshift( callback );
		}
	},

	prefilter: function( callback, prepend ) {
		if ( prepend ) {
			animationPrefilters.unshift( callback );
		} else {
			animationPrefilters.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
	};

	opt.duration = jQuery.fx.off ? 0 : 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( isHidden ).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 || data_priv.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 = data_priv.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 = data_priv.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 = setInterval( jQuery.fx.tick, jQuery.fx.interval );
	}
};

jQuery.fx.stop = function() {
	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.
// http://blindsignals.com/index.php/2009/07/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 = setTimeout( next, time );
		hooks.stop = function() {
			clearTimeout( timeout );
		};
	});
};


(function() {
	var input = document.createElement( "input" ),
		select = document.createElement( "select" ),
		opt = select.appendChild( document.createElement( "option" ) );

	input.type = "checkbox";

	// Support: iOS 5.1, Android 4.x, Android 2.3
	// Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
	support.checkOn = input.value !== "";

	// Must access the parent to make an option select properly
	// Support: IE9, IE10
	support.optSelected = opt.selected;

	// Make sure that the options inside disabled selects aren't marked as disabled
	// (WebKit marks them as disabled)
	select.disabled = true;
	support.optDisabled = !opt.disabled;

	// Check if an input maintains its value after becoming a radio
	// Support: IE9, IE10
	input = document.createElement( "input" );
	input.value = "t";
	input.type = "radio";
	support.radioValue = input.value === "t";
})();


var nodeHook, 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 hooks, ret,
			nType = elem.nodeType;

		// don't get/set attributes on text, comment and attribute nodes
		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		// Fallback to prop when attributes are not supported
		if ( typeof elem.getAttribute === strundefined ) {
			return jQuery.prop( elem, name, value );
		}

		// All attributes are lowercase
		// Grab necessary hook if one is defined
		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
			name = name.toLowerCase();
			hooks = jQuery.attrHooks[ name ] ||
				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
		}

		if ( value !== undefined ) {

			if ( value === null ) {
				jQuery.removeAttr( elem, name );

			} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
				return ret;

			} else {
				elem.setAttribute( name, value + "" );
				return value;
			}

		} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
			return ret;

		} else {
			ret = jQuery.find.attr( elem, name );

			// Non-existent attributes return null, we normalize to undefined
			return ret == null ?
				undefined :
				ret;
		}
	},

	removeAttr: function( elem, value ) {
		var name, propName,
			i = 0,
			attrNames = value && value.match( rnotwhite );

		if ( attrNames && elem.nodeType === 1 ) {
			while ( (name = attrNames[i++]) ) {
				propName = jQuery.propFix[ name ] || name;

				// Boolean attributes get special treatment (#10870)
				if ( jQuery.expr.match.bool.test( name ) ) {
					// Set corresponding property to false
					elem[ propName ] = false;
				}

				elem.removeAttribute( name );
			}
		}
	},

	attrHooks: {
		type: {
			set: function( elem, value ) {
				if ( !support.radioValue && value === "radio" &&
					jQuery.nodeName( elem, "input" ) ) {
					// Setting the type on a radio button after the value resets the value in IE6-9
					// Reset value to default in case type is set after value during creation
					var val = elem.value;
					elem.setAttribute( "type", value );
					if ( val ) {
						elem.value = val;
					}
					return value;
				}
			}
		}
	}
});

// 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;
		if ( !isXML ) {
			// Avoid an infinite loop by temporarily removing this function from the getter
			handle = attrHandle[ name ];
			attrHandle[ name ] = ret;
			ret = getter( elem, name, isXML ) != null ?
				name.toLowerCase() :
				null;
			attrHandle[ name ] = handle;
		}
		return ret;
	};
});




var rfocusable = /^(?:input|select|textarea|button)$/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({
	propFix: {
		"for": "htmlFor",
		"class": "className"
	},

	prop: function( elem, name, value ) {
		var ret, hooks, notxml,
			nType = elem.nodeType;

		// don't get/set properties on text, comment and attribute nodes
		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
			return;
		}

		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );

		if ( notxml ) {
			// Fix name and attach hooks
			name = jQuery.propFix[ name ] || name;
			hooks = jQuery.propHooks[ name ];
		}

		if ( value !== undefined ) {
			return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
				ret :
				( elem[ name ] = value );

		} else {
			return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
				ret :
				elem[ name ];
		}
	},

	propHooks: {
		tabIndex: {
			get: function( elem ) {
				return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
					elem.tabIndex :
					-1;
			}
		}
	}
});

// Support: IE9+
// Selectedness for an option in an optgroup can be inaccurate
if ( !support.optSelected ) {
	jQuery.propHooks.selected = {
		get: function( elem ) {
			var parent = elem.parentNode;
			if ( parent && parent.parentNode ) {
				parent.parentNode.selectedIndex;
			}
			return null;
		}
	};
}

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;

jQuery.fn.extend({
	addClass: function( value ) {
		var classes, elem, cur, clazz, j, finalValue,
			proceed = typeof value === "string" && value,
			i = 0,
			len = this.length;

		if ( jQuery.isFunction( value ) ) {
			return this.each(function( j ) {
				jQuery( this ).addClass( value.call( this, j, this.className ) );
			});
		}

		if ( proceed ) {
			// The disjunction here is for better compressibility (see removeClass)
			classes = ( value || "" ).match( rnotwhite ) || [];

			for ( ; i < len; i++ ) {
				elem = this[ i ];
				cur = elem.nodeType === 1 && ( elem.className ?
					( " " + elem.className + " " ).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 ( elem.className !== finalValue ) {
						elem.className = finalValue;
					}
				}
			}
		}

		return this;
	},

	removeClass: function( value ) {
		var classes, elem, cur, clazz, j, finalValue,
			proceed = arguments.length === 0 || typeof value === "string" && value,
			i = 0,
			len = this.length;

		if ( jQuery.isFunction( value ) ) {
			return this.each(function( j ) {
				jQuery( this ).removeClass( value.call( this, j, this.className ) );
			});
		}
		if ( proceed ) {
			classes = ( value || "" ).match( rnotwhite ) || [];

			for ( ; i < len; i++ ) {
				elem = this[ i ];
				// This expression is here for better compressibility (see addClass)
				cur = elem.nodeType === 1 && ( elem.className ?
					( " " + elem.className + " " ).replace( rclass, " " ) :
					""
				);

				if ( cur ) {
					j = 0;
					while ( (clazz = classes[j++]) ) {
						// Remove *all* instances
						while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
							cur = cur.replace( " " + clazz + " ", " " );
						}
					}

					// only assign if different to avoid unneeded rendering.
					finalValue = value ? jQuery.trim( cur ) : "";
					if ( elem.className !== finalValue ) {
						elem.className = 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, this.className, stateVal), stateVal );
			});
		}

		return this.each(function() {
			if ( type === "string" ) {
				// toggle individual class names
				var className,
					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 ( type === strundefined || type === "boolean" ) {
				if ( this.className ) {
					// store className if set
					data_priv.set( this, "__className__", this.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.
				this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
			}
		});
	},

	hasClass: function( selector ) {
		var className = " " + selector + " ",
			i = 0,
			l = this.length;
		for ( ; i < l; i++ ) {
			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
				return true;
			}
		}

		return false;
	}
});




var rreturn = /\r/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: IE10-11+
					// option.text throws exceptions (#14686, #14858)
					jQuery.trim( jQuery.text( elem ) );
			}
		},
		select: {
			get: function( elem ) {
				var value, option,
					options = elem.options,
					index = elem.selectedIndex,
					one = elem.type === "select-one" || index < 0,
					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 ];

					// IE6-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
							( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
							( !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( option.value, values ) >= 0) ) {
						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 ) >= 0 );
			}
		}
	};
	if ( !support.checkOn ) {
		jQuery.valHooks[ this ].get = function( elem ) {
			// Support: Webkit
			// "" is returned instead of "on" if a value isn't specified
			return elem.getAttribute("value") === null ? "on" : elem.value;
		};
	}
});




// Return jQuery for attributes-only inclusion


jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
	"change select submit keydown keypress keyup error 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 );
	},

	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 );
	}
});


var nonce = jQuery.now();

var rquery = (/\?/);



// Support: Android 2.3
// Workaround failure to string-cast null input
jQuery.parseJSON = function( data ) {
	return JSON.parse( data + "" );
};


// Cross-browser xml parsing
jQuery.parseXML = function( data ) {
	var xml, tmp;
	if ( !data || typeof data !== "string" ) {
		return null;
	}

	// Support: IE9
	try {
		tmp = new DOMParser();
		xml = tmp.parseFromString( data, "text/xml" );
	} catch ( e ) {
		xml = undefined;
	}

	if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
		jQuery.error( "Invalid XML: " + data );
	}
	return xml;
};


var
	// Document location
	ajaxLocParts,
	ajaxLocation,

	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 = /^\/\//,
	rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,

	/* 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("*");

// #8138, IE may throw an exception when accessing
// a field from window.location if document.domain has been set
try {
	ajaxLocation = location.href;
} catch( e ) {
	// Use the href attribute of an A element
	// since IE will modify it given document.location
	ajaxLocation = document.createElement( "a" );
	ajaxLocation.href = "";
	ajaxLocation = ajaxLocation.href;
}

// Segment location into parts
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];

// 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: ajaxLocation,
		type: "GET",
		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
		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: /xml/,
			html: /html/,
			json: /json/
		},

		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": jQuery.parseJSON,

			// 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,
			// Cross-domain detection vars
			parts,
			// To know if global events are to be dispatched
			fireGlobals,
			// Loop variable
			i,
			// 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 = {},
			// The jqXHR state
			state = 0,
			// Default abort message
			strAbort = "canceled",
			// Fake xhr
			jqXHR = {
				readyState: 0,

				// Builds headers hashtable if needed
				getResponseHeader: function( key ) {
					var match;
					if ( state === 2 ) {
						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 state === 2 ? responseHeadersString : null;
				},

				// Caches the header
				setRequestHeader: function( name, value ) {
					var lname = name.toLowerCase();
					if ( !state ) {
						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
						requestHeaders[ name ] = value;
					}
					return this;
				},

				// Overrides response content-type header
				overrideMimeType: function( type ) {
					if ( !state ) {
						s.mimeType = type;
					}
					return this;
				},

				// Status-dependent callbacks
				statusCode: function( map ) {
					var code;
					if ( map ) {
						if ( state < 2 ) {
							for ( code in map ) {
								// Lazy-add the new callback in a way that preserves old ones
								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
							}
						} else {
							// Execute the appropriate callbacks
							jqXHR.always( map[ jqXHR.status ] );
						}
					}
					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 ).complete = completeDeferred.add;
		jqXHR.success = jqXHR.done;
		jqXHR.error = jqXHR.fail;

		// Remove hash character (#7531: and string promotion)
		// 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 || ajaxLocation ) + "" ).replace( rhash, "" )
			.replace( rprotocol, ajaxLocParts[ 1 ] + "//" );

		// Alias method option to type as per ticket #12004
		s.type = options.method || options.type || s.method || s.type;

		// Extract dataTypes list
		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];

		// A cross-domain request is in order when we have a protocol:host:port mismatch
		if ( s.crossDomain == null ) {
			parts = rurl.exec( s.url.toLowerCase() );
			s.crossDomain = !!( parts &&
				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
			);
		}

		// 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 ( state === 2 ) {
			return jqXHR;
		}

		// We can fire global events as of now if asked to
		fireGlobals = 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
		cacheURL = s.url;

		// More options handling for requests with no content
		if ( !s.hasContent ) {

			// If data is available, append data to url
			if ( s.data ) {
				cacheURL = ( s.url += ( 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 url if needed
			if ( s.cache === false ) {
				s.url = rts.test( cacheURL ) ?

					// If there is already a '_' parameter, set its value
					cacheURL.replace( rts, "$1_=" + nonce++ ) :

					// Otherwise add one to the end
					cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
			}
		}

		// 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 || state === 2 ) ) {
			// Abort if not done already and return
			return jqXHR.abort();
		}

		// aborting is no longer a cancellation
		strAbort = "abort";

		// Install callbacks on deferreds
		for ( i in { success: 1, error: 1, complete: 1 } ) {
			jqXHR[ i ]( s[ i ] );
		}

		// 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 ] );
			}
			// Timeout
			if ( s.async && s.timeout > 0 ) {
				timeoutTimer = setTimeout(function() {
					jqXHR.abort("timeout");
				}, s.timeout );
			}

			try {
				state = 1;
				transport.send( requestHeaders, done );
			} catch ( e ) {
				// Propagate exception as error if not done
				if ( state < 2 ) {
					done( -1, e );
				// Simply rethrow otherwise
				} else {
					throw e;
				}
			}
		}

		// Callback for when everything is done
		function done( status, nativeStatusText, responses, headers ) {
			var isSuccess, success, error, response, modified,
				statusText = nativeStatusText;

			// Called once
			if ( state === 2 ) {
				return;
			}

			// State is "done" now
			state = 2;

			// Clear timeout if it exists
			if ( timeoutTimer ) {
				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 {
				// We extract error from statusText
				// then normalize statusText and status 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;
		}

		return jQuery.ajax({
			url: url,
			type: method,
			dataType: type,
			data: data,
			success: callback
		});
	};
});

// 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._evalUrl = function( url ) {
	return jQuery.ajax({
		url: url,
		type: "GET",
		dataType: "script",
		async: false,
		global: false,
		"throws": true
	});
};


jQuery.fn.extend({
	wrapAll: function( html ) {
		var wrap;

		if ( jQuery.isFunction( html ) ) {
			return this.each(function( i ) {
				jQuery( this ).wrapAll( html.call(this, i) );
			});
		}

		if ( 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() {
		return this.parent().each(function() {
			if ( !jQuery.nodeName( this, "body" ) ) {
				jQuery( this ).replaceWith( this.childNodes );
			}
		}).end();
	}
});


jQuery.expr.filters.hidden = function( elem ) {
	// Support: Opera <= 12.12
	// Opera reports offsetWidths and offsetHeights less than zero on some elements
	return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
};
jQuery.expr.filters.visible = function( elem ) {
	return !jQuery.expr.filters.hidden( elem );
};




var r20 = /%20/g,
	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" ? 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, value ) {
			// If value is a function, invoke it and return its value
			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
		};

	// Set traditional to true for jQuery <= 1.3.2 behavior.
	if ( traditional === undefined ) {
		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
	}

	// 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( "&" ).replace( r20, "+" );
};

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();
	}
});


jQuery.ajaxSettings.xhr = function() {
	try {
		return new XMLHttpRequest();
	} catch( e ) {}
};

var xhrId = 0,
	xhrCallbacks = {},
	xhrSuccessStatus = {
		// file protocol always yields status code 0, assume 200
		0: 200,
		// Support: IE9
		// #1450: sometimes IE returns 1223 when it should be 204
		1223: 204
	},
	xhrSupported = jQuery.ajaxSettings.xhr();

// Support: IE9
// Open requests must be manually aborted on unload (#5280)
if ( window.ActiveXObject ) {
	jQuery( window ).on( "unload", function() {
		for ( var key in xhrCallbacks ) {
			xhrCallbacks[ key ]();
		}
	});
}

support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
support.ajax = xhrSupported = !!xhrSupported;

jQuery.ajaxTransport(function( options ) {
	var callback;

	// Cross domain only allowed if supported through XMLHttpRequest
	if ( support.cors || xhrSupported && !options.crossDomain ) {
		return {
			send: function( headers, complete ) {
				var i,
					xhr = options.xhr(),
					id = ++xhrId;

				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 ) {
							delete xhrCallbacks[ id ];
							callback = xhr.onload = xhr.onerror = null;

							if ( type === "abort" ) {
								xhr.abort();
							} else if ( type === "error" ) {
								complete(
									// file: protocol always yields status 0; see #8605, #14207
									xhr.status,
									xhr.statusText
								);
							} else {
								complete(
									xhrSuccessStatus[ xhr.status ] || xhr.status,
									xhr.statusText,
									// Support: IE9
									// Accessing binary-data responseText throws an exception
									// (#11426)
									typeof xhr.responseText === "string" ? {
										text: xhr.responseText
									} : undefined,
									xhr.getAllResponseHeaders()
								);
							}
						}
					};
				};

				// Listen to events
				xhr.onload = callback();
				xhr.onerror = callback("error");

				// Create the abort callback
				callback = xhrCallbacks[ id ] = 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();
				}
			}
		};
	}
});




// Install script dataType
jQuery.ajaxSetup({
	accepts: {
		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
	},
	contents: {
		script: /(?:java|ecma)script/
	},
	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({
					async: true,
					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 );
						}
					}
				);
				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") && 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() {
			// Restore preexisting value
			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";
	}
});




// data: 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 ( !data || typeof data !== "string" ) {
		return null;
	}
	if ( typeof context === "boolean" ) {
		keepScripts = context;
		context = false;
	}
	context = context || document;

	var parsed = rsingleTag.exec( data ),
		scripts = !keepScripts && [];

	// Single tag
	if ( parsed ) {
		return [ context.createElement( parsed[1] ) ];
	}

	parsed = jQuery.buildFragment( [ data ], context, scripts );

	if ( scripts && scripts.length ) {
		jQuery( scripts ).remove();
	}

	return jQuery.merge( [], parsed.childNodes );
};


// Keep a copy of the old load method
var _load = jQuery.fn.load;

/**
 * Load a url into a page
 */
jQuery.fn.load = function( url, params, callback ) {
	if ( typeof url !== "string" && _load ) {
		return _load.apply( this, arguments );
	}

	var selector, type, response,
		self = this,
		off = url.indexOf(" ");

	if ( off >= 0 ) {
		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
			type: type,
			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 );

		}).complete( callback && function( jqXHR, status ) {
			self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
		});
	}

	return this;
};




jQuery.expr.filters.animated = function( elem ) {
	return jQuery.grep(jQuery.timers, function( fn ) {
		return elem === fn.elem;
	}).length;
};




var docElem = window.document.documentElement;

/**
 * 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 ) ) {
			options = options.call( elem, i, 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 ) {
		if ( arguments.length ) {
			return options === undefined ?
				this :
				this.each(function( i ) {
					jQuery.offset.setOffset( this, options, i );
				});
		}

		var docElem, win,
			elem = this[ 0 ],
			box = { top: 0, left: 0 },
			doc = elem && elem.ownerDocument;

		if ( !doc ) {
			return;
		}

		docElem = doc.documentElement;

		// Make sure it's not a disconnected DOM node
		if ( !jQuery.contains( docElem, elem ) ) {
			return box;
		}

		// If we don't have gBCR, just use 0,0 rather than error
		// BlackBerry 5, iOS 3 (original iPhone)
		if ( typeof elem.getBoundingClientRect !== strundefined ) {
			box = elem.getBoundingClientRect();
		}
		win = getWindow( doc );
		return {
			top: box.top + win.pageYOffset - docElem.clientTop,
			left: box.left + win.pageXOffset - docElem.clientLeft
		};
	},

	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" ) {
			// We assume that getBoundingClientRect is available 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 += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
			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 )
		};
	},

	offsetParent: function() {
		return this.map(function() {
			var offsetParent = this.offsetParent || docElem;

			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
				offsetParent = offsetParent.offsetParent;
			}

			return offsetParent || docElem;
		});
	}
});

// 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 : window.pageXOffset,
					top ? val : window.pageYOffset
				);

			} else {
				elem[ method ] = val;
			}
		}, method, val, arguments.length, null );
	};
});

// Add the top/left cssHooks using jQuery.fn.position
// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
// getComputedStyle returns percent when specified for top/left/bottom/right
// rather than make the css module depend on the offset module, we 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 ) ) {
					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
					// isn't a whole lot we can do. See pull request at this URL for discussion:
					// https://github.com/jquery/jquery/pull/764
					return 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, null );
		};
	});
});


// The number of elements contained in the matched element set
jQuery.fn.size = function() {
	return this.length;
};

jQuery.fn.andSelf = jQuery.fn.addBack;




// 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 ( typeof noGlobal === strundefined ) {
	window.jQuery = window.$ = jQuery;
}




return jQuery;

}));
;!function(e,t){"object"==typeof exports&&exports?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Mustache={})}(this,function(e){function t(e){return"function"==typeof e}function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(e,t){return g.call(e,t)}function i(e){return!r(w,e)}function s(e){return String(e).replace(/[&<>"'\/]/g,function(e){return d[e]})}function o(t,r){function s(){if(U&&!m)for(;d.length;)delete w[d.pop()];else d=[];U=!1,m=!1}function o(e){if("string"==typeof e&&(e=e.split(k,2)),!f(e)||2!==e.length)throw new Error("Invalid tags: "+e);h=new RegExp(n(e[0])+"\\s*"),l=new RegExp("\\s*"+n(e[1])),p=new RegExp("\\s*"+n("}"+e[1]))}if(!t)return[];var h,l,p,g=[],w=[],d=[],U=!1,m=!1;o(r||e.tags);for(var E,T,j,C,A,R,S=new u(t);!S.eos();){if(E=S.pos,j=S.scanUntil(h))for(var O=0,$=j.length;$>O;++O)C=j.charAt(O),i(C)?d.push(w.length):m=!0,w.push(["text",C,E,E+1]),E+=1,"\n"===C&&s();if(!S.scan(h))break;if(U=!0,T=S.scan(x)||"name",S.scan(v),"="===T?(j=S.scanUntil(y),S.scan(y),S.scanUntil(l)):"{"===T?(j=S.scanUntil(p),S.scan(b),S.scanUntil(l),T="&"):j=S.scanUntil(l),!S.scan(l))throw new Error("Unclosed tag at "+S.pos);if(A=[T,j,E,S.pos],w.push(A),"#"===T||"^"===T)g.push(A);else if("/"===T){if(R=g.pop(),!R)throw new Error('Unopened section "'+j+'" at '+E);if(R[1]!==j)throw new Error('Unclosed section "'+R[1]+'" at '+E)}else"name"===T||"{"===T||"&"===T?m=!0:"="===T&&o(j)}if(R=g.pop())throw new Error('Unclosed section "'+R[1]+'" at '+S.pos);return c(a(w))}function a(e){for(var t,n,r=[],i=0,s=e.length;s>i;++i)t=e[i],t&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}function c(e){for(var t,n,r=[],i=r,s=[],o=0,a=e.length;a>o;++o)switch(t=e[o],t[0]){case"#":case"^":i.push(t),s.push(t),i=t[4]=[];break;case"/":n=s.pop(),n[5]=t[2],i=s.length>0?s[s.length-1][4]:r;break;default:i.push(t)}return r}function u(e){this.string=e,this.tail=e,this.pos=0}function h(e,t){this.view=null==e?{}:e,this.cache={".":this.view},this.parent=t}function l(){this.cache={}}var p=Object.prototype.toString,f=Array.isArray||function(e){return"[object Array]"===p.call(e)},g=RegExp.prototype.test,w=/\S/,d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"},v=/\s*/,k=/\s+/,y=/\s*=/,b=/\s*\}/,x=/#|\^|\/|>|\{|&|=|!/;u.prototype.eos=function(){return""===this.tail},u.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},u.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},h.prototype.push=function(e){return new h(e,this)},h.prototype.lookup=function(e){var n,r=this.cache;if(e in r)n=r[e];else{for(var i,s,o=this;o;){if(e.indexOf(".")>0)for(n=o.view,i=e.split("."),s=0;null!=n&&s<i.length;)n=n[i[s++]];else n=o.view[e];if(null!=n)break;o=o.parent}r[e]=n}return t(n)&&(n=n.call(this.view)),n},l.prototype.clearCache=function(){this.cache={}},l.prototype.parse=function(e,t){var n=this.cache,r=n[e];return null==r&&(r=n[e]=o(e,t)),r},l.prototype.render=function(e,t,n){var r=this.parse(e),i=t instanceof h?t:new h(t);return this.renderTokens(r,i,n,e)},l.prototype.renderTokens=function(n,r,i,s){function o(e){return h.render(e,r,i)}for(var a,c,u="",h=this,l=0,p=n.length;p>l;++l)switch(a=n[l],a[0]){case"#":if(c=r.lookup(a[1]),!c)continue;if(f(c))for(var g=0,w=c.length;w>g;++g)u+=this.renderTokens(a[4],r.push(c[g]),i,s);else if("object"==typeof c||"string"==typeof c)u+=this.renderTokens(a[4],r.push(c),i,s);else if(t(c)){if("string"!=typeof s)throw new Error("Cannot use higher-order sections without the original template");c=c.call(r.view,s.slice(a[3],a[5]),o),null!=c&&(u+=c)}else u+=this.renderTokens(a[4],r,i,s);break;case"^":c=r.lookup(a[1]),(!c||f(c)&&0===c.length)&&(u+=this.renderTokens(a[4],r,i,s));break;case">":if(!i)continue;c=t(i)?i(a[1]):i[a[1]],null!=c&&(u+=this.renderTokens(this.parse(c),r,i,c));break;case"&":c=r.lookup(a[1]),null!=c&&(u+=c);break;case"name":c=r.lookup(a[1]),null!=c&&(u+=e.escape(c));break;case"text":u+=a[1]}return u},e.name="mustache.js",e.version="0.8.1",e.tags=["{{","}}"];var U=new l;e.clearCache=function(){return U.clearCache()},e.parse=function(e,t){return U.parse(e,t)},e.render=function(e,t,n){return U.render(e,t,n)},e.to_html=function(n,r,i,s){var o=e.render(n,r,i);return t(s)?(s(o),void 0):o},e.escape=s,e.Scanner=u,e.Context=h,e.Writer=l});;/*
 * jQuery FlexSlider v2.6.2
 * Copyright 2012 WooThemes
 * Contributing Author: Tyler Smith
 */
;
(function ($) {

    var focused = true;

    //FlexSlider: Object Instance
    $.flexslider = function (el, options) {
        var slider = $(el);

        // making variables public
        slider.vars = $.extend({}, $.flexslider.defaults, options);

        var namespace = slider.vars.namespace,
            msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
            touch = (("ontouchstart" in window) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
            // depricating this idea, as devices are being released with both of these events
            eventType = "click touchend MSPointerUp keyup",
            watchedEvent = "",
            watchedEventClearTimer,
            vertical = slider.vars.direction === "vertical",
            reverse = slider.vars.reverse,
            carousel = (slider.vars.itemWidth > 0),
            fade = slider.vars.animation === "fade",
            asNav = slider.vars.asNavFor !== "",
            methods = {};

        // Store a reference to the slider object
        $.data(el, "flexslider", slider);

        // Private slider methods
        methods = {
            init: function () {
                slider.animating = false;
                // Get current slide and make sure it is a number
                slider.currentSlide = parseInt((slider.vars.startAt ? slider.vars.startAt : 0), 10);
                if (isNaN(slider.currentSlide)) { slider.currentSlide = 0; }
                slider.animatingTo = slider.currentSlide;
                slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
                slider.containerSelector = slider.vars.selector.substr(0, slider.vars.selector.search(' '));
                slider.slides = $(slider.vars.selector, slider);
                slider.container = $(slider.containerSelector, slider);
                slider.count = slider.slides.length;
                // SYNC:
                slider.syncExists = $(slider.vars.sync).length > 0;
                // SLIDE:
                if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; }
                slider.prop = (vertical) ? "top" : "marginLeft";
                slider.args = {};
                // SLIDESHOW:
                slider.manualPause = false;
                slider.stopped = false;
                //PAUSE WHEN INVISIBLE
                slider.started = false;
                slider.startTimeout = null;
                // TOUCH/USECSS:
                slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function () {
                    var obj = document.createElement('div'),
                        props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
                    for (var i in props) {
                        if (obj.style[props[i]] !== undefined) {
                            slider.pfx = props[i].replace('Perspective', '').toLowerCase();
                            slider.prop = "-" + slider.pfx + "-transform";
                            return true;
                        }
                    }
                    return false;
                }());
                slider.ensureAnimationEnd = '';
                // CONTROLSCONTAINER:
                if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
                // MANUAL:
                if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);

                // CUSTOM DIRECTION NAV:
                if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav);

                // RANDOMIZE:
                if (slider.vars.randomize) {
                    slider.slides.sort(function () { return (Math.round(Math.random()) - 0.5); });
                    slider.container.empty().append(slider.slides);
                }

                slider.doMath();

                // INIT
                slider.setup("init");

                // CONTROLNAV:
                if (slider.vars.controlNav) { methods.controlNav.setup(); }

                // DIRECTIONNAV:
                if (slider.vars.directionNav) { methods.directionNav.setup(); }

                // KEYBOARD:
                if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
                    $(document).bind('keyup', function (event) {
                        var keycode = event.keyCode;
                        if (!slider.animating && (keycode === 39 || keycode === 37)) {
                            var target = (keycode === 39) ? slider.getTarget('next') :
                                         (keycode === 37) ? slider.getTarget('prev') : false;
                            slider.flexAnimate(target, slider.vars.pauseOnAction);
                        }
                    });
                }
                // MOUSEWHEEL:
                if (slider.vars.mousewheel) {
                    slider.bind('mousewheel', function (event, delta, deltaX, deltaY) {
                        event.preventDefault();
                        var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
                        slider.flexAnimate(target, slider.vars.pauseOnAction);
                    });
                }

                // PAUSEPLAY
                if (slider.vars.pausePlay) { methods.pausePlay.setup(); }

                //PAUSE WHEN INVISIBLE
                if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }

                // SLIDSESHOW
                if (slider.vars.slideshow) {
                    if (slider.vars.pauseOnHover) {
                        slider.hover(function () {
                            if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
                        }, function () {
                            if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
                        });
                    }
                    // initialize animation
                    //If we're visible, or we don't use PageVisibility API
                    if (!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
                        (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
                    }
                }

                // ASNAV:
                if (asNav) { methods.asNav.setup(); }

                // TOUCH
                if (touch && slider.vars.touch) { methods.touch(); }

                // FADE&&SMOOTHHEIGHT || SLIDE:
                if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); }

                slider.find("img").attr("draggable", "false");

                // API: start() Callback
                setTimeout(function () {
                    slider.vars.start(slider);
                }, 200);
            },
            asNav: {
                setup: function () {
                    slider.asNav = true;
                    slider.animatingTo = Math.floor(slider.currentSlide / slider.move);
                    slider.currentItem = slider.currentSlide;
                    slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
                    if (!msGesture) {
                        slider.slides.on(eventType, function (e) {
                            e.preventDefault();
                            var $slide = $(this),
                                target = $slide.index();
                            var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
                            if (posFromLeft <= 0 && $slide.hasClass(namespace + 'active-slide')) {
                                slider.flexAnimate(slider.getTarget("prev"), true);
                            } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
                                slider.direction = (slider.currentItem < target) ? "next" : "prev";
                                slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
                            }
                        });
                    } else {
                        el._slider = slider;
                        slider.slides.each(function () {
                            var that = this;
                            that._gesture = new MSGesture();
                            that._gesture.target = that;
                            that.addEventListener("MSPointerDown", function (e) {
                                e.preventDefault();
                                if (e.currentTarget._gesture) {
                                    e.currentTarget._gesture.addPointer(e.pointerId);
                                }
                            }, false);
                            that.addEventListener("MSGestureTap", function (e) {
                                e.preventDefault();
                                var $slide = $(this),
                                    target = $slide.index();
                                if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
                                    slider.direction = (slider.currentItem < target) ? "next" : "prev";
                                    slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
                                }
                            });
                        });
                    }
                }
            },
            controlNav: {
                setup: function () {
                    if (!slider.manualControls) {
                        methods.controlNav.setupPaging();
                    } else { // MANUALCONTROLS:
                        methods.controlNav.setupManual();
                    }
                },
                setupPaging: function () {
                    var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
                        j = 1,
                        item,
                        slide;

                    slider.controlNavScaffold = $('<ol class="' + namespace + 'control-nav ' + namespace + type + '"></ol>');

                    if (slider.pagingCount > 1) {
                        for (var i = 0; i < slider.pagingCount; i++) {
                            slide = slider.slides.eq(i);
                            if (undefined === slide.attr('data-thumb-alt')) { slide.attr('data-thumb-alt', ''); }
                            var altText = ('' !== slide.attr('data-thumb-alt')) ? altText = ' alt="' + slide.attr('data-thumb-alt') + '"' : '';
                            item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr('data-thumb') + '"' + altText + '/>' : '<a href="#">' + j + '</a>';
                            if ('thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions) {
                                var captn = slide.attr('data-thumbcaption');
                                if ('' !== captn && undefined !== captn) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
                            }
                            slider.controlNavScaffold.append('<li>' + item + '</li>');
                            j++;
                        }
                    }

                    // CONTROLSCONTAINER:
                    (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
                    methods.controlNav.set();

                    methods.controlNav.active();

                    slider.controlNavScaffold.delegate('a, img', eventType, function (event) {
                        event.preventDefault();

                        if (watchedEvent === "" || watchedEvent === event.type) {
                            var $this = $(this),
                                target = slider.controlNav.index($this);

                            if (!$this.hasClass(namespace + 'active')) {
                                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
                                slider.flexAnimate(target, slider.vars.pauseOnAction);
                            }
                        }

                        // setup flags to prevent event duplication
                        if (watchedEvent === "") {
                            watchedEvent = event.type;
                        }
                        methods.setToClearWatchedEvent();

                    });
                },
                setupManual: function () {
                    slider.controlNav = slider.manualControls;
                    methods.controlNav.active();

                    slider.controlNav.bind(eventType, function (event) {
                        event.preventDefault();

                        if (watchedEvent === "" || watchedEvent === event.type) {
                            var $this = $(this),
                                target = slider.controlNav.index($this);

                            if (!$this.hasClass(namespace + 'active')) {
                                (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
                                slider.flexAnimate(target, slider.vars.pauseOnAction);
                            }
                        }

                        // setup flags to prevent event duplication
                        if (watchedEvent === "") {
                            watchedEvent = event.type;
                        }
                        methods.setToClearWatchedEvent();
                    });
                },
                set: function () {
                    var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
                    slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
                },
                active: function () {
                    slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
                },
                update: function (action, pos) {
                    if (slider.pagingCount > 1 && action === "add") {
                        slider.controlNavScaffold.append($('<li><a href="#">' + slider.count + '</a></li>'));
                    } else if (slider.pagingCount === 1) {
                        slider.controlNavScaffold.find('li').remove();
                    } else {
                        slider.controlNav.eq(pos).closest('li').remove();
                    }
                    methods.controlNav.set();
                    (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
                }
            },
            directionNav: {
                setup: function () {
                    var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');

                    // CUSTOM DIRECTION NAV:
                    if (slider.customDirectionNav) {
                        slider.directionNav = slider.customDirectionNav;
                        // CONTROLSCONTAINER:
                    } else if (slider.controlsContainer) {
                        $(slider.controlsContainer).append(directionNavScaffold);
                        slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
                    } else {
                        slider.append(directionNavScaffold);
                        slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
                    }

                    methods.directionNav.update();

                    slider.directionNav.bind(eventType, function (event) {
                        event.preventDefault();
                        var target;

                        if (watchedEvent === "" || watchedEvent === event.type) {
                            target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
                            slider.flexAnimate(target, slider.vars.pauseOnAction);
                        }

                        // setup flags to prevent event duplication
                        if (watchedEvent === "") {
                            watchedEvent = event.type;
                        }
                        methods.setToClearWatchedEvent();
                    });
                },
                update: function () {
                    var disabledClass = namespace + 'disabled';
                    if (slider.pagingCount === 1) {
                        slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
                    } else if (!slider.vars.animationLoop) {
                        if (slider.animatingTo === 0) {
                            slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
                        } else if (slider.animatingTo === slider.last) {
                            slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
                        } else {
                            slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
                        }
                    } else {
                        slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
                    }
                }
            },
            pausePlay: {
                setup: function () {
                    var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a href="#"></a></div>');

                    // CONTROLSCONTAINER:
                    if (slider.controlsContainer) {
                        slider.controlsContainer.append(pausePlayScaffold);
                        slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
                    } else {
                        slider.append(pausePlayScaffold);
                        slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
                    }

                    methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');

                    slider.pausePlay.bind(eventType, function (event) {
                        event.preventDefault();

                        if (watchedEvent === "" || watchedEvent === event.type) {
                            if ($(this).hasClass(namespace + 'pause')) {
                                slider.manualPause = true;
                                slider.manualPlay = false;
                                slider.pause();
                            } else {
                                slider.manualPause = false;
                                slider.manualPlay = true;
                                slider.play();
                            }
                        }

                        // setup flags to prevent event duplication
                        if (watchedEvent === "") {
                            watchedEvent = event.type;
                        }
                        methods.setToClearWatchedEvent();
                    });
                },
                update: function (state) {
                    (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
                }
            },
            touch: function () {
                var startX,
                  startY,
                  offset,
                  cwidth,
                  dx,
                  startT,
                  onTouchStart,
                  onTouchMove,
                  onTouchEnd,
                  scrolling = false,
                  localX = 0,
                  localY = 0,
                  accDx = 0;

                if (!msGesture) {
                    onTouchStart = function (e) {
                        if (slider.animating) {
                            e.preventDefault();
                        } else if ((window.navigator.msPointerEnabled) || e.touches.length === 1) {
                            slider.pause();
                            // CAROUSEL:
                            cwidth = (vertical) ? slider.h : slider.w;
                            startT = Number(new Date());
                            // CAROUSEL:

                            // Local vars for X and Y points.
                            localX = e.touches[0].pageX;
                            localY = e.touches[0].pageY;

                            offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                                     (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                                     (carousel && slider.currentSlide === slider.last) ? slider.limit :
                                     (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
                                     (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
                            startX = (vertical) ? localY : localX;
                            startY = (vertical) ? localX : localY;

                            el.addEventListener('touchmove', onTouchMove, false);
                            el.addEventListener('touchend', onTouchEnd, false);
                        }
                    };

                    onTouchMove = function (e) {
                        // Local vars for X and Y points.

                        localX = e.touches[0].pageX;
                        localY = e.touches[0].pageY;

                        dx = (vertical) ? startX - localY : startX - localX;
                        scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));

                        var fxms = 500;

                        if (!scrolling || Number(new Date()) - startT > fxms) {
                            e.preventDefault();
                            if (!fade && slider.transitions) {
                                if (!slider.vars.animationLoop) {
                                    dx = dx / ((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx) / cwidth + 2) : 1);
                                }
                                slider.setProps(offset + dx, "setTouch");
                            }
                        }
                    };

                    onTouchEnd = function (e) {
                        // finish the touch by undoing the touch session
                        el.removeEventListener('touchmove', onTouchMove, false);

                        if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
                            var updateDx = (reverse) ? -dx : dx,
                                target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');

                            if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth / 2)) {
                                slider.flexAnimate(target, slider.vars.pauseOnAction);
                            } else {
                                if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
                            }
                        }
                        el.removeEventListener('touchend', onTouchEnd, false);

                        startX = null;
                        startY = null;
                        dx = null;
                        offset = null;
                    };

                    el.addEventListener('touchstart', onTouchStart, false);
                } else {
                    el.style.msTouchAction = "none";
                    el._gesture = new MSGesture();
                    el._gesture.target = el;
                    el.addEventListener("MSPointerDown", onMSPointerDown, false);
                    el._slider = slider;
                    el.addEventListener("MSGestureChange", onMSGestureChange, false);
                    el.addEventListener("MSGestureEnd", onMSGestureEnd, false);

                    function onMSPointerDown(e) {
                        e.stopPropagation();
                        if (slider.animating) {
                            e.preventDefault();
                        } else {
                            slider.pause();
                            el._gesture.addPointer(e.pointerId);
                            accDx = 0;
                            cwidth = (vertical) ? slider.h : slider.w;
                            startT = Number(new Date());
                            // CAROUSEL:

                            offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
                                (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                                    (carousel && slider.currentSlide === slider.last) ? slider.limit :
                                        (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
                                            (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
                        }
                    }

                    function onMSGestureChange(e) {
                        e.stopPropagation();
                        var slider = e.target._slider;
                        if (!slider) {
                            return;
                        }
                        var transX = -e.translationX,
                            transY = -e.translationY;

                        //Accumulate translations.
                        accDx = accDx + ((vertical) ? transY : transX);
                        dx = accDx;
                        scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));

                        if (e.detail === e.MSGESTURE_FLAG_INERTIA) {
                            setImmediate(function () {
                                el._gesture.stop();
                            });

                            return;
                        }

                        if (!scrolling || Number(new Date()) - startT > 500) {
                            e.preventDefault();
                            if (!fade && slider.transitions) {
                                if (!slider.vars.animationLoop) {
                                    dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
                                }
                                slider.setProps(offset + dx, "setTouch");
                            }
                        }
                    }

                    function onMSGestureEnd(e) {
                        e.stopPropagation();
                        var slider = e.target._slider;
                        if (!slider) {
                            return;
                        }
                        if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
                            var updateDx = (reverse) ? -dx : dx,
                                target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');

                            if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth / 2)) {
                                slider.flexAnimate(target, slider.vars.pauseOnAction);
                            } else {
                                if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
                            }
                        }

                        startX = null;
                        startY = null;
                        dx = null;
                        offset = null;
                        accDx = 0;
                    }
                }
            },
            resize: function () {
                if (!slider.animating && slider.is(':visible')) {
                    if (!carousel) { slider.doMath(); }

                    if (fade) {
                        // SMOOTH HEIGHT:
                        methods.smoothHeight();
                    } else if (carousel) { //CAROUSEL:
                        slider.slides.width(slider.computedW);
                        slider.update(slider.pagingCount);
                        slider.setProps();
                    }
                    else if (vertical) { //VERTICAL:
                        slider.viewport.height(slider.h);
                        slider.setProps(slider.h, "setTotal");
                    } else {
                        // SMOOTH HEIGHT:
                        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
                        slider.newSlides.width(slider.computedW);
                        slider.setProps(slider.computedW, "setTotal");
                    }
                }
            },
            smoothHeight: function (dur) {
                if (!vertical || fade) {
                    var $obj = (fade) ? slider : slider.viewport;
                    (dur) ? $obj.animate({ "height": slider.slides.eq(slider.animatingTo).innerHeight() }, dur).css('overflow', 'visible') : $obj.innerHeight(slider.slides.eq(slider.animatingTo).innerHeight());
                }
            },
            sync: function (action) {
                var $obj = $(slider.vars.sync).data("flexslider"),
                    target = slider.animatingTo;

                switch (action) {
                    case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
                    case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
                    case "pause": $obj.pause(); break;
                }
            },
            uniqueID: function ($clone) {
                // Append _clone to current level and children elements with id attributes
                $clone.filter('[id]').add($clone.find('[id]')).each(function () {
                    var $this = $(this);
                    $this.attr('id', $this.attr('id') + '_clone');
                });
                return $clone;
            },
            pauseInvisible: {
                visProp: null,
                init: function () {
                    var visProp = methods.pauseInvisible.getHiddenProp();
                    if (visProp) {
                        var evtname = visProp.replace(/[H|h]idden/, '') + 'visibilitychange';
                        document.addEventListener(evtname, function () {
                            if (methods.pauseInvisible.isHidden()) {
                                if (slider.startTimeout) {
                                    clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
                                } else {
                                    slider.pause(); //Or just pause
                                }
                            }
                            else {
                                if (slider.started) {
                                    slider.play(); //Initiated before, just play
                                } else {
                                    if (slider.vars.initDelay > 0) {
                                        setTimeout(slider.play, slider.vars.initDelay);
                                    } else {
                                        slider.play(); //Didn't init before: simply init or wait for it
                                    }
                                }
                            }
                        });
                    }
                },
                isHidden: function () {
                    var prop = methods.pauseInvisible.getHiddenProp();
                    if (!prop) {
                        return false;
                    }
                    return document[prop];
                },
                getHiddenProp: function () {
                    var prefixes = ['webkit', 'moz', 'ms', 'o'];
                    // if 'hidden' is natively supported just return it
                    if ('hidden' in document) {
                        return 'hidden';
                    }
                    // otherwise loop over all the known prefixes until we find one
                    for (var i = 0; i < prefixes.length; i++) {
                        if ((prefixes[i] + 'Hidden') in document) {
                            return prefixes[i] + 'Hidden';
                        }
                    }
                    // otherwise it's not supported
                    return null;
                }
            },
            setToClearWatchedEvent: function () {
                clearTimeout(watchedEventClearTimer);
                watchedEventClearTimer = setTimeout(function () {
                    watchedEvent = "";
                }, 3000);
            }
        };

        // public methods
        slider.flexAnimate = function (target, pause, override, withSync, fromNav) {
            if (!slider.vars.animationLoop && target !== slider.currentSlide) {
                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
            }

            if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";

            if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
                if (asNav && withSync) {
                    var master = $(slider.vars.asNavFor).data('flexslider');
                    slider.atEnd = target === 0 || target === slider.count - 1;
                    master.flexAnimate(target, true, false, true, fromNav);
                    slider.direction = (slider.currentItem < target) ? "next" : "prev";
                    master.direction = slider.direction;

                    if (Math.ceil((target + 1) / slider.visible) - 1 !== slider.currentSlide && target !== 0) {
                        slider.currentItem = target;
                        slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
                        target = Math.floor(target / slider.visible);
                    } else {
                        slider.currentItem = target;
                        slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
                        return false;
                    }
                }

                slider.animating = true;
                slider.animatingTo = target;

                // SLIDESHOW:
                if (pause) { slider.pause(); }

                // API: before() animation Callback
                slider.vars.before(slider);

                // SYNC:
                if (slider.syncExists && !fromNav) { methods.sync("animate"); }

                // CONTROLNAV
                if (slider.vars.controlNav) { methods.controlNav.active(); }

                // !CAROUSEL:
                // CANDIDATE: slide active class (for add/remove slide)
                if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); }

                // INFINITE LOOP:
                // CANDIDATE: atEnd
                slider.atEnd = target === 0 || target === slider.last;

                // DIRECTIONNAV:
                if (slider.vars.directionNav) { methods.directionNav.update(); }

                if (target === slider.last) {
                    // API: end() of cycle Callback
                    slider.vars.end(slider);
                    // SLIDESHOW && !INFINITE LOOP:
                    if (!slider.vars.animationLoop) { slider.pause(); }
                }

                // SLIDE:
                if (!fade) {
                    var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
                        margin, slideString, calcNext;

                    // INFINITE LOOP / REVERSE:
                    if (carousel) {
                        margin = slider.vars.itemMargin;
                        calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
                        slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
                    } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
                        slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0;
                    } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
                        slideString = (reverse) ? 0 : (slider.count + 1) * dimension;
                    } else {
                        slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
                    }
                    slider.setProps(slideString, "", slider.vars.animationSpeed);
                    if (slider.transitions) {
                        if (!slider.vars.animationLoop || !slider.atEnd) {
                            slider.animating = false;
                            slider.currentSlide = slider.animatingTo;
                        }

                        // Unbind previous transitionEnd events and re-bind new transitionEnd event
                        slider.container.unbind("webkitTransitionEnd transitionend");
                        slider.container.bind("webkitTransitionEnd transitionend", function () {
                            clearTimeout(slider.ensureAnimationEnd);
                            slider.wrapup(dimension);
                        });

                        // Insurance for the ever-so-fickle transitionEnd event
                        clearTimeout(slider.ensureAnimationEnd);
                        slider.ensureAnimationEnd = setTimeout(function () {
                            slider.wrapup(dimension);
                        }, slider.vars.animationSpeed + 100);

                    } else {
                        slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function () {
                            slider.wrapup(dimension);
                        });
                    }
                } else { // FADE:
                    if (!touch) {
                        //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing);
                        //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);

                        slider.slides.eq(slider.currentSlide).css({ "zIndex": 1, "display": "none" }).animate({ "opacity": 0 }, slider.vars.animationSpeed, slider.vars.easing);
                        slider.slides.eq(target).css({ "zIndex": 2, "display": "block" }).animate({ "opacity": 1 }, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);

                    } else {
                        slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1, "display": "none" });
                        slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2, "display": "block" });
                        slider.wrapup(dimension);
                    }
                }
                // SMOOTH HEIGHT:
                if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
            }
        };
        slider.wrapup = function (dimension) {
            // SLIDE:
            if (!fade && !carousel) {
                if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
                    slider.setProps(dimension, "jumpEnd");
                } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
                    slider.setProps(dimension, "jumpStart");
                }
            }
            slider.animating = false;
            slider.currentSlide = slider.animatingTo;
            // API: after() animation Callback
            slider.vars.after(slider);
        };

        // SLIDESHOW:
        slider.animateSlides = function () {
            if (!slider.animating && focused) { slider.flexAnimate(slider.getTarget("next")); }
        };
        // SLIDESHOW:
        slider.pause = function () {
            clearInterval(slider.animatedSlides);
            slider.animatedSlides = null;
            slider.playing = false;
            // PAUSEPLAY:
            if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
            // SYNC:
            if (slider.syncExists) { methods.sync("pause"); }
        };
        // SLIDESHOW:
        slider.play = function () {
            if (slider.playing) { clearInterval(slider.animatedSlides); }
            slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
            slider.started = slider.playing = true;
            // PAUSEPLAY:
            if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
            // SYNC:
            if (slider.syncExists) { methods.sync("play"); }
        };
        // STOP:
        slider.stop = function () {
            slider.pause();
            slider.stopped = true;
        };
        slider.canAdvance = function (target, fromNav) {
            // ASNAV:
            var last = (asNav) ? slider.pagingCount - 1 : slider.last;
            return (fromNav) ? true :
                   (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
                   (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
                   (target === slider.currentSlide && !asNav) ? false :
                   (slider.vars.animationLoop) ? true :
                   (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
                   (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
                   true;
        };
        slider.getTarget = function (dir) {
            slider.direction = dir;
            if (dir === "next") {
                return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
            } else {
                return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
            }
        };

        // SLIDE:
        slider.setProps = function (pos, special, dur) {
            var target = (function () {
                var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
                    posCalc = (function () {
                        if (carousel) {
                            return (special === "setTouch") ? pos :
                                   (reverse && slider.animatingTo === slider.last) ? 0 :
                                   (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
                                   (slider.animatingTo === slider.last) ? slider.limit : posCheck;
                        } else {
                            switch (special) {
                                case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
                                case "setTouch": return (reverse) ? pos : pos;
                                case "jumpEnd": return (reverse) ? pos : slider.count * pos;
                                case "jumpStart": return (reverse) ? slider.count * pos : pos;
                                default: return pos;
                            }
                        }
                    }());

                return (posCalc * -1) + "px";
            }());

            if (slider.transitions) {
                target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)";
                dur = (dur !== undefined) ? (dur / 1000) + "s" : "0s";
                slider.container.css("-" + slider.pfx + "-transition-duration", dur);
                slider.container.css("transition-duration", dur);
            }

            slider.args[slider.prop] = target;
            if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }

            slider.container.css('transform', target);
        };

        slider.setup = function (type) {
            // SLIDE:
            if (!fade) {
                var sliderOffset, arr;

                if (type === "init") {
                    slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({ "overflow": "hidden", "position": "relative" }).appendTo(slider).append(slider.container);
                    // INFINITE LOOP:
                    slider.cloneCount = 0;
                    slider.cloneOffset = 0;
                    // REVERSE:
                    if (reverse) {
                        arr = $.makeArray(slider.slides).reverse();
                        slider.slides = $(arr);
                        slider.container.empty().append(slider.slides);
                    }
                }
                // INFINITE LOOP && !CAROUSEL:
                if (slider.vars.animationLoop && !carousel) {
                    slider.cloneCount = 2;
                    slider.cloneOffset = 1;
                    // clear out old clones
                    if (type !== "init") { slider.container.find('.clone').remove(); }
                    slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true'))
                                    .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true'));
                }
                slider.newSlides = $(slider.vars.selector, slider);

                sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
                // VERTICAL:
                if (vertical && !carousel) {
                    slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
                    setTimeout(function () {
                        slider.newSlides.css({ "display": "block" });
                        slider.doMath();
                        slider.viewport.height(slider.h);
                        slider.setProps(sliderOffset * slider.h, "init");
                    }, (type === "init") ? 100 : 0);
                } else {
                    slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
                    slider.setProps(sliderOffset * slider.computedW, "init");
                    setTimeout(function () {
                        slider.doMath();
                        slider.newSlides.css({ "width": slider.computedW, "marginRight": slider.computedM, "float": "left", "display": "block" });
                        // SMOOTH HEIGHT:
                        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
                    }, (type === "init") ? 100 : 0);
                }
            } else { // FADE:
                slider.slides.css({ "width": "100%", "float": "left", "marginRight": "-100%", "position": "relative" });
                if (type === "init") {
                    if (!touch) {
                        //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
                        if (slider.vars.fadeFirstSlide == false) {
                            slider.slides.css({ "opacity": 0, "display": "none", "zIndex": 1 }).eq(slider.currentSlide).css({ "zIndex": 2, "display": "block" }).css({ "opacity": 1 });
                        } else {
                            slider.slides.css({ "opacity": 0, "display": "none", "zIndex": 1 }).eq(slider.currentSlide).css({ "zIndex": 2, "display": "block" }).animate({ "opacity": 1 }, slider.vars.animationSpeed, slider.vars.easing);
                        }
                    } else {
                        slider.slides.css({ "opacity": 0, "display": "none", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2, "display": "block" });
                    }
                }
                // SMOOTH HEIGHT:
                if (slider.vars.smoothHeight) { methods.smoothHeight(); }
            }
            // !CAROUSEL:
            // CANDIDATE: active slide
            if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }

            //FlexSlider: init() Callback
            slider.vars.init(slider);
        };

        slider.doMath = function () {
            var slide = slider.slides.first(),
                slideMargin = slider.vars.itemMargin,
                minItems = slider.vars.minItems,
                maxItems = slider.vars.maxItems;

            slider.w = (slider.viewport === undefined) ? slider.width() : slider.viewport.width();
            slider.h = slide.height();
            slider.boxPadding = slide.outerWidth() - slide.width();

            // CAROUSEL:
            if (carousel) {
                slider.itemT = slider.vars.itemWidth + slideMargin;
                slider.itemM = slideMargin;
                slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
                slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
                slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1))) / minItems :
                               (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1))) / maxItems :
                               (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;

                slider.visible = Math.floor(slider.w / (slider.itemW));
                slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible) ? slider.vars.move : slider.visible;
                slider.pagingCount = Math.ceil(((slider.count - slider.visible) / slider.move) + 1);
                slider.last = slider.pagingCount - 1;
                slider.limit = (slider.pagingCount === 1) ? 0 :
                               (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
            } else {
                slider.itemW = slider.w;
                slider.itemM = slideMargin;
                slider.pagingCount = slider.count;
                slider.last = slider.count - 1;
            }
            slider.computedW = slider.itemW - slider.boxPadding;
            slider.computedM = slider.itemM;
        };

        slider.update = function (pos, action) {
            slider.doMath();

            // update currentSlide and slider.animatingTo if necessary
            if (!carousel) {
                if (pos < slider.currentSlide) {
                    slider.currentSlide += 1;
                } else if (pos <= slider.currentSlide && pos !== 0) {
                    slider.currentSlide -= 1;
                }
                slider.animatingTo = slider.currentSlide;
            }

            // update controlNav
            if (slider.vars.controlNav && !slider.manualControls) {
                if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
                    methods.controlNav.update("add");
                } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
                    if (carousel && slider.currentSlide > slider.last) {
                        slider.currentSlide -= 1;
                        slider.animatingTo -= 1;
                    }
                    methods.controlNav.update("remove", slider.last);
                }
            }
            // update directionNav
            if (slider.vars.directionNav) { methods.directionNav.update(); }

        };

        slider.addSlide = function (obj, pos) {
            var $obj = $(obj);

            slider.count += 1;
            slider.last = slider.count - 1;

            // append new slide
            if (vertical && reverse) {
                (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
            } else {
                (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
            }

            // update currentSlide, animatingTo, controlNav, and directionNav
            slider.update(pos, "add");

            // update slider.slides
            slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
            // re-setup the slider to accomdate new slide
            slider.setup();

            //FlexSlider: added() Callback
            slider.vars.added(slider);
        };
        slider.removeSlide = function (obj) {
            var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;

            // update count
            slider.count -= 1;
            slider.last = slider.count - 1;

            // remove slide
            if (isNaN(obj)) {
                $(obj, slider.slides).remove();
            } else {
                (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
            }

            // update currentSlide, animatingTo, controlNav, and directionNav
            slider.doMath();
            slider.update(pos, "remove");

            // update slider.slides
            slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
            // re-setup the slider to accomdate new slide
            slider.setup();

            // FlexSlider: removed() Callback
            slider.vars.removed(slider);
        };

        //FlexSlider: Initialize
        methods.init();
    };

    // Ensure the slider isn't focussed if the window loses focus.
    $(window).blur(function (e) {
        focused = false;
    }).focus(function (e) {
        focused = true;
    });

    //FlexSlider: Default Settings
    $.flexslider.defaults = {
        namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
        selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
        animation: "fade",              //String: Select your animation type, "fade" or "slide"
        easing: "swing",                //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
        direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
        reverse: false,                 //{NEW} Boolean: Reverse the animation direction
        animationLoop: true,            //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
        smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
        startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
        slideshow: true,                //Boolean: Animate slider automatically
        slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
        animationSpeed: 600,            //Integer: Set the speed of animations, in milliseconds
        initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
        randomize: false,               //Boolean: Randomize slide order
        fadeFirstSlide: true,           //Boolean: Fade in the first slide when animation type is "fade"
        thumbCaptions: false,           //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.

        // Usability features
        pauseOnAction: true,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
        pauseOnHover: false,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
        pauseInvisible: true,   		//{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
        useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
        touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
        video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches

        // Primary Controls
        controlNav: true,               //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
        directionNav: true,             //Boolean: Create navigation for previous/next navigation? (true/false)
        prevText: "Previous",           //String: Set the text for the "previous" directionNav item
        nextText: "Next",               //String: Set the text for the "next" directionNav item

        // Secondary Navigation
        keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
        multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
        mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
        pausePlay: false,               //Boolean: Create pause/play dynamic element
        pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
        playText: "Play",               //String: Set the text for the "play" pausePlay item

        // Special properties
        controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
        manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
        customDirectionNav: "",         //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace)
        sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
        asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider

        // Carousel Options
        itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
        itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
        minItems: 1,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
        maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
        move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
        allowOneSlide: true,           //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide

        // Callback API
        start: function () { },            //Callback: function(slider) - Fires when the slider loads the first slide
        before: function () { },           //Callback: function(slider) - Fires asynchronously with each slider animation
        after: function () { },            //Callback: function(slider) - Fires after each slider animation completes
        end: function () { },              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
        added: function () { },            //{NEW} Callback: function(slider) - Fires after a slide is added
        removed: function () { },           //{NEW} Callback: function(slider) - Fires after a slide is removed
        init: function () { }             //{NEW} Callback: function(slider) - Fires after the slider is initially setup
    };

    //FlexSlider: Plugin Function
    $.fn.flexslider = function (options) {
        if (options === undefined) { options = {}; }

        if (typeof options === "object") {
            return this.each(function () {
                var $this = $(this),
                    selector = (options.selector) ? options.selector : ".slides > li",
                    $slides = $this.find(selector);

                if (($slides.length === 1 && options.allowOneSlide === false) || $slides.length === 0) {
                    $slides.fadeIn(400);
                    if (options.start) { options.start($this); }
                } else if ($this.data('flexslider') === undefined) {
                    new $.flexslider(this, options);
                }
            });
        } else {
            // Helper strings to quickly perform functions on the slider
            var $slider = $(this).data('flexslider');
            switch (options) {
                case "play": $slider.play(); break;
                case "pause": $slider.pause(); break;
                case "stop": $slider.stop(); break;
                case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
                case "prev":
                case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
                default: if (typeof options === "number") { $slider.flexAnimate(options, true); }
            }
        }
    };
})(jQuery);;(function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports!="undefined"?module.exports=n(require("jquery")):n(jQuery)})(function(n){"use strict";var t=window.Slick||{};t=function(){function i(i,r){var u=this,f;u.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:n(i),appendDots:n(i),arrows:!0,asNavFor:null,prevArrow:'<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous<\/button>',nextArrow:'<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next<\/button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(n,t){return'<button type="button" data-role="none" role="button" aria-required="false" tabindex="0">'+(t+1)+"<\/button>"},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!1,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3};u.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1};n.extend(u,u.initials);u.activeBreakpoint=null;u.animType=null;u.animProp=null;u.breakpoints=[];u.breakpointSettings=[];u.cssTransitions=!1;u.hidden="hidden";u.paused=!1;u.positionProp=null;u.respondTo=null;u.rowCount=1;u.shouldClick=!0;u.$slider=n(i);u.$slidesCache=null;u.transformType=null;u.transitionType=null;u.visibilityChange="visibilitychange";u.windowWidth=0;u.windowTimer=null;f=n(i).data("slick")||{};u.options=n.extend({},u.defaults,f,r);u.currentSlide=u.options.initialSlide;u.originalSettings=u.options;typeof document.mozHidden!="undefined"?(u.hidden="mozHidden",u.visibilityChange="mozvisibilitychange"):typeof document.webkitHidden!="undefined"&&(u.hidden="webkitHidden",u.visibilityChange="webkitvisibilitychange");u.autoPlay=n.proxy(u.autoPlay,u);u.autoPlayClear=n.proxy(u.autoPlayClear,u);u.changeSlide=n.proxy(u.changeSlide,u);u.clickHandler=n.proxy(u.clickHandler,u);u.selectHandler=n.proxy(u.selectHandler,u);u.setPosition=n.proxy(u.setPosition,u);u.swipeHandler=n.proxy(u.swipeHandler,u);u.dragHandler=n.proxy(u.dragHandler,u);u.keyHandler=n.proxy(u.keyHandler,u);u.autoPlayIterator=n.proxy(u.autoPlayIterator,u);u.instanceUid=t++;u.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/;u.registerBreakpoints();u.init(!0);u.checkResponsive(!0)}var t=0;return i}();t.prototype.addSlide=t.prototype.slickAdd=function(t,i,r){var u=this;if(typeof i=="boolean")r=i,i=null;else if(i<0||i>=u.slideCount)return!1;u.unload();typeof i=="number"?i===0&&u.$slides.length===0?n(t).appendTo(u.$slideTrack):r?n(t).insertBefore(u.$slides.eq(i)):n(t).insertAfter(u.$slides.eq(i)):r===!0?n(t).prependTo(u.$slideTrack):n(t).appendTo(u.$slideTrack);u.$slides=u.$slideTrack.children(this.options.slide);u.$slideTrack.children(this.options.slide).detach();u.$slideTrack.append(u.$slides);u.$slides.each(function(t,i){n(i).attr("data-slick-index",t)});u.$slidesCache=u.$slides;u.reinit()};t.prototype.animateHeight=function(){var n=this,t;n.options.slidesToShow===1&&n.options.adaptiveHeight===!0&&n.options.vertical===!1&&(t=n.$slides.eq(n.currentSlide).outerHeight(!0),n.$list.animate({height:t},n.options.speed))};t.prototype.animateSlide=function(t,i){var u={},r=this;r.animateHeight();r.options.rtl===!0&&r.options.vertical===!1&&(t=-t);r.transformsEnabled===!1?r.options.vertical===!1?r.$slideTrack.animate({left:t},r.options.speed,r.options.easing,i):r.$slideTrack.animate({top:t},r.options.speed,r.options.easing,i):r.cssTransitions===!1?(r.options.rtl===!0&&(r.currentLeft=-r.currentLeft),n({animStart:r.currentLeft}).animate({animStart:t},{duration:r.options.speed,easing:r.options.easing,step:function(n){n=Math.ceil(n);r.options.vertical===!1?(u[r.animType]="translate("+n+"px, 0px)",r.$slideTrack.css(u)):(u[r.animType]="translate(0px,"+n+"px)",r.$slideTrack.css(u))},complete:function(){i&&i.call()}})):(r.applyTransition(),t=Math.ceil(t),u[r.animType]=r.options.vertical===!1?"translate3d("+t+"px, 0px, 0px)":"translate3d(0px,"+t+"px, 0px)",r.$slideTrack.css(u),i&&setTimeout(function(){r.disableTransition();i.call()},r.options.speed))};t.prototype.asNavFor=function(t){var r=this,i=r.options.asNavFor;i&&i!==null&&(i=n(i).not(r.$slider));i!==null&&typeof i=="object"&&i.each(function(){var i=n(this).slick("getSlick");i.unslicked||i.slideHandler(t,!0)})};t.prototype.applyTransition=function(n){var t=this,i={};i[t.transitionType]=t.options.fade===!1?t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:"opacity "+t.options.speed+"ms "+t.options.cssEase;t.options.fade===!1?t.$slideTrack.css(i):t.$slides.eq(n).css(i)};t.prototype.autoPlay=function(){var n=this;n.autoPlayTimer&&clearInterval(n.autoPlayTimer);n.slideCount>n.options.slidesToShow&&n.paused!==!0&&(n.autoPlayTimer=setInterval(n.autoPlayIterator,n.options.autoplaySpeed))};t.prototype.autoPlayClear=function(){var n=this;n.autoPlayTimer&&clearInterval(n.autoPlayTimer)};t.prototype.autoPlayIterator=function(){var n=this;n.options.infinite===!1?n.direction===1?(n.currentSlide+1===n.slideCount-1&&(n.direction=0),n.slideHandler(n.currentSlide+n.options.slidesToScroll)):(n.currentSlide-1==0&&(n.direction=1),n.slideHandler(n.currentSlide-n.options.slidesToScroll)):n.slideHandler(n.currentSlide+n.options.slidesToScroll)};t.prototype.buildArrows=function(){var t=this;t.options.arrows===!0&&(t.$prevArrow=n(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=n(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),t.options.infinite!==!0&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))};t.prototype.buildDots=function(){var t=this,i,r;if(t.options.dots===!0&&t.slideCount>t.options.slidesToShow){for(r='<ul class="'+t.options.dotsClass+'">',i=0;i<=t.getDotCount();i+=1)r+="<li>"+t.options.customPaging.call(this,t,i)+"<\/li>";r+="<\/ul>";t.$dots=n(r).appendTo(t.options.appendDots);t.$dots.find("li").first().addClass("slick-active").attr("aria-hidden","false")}};t.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide");t.slideCount=t.$slides.length;t.$slides.each(function(t,i){n(i).attr("data-slick-index",t).data("originalStyling",n(i).attr("style")||"")});t.$slider.addClass("slick-slider");t.$slideTrack=t.slideCount===0?n('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent();t.$list=t.$slideTrack.wrap('<div aria-live="polite" class="slick-list"/>').parent();t.$slideTrack.css("opacity",0);(t.options.centerMode===!0||t.options.swipeToSlide===!0)&&(t.options.slidesToScroll=1);n("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading");t.setupInfinite();t.buildArrows();t.buildDots();t.updateDots();t.setSlideClasses(typeof t.currentSlide=="number"?t.currentSlide:0);t.options.draggable===!0&&t.$list.addClass("draggable")};t.prototype.buildRows=function(){var n=this,t,i,r,f,c,u,e,o,s,h;if(f=document.createDocumentFragment(),u=n.$slider.children(),n.options.rows>1){for(e=n.options.slidesPerRow*n.options.rows,c=Math.ceil(u.length/e),t=0;t<c;t++){for(o=document.createElement("div"),i=0;i<n.options.rows;i++){for(s=document.createElement("div"),r=0;r<n.options.slidesPerRow;r++)h=t*e+(i*n.options.slidesPerRow+r),u.get(h)&&s.appendChild(u.get(h));o.appendChild(s)}f.appendChild(o)}n.$slider.html(f);n.$slider.children().children().children().css({width:100/n.options.slidesPerRow+"%",display:"inline-block"})}};t.prototype.checkResponsive=function(t,i){var r=this,f,u,e,o=!1,s=r.$slider.width(),h=window.innerWidth||n(window).width();if(r.respondTo==="window"?e=h:r.respondTo==="slider"?e=s:r.respondTo==="min"&&(e=Math.min(h,s)),r.options.responsive&&r.options.responsive.length&&r.options.responsive!==null){u=null;for(f in r.breakpoints)r.breakpoints.hasOwnProperty(f)&&(r.originalSettings.mobileFirst===!1?e<r.breakpoints[f]&&(u=r.breakpoints[f]):e>r.breakpoints[f]&&(u=r.breakpoints[f]));u!==null?r.activeBreakpoint!==null?(u!==r.activeBreakpoint||i)&&(r.activeBreakpoint=u,r.breakpointSettings[u]==="unslick"?r.unslick(u):(r.options=n.extend({},r.originalSettings,r.breakpointSettings[u]),t===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),o=u):(r.activeBreakpoint=u,r.breakpointSettings[u]==="unslick"?r.unslick(u):(r.options=n.extend({},r.originalSettings,r.breakpointSettings[u]),t===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(t)),o=u):r.activeBreakpoint!==null&&(r.activeBreakpoint=null,r.options=r.originalSettings,t===!0&&(r.currentSlide=r.options.initialSlide),r.refresh(t),o=u);t||o===!1||r.$slider.trigger("breakpoint",[r,o])}};t.prototype.changeSlide=function(t,i){var r=this,u=n(t.target),f,e,o,s;u.is("a")&&t.preventDefault();u.is("li")||(u=u.closest("li"));o=r.slideCount%r.options.slidesToScroll!=0;f=o?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll;switch(t.data.message){case"previous":e=f===0?r.options.slidesToScroll:r.options.slidesToShow-f;r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-e,!1,i);break;case"next":e=f===0?r.options.slidesToScroll:f;r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+e,!1,i);break;case"index":s=t.data.index===0?0:t.data.index||u.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(s),!1,i);u.children().trigger("focus");break;default:return}};t.prototype.checkNavigable=function(n){var u=this,t,i,r;if(t=u.getNavigableIndexes(),i=0,n>t[t.length-1])n=t[t.length-1];else for(r in t){if(n<t[r]){n=i;break}i=t[r]}return n};t.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&t.$dots!==null&&(n("li",t.$dots).off("click.slick",t.changeSlide),t.options.pauseOnDotsHover===!0&&t.options.autoplay===!0&&n("li",t.$dots).off("mouseenter.slick",n.proxy(t.setPaused,t,!0)).off("mouseleave.slick",n.proxy(t.setPaused,t,!1)));t.options.arrows===!0&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide));t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler);t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler);t.$list.off("touchend.slick mouseup.slick",t.swipeHandler);t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler);t.$list.off("click.slick",t.clickHandler);n(document).off(t.visibilityChange,t.visibility);t.$list.off("mouseenter.slick",n.proxy(t.setPaused,t,!0));t.$list.off("mouseleave.slick",n.proxy(t.setPaused,t,!1));t.options.accessibility===!0&&t.$list.off("keydown.slick",t.keyHandler);t.options.focusOnSelect===!0&&n(t.$slideTrack).children().off("click.slick",t.selectHandler);n(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange);n(window).off("resize.slick.slick-"+t.instanceUid,t.resize);n("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault);n(window).off("load.slick.slick-"+t.instanceUid,t.setPosition);n(document).off("ready.slick.slick-"+t.instanceUid,t.setPosition)};t.prototype.cleanUpRows=function(){var n=this,t;n.options.rows>1&&(t=n.$slides.children().children(),t.removeAttr("style"),n.$slider.html(t))};t.prototype.clickHandler=function(n){var t=this;t.shouldClick===!1&&(n.stopImmediatePropagation(),n.stopPropagation(),n.preventDefault())};t.prototype.destroy=function(t){var i=this;i.autoPlayClear();i.touchObject={};i.cleanUpEvents();n(".slick-cloned",i.$slider).detach();i.$dots&&i.$dots.remove();i.$prevArrow&&i.$prevArrow.length&&(i.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove());i.$nextArrow&&i.$nextArrow.length&&(i.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove());i.$slides&&(i.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){n(this).attr("style",n(this).data("originalStyling"))}),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.detach(),i.$list.detach(),i.$slider.append(i.$slides));i.cleanUpRows();i.$slider.removeClass("slick-slider");i.$slider.removeClass("slick-initialized");i.unslicked=!0;t||i.$slider.trigger("destroy",[i])};t.prototype.disableTransition=function(n){var t=this,i={};i[t.transitionType]="";t.options.fade===!1?t.$slideTrack.css(i):t.$slides.eq(n).css(i)};t.prototype.fadeSlide=function(n,t){var i=this;i.cssTransitions===!1?(i.$slides.eq(n).css({zIndex:i.options.zIndex}),i.$slides.eq(n).animate({opacity:1},i.options.speed,i.options.easing,t)):(i.applyTransition(n),i.$slides.eq(n).css({opacity:1,zIndex:i.options.zIndex}),t&&setTimeout(function(){i.disableTransition(n);t.call()},i.options.speed))};t.prototype.fadeSlideOut=function(n){var t=this;t.cssTransitions===!1?t.$slides.eq(n).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(n),t.$slides.eq(n).css({opacity:0,zIndex:t.options.zIndex-2}))};t.prototype.filterSlides=t.prototype.slickFilter=function(n){var t=this;n!==null&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(n).appendTo(t.$slideTrack),t.reinit())};t.prototype.getCurrent=t.prototype.slickCurrentSlide=function(){var n=this;return n.currentSlide};t.prototype.getDotCount=function(){var n=this,t=0,i=0,r=0;if(n.options.infinite===!0)while(t<n.slideCount)++r,t=i+n.options.slidesToScroll,i+=n.options.slidesToScroll<=n.options.slidesToShow?n.options.slidesToScroll:n.options.slidesToShow;else if(n.options.centerMode===!0)r=n.slideCount;else while(t<n.slideCount)++r,t=i+n.options.slidesToScroll,i+=n.options.slidesToScroll<=n.options.slidesToShow?n.options.slidesToScroll:n.options.slidesToShow;return r-1};t.prototype.getLeft=function(n){var t=this,f,r,u=0,i;return t.slideOffset=0,r=t.$slides.first().outerHeight(!0),t.options.infinite===!0?(t.slideCount>t.options.slidesToShow&&(t.slideOffset=t.slideWidth*t.options.slidesToShow*-1,u=r*t.options.slidesToShow*-1),t.slideCount%t.options.slidesToScroll!=0&&n+t.options.slidesToScroll>t.slideCount&&t.slideCount>t.options.slidesToShow&&(n>t.slideCount?(t.slideOffset=(t.options.slidesToShow-(n-t.slideCount))*t.slideWidth*-1,u=(t.options.slidesToShow-(n-t.slideCount))*r*-1):(t.slideOffset=t.slideCount%t.options.slidesToScroll*t.slideWidth*-1,u=t.slideCount%t.options.slidesToScroll*r*-1))):n+t.options.slidesToShow>t.slideCount&&(t.slideOffset=(n+t.options.slidesToShow-t.slideCount)*t.slideWidth,u=(n+t.options.slidesToShow-t.slideCount)*r),t.slideCount<=t.options.slidesToShow&&(t.slideOffset=0,u=0),t.options.centerMode===!0&&t.options.infinite===!0?t.slideOffset+=t.slideWidth*Math.floor(t.options.slidesToShow/2)-t.slideWidth:t.options.centerMode===!0&&(t.slideOffset=0,t.slideOffset+=t.slideWidth*Math.floor(t.options.slidesToShow/2)),f=t.options.vertical===!1?n*t.slideWidth*-1+t.slideOffset:n*r*-1+u,t.options.variableWidth===!0&&(i=t.slideCount<=t.options.slidesToShow||t.options.infinite===!1?t.$slideTrack.children(".slick-slide").eq(n):t.$slideTrack.children(".slick-slide").eq(n+t.options.slidesToShow),f=t.options.rtl===!0?i[0]?(t.$slideTrack.width()-i[0].offsetLeft-i.width())*-1:0:i[0]?i[0].offsetLeft*-1:0,t.options.centerMode===!0&&(i=t.slideCount<=t.options.slidesToShow||t.options.infinite===!1?t.$slideTrack.children(".slick-slide").eq(n):t.$slideTrack.children(".slick-slide").eq(n+t.options.slidesToShow+1),f=(t.options.rtl===!0?i[0]?(t.$slideTrack.width()-i[0].offsetLeft-i.width())*-1:0:i[0]?i[0].offsetLeft*-1:0)+(t.$list.width()-i.outerWidth())/2)),f};t.prototype.getOption=t.prototype.slickGetOption=function(n){var t=this;return t.options[n]};t.prototype.getNavigableIndexes=function(){var n=this,t=0,i=0,u=[],r;for(n.options.infinite===!1?r=n.slideCount:(t=n.options.slidesToScroll*-1,i=n.options.slidesToScroll*-1,r=n.slideCount*2);t<r;)u.push(t),t=i+n.options.slidesToScroll,i+=n.options.slidesToScroll<=n.options.slidesToShow?n.options.slidesToScroll:n.options.slidesToShow;return u};t.prototype.getSlick=function(){return this};t.prototype.getSlideCount=function(){var t=this,i,r;return r=t.options.centerMode===!0?t.slideWidth*Math.floor(t.options.slidesToShow/2):0,t.options.swipeToSlide===!0?(t.$slideTrack.find(".slick-slide").each(function(u,f){if(f.offsetLeft-r+n(f).outerWidth()/2>t.swipeLeft*-1)return i=f,!1}),Math.abs(n(i).attr("data-slick-index")-t.currentSlide)||1):t.options.slidesToScroll};t.prototype.goTo=t.prototype.slickGoTo=function(n,t){var i=this;i.changeSlide({data:{message:"index",index:parseInt(n)}},t)};t.prototype.init=function(t){var i=this;n(i.$slider).hasClass("slick-initialized")||(n(i.$slider).addClass("slick-initialized"),i.buildRows(),i.buildOut(),i.setProps(),i.startLoad(),i.loadSlider(),i.initializeEvents(),i.updateArrows(),i.updateDots());t&&i.$slider.trigger("init",[i]);i.options.accessibility===!0&&i.initADA()};t.prototype.initArrowEvents=function(){var n=this;if(n.options.arrows===!0&&n.slideCount>n.options.slidesToShow){n.$prevArrow.on("click.slick",{message:"previous"},n.changeSlide);n.$nextArrow.on("click.slick",{message:"next"},n.changeSlide)}};t.prototype.initDotEvents=function(){var t=this;if(t.options.dots===!0&&t.slideCount>t.options.slidesToShow)n("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide);if(t.options.dots===!0&&t.options.pauseOnDotsHover===!0&&t.options.autoplay===!0)n("li",t.$dots).on("mouseenter.slick",n.proxy(t.setPaused,t,!0)).on("mouseleave.slick",n.proxy(t.setPaused,t,!1))};t.prototype.initializeEvents=function(){var t=this;t.initArrowEvents();t.initDotEvents();t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler);t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler);t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler);t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler);t.$list.on("click.slick",t.clickHandler);n(document).on(t.visibilityChange,n.proxy(t.visibility,t));t.$list.on("mouseenter.slick",n.proxy(t.setPaused,t,!0));t.$list.on("mouseleave.slick",n.proxy(t.setPaused,t,!1));if(t.options.accessibility===!0)t.$list.on("keydown.slick",t.keyHandler);if(t.options.focusOnSelect===!0)n(t.$slideTrack).children().on("click.slick",t.selectHandler);n(window).on("orientationchange.slick.slick-"+t.instanceUid,n.proxy(t.orientationChange,t));n(window).on("resize.slick.slick-"+t.instanceUid,n.proxy(t.resize,t));n("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault);n(window).on("load.slick.slick-"+t.instanceUid,t.setPosition);n(document).on("ready.slick.slick-"+t.instanceUid,t.setPosition)};t.prototype.initUI=function(){var n=this;n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&(n.$prevArrow.show(),n.$nextArrow.show());n.options.dots===!0&&n.slideCount>n.options.slidesToShow&&n.$dots.show();n.options.autoplay===!0&&n.autoPlay()};t.prototype.keyHandler=function(n){var t=this;n.target.tagName.match("TEXTAREA|INPUT|SELECT")||(n.keyCode===37&&t.options.accessibility===!0?t.changeSlide({data:{message:"previous"}}):n.keyCode===39&&t.options.accessibility===!0&&t.changeSlide({data:{message:"next"}}))};t.prototype.lazyLoad=function(){function f(t){n("img[data-lazy]",t).each(function(){var t=n(this),i=n(this).attr("data-lazy"),r=document.createElement("img");r.onload=function(){t.animate({opacity:0},100,function(){t.attr("src",i).animate({opacity:1},200,function(){t.removeAttr("data-lazy").removeClass("slick-loading")})})};r.src=i})}var t=this,e,r,i,u;t.options.centerMode===!0?t.options.infinite===!0?(i=t.currentSlide+(t.options.slidesToShow/2+1),u=i+t.options.slidesToShow+2):(i=Math.max(0,t.currentSlide-(t.options.slidesToShow/2+1)),u=2+(t.options.slidesToShow/2+1)+t.currentSlide):(i=t.options.infinite?t.options.slidesToShow+t.currentSlide:t.currentSlide,u=i+t.options.slidesToShow,t.options.fade===!0&&(i>0&&i--,u<=t.slideCount&&u++));e=t.$slider.find(".slick-slide").slice(i,u);f(e);t.slideCount<=t.options.slidesToShow?(r=t.$slider.find(".slick-slide"),f(r)):t.currentSlide>=t.slideCount-t.options.slidesToShow?(r=t.$slider.find(".slick-cloned").slice(0,t.options.slidesToShow),f(r)):t.currentSlide===0&&(r=t.$slider.find(".slick-cloned").slice(t.options.slidesToShow*-1),f(r))};t.prototype.loadSlider=function(){var n=this;n.setPosition();n.$slideTrack.css({opacity:1});n.$slider.removeClass("slick-loading");n.initUI();n.options.lazyLoad==="progressive"&&n.progressiveLazyLoad()};t.prototype.next=t.prototype.slickNext=function(){var n=this;n.changeSlide({data:{message:"next"}})};t.prototype.orientationChange=function(){var n=this;n.checkResponsive();n.setPosition()};t.prototype.pause=t.prototype.slickPause=function(){var n=this;n.autoPlayClear();n.paused=!0};t.prototype.play=t.prototype.slickPlay=function(){var n=this;n.paused=!1;n.autoPlay()};t.prototype.postSlide=function(n){var t=this;t.$slider.trigger("afterChange",[t,n]);t.animating=!1;t.setPosition();t.swipeLeft=null;t.options.autoplay===!0&&t.paused===!1&&t.autoPlay();t.options.accessibility===!0&&t.initADA()};t.prototype.prev=t.prototype.slickPrev=function(){var n=this;n.changeSlide({data:{message:"previous"}})};t.prototype.preventDefault=function(n){n.preventDefault()};t.prototype.progressiveLazyLoad=function(){var t=this,r,i;r=n("img[data-lazy]",t.$slider).length;r>0&&(i=n("img[data-lazy]",t.$slider).first(),i.attr("src",null),i.attr("src",i.attr("data-lazy")).removeClass("slick-loading").load(function(){i.removeAttr("data-lazy");t.progressiveLazyLoad();t.options.adaptiveHeight===!0&&t.setPosition()}).error(function(){i.removeAttr("data-lazy");t.progressiveLazyLoad()}))};t.prototype.refresh=function(t){var i=this,r,u;u=i.slideCount-i.options.slidesToShow;i.options.infinite||(i.slideCount<=i.options.slidesToShow?i.currentSlide=0:i.currentSlide>u&&(i.currentSlide=u));r=i.currentSlide;i.destroy(!0);n.extend(i,i.initials,{currentSlide:r});i.init();t||i.changeSlide({data:{message:"index",index:r}},!1)};t.prototype.registerBreakpoints=function(){var t=this,u,f,i,r=t.options.responsive||null;if(n.type(r)==="array"&&r.length){t.respondTo=t.options.respondTo||"window";for(u in r)if(i=t.breakpoints.length-1,f=r[u].breakpoint,r.hasOwnProperty(u)){while(i>=0)t.breakpoints[i]&&t.breakpoints[i]===f&&t.breakpoints.splice(i,1),i--;t.breakpoints.push(f);t.breakpointSettings[f]=r[u].settings}t.breakpoints.sort(function(n,i){return t.options.mobileFirst?n-i:i-n})}};t.prototype.reinit=function(){var t=this;if(t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide"),t.slideCount=t.$slides.length,t.currentSlide>=t.slideCount&&t.currentSlide!==0&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),t.registerBreakpoints(),t.setProps(),t.setupInfinite(),t.buildArrows(),t.updateArrows(),t.initArrowEvents(),t.buildDots(),t.updateDots(),t.initDotEvents(),t.checkResponsive(!1,!0),t.options.focusOnSelect===!0)n(t.$slideTrack).children().on("click.slick",t.selectHandler);t.setSlideClasses(0);t.setPosition();t.$slider.trigger("reInit",[t]);t.options.autoplay===!0&&t.focusHandler()};t.prototype.resize=function(){var t=this;n(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=n(window).width();t.checkResponsive();t.unslicked||t.setPosition()},50))};t.prototype.removeSlide=t.prototype.slickRemove=function(n,t,i){var r=this;if(typeof n=="boolean"?(t=n,n=t===!0?0:r.slideCount-1):n=t===!0?--n:n,r.slideCount<1||n<0||n>r.slideCount-1)return!1;r.unload();i===!0?r.$slideTrack.children().remove():r.$slideTrack.children(this.options.slide).eq(n).remove();r.$slides=r.$slideTrack.children(this.options.slide);r.$slideTrack.children(this.options.slide).detach();r.$slideTrack.append(r.$slides);r.$slidesCache=r.$slides;r.reinit()};t.prototype.setCSS=function(n){var t=this,i={},r,u;t.options.rtl===!0&&(n=-n);r=t.positionProp=="left"?Math.ceil(n)+"px":"0px";u=t.positionProp=="top"?Math.ceil(n)+"px":"0px";i[t.positionProp]=n;t.transformsEnabled===!1?t.$slideTrack.css(i):(i={},t.cssTransitions===!1?(i[t.animType]="translate("+r+", "+u+")",t.$slideTrack.css(i)):(i[t.animType]="translate3d("+r+", "+u+", 0px)",t.$slideTrack.css(i)))};t.prototype.setDimensions=function(){var n=this,t;n.options.vertical===!1?n.options.centerMode===!0&&n.$list.css({padding:"0px "+n.options.centerPadding}):(n.$list.height(n.$slides.first().outerHeight(!0)*n.options.slidesToShow),n.options.centerMode===!0&&n.$list.css({padding:n.options.centerPadding+" 0px"}));n.listWidth=n.$list.width();n.listHeight=n.$list.height();n.options.vertical===!1&&n.options.variableWidth===!1?(n.slideWidth=Math.ceil(n.listWidth/n.options.slidesToShow),n.$slideTrack.width(Math.ceil(n.slideWidth*n.$slideTrack.children(".slick-slide").length))):n.options.variableWidth===!0?n.$slideTrack.width(5e3*n.slideCount):(n.slideWidth=Math.ceil(n.listWidth),n.$slideTrack.height(Math.ceil(n.$slides.first().outerHeight(!0)*n.$slideTrack.children(".slick-slide").length)));t=n.$slides.first().outerWidth(!0)-n.$slides.first().width();n.options.variableWidth===!1&&n.$slideTrack.children(".slick-slide").width(n.slideWidth-t)};t.prototype.setFade=function(){var t=this,i;t.$slides.each(function(r,u){i=t.slideWidth*r*-1;t.options.rtl===!0?n(u).css({position:"relative",right:i,top:0,zIndex:t.options.zIndex-2,opacity:0}):n(u).css({position:"relative",left:i,top:0,zIndex:t.options.zIndex-2,opacity:0})});t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})};t.prototype.setHeight=function(){var n=this,t;n.options.slidesToShow===1&&n.options.adaptiveHeight===!0&&n.options.vertical===!1&&(t=n.$slides.eq(n.currentSlide).outerHeight(!0),n.$list.css("height",t))};t.prototype.setOption=t.prototype.slickSetOption=function(t,i,r){var u=this,f,e;if(t==="responsive"&&n.type(i)==="array")for(e in i)if(n.type(u.options.responsive)!=="array")u.options.responsive=[i[e]];else{for(f=u.options.responsive.length-1;f>=0;)u.options.responsive[f].breakpoint===i[e].breakpoint&&u.options.responsive.splice(f,1),f--;u.options.responsive.push(i[e])}else u.options[t]=i;r===!0&&(u.unload(),u.reinit())};t.prototype.setPosition=function(){var n=this;n.setDimensions();n.setHeight();n.options.fade===!1?n.setCSS(n.getLeft(n.currentSlide)):n.setFade();n.$slider.trigger("setPosition",[n])};t.prototype.setProps=function(){var n=this,t=document.body.style;n.positionProp=n.options.vertical===!0?"top":"left";n.positionProp==="top"?n.$slider.addClass("slick-vertical"):n.$slider.removeClass("slick-vertical");(t.WebkitTransition!==undefined||t.MozTransition!==undefined||t.msTransition!==undefined)&&n.options.useCSS===!0&&(n.cssTransitions=!0);n.options.fade&&(typeof n.options.zIndex=="number"?n.options.zIndex<3&&(n.options.zIndex=3):n.options.zIndex=n.defaults.zIndex);t.OTransform!==undefined&&(n.animType="OTransform",n.transformType="-o-transform",n.transitionType="OTransition",t.perspectiveProperty===undefined&&t.webkitPerspective===undefined&&(n.animType=!1));t.MozTransform!==undefined&&(n.animType="MozTransform",n.transformType="-moz-transform",n.transitionType="MozTransition",t.perspectiveProperty===undefined&&t.MozPerspective===undefined&&(n.animType=!1));t.webkitTransform!==undefined&&(n.animType="webkitTransform",n.transformType="-webkit-transform",n.transitionType="webkitTransition",t.perspectiveProperty===undefined&&t.webkitPerspective===undefined&&(n.animType=!1));t.msTransform!==undefined&&(n.animType="msTransform",n.transformType="-ms-transform",n.transitionType="msTransition",t.msTransform===undefined&&(n.animType=!1));t.transform!==undefined&&n.animType!==!1&&(n.animType="transform",n.transformType="transform",n.transitionType="transition");n.transformsEnabled=n.options.useTransform&&n.animType!==null&&n.animType!==!1};t.prototype.setSlideClasses=function(n){var t=this,u,i,r,f;i=t.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true");t.$slides.eq(n).addClass("slick-current");t.options.centerMode===!0?(u=Math.floor(t.options.slidesToShow/2),t.options.infinite===!0&&(n>=u&&n<=t.slideCount-1-u?t.$slides.slice(n-u,n+u+1).addClass("slick-active").attr("aria-hidden","false"):(r=t.options.slidesToShow+n,i.slice(r-u+1,r+u+2).addClass("slick-active").attr("aria-hidden","false")),n===0?i.eq(i.length-1-t.options.slidesToShow).addClass("slick-center"):n===t.slideCount-1&&i.eq(t.options.slidesToShow).addClass("slick-center")),t.$slides.eq(n).addClass("slick-center")):n>=0&&n<=t.slideCount-t.options.slidesToShow?t.$slides.slice(n,n+t.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=t.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(f=t.slideCount%t.options.slidesToShow,r=t.options.infinite===!0?t.options.slidesToShow+n:n,t.options.slidesToShow==t.options.slidesToScroll&&t.slideCount-n<t.options.slidesToShow?i.slice(r-(t.options.slidesToShow-f),r+f).addClass("slick-active").attr("aria-hidden","false"):i.slice(r,r+t.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));t.options.lazyLoad==="ondemand"&&t.lazyLoad()};t.prototype.setupInfinite=function(){var t=this,i,r,u;if(t.options.fade===!0&&(t.options.centerMode=!1),t.options.infinite===!0&&t.options.fade===!1&&(r=null,t.slideCount>t.options.slidesToShow)){for(u=t.options.centerMode===!0?t.options.slidesToShow+1:t.options.slidesToShow,i=t.slideCount;i>t.slideCount-u;i-=1)r=i-1,n(t.$slides[r]).clone(!0).attr("id","").attr("data-slick-index",r-t.slideCount).prependTo(t.$slideTrack).addClass("slick-cloned");for(i=0;i<u;i+=1)r=i,n(t.$slides[r]).clone(!0).attr("id","").attr("data-slick-index",r+t.slideCount).appendTo(t.$slideTrack).addClass("slick-cloned");t.$slideTrack.find(".slick-cloned").find("[id]").each(function(){n(this).attr("id","")})}};t.prototype.setPaused=function(n){var t=this;t.options.autoplay===!0&&t.options.pauseOnHover===!0&&(t.paused=n,n?t.autoPlayClear():t.autoPlay())};t.prototype.selectHandler=function(t){var i=this,u=n(t.target).is(".slick-slide")?n(t.target):n(t.target).parents(".slick-slide"),r=parseInt(u.attr("data-slick-index"));if(r||(r=0),i.slideCount<=i.options.slidesToShow){i.setSlideClasses(r);i.asNavFor(r);return}i.slideHandler(r)};t.prototype.slideHandler=function(n,t,i){var u,f,o,e,s=null,r=this;if((t=t||!1,r.animating!==!0||r.options.waitForAnimate!==!0)&&(r.options.fade!==!0||r.currentSlide!==n)&&!(r.slideCount<=r.options.slidesToShow)){if(t===!1&&r.asNavFor(n),u=n,s=r.getLeft(u),e=r.getLeft(r.currentSlide),r.currentLeft=r.swipeLeft===null?e:r.swipeLeft,r.options.infinite===!1&&r.options.centerMode===!1&&(n<0||n>r.getDotCount()*r.options.slidesToScroll)){r.options.fade===!1&&(u=r.currentSlide,i!==!0?r.animateSlide(e,function(){r.postSlide(u)}):r.postSlide(u));return}if(r.options.infinite===!1&&r.options.centerMode===!0&&(n<0||n>r.slideCount-r.options.slidesToScroll)){r.options.fade===!1&&(u=r.currentSlide,i!==!0?r.animateSlide(e,function(){r.postSlide(u)}):r.postSlide(u));return}if(r.options.autoplay===!0&&clearInterval(r.autoPlayTimer),f=u<0?r.slideCount%r.options.slidesToScroll!=0?r.slideCount-r.slideCount%r.options.slidesToScroll:r.slideCount+u:u>=r.slideCount?r.slideCount%r.options.slidesToScroll!=0?0:u-r.slideCount:u,r.animating=!0,r.$slider.trigger("beforeChange",[r,r.currentSlide,f]),o=r.currentSlide,r.currentSlide=f,r.setSlideClasses(r.currentSlide),r.updateDots(),r.updateArrows(),r.options.fade===!0){i!==!0?(r.fadeSlideOut(o),r.fadeSlide(f,function(){r.postSlide(f)})):r.postSlide(f);r.animateHeight();return}i!==!0?r.animateSlide(s,function(){r.postSlide(f)}):r.postSlide(f)}};t.prototype.startLoad=function(){var n=this;n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&(n.$prevArrow.hide(),n.$nextArrow.hide());n.options.dots===!0&&n.slideCount>n.options.slidesToShow&&n.$dots.hide();n.$slider.addClass("slick-loading")};t.prototype.swipeDirection=function(){var i,r,u,n,t=this;return(i=t.touchObject.startX-t.touchObject.curX,r=t.touchObject.startY-t.touchObject.curY,u=Math.atan2(r,i),n=Math.round(u*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0)?t.options.rtl===!1?"left":"right":n<=360&&n>=315?t.options.rtl===!1?"left":"right":n>=135&&n<=225?t.options.rtl===!1?"right":"left":t.options.verticalSwiping===!0?n>=35&&n<=135?"left":"right":"vertical"};t.prototype.swipeEnd=function(){var n=this,t;if(n.dragging=!1,n.shouldClick=n.touchObject.swipeLength>10?!1:!0,n.touchObject.curX===undefined)return!1;if(n.touchObject.edgeHit===!0&&n.$slider.trigger("edge",[n,n.swipeDirection()]),n.touchObject.swipeLength>=n.touchObject.minSwipe)switch(n.swipeDirection()){case"left":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide+n.getSlideCount()):n.currentSlide+n.getSlideCount();n.slideHandler(t);n.currentDirection=0;n.touchObject={};n.$slider.trigger("swipe",[n,"left"]);break;case"right":t=n.options.swipeToSlide?n.checkNavigable(n.currentSlide-n.getSlideCount()):n.currentSlide-n.getSlideCount();n.slideHandler(t);n.currentDirection=1;n.touchObject={};n.$slider.trigger("swipe",[n,"right"])}else n.touchObject.startX!==n.touchObject.curX&&(n.slideHandler(n.currentSlide),n.touchObject={})};t.prototype.swipeHandler=function(n){var t=this;if(t.options.swipe!==!1&&(!("ontouchend"in document)||t.options.swipe!==!1)&&(t.options.draggable!==!1||n.type.indexOf("mouse")===-1)){t.touchObject.fingerCount=n.originalEvent&&n.originalEvent.touches!==undefined?n.originalEvent.touches.length:1;t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold;t.options.verticalSwiping===!0&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold);switch(n.data.action){case"start":t.swipeStart(n);break;case"move":t.swipeMove(n);break;case"end":t.swipeEnd(n)}}};t.prototype.swipeMove=function(n){var t=this,f,e,r,u,i;if(i=n.originalEvent!==undefined?n.originalEvent.touches:null,!t.dragging||i&&i.length!==1)return!1;if(f=t.getLeft(t.currentSlide),t.touchObject.curX=i!==undefined?i[0].pageX:n.clientX,t.touchObject.curY=i!==undefined?i[0].pageY:n.clientY,t.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(t.touchObject.curX-t.touchObject.startX,2))),t.options.verticalSwiping===!0&&(t.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(t.touchObject.curY-t.touchObject.startY,2)))),e=t.swipeDirection(),e!=="vertical"){if(n.originalEvent!==undefined&&t.touchObject.swipeLength>4&&n.preventDefault(),u=(t.options.rtl===!1?1:-1)*(t.touchObject.curX>t.touchObject.startX?1:-1),t.options.verticalSwiping===!0&&(u=t.touchObject.curY>t.touchObject.startY?1:-1),r=t.touchObject.swipeLength,t.touchObject.edgeHit=!1,t.options.infinite===!1&&(t.currentSlide===0&&e==="right"||t.currentSlide>=t.getDotCount()&&e==="left")&&(r=t.touchObject.swipeLength*t.options.edgeFriction,t.touchObject.edgeHit=!0),t.swipeLeft=t.options.vertical===!1?f+r*u:f+r*(t.$list.height()/t.listWidth)*u,t.options.verticalSwiping===!0&&(t.swipeLeft=f+r*u),t.options.fade===!0||t.options.touchMove===!1)return!1;if(t.animating===!0)return t.swipeLeft=null,!1;t.setCSS(t.swipeLeft)}};t.prototype.swipeStart=function(n){var t=this,i;if(t.touchObject.fingerCount!==1||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;n.originalEvent!==undefined&&n.originalEvent.touches!==undefined&&(i=n.originalEvent.touches[0]);t.touchObject.startX=t.touchObject.curX=i!==undefined?i.pageX:n.clientX;t.touchObject.startY=t.touchObject.curY=i!==undefined?i.pageY:n.clientY;t.dragging=!0};t.prototype.unfilterSlides=t.prototype.slickUnfilter=function(){var n=this;n.$slidesCache!==null&&(n.unload(),n.$slideTrack.children(this.options.slide).detach(),n.$slidesCache.appendTo(n.$slideTrack),n.reinit())};t.prototype.unload=function(){var t=this;n(".slick-cloned",t.$slider).remove();t.$dots&&t.$dots.remove();t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove();t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove();t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")};t.prototype.unslick=function(n){var t=this;t.$slider.trigger("unslick",[t,n]);t.destroy()};t.prototype.updateArrows=function(){var n=this,t;t=Math.floor(n.options.slidesToShow/2);n.options.arrows===!0&&n.slideCount>n.options.slidesToShow&&!n.options.infinite&&(n.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),n.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),n.currentSlide===0?(n.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),n.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):n.currentSlide>=n.slideCount-n.options.slidesToShow&&n.options.centerMode===!1?(n.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),n.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):n.currentSlide>=n.slideCount-1&&n.options.centerMode===!0&&(n.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),n.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))};t.prototype.updateDots=function(){var n=this;n.$dots!==null&&(n.$dots.find("li").removeClass("slick-active").attr("aria-hidden","true"),n.$dots.find("li").eq(Math.floor(n.currentSlide/n.options.slidesToScroll)).addClass("slick-active").attr("aria-hidden","false"))};t.prototype.visibility=function(){var n=this;document[n.hidden]?(n.paused=!0,n.autoPlayClear()):n.options.autoplay===!0&&(n.paused=!1,n.autoPlay())};t.prototype.initADA=function(){var t=this;t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"});t.$slideTrack.attr("role","listbox");t.$slides.not(t.$slideTrack.find(".slick-cloned")).each(function(i){n(this).attr({role:"option","aria-describedby":"slick-slide"+t.instanceUid+i+""})});t.$dots!==null&&t.$dots.attr("role","tablist").find("li").each(function(i){n(this).attr({role:"presentation","aria-selected":"false","aria-controls":"navigation"+t.instanceUid+i+"",id:"slick-slide"+t.instanceUid+i+""})}).first().attr("aria-selected","true").end().find("button").attr("role","button").end().closest("div").attr("role","toolbar");t.activateADA()};t.prototype.activateADA=function(){var n=this;n.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})};t.prototype.focusHandler=function(){var t=this;t.$slider.on("focus.slick blur.slick","*",function(i){i.stopImmediatePropagation();var r=n(this);setTimeout(function(){t.isPlay&&(r.is(":focus")?(t.autoPlayClear(),t.paused=!0):(t.paused=!1,t.autoPlay()))},0)})};n.fn.slick=function(){for(var i=this,r=arguments[0],f=Array.prototype.slice.call(arguments,1),e=i.length,u,n=0;n<e;n++)if(typeof r=="object"||typeof r=="undefined"?i[n].slick=new t(i[n],r):u=i[n].slick[r].apply(i[n].slick,f),typeof u!="undefined")return u;return i}});
/*
//# sourceMappingURL=slick.min.js.map
*/;/* =========================================================
 * bootstrap-datepicker.js 
 * http://www.eyecon.ro/bootstrap-datepicker
 * =========================================================
 * Copyright 2012 Stefan Petre
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ========================================================= */
 
(function( $ ) {
	
	// Picker object
	
	var Datepicker = function(element, options){
		this.element = $(element);
		this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
		this.picker = $(DPGlobal.template)
			.appendTo('body')
			.on({
				click: $.proxy(this.click, this)//,
				//mousedown: $.proxy(this.mousedown, this)
			});
		this.isInput = this.element.is('input');
		this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
		
		if (this.isInput) {
			this.element.on({
				focus: $.proxy(this.show, this),
				//blur: $.proxy(this.hide, this),
				keyup: $.proxy(this.update, this)
			});
		} else {
			if (this.component){
				this.component.on('click', $.proxy(this.show, this));
			} else {
				this.element.on('click', $.proxy(this.show, this));
			}
		}
	
		this.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0;
		if (typeof this.minViewMode === 'string') {
			switch (this.minViewMode) {
				case 'months':
					this.minViewMode = 1;
					break;
				case 'years':
					this.minViewMode = 2;
					break;
				default:
					this.minViewMode = 0;
					break;
			}
		}
		this.viewMode = options.viewMode||this.element.data('date-viewmode')||0;
		if (typeof this.viewMode === 'string') {
			switch (this.viewMode) {
				case 'months':
					this.viewMode = 1;
					break;
				case 'years':
					this.viewMode = 2;
					break;
				default:
					this.viewMode = 0;
					break;
			}
		}
		this.startViewMode = this.viewMode;
		this.weekStart = options.weekStart||this.element.data('date-weekstart')||0;
		this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1;
		this.onRender = options.onRender;
		this.fillDow();
		this.fillMonths();
		this.update();
		this.showMode();
	};
	
	Datepicker.prototype = {
		constructor: Datepicker,
		
		show: function(e) {
			this.picker.show();
			this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
			this.place();
			$(window).on('resize', $.proxy(this.place, this));
			if (e ) {
				e.stopPropagation();
				e.preventDefault();
			}
			if (!this.isInput) {
			}
			var that = this;
			$(document).on('mousedown', function(ev){
				if ($(ev.target).closest('.datepicker').length == 0) {
					that.hide();
				}
			});
			this.element.trigger({
				type: 'show',
				date: this.date
			});
		},
		
		hide: function(){
			this.picker.hide();
			$(window).off('resize', this.place);
			this.viewMode = this.startViewMode;
			this.showMode();
			if (!this.isInput) {
				$(document).off('mousedown', this.hide);
			}
			//this.set();
			this.element.trigger({
				type: 'hide',
				date: this.date
			});
		},
		
		set: function() {
			var formated = DPGlobal.formatDate(this.date, this.format);
			if (!this.isInput) {
				if (this.component){
					this.element.find('input').prop('value', formated);
				}
				this.element.data('date', formated);
			} else {
				this.element.prop('value', formated);
			}
		},
		
		setValue: function(newDate) {
			if (typeof newDate === 'string') {
				this.date = DPGlobal.parseDate(newDate, this.format);
			} else {
				this.date = new Date(newDate);
			}
			this.set();
			this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
			this.fill();
		},
		
		place: function(){
			var offset = this.component ? this.component.offset() : this.element.offset();
			this.picker.css({
				top: offset.top + this.height,
				left: offset.left
			});
		},
		
		update: function(newDate){
			this.date = DPGlobal.parseDate(
				typeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')),
				this.format
			);
			this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
			this.fill();
		},
		
		fillDow: function(){
			var dowCnt = this.weekStart;
			var html = '<tr>';
			while (dowCnt < this.weekStart + 7) {
				html += '<th class="dow">'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'</th>';
			}
			html += '</tr>';
			this.picker.find('.datepicker-days thead').append(html);
		},
		
		fillMonths: function(){
			var html = '';
			var i = 0
			while (i < 12) {
				html += '<span class="month">'+DPGlobal.dates.monthsShort[i++]+'</span>';
			}
			this.picker.find('.datepicker-months td').append(html);
		},
		
		fill: function() {
			var d = new Date(this.viewDate),
				year = d.getFullYear(),
				month = d.getMonth(),
				currentDate = this.date.valueOf();
			this.picker.find('.datepicker-days th:eq(1)')
						.text(DPGlobal.dates.months[month]+' '+year);
			var prevMonth = new Date(year, month-1, 28,0,0,0,0),
				day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
			prevMonth.setDate(day);
			prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7);
			var nextMonth = new Date(prevMonth);
			nextMonth.setDate(nextMonth.getDate() + 42);
			nextMonth = nextMonth.valueOf();
			var html = [];
			var clsName,
				prevY,
				prevM;
			while(prevMonth.valueOf() < nextMonth) {
				if (prevMonth.getDay() === this.weekStart) {
					html.push('<tr>');
				}
				clsName = this.onRender(prevMonth);
				prevY = prevMonth.getFullYear();
				prevM = prevMonth.getMonth();
				if ((prevM < month &&  prevY === year) ||  prevY < year) {
					clsName += ' old';
				} else if ((prevM > month && prevY === year) || prevY > year) {
					clsName += ' new';
				}
				if (prevMonth.valueOf() === currentDate) {
					clsName += ' active';
				}
				html.push('<td class="day '+clsName+'">'+prevMonth.getDate() + '</td>');
				if (prevMonth.getDay() === this.weekEnd) {
					html.push('</tr>');
				}
				prevMonth.setDate(prevMonth.getDate()+1);
			}
			this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
			var currentYear = this.date.getFullYear();
			
			var months = this.picker.find('.datepicker-months')
						.find('th:eq(1)')
							.text(year)
							.end()
						.find('span').removeClass('active');
			if (currentYear === year) {
				months.eq(this.date.getMonth()).addClass('active');
			}
			
			html = '';
			year = parseInt(year/10, 10) * 10;
			var yearCont = this.picker.find('.datepicker-years')
								.find('th:eq(1)')
									.text(year + '-' + (year + 9))
									.end()
								.find('td');
			year -= 1;
			for (var i = -1; i < 11; i++) {
				html += '<span class="year'+(i === -1 || i === 10 ? ' old' : '')+(currentYear === year ? ' active' : '')+'">'+year+'</span>';
				year += 1;
			}
			yearCont.html(html);
		},
		
		click: function(e) {
			e.stopPropagation();
			e.preventDefault();
			var target = $(e.target).closest('span, td, th');
			if (target.length === 1) {
				switch(target[0].nodeName.toLowerCase()) {
					case 'th':
						switch(target[0].className) {
							case 'switch':
								this.showMode(1);
								break;
							case 'prev':
							case 'next':
								this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(
									this.viewDate,
									this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) + 
									DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1)
								);
								this.fill();
								this.set();
								break;
						}
						break;
					case 'span':
						if (target.is('.month')) {
							var month = target.parent().find('span').index(target);
							this.viewDate.setMonth(month);
						} else {
							var year = parseInt(target.text(), 10)||0;
							this.viewDate.setFullYear(year);
						}
						if (this.viewMode !== 0) {
							this.date = new Date(this.viewDate);
							this.element.trigger({
								type: 'changeDate',
								date: this.date,
								viewMode: DPGlobal.modes[this.viewMode].clsName
							});
						}
						this.showMode(-1);
						this.fill();
						this.set();
						break;
					case 'td':
						if (target.is('.day') && !target.is('.disabled')){
							var day = parseInt(target.text(), 10)||1;
							var month = this.viewDate.getMonth();
							if (target.is('.old')) {
								month -= 1;
							} else if (target.is('.new')) {
								month += 1;
							}
							var year = this.viewDate.getFullYear();
							this.date = new Date(year, month, day,0,0,0,0);
							this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0);
							this.fill();
							this.set();
							this.element.trigger({
								type: 'changeDate',
								date: this.date,
								viewMode: DPGlobal.modes[this.viewMode].clsName
							});
						}
						break;
				}
			}
		},
		
		mousedown: function(e){
			e.stopPropagation();
			e.preventDefault();
		},
		
		showMode: function(dir) {
			if (dir) {
				this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir));
			}
			this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
		}
	};
	
	$.fn.datepicker = function ( option, val ) {
		return this.each(function () {
			var $this = $(this),
				data = $this.data('datepicker'),
				options = typeof option === 'object' && option;
			if (!data) {
				$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));
			}
			if (typeof option === 'string') data[option](val);
		});
	};

	$.fn.datepicker.defaults = {
		onRender: function(date) {
			return '';
		}
	};
	$.fn.datepicker.Constructor = Datepicker;
	
	var DPGlobal = {
		modes: [
			{
				clsName: 'days',
				navFnc: 'Month',
				navStep: 1
			},
			{
				clsName: 'months',
				navFnc: 'FullYear',
				navStep: 1
			},
			{
				clsName: 'years',
				navFnc: 'FullYear',
				navStep: 10
		}],
		dates:{
			days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
			daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
			daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
			months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
			monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
		},
		isLeapYear: function (year) {
			return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
		},
		getDaysInMonth: function (year, month) {
			return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
		},
		parseFormat: function(format){
			var separator = format.match(/[.\/\-\s].*?/),
				parts = format.split(/\W+/);
			if (!separator || !parts || parts.length === 0){
				throw new Error("Invalid date format.");
			}
			return {separator: separator, parts: parts};
		},
		parseDate: function(date, format) {
			var parts = date.split(format.separator),
				date = new Date(),
				val;
			date.setHours(0);
			date.setMinutes(0);
			date.setSeconds(0);
			date.setMilliseconds(0);
			if (parts.length === format.parts.length) {
				var year = date.getFullYear(), day = date.getDate(), month = date.getMonth();
				for (var i=0, cnt = format.parts.length; i < cnt; i++) {
					val = parseInt(parts[i], 10)||1;
					switch(format.parts[i]) {
						case 'dd':
						case 'd':
							day = val;
							date.setDate(val);
							break;
						case 'mm':
						case 'm':
							month = val - 1;
							date.setMonth(val - 1);
							break;
						case 'yy':
							year = 2000 + val;
							date.setFullYear(2000 + val);
							break;
						case 'yyyy':
							year = val;
							date.setFullYear(val);
							break;
					}
				}
				date = new Date(year, month, day, 0 ,0 ,0);
			}
			return date;
		},
		formatDate: function(date, format){
			var val = {
				d: date.getDate(),
				m: date.getMonth() + 1,
				yy: date.getFullYear().toString().substring(2),
				yyyy: date.getFullYear()
			};
			val.dd = (val.d < 10 ? '0' : '') + val.d;
			val.mm = (val.m < 10 ? '0' : '') + val.m;
			var date = [];
			for (var i=0, cnt = format.parts.length; i < cnt; i++) {
				date.push(val[format.parts[i]]);
			}
			return date.join(format.separator);
		},
		headTemplate: '<thead>'+
							'<tr>'+
								'<th class="prev">&lsaquo;</th>'+
								'<th colspan="5" class=""></th>'+
								'<th class="next">&rsaquo;</th>'+
							'</tr>'+
						'</thead>',
		contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
	};
	DPGlobal.template = '<div class="datepicker dropdown-menu">'+
							'<div class="datepicker-days">'+
								'<table class=" table-condensed">'+
									DPGlobal.headTemplate+
									'<tbody></tbody>'+
								'</table>'+
							'</div>'+
							'<div class="datepicker-months">'+
								'<table class="table-condensed">'+
									DPGlobal.headTemplate+
									DPGlobal.contTemplate+
								'</table>'+
							'</div>'+
							'<div class="datepicker-years">'+
								'<table class="table-condensed">'+
									DPGlobal.headTemplate+
									DPGlobal.contTemplate+
								'</table>'+
							'</div>'+
						'</div>';

})( window.jQuery );;/*\
|*|
|*|  :: cookies.js ::
|*|
|*|  A complete cookies reader/writer framework with full unicode support.
|*|
|*|  Revision #1 - September 4, 2014
|*|
|*|  https://developer.mozilla.org/en-US/docs/Web/API/document.cookie
|*|  https://developer.mozilla.org/User:fusionchess
|*|
|*|  This framework is released under the GNU Public License, version 3 or later.
|*|  http://www.gnu.org/licenses/gpl-3.0-standalone.html
|*|
|*|  Syntaxes:
|*|
|*|  * docCookies.setItem(name, value[, end[, path[, domain[, secure]]]])
|*|  * docCookies.getItem(name)
|*|  * docCookies.removeItem(name[, path[, domain]])
|*|  * docCookies.hasItem(name)
|*|  * docCookies.keys()
|*|
\*/

var docCookies = {
	getItem: function (sKey) {
		if (!sKey) { return null; }
		return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
	},
	setItem: function (sKey, sValue, vEnd, sPath, sDomain, bSecure) {
		if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; }
		var sExpires = "";
		if (vEnd) {
			switch (vEnd.constructor) {
				case Number:
					sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd;
					break;
				case String:
					sExpires = "; expires=" + vEnd;
					break;
				case Date:
					sExpires = "; expires=" + vEnd.toUTCString();
					break;
			}
		}
		bSecure = true;
		document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : "") + "; SameSite=Lax";
		return true;
	},
	removeItem: function (sKey, sPath, sDomain) {
		if (!this.hasItem(sKey)) { return false; }
		document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + "; secure; SameSite=Lax";
		return true;
	},
	hasItem: function (sKey) {
		if (!sKey) { return false; }
		return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
	},
	keys: function () {
		var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/);
		for (var nLen = aKeys.length, nIdx = 0; nIdx < nLen; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); }
		return aKeys;
	}
};;/*!
 * Modernizr v2.8.3
 * www.modernizr.com
 *
 * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
 * Available under the BSD and MIT licenses: www.modernizr.com/license/
 */

/*
 * Modernizr tests which native CSS3 and HTML5 features are available in
 * the current UA and makes the results available to you in two ways:
 * as properties on a global Modernizr object, and as classes on the
 * <html> element. This information allows you to progressively enhance
 * your pages with a granular level of control over the experience.
 *
 * Modernizr has an optional (not included) conditional resource loader
 * called Modernizr.load(), based on Yepnope.js (yepnopejs.com).
 * To get a build that includes Modernizr.load(), as well as choosing
 * which tests to include, go to www.modernizr.com/download/
 *
 * Authors        Faruk Ates, Paul Irish, Alex Sexton
 * Contributors   Ryan Seddon, Ben Alman
 */

window.Modernizr = (function( window, document, undefined ) {

    var version = '2.8.3',

    Modernizr = {},

    /*>>cssclasses*/
    // option for enabling the HTML classes to be added
    enableClasses = true,
    /*>>cssclasses*/

    docElement = document.documentElement,

    /**
     * Create our "modernizr" element that we do most feature tests on.
     */
    mod = 'modernizr',
    modElem = document.createElement(mod),
    mStyle = modElem.style,

    /**
     * Create the input element for various Web Forms feature tests.
     */
    inputElem /*>>inputelem*/ = document.createElement('input') /*>>inputelem*/ ,

    /*>>smile*/
    smile = ':)',
    /*>>smile*/

    toString = {}.toString,

    // TODO :: make the prefixes more granular
    /*>>prefixes*/
    // List of property values to set for css tests. See ticket #21
    prefixes = ' -webkit- -moz- -o- -ms- '.split(' '),
    /*>>prefixes*/

    /*>>domprefixes*/
    // Following spec is to expose vendor-specific style properties as:
    //   elem.style.WebkitBorderRadius
    // and the following would be incorrect:
    //   elem.style.webkitBorderRadius

    // Webkit ghosts their properties in lowercase but Opera & Moz do not.
    // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
    //   erik.eae.net/archives/2008/03/10/21.48.10/

    // More here: github.com/Modernizr/Modernizr/issues/issue/21
    omPrefixes = 'Webkit Moz O ms',

    cssomPrefixes = omPrefixes.split(' '),

    domPrefixes = omPrefixes.toLowerCase().split(' '),
    /*>>domprefixes*/

    /*>>ns*/
    ns = {'svg': 'http://www.w3.org/2000/svg'},
    /*>>ns*/

    tests = {},
    inputs = {},
    attrs = {},

    classes = [],

    slice = classes.slice,

    featureName, // used in testing loop


    /*>>teststyles*/
    // Inject element with style element and some CSS rules
    injectElementWithStyles = function( rule, callback, nodes, testnames ) {

      var style, ret, node, docOverflow,
          div = document.createElement('div'),
          // After page load injecting a fake body doesn't work so check if body exists
          body = document.body,
          // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it.
          fakeBody = body || document.createElement('body');

      if ( parseInt(nodes, 10) ) {
          // In order not to give false positives we create a node for each test
          // This also allows the method to scale for unspecified uses
          while ( nodes-- ) {
              node = document.createElement('div');
              node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
              div.appendChild(node);
          }
      }

      // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed
      // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element
      // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements.
      // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx
      // Documents served as xml will throw if using &shy; so use xml friendly encoded version. See issue #277
      style = ['&#173;','<style id="s', mod, '">', rule, '</style>'].join('');
      div.id = mod;
      // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
      // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
      (body ? div : fakeBody).innerHTML += style;
      fakeBody.appendChild(div);
      if ( !body ) {
          //avoid crashing IE8, if background image is used
          fakeBody.style.background = '';
          //Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
          fakeBody.style.overflow = 'hidden';
          docOverflow = docElement.style.overflow;
          docElement.style.overflow = 'hidden';
          docElement.appendChild(fakeBody);
      }

      ret = callback(div, rule);
      // If this is done after page load we don't want to remove the body so check if body exists
      if ( !body ) {
          fakeBody.parentNode.removeChild(fakeBody);
          docElement.style.overflow = docOverflow;
      } else {
          div.parentNode.removeChild(div);
      }

      return !!ret;

    },
    /*>>teststyles*/

    /*>>mq*/
    // adapted from matchMedia polyfill
    // by Scott Jehl and Paul Irish
    // gist.github.com/786768
    testMediaQuery = function( mq ) {

      var matchMedia = window.matchMedia || window.msMatchMedia;
      if ( matchMedia ) {
        return matchMedia(mq) && matchMedia(mq).matches || false;
      }

      var bool;

      injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) {
        bool = (window.getComputedStyle ?
                  getComputedStyle(node, null) :
                  node.currentStyle)['position'] == 'absolute';
      });

      return bool;

     },
     /*>>mq*/


    /*>>hasevent*/
    //
    // isEventSupported determines if a given element supports the given event
    // kangax.github.com/iseventsupported/
    //
    // The following results are known incorrects:
    //   Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
    //   Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
    //   ...
    isEventSupported = (function() {

      var TAGNAMES = {
        'select': 'input', 'change': 'input',
        'submit': 'form', 'reset': 'form',
        'error': 'img', 'load': 'img', 'abort': 'img'
      };

      function isEventSupported( eventName, element ) {

        element = element || document.createElement(TAGNAMES[eventName] || 'div');
        eventName = 'on' + eventName;

        // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those
        var isSupported = eventName in element;

        if ( !isSupported ) {
          // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
          if ( !element.setAttribute ) {
            element = document.createElement('div');
          }
          if ( element.setAttribute && element.removeAttribute ) {
            element.setAttribute(eventName, '');
            isSupported = is(element[eventName], 'function');

            // If property was created, "remove it" (by setting value to `undefined`)
            if ( !is(element[eventName], 'undefined') ) {
              element[eventName] = undefined;
            }
            element.removeAttribute(eventName);
          }
        }

        element = null;
        return isSupported;
      }
      return isEventSupported;
    })(),
    /*>>hasevent*/

    // TODO :: Add flag for hasownprop ? didn't last time

    // hasOwnProperty shim by kangax needed for Safari 2.0 support
    _hasOwnProperty = ({}).hasOwnProperty, hasOwnProp;

    if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) {
      hasOwnProp = function (object, property) {
        return _hasOwnProperty.call(object, property);
      };
    }
    else {
      hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
        return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
      };
    }

    // Adapted from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
    // es5.github.com/#x15.3.4.5

    if (!Function.prototype.bind) {
      Function.prototype.bind = function bind(that) {

        var target = this;

        if (typeof target != "function") {
            throw new TypeError();
        }

        var args = slice.call(arguments, 1),
            bound = function () {

            if (this instanceof bound) {

              var F = function(){};
              F.prototype = target.prototype;
              var self = new F();

              var result = target.apply(
                  self,
                  args.concat(slice.call(arguments))
              );
              if (Object(result) === result) {
                  return result;
              }
              return self;

            } else {

              return target.apply(
                  that,
                  args.concat(slice.call(arguments))
              );

            }

        };

        return bound;
      };
    }

    /**
     * setCss applies given styles to the Modernizr DOM node.
     */
    function setCss( str ) {
        mStyle.cssText = str;
    }

    /**
     * setCssAll extrapolates all vendor-specific css strings.
     */
    function setCssAll( str1, str2 ) {
        return setCss(prefixes.join(str1 + ';') + ( str2 || '' ));
    }

    /**
     * is returns a boolean for if typeof obj is exactly type.
     */
    function is( obj, type ) {
        return typeof obj === type;
    }

    /**
     * contains returns a boolean for if substr is found within str.
     */
    function contains( str, substr ) {
        return !!~('' + str).indexOf(substr);
    }

    /*>>testprop*/

    // testProps is a generic CSS / DOM property test.

    // In testing support for a given CSS property, it's legit to test:
    //    `elem.style[styleName] !== undefined`
    // If the property is supported it will return an empty string,
    // if unsupported it will return undefined.

    // We'll take advantage of this quick test and skip setting a style
    // on our modernizr element, but instead just testing undefined vs
    // empty string.

    // Because the testing of the CSS property names (with "-", as
    // opposed to the camelCase DOM properties) is non-portable and
    // non-standard but works in WebKit and IE (but not Gecko or Opera),
    // we explicitly reject properties with dashes so that authors
    // developing in WebKit or IE first don't end up with
    // browser-specific content by accident.

    function testProps( props, prefixed ) {
        for ( var i in props ) {
            var prop = props[i];
            if ( !contains(prop, "-") && mStyle[prop] !== undefined ) {
                return prefixed == 'pfx' ? prop : true;
            }
        }
        return false;
    }
    /*>>testprop*/

    // TODO :: add testDOMProps
    /**
     * testDOMProps is a generic DOM property test; if a browser supports
     *   a certain property, it won't return undefined for it.
     */
    function testDOMProps( props, obj, elem ) {
        for ( var i in props ) {
            var item = obj[props[i]];
            if ( item !== undefined) {

                // return the property name as a string
                if (elem === false) return props[i];

                // let's bind a function
                if (is(item, 'function')){
                  // default to autobind unless override
                  return item.bind(elem || obj);
                }

                // return the unbound function or obj or value
                return item;
            }
        }
        return false;
    }

    /*>>testallprops*/
    /**
     * testPropsAll tests a list of DOM properties we want to check against.
     *   We specify literally ALL possible (known and/or likely) properties on
     *   the element including the non-vendor prefixed one, for forward-
     *   compatibility.
     */
    function testPropsAll( prop, prefixed, elem ) {

        var ucProp  = prop.charAt(0).toUpperCase() + prop.slice(1),
            props   = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');

        // did they call .prefixed('boxSizing') or are we just testing a prop?
        if(is(prefixed, "string") || is(prefixed, "undefined")) {
          return testProps(props, prefixed);

        // otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
        } else {
          props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
          return testDOMProps(props, prefixed, elem);
        }
    }
    /*>>testallprops*/


    /**
     * Tests
     * -----
     */

    // The *new* flexbox
    // dev.w3.org/csswg/css3-flexbox

    tests['flexbox'] = function() {
      return testPropsAll('flexWrap');
    };

    // The *old* flexbox
    // www.w3.org/TR/2009/WD-css3-flexbox-20090723/

    tests['flexboxlegacy'] = function() {
        return testPropsAll('boxDirection');
    };

    // On the S60 and BB Storm, getContext exists, but always returns undefined
    // so we actually have to call getContext() to verify
    // github.com/Modernizr/Modernizr/issues/issue/97/

    tests['canvas'] = function() {
        var elem = document.createElement('canvas');
        return !!(elem.getContext && elem.getContext('2d'));
    };

    tests['canvastext'] = function() {
        return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'));
    };

    // webk.it/70117 is tracking a legit WebGL feature detect proposal

    // We do a soft detect which may false positive in order to avoid
    // an expensive context creation: bugzil.la/732441

    tests['webgl'] = function() {
        return !!window.WebGLRenderingContext;
    };

    /*
     * The Modernizr.touch test only indicates if the browser supports
     *    touch events, which does not necessarily reflect a touchscreen
     *    device, as evidenced by tablets running Windows 7 or, alas,
     *    the Palm Pre / WebOS (touch) phones.
     *
     * Additionally, Chrome (desktop) used to lie about its support on this,
     *    but that has since been rectified: crbug.com/36415
     *
     * We also test for Firefox 4 Multitouch Support.
     *
     * For more info, see: modernizr.github.com/Modernizr/touch.html
     */

    tests['touch'] = function() {
        var bool;

        if(('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
          bool = true;
        } else {
          injectElementWithStyles(['@media (',prefixes.join('touch-enabled),('),mod,')','{#modernizr{top:9px;position:absolute}}'].join(''), function( node ) {
            bool = node.offsetTop === 9;
          });
        }

        return bool;
    };


    // geolocation is often considered a trivial feature detect...
    // Turns out, it's quite tricky to get right:
    //
    // Using !!navigator.geolocation does two things we don't want. It:
    //   1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
    //   2. Disables page caching in WebKit: webk.it/43956
    //
    // Meanwhile, in Firefox < 8, an about:config setting could expose
    // a false positive that would throw an exception: bugzil.la/688158

    tests['geolocation'] = function() {
        return 'geolocation' in navigator;
    };


    tests['postmessage'] = function() {
      return !!window.postMessage;
    };


    // Chrome incognito mode used to throw an exception when using openDatabase
    // It doesn't anymore.
    tests['websqldatabase'] = function() {
      return !!window.openDatabase;
    };

    // Vendors had inconsistent prefixing with the experimental Indexed DB:
    // - Webkit's implementation is accessible through webkitIndexedDB
    // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
    // For speed, we don't test the legacy (and beta-only) indexedDB
    tests['indexedDB'] = function() {
      return !!testPropsAll("indexedDB", window);
    };

    // documentMode logic from YUI to filter out IE8 Compat Mode
    //   which false positives.
    tests['hashchange'] = function() {
      return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7);
    };

    // Per 1.6:
    // This used to be Modernizr.historymanagement but the longer
    // name has been deprecated in favor of a shorter and property-matching one.
    // The old API is still available in 1.6, but as of 2.0 will throw a warning,
    // and in the first release thereafter disappear entirely.
    tests['history'] = function() {
      return !!(window.history && history.pushState);
    };

    tests['draganddrop'] = function() {
        var div = document.createElement('div');
        return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
    };

    // FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
    // will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
    // FF10 still uses prefixes, so check for it until then.
    // for more ESR info, see: mozilla.org/en-US/firefox/organizations/faq/
    tests['websockets'] = function() {
        return 'WebSocket' in window || 'MozWebSocket' in window;
    };


    // css-tricks.com/rgba-browser-support/
    tests['rgba'] = function() {
        // Set an rgba() color and check the returned value

        setCss('background-color:rgba(150,255,150,.5)');

        return contains(mStyle.backgroundColor, 'rgba');
    };

    tests['hsla'] = function() {
        // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally,
        //   except IE9 who retains it as hsla

        setCss('background-color:hsla(120,40%,100%,.5)');

        return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla');
    };

    tests['multiplebgs'] = function() {
        // Setting multiple images AND a color on the background shorthand property
        //  and then querying the style.background property value for the number of
        //  occurrences of "url(" is a reliable method for detecting ACTUAL support for this!

        setCss('background:url(https://),url(https://),red url(https://)');

        // If the UA supports multiple backgrounds, there should be three occurrences
        //   of the string "url(" in the return value for elemStyle.background

        return (/(url\s*\(.*?){3}/).test(mStyle.background);
    };



    // this will false positive in Opera Mini
    //   github.com/Modernizr/Modernizr/issues/396

    tests['backgroundsize'] = function() {
        return testPropsAll('backgroundSize');
    };

    tests['borderimage'] = function() {
        return testPropsAll('borderImage');
    };


    // Super comprehensive table about all the unique implementations of
    // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance

    tests['borderradius'] = function() {
        return testPropsAll('borderRadius');
    };

    // WebOS unfortunately false positives on this test.
    tests['boxshadow'] = function() {
        return testPropsAll('boxShadow');
    };

    // FF3.0 will false positive on this test
    tests['textshadow'] = function() {
        return document.createElement('div').style.textShadow === '';
    };


    tests['opacity'] = function() {
        // Browsers that actually have CSS Opacity implemented have done so
        //  according to spec, which means their return values are within the
        //  range of [0.0,1.0] - including the leading zero.

        setCssAll('opacity:.55');

        // The non-literal . in this regex is intentional:
        //   German Chrome returns this value as 0,55
        // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632
        return (/^0.55$/).test(mStyle.opacity);
    };


    // Note, Android < 4 will pass this test, but can only animate
    //   a single property at a time
    //   goo.gl/v3V4Gp
    tests['cssanimations'] = function() {
        return testPropsAll('animationName');
    };


    tests['csscolumns'] = function() {
        return testPropsAll('columnCount');
    };


    tests['cssgradients'] = function() {
        /**
         * For CSS Gradients syntax, please see:
         * webkit.org/blog/175/introducing-css-gradients/
         * developer.mozilla.org/en/CSS/-moz-linear-gradient
         * developer.mozilla.org/en/CSS/-moz-radial-gradient
         * dev.w3.org/csswg/css3-images/#gradients-
         */

        var str1 = 'background-image:',
            str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));',
            str3 = 'linear-gradient(left top,#9f9, white);';

        setCss(
             // legacy webkit syntax (FIXME: remove when syntax not in use anymore)
              (str1 + '-webkit- '.split(' ').join(str2 + str1) +
             // standard syntax             // trailing 'background-image:'
              prefixes.join(str3 + str1)).slice(0, -str1.length)
        );

        return contains(mStyle.backgroundImage, 'gradient');
    };


    tests['cssreflections'] = function() {
        return testPropsAll('boxReflect');
    };


    tests['csstransforms'] = function() {
        return !!testPropsAll('transform');
    };


    tests['csstransforms3d'] = function() {

        var ret = !!testPropsAll('perspective');

        // Webkit's 3D transforms are passed off to the browser's own graphics renderer.
        //   It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in
        //   some conditions. As a result, Webkit typically recognizes the syntax but
        //   will sometimes throw a false positive, thus we must do a more thorough check:
        if ( ret && 'webkitPerspective' in docElement.style ) {

          // Webkit allows this media query to succeed only if the feature is enabled.
          // `@media (transform-3d),(-webkit-transform-3d){ ... }`
          injectElementWithStyles('@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}', function( node, rule ) {
            ret = node.offsetLeft === 9 && node.offsetHeight === 3;
          });
        }
        return ret;
    };


    tests['csstransitions'] = function() {
        return testPropsAll('transition');
    };


    /*>>fontface*/
    // @font-face detection routine by Diego Perini
    // javascript.nwbox.com/CSSSupport/

    // false positives:
    //   WebOS github.com/Modernizr/Modernizr/issues/342
    //   WP7   github.com/Modernizr/Modernizr/issues/538
    tests['fontface'] = function() {
        var bool;

        injectElementWithStyles('@font-face {font-family:"font";src:url("https://")}', function( node, rule ) {
          var style = document.getElementById('smodernizr'),
              sheet = style.sheet || style.styleSheet,
              cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';

          bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
        });

        return bool;
    };
    /*>>fontface*/

    // CSS generated content detection
    tests['generatedcontent'] = function() {
        var bool;

        injectElementWithStyles(['#',mod,'{font:0/0 a}#',mod,':after{content:"',smile,'";visibility:hidden;font:3px/1 a}'].join(''), function( node ) {
          bool = node.offsetHeight >= 3;
        });

        return bool;
    };



    // These tests evaluate support of the video/audio elements, as well as
    // testing what types of content they support.
    //
    // We're using the Boolean constructor here, so that we can extend the value
    // e.g.  Modernizr.video     // true
    //       Modernizr.video.ogg // 'probably'
    //
    // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
    //                     thx to NielsLeenheer and zcorpan

    // Note: in some older browsers, "no" was a return value instead of empty string.
    //   It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
    //   It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5

    tests['video'] = function() {
        var elem = document.createElement('video'),
            bool = false;

        // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
        try {
            if ( bool = !!elem.canPlayType ) {
                bool      = new Boolean(bool);
                bool.ogg  = elem.canPlayType('video/ogg; codecs="theora"')      .replace(/^no$/,'');

                // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
                bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,'');

                bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,'');
            }

        } catch(e) { }

        return bool;
    };

    tests['audio'] = function() {
        var elem = document.createElement('audio'),
            bool = false;

        try {
            if ( bool = !!elem.canPlayType ) {
                bool      = new Boolean(bool);
                bool.ogg  = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,'');
                bool.mp3  = elem.canPlayType('audio/mpeg;')               .replace(/^no$/,'');

                // Mimetypes accepted:
                //   developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements
                //   bit.ly/iphoneoscodecs
                bool.wav  = elem.canPlayType('audio/wav; codecs="1"')     .replace(/^no$/,'');
                bool.m4a  = ( elem.canPlayType('audio/x-m4a;')            ||
                              elem.canPlayType('audio/aac;'))             .replace(/^no$/,'');
            }
        } catch(e) { }

        return bool;
    };


    // In FF4, if disabled, window.localStorage should === null.

    // Normally, we could not test that directly and need to do a
    //   `('localStorage' in window) && ` test first because otherwise Firefox will
    //   throw bugzil.la/365772 if cookies are disabled

    // Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
    // will throw the exception:
    //   QUOTA_EXCEEDED_ERRROR DOM Exception 22.
    // Peculiarly, getItem and removeItem calls do not throw.

    // Because we are forced to try/catch this, we'll go aggressive.

    // Just FWIW: IE8 Compat mode supports these features completely:
    //   www.quirksmode.org/dom/html5.html
    // But IE8 doesn't support either with local files

    tests['localstorage'] = function() {
        try {
            localStorage.setItem(mod, mod);
            localStorage.removeItem(mod);
            return true;
        } catch(e) {
            return false;
        }
    };

    tests['sessionstorage'] = function() {
        try {
            sessionStorage.setItem(mod, mod);
            sessionStorage.removeItem(mod);
            return true;
        } catch(e) {
            return false;
        }
    };


    tests['webworkers'] = function() {
        return !!window.Worker;
    };


    tests['applicationcache'] = function() {
        return !!window.applicationCache;
    };


    // Thanks to Erik Dahlstrom
    tests['svg'] = function() {
        return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect;
    };

    // specifically for SVG inline in HTML, not within XHTML
    // test page: paulirish.com/demo/inline-svg
    tests['inlinesvg'] = function() {
      var div = document.createElement('div');
      div.innerHTML = '<svg/>';
      return (div.firstChild && div.firstChild.namespaceURI) == ns.svg;
    };

    // SVG SMIL animation
    tests['smil'] = function() {
        return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate')));
    };

    // This test is only for clip paths in SVG proper, not clip paths on HTML content
    // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg

    // However read the comments to dig into applying SVG clippaths to HTML content here:
    //   github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491
    tests['svgclippaths'] = function() {
        return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath')));
    };

    /*>>webforms*/
    // input features and input types go directly onto the ret object, bypassing the tests loop.
    // Hold this guy to execute in a moment.
    function webforms() {
        /*>>input*/
        // Run through HTML5's new input attributes to see if the UA understands any.
        // We're using f which is the <input> element created early on
        // Mike Taylr has created a comprehensive resource for testing these attributes
        //   when applied to all input types:
        //   miketaylr.com/code/input-type-attr.html
        // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary

        // Only input placeholder is tested while textarea's placeholder is not.
        // Currently Safari 4 and Opera 11 have support only for the input placeholder
        // Both tests are available in feature-detects/forms-placeholder.js
        Modernizr['input'] = (function( props ) {
            for ( var i = 0, len = props.length; i < len; i++ ) {
                attrs[ props[i] ] = !!(props[i] in inputElem);
            }
            if (attrs.list){
              // safari false positive's on datalist: webk.it/74252
              // see also github.com/Modernizr/Modernizr/issues/146
              attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
            }
            return attrs;
        })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));
        /*>>input*/

        /*>>inputtypes*/
        // Run through HTML5's new input types to see if the UA understands any.
        //   This is put behind the tests runloop because it doesn't return a
        //   true/false like all the other tests; instead, it returns an object
        //   containing each input type with its corresponding true/false value

        // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/
        Modernizr['inputtypes'] = (function(props) {

            for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) {

                inputElem.setAttribute('type', inputElemType = props[i]);
                bool = inputElem.type !== 'text';

                // We first check to see if the type we give it sticks..
                // If the type does, we feed it a textual value, which shouldn't be valid.
                // If the value doesn't stick, we know there's input sanitization which infers a custom UI
                if ( bool ) {

                    inputElem.value         = smile;
                    inputElem.style.cssText = 'position:absolute;visibility:hidden;';

                    if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) {

                      docElement.appendChild(inputElem);
                      defaultView = document.defaultView;

                      // Safari 2-4 allows the smiley as a value, despite making a slider
                      bool =  defaultView.getComputedStyle &&
                              defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' &&
                              // Mobile android web browser has false positive, so must
                              // check the height to see if the widget is actually there.
                              (inputElem.offsetHeight !== 0);

                      docElement.removeChild(inputElem);

                    } else if ( /^(search|tel)$/.test(inputElemType) ){
                      // Spec doesn't define any special parsing or detectable UI
                      //   behaviors so we pass these through as true

                      // Interestingly, opera fails the earlier test, so it doesn't
                      //  even make it here.

                    } else if ( /^(url|email)$/.test(inputElemType) ) {
                      // Real url and email support comes with prebaked validation.
                      bool = inputElem.checkValidity && inputElem.checkValidity() === false;

                    } else {
                      // If the upgraded input compontent rejects the :) text, we got a winner
                      bool = inputElem.value != smile;
                    }
                }

                inputs[ props[i] ] = !!bool;
            }
            return inputs;
        })('search tel url email datetime date month week time datetime-local number range color'.split(' '));
        /*>>inputtypes*/
    }
    /*>>webforms*/


    // End of test definitions
    // -----------------------



    // Run through all tests and detect their support in the current UA.
    // todo: hypothetically we could be doing an array of tests and use a basic loop here.
    for ( var feature in tests ) {
        if ( hasOwnProp(tests, feature) ) {
            // run the test, throw the return value into the Modernizr,
            //   then based on that boolean, define an appropriate className
            //   and push it into an array of classes we'll join later.
            featureName  = feature.toLowerCase();
            Modernizr[featureName] = tests[feature]();

            classes.push((Modernizr[featureName] ? '' : 'no-') + featureName);
        }
    }

    /*>>webforms*/
    // input tests need to run.
    Modernizr.input || webforms();
    /*>>webforms*/


    /**
     * addTest allows the user to define their own feature tests
     * the result will be added onto the Modernizr object,
     * as well as an appropriate className set on the html element
     *
     * @param feature - String naming the feature
     * @param test - Function returning true if feature is supported, false if not
     */
     Modernizr.addTest = function ( feature, test ) {
       if ( typeof feature == 'object' ) {
         for ( var key in feature ) {
           if ( hasOwnProp( feature, key ) ) {
             Modernizr.addTest( key, feature[ key ] );
           }
         }
       } else {

         feature = feature.toLowerCase();

         if ( Modernizr[feature] !== undefined ) {
           // we're going to quit if you're trying to overwrite an existing test
           // if we were to allow it, we'd do this:
           //   var re = new RegExp("\\b(no-)?" + feature + "\\b");
           //   docElement.className = docElement.className.replace( re, '' );
           // but, no rly, stuff 'em.
           return Modernizr;
         }

         test = typeof test == 'function' ? test() : test;

         if (typeof enableClasses !== "undefined" && enableClasses) {
           docElement.className += ' ' + (test ? '' : 'no-') + feature;
         }
         Modernizr[feature] = test;

       }

       return Modernizr; // allow chaining.
     };


    // Reset modElem.cssText to nothing to reduce memory footprint.
    setCss('');
    modElem = inputElem = null;

    /*>>shiv*/
    /**
     * @preserve HTML5 Shiv prev3.7.1 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
     */
    ;(function(window, document) {
        /*jshint evil:true */
        /** version */
        var version = '3.7.0';

        /** Preset options */
        var options = window.html5 || {};

        /** Used to skip problem elements */
        var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;

        /** Not all elements can be cloned in IE **/
        var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;

        /** Detect whether the browser supports default html5 styles */
        var supportsHtml5Styles;

        /** Name of the expando, to work with multiple documents or to re-shiv one document */
        var expando = '_html5shiv';

        /** The id for the the documents expando */
        var expanID = 0;

        /** Cached data for each document */
        var expandoData = {};

        /** Detect whether the browser supports unknown elements */
        var supportsUnknownElements;

        (function() {
          try {
            var a = document.createElement('a');
            a.innerHTML = '<xyz></xyz>';
            //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
            supportsHtml5Styles = ('hidden' in a);

            supportsUnknownElements = a.childNodes.length == 1 || (function() {
              // assign a false positive if unable to shiv
              (document.createElement)('a');
              var frag = document.createDocumentFragment();
              return (
                typeof frag.cloneNode == 'undefined' ||
                typeof frag.createDocumentFragment == 'undefined' ||
                typeof frag.createElement == 'undefined'
              );
            }());
          } catch(e) {
            // assign a false positive if detection fails => unable to shiv
            supportsHtml5Styles = true;
            supportsUnknownElements = true;
          }

        }());

        /*--------------------------------------------------------------------------*/

        /**
         * Creates a style sheet with the given CSS text and adds it to the document.
         * @private
         * @param {Document} ownerDocument The document.
         * @param {String} cssText The CSS text.
         * @returns {StyleSheet} The style element.
         */
        function addStyleSheet(ownerDocument, cssText) {
          var p = ownerDocument.createElement('p'),
          parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;

          p.innerHTML = 'x<style>' + cssText + '</style>';
          return parent.insertBefore(p.lastChild, parent.firstChild);
        }

        /**
         * Returns the value of `html5.elements` as an array.
         * @private
         * @returns {Array} An array of shived element node names.
         */
        function getElements() {
          var elements = html5.elements;
          return typeof elements == 'string' ? elements.split(' ') : elements;
        }

        /**
         * Returns the data associated to the given document
         * @private
         * @param {Document} ownerDocument The document.
         * @returns {Object} An object of data.
         */
        function getExpandoData(ownerDocument) {
          var data = expandoData[ownerDocument[expando]];
          if (!data) {
            data = {};
            expanID++;
            ownerDocument[expando] = expanID;
            expandoData[expanID] = data;
          }
          return data;
        }

        /**
         * returns a shived element for the given nodeName and document
         * @memberOf html5
         * @param {String} nodeName name of the element
         * @param {Document} ownerDocument The context document.
         * @returns {Object} The shived element.
         */
        function createElement(nodeName, ownerDocument, data){
          if (!ownerDocument) {
            ownerDocument = document;
          }
          if(supportsUnknownElements){
            return ownerDocument.createElement(nodeName);
          }
          if (!data) {
            data = getExpandoData(ownerDocument);
          }
          var node;

          if (data.cache[nodeName]) {
            node = data.cache[nodeName].cloneNode();
          } else if (saveClones.test(nodeName)) {
            node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
          } else {
            node = data.createElem(nodeName);
          }

          // Avoid adding some elements to fragments in IE < 9 because
          // * Attributes like `name` or `type` cannot be set/changed once an element
          //   is inserted into a document/fragment
          // * Link elements with `src` attributes that are inaccessible, as with
          //   a 403 response, will cause the tab/window to crash
          // * Script elements appended to fragments will execute when their `src`
          //   or `text` property is set
          return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node;
        }

        /**
         * returns a shived DocumentFragment for the given document
         * @memberOf html5
         * @param {Document} ownerDocument The context document.
         * @returns {Object} The shived DocumentFragment.
         */
        function createDocumentFragment(ownerDocument, data){
          if (!ownerDocument) {
            ownerDocument = document;
          }
          if(supportsUnknownElements){
            return ownerDocument.createDocumentFragment();
          }
          data = data || getExpandoData(ownerDocument);
          var clone = data.frag.cloneNode(),
          i = 0,
          elems = getElements(),
          l = elems.length;
          for(;i<l;i++){
            clone.createElement(elems[i]);
          }
          return clone;
        }

        /**
         * Shivs the `createElement` and `createDocumentFragment` methods of the document.
         * @private
         * @param {Document|DocumentFragment} ownerDocument The document.
         * @param {Object} data of the document.
         */
        function shivMethods(ownerDocument, data) {
          if (!data.cache) {
            data.cache = {};
            data.createElem = ownerDocument.createElement;
            data.createFrag = ownerDocument.createDocumentFragment;
            data.frag = data.createFrag();
          }


          ownerDocument.createElement = function(nodeName) {
            //abort shiv
            if (!html5.shivMethods) {
              return data.createElem(nodeName);
            }
            return createElement(nodeName, ownerDocument, data);
          };

          ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
                                                          'var n=f.cloneNode(),c=n.createElement;' +
                                                          'h.shivMethods&&(' +
                                                          // unroll the `createElement` calls
                                                          getElements().join().replace(/[\w\-]+/g, function(nodeName) {
            data.createElem(nodeName);
            data.frag.createElement(nodeName);
            return 'c("' + nodeName + '")';
          }) +
            ');return n}'
                                                         )(html5, data.frag);
        }

        /*--------------------------------------------------------------------------*/

        /**
         * Shivs the given document.
         * @memberOf html5
         * @param {Document} ownerDocument The document to shiv.
         * @returns {Document} The shived document.
         */
        function shivDocument(ownerDocument) {
          if (!ownerDocument) {
            ownerDocument = document;
          }
          var data = getExpandoData(ownerDocument);

          if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
            data.hasCSS = !!addStyleSheet(ownerDocument,
                                          // corrects block display not defined in IE6/7/8/9
                                          'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
                                            // adds styling not present in IE6/7/8/9
                                            'mark{background:#FF0;color:#000}' +
                                            // hides non-rendered elements
                                            'template{display:none}'
                                         );
          }
          if (!supportsUnknownElements) {
            shivMethods(ownerDocument, data);
          }
          return ownerDocument;
        }

        /*--------------------------------------------------------------------------*/

        /**
         * The `html5` object is exposed so that more elements can be shived and
         * existing shiving can be detected on iframes.
         * @type Object
         * @example
         *
         * // options can be changed before the script is included
         * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
         */
        var html5 = {

          /**
           * An array or space separated string of node names of the elements to shiv.
           * @memberOf html5
           * @type Array|String
           */
          'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',

          /**
           * current version of html5shiv
           */
          'version': version,

          /**
           * A flag to indicate that the HTML5 style sheet should be inserted.
           * @memberOf html5
           * @type Boolean
           */
          'shivCSS': (options.shivCSS !== false),

          /**
           * Is equal to true if a browser supports creating unknown/HTML5 elements
           * @memberOf html5
           * @type boolean
           */
          'supportsUnknownElements': supportsUnknownElements,

          /**
           * A flag to indicate that the document's `createElement` and `createDocumentFragment`
           * methods should be overwritten.
           * @memberOf html5
           * @type Boolean
           */
          'shivMethods': (options.shivMethods !== false),

          /**
           * A string to describe the type of `html5` object ("default" or "default print").
           * @memberOf html5
           * @type String
           */
          'type': 'default',

          // shivs the document according to the specified `html5` object options
          'shivDocument': shivDocument,

          //creates a shived element
          createElement: createElement,

          //creates a shived documentFragment
          createDocumentFragment: createDocumentFragment
        };

        /*--------------------------------------------------------------------------*/

        // expose html5
        window.html5 = html5;

        // shiv the document
        shivDocument(document);

    }(this, document));
    /*>>shiv*/

    // Assign private properties to the return object with prefix
    Modernizr._version      = version;

    // expose these for the plugin API. Look in the source for how to join() them against your input
    /*>>prefixes*/
    Modernizr._prefixes     = prefixes;
    /*>>prefixes*/
    /*>>domprefixes*/
    Modernizr._domPrefixes  = domPrefixes;
    Modernizr._cssomPrefixes  = cssomPrefixes;
    /*>>domprefixes*/

    /*>>mq*/
    // Modernizr.mq tests a given media query, live against the current state of the window
    // A few important notes:
    //   * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false
    //   * A max-width or orientation query will be evaluated against the current state, which may change later.
    //   * You must specify values. Eg. If you are testing support for the min-width media query use:
    //       Modernizr.mq('(min-width:0)')
    // usage:
    // Modernizr.mq('only screen and (max-width:768)')
    Modernizr.mq            = testMediaQuery;
    /*>>mq*/

    /*>>hasevent*/
    // Modernizr.hasEvent() detects support for a given event, with an optional element to test on
    // Modernizr.hasEvent('gesturestart', elem)
    Modernizr.hasEvent      = isEventSupported;
    /*>>hasevent*/

    /*>>testprop*/
    // Modernizr.testProp() investigates whether a given style property is recognized
    // Note that the property names must be provided in the camelCase variant.
    // Modernizr.testProp('pointerEvents')
    Modernizr.testProp      = function(prop){
        return testProps([prop]);
    };
    /*>>testprop*/

    /*>>testallprops*/
    // Modernizr.testAllProps() investigates whether a given style property,
    //   or any of its vendor-prefixed variants, is recognized
    // Note that the property names must be provided in the camelCase variant.
    // Modernizr.testAllProps('boxSizing')
    Modernizr.testAllProps  = testPropsAll;
    /*>>testallprops*/


    /*>>teststyles*/
    // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards
    // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... })
    Modernizr.testStyles    = injectElementWithStyles;
    /*>>teststyles*/


    /*>>prefixed*/
    // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input
    // Modernizr.prefixed('boxSizing') // 'MozBoxSizing'

    // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style.
    // Return values will also be the camelCase variant, if you need to translate that to hypenated style use:
    //
    //     str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-');

    // If you're trying to ascertain which transition end event to bind to, you might do something like...
    //
    //     var transEndEventNames = {
    //       'WebkitTransition' : 'webkitTransitionEnd',
    //       'MozTransition'    : 'transitionend',
    //       'OTransition'      : 'oTransitionEnd',
    //       'msTransition'     : 'MSTransitionEnd',
    //       'transition'       : 'transitionend'
    //     },
    //     transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];

    Modernizr.prefixed      = function(prop, obj, elem){
      if(!obj) {
        return testPropsAll(prop, 'pfx');
      } else {
        // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
        return testPropsAll(prop, obj, elem);
      }
    };
    /*>>prefixed*/


    /*>>cssclasses*/
    // Remove "no-js" class from <html> element, if it exists:
    docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') +

                            // Add the new classes to the <html> element.
                            (enableClasses ? ' js ' + classes.join(' ') : '');
    /*>>cssclasses*/

    return Modernizr;

})(this, this.document);
;/*
 * Pointer Events Polyfill: Adds support for the style attribute "pointer-events: none" to browsers without this feature (namely, IE).
 * (c) 2013, Kent Mewhort, licensed under BSD. See LICENSE.txt for details.
 */

// constructor
function PointerEventsPolyfill(options) {
  // set defaults
  this.options = {
    selector: '*',
    mouseEvents: ['click', 'dblclick', 'mousedown', 'mouseup'],
    usePolyfillIf: function () {
      if (navigator.appName == 'Microsoft Internet Explorer') {
        var agent = navigator.userAgent;
        if (agent.match(/MSIE ([0-9]{1,}[\.0-9]{0,})/) != null) {
          var version = parseFloat(RegExp.$1);
          if (version < 11)
            return true;
        }
      }
      return false;
    }
  };
  if (options) {
    var obj = this;
    $.each(options, function (k, v) {
      obj.options[k] = v;
    });
  }

  if (this.options.usePolyfillIf())
    this.register_mouse_events();
}

// singleton initializer
PointerEventsPolyfill.initialize = function (options) {
  if (PointerEventsPolyfill.singleton == null)
    PointerEventsPolyfill.singleton = new PointerEventsPolyfill(options);
  return PointerEventsPolyfill.singleton;
};

// handle mouse events w/ support for pointer-events: none
PointerEventsPolyfill.prototype.register_mouse_events = function () {
  // register on all elements (and all future elements) matching the selector
  $(document).on(this.options.mouseEvents.join(" "), this.options.selector, function (e) {
    if ($(this).css('pointer-events') == 'none') {
      // peak at the element below
      var origDisplayAttribute = $(this).css('display');
      $(this).css('display', 'none');

      var underneathElem = document.elementFromPoint(e.clientX, e.clientY);

      if (origDisplayAttribute)
        $(this)
            .css('display', origDisplayAttribute);
      else
        $(this).css('display', '');

      // fire the mouse event on the element below
      e.target = underneathElem;
      $(underneathElem).trigger(e);

      return false;
    }
    return true;
  });
};;/**
 * Copyright 2016 Google Inc. All Rights Reserved.
 *
 * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
 *
 *  https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
 *
 */

(function(window, document) {
'use strict';


// Exits early if all IntersectionObserver and IntersectionObserverEntry
// features are natively supported.
if ('IntersectionObserver' in window &&
    'IntersectionObserverEntry' in window &&
    'intersectionRatio' in window.IntersectionObserverEntry.prototype) {

  // Minimal polyfill for Edge 15's lack of `isIntersecting`
  // See: https://github.com/w3c/IntersectionObserver/issues/211
  if (!('isIntersecting' in window.IntersectionObserverEntry.prototype)) {
    Object.defineProperty(window.IntersectionObserverEntry.prototype,
      'isIntersecting', {
      get: function () {
        return this.intersectionRatio > 0;
      }
    });
  }
  return;
}


/**
 * An IntersectionObserver registry. This registry exists to hold a strong
 * reference to IntersectionObserver instances currently observing a target
 * element. Without this registry, instances without another reference may be
 * garbage collected.
 */
var registry = [];


/**
 * Creates the global IntersectionObserverEntry constructor.
 * https://w3c.github.io/IntersectionObserver/#intersection-observer-entry
 * @param {Object} entry A dictionary of instance properties.
 * @constructor
 */
function IntersectionObserverEntry(entry) {
  this.time = entry.time;
  this.target = entry.target;
  this.rootBounds = entry.rootBounds;
  this.boundingClientRect = entry.boundingClientRect;
  this.intersectionRect = entry.intersectionRect || getEmptyRect();
  this.isIntersecting = !!entry.intersectionRect;

  // Calculates the intersection ratio.
  var targetRect = this.boundingClientRect;
  var targetArea = targetRect.width * targetRect.height;
  var intersectionRect = this.intersectionRect;
  var intersectionArea = intersectionRect.width * intersectionRect.height;

  // Sets intersection ratio.
  if (targetArea) {
    // Round the intersection ratio to avoid floating point math issues:
    // https://github.com/w3c/IntersectionObserver/issues/324
    this.intersectionRatio = Number((intersectionArea / targetArea).toFixed(4));
  } else {
    // If area is zero and is intersecting, sets to 1, otherwise to 0
    this.intersectionRatio = this.isIntersecting ? 1 : 0;
  }
}


/**
 * Creates the global IntersectionObserver constructor.
 * https://w3c.github.io/IntersectionObserver/#intersection-observer-interface
 * @param {Function} callback The function to be invoked after intersection
 *     changes have queued. The function is not invoked if the queue has
 *     been emptied by calling the `takeRecords` method.
 * @param {Object=} opt_options Optional configuration options.
 * @constructor
 */
function IntersectionObserver(callback, opt_options) {

  var options = opt_options || {};

  if (typeof callback != 'function') {
    throw new Error('callback must be a function');
  }

  if (options.root && options.root.nodeType != 1) {
    throw new Error('root must be an Element');
  }

  // Binds and throttles `this._checkForIntersections`.
  this._checkForIntersections = throttle(
      this._checkForIntersections.bind(this), this.THROTTLE_TIMEOUT);

  // Private properties.
  this._callback = callback;
  this._observationTargets = [];
  this._queuedEntries = [];
  this._rootMarginValues = this._parseRootMargin(options.rootMargin);

  // Public properties.
  this.thresholds = this._initThresholds(options.threshold);
  this.root = options.root || null;
  this.rootMargin = this._rootMarginValues.map(function(margin) {
    return margin.value + margin.unit;
  }).join(' ');
}


/**
 * The minimum interval within which the document will be checked for
 * intersection changes.
 */
IntersectionObserver.prototype.THROTTLE_TIMEOUT = 100;


/**
 * The frequency in which the polyfill polls for intersection changes.
 * this can be updated on a per instance basis and must be set prior to
 * calling `observe` on the first target.
 */
IntersectionObserver.prototype.POLL_INTERVAL = null;

/**
 * Use a mutation observer on the root element
 * to detect intersection changes.
 */
IntersectionObserver.prototype.USE_MUTATION_OBSERVER = true;


/**
 * Starts observing a target element for intersection changes based on
 * the thresholds values.
 * @param {Element} target The DOM element to observe.
 */
IntersectionObserver.prototype.observe = function(target) {
  var isTargetAlreadyObserved = this._observationTargets.some(function(item) {
    return item.element == target;
  });

  if (isTargetAlreadyObserved) {
    return;
  }

  if (!(target && target.nodeType == 1)) {
    throw new Error('target must be an Element');
  }

  this._registerInstance();
  this._observationTargets.push({element: target, entry: null});
  this._monitorIntersections();
  this._checkForIntersections();
};


/**
 * Stops observing a target element for intersection changes.
 * @param {Element} target The DOM element to observe.
 */
IntersectionObserver.prototype.unobserve = function(target) {
  this._observationTargets =
      this._observationTargets.filter(function(item) {

    return item.element != target;
  });
  if (!this._observationTargets.length) {
    this._unmonitorIntersections();
    this._unregisterInstance();
  }
};


/**
 * Stops observing all target elements for intersection changes.
 */
IntersectionObserver.prototype.disconnect = function() {
  this._observationTargets = [];
  this._unmonitorIntersections();
  this._unregisterInstance();
};


/**
 * Returns any queue entries that have not yet been reported to the
 * callback and clears the queue. This can be used in conjunction with the
 * callback to obtain the absolute most up-to-date intersection information.
 * @return {Array} The currently queued entries.
 */
IntersectionObserver.prototype.takeRecords = function() {
  var records = this._queuedEntries.slice();
  this._queuedEntries = [];
  return records;
};


/**
 * Accepts the threshold value from the user configuration object and
 * returns a sorted array of unique threshold values. If a value is not
 * between 0 and 1 and error is thrown.
 * @private
 * @param {Array|number=} opt_threshold An optional threshold value or
 *     a list of threshold values, defaulting to [0].
 * @return {Array} A sorted list of unique and valid threshold values.
 */
IntersectionObserver.prototype._initThresholds = function(opt_threshold) {
  var threshold = opt_threshold || [0];
  if (!Array.isArray(threshold)) threshold = [threshold];

  return threshold.sort().filter(function(t, i, a) {
    if (typeof t != 'number' || isNaN(t) || t < 0 || t > 1) {
      throw new Error('threshold must be a number between 0 and 1 inclusively');
    }
    return t !== a[i - 1];
  });
};


/**
 * Accepts the rootMargin value from the user configuration object
 * and returns an array of the four margin values as an object containing
 * the value and unit properties. If any of the values are not properly
 * formatted or use a unit other than px or %, and error is thrown.
 * @private
 * @param {string=} opt_rootMargin An optional rootMargin value,
 *     defaulting to '0px'.
 * @return {Array<Object>} An array of margin objects with the keys
 *     value and unit.
 */
IntersectionObserver.prototype._parseRootMargin = function(opt_rootMargin) {
  var marginString = opt_rootMargin || '0px';
  var margins = marginString.split(/\s+/).map(function(margin) {
    var parts = /^(-?\d*\.?\d+)(px|%)$/.exec(margin);
    if (!parts) {
      throw new Error('rootMargin must be specified in pixels or percent');
    }
    return {value: parseFloat(parts[1]), unit: parts[2]};
  });

  // Handles shorthand.
  margins[1] = margins[1] || margins[0];
  margins[2] = margins[2] || margins[0];
  margins[3] = margins[3] || margins[1];

  return margins;
};


/**
 * Starts polling for intersection changes if the polling is not already
 * happening, and if the page's visibility state is visible.
 * @private
 */
IntersectionObserver.prototype._monitorIntersections = function() {
  if (!this._monitoringIntersections) {
    this._monitoringIntersections = true;

    // If a poll interval is set, use polling instead of listening to
    // resize and scroll events or DOM mutations.
    if (this.POLL_INTERVAL) {
      this._monitoringInterval = setInterval(
          this._checkForIntersections, this.POLL_INTERVAL);
    }
    else {
      addEvent(window, 'resize', this._checkForIntersections, true);
      addEvent(document, 'scroll', this._checkForIntersections, true);

      if (this.USE_MUTATION_OBSERVER && 'MutationObserver' in window) {
        this._domObserver = new MutationObserver(this._checkForIntersections);
        this._domObserver.observe(document, {
          attributes: true,
          childList: true,
          characterData: true,
          subtree: true
        });
      }
    }
  }
};


/**
 * Stops polling for intersection changes.
 * @private
 */
IntersectionObserver.prototype._unmonitorIntersections = function() {
  if (this._monitoringIntersections) {
    this._monitoringIntersections = false;

    clearInterval(this._monitoringInterval);
    this._monitoringInterval = null;

    removeEvent(window, 'resize', this._checkForIntersections, true);
    removeEvent(document, 'scroll', this._checkForIntersections, true);

    if (this._domObserver) {
      this._domObserver.disconnect();
      this._domObserver = null;
    }
  }
};


/**
 * Scans each observation target for intersection changes and adds them
 * to the internal entries queue. If new entries are found, it
 * schedules the callback to be invoked.
 * @private
 */
IntersectionObserver.prototype._checkForIntersections = function() {
  var rootIsInDom = this._rootIsInDom();
  var rootRect = rootIsInDom ? this._getRootRect() : getEmptyRect();

  this._observationTargets.forEach(function(item) {
    var target = item.element;
    var targetRect = getBoundingClientRect(target);
    var rootContainsTarget = this._rootContainsTarget(target);
    var oldEntry = item.entry;
    var intersectionRect = rootIsInDom && rootContainsTarget &&
        this._computeTargetAndRootIntersection(target, rootRect);

    var newEntry = item.entry = new IntersectionObserverEntry({
      time: now(),
      target: target,
      boundingClientRect: targetRect,
      rootBounds: rootRect,
      intersectionRect: intersectionRect
    });

    if (!oldEntry) {
      this._queuedEntries.push(newEntry);
    } else if (rootIsInDom && rootContainsTarget) {
      // If the new entry intersection ratio has crossed any of the
      // thresholds, add a new entry.
      if (this._hasCrossedThreshold(oldEntry, newEntry)) {
        this._queuedEntries.push(newEntry);
      }
    } else {
      // If the root is not in the DOM or target is not contained within
      // root but the previous entry for this target had an intersection,
      // add a new record indicating removal.
      if (oldEntry && oldEntry.isIntersecting) {
        this._queuedEntries.push(newEntry);
      }
    }
  }, this);

  if (this._queuedEntries.length) {
    this._callback(this.takeRecords(), this);
  }
};


/**
 * Accepts a target and root rect computes the intersection between then
 * following the algorithm in the spec.
 * TODO(philipwalton): at this time clip-path is not considered.
 * https://w3c.github.io/IntersectionObserver/#calculate-intersection-rect-algo
 * @param {Element} target The target DOM element
 * @param {Object} rootRect The bounding rect of the root after being
 *     expanded by the rootMargin value.
 * @return {?Object} The final intersection rect object or undefined if no
 *     intersection is found.
 * @private
 */
IntersectionObserver.prototype._computeTargetAndRootIntersection =
    function(target, rootRect) {

  // If the element isn't displayed, an intersection can't happen.
  if (window.getComputedStyle(target).display == 'none') return;

  var targetRect = getBoundingClientRect(target);
  var intersectionRect = targetRect;
  var parent = getParentNode(target);
  var atRoot = false;

  while (!atRoot) {
    var parentRect = null;
    var parentComputedStyle = parent.nodeType == 1 ?
        window.getComputedStyle(parent) : {};

    // If the parent isn't displayed, an intersection can't happen.
    if (parentComputedStyle.display == 'none') return;

    if (parent == this.root || parent == document) {
      atRoot = true;
      parentRect = rootRect;
    } else {
      // If the element has a non-visible overflow, and it's not the <body>
      // or <html> element, update the intersection rect.
      // Note: <body> and <html> cannot be clipped to a rect that's not also
      // the document rect, so no need to compute a new intersection.
      if (parent != document.body &&
          parent != document.documentElement &&
          parentComputedStyle.overflow != 'visible') {
        parentRect = getBoundingClientRect(parent);
      }
    }

    // If either of the above conditionals set a new parentRect,
    // calculate new intersection data.
    if (parentRect) {
      intersectionRect = computeRectIntersection(parentRect, intersectionRect);

      if (!intersectionRect) break;
    }
    parent = getParentNode(parent);
  }
  return intersectionRect;
};


/**
 * Returns the root rect after being expanded by the rootMargin value.
 * @return {Object} The expanded root rect.
 * @private
 */
IntersectionObserver.prototype._getRootRect = function() {
  var rootRect;
  if (this.root) {
    rootRect = getBoundingClientRect(this.root);
  } else {
    // Use <html>/<body> instead of window since scroll bars affect size.
    var html = document.documentElement;
    var body = document.body;
    rootRect = {
      top: 0,
      left: 0,
      right: html.clientWidth || body.clientWidth,
      width: html.clientWidth || body.clientWidth,
      bottom: html.clientHeight || body.clientHeight,
      height: html.clientHeight || body.clientHeight
    };
  }
  return this._expandRectByRootMargin(rootRect);
};


/**
 * Accepts a rect and expands it by the rootMargin value.
 * @param {Object} rect The rect object to expand.
 * @return {Object} The expanded rect.
 * @private
 */
IntersectionObserver.prototype._expandRectByRootMargin = function(rect) {
  var margins = this._rootMarginValues.map(function(margin, i) {
    return margin.unit == 'px' ? margin.value :
        margin.value * (i % 2 ? rect.width : rect.height) / 100;
  });
  var newRect = {
    top: rect.top - margins[0],
    right: rect.right + margins[1],
    bottom: rect.bottom + margins[2],
    left: rect.left - margins[3]
  };
  newRect.width = newRect.right - newRect.left;
  newRect.height = newRect.bottom - newRect.top;

  return newRect;
};


/**
 * Accepts an old and new entry and returns true if at least one of the
 * threshold values has been crossed.
 * @param {?IntersectionObserverEntry} oldEntry The previous entry for a
 *    particular target element or null if no previous entry exists.
 * @param {IntersectionObserverEntry} newEntry The current entry for a
 *    particular target element.
 * @return {boolean} Returns true if a any threshold has been crossed.
 * @private
 */
IntersectionObserver.prototype._hasCrossedThreshold =
    function(oldEntry, newEntry) {

  // To make comparing easier, an entry that has a ratio of 0
  // but does not actually intersect is given a value of -1
  var oldRatio = oldEntry && oldEntry.isIntersecting ?
      oldEntry.intersectionRatio || 0 : -1;
  var newRatio = newEntry.isIntersecting ?
      newEntry.intersectionRatio || 0 : -1;

  // Ignore unchanged ratios
  if (oldRatio === newRatio) return;

  for (var i = 0; i < this.thresholds.length; i++) {
    var threshold = this.thresholds[i];

    // Return true if an entry matches a threshold or if the new ratio
    // and the old ratio are on the opposite sides of a threshold.
    if (threshold == oldRatio || threshold == newRatio ||
        threshold < oldRatio !== threshold < newRatio) {
      return true;
    }
  }
};


/**
 * Returns whether or not the root element is an element and is in the DOM.
 * @return {boolean} True if the root element is an element and is in the DOM.
 * @private
 */
IntersectionObserver.prototype._rootIsInDom = function() {
  return !this.root || containsDeep(document, this.root);
};


/**
 * Returns whether or not the target element is a child of root.
 * @param {Element} target The target element to check.
 * @return {boolean} True if the target element is a child of root.
 * @private
 */
IntersectionObserver.prototype._rootContainsTarget = function(target) {
  return containsDeep(this.root || document, target);
};


/**
 * Adds the instance to the global IntersectionObserver registry if it isn't
 * already present.
 * @private
 */
IntersectionObserver.prototype._registerInstance = function() {
  if (registry.indexOf(this) < 0) {
    registry.push(this);
  }
};


/**
 * Removes the instance from the global IntersectionObserver registry.
 * @private
 */
IntersectionObserver.prototype._unregisterInstance = function() {
  var index = registry.indexOf(this);
  if (index != -1) registry.splice(index, 1);
};


/**
 * Returns the result of the performance.now() method or null in browsers
 * that don't support the API.
 * @return {number} The elapsed time since the page was requested.
 */
function now() {
  return window.performance && performance.now && performance.now();
}


/**
 * Throttles a function and delays its execution, so it's only called at most
 * once within a given time period.
 * @param {Function} fn The function to throttle.
 * @param {number} timeout The amount of time that must pass before the
 *     function can be called again.
 * @return {Function} The throttled function.
 */
function throttle(fn, timeout) {
  var timer = null;
  return function () {
    if (!timer) {
      timer = setTimeout(function() {
        fn();
        timer = null;
      }, timeout);
    }
  };
}


/**
 * Adds an event handler to a DOM node ensuring cross-browser compatibility.
 * @param {Node} node The DOM node to add the event handler to.
 * @param {string} event The event name.
 * @param {Function} fn The event handler to add.
 * @param {boolean} opt_useCapture Optionally adds the even to the capture
 *     phase. Note: this only works in modern browsers.
 */
function addEvent(node, event, fn, opt_useCapture) {
  if (typeof node.addEventListener == 'function') {
    node.addEventListener(event, fn, opt_useCapture || false);
  }
  else if (typeof node.attachEvent == 'function') {
    node.attachEvent('on' + event, fn);
  }
}


/**
 * Removes a previously added event handler from a DOM node.
 * @param {Node} node The DOM node to remove the event handler from.
 * @param {string} event The event name.
 * @param {Function} fn The event handler to remove.
 * @param {boolean} opt_useCapture If the event handler was added with this
 *     flag set to true, it should be set to true here in order to remove it.
 */
function removeEvent(node, event, fn, opt_useCapture) {
  if (typeof node.removeEventListener == 'function') {
    node.removeEventListener(event, fn, opt_useCapture || false);
  }
  else if (typeof node.detatchEvent == 'function') {
    node.detatchEvent('on' + event, fn);
  }
}


/**
 * Returns the intersection between two rect objects.
 * @param {Object} rect1 The first rect.
 * @param {Object} rect2 The second rect.
 * @return {?Object} The intersection rect or undefined if no intersection
 *     is found.
 */
function computeRectIntersection(rect1, rect2) {
  var top = Math.max(rect1.top, rect2.top);
  var bottom = Math.min(rect1.bottom, rect2.bottom);
  var left = Math.max(rect1.left, rect2.left);
  var right = Math.min(rect1.right, rect2.right);
  var width = right - left;
  var height = bottom - top;

  return (width >= 0 && height >= 0) && {
    top: top,
    bottom: bottom,
    left: left,
    right: right,
    width: width,
    height: height
  };
}


/**
 * Shims the native getBoundingClientRect for compatibility with older IE.
 * @param {Element} el The element whose bounding rect to get.
 * @return {Object} The (possibly shimmed) rect of the element.
 */
function getBoundingClientRect(el) {
  var rect;

  try {
    rect = el.getBoundingClientRect();
  } catch (err) {
    // Ignore Windows 7 IE11 "Unspecified error"
    // https://github.com/w3c/IntersectionObserver/pull/205
  }

  if (!rect) return getEmptyRect();

  // Older IE
  if (!(rect.width && rect.height)) {
    rect = {
      top: rect.top,
      right: rect.right,
      bottom: rect.bottom,
      left: rect.left,
      width: rect.right - rect.left,
      height: rect.bottom - rect.top
    };
  }
  return rect;
}


/**
 * Returns an empty rect object. An empty rect is returned when an element
 * is not in the DOM.
 * @return {Object} The empty rect.
 */
function getEmptyRect() {
  return {
    top: 0,
    bottom: 0,
    left: 0,
    right: 0,
    width: 0,
    height: 0
  };
}

/**
 * Checks to see if a parent element contains a child element (including inside
 * shadow DOM).
 * @param {Node} parent The parent element.
 * @param {Node} child The child element.
 * @return {boolean} True if the parent node contains the child node.
 */
function containsDeep(parent, child) {
  var node = child;
  while (node) {
    if (node == parent) return true;

    node = getParentNode(node);
  }
  return false;
}


/**
 * Gets the parent node of an element or its host element if the parent node
 * is a shadow root.
 * @param {Node} node The node whose parent to get.
 * @return {Node|null} The parent node or null if no parent exists.
 */
function getParentNode(node) {
  var parent = node.parentNode;

  if (parent && parent.nodeType == 11 && parent.host) {
    // If the parent is a shadow root, return the host element.
    return parent.host;
  }

  if (parent && parent.assignedSlot) {
    // If the parent is distributed in a <slot>, return the parent of a slot.
    return parent.assignedSlot.parentNode;
  }

  return parent;
}


// Exposes the constructors globally.
window.IntersectionObserver = IntersectionObserver;
window.IntersectionObserverEntry = IntersectionObserverEntry;

}(window, document));;/*!
 * Masonry PACKAGED v4.2.2
 * Cascading grid layout library
 * https://masonry.desandro.com
 * MIT License
 * by David DeSandro
 */

!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(t,r),delete n[r]),r.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var n=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var o=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!n)return void o.push(t);e(t,n)&&o.push(t);for(var i=t.querySelectorAll(n),r=0;r<i.length;r++)o.push(i[r])}}),o},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];clearTimeout(t);var e=arguments,r=this;this[o]=setTimeout(function(){n.apply(r,e),delete r[o]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var o=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var r=i.toDashed(n),s="data-"+r,a=document.querySelectorAll("["+s+"]"),h=document.querySelectorAll(".js-"+r),u=i.makeArray(a).concat(i.makeArray(h)),d=s+"-options",l=t.jQuery;u.forEach(function(t){var i,r=t.getAttribute(s)||t.getAttribute(d);try{i=r&&JSON.parse(r)}catch(a){return void(o&&o.error("Error parsing "+s+" on "+t.className+": "+a))}var h=new e(t,i);l&&l.data(t,n,h)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function n(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var r=document.documentElement.style,s="string"==typeof r.transition?"transition":"WebkitTransition",a="string"==typeof r.transform?"transform":"WebkitTransform",h={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[s],u={transform:a,transition:s,transitionDuration:s+"Duration",transitionProperty:s+"Property",transitionDelay:s+"Delay"},d=n.prototype=Object.create(t.prototype);d.constructor=n,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var n=u[i]||i;e[n]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],r=parseFloat(n),s=parseFloat(o),a=this.layout.size;-1!=n.indexOf("%")&&(r=r/100*a.width),-1!=o.indexOf("%")&&(s=s/100*a.height),r=isNaN(r)?0:r,s=isNaN(s)?0:s,r-=e?a.paddingLeft:a.paddingRight,s-=i?a.paddingTop:a.paddingBottom,this.position.x=r,this.position.y=s},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",r=i?"left":"right",s=i?"right":"left",a=this.position.x+t[o];e[r]=this.getXValue(a),e[s]="";var h=n?"paddingTop":"paddingBottom",u=n?"top":"bottom",d=n?"bottom":"top",l=this.position.y+t[h];e[u]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),o&&!this.isTransitioning)return void this.layoutPosition();var r=t-i,s=e-n,a={};a.transform=this.getTranslate(r,s),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop");return t=i?t:-t,e=n?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var n=this.element.offsetHeight;n=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+o(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(h,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=c[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var o=e.onEnd[n];o.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(h,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var f={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(f)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return s&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,n,o,r){return e(t,i,n,o,r)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,n,o){"use strict";function r(t,e){var i=n.getQueryElement(t);if(!i)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,u&&(this.$element=u(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var o=++l;this.element.outlayerGUID=o,c[o]=this,this._create();var r=this._getOption("initLayout");r&&this.layout()}function s(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var o=m[n]||1;return i*o}var h=t.console,u=t.jQuery,d=function(){},l=0,c={};r.namespace="outlayer",r.Item=o,r.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var f=r.prototype;n.extend(f,e.prototype),f.option=function(t){n.extend(this.options,t)},f._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},r.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},f._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},f.reloadItems=function(){this.items=this._itemize(this.element.children)},f._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var r=e[o],s=new i(r,this);n.push(s)}return n},f._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},f.getItemElements=function(){return this.items.map(function(t){return t.element})},f.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},f._init=f.layout,f._resetLayout=function(){this.getSize()},f.getSize=function(){this.size=i(this.element)},f._getMeasurement=function(t,e){var n,o=this.options[t];o?("string"==typeof o?n=this.element.querySelector(o):o instanceof HTMLElement&&(n=o),this[t]=n?i(n)[e]:o):this[t]=0},f.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},f._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},f._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},f._getItemLayoutPosition=function(){return{x:0,y:0}},f._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},f.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},f._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},f._postLayout=function(){this.resizeContainer()},f.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},f._getContainerSize=d,f._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},f._emitCompleteOnItems=function(t,e){function i(){o.dispatchEvent(t+"Complete",null,[e])}function n(){s++,s==r&&i()}var o=this,r=e.length;if(!e||!r)return void i();var s=0;e.forEach(function(e){e.once(t,n)})},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),u)if(this.$element=this.$element||u(this.element),e){var o=u.Event(e);o.type=t,this.$element.trigger(o,i)}else this.$element.trigger(t,i)},f.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},f.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},f.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},f.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},f._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)):void 0},f._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},f._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},f._manageStamp=d,f._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=i(t),r={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return r},f.handleEvent=n.handleEvent,f.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},f.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},f.onresize=function(){this.resize()},n.debounceMethod(r,"onresize",100),f.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},f.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},f.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},f.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},f.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},f.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},f.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},f.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},f.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},f.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},f.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},f.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},f.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete c[e],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},r.data=function(t){t=n.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&c[e]},r.create=function(t,e){var i=s(r);return i.defaults=n.extend({},r.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},r.compatOptions),i.namespace=t,i.data=r.data,i.Item=s(o),n.htmlInit(i,t),u&&u.bridget&&u.bridget(t,i),i};var m={ms:1,s:1e3};return r.Item=o,r}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,r=o/n,s=n-o%n,a=s&&1>s?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});;var pc = pc || {};

pc.excludeCinemas = {
    '11': 'Head Office',
    '14': 'Leeds Restaurant',
    '24': 'Everyman Gift Store',
    '29': 'Placeholder – DO NOT DELETE',
    '41': 'Dublin',
    '44': 'Plymouth'
};;var pc = pc || {};

pc.cinemaGroups = function (city) {
    city = city || '';
    city = city.toLowerCase();

    var group = undefined;

    if (['altrincham', 'clitheroe', 'harrogate', 'leeds', 'liverpool', 'manchester', 'newcastle', 'york'].indexOf(city) > -1) {
        group = {
            GroupId: 1,
            GroupTitle: 'North',
            GroupOrder: 1
        };
    }

    if (city === 'chelmsford') {
        group = {
            GroupId: 2,
            GroupTitle: 'East',
            GroupOrder: 2
        };
    }

    if (city === 'london') {
        group = {
            GroupId: 3,
            GroupTitle: 'Greater London',
            GroupOrder: 3
        };
    }

    if (['birmingham', 'lincoln', 'stratford-upon-avon'].indexOf(city) > -1) {
        group = {
            GroupId: 4,
            GroupTitle: 'Midlands',
            GroupOrder: 4
        };
    }

    if (['esher', 'gerrards cross', 'horsham', 'oxted', 'reigate', 'winchester', 'wokingham'].indexOf(city) > -1) {
        group = {
            GroupId: 5,
            GroupTitle: 'South',
            GroupOrder: 5
        };
    }

    if (['bristol'].indexOf(city) > -1) {
        group = {
            GroupId: 6,
            GroupTitle: 'West',
            GroupOrder: 6
        };
    }

    if (['edinburgh', 'glasgow'].indexOf(city) > -1) {
        group = {
            GroupId: 7,
            GroupTitle: 'Scotland',
            GroupOrder: 7
        };
    }

    if (city === 'cardiff') {
        group = {
            GroupId: 8,
            GroupTitle: 'Wales',
            GroupOrder: 8
        };
    }

    return group;
};;// default footer
// js loaded in the footer

// @prepros-prepend ../vendor/jquery/jquery.js

if (!window.console) {
	console = {
		log: function () { }
	};
}

var pc = pc || {};

// addthis
pc.addthis = pc.addthis || '';
(function ($) {	
	if (pc.addthis !== '') {
		$.getScript('//s7.addthis.com/js/300/addthis_widget.js#pubid=' + pc.addthis);
	}
})(jQuery);

// includes
// @prepros-append ../vendor/mustache/mustache.js
// @prepros-append ../vendor/jquery.refineslide/jquery.refineslide.js

; (function ($) {
    // navmain functionality
    function setup() {
        var $headSticky = $('.sticky'),
            $navMainLinks = $('[data-navmain-links]'),
            $navMainBtn = $('[data-navmain-btn]'),
            $header = $headSticky.find('header'),
            headerHeight = $header.outerHeight(),
            $nav = $headSticky.find('[data-navmain]'),
            navHeight = $nav.outerHeight(),
            $pageHolder = $('.pageholder'),
            viewportWidth = document.documentElement.clientWidth,
            viewportHeight = document.documentElement.clientHeight;

        if ($headSticky.length === 0) {
            return;
        }

        function navScroll() {
            var scrollTop = $(this).scrollTop();
            var hasViewportChanged = false;
            var pageHolderPadding;

            if (viewportWidth !== document.documentElement.clientWidth || viewportHeight !== document.documentElement.clientHeight) {
                hasViewportChanged = true;
                viewportWidth = document.documentElement.clientWidth;
                viewportHeight = document.documentElement.clientHeight;
            }

            headerHeight = $header.outerHeight();
            navHeight = $nav.outerHeight();
            pageHolderPadding = headerHeight + navHeight;

            if (scrollTop > 1 && (hasViewportChanged || $headSticky.hasClass('fixed') === false)) {
                $pageHolder.css('padding-top', headerHeight);
                $headSticky.addClass('fixed');
                $headSticky.css('top', -headerHeight);
                pageHolderPadding = headerHeight;
            }
            else if (scrollTop < 1 && (hasViewportChanged || $headSticky.hasClass('fixed') === true)) {
                $headSticky.removeClass('fixed');
                $headSticky.css('top', 0);
            }

            $pageHolder.css('padding-top', pageHolderPadding);
        }

        navScroll();

        $(window).on({
            'load': navScroll,
            'resize': navScroll,
            'scroll': navScroll
        });

        if ($navMainBtn.length > 0) {
            // show/hide mobile menu
            $navMainBtn.on('click', function (e) {
                e.preventDefault();
                var $btn = $(this);

                if ($btn.hasClass('active')) {
                    $btn.removeClass('active');
                    $navMainLinks.removeClass('active');
                }
                else {
                    $btn.addClass('active');
                    $navMainLinks.addClass('active');
                }
            });
        }
    }

    setup();

})(jQuery);

(function ($) {
    if (
        typeof pc === 'undefined' ||
        pc === null ||
        typeof pc.logo === 'undefined' ||
        pc.logo === null
    ) {
        return;
    }

    function getQSVariable(name, url) {
        if (!url) url = window.location.href;
        name = name.replace(/[\[\]]/g, '\\$&');
        var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
            results = regex.exec(url);
        if (!results) return null;
        if (!results[2]) return '';
        return decodeURIComponent(results[2].replace(/\+/g, ' '));
    }

    var $logoLink = $('[data-logo-link]');
    var logoStyles = '';
    var isValidDateTime = false;
    var now = new Date();
    var qsDate = getQSVariable('d');

    if (typeof qsDate !== 'undefined' && qsDate !== null && qsDate !== '') {
        try {
            now = new Date(qsDate);
        } catch (e) { /**/ }
    }

    if (
        typeof pc.logo.start !== 'undefined' &&
        pc.logo.start !== null &&
        pc.logo.start !== '' &&
        typeof pc.logo.end !== 'undefined' &&
        pc.logo.end !== null &&
        pc.logo.end !== ''
    ) {
        // MM/dd/yyyy HH:mm:ss

        var startDate = pc.logo.start.split(' ')[0].split('/').map(function (value) {
            return parseInt(value);
        });
        var startTime = pc.logo.start.split(' ')[1].split(':').map(function (value) {
            return parseInt(value);
        });

        var startDateTime = new Date(startDate[2], startDate[0] - 1, startDate[1], startTime[0], startTime[1], startTime[2]);
        
        var endDate = pc.logo.end.split(' ')[0].split('/').map(function (value) {
            return parseInt(value);
        });
        var endTime = pc.logo.end.split(' ')[1].split(':').map(function (value) {
            return parseInt(value);
        });

        var endDateTime = new Date(endDate[2], endDate[0] - 1, endDate[1], endTime[0], endTime[1], endTime[2]);
               
        isValidDateTime = now >= startDateTime && now <= endDateTime;
    }

    if (isValidDateTime) {
        if (
            typeof pc.logo.image !== 'undefined' &&
            pc.logo.image !== null &&
            pc.logo.image !== ''
        ) {
            logoStyles += '[data-logo-top], [data-logo-foot] {background-image: url("' + pc.logo.image + '")}';
        }

        if (
            typeof pc.logo.hover !== 'undefined' &&
            pc.logo.hover !== null &&
            pc.logo.hover !== ''
        ) {
            logoStyles += 'a:hover [data-logo-top], a:hover [data-logo-foot] {background-image: url("' + pc.logo.hover + '")}';
        }

        if (logoStyles !== '') {
            var styles = document.createElement('style');
            var head = document.head || document.getElementByTagName('head')[0];

            styles.type = 'text/css';

            head.appendChild(styles);

            if (styles.stylesheet) {
                styles.stylesheet.cssText = logoStyles;
            }
            else {
                styles.appendChild(document.createTextNode(logoStyles));
            }
        }

        if (
            typeof pc.logo.link !== 'undefined' &&
            pc.logo.link !== null &&
            pc.logo.link !== ''
        ) {
            $logoLink.attr('href', pc.logo.link);
        }
    }
})(jQuery);;var pc = pc || {};

// quick buy
pc.qb = pc.qb || {};

pc.qb.field = pc.qb.field || {
	'cinema': {
		'name': 'cinema',
		'method': 'cinemas/{{circuit}}/{{film}}',
		'template': '{{#.}}<option value="{{CinemaId}}" data-qb-cinema-name="{{CinemaNameValue}}" data-nr-qb-theatreName>{{CinemaName}}</option>{{/.}}'
	},
	'film': {
		'name': 'film',
		'method': 'movies/{{circuit}}/{{cinema}}',
        'template': '{{#.}}<option value="{{FilmId}}" data-nr-qb-filmName>{{Title}}</option>{{/.}}'
	},
	'date': {
		'name': 'date',
		'method': 'movies/{{circuit}}/{{cinema}}/{{film}}',
        'template': '{{#.}}{{#Sessions}}<option value="{{Date}}" data-nr-qb-date>{{DisplayDate}}</option>{{/Sessions}}{{/.}}'
	},
	'time': {
		'name': 'time',
		'method': 'movies/{{circuit}}/{{cinema}}/{{film}}/{{date}}?timeFormat=1',
        'template': '{{#.}}{{#Sessions}}{{#Times}}{{^SessionExpired}}{{^SoldOut}}<option value="{{Scheduleid}}" {{#pShowMessage}}data-qb-message="{{pShowMessage}}"{{/pShowMessage}} data-nr-qb-time>{{StartTime}}</option>{{/SoldOut}}{{/SessionExpired}}{{/Times}}{{/Sessions}}{{/.}}'
	}
};

(function ($) {	
	function setup() {
		var $quickBuy = $('[data-quickbuy]'),
			$quickBuyBtn = $('[data-quickbuy-btn]');

		if ($quickBuy.length > 0 && $quickBuyBtn.length > 0) {
			// quick buy show/hide
			$quickBuyBtn.on('click', function (e) {
				e.preventDefault();
				e.stopPropagation();

				var $btn = $(this),
					btnHeight = $btn.outerHeight();

				if ($btn.hasClass('active') === true) {
					$btn.removeClass('active');
					$quickBuy.removeClass('active');
				}
				else {
					$btn.addClass('active');
					$quickBuy.css('top', btnHeight).addClass('active');					
				}

				$('[data-login-modal],[data-login-nav-btn]').removeClass('active');

			});

			$(document).on('click.quickbuy', function (e) {
			    // hide quick buy if clicking elsewhere on page
                // except film session message
			    if (
                    $quickBuy.hasClass('active') === true &&
                    $quickBuy.is(e.target) === false &&
                    $quickBuy.has(e.target).length === 0 &&
                    $('[data-film-session-message]').is(e.target) === false &&
                    $('[data-film-session-message]').has(e.target).length === 0
                ) {
					$quickBuyBtn.filter('.active').trigger('click');
				}
			});

			$(document).on('click', '[data-quickbuy-close]', function (e) {
			    e.preventDefault();
			    e.stopPropagation();
			    $quickBuyBtn.filter('.active').trigger('click');
			});

			$quickBuy.each(setupForm);
		}
	}


	function setupForm() {
		var $quickBuy = $(this),
			$selects = $quickBuy.find('[data-quickbuy-select]'),
			$submit = $quickBuy.find('[data-quickbuy-submit]');

		var locationCookie;
		var $currentCinema;
		if ($('[data-id-cinema]').data('id-cinema') === 0 || $('[data-id-cinema]').data('id-cinema') === '0') {

			// have we a cinema cookied?

			if (typeof docCookies !== 'undefined' && docCookies.getItem('evmCinema') !== null) {
				locationCookie = docCookies.getItem('evmCinema');
				$currentCinema = locationCookie;
				$('[data-quickbuy-select=cinema] select').val($currentCinema).prop("selected", "selected");
				$quickBuy.data('cinema', $currentCinema);
			}
		}
		// are we on venue page

		else {
			// grab the cookie and make it selected option
			if (typeof docCookies !== 'undefined' && docCookies.getItem('evmCinema') !== null) {
				locationCookie = docCookies.getItem('evmCinema');
				$currentCinema = locationCookie;
				$('[data-quickbuy-select=cinema] select').val($currentCinema).prop("selected", "selected");
				$quickBuy.data('cinema', $currentCinema);
			}
		}




		$selects.on('change', function () {
			var $this = $(this),
				thisVal = $this.val(),
				thisType = $this.attr('data-quickbuy-select'),
                thisMessage = $this.find('option:selected').attr('data-qb-message') || '',
				isDisabled = this.disabled;

			if (isDisabled === false) {
				switch (thisType) {
					case pc.qb.field.cinema.name:
						$quickBuy.data('cinema', thisVal);
						//reset(pc.qb.field.film);
						reset(pc.qb.field.date);
						reset(pc.qb.field.time);
						reset($submit);
						if (thisVal !== '' && $quickBuy.data('film') !='') {
						    update(pc.qb.field.film);
						    update(pc.qb.field.date);
						    $('[data-quickbuy-select="time"]').val('').change();

						}
						else if (thisVal !== '' && $quickBuy.data('film') == '') {
						    update(pc.qb.field.film);
						}
						else {
						    update(pc.qb.field.cinema);
						    update(pc.qb.field.film);
						    $('[data-quickbuy-select="date"]').val('').change();
						    $('[data-quickbuy-select="time"]').val('').change();

						}
						break;
				    case pc.qb.field.film.name:
				        //console.log($quickBuy.data('cinema'));
						$quickBuy.data('film', thisVal);
						reset(pc.qb.field.date);
						reset(pc.qb.field.time);
						reset($submit);

						

						if (thisVal !== '' && $quickBuy.data('cinema') !='') {
						    //update(pc.qb.field.cinema);
						    update(pc.qb.field.date);
						    $('[data-quickbuy-select="date"]').val('').change();
						    $('[data-quickbuy-select="time"]').val('').change();
						}
						else if (thisVal !== '' && $quickBuy.data('cinema') == '') {
						    update(pc.qb.field.cinema);
						    $('[data-quickbuy-select="time"]').val('').change();
						    //update(pc.qb.field.date);
						}
						else {
						    update(pc.qb.field.cinema);
						    update(pc.qb.field.film);
						    //$('[data-quickbuy-select="cinema"]').val('').change();
						    $('[data-quickbuy-select="date"]').val('').change();
						    $('[data-quickbuy-select="time"]').val('').change();
						}
						break;
					case pc.qb.field.date.name:
						$quickBuy.data('date', thisVal.split("T")[0]);
						reset($submit);
						if (thisVal !== '') {
						    update(pc.qb.field.time);

						}
						else {
						    reset(pc.qb.field.time);
						    $('[data-quickbuy-select="time"]').val('').change();
						}
						break;
					case pc.qb.field.time.name:
					    $quickBuy.data('time', thisVal);
					    reset($submit);
						if (thisVal !== '') {
						    updateLink(pc.qb.field[thisType], thisMessage);
						}
						break;
				}
			}

			
		});

		$submit.on('click', function (e) {
		    var $this = $(this),
		        thisMessage = $this.attr('data-qb-showmessage') || '';

			if ($this.attr('href') === '#' && $this.hasClass('disabled') === true) {
				e.preventDefault();
			}

			if (thisMessage !== '' && typeof pc.showSessionMessage !== 'undefined') {
			    e.preventDefault();

			    pc.showSessionMessage(thisMessage, this.href);
			}
		});

		function update(field) {
			// update field
			var $field = $quickBuy.find('[data-quickbuy-select="' + field.name + '"]'),
				firstOption,
				method,
				url;

			if ($field.length > 0) {
			    firstOption = $field.children('option:first-child')[0].outerHTML;

			    if($quickBuy.data('film') === undefined) {
			        $quickBuy.data('film','')
			      //  console.log($quickBuy.data('film'));
			    }
				if (typeof $quickBuy.data('cinema') === 'undefined') {
			        $quickBuy.data('cinema', '')
			    }

				method = field.method
					.replace(/{{circuit}}/g, pc.api.circuit)
					.replace(/{{cinema}}/g, $quickBuy.data('cinema'))
					.replace(/{{film}}/g, $quickBuy.data('film'))
					.replace(/{{date}}/g, $quickBuy.data('date'));

				url = pc.api.movie + method;

				if (field.name == "cinema" && $('[data-quickbuy-select="film"]').val() == "") {
				    url = '/cinemas';
				}

				$.getJSON(url)
					.done(function (data) {
					   // console.log(data);
					    //if (field.name === pc.qb.field.cinema.name) {
					    //    $.each(data, function (key, value) {
					    //        var cinemaName = value.CinemaName.split(' ');
					    //        cinemaName.shift();
					    //        cinemaName.join(' ');
					    //        value.CinemaName = cinemaName.join(' ');
					    //    })
					    //}
					    
					    if (field.name === pc.qb.field.time.name) {
					        if (typeof data !== 'undefined' && data !== null && typeof data.Sessions !== 'undefined' && data.Sessions !== null && data.Sessions.length > 0) {
					            for (s = 0; s < data.Sessions.length; s++) {
					                if (typeof data.Sessions[s].Times !== 'undefined' && data.Sessions[s].Times !== null && data.Sessions[s].Times.length > 0) {
					                    for (t = 0; t < data.Sessions[s].Times.length; t++) {
					                        if (typeof data.Sessions[s].Times[t].Experience !== 'undefined' && data.Sessions[s].Times[t].Experience !== null && data.Sessions[s].Times[t].Experience.length > 0) {
					                            for (e = 0; e < data.Sessions[s].Times[t].Experience.length; e++) {
                                                    if (
                                                        data.Sessions[s].Times[t].Experience[e].ExternalId === 'Baby Club' ||
                                                        (pc.Authentication.HasLogin === false && data.Sessions[s].Times[t].Experience[e].ExternalId === 'Members')
                                                    ) {
					                                    data.Sessions[s].Times[t].pShowMessage = data.Sessions[s].Times[t].Experience[e].ExternalId;
					                                }
					                            }
					                        }
					                    }
					                }
					            }
					        }
						}
						if (field.name === pc.qb.field.cinema.name) {
						    pc.qb.cinemasList = data;
						}

						var html = Mustache.to_html(field.template, data);
						$field.html(firstOption + html).prop('disabled', false).removeClass('disabled');


					    //retain film when updating cinema list
						if (field.name === pc.qb.field.film.name) {
						    $field.val($quickBuy.data('film'));
						}

						// select current cinema
						if (field.name === pc.qb.field.cinema.name && typeof $quickBuy.data('cinema') !== 'undefined' && $quickBuy.data('cinema') !== '0' && $quickBuy.data('cinema') !== '') {

							$field.val($quickBuy.data('cinema'));
							
							if ($field.val() === $quickBuy.data('cinema')) {
								$field.trigger('change');
							}
						}

					})
					.fail(function (jqxhr, textStatus, error) {
						//console.log('Request Failed: ' + textStatus + ', ' + error);
					});
			}
		};

		function updateLink(field, message) {
			var $field = $quickBuy.find('[data-quickbuy-select="' + field.name + '"]'),
				$submit = $quickBuy.find('[data-quickbuy-submit]'),
				url = pc.url.booking || '';

			if ($field.length > 0 && $submit.length > 0 && url !== '' && typeof $quickBuy.data('time') !== 'undefined' && $quickBuy.data('time') !== '') {
				url = url
					.replace(/{{Scheduleid}}/g, $quickBuy.data('time'))
					.replace(/{{CinemaId}}/g, $quickBuy.data('cinema'))
					.replace(/{{FilmId}}/g, $quickBuy.data('film'));

				$submit.attr('href', url).removeClass('disabled');

				if (typeof message !== 'undefined' && message !== null && message !== '') {
				    $submit.attr('data-qb-showmessage', message);
				}
				else {
				    $submit.removeAttr('data-qb-showmessage');
				}
			}
			else {
				reset($submit);
			}
		}

		function reset(field) {
			var $field;

			if (typeof field.name === 'string') {
				// select
				$field = $quickBuy.find('[data-quickbuy-select="' + field.name + '"]');
				$field.val('').prop('disabled', true).addClass('disabled');
			}
			else {
				// submit
				$field = $(field);
				$field.attr('href', '#').addClass('disabled');
			}

		}

	    if ($selects.length === 4) {
	        // load cinemas
	        update(pc.qb.field.cinema);
            update(pc.qb.field.film);
	    }

	    if ($selects.length === 3) {
	        // load cinemas
	        update(pc.qb.field.film);
	    }
	}

	function init() {
		$(function () {
			setup();
		});
	}

	init();
})(jQuery);;var pc = pc || {};

// hero
var pc = pc || {};

// hero
pc.hero = pc.hero || {};

//pc.hero.arrow = pc.hero.arrow || '<div class="rs-arrows"><button href="#" class="rs-prev"></button><button href="#" class="rs-next"></button></div>';
pc.hero.autoplay = pc.hero.autoplay || false;
pc.hero.delay = pc.hero.delay || 4000;

(function ($) {

   
})(jQuery);


(function () {
    $('#flexsliderCarousel').slick({
        dots: true,
        infinite: true,
        speed: 300,
        slidesToShow: 3,
        slidesToScroll: 1,
        nextArrow: '<div class="nextBtnCarousel">Next</div>',
        prevArrow: '<div class="prevBtnCarousel">Previous</div>',
        responsive: [
          {
              breakpoint: 767,
              settings: {
                  slidesToShow: 1,
                  slidesToScroll: 1
              }
          }
        ]
    });
}());

;(function ($) {

	function setup() {
		// trailer functionality
		
		if (typeof pc.trailer === 'undefined') {
			$.get('/template?name=OverlayTrailer&extensionToFind=mustache&extensionToReturn=txt', function (data) {
				pc.trailer = data;
			});
		}

		$(document).on('click', '[data-trailer]', function (e) {
			if (e.target === this) {
				closeOverlay();
			}
		});

		$(document).on('click', '[data-trailer-close]', function (e) {
			e.preventDefault();
			closeOverlay();
		});

		$(document).on('click', '[data-trailer-btn], [href*="youtube.com"], [href*="youtu.be"]', function (e) {
			e.preventDefault();
			var $this = $(this),
				thisHref = $this.attr('href'),
				$trailer = $(pc.trailer),
				$video = $trailer.find('video'),
				$iframe = $trailer.find('iframe'),
				trailerID,
				trailerHref,
				videoItems = [],
				videoSrc = [];

				
			if (thisHref.indexOf('mymovies') > -1 && thisHref.indexOf('|') > -1 && typeof $this.attr('mm_options') === 'undefined' && typeof $this.attr('data-trailer-adjust') === 'undefined') {
				// html video
				// mymovies
				videoItems = thisHref.split('|');

				if (videoItems.length > 5 && typeof _V_ !== 'undefined') {

					window.mid = videoItems[1];
					window.mti = videoItems[2];
					window.fid = videoItems[3];
					window.fti = videoItems[5];
					window.mtid = 'trl';
					window.pid = videoItems[6];

					$.each(videoItems[0].split(','), function (index, value) {
						var videoType = value.split('.').pop();

						if (videoType.toLowerCase() === 'ogv') {
							videoType = 'ogg';
						}

						videoSrc.push({
							type: 'video/' + videoType,
							src: value
						});
					});

					if ($video.length === 0) {
						$trailer.find('.overlayTrailerFrame').append('<video id="trailerVideo" class="video-js vjs-default-skin" controls data-trailer-video></video>');
						$video = $trailer.find('video');
					}
					
					_V_('trailerVideo').ready(function () {
						var myPlayer = this;
						myPlayer.src(videoSrc);
						myPlayer.addEvent("play", triggerSDC);
						myPlayer.addEvent("ended", triggerEnd);
					});

					$video.attr({
						'poster': videoItems[4]
					});

					$('#trailerVideo').addClass('active');
				}

			}
			else {
				// iframe
				if (thisHref.indexOf('youtu') > -1) {
					// youtube
					trailerID = thisHref.replace(/.*(?:youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/g, '$1'),
					trailerHref = '//www.youtube.com/embed/' + trailerID + '?rel=0&autoplay=1';
				}
				else {
					// other
					trailerHref = thisHref;
				}

				$iframe.attr('src', trailerHref).css('display', 'block');
			}
			
			$trailer.appendTo('body').addClass('active');
			$('body').addClass('no-scroll');

			if ($this.closest('.flexslider').length > 0 && typeof pc.heroSlider !== 'undefined') {
				pc.heroSlider.flexslider('pause');
				pc.heroSlider.data('flexslider').manualPause = true;
			    pc.isHeroVideo = true;
			}
		});
	}

	function closeOverlay() {
		var $trailer = $('[data-trailer]');

		if ($trailer.length > 0) {
			$trailer.remove();
		}

		$('body').removeClass('no-scroll');

        if (typeof triggerEnd !== 'undefined') {
		  triggerEnd();
        }

        if (typeof pc.isHeroVideo !== 'undefined' && typeof pc.heroSlider !== 'undefined') {
			pc.isHeroVideo = undefined;
			pc.heroSlider.data('flexslider').manualPause = false;
            pc.heroSlider.flexslider('play');
        }
	}

	function init() {
		$(function () {
			setup();
		});
	}

	init();
})(jQuery);

// mymovie trailer
(function ($) {
  $(function () {
    var $trailers = $('[data-trailer-adjust]');

    if ($trailers.length > 0) {
      // loop through and make sure trailer in href takes priority
      // filmId=13322&fid=13947&mid=11703&mtid=trl&fti=Annie&mti=Annie+-+Trailer+2
      $trailers.each(function () {
        var $thisTrailer = $(this),
					thisHref = $thisTrailer.attr('href') || '',
					options = $thisTrailer.attr('data-trailer-adjust') || '',
					shareUrl = $thisTrailer.attr('data-trailer-share') || '';
                  
        if (thisHref === '' && options !== '') {

          // check for youtube trailers
          if (options.indexOf('youtu') > -1) {
            $thisTrailer.attr('href', options);
            return;
          }

          var data = {},
						link = '/displaytrailer/mymovies?link=&fid={{fid}}&mid={{mid}}&mtid={{mtid}}&fti={{fti}}&mti={{mti}}&pid={{pid}}&share={{share}}';

          if (options.indexOf('=') > -1) {
            for (var i = 0, obj = options.split('&'), len = obj.length; i < len; i++) {
              var item = obj[i].split('=');

              data[item[0]] = item[1];
            }            
          }
          else if (options.indexOf('|') > -1) {
            var splitOpt = options.split('|');

            data.fid = splitOpt[0];
            data.mid = splitOpt[1];
            data.mtid = splitOpt[2];
            data.fti = splitOpt[3];
            data.mti = splitOpt[4];
          }

          shareUrl = window.location.origin.replace(/\/$/, '') + shareUrl;

          link = link.replace('{{fid}}', encodeURIComponent(data.fid || ''))
						.replace('{{mid}}', encodeURIComponent(data.mid || ''))
						.replace('{{mtid}}', encodeURIComponent(data.mtid || ''))
						.replace('{{fti}}', encodeURIComponent(data.fti || ''))
						.replace('{{mti}}', encodeURIComponent(data.mti || ''))
						.replace('{{pid}}', encodeURIComponent(data.pid || 'EVERYMAN'))
						.replace('{{share}}', shareUrl);

          $thisTrailer.attr('href', link);
        }
      });
    }
  });
})(jQuery);;// tooltip functionality

(function ($) {
	if ($('[data-tooltip]').length > 0) {
		$(document).on('mouseenter', '[data-tooltip]', function () {
			var target = $(this),
					tip = target.attr('title'),
					tooltip = $('<div id="tooltip"></div>');

			if (!tip || tip == '') {
				return false;
			}

			target.removeAttr('title');
			tooltip.css('opacity', 0)
					.html(tip)
					.appendTo('body');

			var init_tooltip = function () {
				if ($(window).width() < tooltip.outerWidth() * 1.5)
					tooltip.css('max-width', $(window).width() / 2);
				else
					tooltip.css('max-width', 340);

				var pos_left = target.offset().left + (target.outerWidth() / 2) - (tooltip.outerWidth() / 2),
				pos_top = target.offset().top - tooltip.outerHeight() - 25;

				if (pos_left < 0) {
					pos_left = target.offset().left + target.outerWidth() / 2 - 25;
					tooltip.addClass('left');
				}
				else
					tooltip.removeClass('left');

				if (pos_left + tooltip.outerWidth() > $(window).width()) {
					pos_left = target.offset().left - tooltip.outerWidth() + target.outerWidth() / 2 + 25;
					tooltip.addClass('right');
				}
				else
					tooltip.removeClass('right');

				if (pos_top < 0) {
					var pos_top = target.offset().top + target.outerHeight();
					tooltip.addClass('top');
				}
				else
					tooltip.removeClass('top');

				tooltip.css({ left: pos_left, top: pos_top })
				.animate({ top: '+=10', opacity: 1 }, 50);
			};

			init_tooltip();
			$(window).resize(init_tooltip);

			var remove_tooltip = function () {
				tooltip.animate({ top: '-=10', opacity: 0 }, 50, function () {
					$(this).remove();
				});

				target.attr('title', tip);
			};

			target.bind('mouseleave', remove_tooltip);
			tooltip.bind('click', remove_tooltip);
		});
	}
})(jQuery);;var pc = pc || {};

// film

pc.film = {
    'filter': {
        'nowshowing': {
            'name': 'nowshowing',
            'method': 'movies/{{circuit}}/{{cinema}}',
            'methodregion': 'movies/GetByRegion/{{circuit}}/{{region}}/{{cinema}}'
        },
        'comingsoon': {
            'name': 'comingsoon',
            'method': 'upcomingbycinema/{{circuit}}/{{cinema}}',
            'methodregion': 'upcomingbyregion/{{circuit}}/{{region}}'
        },
        'cinema': {
            'name': 'cinema',
            'populate': 'cinemas/{{circuit}}',
            'template': '{{#.}}<option value="{{CinemaId}}">{{CinemaName}}</option>{{/.}}'
        },
        'date': {
            'name': 'date',
            'populate': 'movies/{{circuit}}/{{cinema}}',
            'template': '{{#.}}<option value="{{NewDate}}">{{DisplayDate}}</option>{{/.}}'
        },
        'datelist': {
            'name': 'datelist',
            'populate': 'movies/{{circuit}}/{{cinema}}/{{filmid}}',
            'template': '{{#.}}<label class="dateListItem {{#IsDisabled}}disabled{{/IsDisabled}}" data-dp-listitem>{{DisplayDateDay}}<span>{{DisplayDateDate}}</span><input type="radio" {{#IsDisabled}}disabled{{/IsDisabled}} value="{{NewDate}}" name="date" /><span class="activePoint"></span></label>{{/.}}'
        },
        'exp': {
            'name': 'exp'
        },
        'explist': {
            'name': 'explist'
        }
    },
    'template': '',
    'temp': {
        'method': '',
        'methodregion': '',
        'cinema': '',
        'region': '',
        'datelist': [],
        'date': '',
        'filmid': '',
        'exp': '',
        'explist': [],
        'expdatelist': [],
        'expdatelistchild': []
    },
    'weekDates': []
};

(function ($) {

    var isLoad = false,
        notAds = '[data-film="landingpage"]',
        notAux = '[data-film="landingpage"]';

    function setup() {
        var $filters = $('[data-film-filter]'),
            $filmList = $('[data-film]'),
            activeFilter = $filters.filter('.active').attr('data-film-filter'),
            $curRegion = $('[data-id-region]'),
            $curCinema = $('[data-id-cinema]'),
            $curFilter;

        if ($filters.length > 0 && $filmList.length > 0) {

            showLoad();

            // filter tab event
            $filters.not('select, input').on('click.filterclick', function (e) {
                e.preventDefault();
                change(this);
            });

            // filter select event
            $filters.filter('select, input').on('change.filterchange', function (e) {
                e.preventDefault();
                change(this);
            });


            $filters.filter('[data-film-filter="explist"]').off('click change').on('change', function () {
                change(this);
            });

            // console.log($filters.filter('[data-cinema-filter="cinema"]'));

            $filters.filter('[data-cinema-filter="cinema"]').off('click change').on('change', function () {
                change(this);
            });


            if ($('[data-filmid]').length > 0) {
                pc.film.temp.filmid = $('[data-filmid]').attr('data-filmid');
            }

            if ($curRegion.length > 0 && $curRegion.attr('data-id-region') !== '0') {
                pc.film.temp.region = $curRegion.attr('data-id-region');
            }

            if ($curCinema.length > 0 && $curCinema.attr('data-id-cinema') !== '0') {
                pc.film.temp.cinema = $curCinema.attr('data-id-cinema');
            }
            else {
                hideLoad();

                if (typeof pc.ellipsis !== 'undefined') {
                    pc.ellipsis($('[data-ellipsiscontain]'));
                }
            }

            // populate date list
            populate(pc.film.filter.datelist);

            // populate cinema select
            populate(pc.film.filter.cinema);

            // populate experiences
            populate(pc.film.filter.exp);


            showAuxPanels();

            setupAd();

            if (window.location.hash !== '') {
                $curFilter = $filters.filter('[href="' + window.location.hash + '"]');

                //console.log($curFilter);

                if ($curFilter.length > 0) {
                    $curFilter.trigger('click.filterclick');
                }
            }

            $('[data-cal-today]').trigger('click');

        }



        var $cinemaFilter = $('[data-cinema-filter=cinema]');
        if ($cinemaFilter.length > 0) {

            if ($cinemaFilter.find('option[selected]').length === 0) {
                // reset cinema dropdown if no cinema selected, eg when pressing back button
                $cinemaFilter[0].selectedIndex = 0;
            }

            $cinemaFilter.change(function () {
                // redirect to cinema specific version of page
                var selected = $(this).find("option:selected");
                var cinema = selected.val() || '',
                    thisPathArray = window.location.pathname.replace(/^\/?|\/?$/, "").split('/'),
                    thisPath = '';

                if (thisPathArray.length > 1) {
                    if (thisPathArray.length > 2) {
                        thisPathArray.shift();
                        thisPath = thisPathArray.join('/');
                    }
                    else if (thisPathArray[0].toLowerCase() === 'film-info') {
                        thisPath = thisPathArray.join('/');
                    }
                    else {
                        thisPath = thisPathArray.pop();
                    }
                }
                else {
                    thisPath = thisPathArray.join('/');
                }

                var locationHash = location.hash;

                if (window.location.href.indexOf("film-info") > -1) {
                    if (locationHash === '') {
                        locationHash = '#scroll';
                    }
                }

                if (cinema !== '' || cinema !== '') {
                    cinema = cinema.replace(/^\/?|\/?$/, "");
                    window.location.href = '/' + cinema + '/' + thisPath + locationHash;
                }
                else {
                    window.location.href = '/' + thisPath + locationHash;
                }
            });
        }

        if (location.hash !== '') {
            changeTab(location.hash);
        }

    }


    function changeTab(hash) {
        // change tabs
        if (typeof hash !== 'undefined' && hash !== null && hash !== '') {
            $('[data-filmtab-link].active').removeClass('active');
            $('[data-filmtab-link][href="' + hash + '"]').addClass('active');
            $('[data-filmtab-item].active').removeClass('active');
            $('[data-filmtab-item="' + hash + '"]').addClass('active');

            location.hash = hash;

            hideLoad();
            updateListFilter();
        }
    }



    var isListingPage = $('[data-filmtab-item]').length;

    //  console.log("Listing length " + isListingPage);

    //are we on a film listings page

    if (isListingPage > 0) {

        // are we on a generic listing i.e. no cinema selected
        var locationCookie;
        var $currentCinema;

        if ($('[data-id-cinema]').data('id-cinema') === 0 || $('[data-id-cinema]').data('id-cinema') === '0') {

            // have we a cinema cookied?
            //if (typeof docCookies !== 'undefined' && docCookies.getItem('PCC.Location') !== null && localStorage.noCinema === "true") {
            //       console.log('no cinema selected listing page');
            //    $('[data-cinema-filter=cinema] select').val($('[data-cinema-filter=cinema] select option:first').val());
            //}

            //// we dont have a cinema cookied

            //else
            if (typeof docCookies !== 'undefined' && docCookies.getItem('PCC.Location') !== null) {
                  console.log('cinema IS selected listing page');

                locationCookie = docCookies.getItem('PCC.Location');
                $currentCinema = locationCookie.split(',')[0];
                $currentCinema = $currentCinema.split(':')[1];
                //$('[data-cinema-filter=cinema] select:not(.hero-select)').val($currentCinema).prop("selected", "selected");//attr('selected', true);
                //$('[data-cinema-filter=cinema] select:not(.hero-select)').change();
            }
        }
        // are we on venue page

        else {
            // grab the cookie and make it selected option
            if (typeof docCookies !== 'undefined' && docCookies.getItem('PCC.Location') !== null) {
                locationCookie = docCookies.getItem('PCC.Location');
                $currentCinema = locationCookie.split(',')[0];
                $currentCinema = $currentCinema.split(':')[1];
                //$('[data-cinema-filter=cinema] select:not(.hero-select)').val($currentCinema).prop("selected", "selected");//attr('selected', true);

            }
        }
    }
    else {
      
        if (typeof docCookies !== 'undefined' && docCookies.getItem('PCC.Location') !== null) {

            var locationCookie = docCookies.getItem('PCC.Location');

            var $currentCinema = locationCookie.split(',')[0];
            $currentCinema = $currentCinema.split(':')[1];
            //$('[data-cinema-filter=cinema] select:not(.hero-select)').val($currentCinema).prop("selected", "selected");
            //$('[data-cinema-filter=cinema] select:not(.hero-select)').change();

        }
    }







    function change(filter) {
        //console.log(filter);
        // filter changed
        var $filter = $(filter),
            thisType = $filter.attr('data-film-filter'),
            thisHead = $filter.text() || '',
            thisVal = $filter.val() || '',
            isTab = false;

        if (thisVal === '-1') {
            thisVal = '';
        }

        showLoad();
        //console.log(thisType);
        switch (thisType) {

            case pc.film.filter.nowshowing.name:
                if (typeof pc.film.filter.nowshowing.setup === 'undefined') {
                    //update(pc.film.filter.nowshowing); // populated server side
                    var $inp = $('[data-dp-list] [data-dp-listitem]');

                    isLoad = true;
                    if ($inp.length > 0) {
                        if ($inp.filter('.active').length > 0) {
                            $inp.filter('.active').removeClass('active').find('[name="date"]').trigger('click.dateclick');
                        }
                        else {
                            $inp.first().find('[name="date"]').trigger('click.dateclick');
                        }
                    }
                    else {
                        hideLoad();
                    }
                    pc.film.filter.nowshowing.setup = true;
                }
                else {
                    hideLoad();
                }
                showFilter(pc.film.filter.cinema);
                showFilter(pc.film.filter.date);
                isTab = true;
                break;
            case pc.film.filter.comingsoon.name:
                /*if (typeof pc.film.filter.comingsoon.setup === 'undefined') {
					isLoad = true;
					update(pc.film.filter.comingsoon);
					pc.film.filter.comingsoon.setup = true;
				}
				else {
					hideLoad();
				}*/

                hideLoad();

                hideFilter(pc.film.filter.cinema);
                hideFilter(pc.film.filter.date);
                isTab = true;
                break;
            case pc.film.filter.cinema.name:
                pc.film.temp.cinema = thisVal;
                isLoad = true;
                update(pc.film.filter.cinema);
                break;
            case pc.film.filter.date.name:
            case pc.film.filter.datelist.name:
                isLoad = true;
                updateListFilter();
                break;
            case pc.film.filter.exp.name:
                updateListFilter();
                break;
            case pc.film.filter.explist.name:
                //console.log(filter);
                //console.log(isLoad);
                if (isLoad) {
                    setTimeout(function () {
                        change(filter);
                    }, 200);
                    break;
                }

                updateListFilter();
                break;
        }

        if (isTab === true) {
            // extra stuff for tabs
            $('[data-film-filter]').filter('.active').removeClass('active');
            $filter.addClass('active');
            //changeHead(thisHead);

            if (typeof pc.ellipsis !== 'undefined') {
                setTimeout(function () {
                    pc.ellipsis($('[data-ellipsiscontain]'));
                }, 1000);
            }

            if (typeof pc.lazyload !== 'undefined') {
                pc.lazyload();
            }
        }

    }

    function showFilter(filter) {
        // console.log(filter.name);
        // show filter
        var $filter = $('[data-film-filter="' + filter.name + '"]');

        $filter.show();
    }

    function hideFilter(filter) {
        // hide filter
        var $filter = $('[data-film-filter="' + filter.name + '"]');

        $filter.hide();
    }

    function changeHead(newText) {
        // change heading
        var $filmHead = $('[data-film-head]');

        if ($filmHead.length > 0 && newText !== '') {
            $filmHead.text(newText);
        }
    }

    function update(filter, updateHtml) {
        // update filter
        var template = pc.film.template || '';

        if (template === '') {
            $.get('/template?name=MovieListingsTheater&extensionToFind=mustache&extensionToReturn=txt', function (data) {
                //console.log(data);
                pc.film.template = data;
                updateList(filter);
            });
        }
        else {
            updateList(filter);
        }
    }

    function updateList(filter) {
        // update list
        var url;

        if (typeof filter.isset === 'undefined') {

            if (pc.film.temp.region !== '' && pc.film.temp.region !== '0' && pc.film.temp.cinema === '' && typeof filter.methodregion !== 'undefined') {
                url = filter.methodregion;
            }
            else {
                url = filter.method;
            }

            if (filter.name === pc.film.filter.comingsoon.name && typeof pc.film.temp.csdata !== 'undefined') {
                filterUpdate(pc.film.temp.csdata);
            }
            else if (filter.name === pc.film.filter.nowshowing.name && typeof pc.film.temp.nsdata !== 'undefined') {
                filterUpdate(pc.film.temp.nsdata);
            }
            else {
                getData(filter.name, url, filterUpdate);
            }
        }

        function filterUpdate(data) {
            var template = pc.film.template,
                html = '',
                filmLink = '',
                $filmList;

            if (pc.film.temp.region !== '' && pc.film.temp.region !== '0') {
                filmLink += '/region/' + pc.film.temp.region;
            }

            if (pc.film.temp.cinema !== '' && pc.film.temp.cinema !== '0') {
                filmLink += '/cinema/' + pc.film.temp.cinema;
            }

            // update film link
            $.each(data, function (filmIndex, filmValue) {
                // /region/{{regionid}}/cinema/{{cinemaid}}/film-info/{{friendlyname}}
                // console.log("film data" + data);
                var tempFilmLink = '';

                tempFilmLink = filmLink + '/film-info/' + filmValue.FriendlyName;

                data[filmIndex].FriendlyName = tempFilmLink;

                if (filter.name === pc.film.filter.comingsoon.name && typeof filmValue.Sessions !== 'undefined') {
                    data[filmIndex].IsAdvancedSale = true;
                }
            });

            //console.log(data);

            html = Mustache.to_html(template, data);

            $filmList = $('[data-film="' + filter.name + '"]');

            if ($filmList.length === 0) {
                $filmList = $('[data-film]');
            }

            $filmList.html(html);

            if ($('[data-auxpanels]').length > 0) {
                $filmList.append($('[data-auxpanels]').clone().contents());
            }

            switch (filter.name) {
                case pc.film.filter.comingsoon.name:
                    //populate(pc.film.filter.expcs);
                    hideLoad();
                    break;
                case pc.film.filter.nowshowing.name:
                    getDates(data);
                    break;
            }

            showAuxPanels();

            setupAd($filmList);

            if (typeof pc.ellipsis !== 'undefined') {
                pc.ellipsis($('[data-ellipsiscontain]'));
            }

            filter.isset = true;
        }
    }

    function updateListFilter() {
        // update list based on filter dd
        var $sessions = $('[data-filmtab-item]:visible [data-film] [data-film-session][data-film-exp],[data-film-session][data-film-exp], [data-filminfo]:visible [data-film-session]'),
            $sessionsDate = $sessions.find('[data-film-session]'),
            $sessionsExp = $sessions.find('[data-film-exp]'),
            $curDate = $('[data-film-filtergroup] [data-film-filter="' + pc.film.filter.datelist.name + '"]'),
            $curExp = $('[data-film-filtergroup]:visible [data-film-filter="' + pc.film.filter.exp.name + '"]'),
            $curExpList = $('[data-film-filtergroup]:visible [data-film-filter="' + pc.film.filter.explist.name + '"]:checked');

        // get cur date
        if ($curDate.length > 0) {
            pc.film.temp.date = $curDate.val();
        }
        else {
            pc.film.temp.date = '';
        }

        // get cur exp
        if ($curExp.length > 0) {
            pc.film.temp.exp = $curExp.val();
        }
        else {
            pc.film.temp.exp = '';
        }

        // hide listings
        $sessions.addClass('dn');
        $sessionsDate.addClass('dn');
        $sessionsExp.addClass('dn');


        if (pc.film.isWeek === true && pc.film.weekDates.length > 0) {
            var tempWeekDates = [];

            for (var w = 0; w < pc.film.weekDates.length; w++) {
                tempWeekDates.push('[data-film-session*="' + pc.film.weekDates[w] + '"]');
            }

            $sessions = $sessions.filter(tempWeekDates.join(','));
            $sessionsDate = $sessions.find('[data-film-session]');
            $sessionsDate = $sessionsDate.filter(tempWeekDates.join(','));

            if (pc.film.temp.exp !== '' && pc.film.temp.exp !== '-1') {
                // filter sessions by exp
                $sessions = $sessions.filter('[data-film-exp*="' + pc.film.temp.exp + '"]');

                $sessionsExp = $();
                // look for exp times
                $sessions.each(function () {
                    var $this = $(this),
                        $exp = $this.find('[data-film-session*="' + pc.film.temp.date + '"] [data-film-exp*="' + pc.film.temp.exp + '"]');

                    if ($exp.length === 0) {
                        $sessions = $sessions.not($this);
                    }
                    else {
                        $sessionsExp = $sessionsExp.add($exp);
                    }
                });
            }
        }
        else if (pc.film.temp.date !== '' && pc.film.temp.date !== '-1') {
            // filter sessions by date
            $sessions = $sessions.filter('[data-film-session*="' + pc.film.temp.date + '"]');
            $sessionsDate = $sessions.find('[data-film-session]');
            $sessionsDate = $sessionsDate.filter('[data-film-session*="' + pc.film.temp.date + '"]');

            if (pc.film.temp.exp !== '' && pc.film.temp.exp !== '-1') {
                // filter sessions by exp
                $sessions = $sessions.filter('[data-film-exp*="' + pc.film.temp.exp + '"]');

                $sessionsExp = $();
                // look for exp times
                $sessions.each(function () {
                    var $this = $(this),
                        $exp = $this.find('[data-film-session*="' + pc.film.temp.date + '"] [data-film-exp*="' + pc.film.temp.exp + '"]');

                    if ($exp.length === 0) {
                        $sessions = $sessions.not($this);
                    }
                    else {
                        $sessionsExp = $sessionsExp.add($exp);
                    }
                });
            }
        }
        else if (pc.film.temp.exp !== '' && pc.film.temp.exp !== '-1') {
            // filter sessions by exp
            $sessions = $sessions.filter('[data-film-exp*="' + pc.film.temp.exp + '"]');
        }

        if (typeof pc.film.temp.explist !== 'undefined') {
            pc.film.temp.explist.length = 0;
            if ($curExpList.length > 0) {
                $curExpList.each(function () {
                    pc.film.temp.explist.push('[data-film-exp*="' + this.value + '"]');
                });

                if (pc.film.isWeek === true && pc.film.weekDates.length > 0) {
                    for (var i = 0, len = pc.film.temp.explist.length; i < len; i += 1) {
                        var tempExpDate = [],
                            tempExpDateChild = [];

                        // loop through pc.film.weekDates

                        for (var w2 = 0; w2 < pc.film.weekDates.length; w2++) {
                            //tempWeekDates.push();

                            tempExpDate.push('[data-film-session*="' + pc.film.weekDates[w2] + '"]' + pc.film.temp.explist[i]);
                            tempExpDateChild.push('[data-film-session*="' + pc.film.weekDates[w2] + '"]' + ' ' + pc.film.temp.explist[i]);
                        }

                        pc.film.temp.expdatelist[i] = tempExpDate.join(',');
                        pc.film.temp.expdatelistchild[i] = tempExpDateChild.join(',');

                    }
                    $sessions = $sessions.filter(pc.film.temp.expdatelist.join(','));
                }
                else if (pc.film.temp.date !== '' && pc.film.temp.date !== '-1') {
                    for (var i2 = 0, len2 = pc.film.temp.explist.length; i2 < len2; i2 += 1) {
                        pc.film.temp.expdatelist[i2] = '[data-film-session*="' + pc.film.temp.date + '"]' + pc.film.temp.explist[i2];
                        pc.film.temp.expdatelistchild[i2] = '[data-film-session*="' + pc.film.temp.date + '"] ' + pc.film.temp.explist[i2];
                    }
                    $sessions = $sessions.filter(pc.film.temp.expdatelist.join(','));
                }
                else {
                    $sessions = $sessions.filter(pc.film.temp.explist.join(','));
                    pc.film.temp.expdatelistchild = pc.film.temp.explist.slice();
                }

                $sessionsExp = $();
                $sessionsDate = $();

                // look for exp times
                $sessions.each(function () {
                    var $this = $(this),
                        $exp = $this.find(pc.film.temp.expdatelistchild.join(','));

                    if ($this.find('[data-film-exp]').length > 0) {
                        if ($exp.length === 0) {
                            $sessions = $sessions.not($this);
                        }
                        else {
                            $sessionsExp = $sessionsExp.add($exp);

                            $exp.each(function () {
                                $sessionsDate = $sessionsDate.add($(this).closest('[data-film-session]'));
                            });
                        }
                    }
                });

                //console.log($sessions);
                //console.log($sessionsExp);
                //console.log($sessionsDate);
            }
        }

        // show filtered listings
        if ($sessions.length > 0) {

            if (typeof pc.listingColumns !== 'undefined') {
                // add clear to fix column layout
                $sessions.filter('.c_b').removeClass('c_b');
                $sessions.filter(function (index) {
                    return index % pc.listingColumns === 0;
                }).addClass('c_b');
            }

            $sessions.removeClass('dn');
            $sessionsDate.removeClass('dn');
            $sessionsExp.removeClass('dn');
            $('[data-film-exp-none]').addClass('dn');

            $('[data-film-exp]').not('.dn').parent('li').removeClass('dn');
            $('[data-film-exp].dn').parent('li').addClass('dn');

        }
        else {
            $('[data-film-exp-none]').removeClass('dn');
        }

        hideLoad();

        if (typeof pc.lazyload !== 'undefined') {
            pc.lazyload();
        }

        if (typeof pc.ellipsis !== 'undefined') {
            pc.ellipsis($('[data-ellipsiscontain]'));
        }
    }

    //function updateListFilter() {
    //    // console.log('called');
    //    // update list based on filter dd
    //   // $('[data-film-session]').hide();

    //    var $sessions = $('[data-tab-item]:visible [data-film] [data-film-session][data-film-exp], [data-filminfo]:visible [data-film-session]'),
    //		$sessionsDate = $sessions.find('[data-film-session]'),
    //		$sessionsExp = $sessions.find('[data-film-exp]'),
    //		$curDate = $('[data-film-filtergroup]:visible [data-film-filter="' + pc.film.filter.date.name + '"]'),
    //		$curDateList = $('[data-film-filtergroup] [data-film-filter="' + pc.film.filter.datelist.name + '"]'),
    //		$curExp = $('[data-film-filtergroup]:visible [data-film-filter="' + pc.film.filter.exp.name + '"]'),
    //		$curExpCS = $('[data-film-filtergroup]:visible [data-film-filter="' + pc.film.filter.explist.name + '"]:checked');

    //    //  console.log($curExp.length);
    //    // get cur date
    //    if ($curDate.length > 0) {
    //        pc.film.temp.date = $curDate.val();
    //    }
    //    else if ($curDateList.length > 0) {
    //        if (typeof (Storage) !== "undefined" && sessionStorage.LastDate) {
    //            pc.film.temp.date = sessionStorage.LastDate;

    //        }
    //        else {
    //            pc.film.temp.date = $curDateList.val();
    //        }
    //    }
    //    else {
    //        pc.film.temp.date = '';
    //    }

    //    // get cur exp
    //    if ($curExp.length > 0) {
    //        pc.film.temp.exp = $curExp.val();

    //    }
    //    else if ($curExpCS.length > 0) {
    //        pc.film.temp.exp = $curExpCS.val();
    //    }
    //    else {
    //        pc.film.temp.exp = '';
    //    }
    //    // console.log(pc.film.temp.exp);
    //    // hide listings
    //    $sessions.hide();
    //    $sessionsDate.hide();
    //    $sessionsExp.hide();

    //    if (pc.film.temp.date !== '' && pc.film.temp.date !== '-1') {
    //        // console.log(pc.film.temp.date);
    //        // filter sessions by date
    //        $sessions = $sessions.filter('[data-film-session*="' + pc.film.temp.date + '"]');
    //        $sessionsDate = $sessions.find('[data-film-session]');
    //        $sessionsDate = $sessionsDate.filter('[data-film-session*="' + pc.film.temp.date + '"]');

    //        if (pc.film.temp.exp !== '' && pc.film.temp.exp !== '-1') {
    //            // filter sessions by exp
    //            $sessions = $sessions.filter('[data-film-exp*="' + pc.film.temp.exp + '"]');

    //            $sessionsExp = $();
    //            // look for exp times
    //            if (pc.film.temp.cinema !== '') {
    //                $sessions.each(function () {
    //                    var $this = $(this),
    //						$exp = $this.find('[data-film-session*="' + pc.film.temp.date + '"] [data-film-exp*="' + pc.film.temp.exp + '"]');

    //                    if ($exp.length === 0) {
    //                        $sessions = $sessions.not($this);
    //                    }
    //                    else {
    //                        $sessionsExp = $sessionsExp.add($exp);
    //                    }
    //                });
    //            }
    //        }
    //    }
    //    else if (pc.film.temp.exp !== '' && pc.film.temp.exp !== '-1') {
    //        // filter sessions by exp
    //        $sessions = $sessions.filter('[data-film-exp*="' + pc.film.temp.exp + '"]');
    //    }

    //    if (typeof pc.film.temp.explist !== 'undefined') {
    //        pc.film.temp.explist.length = 0;
    //        if ($curExpCS.length > 0) {
    //            $curExpCS.each(function () {
    //                pc.film.temp.explist.push('[data-film-exp*="' + this.value + '"]');
    //            });

    //            if (pc.film.temp.date !== '' && pc.film.temp.date !== '-1') {
    //                for (var i = 0, len = pc.film.temp.explist.length; i < len; i += 1) {
    //                    pc.film.temp.expdatelist[i] = '[data-film-session*="' + pc.film.temp.date + '"]' + pc.film.temp.explist[i];
    //                    pc.film.temp.expdatelistchild[i] = '[data-film-session*="' + pc.film.temp.date + '"] ' + pc.film.temp.explist[i];
    //                }
    //                $sessions = $sessions.filter(pc.film.temp.expdatelist.join(','));
    //            }
    //            else {
    //                $sessions = $sessions.filter(pc.film.temp.explist.join(','));
    //                pc.film.temp.expdatelistchild = pc.film.temp.explist.slice();
    //            }

    //            $sessionsExp = $();
    //            $sessionsDate = $();

    //            // look for exp times
    //            $sessions.each(function () {
    //                var $this = $(this),
    //					$exp = $this.find(pc.film.temp.expdatelistchild.join(','));

    //                if ($this.find('[data-film-exp]').length > 0) {
    //                    if ($exp.length === 0) {
    //                        $sessions = $sessions.not($this);
    //                    }
    //                    else {
    //                        $sessionsExp = $sessionsExp.add($exp);

    //                        $exp.each(function () {
    //                            $sessionsDate = $sessionsDate.add($(this).closest('[data-film-session]'));
    //                        });
    //                    }
    //                }
    //            });

    //            //console.log($sessions);
    //            //console.log($sessionsExp);
    //            //console.log($sessionsDate);
    //        }
    //    }

    //    // show filtered listings
    //    if ($sessions.length > 0) {

    //		if (typeof pc.listingColumns !== 'undefined') {
    //			// add clear to fix column layout
    //			$sessions.filter('.c_b').removeClass('c_b');
    //			$sessions.filter(function (index) {
    //				return index % pc.listingColumns === 0;
    //			}).addClass('c_b');
    //		}

    //		$sessions.show();
    //		$sessionsDate.show();
    //		$sessionsExp.show();
    //		$('[data-film-exp-none]').addClass('dn');
    //	}
    //	else {
    //		$('[data-film-exp-none]').removeClass('dn');
    //	}

    //    hideLoad();

    //    if (typeof pc.lazyload !== 'undefined') {
    //        pc.lazyload();
    //    }

    //    if (typeof pc.ellipsis !== 'undefined') {
    //        pc.ellipsis($('[data-ellipsiscontain]'));
    //    }

    //    showAuxPanels();

    //    moveAd();

    //}

    function showAuxPanels() {
        // show aux panel to fill gap
        $('[data-film]:visible').not(notAux).each(function () {
            var $list = $(this),
                $items = $list.find('li[data-film-session]:visible'),
                itemsLen = $items.length || 0,
                $aux = $list.find('li[data-auxpanel]'),
                rowItems = 3,
                rows = Math.ceil(itemsLen / rowItems),
                auxShow = ((rows * rowItems) % itemsLen) || 0;

            $aux.hide();

            // we want to show min 2 rows
            if (itemsLen <= rowItems) {
                auxShow += rowItems;
            }

            if (auxShow > 0) {
                $aux.filter(':lt(' + auxShow + ')').show();

                if (typeof pc.ellipsis !== 'undefined') {
                    pc.ellipsis($('.auxPanelText'));
                }
            }
        });
    }

    function getDates(data) {


        var temp = {};

        // get new dates based on cinema
        if (Object.prototype.toString.call(data) === '[object Array]') {
            $.each(data, function (index, value) {
                if (typeof value.Sessions !== 'undefined' && value.Sessions.length > 0 && (typeof value.Sessions[0].ExperienceTypes !== 'undefined' || typeof value.Sessions[0].Times !== 'undefined')) {
                    $.each(value.Sessions, function (index2, value2) {
                        var dObj;

                        dObj = {
                            'NewDate': value2.NewDate,
                            'DisplayDate': value2.DisplayDate
                        };
                        if (typeof temp[value2.NewDate] === 'undefined') {
                            temp[value2.NewDate] = dObj;
                        }
                    });
                }
            });
        }
        else if (typeof data.Sessions !== 'undefined' && data.Sessions.length > 0 && (typeof data.Sessions[0].ExperienceTypes !== 'undefined' || typeof data.Sessions[0].Times !== 'undefined')) {
            $.each(data.Sessions, function (index2, value2) {
                var dObj;

                dObj = {
                    'NewDate': value2.NewDate,
                    'DisplayDate': value2.DisplayDate
                };
                if (typeof temp[value2.NewDate] === 'undefined') {
                    temp[value2.NewDate] = dObj;
                }
            });
        }

        // reset date list
        pc.film.temp.datelist.length = 0;

        for (var tempKey in temp) {
            //console.log(tempKey);
            pc.film.temp.datelist.push(temp[tempKey]);
        }
        // console.log(pc.film.temp.datelist);
        if (pc.film.temp.datelist.length > 0) {
            pc.film.temp.datelist.sort(function (a, b) {
                if (a.NewDate < b.NewDate) {
                    return -1;
                }
                if (a.NewDate > b.NewDate) {
                    return 1;
                }
                return 0;
            });
            //populate(pc.film.filter.date);
            populate(pc.film.filter.datelist);
        }
        else {
            //populate(pc.film.filter.date, true);
            populate(pc.film.filter.datelist, true);
        }

    }

    function populate(filter, isEmpty) {
        // populate filter
        var $filter = $('[data-film-filter="' + filter.name + '"]'),
            $firstChild,
            firstChildVal = '',
            firstOption = '',
            template,
            url,
            html;

        isEmpty = isEmpty || false;

        if ($filter.length > 0) {
            if ($filter.children().length > 0) {
                $firstChild = $filter.children('option:first-child');
                firstChildVal = $firstChild.val();

                if (firstChildVal === '-1' || firstChildVal === '') {
                    firstOption = $firstChild[0].outerHTML;
                }
            }

            if (isEmpty) {
                // empty
                $filter.html(firstOption).prop('disabled', true).addClass('disabled');
            }
            else {
                switch (filter.name) {
                    case pc.film.filter.date.name:
                    case pc.film.filter.datelist.name:
                        if (pc.film.temp.datelist.length > 0) {
                            // datelist filter
                            // if we are a venue detail page and no showtimes hide the section
                            if ($('[data-cinema-home]').length > 0) {
                                $('.navTabItem,.cFiltersItem,.calendar').show();
                            }
                            popFilterData(pc.film.temp.datelist);
                        }
                        else if (typeof filmData !== 'undefined') {
                            if (filmData.length === 0) {
                                hideLoad();

                            }
                            else {
                                saveData(filter.name, filmData);
                                getDates(filmData);
                            }
                        }
                        else if (typeof filter.populate !== 'undefined') {
                            url = filter.populate;
                            getData(filter.name, url, getDates);
                        }
                        break;
                    default:
                        if (typeof filter.populate !== 'undefined') {
                            // other filters
                            url = filter.populate;
                            getData(filter.name, url, popFilter);
                        }
                        break;
                }
            }

        }



        function popFilterData(data) {
            switch (filter.name) {
                case pc.film.filter.datelist.name:
                    var $dp = $('[data-dp-list]'),
                        dpWidth = $dp.width(),
                        $dpInputs,
                        $labelFirst,
                        labelWidth,
                        labelLeftMax,
                        labelLeftMin,
                        today = new Date(),
                        curUTCDate = new Date(),
                        todayValueOf,
                        curUTCValueOf,
                        tempArray = [],
                        dayArray = [
                            'Sun',
                            'Mon',
                            'Tue',
                            'Wed',
                            'Thu',
                            'Fri',
                            'Sat'
                        ];

                    //console.log(pc.film.temp.datelist);

                    today.setHours(0, 0, 0, 0);
                    todayValueOf = today.valueOf();

                    curUTCDate.setHours(0, 0, 0, 0);
                    curUTCValueOf = curUTCDate.valueOf();

                    $.each(pc.film.temp.datelist, function (dateIndex, dateValue) {
                        var thisDate = dateValue.NewDate.split('-'),
                            tempDate = new Date(thisDate[0], (parseInt(thisDate[1]) - 1), thisDate[2]),
                            tempUTCDate = new Date(thisDate[0], (parseInt(thisDate[1]) - 1), thisDate[2]),
                            tempDay = '',
                            thisValueOf,
                            thisUTCValueOf;

                        tempDate.setHours(0, 0, 0, 0);
                        thisValueOf = tempDate.valueOf();

                        tempUTCDate.setHours(0, 0, 0, 0);
                        thisUTCValueOf = tempUTCDate.valueOf();

                        if (dateIndex === 0) {
                            curUTCValueOf = thisUTCValueOf;
                        }

                        while (curUTCValueOf < thisUTCValueOf) {
                            var //curDate = new Date(curUTCValueOf + today.getTimezoneOffset() * 60 * 1000),
                                curDate = new Date(curUTCValueOf),
                                curValueOf,
                                curDay;

                            curDate.setHours(0, 0, 0, 0);
                            curValueOf = curDate.valueOf();

                            //console.log(thisValueOf - curValueOf);

                            if (curValueOf === todayValueOf) {
                                curDay = 'Today';
                            }
                            else {
                                curDay = dayArray[curDate.getDay()];
                            }

                            tempArray.push({
                                'IsDisabled': true,
                                'DisplayDateDate': (curDate.getMonth() + 1) + '/' + curDate.getDate(),
                                'DisplayDateDay': curDay,
                                'NewDate': curDate.getFullYear() + '-' + (curDate.getMonth() + 1) + '-' + curDate.getDate(),
                                'UTCValueOf': curUTCValueOf,
                                'ValueOf': curValueOf
                            });

                            // add day
                            curDate.setDate(curDate.getDate() + 1);
                            curUTCValueOf = curDate.valueOf();
                        }

                        if (thisValueOf === todayValueOf) {
                            tempDay = 'Today';
                        }
                        else {
                            tempDay = dayArray[tempDate.getDay()];
                        }

                        dateValue.DisplayDateDay = tempDay;
                        dateValue.DisplayDateDate = (tempDate.getMonth() + 1) + '/' + tempDate.getDate();
                        dateValue.UTCValueOf = thisUTCValueOf;
                        dateValue.ValueOf = thisValueOf;

                        tempArray.push(dateValue);

                        // add day
                        tempDate.setDate(tempDate.getDate() + 1);
                        curUTCValueOf = tempDate.valueOf();
                    });

                    pc.film.temp.datelist = tempArray;

                    //console.log(pc.film.temp.datelist);

                    // create mustache template
                    html = Mustache.to_html(filter.template, pc.film.temp.datelist);

                    // update html
                    $dp.html(html);

                    // setup date picker
                    setupDatePicker();



                    // define inputs
                    $dpInputs = $dp.find('[name="date"]');
                    $labelFirst = $dpInputs.first().parent('label');

                    labelWidth = $labelFirst.outerWidth();
                    labelLeftMax = (labelWidth * $dpInputs.length) - dpWidth + ($dpInputs.length / 2);
                    labelLeftMin = Math.floor(dpWidth / labelWidth) * labelWidth;

                    // input click event
                    $dpInputs.on('click.dateclick', function (e, isCalClick, isWeek) {

                        $('[data-film-list-date]').removeClass('active');

                        if (typeof (Storage) !== "undefined" && sessionStorage.LastDate) {
                            //docCookies.removeItem('LastDate',"");
                            //docCookies.setItem('LastDate', $(this).val());
                            sessionStorage.LastDate = $(this).val();
                        }

                        var $radio = $(this),
                            radioVal = $radio.val(),
                            thisDate = radioVal.split('-'),
                            radioDate = new Date(thisDate[0], (parseInt(thisDate[1]) - 1), thisDate[2]),
                            $label = $radio.parent('label'),
                            newLeft = 0;

                        if (pc.film.isWeek === true) {
                            showDates(7, radioDate);
                            return false;

                        }

                        // check we aren't already active
                        if ($label.hasClass('active') === false) {

                            // change value on filter and trigger change event
                            $filter.val(radioVal).trigger('change.filterchange');

                            // remove active class from previous
                            $dp.find('.active').removeClass('active');

                            // add active class to parent label
                            $label.addClass('active');

                            if (typeof isCalClick === 'undefined') {
                                // save for date picker
                                radioDate.setHours(0, 0, 0, 0);
                                $('[data-dp-cal]').datepicker('setValue', radioDate);
                            }

                            // update position of date list
                            newLeft = $dpInputs.index($radio) * labelWidth;
                            //  console.log($radio, labelWidth);
                            //  console.log(labelLeftMin, newLeft);
                            //   console.log(labelLeftMax);

                            if (newLeft < labelLeftMin) {
                                newLeft = 0;
                            }
                            else if (newLeft > labelLeftMax) {
                                newLeft = labelLeftMax;
                            }

                            $labelFirst.css('margin-left', -newLeft);
                        }
                    });


                    // activate first input

                    if (typeof (Storage) !== "undefined" && sessionStorage.LastDate) {

                        var lastDate = sessionStorage.LastDate;

                        if ($('[data-dp-list] [data-dp-listitem] input[value="' + lastDate + '"]').length > 0) {
                            $('[data-dp-list] [data-dp-listitem] input[value="' + lastDate + '"]').trigger('click.dateclick');
                        }
                        else {
                            $('[data-dp-list] [data-dp-listitem]:first').find('[name=date]').trigger('click.dateclick');
                        }

                    }
                    else {
                        $('[data-dp-list] [data-dp-listitem]:first').find('[name=date]').trigger('click.dateclick');
                    }

                    break;
                default:
                    // other date filters
                    // create mustache template
                    html = Mustache.to_html(filter.template, pc.film.temp.datelist);

                    // update filter html
                    $filter.html(firstOption + html).prop('disabled', false).removeClass('disabled');

                    // if no first option trigger change to make sure we are just showing the first option date
                    if (firstOption === '') {
                        $filter.trigger('change.filterchange');
                    }
                    break;
            }
        }

        function popFilter(data) {
            switch (filter.name) {
                case pc.film.filter.exp.name:
                case pc.film.filter.expcs.name:
                    // exp filter
                    var temp = {};

                    $.each(data, function (expIndex, expValue) {
                        var exp = expValue.Experiences,
                            expLen = 0,
                            i = 0;

                        if (typeof exp !== 'undefined') {

                            expLen = exp.length;
                            if (expLen > 0) {
                                for (i = 0; i < expLen; i += 1) {
                                    if (typeof temp[exp[i].Id] === 'undefined') {
                                        temp[exp[i].Id] = exp[i].Name;
                                    }
                                }
                            }
                        }
                    });

                    filter.data = [];

                    for (var key in temp) {
                        filter.data.push({
                            'Id': key,
                            'Name': temp[key]
                        });
                    }

                    filter.data.sort(function (a, b) {
                        if (a.Name > b.Name) {
                            return 1;
                        }
                        if (a.Name < b.Name) {
                            return -1;
                        }
                        // a must be equal to b
                        return 0;
                    });

                    html = Mustache.to_html(filter.template, filter.data);
                    break;
                default:
                    html = Mustache.to_html(filter.template, data);
                    break;
            }

            if (html !== '') {
                $filter.html(firstOption + html).prop('disabled', false).removeClass('disabled');

                // set current cinema
                if (filter.name === pc.film.filter.cinema.name && pc.film.temp.cinema !== '') {
                    $filter.val(pc.film.temp.cinema);
                }
            }
        }
    }

    function getData(filterName, url, callback) {

        url = pc.api.movie + url;

        url = url
            .replace(/{{circuit}}/g, pc.api.circuit)
            .replace(/{{region}}/g, pc.film.temp.region)
            .replace(/{{cinema}}/g, pc.film.temp.cinema)
            .replace(/{{date}}/g, pc.film.temp.date)
            .replace(/{{filmid}}/g, pc.film.temp.filmid);

        $.getJSON(url)
            .done(function (data) {
                saveData(filterName, data);
                if (typeof callback !== 'undefined') {
                    callback(data);
                }
            })
            .fail(function (jqxhr, textStatus, error) {
                //console.log('Request Failed: ' + textStatus + ', ' + error);
            });
    }

    function saveData(filterName, data) {
        switch (filterName) {
            case pc.film.filter.comingsoon.name:
                pc.film.temp.csdata = data;
                break;
            case pc.film.filter.nowshowing.name:
                pc.film.temp.nsdata = data;
                break;
            case pc.film.filter.date.name:
            case pc.film.filter.datelist.name:
                pc.film.temp.datedata = data;
                break;
        }
    }

    function showDates(daysToShow, firstDate) {

        $('li[data-film-session]').css({ 'display': 'none' });
        $('div[data-film-session]').css({ 'display': 'none' });

        day = 0;

        for (i = 0; i < daysToShow; i++) {


            var thisDate = new Date(firstDate.getTime() + day * 60 * 60 * 1000),
                thisMonth = (thisDate.getMonth() + 1),
                thisMonthFormat = thisMonth < 10 ? ('0' + thisMonth) : thisMonth,
                thisDay = thisDate.getDate(),
                thisDayFormat = thisDay < 10 ? ('0' + thisDay) : thisDay,
                thisDateFormat = thisDate.getFullYear() + '-' + thisMonthFormat + '-' + thisDayFormat;

            // console.log(thisDateFormat);

            day += 24;

            $('li[data-film-session]').each(function () {
                var sessionData = $(this).data('film-session');
                var sessionDataArray = sessionData.split(' ');
                var li = $(this);


                $.each(sessionDataArray, function (index, element) {

                    if (element === thisDateFormat) {
                        // console.log(li)
                        li.css({ 'display': 'list-item' });
                        //if (daysToShow > 1) {
                        li.find('div[data-film-session="' + thisDateFormat + '"]').css({ 'display': 'block' });
                        //}

                        //$(document).find('.table-condensed td.active').nextAll('td.day').eq(7).css('background', 'pink')
                    }
                });
                $('.datepicker-days tr').addClass('weekView');
                $('.datepicker-days tr td:not(.disabled):first').parent().addClass('thisWeek');
                hideLoad();
            });

        }
    }

    $(document).on('click', '.datepicker .switch', function () {
        return false;
    });

    function setupDatePicker() {
        // date picker 
        // requires bootstrap-datepicker plugin

        // $('.ListFilt').val();

        var $dpList = $('[data-dp-list]'),
            $dpSelect = $dpList.find('[data-film-filter]'),
            dpSelectDates = [],
            $dpBtn = $('[data-dp-cal]');
        $dpListDates = $('[data-dp-list] [data-dp-listitem]').length;
        //are we on circuit film info

        if ($dpListDates > 0) {
            $('[data-dp-cal]').removeClass('disabled');



            // get today's date from hidden field
            var thisDate = new Date(),
                thisMonth = (thisDate.getMonth() + 1),
                thisMonthFormat = thisMonth < 10 ? ('0' + thisMonth) : thisMonth,
                thisDay = thisDate.getDate(),
                thisDayFormat = thisDay < 10 ? ('0' + thisDay) : thisDay,
                thisDateFormat = thisDate.getFullYear() + '-' + thisMonthFormat + '-' + thisDayFormat;
            $todayInput = $('[data-dp-list] [name="date"][value="' + thisDateFormat + '"]');

            if ($todayInput.length > 0) {
                $('[data-dp-cal] div[data-filter-text]').text('Today');
            }
            else {
                var $firstAvailable = $('[data-dp-list] [data-dp-listitem]:first');
                $firstAvailableDateArray = $firstAvailable.find('input[name="date"]').val().split('-');
                var availableMonth = (parseInt($firstAvailableDateArray[1]) - 1).toString();

                thisDate = new Date($firstAvailableDateArray[0], availableMonth, $firstAvailableDateArray[2]);

                var textDate = thisDate.toString().split(' ')[0] + ' ' + thisDate.toString().split(' ')[2] + ' ' + thisDate.toString().split(' ')[1];

                $('[data-dp-cal] div[data-filter-text]').text(textDate);
            }
        }




        // set datepicker to first date
        $dpBtn.data('date', pc.film.temp.datelist[0].NewDate);



        $dpBtn
            .datepicker({
                weekStart: 1,
                onRender: function (date) {
                    var thisClass = '',
                        i = 0,
                        isValid = false,
                        dlLen = pc.film.temp.datelist.length;

                    date.setHours(0, 0, 0, 0);


                    // make sure date is after today
                    if (date.valueOf() < pc.film.temp.datelist[0].ValueOf) {
                        thisClass = 'disabled';
                    }

                    // make sure date is not after last datelist
                    else if (date.valueOf() > pc.film.temp.datelist[dlLen - 1].ValueOf) {
                        thisClass = 'disabled';
                    }

                    // make sure date exists in datelist
                    else {
                        for (i = 0; i < dlLen; i += 1) {
                            if (typeof pc.film.temp.datelist[i].IsDisabled === 'undefined' && date.valueOf() === pc.film.temp.datelist[i].ValueOf) {
                                isValid = true;
                                break;
                            }
                        }

                        // does not exist
                        if (isValid === false) {
                            thisClass = 'disabled';
                        }
                    }

                    return thisClass;
                }
            })
            .on('show', function (e) {


                var $dp = $('.datepicker');

                $('[data-cal-close]').show();

                $('.datepicker').appendTo('.dateListCal');

                // get today's date from hidden field
                var thisDate = new Date(),
                    thisMonth = (thisDate.getMonth() + 1),
                    thisMonthFormat = thisMonth < 10 ? ('0' + thisMonth) : thisMonth,
                    thisDay = thisDate.getDate(),
                    thisDayFormat = thisDay < 10 ? ('0' + thisDay) : thisDay,
                    thisDateFormat = thisDate.getFullYear() + '-' + thisMonthFormat + '-' + thisDayFormat;
                $todayInput = $('[data-dp-list] [name="date"][value="' + thisDateFormat + '"]');

                // get tomorrow's date from hidden field
                var tomDate = new Date(new Date().getTime() + 24 * 60 * 60 * 1000),
                    tomMonth = (tomDate.getMonth() + 1),
                    tomMonthFormat = tomMonth < 10 ? ('0' + tomMonth) : tomMonth,
                    tomDay = tomDate.getDate(),
                    tomDayFormat = tomDay < 10 ? ('0' + tomDay) : tomDay,
                    tomDateFormat = tomDate.getFullYear() + '-' + tomMonthFormat + '-' + tomDayFormat;
                $tomorrowInput = $('[data-dp-list] [name="date"][value="' + tomDateFormat + '"]');

                //add today and this week buttons
                $('<div><div class="calToday" data-cal-today>Today</div><div class="clearfix"><div class="calTomorrow" data-cal-tomorrow>Tomorrow</div><div class="calThisWeek" data-cal-week>This week</div></div></div>').prependTo('.datepicker')
                    .on('click', '[data-cal-today]', function (e) {
                        e.preventDefault();
                        pc.film.isWeek = false;
                        pc.film.weekDates.length = 0;
                        $('[data-dp-cal] div[data-filter-text]').text('Today');
                        if ($todayInput.length === 0) {
                            $('li[data-film-session]').addClass('dn');
                            $('div[data-film-session]').addClass('dn');
                            $('[data-film-exp-none]').removeClass('dn');
                        }
                        else {
                            if ($todayInput.parent().hasClass('active')) {
                                $todayInput.parent().removeClass('active');
                            }
                            $todayInput.trigger('click.dateclick');
                            $dpBtn.datepicker('hide');
                        }


                    })
                    .on('click', '[data-cal-tomorrow]', function (e) {
                        e.preventDefault();
                        pc.film.isWeek = false;
                        pc.film.weekDates.length = 0;
                        $('[data-dp-cal] div[data-filter-text]').text('Tomorrow');

                        if ($tomorrowInput.length === 0) {
                            $('li[data-film-session]').addClass('dn');
                            $('div[data-film-session]').addClass('dn');
                            $('[data-film-exp-none]').removeClass('dn');
                        }
                        else {
                            if ($tomorrowInput.parent().hasClass('active')) {
                                $tomorrowInput.parent().removeClass('active');
                            }
                            $tomorrowInput.trigger('click.dateclick');
                            $dpBtn.datepicker('hide');
                        }

                    })
                    .on('click', '[data-cal-week]', function (e) {
                        e.preventDefault();
                        pc.film.isWeek = true;
                        pc.film.weekDates.length = 0;
                        $('[data-dp-cal] div[data-filter-text]').text('This week');
                        $('[data-film-list-date]').addClass('active');
                        $('.day').removeClass('active');


                        $dpBtn.datepicker('hide');

                        //$('[data-film-list-date]').each(function () {
                        //    var filmDate = $(this).text().split('');
                        //    var month = filmDate[1];
                        //    month = '<span>' + month + '</span>';
                        //    var day = filmDate[2];
                        //    day = '<span>' + day + '</span>';

                        //    $(this).text(filmDate[1] + ' ' + month + ' ' + day)
                        //})

                        //showLoad();
                        $('li[data-film-session]').addClass('dn');
                        $('div[data-film-session]').addClass('dn');

                        for (i = 0; i < 7; i++) {

                            //get todays date
                            var today = new Date().getDay() - 1;
                            var mondayDate = new Date();
                            mondayDate.setDate(mondayDate.getDate() - today + i);

                            // get each day of week
                            //var monday = new Date(new Date().getTime() - today + i * 24 * 60 * 60 * 1000)

                            thisMonth = (mondayDate.getMonth() + 1),
                                thisMonthFormat = thisMonth < 10 ? ('0' + thisMonth) : thisMonth,
                                thisDay = mondayDate.getDate(),
                                thisDayFormat = thisDay < 10 ? ('0' + thisDay) : thisDay,
                                thisDateFormat = mondayDate.getFullYear() + '-' + thisMonthFormat + '-' + thisDayFormat;
                            $thisDateInput = $('[data-dp-list] [name="date"][value="' + thisDateFormat + '"]');

                            pc.film.weekDates.push(thisDateFormat);

                            /* if ($thisDateInput.length > 0) {
                                 $('li[data-film-session*="'+thisDateFormat+'"]').each(function () {
                                     var sessionData = $(this).data('film-session');
                                    // var sessionDataArray = sessionData.split(' ');
                                     var li = $(this);
     
     
                                     //$.each(sessionDataArray, function (index, element) {
     
                                         //if (element === thisDateFormat) {
     
                                             li.removeClass('dn');
     
                                             li.find('div[data-film-session="' + thisDateFormat + '"]').removeClass('dn');
     
                                             if ($('[data-film-info]').length > 0) {
                                                 $('div[data-film-session="' + thisDateFormat + '"]').removeClass('dn');
                                             }
     
     
                                        // }
                                     //})
                                     //hideLoad();
                                 });
                             }*/


                        }
                        $('.datepicker-days tr').addClass('weekView');
                        $('.datepicker-days tr td:not(.disabled):first').parent().addClass('thisWeek');

                        updateListFilter();

                        //pc.film.isWeek = false;
                    });


                if ($todayInput.length === 0) {
                    $('[data-cal-today]').addClass('disabled');
                }

                if ($tomorrowInput.length === 0) {
                    $('[data-cal-tomorrow]').addClass('disabled');
                }


                // add active class
                $dpBtn.addClass('active');
            })
            .on('hide', function (e) {
                // remove close btn and overlay
                //$('.datepicker-close, .datepicker-overlay').remove();

                // remove active class
                $('[data-cal-close]').hide();
                $dpBtn.removeClass('active');
            })
            .on('changeDate', function (e) {
                //if (pc.film.isWeek) {
                //    console.log(pc.film.isWeek);
                //}

                pc.film.isWeek = false;
                pc.film.weekDates.length = 0;

                var days = ["Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"];
                var months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];

                var thisDate = new Date(e.date),
                    thisMonth = (thisDate.getMonth() + 1),
                    thisMonthFormat = thisMonth < 10 ? ('0' + thisMonth) : thisMonth,
                    thisDay = thisDate.getDate(),
                    thisDayFormat = thisDay < 10 ? ('0' + thisDay) : thisDay,
                    thisDateFormat = thisDate.getFullYear() + '-' + thisMonthFormat + '-' + thisDayFormat,
                    $input = $('[data-dp-list] [name="date"][value="' + thisDateFormat + '"]');


                var textDate = thisDate.toString().split(' ')[0] + ' ' + thisDate.toString().split(' ')[2] + ' ' + thisDate.toString().split(' ')[1];

                $('[data-dp-cal] div[data-filter-text]').text(textDate);

                if ($input.length > 0) {
                    // trigger input click event
                    $input.trigger('click.dateclick', true, pc.film.isWeek);
                    // hide datepicker
                    $dpBtn.datepicker('hide');
                }
            });
    }




    function setupAd() {
        if (typeof pc.ads !== 'undefined') {
            if (Object.prototype.toString.call(pc.ads) === '[object Array]') {
                // mutiple ads
                $.each(pc.ads, function (adIndex, adValue) {
                    showAd(adValue);
                });
            }
            else if (Object.prototype.toString.call(pc.ads) !== '[object Null]') {
                // single ad
                showAd(pc.ads);
            }
        }
    }

    function showAd(ad, $el) {
        var template = {},
            placeAfter = 2, // index starts at 0
            temp = '';

        template.leaderboard = '<li class="gridCol-s-12 gridCol-m-12 gridCol-l-12 listAd" data-listad><a href="{{ExternalUrl}}" target="_blank"><img src="{{Image}}" alt="{{Name}}"/></a></li>';

        if (typeof template[ad.Placement] !== 'undefined') {

            temp = Mustache.to_html(template[ad.Placement], ad);

            if (ad.Placement === 'leaderboard') {
                $('[data-film]').not(notAds).each(function () {
                    $(this).find('>li:visible:eq(' + placeAfter + ')').after(temp);
                });
            }
        }
    }

    function moveAd() {
        var placeAfter = 2; // index starts at 0

        var $this = $('[data-tab-item]:visible [data-film]'),
            $li = $this.find('>li:visible:not([data-listad]):eq(' + placeAfter + ')'),
            $ad = $this.find('[data-listad]');

        if ($ad.length > 0) {
            $ad.detach().insertAfter($li);
        }

    }

    function showLoad() {
        $('[data-tab-item]:visible [data-film]').hide();
        $('[data-tab-item]:visible [data-film-load]').show();
    }

    function hideLoad() {
        $('[data-film-load]').hide();
        $('[data-tab-item]:visible [data-film]').show();
        isLoad = false;
    }

    function hideComingSoonFilmNoSessions() {
        $('[data-film="comingsoon"] li.filmItem').each(function () {
            var hasSessions = $(this).data('film-session');
            //console.log(hasSessions)
            if (!$(this).data('film-session')) {

                $(this).hide();
            }
        });
    }

    hideComingSoonFilmNoSessions();

    function init() {
        $(function () {
            setup();
        });
    }

    init();

})(jQuery);

(function ($) {

    pc.showSessionMessage = function (type, href) {
        if (typeof type !== 'undefined' && type !== null && $('[data-film-session-message="' + type + '"]').length > 0) {
            $('[data-film-session-message="' + type + '"]').show().find('[data-film-session-message-continue]').attr('href', href);
        }
    };

    function closeMessage(message) {
        if (typeof message !== 'undefined' && message !== null) {
            $(message).hide().find('[data-film-session-message-continue]').attr('href', '');
        }
    }

    var $sessionMessage = $('[data-film-session-message]');

    $sessionMessage.on('click', function (e) {
        if ($(this).has(e.target).length === 0) {
            closeMessage(this);
            if (HasLocalStorage()) {
                sessionStorage.removeItem('session_member');
            }
        }
    });

    $sessionMessage.on('click', '[data-film-session-message-close]', function (e) {
        e.preventDefault();
        closeMessage($(this).closest('[data-film-session-message]'));
        if (HasLocalStorage()) {
            sessionStorage.removeItem('session_member');
        }
    });

    $sessionMessage.on('click', '[data-film-session-message-signin]', function (e) {
        e.preventDefault();
        closeMessage($(this).closest('[data-film-session-message]'));
        $('html, body').animate({
            scrollTop: 0
        }, 800, function () {
            $('[data-quickbuy]').removeClass('active');
            $('[data-login-nav-btn], [data-login-modal]').addClass('active');
        });
    });

    // baby club popup
    $(document).on('click', '[data-film-session-link][data-film-exp*="exp-Baby Club"]', function (e) {
        e.preventDefault();
        pc.showSessionMessage('Baby Club', this.href);
    });

    // members
    $(document).on('click', '[data-film-session-link][data-film-exp*="exp-Members"]', function (e) {
        if (pc.Authentication.HasLogin === false) {
            e.preventDefault();
            if (HasLocalStorage()) {
                sessionStorage.setItem('session_member', this.href);
            }
            pc.showSessionMessage('Members', this.href);
        }
    });

    function HasLocalStorage() {
        var test = 'test';

        try {
            localStorage.setItem(test, test);
            localStorage.removeItem(test);
            return true;
        }
        catch (e) {
            return false;
        }
    }
})(jQuery);;(function ($) {
    var $maps = $('[data-map]');

    if ($maps.length === 0) {
        return;
    }

    var useGoogleMaps = false;
    var useAppleMaps = true;
    
    if (
        useAppleMaps && 
        typeof pc !== 'undefined' && 
        pc !== null &&
        typeof pc.at !== 'undefined' && 
        pc.at !== null && 
        typeof pc.at.Token !== 'undefined' && 
        pc.at.Token !== null && 
        pc.at.Token !== ''
    ) {
        loadAppleMaps();
    }
    else if (useGoogleMaps) {
        loadGoogleMaps();
    }

    function loadGoogleMaps() {
        $maps.each(function () {
            var $this = $(this);
            var thisOptions = $this.data('map') || {};
            var thisLat = parseFloat(thisOptions.lat || defaultSettings.lat);
            var thisLng = parseFloat(thisOptions.lng || defaultSettings.lng);
            var location = thisOptions.location || (thisLat + ',' + thisLng);

            $this.html('<iframe frameborder="0" style="border:0; width: 100%; height: 100%;" src="https://www.google.com/maps/embed/v1/place?key=AIzaSyBhUZXUBqNDLBUdDHe1miMt6I1pbFUTQAQ&q=' + location + '" allowfullscreen></iframe>');
        });
    }

    function loadAppleMaps() {
        var $map = $maps.eq(0);
        var mapId = $map.attr('id') || 'mapPlaceholder';
        var thisOptions = $map.data('map') || {};
        var thisLat = parseFloat(thisOptions.lat || 0);
        var thisLng = parseFloat(thisOptions.lng || 0);

        if (thisLat === 0 || thisLng === 0) {
            return;
        }

        $map.attr('id', mapId);

        var script = document.createElement('script');

        script.src = 'https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js';
        script.onload = function () {
            if (typeof mapkit === 'undefined' || mapkit === null) {
                return;
            }

            mapkit.init({
                authorizationCallback: function (done) {
                    done(pc.at.Token);
                }
            });
            
            var cinema = new mapkit.CoordinateRegion(
                new mapkit.Coordinate(thisLat, thisLng),
                new mapkit.CoordinateSpan(0.005, 0.005)
            );

            var map = window.apMap = new mapkit.Map(mapId);
            var theme = mapkit.Map.ColorSchemes.Light;

            if (window.matchMedia) {
                var mq = window.matchMedia('(prefers-color-scheme: dark)');

                if (mq.matches) {
                    theme = mapkit.Map.ColorSchemes.Dark;
                }

                mq.addListener(function (r) {
                    if (r.matches) {
                        apMap.colorScheme = mapkit.Map.ColorSchemes.Dark;
                    }
                    else {
                        apMap.colorScheme = mapkit.Map.ColorSchemes.Light;
                    }
                });
            }

            map.colorScheme = theme;

            map.region = cinema;

            var marker = new mapkit.MarkerAnnotation(map.center);

            map.addAnnotation(marker);
        };

        document.head.appendChild(script);
    }
}(jQuery || {}));;(function ($) {    
    var cinemaId = $('[data-id-cinema]').attr('data-id-cinema') || '0';

    var temp = document.createElement('div');

    temp.textContent = cinemaId;

    cinemaId = temp.innerHTML;

    if (cinemaId !== '0' && typeof docCookies !== 'undefined') {
        docCookies.setItem('evmCinema', cinemaId, Infinity, '/', null, true);
    }
})(jQuery);

(function ($) {
    var searchKey = 'PM37-PE53-PM95-YB36';
    var searchCountry = 'GB';
    var hiddenIndex = 3;
    var distance = 25;
    var cinemas = [];
    var groups = [];
    var cinemasComingSoon = [];
    var templateSearchResultNone;
    var templateSearchResultItem;
    var templateVenuesListItem;
    var $load = $('[data-book-load]');
    var $searchResults = $('[data-venues-search-results]');
    var $geo = $('[data-venues-geo]');
    var $geoButton = $('[data-venues-geo-button]');
    var $geoAlpha = $('[data-venues-geo-alpha]');
    var $searchInput = $('[data-venues-search-input]');
    var $searchCountry = $('[data-venues-search-country]');
    var $searchButton = $('[data-venues-search-button]');
    var $showMore = $('[data-venues-search-showmore]');
    var $showLess = $('[data-venues-search-showless]');
    var $list = $('[data-venues-list]');

    if (
        typeof pc === 'undefined' ||
        pc === null ||
        typeof pc.venuesList === 'undefined' ||
        pc.venuesList === null
    ) {
        return;
    }

    if ($searchCountry.length > 0) {
        $searchCountry.on('change', function () {
            searchCountry = this.value;
        });

        searchCountry = $searchCountry.val();

        if (typeof pc.api !== 'undefined' && pc.api !== null && typeof pc.api.country !== 'undefined' && pc.api.country !== null) {
            searchCountry = pc.api.country;
            $searchCountry.val(pc.api.country);
        }
    }

    if (typeof pc.venuesList.current !== 'undefined' && pc.venuesList.current !== null) {
        cinemas = pc.venuesList.current.map(function (c) {
            return typeof c.Cinema !== 'undefined' && c.Cinema !== null ? c.Cinema : c;
        });
    }

    if (typeof pc.venuesList.comingSoon !== 'undefined' && pc.venuesList.comingSoon !== null) {
        cinemasComingSoon = pc.venuesList.comingSoon;
    }

    Array.prototype.push.apply(cinemas, cinemasComingSoon); 

    cinemas.sort(function (a, b) {
        if (a.Name > b.Name) {
            return 1;
        }

        if (a.Name < b.Name) {
            return -1;
        }

        return 0;
    });
    
    templateSearchResultNone = $('#templateVenuesSearchResultNone').html() || '';
    templateSearchResultItem = $('#templateVenuesSearchResultItem').html() || '';
    templateVenuesListItem = $('#templateVenuesListItem').html() || '';

    function getDistanceFromLatLonInKm(lat1, lon1, lat2, lon2) {
        var R = 6371;
        var dLat = deg2rad(lat2 - lat1);
        var dLon = deg2rad(lon2 - lon1);
        var a =
            Math.sin(dLat / 2) * Math.sin(dLat / 2) +
            Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
            Math.sin(dLon / 2) * Math.sin(dLon / 2)
            ;
        var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
        var d = R * c;
        return d;
    }

    function deg2rad(deg) {
        return deg * (Math.PI / 180);
    }

    function showSearchResults(lat, long) {
        $showMore.hide();
        $showLess.hide();

        if (
            typeof cinemas === 'undefined' ||
            cinemas === null ||
            typeof lat === 'undefined' ||
            lat === null ||
            typeof long === 'undefined' ||
            long === null
        ) {
            $searchResults.html(templateSearchResultNone);
            $load.hide();
            return;
        }

        var tempCinemas = $.extend([], cinemas);
               
        tempCinemas.forEach(function (c) {
            c.Distance = undefined;
            c.DistanceKM = undefined;

            if (
                typeof c.Latitude !== 'undefined' &&
                c.Latitude !== null &&
                typeof c.Longitude !== 'undefined' &&
                c.Longitude !== null &&
                lat !== 0 &&
                long !== 0
            ) {
                c.DistanceKM = getDistanceFromLatLonInKm(c.Latitude, c.Longitude, lat, long).toFixed(1);
            }
        });

        if (lat !== 0 && long !== 0) {
            tempCinemas.sort(function (a, b) {
                if (typeof a.DistanceKM === 'undefined' || typeof b.DistanceKM === 'undefined') {
                    return 0;
                }

                if (parseFloat(a.DistanceKM) > parseFloat(b.DistanceKM)) {
                    return 1;
                }

                if (parseFloat(a.DistanceKM) < parseFloat(b.DistanceKM)) {
                    return -1;
                }

                return 0;
            });
            
            tempCinemas = tempCinemas.filter(function (cinema) {
                if (parseFloat(cinema.DistanceKM) <= distance) {
                    return true;
                }

                return false;
            });
        }
        else {
            tempCinemas.sort(function (a, b) {
                if (a.Name > b.Name) {
                    return 1;
                }

                if (a.Name < b.Name) {
                    return -1;
                }

                return 0;
            });
        }

        if (tempCinemas.length === 0) {
            $searchResults.html(templateSearchResultNone);
            $load.hide();
            return;
        }

        if (tempCinemas.length > hiddenIndex + 1) {
            tempCinemas.forEach(function (r, i) {
                if (i > hiddenIndex) {
                    r.IsHidden = true;
                }
                else {
                    r.IsHidden = false;
                }
            });

            $showMore.show();
        }
        else {
            tempCinemas.forEach(function (r, i) {
                r.IsHidden = false;
            });
        }

        $searchResults.html(Mustache.render(templateSearchResultItem, tempCinemas));
        $load.hide();
    }

    function search() {

        var searchValue;
        var lat;
        var long;

        if ($searchInput.length === 0) {
            $searchResults.html(templateSearchResultNone);
            return;
        }

        searchValue = $searchInput.val().trim();

        if (searchValue === '') {
            return;
        }

        $load.show();
        
        if (cinemas !== 'undefined' && cinemas !== null && cinemas.length > 0) {
            var matches = [];
            var searchValueLower = searchValue.toLowerCase();
            for (var c = 0; c < cinemas.length; c++) {
                if (
                    cinemas[c].Name.toLowerCase().trim().indexOf(searchValueLower) > -1 ||
                    cinemas[c].ZipCode.toLowerCase().trim().replace(/\s/g, '').indexOf(searchValueLower.replace(/\s/g, '')) > -1 ||
                    cinemas[c].City.toLowerCase().trim().indexOf(searchValueLower) > -1 ||
                    cinemas[c].Address1.toLowerCase().trim().indexOf(searchValueLower) > -1 ||
                    cinemas[c].Address2.toLowerCase().trim().indexOf(searchValueLower) > -1
                ) {
                    matches.push({
                        lat: cinemas[c].Latitude,
                        long: cinemas[c].Longitude
                    });
                }
            }

            if (matches.length === 1) {
                lat = matches[0].lat;
                long = matches[0].long;
            }
        }

        if (typeof lat !== 'undefined' || typeof long !== 'undefined') {
            showSearchResults(lat, long);
            return;
        }
        
        if (typeof searchKey !== 'undefined' && searchKey !== '') {
            $.post('https://api.addressy.com/Geocoding/International/Geocode/v1.10/json3.ws', {
                key: searchKey,
                Country: searchCountry,
                Location: searchValue
            }).always(function (data) {
                if (
                    typeof data !== 'undefined' &&
                    data !== null &&
                    typeof data.Items !== 'undefined' &&
                    data.Items !== null &&
                    data.Items.length > 0 &&
                    data.Items.length === 1 &&
                    typeof data.Items[0].Error === 'undefined' &&
                    typeof data.Items[0].Latitude !== 'undefined' &&
                    data.Items[0].Latitude !== null &&
                    typeof data.Items[0].Longitude !== 'undefined' &&
                    data.Items[0].Longitude !== null
                ) {
                    lat = data.Items[0].Latitude;
                    long = data.Items[0].Longitude;
                    showSearchResults(lat, long);
                    return;
                }

                // error message handled within showSearchResults when no properties passed
                showSearchResults();
            });
            return;
        }

        // error message handled within showSearchResults when no properties passed
        showSearchResults();
    }
    
    if ($geo.length > 0 && $geoButton.length > 0) {
        if ('geolocation' in navigator) {
            $geoButton.on('click', function (e) {
                e.preventDefault();

                $load.show();

                navigator.geolocation.getCurrentPosition(function (position) {
                    var lat;
                    var long;

                    if (
                        typeof position !== 'undefined' &&
                        position !== null &&
                        typeof position.coords !== 'undefined' &&
                        position.coords !== null && 
                        typeof position.coords.latitude !== 'undefined' &&
                        position.coords.latitude !== null &&
                        typeof position.coords.longitude !== 'undefined' &&
                        position.coords.longitude !== null
                    ) {
                        lat = position.coords.latitude;
                        long = position.coords.longitude;
                    }
                                        
                    showSearchResults(lat, long);

                    if ($geoAlpha.length > 0) {
                        $geoButton.hide();
                        $geoAlpha.show();
                    }
                }, function (error) {
                    var errorMsg = 'Sorry, we could not get your location at this time.';

                    switch (error.code) {
                        case error.PERMISSION_DENIED:
                            errorMsg = 'Please allow permission to use location on your device/browser.';
                            break;
                    }

                    $load.hide();
                    alert(errorMsg);
                });
            });

            $geo.show();
        }
        else if ($geoAlpha.length > 0) {
            $geoButton.remove();
            $geoAlpha.show();
        }
    }

    if ($geoAlpha.length > 0) {
        $geoAlpha.on('click', function (e) {
            e.preventDefault();

            showSearchResults(0, 0);

            if ($geoButton.length > 0) {
                $geoButton.show();
                $geoAlpha.hide();
            }
        });
    }

    if ($showMore.length > 0 && $showLess.length > 0) {
        $showMore.on('click', function (e) {
            e.preventDefault();

            $('[data-venues-search-results-item]:gt(' + hiddenIndex + ')').slideDown(400);

            $showMore.hide();
            $showLess.show();
        });

        $showLess.on('click', function (e) {
            e.preventDefault();

            $('[data-venues-search-results-item]:gt(' + hiddenIndex + ')').slideUp(400);

            $showLess.hide();
            $showMore.show();
        });
    }

    if ($searchInput.length > 0) {
        $searchInput.on('keyup', function (e) {
            if (e.which === 13) {
                search();
            }
        });
    }

    if ($searchButton.length > 0) {
        $searchButton.on('click', function (e) {
            e.preventDefault();
            search();
        });
    }

    if ($list.length > 0 && cinemas !== 'undefined') {
        cinemas.forEach(function (c) {
            var group = {
                GroupId: 0,
                GroupOrder: 0
            };

            var groupIndex = -1;
            
            if (typeof c.City !== 'undefined' && c.City !== null && c.City !== '') {
                c.City = c.City.trim();

                if (typeof pc.cinemaGroups !== 'undefined' && pc.cinemaGroups !== null) {
                    var tempGroup = pc.cinemaGroups(c.City);

                    if (typeof tempGroup !== 'undefined') {
                        group = tempGroup;
                    }
                }
            }
            
            for (var g = 0; g < groups.length; g++) {
                if (groups[g].GroupId === group.GroupId) {
                    groupIndex = g;
                    break;
                }
            }

            if (groupIndex === -1) {
                group.GroupItems = [];
                groups.push(group);
                groupIndex = groups.length - 1;
            }

            groups[groupIndex].GroupItems.push({
                GroupItemLink: '/' + c.FriendlyName,
                GroupItemText: c.Name
            });
        });

        if (groups.length > 0) {
            groups.sort(function (a, b) {
                if (a.GroupOrder > b.GroupOrder) {
                    return 1;
                }

                if (a.GroupOrder < b.GroupOrder) {
                    return -1;
                }

                return 0;
            });

            $list.html(Mustache.render(templateVenuesListItem, groups));

            var isMasonryActive = false;

            if (document.documentElement.clientWidth > 767 && groups.length > 1) {
                isMasonryActive = true;
                $list.masonry({
                    itemSelector: '[data-venues-list-item]'
                });
            }

            $(window).on('resize', function () {
                if (isMasonryActive === false && document.documentElement.clientWidth > 767) {
                    isMasonryActive = true;
                    $list.masonry({
                        itemSelector: '[data-venues-list-item]'
                    });
                }

                if (isMasonryActive === true && document.documentElement.clientWidth < 768) {
                    isMasonryActive = false;
                    $list.masonry('destroy');
                }
            });
        }
    }

    if (
        typeof docCookies !== 'undefined' &&
        docCookies.getItem('evmCinema') !== null &&
        cinemas !== 'undefined' &&
        cinemas !== null &&
        cinemas.length > 0
    ) {
        var cinemaId = docCookies.getItem('evmCinema');

        for (var c = 0; c < cinemas.length; c++) {
            if (cinemas[c].CinemaId.toString() === cinemaId) {
                if ($searchInput.length > 0) {
                    $searchInput.val(cinemas[c].Name);
                }

                if (
                    typeof cinemas[c].Latitude !== 'undefined' &&
                    cinemas[c].Latitude !== null &&
                    cinemas[c].Longitude !== 'undefined' &&
                    cinemas[c].Longitude !== null
                ) {
                    showSearchResults(cinemas[c].Latitude, cinemas[c].Longitude);
                }
                break;
            }
        }
    }
})(jQuery);;var pc = pc || {};

// forms

pc.form = {
    'temp': {
        'region': '',
        'cinema': ''
    }
};

(function ($) {

    function setup() {
        var $form = $('[data-form], [data-outerform] form'),
            $curRegion = $('[data-id-region]'),
            $curCinema = $('[data-id-cinema]');

        if ($form.length > 0) {

            if ($curRegion.length > 0) {
                pc.form.temp.region = $curRegion.attr('data-id-region');
            }

            if ($curCinema.length > 0) {
                pc.form.temp.cinema = $curCinema.attr('data-id-cinema');
            }

            $form.each(setupForm);
        }
    }

    function setupForm() {
        var $form = $(this),
            $fields = $form.find('[data-form-field]'),
            $submit = $form.find('[data-form-submit]');

        $form.attr('novalidate', true).on('submit', function (e) {

            $form.find('[data-form-error]').hide();

            if (validate($form)) {
                //$submit.fadeOut();
               return submitForm($form);
            }
            else {
                $form.find('[data-form-error]').show();
                if ($form.find('.invalid:visible:first()').length === 1) {
                    $('html,body').animate({
                        scrollTop: $form.find('.invalid:visible:first()').offset().top - 100
                    }, 600);
                }
            }

            return false;
        });

        $fields.on('click keyup', function (e) {
            if (e.which !== 13) {
                $(this).removeClass('invalid');
                $(this).parent().removeClass('invalid');
            }
        });

        $fields.filter('[data-form-field="telephone_uk"]').on('keyup', function () {
            // update value to only leave numbers
            this.value = this.value.replace(/\D/g, '');
        });

        setupExpYear();

        $form.on('paste drop', '[data-form-confirm]', function (e) {
            e.preventDefault();
        });
    }

    function setupExpYear() {
        // add years to expiration select
        var today = new Date(),
            thisYear = today.getFullYear(),
            options = [],
            totalYears = 10,
            i = 0;

        for (i = 0; i < totalYears; i += 1) {
            options.push(
                '<option value="' + thisYear + '">' + thisYear + '</option>'
            );
            thisYear += 1;
        }

        $('[data-form-field="expiryyear"]').html(options.join(''));
    }

    function validate($form) {
        var $fields = $form.find('[data-form-field]:visible'),
            isValid = true;

        $fields.each(function () {
            var $field = $(this),
                fieldType = $field.attr('type'),
                fieldValue = '';

            if (fieldType !== 'radio' && fieldType !== 'checkbox') {
                fieldValue = $field.val();
            }

            if ((typeof $field.attr('required') !== 'undefined' || fieldValue !== '') && validateField($field) === false) {
                isValid = false;
            }
        });

        return isValid;
    }

    function validateField($field) {
        var isValid = true,
            fieldType = $field.attr('type') || '',
            fieldVal = $field.val() || '',
            regEx = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
            $fieldParent = $field.parent(),
            validateType = $field.attr('data-form-field') || '',
            zipRe = /^\d{5}([\-]\d{4})?$/,
            postCodeRe = /\b((?:(?:gir)|(?:[a-pr-uwyz])(?:(?:[0-9](?:[a-hjkpstuw]|[0-9])?)|(?:[a-hk-y][0-9](?:[0-9]|[abehmnprv-y])?)))) ?([0-9][abd-hjlnp-uw-z]{2})\b/i,
            cnRe = /^\d+$/,
            validateConfirm = $field.attr('data-form-confirm') || '';

        fieldType = fieldType.toLowerCase();
        validateType = validateType.toLowerCase();

        if (fieldVal.length === 0) {
            isValid = false;
        }
        else if (fieldType === 'email' && regEx.test(fieldVal) === false) {
            isValid = false;
        }
        else if (fieldType === 'checkbox' && $('[name="' + $field.attr('name') + '"]:checked').length === 0) {
            isValid = false;
        }
        else if (fieldType === 'file') {

            var fileExtension = fieldVal.split('.').pop(),
                fileLowerCase = fileExtension.toLowerCase(),
                fileFormat = ['jpg', 'jpeg', 'pdf'],
                fileSize = 5242880;

            if (($.inArray(fileLowerCase, fileFormat) === -1) || ($field[0].files[0].size > fileSize)) {
                isValid = false;
                $('[data-file-error]').removeClass('dn');
            } else {
                $('[data-file-error]').addClass('dn');
            }
        }
        else if (validateConfirm !== '' && fieldVal !== $('[name="' + validateConfirm + '"]').val()) {
            isValid = false;
        }
        else if (validateType === 'zipcode' && zipRe.test(fieldVal) === false) {
            isValid = false;
        }
        else if (validateType === 'cardnumber' && cnRe.test(fieldVal) === false) {
            isValid = false;
        }
        else if (validateType === 'expirymonth') {
            (function () {
                var today = new Date(),
                    expDate = new Date(),
                    $expYear = $('[data-form-field="expiryyear"]'),
                    expYear;

                if ($expYear.length > 0) {
                    expYear = $expYear.val();

                    expDate.setFullYear(expYear, fieldVal);

                    if (today.getTime() > expDate.getTime()) {
                        isValid = false;
                    }
                }
                else {
                    isValid = false;
                }
            })();
        }
        else if (validateType === 'telephone_uk') {
            // validate uk telephone number
            var tempNum = fieldVal;
            // leave only numbers
            tempNum = tempNum.replace(/\D/g, '');
            // remove country prefix or leading 0
            tempNum = tempNum.replace(/^(0044|44|0)/, '');
            // check length 9/10 without leading 0
            if (tempNum.length < 9 || tempNum.length > 10) {
                isValid = false;
            }
        }
        else if (validateType === 'dateyear') {
            (function () {
                // check valid date after today
                var today = new Date(),
                    thisDate = new Date(),
                    $selectGroup = $field.closest('[data-select-group]'),
                    $dateDay = $selectGroup.find('[data-form-field="dateday"]'),
                    $dateMonth = $selectGroup.find('[data-form-field="datemonth"]'),
                    monthArray = {
                        'January': 0,
                        'February': 1,
                        'March': 2,
                        'April': 3,
                        'May': 4,
                        'June': 5,
                        'July': 6,
                        'August': 7,
                        'September': 8,
                        'October': 9,
                        'November': 10,
                        'December': 11
                    },
                    month = typeof monthArray[$dateMonth.val()] !== 'undefined' ? monthArray[$dateMonth.val()] : (parseInt($dateMonth.val()) - 1);

                thisDate.setFullYear(fieldVal, month, $dateDay.val());
                thisDate.setHours(0, 0, 0, 0);
                today.setHours(0, 0, 0, 0);

                if (thisDate.getMonth() !== month || today.getTime() >= thisDate.getTime()) {
                    isValid = false;

                    $dateDay.addClass('invalid');
                    $dateMonth.addClass('invalid');
                }
            })();
        }
        else if (validateType === 'dobyear') {
            (function () {
                // check valid date
                var today = new Date(),
                    thisDate = new Date(),
                    $selectGroup = $field.closest('[data-select-group]'),
                    $dateDay = $selectGroup.find('[data-form-field="dobday"]'),
                    $dateMonth = $selectGroup.find('[data-form-field="dobmonth"]'),
                    monthArray = {
                        'January': 0,
                        'February': 1,
                        'March': 2,
                        'April': 3,
                        'May': 4,
                        'June': 5,
                        'July': 6,
                        'August': 7,
                        'September': 8,
                        'October': 9,
                        'November': 10,
                        'December': 11
                    },
                    month = monthArray[$dateMonth.val()] || (parseInt($dateMonth.val()) - 1);

                thisDate.setFullYear(fieldVal, month, $dateDay.val());
                thisDate.setHours(0, 0, 0, 0);
                today.setFullYear(today.getFullYear() - 18);
                today.setHours(0, 0, 0, 0);

                if (thisDate.getMonth() !== month || thisDate.getTime() > today.getTime()) {
                    isValid = false;

                    $dateDay.addClass('invalid');
                    $dateMonth.addClass('invalid');
                }
            })();
        }
        else if (validateType === 'endtime') {
            // check valid start and end time
            var startIndex = $('[data-form-field="starttime"]')[0].selectedIndex,
                endIndex = $field[0].selectedIndex;

            if (startIndex >= endIndex) {
                isValid = false;
            }
        }
        else if (validateType === 'password') {
            if (fieldVal.length < 6 || fieldVal.search(/\d/) === -1 || fieldVal.search(/[a-zA-Z]/) === -1) {
                isValid = false;
            }
        }
        else if (validateType === 'isnapphone' && /^[\d\+\-\s\(\)]{5,}$/.test(fieldVal) === false) {
            isValid = false;
        }
        else if (validateType === 'namestring' && /^[A-Za-z\s'-]{1,}$/.test(fieldVal) === false) {
            isValid = false;
        }
        else if (validateType === 'freetextstring' && /^[\s\w\d\.,\/;:!@$%&*()-=+\""\'\[\]\(\)\{\}]+$/.test(fieldVal) === false) {
            isValid = false;
        }
        else if (validateType === 'postcode' && postCodeRe.test(fieldVal) === false) {
            isValid = false;
        }

        if (isValid === false) {
            if ($fieldParent.hasClass('select-custom') || fieldType === 'checkbox') {
                // custom select
                $fieldParent.addClass('invalid');
            }
            else {
                $field.addClass('invalid');
            }
        }
        else {
            if ($fieldParent.hasClass('select-custom') || fieldType === 'checkbox') {
                // custom select
                $fieldParent.removeClass('invalid');
            }
            else {
                $field.removeClass('invalid');
            }
        }

        return isValid;
    }

    pc.form.validateField = validateField;

    function submitForm($form) {
        // submit form
        var url = $form.attr('action'),
            formType = $form.attr('data-form') || $form.closest('[data-outerform]').attr('data-outerform') || '',
            $track = $form.find('[data-form-track]'),
            params = $form.serialize(),
            canSend = false,
            returnValue = false;

        if (params === '') {
            $form.find('[name]').each(function (i) {
                var field = $(this),
                    param = field.attr('name') + '=' + field.val();
                if (i > 0) {
                    param = '&' + param;
                }
                params += param;
            });
        }

        if ($track.length > 0 && typeof dataLayer !== 'undefined') {
            dataLayer.push(JSON.parse($track.attr('data-form-track')));
        }

        switch (formType) {
            case 'contactus':
                if (pc.form.temp.cinema === '') {
                    pc.form.temp.cinema = '0';
                }

                url = url + pc.form.temp.cinema;

                uploadFileFormSubmit($form, url);

                break;
            case 'privatehire':
                if (pc.form.temp.cinema === '') {
                    pc.form.temp.cinema = '0';
                }

                url = url + pc.form.temp.cinema;

                uploadFileFormSubmit($form, url);

                break;
            case 'subscription':

                pc.newsletterSubscribe();
                break;

            case 'footerNewsSubscription':
                var subscEmail = $form.find(':input[type="email"]').val(),
                    subscCinema = $form.find('select').val();

                var subscUrl = '/membership/SubscribeToNewsletter?email=' + subscEmail + '+cinemaId=' + subscCinema;

                window.location = subscUrl;
                break;

            case 'booking':
                if (typeof pc.book.submit !== 'undefined') {
                    pc.book.submit();
                }

                break;
            case 'booking-hosted':
                if (typeof pc.book.submithosted !== 'undefined') {
                    pc.book.submithosted();
                }

                break;
            case 'giftcard':
                if (typeof pc.gc.step !== 'undefined') {
                    pc.gc.step();
                }

                break;
            case 'loyalty-edit':
                if (typeof pc.Loyalty.SubmitEdit !== 'undefined') {
                    pc.Loyalty.SubmitEdit();
                }

                break;
            case 'loyalty-create':
                if (typeof pc.Loyalty.SubmitCreate !== 'undefined') {
                    var $gender = $('input[name="LoyaltyDetails-Gender"]:checked');
                    if ($gender.length === 0) {
                        $('[data-form-group="memberGender"] .radioWrap, [data-form-group="memberGender"] .formLabel_checkbox').addClass('invalid');
                        return false;
                    }
                    pc.Loyalty.SubmitCreate();
                }

                break;
            case 'loyalty-login':
                if (typeof pc.Loyalty.SubmitLogin !== 'undefined') {
                    pc.Loyalty.SubmitLogin();
                }

                break;

            case 'loyalty-login-register':
                if (typeof pc.Loyalty.SubmitLoginRegister !== 'undefined') {
                    pc.Loyalty.SubmitLoginRegister();
                }

                break;

            case 'giftcarddetails':
                //if (typeof pc.Loyalty.SubmitLogin !== 'undefined') {
                pc.gc.details();
                // }

                break;

            case 'user-Name-Reminder':
                pc.Loyalty.UserNameReminder();
                break;

            case 'loyalty-create-online':
                pc.Loyalty.CreateOnline();
                break;

            case 'loyalty-create-signup':
                pc.Loyalty.testEmail();
                break;

            case 'loyalty-create-password':
                pc.Loyalty.addPassword();
                break;

            case 'loyalty-resetpassword':
                $form.find('[data-form-submit]').prop('disabled', true).addClass('disabled');
                returnValue = true;
                break;

            case 'loyalty-create-free':
                pc.Loyalty.CreateFree();
                break;
        }

        if (canSend) {
            url = url + '?' + params;
            genericFormSubmit($form, url);
        }

        return returnValue;
    }
        
    function genericFormSubmit($form, url) {
        $.ajax({
            url: url,
            type: 'POST'
        })
            .done(function (data) {
                $form.hide();

                if (typeof data !== 'undefined' && data === false) {
                    $form.siblings('[data-form-error]').show();
                }
                else {
                    $form.siblings('[data-form-success]').show();
                }
            })
            .fail(function () {
                $form.hide();
                $form.siblings('[data-form-error]').show();

                throw new Error("There has been an issue with the AJAX call");
            });
    }

    function uploadFileFormSubmit($form, url) {

        var formData = new FormData();

        if ($form.find('[data-form-field]:visible').length > 0) {
            $form.find('[data-form-field]:visible').each(function () {
                if (this.type === 'file') {
                    formData.append(this.name, this.files[0]);
                }
                else {
                    formData.append(this.name, this.value);
                }
            });
        }

        $.ajax({
            url: url,
            type: 'POST',
            data: formData,
            async: false,
            cache: false,
            contentType: false,
            processData: false
        })
            .done(function (data) {
                $form.hide();

                if (typeof data !== 'undefined' && data === false) {
                    $form.siblings('[data-form-error]').show();
                }
                else {
                    var $confirmationHide = $('[data-confirmation-hide]');

                    if ($confirmationHide.length > 0) {
                        $confirmationHide.addClass('dn');
                        $("body").scrollTop(0);
                    }

                    $form.siblings('[data-form-success]').show();
                }
            })
            .fail(function () {
                $form.hide();
                $form.siblings('[data-form-error]').show();

                throw new Error("There has been an issue with the AJAX call");
            });
    }

    function subscriptionFormSubmit($form, url) {
        var tempData = {},
            $preferredCinemaList = $('[name="ContactGroupId"]:checked'),
            tempList = [];

        tempData['Name'] = '';
        tempData['FIRSTNAME'] = $("input[name='FIRSTNAME']").val();
        tempData['LASTNAME'] = $("input[name='LASTNAME']").val();
        tempData['Email'] = $("input[name='Email']").val();
        tempData['ContactGroupIds'] = '';

        if ($preferredCinemaList.length > 0) {
            $preferredCinemaList.each(function (idx, obj) {
                tempList.push(obj.value);
            });

            tempData['ContactGroupIds'] = tempList.join('|');
        }

        $.ajax({
            beforeSend: function (xhrObj) {
                xhrObj.setRequestHeader("Content-Type", "application/json");
                xhrObj.setRequestHeader("Accept", "application/json");
            },
            type: "POST",
            dataType: "json",
            contentType: "application/json",
            url: "/api/subscription",
            data: JSON.stringify(tempData)
        })
            .done(function (data) {
                $form.hide();

                if (typeof data !== 'undefined' && data === false) {
                    $form.siblings('[data-form-error]').show();
                }
                else {
                    $form.siblings('[data-form-success]').show();

                    // ga tracking
                    if (typeof dataLayer !== 'undefined') {
                        dataLayer.push({ 'GAevent': 'Newsletter Success' });
                    }

                    // fb tracking
                    window._fbq = window._fbq || [];
                    window._fbq.push(['track', '6027593607513', { 'value': '0.00', 'currency': 'GBP' }]);
                }
            })
            .fail(function (jqXHR, status, err) {
                $form.hide();
                $form.siblings('[data-form-error]').show();

                throw new Error("There has been an issue with the AJAX call");
            });
    }

    function init() {
        $(function () {
            setup();
        });
    }

    init();

})(jQuery);

(function ($) {
    // maxlength counter
    var $textareas = $('textarea[maxlength]');

    if ($textareas.length > 0) {
        $textareas.each(function () {
            var $textarea = $(this),
                maxlength = parseFloat($textarea.attr('maxlength') || 0),
                $label = $('<div class="maxlengthLabel" data-maxlength-label>' + maxlength + ' characters</div>');

            if (maxlength > 0) {
                $textarea.before($label);
                $textarea.on('keyup', function () {
                    $label.text((maxlength - this.value.length) + ' characters');
                });
            }
        });
    }
})(jQuery);

(function ($) {
    // populate date select

    var $years = $('[data-form-populate-year]'),
        $months = $('[data-form-populate-month]'),
        $days = $('[data-form-populate-day]');

    if ($years.length > 0) {
        $years.each(function () {
            var $year = $(this),
                numToAdd = $year.data('form-populate-year') || 10,
                template = '<option value="{{year}}">{{year}}</option>',
                today = new Date(),
                thisYear = today.getFullYear();

            for (var i = thisYear, len = thisYear + numToAdd; i < len; i++) {
                $year.append(template.replace(/{{year}}/g, i));
            }
        });
    }

    if ($months.length > 0) {
        $months.each(function () {
            var $month = $(this),
                template = '<option value="{{month}}">{{month}}</option>',
                type = $month.attr('data-form-populate-month') || '',
                data = [];

            if (type === 'full') {
                data = [
                    'January',
                    'February',
                    'March',
                    'April',
                    'May',
                    'June',
                    'July',
                    'August',
                    'September',
                    'October',
                    'November',
                    'December'
                ];
            }
            else {
                for (var a = 0; a < 12; a++) {
                    data.push(('0' + a).slice(-2));
                }
            }

            for (var i = 0; i < 12; i++) {
                $month.append(template.replace(/{{month}}/g, data[i]));
            }
        });
    }

    if ($days.length > 0) {
        $days.each(function () {
            var $day = $(this),
                template = '<option value="{{day}}">{{day}}</option>';

            for (var i = 1; i <= 31; i++) {
                $day.append(template.replace(/{{day}}/g, ('0' + i).slice(-2)));
            }
        });
    }
})(jQuery);

(function ($) {
    // private hire reveal selects

    var $parent = $('[data-privatehire-selects]');

    if ($parent.length > 0) {

        var $btn = $parent.find('[data-privatehire-selects-show]'),
            $btn1 = $('[data-button-one]'),
            $btn2 = $('[data-button-two]'),
            $btn3 = $('[data-button-three]'),
            $btn4 = $('[data-button-four]'),
            $selects = $parent.find('[data-privatehire-selects-item].dn'),
            $selects2 = $parent.find('[data-privatehire-selects-item].show'),
            $removeBtn = $('[data-removeBtn]');

        if ($btn.length > 0 && $selects.length > 0) {

            $btn1.on('click', function () {
                $('[data-date-one]').addClass('dn');
                $('[data-date-one] select').val('').trigger('change');
                $('[data-date-one] select').removeClass('invalid');
            });

            $btn2.on('click', function () {
                $('[data-date-two]').addClass('dn');
                $('[data-date-two] select').val('').trigger('change');
                $('[data-date-two] select').removeClass('invalid');
            });

            $btn3.on('click', function () {
                $('[data-date-three]').addClass('dn');
                $('[data-date-three] select').val('').trigger('change');
                $('[data-date-three] select').removeClass('invalid');
            });

            $btn4.on('click', function () {
                $('[data-date-four]').addClass('dn');
                $('[data-date-four] select').val('').trigger('change');
                $('[data-date-four] select').removeClass('invalid');
            });

            $removeBtn.on('click', function (e) {
                e.preventDefault();
                $btn.show();
                $selects = $parent.find('[data-privatehire-selects-item].dn');

                if ($selects.length === 3) {
                    $removeBtn.hide();
                } else {
                    $removeBtn.show();
                }
            });

            $btn.on('click', function (e) {
                e.preventDefault();

                $btn1.removeClass('dn');

                $selects.first().slideDown(400, function () {
                    $(this).removeClass('dn').css('display', '');
                    $('[data-removeBtn]').show();

                    $selects = $parent.find('[data-privatehire-selects-item].dn');
                    if ($selects.length === 0) {
                        $btn.hide();
                    } else {
                        $btn.show();
                    }

                });
            });
        }
    }

})(jQuery);;var pc = pc || {};

// date
pc.date = pc.date || {
	'reminder': '1' // hours
};

(function ($) {

	function setup() {
		var $btn = $(this),
			url = '/api/calendar/SaveTheDateForSession/{{event}}?reminderInHours={{reminder}}';

		$btn.on('click', function (e) {
			e.preventDefault();
			e.stopPropagation();

			var $this = $(this),
				thisEvent = $this.attr('data-date-btn'),
				thisUrl = url;

			thisUrl = thisUrl
				.replace(/{{event}}/g, thisEvent)
				.replace(/{{reminder}}/g, pc.date.reminder);

			// open up url to get iCalendar file
            if (
                typeof pc.device !== 'undefined' &&
                pc.device !== null &&
                typeof pc.device.iosApp !== 'undefined' &&
                pc.device.iosApp !== null &&
                pc.device.iosApp === true
            ) {
				// this is the app so open in the same window
				// CF have worked around the calendar feature by generating an .ICS file utilising showtime information available to iOS app. The app is hijacking the click event for the ‘Add to calendar’ button and is reliant on a call being made to the URL: /api/calendar
                window.location = thisUrl;
            }
            else {
                window.open(thisUrl);
            }
		});		
	}

	function init() {
		var $btn = $('[data-date-btn]');

		if ($btn.length > 0) {
			$btn.each(setup);
		} 
	}

	init();
})(jQuery);;var pc = pc || {};

// toggle functionality

(function ($) {

	function setup() {
		$(document).on('click', '[data-toggle-btn]:visible', function (e) {
			e.preventDefault();

			var $btn = $(this),
				el = $btn.attr('data-toggle-btn') || '',
				$el,
				copyOrig = $btn.data('copyorig') || $btn.text(),
				copyNew = $btn.attr('data-toggle-copy') || '';

			// check el data exists
			if (el !== '') {
				$el = $('[data-toggle="' + el + '"]');
				// check element exists
				if ($el.length > 0) {
					// check if element is active
					if ($el.hasClass('active')) {
						// make element inactive
						$el.removeClass('active');
						$btn.removeClass('active');
						if (copyNew !== '') {
							$btn.text(copyOrig);
						}
					}
					else {
						// make element active
						$el.addClass('active');
						$btn.addClass('active');
						if (copyNew !== '') {
							$btn.text(copyNew);
						}
						$btn.data('copyorig', copyOrig);
					}
				}
			}
		});						
	}

	function init() {
		$(function () {
			setup();
		});
	}

	init();

})(jQuery);;/*!
Video.js - HTML5 Video Player
Version 3.1.0

LGPL v3 LICENSE INFO
This file is part of Video.js. Copyright 2011 Zencoder, Inc.

Video.js is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Video.js is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with Video.js.  If not, see <http://www.gnu.org/licenses/>.
*/

// Self-executing function to prevent global vars and help with minification
; (function (window, undefined) {


	var document = window.document;// HTML5 Shiv. Must be in <head> to support older browsers.
	document.createElement("video"); document.createElement("audio");

	var VideoJS = function (id, addOptions, ready) {
		var tag; // Element of ID

		// Allow for element or ID to be passed in
		// String ID
		if (typeof id == "string") {

			// Adjust for jQuery ID syntax
			if (id.indexOf("#") === 0) {
				id = id.slice(1);
			}

			// If a player instance has already been created for this ID return it.
			if (_V_.players[id]) {
				return _V_.players[id];

				// Otherwise get element for ID
			} else {
				tag = _V_.el(id)
			}

			// ID is a media element
		} else {
			tag = id;
		}

		// Check for a useable element
		if (!tag || !tag.nodeName) { // re: nodeName, could be a box div also
			throw new TypeError("The element or ID supplied is not valid. (VideoJS)"); // Returns
		}

		// Element may have a player attr referring to an already created player instance.
		// If not, set up a new player and return the instance.
		return tag.player || new _V_.Player(tag, addOptions, ready);
	},

	// Shortcut
	_V_ = VideoJS,

	// CDN Version. Used to target right flash swf.
	CDN_VERSION = "3.1";

	VideoJS.players = {};

	VideoJS.options = {

		// Default order of fallback technology
		techOrder: ["html5", "flash"],
		// techOrder: ["flash","html5"],

		html5: {},
		flash: { swf: "/themes/default/content/vendor/mymovies/video-js.swf" },

		// Default of web browser is 300x150. Should rely on source width/height.
		width: "auto",
		height: "auto",

		// defaultVolume: 0.85,
		defaultVolume: 0.00, // The freakin seaguls are driving me crazy!

		// Included control sets
		components: {
			"poster": {},
			"loadingSpinner": {},
			"bigPlayButton": {},
			"controlBar": {},
			"subtitlesDisplay": {}
		}

		// components: [
		//   "poster",
		//   "loadingSpinner",
		//   "bigPlayButton",
		//   { name: "controlBar", options: {
		//     components: [
		//       "playToggle",
		//       "fullscreenToggle",
		//       "currentTimeDisplay",
		//       "timeDivider",
		//       "durationDisplay",
		//       "remainingTimeDisplay",
		//       { name: "progressControl", options: {
		//         components: [
		//           { name: "seekBar", options: {
		//             components: [
		//               "loadProgressBar",
		//               "playProgressBar",
		//               "seekHandle"
		//             ]}
		//           }
		//         ]}
		//       },
		//       { name: "volumeControl", options: {
		//         components: [
		//           { name: "volumeBar", options: {
		//             components: [
		//               "volumeLevel",
		//               "volumeHandle"
		//             ]}
		//           }
		//         ]}
		//       },
		//       "muteToggle"
		//     ]
		//   }},
		//   "subtitlesDisplay"/*, "replay"*/
		// ]
	};

	// Set CDN Version of swf
	if (CDN_VERSION != "GENERATED_CDN_VSN") {
	    _V_.options.flash.swf = "/themes/default/content/vendor/mymovies/video-js.swf"
	}

	// Automatically set up any tags that have a data-setup attribute
	_V_.autoSetup = function () {
		var options, vid, player,
				vids = document.getElementsByTagName("video");

		// Check if any media elements exist
		if (vids && vids.length > 0) {

			for (var i = 0, j = vids.length; i < j; i++) {
				vid = vids[i];

				// Check if element exists, has getAttribute func.
				// IE seems to consider typeof el.getAttribute == "object" instead of "function" like expected, at least when loading the player immediately.
				if (vid && vid.getAttribute) {

					// Make sure this player hasn't already been set up.
					if (vid.player === undefined) {
						options = vid.getAttribute("data-setup");

						// Check if data-setup attr exists. 
						// We only auto-setup if they've added the data-setup attr.
						if (options !== null) {

							// Parse options JSON
							// If empty string, make it a parsable json object.
							options = JSON.parse(options || "{}");

							// Create new video.js instance.
							player = _V_(vid, options);
						}
					}

					// If getAttribute isn't defined, we need to wait for the DOM.
				} else {
					_V_.autoSetupTimeout(1);
					break;
				}
			}

			// No videos were found, so keep looping unless page is finisehd loading.
		} else if (!_V_.windowLoaded) {
			_V_.autoSetupTimeout(1);
		}
	};

	// Pause to let the DOM keep processing
	_V_.autoSetupTimeout = function (wait) {
		setTimeout(_V_.autoSetup, wait);
	};
	_V_.merge = function (obj1, obj2, safe) {
		// Make sure second object exists
		if (!obj2) { obj2 = {}; };

		for (var attrname in obj2) {
			if (obj2.hasOwnProperty(attrname) && (!safe || !obj1.hasOwnProperty(attrname))) { obj1[attrname] = obj2[attrname]; }
		}
		return obj1;
	};
	_V_.extend = function (obj) { this.merge(this, obj, true); };

	_V_.extend({
		tech: {}, // Holder for playback technology settings
		controlSets: {}, // Holder for control set definitions

		// Device Checks
		isIE: function () { return !+"\v1"; },
		isFF: function () { return !!_V_.ua.match("Firefox") },
		isIPad: function () { return navigator.userAgent.match(/iPad/i) !== null; },
		isIPhone: function () { return navigator.userAgent.match(/iPhone/i) !== null; },
		isIOS: function () { return VideoJS.isIPhone() || VideoJS.isIPad(); },
		iOSVersion: function () {
			var match = navigator.userAgent.match(/OS (\d+)_/i);
			if (match && match[1]) { return match[1]; }
		},
		isAndroid: function () { return navigator.userAgent.match(/Android.*AppleWebKit/i) !== null; },
		androidVersion: function () {
			var match = navigator.userAgent.match(/Android (\d+)\./i);
			if (match && match[1]) { return match[1]; }
		},

		testVid: document.createElement("video"),
		ua: navigator.userAgent,
		support: {},

		each: function (arr, fn) {
			if (!arr || arr.length === 0) { return; }
			for (var i = 0, j = arr.length; i < j; i++) {
				fn.call(this, arr[i], i);
			}
		},

		eachProp: function (obj, fn) {
			if (!obj) { return; }
			for (var name in obj) {
				if (obj.hasOwnProperty(name)) {
					fn.call(this, name, obj[name]);
				}
			}
		},

		el: function (id) { return document.getElementById(id); },
		createElement: function (tagName, attributes) {
			var el = document.createElement(tagName),
					attrname;
			for (attrname in attributes) {
				if (attributes.hasOwnProperty(attrname)) {
					if (attrname.indexOf("-") !== -1) {
						el.setAttribute(attrname, attributes[attrname]);
					} else {
						el[attrname] = attributes[attrname];
					}
				}
			}
			return el;
		},

		insertFirst: function (node, parent) {
			if (parent.firstChild) {
				parent.insertBefore(node, parent.firstChild);
			} else {
				parent.appendChild(node);
			}
		},

		addClass: function (element, classToAdd) {
			if ((" " + element.className + " ").indexOf(" " + classToAdd + " ") == -1) {
				element.className = element.className === "" ? classToAdd : element.className + " " + classToAdd;
			}
		},

		removeClass: function (element, classToRemove) {
			if (element.className.indexOf(classToRemove) == -1) { return; }
			var classNames = element.className.split(" ");
			classNames.splice(classNames.indexOf(classToRemove), 1);
			element.className = classNames.join(" ");
		},

		remove: function (item, array) {
			if (!array) return;
			var i = array.indexOf(item);
			if (i != -1) {
				return array.splice(i, 1)
			};
		},

		// Attempt to block the ability to select text while dragging controls
		blockTextSelection: function () {
			document.body.focus();
			document.onselectstart = function () { return false; };
		},
		// Turn off text selection blocking
		unblockTextSelection: function () { document.onselectstart = function () { return true; }; },

		// Return seconds as H:MM:SS or M:SS
		// Supplying a guide (in seconds) will include enough leading zeros to cover the length of the guide
		formatTime: function (seconds, guide) {
			guide = guide || seconds; // Default to using seconds as guide
			var s = Math.floor(seconds % 60),
					m = Math.floor(seconds / 60 % 60),
					h = Math.floor(seconds / 3600),
					gm = Math.floor(guide / 60 % 60),
					gh = Math.floor(guide / 3600);

			// Check if we need to show hours
			h = (h > 0 || gh > 0) ? h + ":" : "";

			// If hours are showing, we may need to add a leading zero.
			// Always show at least one digit of minutes.
			m = (((h || gm >= 10) && m < 10) ? "0" + m : m) + ":";

			// Check if leading zero is need for seconds
			s = (s < 10) ? "0" + s : s;

			return h + m + s;
		},

		capitalize: function (string) {
			return string.charAt(0).toUpperCase() + string.slice(1);
		},

		// Return the relative horizonal position of an event as a value from 0-1
		getRelativePosition: function (x, relativeElement) {
			return Math.max(0, Math.min(1, (x - _V_.findPosX(relativeElement)) / relativeElement.offsetWidth));
		},

		getComputedStyleValue: function (element, style) {
			return window.getComputedStyle(element, null).getPropertyValue(style);
		},

		trim: function (string) { return string.toString().replace(/^\s+/, "").replace(/\s+$/, ""); },
		round: function (num, dec) {
			if (!dec) { dec = 0; }
			return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
		},

		isEmpty: function (object) {
			for (var prop in object) {
				return false;
			}
			return true;
		},

		// Mimic HTML5 TimeRange Spec.
		createTimeRange: function (start, end) {
			return {
				length: 1,
				start: function () { return start; },
				end: function () { return end; }
			};
		},

		/* Element Data Store. Allows for binding data to an element without putting it directly on the element.
			 Ex. Event listneres are stored here.
			 (also from jsninja.com)
		================================================================================ */
		cache: {}, // Where the data is stored
		guid: 1, // Unique ID for the element
		expando: "vdata" + (new Date).getTime(), // Unique attribute to store element's guid in

		// Returns the cache object where data for the element is stored
		getData: function (elem) {
			var id = elem[_V_.expando];
			if (!id) {
				id = elem[_V_.expando] = _V_.guid++;
				_V_.cache[id] = {};
			}
			return _V_.cache[id];
		},
		// Delete data for the element from the cache and the guid attr from element
		removeData: function (elem) {
			var id = elem[_V_.expando];
			if (!id) { return; }
			// Remove all stored data
			delete _V_.cache[id];
			// Remove the expando property from the DOM node
			try {
				delete elem[_V_.expando];
			} catch (e) {
				if (elem.removeAttribute) {
					elem.removeAttribute(_V_.expando);
				} else {
					// IE doesn't appear to support removeAttribute on the document element
					elem[_V_.expando] = null;
				}
			}
		},

		/* Proxy (a.k.a Bind or Context). A simple method for changing the context of a function
			 It also stores a unique id on the function so it can be easily removed from events
		================================================================================ */
		proxy: function (context, fn) {
			// Make sure the function has a unique ID
			if (!fn.guid) { fn.guid = _V_.guid++; }
			// Create the new function that changes the context
			var ret = function () {
				return fn.apply(context, arguments);
			};

			// Give the new function the same ID
			// (so that they are equivalent and can be easily removed)
			ret.guid = fn.guid;

			return ret;
		},

		get: function (url, onSuccess, onError) {
			// if (netscape.security.PrivilegeManager.enablePrivilege) {
			//   netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
			// }

			var local = (url.indexOf("file:") == 0 || (window.location.href.indexOf("file:") == 0 && url.indexOf("http:") == -1));

			if (typeof XMLHttpRequest == "undefined") {
				XMLHttpRequest = function () {
					try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e) { }
					try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (f) { }
					try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (g) { }
					throw new Error("This browser does not support XMLHttpRequest.");
				};
			}

			var request = new XMLHttpRequest();

			try {
				request.open("GET", url);
			} catch (e) {
				_V_.log("VideoJS XMLHttpRequest (open)", e);
				// onError(e);
				return false;
			}

			request.onreadystatechange = _V_.proxy(this, function () {
				if (request.readyState == 4) {
					if (request.status == 200 || local && request.status == 0) {
						onSuccess(request.responseText);
					} else {
						if (onError) {
							onError();
						}
					}
				}
			});

			try {
				request.send();
			} catch (e) {
				_V_.log("VideoJS XMLHttpRequest (send)", e);
				if (onError) {
					onError(e);
				}
			}
		},

		/* Local Storage
		================================================================================ */
		setLocalStorage: function (key, value) {
			// IE was throwing errors referencing the var anywhere without this
			var localStorage = localStorage || false;
			if (!localStorage) { return; }
			try {
				localStorage[key] = value;
			} catch (e) {
				if (e.code == 22 || e.code == 1014) { // Webkit == 22 / Firefox == 1014
					_V_.log("LocalStorage Full (VideoJS)", e);
				} else {
					_V_.log("LocalStorage Error (VideoJS)", e);
				}
			}
		}

	});

	// usage: log('inside coolFunc', this, arguments);
	// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
	_V_.log = function () {
		_V_.log.history = _V_.log.history || [];// store logs to an array for reference
		_V_.log.history.push(arguments);
		if (window.console) {
			arguments.callee = arguments.callee.caller;
			var newarr = [].slice.call(arguments);
			(typeof console.log === 'object' ? _V_.log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr));
		}
	};

	// make it safe to use console.log always
	(function (b) { function c() { } for (var d = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","), a; a = d.pop() ;) { b[a] = b[a] || c } })((function () {
		try
		{ console.log(); return window.console; } catch (err) { return window.console = {}; }
	})());

	// Offset Left
	// getBoundingClientRect technique from John Resig http://ejohn.org/blog/getboundingclientrect-is-awesome/
	if ("getBoundingClientRect" in document.documentElement) {
		_V_.findPosX = function (el) {
			var box;

			try {
				box = el.getBoundingClientRect();
			} catch (e) { }

			if (!box) { return 0; }

			var docEl = document.documentElement,
					body = document.body,
					clientLeft = docEl.clientLeft || body.clientLeft || 0,
					scrollLeft = window.pageXOffset || body.scrollLeft,
					left = box.left + scrollLeft - clientLeft;

			return left;
		};
	} else {
		_V_.findPosX = function (el) {
			var curleft = el.offsetLeft;
			// _V_.log(obj.className, obj.offsetLeft)
			while (el = obj.offsetParent) {
				if (el.className.indexOf("video-js") == -1) {
					// _V_.log(el.offsetParent, "OFFSETLEFT", el.offsetLeft)
					// _V_.log("-webkit-full-screen", el.webkitMatchesSelector("-webkit-full-screen"));
					// _V_.log("-webkit-full-screen", el.querySelectorAll(".video-js:-webkit-full-screen"));
				} else {
				}
				curleft += el.offsetLeft;
			}
			return curleft;
		};
	}// Using John Resig's Class implementation http://ejohn.org/blog/simple-javascript-inheritance/
	// (function(){var initializing=false, fnTest=/xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; _V_.Class = function(){}; _V_.Class.extend = function(prop) { var _super = this.prototype; initializing = true; var prototype = new this(); initializing = false; for (var name in prop) { prototype[name] = typeof prop[name] == "function" && typeof _super[name] == "function" && fnTest.test(prop[name]) ? (function(name, fn){ return function() { var tmp = this._super; this._super = _super[name]; var ret = fn.apply(this, arguments); this._super = tmp; return ret; }; })(name, prop[name]) : prop[name]; } function Class() { if ( !initializing && this.init ) this.init.apply(this, arguments); } Class.prototype = prototype; Class.constructor = Class; Class.extend = arguments.callee; return Class;};})();
	(function () {
		var initializing = false, fnTest = /xyz/.test(function () { xyz; }) ? /\b_super\b/ : /.*/;
		_V_.Class = function () { };
		_V_.Class.extend = function (prop) {
			var _super = this.prototype;
			initializing = true;
			var prototype = new this();
			initializing = false;
			for (var name in prop) {
				prototype[name] = typeof prop[name] == "function" &&
					typeof _super[name] == "function" && fnTest.test(prop[name]) ?
					(function (name, fn) {
						return function () {
							var tmp = this._super;
							this._super = _super[name];
							var ret = fn.apply(this, arguments);
							this._super = tmp;
							return ret;
						};
					})(name, prop[name]) :
					prop[name];
			}
			function Class() {
				if (!initializing && this.init) {
					return this.init.apply(this, arguments);

					// Attempting to recreate accessing function form of class.
				} else if (!initializing) {
					return arguments.callee.prototype.init()
				}
			}
			Class.prototype = prototype;
			Class.constructor = Class;
			Class.extend = arguments.callee;
			return Class;
		};
	})();

	/* Player Component- Base class for all UI objects
	================================================================================ */
	_V_.Component = _V_.Class.extend({

		init: function (player, options) {
			this.player = player;

			// Allow for overridding default component options
			options = this.options = _V_.merge(this.options || {}, options);

			// Create element if one wasn't provided in options
			if (options.el) {
				this.el = options.el;
			} else {
				this.el = this.createElement();
			}

			// Add any components in options
			this.initComponents();
		},

		destroy: function () { },

		createElement: function (type, attrs) {
			return _V_.createElement(type || "div", attrs);
		},

		buildCSSClass: function () {
			// Child classes can include a function that does:
			// return "CLASS NAME" + this._super();
			return "";
		},

		initComponents: function () {
			var options = this.options;
			if (options && options.components) {
				// Loop through components and add them to the player
				this.eachProp(options.components, function (name, opts) {

					// Allow waiting to add components until a specific event is called
					var tempAdd = this.proxy(function () {
						this.addComponent(name, opts);
					});

					if (opts.loadEvent) {
						this.one(opts.loadEvent, tempAdd)
					} else {
						tempAdd();
					}
				});
			}
		},

		// Add child components to this component.
		// Will generate a new child component and then append child component's element to this component's element.
		// Takes either the name of the UI component class, or an object that contains a name, UI Class, and options.
		addComponent: function (name, options) {
			var componentClass, component;

			// Make sure options is at least an empty object to protect against errors
			options = options || {};

			// Assume name of set is a lowercased name of the UI Class (PlayButton, etc.)
			componentClass = options.componentClass || _V_.capitalize(name);

			// Create a new object & element for this controls set
			// If there's no .player, this is a player
			component = new _V_[componentClass](this.player || this, options);

			// Add the UI object's element to the container div (box)
			this.el.appendChild(component.el);

			// Set property name on player. Could cause conflicts with other prop names, but it's worth making refs easy.
			this[name] = component;
		},

		/* Display
		================================================================================ */
		show: function () {
			this.el.style.display = "block";
		},

		hide: function () {
			this.el.style.display = "none";
		},

		fadeIn: function () {
			this.removeClass("vjs-fade-out");
			this.addClass("vjs-fade-in");
		},

		fadeOut: function () {
			this.removeClass("vjs-fade-in");
			this.addClass("vjs-fade-out");
		},

		addClass: function (classToAdd) {
			_V_.addClass(this.el, classToAdd);
		},

		removeClass: function (classToRemove) {
			_V_.removeClass(this.el, classToRemove);
		},

		/* Events
		================================================================================ */
		addEvent: function (type, fn) {
			return _V_.addEvent(this.el, type, _V_.proxy(this, fn));
		},
		removeEvent: function (type, fn) {
			return _V_.removeEvent(this.el, type, fn);
		},
		triggerEvent: function (type, e) {
			return _V_.triggerEvent(this.el, type, e);
		},
		one: function (type, fn) {
			_V_.one.call(this, this.el, type, fn);
		},

		/* Ready - Trigger functions when component is ready
		================================================================================ */
		ready: function (fn) {
			if (!fn) return this;

			if (this.isReady) {
				fn.call(this);
			} else {
				if (this.readyQueue === undefined) {
					this.readyQueue = [];
				}
				this.readyQueue.push(fn);
			}

			return this;
		},

		triggerReady: function () {
			this.isReady = true;
			if (this.readyQueue && this.readyQueue.length > 0) {
				// Call all functions in ready queue
				this.each(this.readyQueue, function (fn) {
					fn.call(this);
				});

				// Reset Ready Queue
				this.readyQueue = [];
			}
		},

		/* Utility
		================================================================================ */
		each: function (arr, fn) { _V_.each.call(this, arr, fn); },

		eachProp: function (obj, fn) { _V_.eachProp.call(this, obj, fn); },

		extend: function (obj) { _V_.merge(this, obj) },

		// More easily attach 'this' to functions
		proxy: function (fn) { return _V_.proxy(this, fn); }

	});/* Control - Base class for all control elements
================================================================================ */
	_V_.Control = _V_.Component.extend({

		buildCSSClass: function () {
			return "vjs-control " + this._super();
		}

	});

	/* Button - Base class for all buttons
	================================================================================ */
	_V_.Button = _V_.Control.extend({

		init: function (player, options) {
			this._super(player, options);

			this.addEvent("click", this.onClick);
			this.addEvent("focus", this.onFocus);
			this.addEvent("blur", this.onBlur);
		},

		createElement: function (type, attrs) {
			// Add standard Aria and Tabindex info
			attrs = _V_.merge({
				className: this.buildCSSClass(),
				innerHTML: '<div><span class="vjs-control-text">' + (this.buttonText || "Need Text") + '</span></div>',
				role: "button",
				tabIndex: 0
			}, attrs);

			return this._super(type, attrs);
		},

		// Click - Override with specific functionality for button
		onClick: function () { },

		// Focus - Add keyboard functionality to element
		onFocus: function () {
			_V_.addEvent(document, "keyup", _V_.proxy(this, this.onKeyPress));
		},

		// KeyPress (document level) - Trigger click when keys are pressed
		onKeyPress: function (event) {
			// Check for space bar (32) or enter (13) keys
			if (event.which == 32 || event.which == 13) {
				event.preventDefault();
				this.onClick();
			}
		},

		// Blur - Remove keyboard triggers
		onBlur: function () {
			_V_.removeEvent(document, "keyup", _V_.proxy(this, this.onKeyPress));
		}

	});

	/* Play Button
	================================================================================ */
	_V_.PlayButton = _V_.Button.extend({

		buttonText: "Play",

		buildCSSClass: function () {
			return "vjs-play-button " + this._super();
		},

		onClick: function () {
			this.player.play();
		}

	});

	/* Pause Button
	================================================================================ */
	_V_.PauseButton = _V_.Button.extend({

		buttonText: "Pause",

		buildCSSClass: function () {
			return "vjs-pause-button " + this._super();
		},

		onClick: function () {
			this.player.pause();
		}

	});

	/* Play Toggle - Play or Pause Media
	================================================================================ */
	_V_.PlayToggle = _V_.Button.extend({

		buttonText: "Play",

		init: function (player, options) {
			this._super(player, options);

			player.addEvent("play", _V_.proxy(this, this.onPlay));
			player.addEvent("pause", _V_.proxy(this, this.onPause));
		},

		buildCSSClass: function () {
			return "vjs-play-control " + this._super();
		},

		// OnClick - Toggle between play and pause
		onClick: function () {
			if (this.player.paused()) {
				this.player.play();
			} else {
				this.player.pause();
			}
		},

		// OnPlay - Add the vjs-playing class to the element so it can change appearance
		onPlay: function () {
			_V_.removeClass(this.el, "vjs-paused");
			_V_.addClass(this.el, "vjs-playing");
		},

		// OnPause - Add the vjs-paused class to the element so it can change appearance
		onPause: function () {
			_V_.removeClass(this.el, "vjs-playing");
			_V_.addClass(this.el, "vjs-paused");
		}

	});


	/* Fullscreen Toggle Behaviors
	================================================================================ */
	_V_.FullscreenToggle = _V_.Button.extend({

		buttonText: "Fullscreen",

		buildCSSClass: function () {
			return "vjs-fullscreen-control " + this._super();
		},

		onClick: function () {
			if (!this.player.isFullScreen) {
				this.player.requestFullScreen();
			} else {
				this.player.cancelFullScreen();
			}
		}

	});

	/* Big Play Button
	================================================================================ */
	_V_.BigPlayButton = _V_.Button.extend({
		init: function (player, options) {
			this._super(player, options);

			player.addEvent("play", _V_.proxy(this, this.hide));
			player.addEvent("ended", _V_.proxy(this, this.show));
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-big-play-button",
				innerHTML: "<span></span>"
			});
		},

		onClick: function () {
			// Go back to the beginning if big play button is showing at the end.
			// Have to check for current time otherwise it might throw a 'not ready' error.
			if (this.player.currentTime()) {
				this.player.currentTime(0);
			}
			this.player.play();
		}
	});

	/* Loading Spinner
	================================================================================ */
	_V_.LoadingSpinner = _V_.Component.extend({
		init: function (player, options) {
			this._super(player, options);

			player.addEvent("canplay", _V_.proxy(this, this.hide));
			player.addEvent("canplaythrough", _V_.proxy(this, this.hide));
			player.addEvent("playing", _V_.proxy(this, this.hide));

			player.addEvent("seeking", _V_.proxy(this, this.show));
			player.addEvent("error", _V_.proxy(this, this.show));

			// Not showing spinner on stalled any more. Browsers may stall and then not trigger any events that would remove the spinner.
			// Checked in Chrome 16 and Safari 5.1.2. http://help.videojs.com/discussions/problems/883-why-is-the-download-progress-showing
			// player.addEvent("stalled", _V_.proxy(this, this.show));

			player.addEvent("waiting", _V_.proxy(this, this.show));
		},

		createElement: function () {

			var classNameSpinner, innerHtmlSpinner;

			if (typeof this.player.el.style.WebkitBorderRadius == "string"
					 || typeof this.player.el.style.MozBorderRadius == "string"
					 || typeof this.player.el.style.KhtmlBorderRadius == "string"
					 || typeof this.player.el.style.borderRadius == "string") {
				classNameSpinner = "vjs-loading-spinner";
				innerHtmlSpinner = "<div class='ball1'></div><div class='ball2'></div><div class='ball3'></div><div class='ball4'></div><div class='ball5'></div><div class='ball6'></div><div class='ball7'></div><div class='ball8'></div>";
			} else {
				classNameSpinner = "vjs-loading-spinner-fallback";
				innerHtmlSpinner = "";
			}

			return this._super("div", {
				className: classNameSpinner,
				innerHTML: innerHtmlSpinner
			});
		}
	});

	/* Control Bar
	================================================================================ */
	_V_.ControlBar = _V_.Component.extend({

		options: {
			loadEvent: "play",
			components: {
				"playToggle": {},
				"fullscreenToggle": {},
				"currentTimeDisplay": {},
				"timeDivider": {},
				"durationDisplay": {},
				"remainingTimeDisplay": {},
				"progressControl": {},
				"volumeControl": {},
				"muteToggle": {}
			}
		},

		init: function (player, options) {
			this._super(player, options);

			player.addEvent("play", this.proxy(function () {
				this.fadeIn();
				this.player.addEvent("mouseover", this.proxy(this.fadeIn));
				this.player.addEvent("mouseout", this.proxy(this.fadeOut));
			}));
		},

		createElement: function () {
			return _V_.createElement("div", {
				className: "vjs-controls"
			});
		},

		fadeIn: function () {
			this._super();
			this.player.triggerEvent("controlsvisible");
		},

		fadeOut: function () {
			this._super();
			this.player.triggerEvent("controlshidden");
		}
	});

	/* Time
	================================================================================ */
	_V_.CurrentTimeDisplay = _V_.Component.extend({

		init: function (player, options) {
			this._super(player, options);

			player.addEvent("timeupdate", _V_.proxy(this, this.updateContent));
		},

		createElement: function () {
			var el = this._super("div", {
				className: "vjs-current-time vjs-time-controls vjs-control"
			});

			this.content = _V_.createElement("div", {
				className: "vjs-current-time-display",
				innerHTML: '0:00'
			});

			el.appendChild(_V_.createElement("div").appendChild(this.content));
			return el;
		},

		updateContent: function () {
			// Allows for smooth scrubbing, when player can't keep up.
			var time = (this.player.scrubbing) ? this.player.values.currentTime : this.player.currentTime();
			this.content.innerHTML = _V_.formatTime(time, this.player.duration());
		}

	});

	_V_.DurationDisplay = _V_.Component.extend({

		init: function (player, options) {
			this._super(player, options);

			player.addEvent("timeupdate", _V_.proxy(this, this.updateContent));
		},

		createElement: function () {
			var el = this._super("div", {
				className: "vjs-duration vjs-time-controls vjs-control"
			});

			this.content = _V_.createElement("div", {
				className: "vjs-duration-display",
				innerHTML: '0:00'
			});

			el.appendChild(_V_.createElement("div").appendChild(this.content));
			return el;
		},

		updateContent: function () {
			if (this.player.duration()) { this.content.innerHTML = _V_.formatTime(this.player.duration()); }
		}

	});

	// Time Separator (Not used in main skin, but still available, and could be used as a 'spare element')
	_V_.TimeDivider = _V_.Component.extend({

		createElement: function () {
			return this._super("div", {
				className: "vjs-time-divider",
				innerHTML: '<div><span>/</span></div>'
			});
		}

	});

	_V_.RemainingTimeDisplay = _V_.Component.extend({

		init: function (player, options) {
			this._super(player, options);

			player.addEvent("timeupdate", _V_.proxy(this, this.updateContent));
		},

		createElement: function () {
			var el = this._super("div", {
				className: "vjs-remaining-time vjs-time-controls vjs-control"
			});

			this.content = _V_.createElement("div", {
				className: "vjs-remaining-time-display",
				innerHTML: '-0:00'
			});

			el.appendChild(_V_.createElement("div").appendChild(this.content));
			return el;
		},

		updateContent: function () {
			if (this.player.duration()) { this.content.innerHTML = "-" + _V_.formatTime(this.player.remainingTime()); }

			// Allows for smooth scrubbing, when player can't keep up.
			// var time = (this.player.scrubbing) ? this.player.values.currentTime : this.player.currentTime();
			// this.content.innerHTML = _V_.formatTime(time, this.player.duration());
		}

	});

	/* Slider - Parent for seek bar and volume slider
	================================================================================ */
	_V_.Slider = _V_.Component.extend({

		init: function (player, options) {
			this._super(player, options);

			player.addEvent(this.playerEvent, _V_.proxy(this, this.update));

			this.addEvent("mousedown", this.onMouseDown);
			this.addEvent("focus", this.onFocus);
			this.addEvent("blur", this.onBlur);

			this.player.addEvent("controlsvisible", this.proxy(this.update));

			// This is actually to fix the volume handle position. http://twitter.com/#!/gerritvanaaken/status/159046254519787520
			// this.player.one("timeupdate", this.proxy(this.update));

			this.update();
		},

		createElement: function (type, attrs) {
			attrs = _V_.merge({
				role: "slider",
				"aria-valuenow": 0,
				"aria-valuemin": 0,
				"aria-valuemax": 100,
				tabIndex: 0
			}, attrs);

			return this._super(type, attrs);
		},

		onMouseDown: function (event) {
			event.preventDefault();
			_V_.blockTextSelection();

			_V_.addEvent(document, "mousemove", _V_.proxy(this, this.onMouseMove));
			_V_.addEvent(document, "mouseup", _V_.proxy(this, this.onMouseUp));

			this.onMouseMove(event);
		},

		onMouseUp: function (event) {
			_V_.unblockTextSelection();
			_V_.removeEvent(document, "mousemove", this.onMouseMove, false);
			_V_.removeEvent(document, "mouseup", this.onMouseUp, false);

			this.update();
		},

		update: function () {
			// If scrubbing, we could use a cached value to make the handle keep up with the user's mouse.
			// On HTML5 browsers scrubbing is really smooth, but some flash players are slow, so we might want to utilize this later.
			// var progress =  (this.player.scrubbing) ? this.player.values.currentTime / this.player.duration() : this.player.currentTime() / this.player.duration();

			var barProgress,
					progress = this.getPercent();
			handle = this.handle,
			bar = this.bar;

			// Protect against no duration and other division issues
			if (isNaN(progress)) { progress = 0; }

			barProgress = progress;

			// If there is a handle, we need to account for the handle in our calculation for progress bar
			// so that it doesn't fall short of or extend past the handle.
			if (handle) {

				var box = this.el,
						boxWidth = box.offsetWidth,

						handleWidth = handle.el.offsetWidth,

						// The width of the handle in percent of the containing box
						// In IE, widths may not be ready yet causing NaN
						handlePercent = (handleWidth) ? handleWidth / boxWidth : 0,

						// Get the adjusted size of the box, considering that the handle's center never touches the left or right side.
						// There is a margin of half the handle's width on both sides.
						boxAdjustedPercent = 1 - handlePercent;

				// Adjust the progress that we'll use to set widths to the new adjusted box width
				adjustedProgress = progress * boxAdjustedPercent,

				// The bar does reach the left side, so we need to account for this in the bar's width
				barProgress = adjustedProgress + (handlePercent / 2);

				// Move the handle from the left based on the adjected progress
				handle.el.style.left = _V_.round(adjustedProgress * 100, 2) + "%";
			}

			// Set the new bar width
			bar.el.style.width = _V_.round(barProgress * 100, 2) + "%";
		},

		calculateDistance: function (event) {
			var box = this.el,
					boxX = _V_.findPosX(box),
					boxW = box.offsetWidth,
					handle = this.handle;

			if (handle) {
				var handleW = handle.el.offsetWidth;

				// Adjusted X and Width, so handle doesn't go outside the bar
				boxX = boxX + (handleW / 2);
				boxW = boxW - handleW;
			}

			// Percent that the click is through the adjusted area
			return Math.max(0, Math.min(1, (event.pageX - boxX) / boxW));
		},

		onFocus: function (event) {
			_V_.addEvent(document, "keyup", _V_.proxy(this, this.onKeyPress));
		},

		onKeyPress: function (event) {
			if (event.which == 37) { // Left Arrow
				event.preventDefault();
				this.stepBack();
			} else if (event.which == 39) { // Right Arrow
				event.preventDefault();
				this.stepForward();
			}
		},

		onBlur: function (event) {
			_V_.removeEvent(document, "keyup", _V_.proxy(this, this.onKeyPress));
		}
	});


	/* Progress
	================================================================================ */

	// Progress Control: Seek, Load Progress, and Play Progress
	_V_.ProgressControl = _V_.Component.extend({

		options: {
			components: {
				"seekBar": {}
			}
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-progress-control vjs-control"
			});
		}

	});

	// Seek Bar and holder for the progress bars
	_V_.SeekBar = _V_.Slider.extend({

		options: {
			components: {
				"loadProgressBar": {},

				// Set property names to bar and handle to match with the parent Slider class is looking for
				"bar": { componentClass: "PlayProgressBar" },
				"handle": { componentClass: "SeekHandle" }
			}
		},

		playerEvent: "timeupdate",

		init: function (player, options) {
			this._super(player, options);
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-progress-holder"
			});
		},

		getPercent: function () {
			return this.player.currentTime() / this.player.duration();
		},

		onMouseDown: function (event) {
			this._super(event);

			this.player.scrubbing = true;

			this.videoWasPlaying = !this.player.paused();
			this.player.pause();
		},

		onMouseMove: function (event) {
			var newTime = this.calculateDistance(event) * this.player.duration();

			// Don't let video end while scrubbing.
			if (newTime == this.player.duration()) { newTime = newTime - 0.1; }

			// Set new time (tell player to seek to new time)
			this.player.currentTime(newTime);
		},

		onMouseUp: function (event) {
			this._super(event);

			this.player.scrubbing = false;
			if (this.videoWasPlaying) {
				this.player.play();
			}
		},

		stepForward: function () {
			this.player.currentTime(this.player.currentTime() + 1);
		},

		stepBack: function () {
			this.player.currentTime(this.player.currentTime() - 1);
		}

	});

	// Load Progress Bar
	_V_.LoadProgressBar = _V_.Component.extend({

		init: function (player, options) {
			this._super(player, options);
			player.addEvent("progress", _V_.proxy(this, this.update));
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-load-progress",
				innerHTML: '<span class="vjs-control-text">Loaded: 0%</span>'
			});
		},

		update: function () {
			if (this.el.style) { this.el.style.width = _V_.round(this.player.bufferedPercent() * 100, 2) + "%"; }
		}

	});

	// Play Progress Bar
	_V_.PlayProgressBar = _V_.Component.extend({

		createElement: function () {
			return this._super("div", {
				className: "vjs-play-progress",
				innerHTML: '<span class="vjs-control-text">Progress: 0%</span>'
			});
		}

	});

	// Seek Handle
	// SeekBar Behavior includes play progress bar, and seek handle
	// Needed so it can determine seek position based on handle position/size
	_V_.SeekHandle = _V_.Component.extend({

		createElement: function () {
			return this._super("div", {
				className: "vjs-seek-handle",
				innerHTML: '<span class="vjs-control-text">00:00</span>'
			});
		}

	});

	/* Volume Scrubber
	================================================================================ */
	// Progress Control: Seek, Load Progress, and Play Progress
	_V_.VolumeControl = _V_.Component.extend({

		options: {
			components: {
				"volumeBar": {}
			}
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-volume-control vjs-control"
			});
		}

	});

	_V_.VolumeBar = _V_.Slider.extend({

		options: {
			components: {
				"bar": { componentClass: "VolumeLevel" },
				"handle": { componentClass: "VolumeHandle" }
			}
		},

		playerEvent: "volumechange",

		createElement: function () {
			return this._super("div", {
				className: "vjs-volume-bar"
			});
		},

		onMouseMove: function (event) {
			this.player.volume(this.calculateDistance(event));
		},

		getPercent: function () {
			return this.player.volume();
		},

		stepForward: function () {
			this.player.volume(this.player.volume() + 0.1);
		},

		stepBack: function () {
			this.player.volume(this.player.volume() - 0.1);
		}
	});

	_V_.VolumeLevel = _V_.Component.extend({

		createElement: function () {
			return this._super("div", {
				className: "vjs-volume-level",
				innerHTML: '<span class="vjs-control-text"></span>'
			});
		}

	});

	_V_.VolumeHandle = _V_.Component.extend({

		createElement: function () {
			return this._super("div", {
				className: "vjs-volume-handle",
				innerHTML: '<span class="vjs-control-text"></span>'
				// tabindex: 0,
				// role: "slider", "aria-valuenow": 0, "aria-valuemin": 0, "aria-valuemax": 100
			});
		}

	});

	_V_.MuteToggle = _V_.Button.extend({

		init: function (player, options) {
			this._super(player, options);

			player.addEvent("volumechange", _V_.proxy(this, this.update));
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-mute-control vjs-control",
				innerHTML: '<div><span class="vjs-control-text">Mute</span></div>'
			});
		},

		onClick: function (event) {
			this.player.muted(this.player.muted() ? false : true);
		},

		update: function (event) {
			var vol = this.player.volume(),
					level = 3;

			if (vol == 0 || this.player.muted()) {
				level = 0;
			} else if (vol < 0.33) {
				level = 1;
			} else if (vol < 0.67) {
				level = 2;
			}

			/* TODO improve muted icon classes */
			_V_.each.call(this, [0, 1, 2, 3], function (i) {
				_V_.removeClass(this.el, "vjs-vol-" + i);
			});
			_V_.addClass(this.el, "vjs-vol-" + level);
		}

	});


	/* Poster Image
	================================================================================ */
	_V_.Poster = _V_.Button.extend({
		init: function (player, options) {
			this._super(player, options);

			if (!this.player.options.poster) {
				this.hide();
			}

			player.addEvent("play", _V_.proxy(this, this.hide));
		},

		createElement: function () {
			return _V_.createElement("img", {
				className: "vjs-poster",
				src: this.player.options.poster,

				// Don't want poster to be tabbable.
				tabIndex: -1
			});
		},

		onClick: function () {
			this.player.play();
		}
	});


	/* Text Track Displays
	================================================================================ */
	// Create a behavior type for each text track type (subtitlesDisplay, captionsDisplay, etc.).
	// Then you can easily do something like.
	//    player.addBehavior(myDiv, "subtitlesDisplay");
	// And the myDiv's content will be updated with the text change.

	// Base class for all track displays. Should not be instantiated on its own.
	_V_.TextTrackDisplay = _V_.Component.extend({

		init: function (player, options) {
			this._super(player, options);

			player.addEvent(this.trackType + "update", _V_.proxy(this, this.update));
		},

		createElement: function () {
			return this._super("div", {
				className: "vjs-" + this.trackType
			});
		},

		update: function () {
			this.el.innerHTML = this.player.textTrackValue(this.trackType);
		}

	});

	_V_.SubtitlesDisplay = _V_.TextTrackDisplay.extend({

		trackType: "subtitles"

	});

	_V_.CaptionsDisplay = _V_.TextTrackDisplay.extend({

		trackType: "captions"

	});

	_V_.ChaptersDisplay = _V_.TextTrackDisplay.extend({

		trackType: "chapters"

	});

	_V_.DescriptionsDisplay = _V_.TextTrackDisplay.extend({

		trackType: "descriptions"

	});// ECMA-262 is the standard for javascript.
	// The following methods are impelemented EXACTLY as described in the standard (according to Mozilla Docs), and do not override the default method if one exists.
	// This may conflict with other libraries that modify the array prototype, but those libs should update to use the standard.

	// [].indexOf
	// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
	if (!Array.prototype.indexOf) {
		Array.prototype.indexOf = function (searchElement /*, fromIndex */) {
			"use strict";
			if (this === void 0 || this === null) {
				throw new TypeError();
			}
			var t = Object(this);
			var len = t.length >>> 0;
			if (len === 0) {
				return -1;
			}
			var n = 0;
			if (arguments.length > 0) {
				n = Number(arguments[1]);
				if (n !== n) { // shortcut for verifying if it's NaN
					n = 0;
				} else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) {
					n = (n > 0 || -1) * Math.floor(Math.abs(n));
				}
			}
			if (n >= len) {
				return -1;
			}
			var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
			for (; k < len; k++) {
				if (k in t && t[k] === searchElement) {
					return k;
				}
			}
			return -1;
		}
	}

	// NOT NEEDED YET
	// [].lastIndexOf
	// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
	// if (!Array.prototype.lastIndexOf)
	// {
	//   Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/)
	//   {
	//     "use strict";
	// 
	//     if (this === void 0 || this === null)
	//       throw new TypeError();
	// 
	//     var t = Object(this);
	//     var len = t.length >>> 0;
	//     if (len === 0)
	//       return -1;
	// 
	//     var n = len;
	//     if (arguments.length > 1)
	//     {
	//       n = Number(arguments[1]);
	//       if (n !== n)
	//         n = 0;
	//       else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0))
	//         n = (n > 0 || -1) * Math.floor(Math.abs(n));
	//     }
	// 
	//     var k = n >= 0
	//           ? Math.min(n, len - 1)
	//           : len - Math.abs(n);
	// 
	//     for (; k >= 0; k--)
	//     {
	//       if (k in t && t[k] === searchElement)
	//         return k;
	//     }
	//     return -1;
	//   };
	// }


	// NOT NEEDED YET
	// Array forEach per ECMA standard https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/foreach
	// Production steps of ECMA-262, Edition 5, 15.4.4.18
	// Reference: http://es5.github.com/#x15.4.4.18
	// if ( !Array.prototype.forEach ) {
	// 
	//   Array.prototype.forEach = function( callback, thisArg ) {
	// 
	//     var T, k;
	// 
	//     if ( this == null ) {
	//       throw new TypeError( " this is null or not defined" );
	//     }
	// 
	//     // 1. Let O be the result of calling ToObject passing the |this| value as the argument.
	//     var O = Object(this);
	// 
	//     // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
	//     // 3. Let len be ToUint32(lenValue).
	//     var len = O.length >>> 0;
	// 
	//     // 4. If IsCallable(callback) is false, throw a TypeError exception.
	//     // See: http://es5.github.com/#x9.11
	//     if ( {}.toString.call(callback) != "[object Function]" ) {
	//       throw new TypeError( callback + " is not a function" );
	//     }
	// 
	//     // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
	//     if ( thisArg ) {
	//       T = thisArg;
	//     }
	// 
	//     // 6. Let k be 0
	//     k = 0;
	// 
	//     // 7. Repeat, while k < len
	//     while( k < len ) {
	// 
	//       var kValue;
	// 
	//       // a. Let Pk be ToString(k).
	//       //   This is implicit for LHS operands of the in operator
	//       // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
	//       //   This step can be combined with c
	//       // c. If kPresent is true, then
	//       if ( k in O ) {
	// 
	//         // i. Let kValue be the result of calling the Get internal method of O with argument Pk.
	//         kValue = O[ Pk ];
	// 
	//         // ii. Call the Call internal method of callback with T as the this value and
	//         // argument list containing kValue, k, and O.
	//         callback.call( T, kValue, k, O );
	//       }
	//       // d. Increase k by 1.
	//       k++;
	//     }
	//     // 8. return undefined
	//   };
	// }


	// NOT NEEDED YET
	// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map
	// Production steps of ECMA-262, Edition 5, 15.4.4.19
	// Reference: http://es5.github.com/#x15.4.4.19
	// if (!Array.prototype.map) {
	//   Array.prototype.map = function(callback, thisArg) {
	// 
	//     var T, A, k;
	// 
	//     if (this == null) {
	//       throw new TypeError(" this is null or not defined");
	//     }
	// 
	//     // 1. Let O be the result of calling ToObject passing the |this| value as the argument.
	//     var O = Object(this);
	// 
	//     // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
	//     // 3. Let len be ToUint32(lenValue).
	//     var len = O.length >>> 0;
	// 
	//     // 4. If IsCallable(callback) is false, throw a TypeError exception.
	//     // See: http://es5.github.com/#x9.11
	//     if ({}.toString.call(callback) != "[object Function]") {
	//       throw new TypeError(callback + " is not a function");
	//     }
	// 
	//     // 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
	//     if (thisArg) {
	//       T = thisArg;
	//     }
	// 
	//     // 6. Let A be a new array created as if by the expression new Array(len) where Array is
	//     // the standard built-in constructor with that name and len is the value of len.
	//     A = new Array(len);
	// 
	//     // 7. Let k be 0
	//     k = 0;
	// 
	//     // 8. Repeat, while k < len
	//     while(k < len) {
	// 
	//       var kValue, mappedValue;
	// 
	//       // a. Let Pk be ToString(k).
	//       //   This is implicit for LHS operands of the in operator
	//       // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
	//       //   This step can be combined with c
	//       // c. If kPresent is true, then
	//       if (k in O) {
	// 
	//         // i. Let kValue be the result of calling the Get internal method of O with argument Pk.
	//         kValue = O[ k ];
	// 
	//         // ii. Let mappedValue be the result of calling the Call internal method of callback
	//         // with T as the this value and argument list containing kValue, k, and O.
	//         mappedValue = callback.call(T, kValue, k, O);
	// 
	//         // iii. Call the DefineOwnProperty internal method of A with arguments
	//         // Pk, Property Descriptor {Value: mappedValue, Writable: true, Enumerable: true, Configurable: true},
	//         // and false.
	// 
	//         // In browsers that support Object.defineProperty, use the following:
	//         // Object.defineProperty(A, Pk, { value: mappedValue, writable: true, enumerable: true, configurable: true });
	// 
	//         // For best browser support, use the following:
	//         A[ k ] = mappedValue;
	//       }
	//       // d. Increase k by 1.
	//       k++;
	//     }
	// 
	//     // 9. return A
	//     return A;
	//   };      
	// }
	// Event System (J.Resig - Secrets of a JS Ninja http://jsninja.com/ [Go read it, really])
	// (Book version isn't completely usable, so fixed some things and borrowed from jQuery where it's working)
	// 
	// This should work very similarly to jQuery's events, however it's based off the book version which isn't as
	// robust as jquery's, so there's probably some differences.
	// 
	// When you add an event listener using _V_.addEvent, 
	//   it stores the handler function in seperate cache object, 
	//   and adds a generic handler to the element's event,
	//   along with a unique id (guid) to the element.

	_V_.extend({

		// Add an event listener to element
		// It stores the handler function in a separate cache object
		// and adds a generic handler to the element's event,
		// along with a unique id (guid) to the element.
		addEvent: function (elem, type, fn) {
			var data = _V_.getData(elem), handlers;

			// We only need to generate one handler per element
			if (data && !data.handler) {
				// Our new meta-handler that fixes the event object and the context
				data.handler = function (event) {
					event = _V_.fixEvent(event);
					var handlers = _V_.getData(elem).events[event.type];
					// Go through and call all the real bound handlers
					if (handlers) {

						// Copy handlers so if handlers are added/removed during the process it doesn't throw everything off.
						var handlersCopy = [];
						_V_.each(handlers, function (handler, i) {
							handlersCopy[i] = handler;
						})

						for (var i = 0, l = handlersCopy.length; i < l; i++) {
							handlersCopy[i].call(elem, event);
						}
					}
				};
			}

			// We need a place to store all our event data
			if (!data.events) { data.events = {}; }

			// And a place to store the handlers for this event type
			handlers = data.events[type];

			if (!handlers) {
				handlers = data.events[type] = [];

				// Attach our meta-handler to the element, since one doesn't exist
				if (document.addEventListener) {
					elem.addEventListener(type, data.handler, false);
				} else if (document.attachEvent) {
					elem.attachEvent("on" + type, data.handler);
				}
			}

			if (!fn.guid) { fn.guid = _V_.guid++; }

			handlers.push(fn);
		},

		removeEvent: function (elem, type, fn) {
			var data = _V_.getData(elem), handlers;
			// If no events exist, nothing to unbind
			if (!data.events) { return; }

			// Are we removing all bound events?
			if (!type) {
				for (type in data.events) {
					_V_.cleanUpEvents(elem, type);
				}
				return;
			}

			// And a place to store the handlers for this event type
			handlers = data.events[type];

			// If no handlers exist, nothing to unbind
			if (!handlers) { return; }

			// See if we're only removing a single handler
			if (fn && fn.guid) {
				for (var i = 0; i < handlers.length; i++) {
					// We found a match (don't stop here, there could be a couple bound)
					if (handlers[i].guid === fn.guid) {
						// Remove the handler from the array of handlers
						handlers.splice(i--, 1);
					}
				}
			}

			_V_.cleanUpEvents(elem, type);
		},

		cleanUpEvents: function (elem, type) {
			var data = _V_.getData(elem);
			// Remove the events of a particular type if there are none left

			if (data.events[type].length === 0) {
				delete data.events[type];

				// Remove the meta-handler from the element
				if (document.removeEventListener) {
					elem.removeEventListener(type, data.handler, false);
				} else if (document.detachEvent) {
					elem.detachEvent("on" + type, data.handler);
				}
			}

			// Remove the events object if there are no types left
			if (_V_.isEmpty(data.events)) {
				delete data.events;
				delete data.handler;
			}

			// Finally remove the expando if there is no data left
			if (_V_.isEmpty(data)) {
				_V_.removeData(elem);
			}
		},

		fixEvent: function (event) {
			if (event[_V_.expando]) { return event; }
			// store a copy of the original event object
			// and "clone" to set read-only properties
			var originalEvent = event;
			event = new _V_.Event(originalEvent);

			for (var i = _V_.Event.props.length, prop; i;) {
				prop = _V_.Event.props[--i];
				event[prop] = originalEvent[prop];
			}

			// Fix target property, if necessary
			if (!event.target) { event.target = event.srcElement || document; }

			// check if target is a textnode (safari)
			if (event.target.nodeType === 3) { event.target = event.target.parentNode; }

			// Add relatedTarget, if necessary
			if (!event.relatedTarget && event.fromElement) {
				event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
			}

			// Calculate pageX/Y if missing and clientX/Y available
			if (event.pageX == null && event.clientX != null) {
				var eventDocument = event.target.ownerDocument || document,
					doc = eventDocument.documentElement,
					body = eventDocument.body;

				event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
				event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);
			}

			// Add which for key events
			if (event.which == null && (event.charCode != null || event.keyCode != null)) {
				event.which = event.charCode != null ? event.charCode : event.keyCode;
			}

			// Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
			if (!event.metaKey && event.ctrlKey) {
				event.metaKey = event.ctrlKey;
			}

			// Add which for click: 1 === left; 2 === middle; 3 === right
			// Note: button is not normalized, so don't use it
			if (!event.which && event.button !== undefined) {
				event.which = (event.button & 1 ? 1 : (event.button & 2 ? 3 : (event.button & 4 ? 2 : 0)));
			}

			return event;
		},

		triggerEvent: function (elem, event) {
			var data = _V_.getData(elem),
					parent = elem.parentNode || elem.ownerDocument,
					type = event.type || event,
					handler;

			if (data) { handler = data.handler }

			// Added in attion to book. Book code was broke.
			event = typeof event === "object" ?
				event[_V_.expando] ?
					event :
					new _V_.Event(type, event) :
				new _V_.Event(type);

			event.type = type;
			if (handler) {
				handler.call(elem, event);
			}

			// Clean up the event in case it is being reused
			event.result = undefined;
			event.target = elem;

			// Bubble the event up the tree to the document,
			// Unless it's been explicitly stopped
			// if (parent && !event.isPropagationStopped()) {
			//   _V_.triggerEvent(parent, event);
			// 
			// // We're at the top document so trigger the default action
			// } else if (!parent && !event.isDefaultPrevented()) {
			//   // log(type);
			//   var targetData = _V_.getData(event.target);
			//   // log(targetData);
			//   var targetHandler = targetData.handler;
			//   // log("2");
			//   if (event.target[event.type]) {
			//     // Temporarily disable the bound handler,
			//     // don't want to execute it twice
			//     if (targetHandler) {
			//       targetData.handler = function(){};
			//     }
			// 
			//     // Trigger the native event (click, focus, blur)
			//     event.target[event.type]();
			// 
			//     // Restore the handler
			//     if (targetHandler) {
			//       targetData.handler = targetHandler;
			//     }
			//   }
			// }
		},

		one: function (elem, type, fn) {
			_V_.addEvent(elem, type, function () {
				_V_.removeEvent(elem, type, arguments.callee)
				fn.apply(this, arguments);
			});
		}
	});

	// Custom Event object for standardizing event objects between browsers.
	_V_.Event = function (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.returnValue === false ||
				src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse;

			// Event type
		} else {
			this.type = src;
		}

		// Put explicitly provided properties onto the event object
		if (props) { _V_.merge(this, props); }

		this.timeStamp = (new Date).getTime();

		// Mark it as fixed
		this[_V_.expando] = true;
	};

	_V_.Event.prototype = {
		preventDefault: function () {
			this.isDefaultPrevented = returnTrue;

			var e = this.originalEvent;
			if (!e) { return; }

			// if preventDefault exists run it on the original event
			if (e.preventDefault) {
				e.preventDefault();
				// otherwise set the returnValue property of the original event to false (IE)
			} else {
				e.returnValue = false;
			}
		},
		stopPropagation: function () {
			this.isPropagationStopped = returnTrue;

			var e = this.originalEvent;
			if (!e) { return; }
			// if stopPropagation exists run it on the original event
			if (e.stopPropagation) { e.stopPropagation(); }
			// otherwise set the cancelBubble property of the original event to true (IE)
			e.cancelBubble = true;
		},
		stopImmediatePropagation: function () {
			this.isImmediatePropagationStopped = returnTrue;
			this.stopPropagation();
		},
		isDefaultPrevented: returnFalse,
		isPropagationStopped: returnFalse,
		isImmediatePropagationStopped: returnFalse
	};
	_V_.Event.props = "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" ");

	function returnTrue() { return true; }
	function returnFalse() { return false; }

	// Javascript JSON implementation
	// (Parse Method Only)
	// https://github.com/douglascrockford/JSON-js/blob/master/json2.js

	var JSON;
	if (!JSON) { JSON = {}; }

	(function () {
		var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;

		if (typeof JSON.parse !== 'function') {
			JSON.parse = function (text, reviver) {
				var j;

				function walk(holder, key) {
					var k, v, value = holder[key];
					if (value && typeof value === 'object') {
						for (k in value) {
							if (Object.prototype.hasOwnProperty.call(value, k)) {
								v = walk(value, k);
								if (v !== undefined) {
									value[k] = v;
								} else {
									delete value[k];
								}
							}
						}
					}
					return reviver.call(holder, key, value);
				}
				text = String(text);
				cx.lastIndex = 0;
				if (cx.test(text)) {
					text = text.replace(cx, function (a) {
						return '\\u' +
								('0000' + a.charCodeAt(0).toString(16)).slice(-4);
					});
				}

				if (/^[\],:{}\s]*$/
								.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@')
										.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']')
										.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {

					j = eval('(' + text + ')');

					return typeof reviver === 'function' ?
							walk({ '': j }, '') : j;
				}

				throw new SyntaxError('JSON.parse');
			};
		}
	}());
	/* UI Component- Base class for all UI objects
	================================================================================ */
	_V_.Player = _V_.Component.extend({

		init: function (tag, addOptions, ready) {

			this.tag = tag; // Store the original tag used to set options

			var el = this.el = _V_.createElement("div"), // Div to contain video and controls
					options = this.options = {},
					width = options.width = tag.getAttribute('width'),
					height = options.height = tag.getAttribute('height'),

					// Browsers default to 300x150 if there's no width/height or video size data.
					initWidth = width || 300,
					initHeight = height || 150;

			// Make player findable on elements
			tag.player = el.player = this;

			// Add callback to ready queue
			this.ready(ready);

			// Wrap video tag in div (el/box) container
			tag.parentNode.insertBefore(el, tag);
			el.appendChild(tag); // Breaks iPhone, fixed in HTML5 setup.

			// Give video tag properties to box
			el.id = this.id = tag.id; // ID will now reference box, not the video tag
			el.className = tag.className;
			// Update tag id/class for use as HTML5 playback tech
			tag.id += "_html5_api";
			tag.className = "vjs-tech";

			// Make player easily findable by ID
			_V_.players[el.id] = this;

			// Make box use width/height of tag, or default 300x150
			//el.setAttribute("width", initWidth);
			//el.setAttribute("height", initHeight);
			// Enforce with CSS since width/height attrs don't work on divs
			//el.style.width = initWidth + "px";
			//el.style.height = initHeight + "px";
			// Remove width/height attrs from tag so CSS can make it 100% width/height
			tag.removeAttribute("width");
			tag.removeAttribute("height");

			// Set Options
			_V_.merge(options, _V_.options); // Copy Global Defaults
			_V_.merge(options, this.getVideoTagSettings()); // Override with Video Tag Options
			_V_.merge(options, addOptions); // Override/extend with options from setup call

			// Store controls setting, and then remove immediately so native controls don't flash.
			tag.removeAttribute("controls");

			// Poster will be handled by a manual <img>
			tag.removeAttribute("poster");

			// Empty video tag sources and tracks so the built in player doesn't use them also.
			if (tag.hasChildNodes()) {
				for (var i = 0, j = tag.childNodes; i < j.length; i++) {
					if (j[i].nodeName == "SOURCE" || j[i].nodeName == "TRACK") {
						tag.removeChild(j[i]);
					}
				}
			}

			// Holder for playback tech components
			this.techs = {};

			// Cache for video property values.
			this.values = {};

			this.addClass("vjs-paused");

			this.addEvent("ended", this.onEnded);
			this.addEvent("play", this.onPlay);
			this.addEvent("pause", this.onPause);
			this.addEvent("error", this.onError);

			// When the API is ready, loop through the components and add to the player.
			if (options.controls) {
				this.ready(function () {
					this.initComponents();
				});
			}

			// If there are no sources when the player is initialized,
			// load the first supported playback technology.
			if (!options.sources || options.sources.length == 0) {
				for (var i = 0, j = options.techOrder; i < j.length; i++) {
					var techName = j[i],
							tech = _V_[techName];

					// Check if the browser supports this technology
					if (tech.isSupported()) {
						this.loadTech(techName);
						break;
					}
				}
			} else {
				// Loop through playback technologies (HTML5, Flash) and check for support
				// Then load the best source.
				this.src(options.sources);
			}
		},

		// Cache for video property values.
		values: {},

		destroy: function () {
			// Ensure that tracking progress and time progress will stop and plater deleted
			this.stopTrackingProgress();
			this.stopTrackingCurrentTime();
			delete _V_.players[this.id]
		},

		createElement: function (type, options) {

		},

		getVideoTagSettings: function () {
			var options = {
				sources: [],
				tracks: []
			};

			options.src = this.tag.getAttribute("src");
			options.controls = this.tag.getAttribute("controls") !== null;
			options.poster = this.tag.getAttribute("poster");
			options.preload = this.tag.getAttribute("preload");
			options.autoplay = this.tag.getAttribute("autoplay") !== null; // hasAttribute not IE <8 compatible
			options.loop = this.tag.getAttribute("loop") !== null;
			options.muted = this.tag.getAttribute("muted") !== null;

			if (this.tag.hasChildNodes()) {
				for (var c, i = 0, j = this.tag.childNodes; i < j.length; i++) {
					c = j[i];
					if (c.nodeName == "SOURCE") {
						options.sources.push({
							src: c.getAttribute('src'),
							type: c.getAttribute('type'),
							media: c.getAttribute('media'),
							title: c.getAttribute('title')
						});
					}
					if (c.nodeName == "TRACK") {
						options.tracks.push(new _V_.Track({
							src: c.getAttribute("src"),
							kind: c.getAttribute("kind"),
							srclang: c.getAttribute("srclang"),
							label: c.getAttribute("label"),
							'default': c.getAttribute("default") !== null,
							title: c.getAttribute("title")
						}, this));

					}
				}
			}
			return options;
		},

		/* PLayback Technology (tech)
		================================================================================ */
		// Load/Create an instance of playback technlogy including element and API methods
		// And append playback element in player div.
		loadTech: function (techName, source) {

			// Pause and remove current playback technology
			if (this.tech) {
				this.unloadTech();

				// If the first time loading, HTML5 tag will exist but won't be initialized
				// So we need to remove it if we're not loading HTML5
			} else if (techName != "html5" && this.tag) {
				this.el.removeChild(this.tag);
				this.tag = false;
			}

			this.techName = techName;

			// Turn off API access because we're loading a new tech that might load asynchronously
			this.isReady = false;

			var techReady = function () {
				this.player.triggerReady();

				// Manually track progress in cases where the browser/flash player doesn't report it.
				if (!this.support.progressEvent) {
					this.player.manualProgressOn();
				}

				// Manually track timeudpates in cases where the browser/flash player doesn't report it.
				if (!this.support.timeupdateEvent) {
					this.player.manualTimeUpdatesOn();
				}
			}

			// Grab tech-specific options from player options and add source and parent element to use.
			var techOptions = _V_.merge({ source: source, parentEl: this.el }, this.options[techName])

			if (source) {
				if (source.src == this.values.src && this.values.currentTime > 0) {
					techOptions.startTime = this.values.currentTime;
				}

				this.values.src = source.src;
			}

			// Initialize tech instance
			this.tech = new _V_[techName](this, techOptions);
			this.tech.ready(techReady);
		},

		unloadTech: function () {
			this.tech.destroy();

			// Turn off any manual progress or timeupdate tracking
			if (this.manualProgress) { this.manualProgressOff(); }

			if (this.manualTimeUpdates) { this.manualTimeUpdatesOff(); }

			this.tech = false;
		},

		// There's many issues around changing the size of a Flash (or other plugin) object.
		// First is a plugin reload issue in Firefox that has been around for 11 years: https://bugzilla.mozilla.org/show_bug.cgi?id=90268
		// Then with the new fullscreen API, Mozilla and webkit browsers will reload the flash object after going to fullscreen.
		// To get around this, we're unloading the tech, caching source and currentTime values, and reloading the tech once the plugin is resized.
		// reloadTech: function(betweenFn){
		//   _V_.log("unloadingTech")
		//   this.unloadTech();
		//   _V_.log("unloadedTech")
		//   if (betweenFn) { betweenFn.call(); }
		//   _V_.log("LoadingTech")
		//   this.loadTech(this.techName, { src: this.values.src })
		//   _V_.log("loadedTech")
		// },

		/* Fallbacks for unsupported event types
		================================================================================ */
		// Manually trigger progress events based on changes to the buffered amount
		// Many flash players and older HTML5 browsers don't send progress or progress-like events
		manualProgressOn: function () {
			this.manualProgress = true;

			// Trigger progress watching when a source begins loading
			this.trackProgress();

			// Watch for a native progress event call on the tech element
			// In HTML5, some older versions don't support the progress event
			// So we're assuming they don't, and turning off manual progress if they do.
			this.tech.addEvent("progress", function () {

				// Remove this listener from the element
				this.removeEvent("progress", arguments.callee);

				// Update known progress support for this playback technology
				this.support.progressEvent = true;

				// Turn off manual progress tracking
				this.player.manualProgressOff();
			});
		},

		manualProgressOff: function () {
			this.manualProgress = false;
			this.stopTrackingProgress();
		},

		trackProgress: function () {
			this.progressInterval = setInterval(_V_.proxy(this, function () {
				// Don't trigger unless buffered amount is greater than last time
				// log(this.values.bufferEnd, this.buffered().end(0), this.duration())
				/* TODO: update for multiple buffered regions */
				if (this.values.bufferEnd < this.buffered().end(0)) {
					this.triggerEvent("progress");
				} else if (this.bufferedPercent() == 1) {
					this.stopTrackingProgress();
					this.triggerEvent("progress"); // Last update
				}
			}), 500);
		},
		stopTrackingProgress: function () { clearInterval(this.progressInterval); },

		/* Time Tracking -------------------------------------------------------------- */
		manualTimeUpdatesOn: function () {
			this.manualTimeUpdates = true;

			this.addEvent("play", this.trackCurrentTime);
			this.addEvent("pause", this.stopTrackingCurrentTime);
			// timeupdate is also called by .currentTime whenever current time is set

			// Watch for native timeupdate event
			this.tech.addEvent("timeupdate", function () {

				// Remove this listener from the element
				this.removeEvent("timeupdate", arguments.callee);

				// Update known progress support for this playback technology
				this.support.timeupdateEvent = true;

				// Turn off manual progress tracking
				this.player.manualTimeUpdatesOff();
			});
		},

		manualTimeUpdatesOff: function () {
			this.manualTimeUpdates = false;
			this.stopTrackingCurrentTime();
			this.removeEvent("play", this.trackCurrentTime);
			this.removeEvent("pause", this.stopTrackingCurrentTime);
		},

		trackCurrentTime: function () {
			if (this.currentTimeInterval) { this.stopTrackingCurrentTime(); }
			this.currentTimeInterval = setInterval(_V_.proxy(this, function () {
				this.triggerEvent("timeupdate");
			}), 250); // 42 = 24 fps // 250 is what Webkit uses // FF uses 15
		},

		// Turn off play progress tracking (when paused or dragging)
		stopTrackingCurrentTime: function () { clearInterval(this.currentTimeInterval); },

		/* Player event handlers (how the player reacts to certain events)
		================================================================================ */
		onEnded: function () {
			if (this.options.loop) {
				this.currentTime(0);
				this.play();
			} else {
				this.pause();
				this.currentTime(0);
				this.pause();
			}
		},

		onPlay: function () {
			_V_.removeClass(this.el, "vjs-paused");
			_V_.addClass(this.el, "vjs-playing");
		},

		onPause: function () {
			_V_.removeClass(this.el, "vjs-playing");
			_V_.addClass(this.el, "vjs-paused");
		},

		onError: function (e) {
			_V_.log("Video Error", e);
		},

		/* Player API
		================================================================================ */

		apiCall: function (method, arg) {
			if (this.isReady) {
				return this.tech[method](arg);
			} else {
				_V_.log("The playback technology API is not ready yet. Use player.ready(myFunction)." + " [" + method + "]", arguments.callee.caller.arguments.callee.caller.arguments.callee.caller)
				return false;
				// throw new Error("The playback technology API is not ready yet. Use player.ready(myFunction)."+" ["+method+"]");
			}
		},

		play: function () {
			this.apiCall("play"); return this;
		},
		pause: function () {
			this.apiCall("pause"); return this;
		},
		paused: function () {
			return this.apiCall("paused");
		},

		currentTime: function (seconds) {
			if (seconds !== undefined) {

				// Cache the last set value for smoother scrubbing.
				this.values.lastSetCurrentTime = seconds;

				this.apiCall("setCurrentTime", seconds);

				if (this.manualTimeUpdates) {
					this.triggerEvent("timeupdate");
				}
				return this;
			}

			// Cache last currentTime and return
			return this.values.currentTime = this.apiCall("currentTime");
		},
		duration: function () {
			return this.apiCall("duration");
		},
		remainingTime: function () {
			return this.duration() - this.currentTime();
		},

		buffered: function () {
			var buffered = this.apiCall("buffered"),
					start = 0, end = this.values.bufferEnd = this.values.bufferEnd || 0,
					timeRange;

			if (buffered && buffered.length > 0 && buffered.end(0) !== end) {
				end = buffered.end(0);
				// Storing values allows them be overridden by setBufferedFromProgress
				this.values.bufferEnd = end;
			}

			return _V_.createTimeRange(start, end);
		},

		// Calculates amount of buffer is full
		bufferedPercent: function () {
			return (this.duration()) ? this.buffered().end(0) / this.duration() : 0;
		},

		volume: function (percentAsDecimal) {
			if (percentAsDecimal !== undefined) {
				var vol = Math.max(0, Math.min(1, parseFloat(percentAsDecimal))); // Force value to between 0 and 1
				this.values.volume = vol;
				this.apiCall("setVolume", vol);
				_V_.setLocalStorage("volume", vol);
				return this;
			}
			// if (this.values.volume) { return this.values.volume; }
			return this.apiCall("volume");
		},
		muted: function (muted) {
			if (muted !== undefined) {
				this.apiCall("setMuted", muted);
				return this;
			}
			return this.apiCall("muted");
		},

		width: function (width, skipListeners) {
			if (width !== undefined) {
				this.el.width = width;
				this.el.style.width = width + "px";
				if (!skipListeners) { this.triggerEvent("resize"); }
				return this;
			}
			return parseInt(this.el.getAttribute("width"));
		},
		height: function (height) {
			if (height !== undefined) {
				this.el.height = height;
				this.el.style.height = height + "px";
				this.triggerEvent("resize");
				return this;
			}
			return parseInt(this.el.getAttribute("height"));
		},
		size: function (width, height) {
			// Skip resize listeners on width for optimization
			return this.width(width, true).height(height);
		},

		supportsFullScreen: function () { return this.apiCall("supportsFullScreen"); },

		// Turn on fullscreen (or window) mode
		requestFullScreen: function () {
			var requestFullScreen = _V_.support.requestFullScreen;

			this.isFullScreen = true;

			// Check for browser element fullscreen support
			if (requestFullScreen) {

				// Flash and other plugins get reloaded when you take their parent to fullscreen.
				// To fix that we'll remove the tech, and reload it after the resize has finished.
				if (this.tech.support.fullscreenResize === false && this.options.flash.iFrameMode != true) {

					this.pause();
					this.unloadTech();

					_V_.addEvent(document, requestFullScreen.eventName, this.proxy(function () {
						_V_.removeEvent(document, requestFullScreen.eventName, arguments.callee);
						this.loadTech(this.techName, { src: this.values.src });
					}));

					this.el[requestFullScreen.requestFn]();

				} else {
					this.el[requestFullScreen.requestFn]();
				}

				// In case the user presses escape to exit fullscreen, we need to update fullscreen status
				_V_.addEvent(document, requestFullScreen.eventName, this.proxy(function () {
					this.isFullScreen = document[requestFullScreen.isFullScreen];
				}));

			} else if (this.tech.supportsFullScreen()) {
				this.apiCall("enterFullScreen");

			} else {
				this.enterFullWindow();
			}

			this.triggerEvent("fullscreenchange");

			return this;
		},

		cancelFullScreen: function () {
			var requestFullScreen = _V_.support.requestFullScreen;

			// Check for browser element fullscreen support
			if (requestFullScreen) {

				// Flash and other plugins get reloaded when you take their parent to fullscreen.
				// To fix that we'll remove the tech, and reload it after the resize has finished.
				if (this.tech.support.fullscreenResize === false && this.options.flash.iFrameMode != true) {

					this.pause();
					this.unloadTech();

					_V_.addEvent(document, requestFullScreen.eventName, this.proxy(function () {
						_V_.removeEvent(document, requestFullScreen.eventName, arguments.callee);
						this.loadTech(this.techName, { src: this.values.src })
					}));

					document[requestFullScreen.cancelFn]();

				} else {
					document[requestFullScreen.cancelFn]();
				}

			} else if (this.tech.supportsFullScreen()) {
				this.apiCall("exitFullScreen");

			} else {
				this.exitFullWindow();
			}

			this.isFullScreen = false;
			this.triggerEvent("fullscreenchange");

			return this;
		},

		enterFullWindow: function () {
			this.isFullWindow = true;

			// Storing original doc overflow value to return to when fullscreen is off
			this.docOrigOverflow = document.documentElement.style.overflow;

			// Add listener for esc key to exit fullscreen
			_V_.addEvent(document, "keydown", _V_.proxy(this, this.fullWindowOnEscKey));

			// Hide any scroll bars
			document.documentElement.style.overflow = 'hidden';

			// Apply fullscreen styles
			_V_.addClass(document.body, "vjs-full-window");
			_V_.addClass(this.el, "vjs-fullscreen");

			this.triggerEvent("enterFullWindow");
		},

		fullWindowOnEscKey: function (event) {
			if (event.keyCode == 27) {
				if (this.isFullScreen == true) {
					this.cancelFullScreen();
				} else {
					this.exitFullWindow();
				}
			}
		},

		exitFullWindow: function () {
			this.isFullWindow = false;
			_V_.removeEvent(document, "keydown", this.fullWindowOnEscKey);

			// Unhide scroll bars.
			document.documentElement.style.overflow = this.docOrigOverflow;

			// Remove fullscreen styles
			_V_.removeClass(document.body, "vjs-full-window");
			_V_.removeClass(this.el, "vjs-fullscreen");

			// Resize the box, controller, and poster to original sizes
			// this.positionAll();
			this.triggerEvent("exitFullWindow");
		},

		// src is a pretty powerful function
		// If you pass it an array of source objects, it will find the best source to play and use that object.src
		//   If the new source requires a new playback technology, it will switch to that.
		// If you pass it an object, it will set the source to object.src
		// If you pass it anything else (url string) it will set the video source to that
		src: function (source) {
			// Case: Array of source objects to choose from and pick the best to play
			if (source instanceof Array) {

				var sources = source;

				techLoop: // Named loop for breaking both loops
				// Loop through each playback technology in the options order
					for (var i = 0, j = this.options.techOrder; i < j.length; i++) {
						var techName = j[i],
								tech = _V_[techName];
						// tech = _V_.tech[techName];

						// Check if the browser supports this technology
						if (tech.isSupported()) {

							// Loop through each source object
							for (var a = 0, b = sources; a < b.length; a++) {
								var source = b[a];

								// Check if source can be played with this technology
								if (tech.canPlaySource.call(this, source)) {

									// If this technology is already loaded, set source
									if (techName == this.techName) {
										this.src(source); // Passing the source object

										// Otherwise load this technology with chosen source
									} else {
										this.loadTech(techName, source);
									}

									break techLoop; // Break both loops
								}
							}
						}
					}

				// Case: Source object { src: "", type: "" ... }
			} else if (source instanceof Object) {
				if (_V_[this.techName].canPlaySource(source)) {
					this.src(source.src);
				} else {
					// Send through tech loop to check for a compatible technology.
					this.src([source]);
				}
				// Case: URL String (http://myvideo...)
			} else {
				// Cache for getting last set source
				this.values.src = source;

				if (!this.isReady) {
					this.ready(function () {
						this.src(source);
					});
				} else {
					this.apiCall("src", source);
					if (this.options.preload == "auto") {
						this.load();
					}
					if (this.options.autoplay) {
						this.play();
					}
				}
			}
			return this;
		},

		// Begin loading the src data
		load: function () {
			this.apiCall("load");
			return this;
		},
		currentSrc: function () {
			return this.apiCall("currentSrc");
		},

		textTrackValue: function (kind, value) {
			if (value !== undefined) {
				this.values[kind] = value;
				this.triggerEvent(kind + "update");
				return this;
			}
			return this.values[kind];
		},

		// Attributes/Options
		preload: function (value) {
			if (value !== undefined) {
				this.apiCall("setPreload", value);
				this.options.preload = value;
				return this;
			}
			return this.apiCall("preload", value);
		},
		autoplay: function (value) {
			if (value !== undefined) {
				this.apiCall("setAutoplay", value);
				this.options.autoplay = value;
				return this;
			}
			return this.apiCall("autoplay", value);
		},
		loop: function (value) {
			if (value !== undefined) {
				this.apiCall("setLoop", value);
				this.options.loop = value;
				return this;
			}
			return this.apiCall("loop", value);
		},

		controls: function () { return this.options.controls; },
		textTracks: function () { return this.options.tracks; },
		poster: function () { return this.apiCall("poster"); },

		error: function () { return this.apiCall("error"); },
		networkState: function () { return this.apiCall("networkState"); },
		readyState: function () { return this.apiCall("readyState"); },
		seeking: function () { return this.apiCall("seeking"); },
		initialTime: function () { return this.apiCall("initialTime"); },
		startOffsetTime: function () { return this.apiCall("startOffsetTime"); },
		played: function () { return this.apiCall("played"); },
		seekable: function () { return this.apiCall("seekable"); },
		ended: function () { return this.apiCall("ended"); },
		videoTracks: function () { return this.apiCall("videoTracks"); },
		audioTracks: function () { return this.apiCall("audioTracks"); },
		videoWidth: function () { return this.apiCall("videoWidth"); },
		videoHeight: function () { return this.apiCall("videoHeight"); },
		defaultPlaybackRate: function () { return this.apiCall("defaultPlaybackRate"); },
		playbackRate: function () { return this.apiCall("playbackRate"); },
		// mediaGroup: function(){ return this.apiCall("mediaGroup"); },
		// controller: function(){ return this.apiCall("controller"); },
		controls: function () { return this.apiCall("controls"); },
		defaultMuted: function () { return this.apiCall("defaultMuted"); }
	});

	// RequestFullscreen API
	(function () {
		var requestFn,
				cancelFn,
				eventName,
				isFullScreen,
				playerProto = _V_.Player.prototype;

		// Current W3C Spec
		// http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html#api
		// Mozilla Draft: https://wiki.mozilla.org/Gecko:FullScreenAPI#fullscreenchange_event
		if (document.cancelFullscreen !== undefined) {
			requestFn = "requestFullscreen";
			cancelFn = "exitFullscreen";
			eventName = "fullscreenchange";
			isFullScreen = "fullScreen";

			// Webkit (Chrome/Safari) and Mozilla (Firefox) have working implementaitons
			// that use prefixes and vary slightly from the new W3C spec. Specifically, using 'exit' instead of 'cancel',
			// and lowercasing the 'S' in Fullscreen.
			// Other browsers don't have any hints of which version they might follow yet, so not going to try to predict by loopeing through all prefixes.
		} else {

			_V_.each(["moz", "webkit"], function (prefix) {

				// https://github.com/zencoder/video-js/pull/128
				if ((prefix != "moz" || document.mozFullScreenEnabled) && document[prefix + "CancelFullScreen"] !== undefined) {
					requestFn = prefix + "RequestFullScreen";
					cancelFn = prefix + "CancelFullScreen";
					eventName = prefix + "fullscreenchange";

					if (prefix == "webkit") {
						isFullScreen = prefix + "IsFullScreen";
					} else {
						_V_.log("moz here")
						isFullScreen = prefix + "FullScreen";
					}
				}

			});

		}

		if (requestFn) {
			_V_.support.requestFullScreen = {
				requestFn: requestFn,
				cancelFn: cancelFn,
				eventName: eventName,
				isFullScreen: isFullScreen
			};
		}

	})();/* Playback Technology - Base class for playback technologies
================================================================================ */
	_V_.PlaybackTech = _V_.Component.extend({
		init: function (player, options) {
			// this._super(player, options);

			// Make playback element clickable
			// _V_.addEvent(this.el, "click", _V_.proxy(this, _V_.PlayToggle.prototype.onClick));

			// this.addEvent("click", this.proxy(this.onClick));

			// player.triggerEvent("techready");
		},
		// destroy: function(){},
		// createElement: function(){},
		onClick: function () {
			if (this.player.options.controls) {
				_V_.PlayToggle.prototype.onClick.call(this);
			}
		}
	});

	// Create placeholder methods for each that warn when a method isn't supported by the current playback technology
	_V_.apiMethods = "play,pause,paused,currentTime,setCurrentTime,duration,buffered,volume,setVolume,muted,setMuted,width,height,supportsFullScreen,enterFullScreen,src,load,currentSrc,preload,setPreload,autoplay,setAutoplay,loop,setLoop,error,networkState,readyState,seeking,initialTime,startOffsetTime,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks,defaultPlaybackRate,playbackRate,mediaGroup,controller,controls,defaultMuted".split(",");
	_V_.each(_V_.apiMethods, function (methodName) {
		_V_.PlaybackTech.prototype[methodName] = function () {
			throw new Error("The '" + method + "' method is not available on the playback technology's API");
		}
	});

	/* HTML5 Playback Technology - Wrapper for HTML5 Media API
	================================================================================ */
	_V_.html5 = _V_.PlaybackTech.extend({

		init: function (player, options, ready) {
			this.player = player;
			this.el = this.createElement();
			this.ready(ready);

			this.addEvent("click", this.proxy(this.onClick));

			var source = options.source;

			// If the element source is already set, we may have missed the loadstart event, and want to trigger it.
			// We don't want to set the source again and interrupt playback.
			if (source && this.el.currentSrc == source.src) {
				player.triggerEvent("loadstart");

				// Otherwise set the source if one was provided.
			} else if (source) {
				this.el.src = source.src;
			}

			// Chrome and Safari both have issues with autoplay.
			// In Safari (5.1.1), when we move the video element into the container div, autoplay doesn't work.
			// In Chrome (15), if you have autoplay + a poster + no controls, the video gets hidden (but audio plays)
			// This fixes both issues. Need to wait for API, so it updates displays correctly
			player.ready(function () {
				if (this.options.autoplay && this.paused()) {
					this.tag.poster = null; // Chrome Fix. Fixed in Chrome v16.
					this.play();
				}
			});

			this.setupTriggers();

			this.triggerReady();
		},

		destroy: function () {
			this.player.tag = false;
			this.removeTriggers();
			this.el.parentNode.removeChild(this.el);
		},

		createElement: function () {
			var html5 = _V_.html5,
					player = this.player,

					// If possible, reuse original tag for HTML5 playback technology element
					el = player.tag,
					newEl;

			// Check if this browser supports moving the element into the box.
			// On the iPhone video will break if you move the element,
			// So we have to create a brand new element.
			if (!el || this.support.movingElementInDOM === false) {

				// If the original tag is still there, remove it.
				if (el) {
					player.el.removeChild(el);
				}

				newEl = _V_.createElement("video", {
					id: el.id || player.el.id + "_html5_api",
					className: el.className || "vjs-tech"
				});

				el = newEl;
				_V_.insertFirst(el, player.el);
			}

			// Update tag settings, in case they were overridden
			_V_.each(["autoplay", "preload", "loop", "muted"], function (attr) { // ,"poster"
				el[attr] = player.options[attr];
			}, this);

			return el;
		},

		// Make video events trigger player events
		// May seem verbose here, but makes other APIs possible.
		setupTriggers: function () {
			_V_.each.call(this, _V_.html5.events, function (type) {
				_V_.addEvent(this.el, type, _V_.proxy(this.player, this.eventHandler));
			});
		},
		removeTriggers: function () {
			_V_.each.call(this, _V_.html5.events, function (type) {
				_V_.removeEvent(this.el, type, _V_.proxy(this.player, this.eventHandler));
			});
		},
		eventHandler: function (e) {
			e.stopPropagation();
			this.triggerEvent(e);
		},

		play: function () { this.el.play(); },
		pause: function () { this.el.pause(); },
		paused: function () { return this.el.paused; },

		currentTime: function () { return this.el.currentTime; },
		setCurrentTime: function (seconds) {
			try {
				this.el.currentTime = seconds;
			} catch (e) {
				_V_.log(e, "Video isn't ready. (VideoJS)");
				// this.warning(VideoJS.warnings.videoNotReady);
			}
		},

		duration: function () { return this.el.duration || 0; },
		buffered: function () { return this.el.buffered; },

		volume: function () { return this.el.volume; },
		setVolume: function (percentAsDecimal) { this.el.volume = percentAsDecimal; },
		muted: function () { return this.el.muted; },
		setMuted: function (muted) { this.el.muted = muted },

		width: function () { return this.el.offsetWidth; },
		height: function () { return this.el.offsetHeight; },

		supportsFullScreen: function () {
			if (typeof this.el.webkitEnterFullScreen == 'function') {

				// Seems to be broken in Chromium/Chrome && Safari in Leopard
				if (!navigator.userAgent.match("Chrome") && !navigator.userAgent.match("Mac OS X 10.5")) {
					return true;
				}
			}
			return false;
		},

		enterFullScreen: function () {
			try {
				this.el.webkitEnterFullScreen();
			} catch (e) {
				if (e.code == 11) {
					// this.warning(VideoJS.warnings.videoNotReady);
					_V_.log("VideoJS: Video not ready.")
				}
			}
		},
		src: function (src) { this.el.src = src; },
		load: function () { this.el.load(); },
		currentSrc: function () { return this.el.currentSrc; },

		preload: function () { return this.el.preload; },
		setPreload: function (val) { this.el.preload = val; },
		autoplay: function () { return this.el.autoplay; },
		setAutoplay: function (val) { this.el.autoplay = val; },
		loop: function () { return this.el.loop; },
		setLoop: function (val) { this.el.loop = val; },

		error: function () { return this.el.error; },
		// networkState: function(){ return this.el.networkState; },
		// readyState: function(){ return this.el.readyState; },
		seeking: function () { return this.el.seeking; },
		// initialTime: function(){ return this.el.initialTime; },
		// startOffsetTime: function(){ return this.el.startOffsetTime; },
		// played: function(){ return this.el.played; },
		// seekable: function(){ return this.el.seekable; },
		ended: function () { return this.el.ended; },
		// videoTracks: function(){ return this.el.videoTracks; },
		// audioTracks: function(){ return this.el.audioTracks; },
		// videoWidth: function(){ return this.el.videoWidth; },
		// videoHeight: function(){ return this.el.videoHeight; },
		// textTracks: function(){ return this.el.textTracks; },
		// defaultPlaybackRate: function(){ return this.el.defaultPlaybackRate; },
		// playbackRate: function(){ return this.el.playbackRate; },
		// mediaGroup: function(){ return this.el.mediaGroup; },
		// controller: function(){ return this.el.controller; },
		controls: function () { return this.player.options.controls; },
		defaultMuted: function () { return this.el.defaultMuted; }
	});

	/* HTML5 Support Testing -------------------------------------------------------- */

	_V_.html5.isSupported = function () {
		return !!document.createElement("video").canPlayType;
	};

	_V_.html5.canPlaySource = function (srcObj) {
		return !!document.createElement("video").canPlayType(srcObj.type);
		// TODO: Check Type
		// If no Type, check ext
		// Check Media Type
	};

	// List of all HTML5 events (various uses).
	_V_.html5.events = "loadstart,suspend,abort,error,emptied,stalled,loadedmetadata,loadeddata,canplay,canplaythrough,playing,waiting,seeking,seeked,ended,durationchange,timeupdate,progress,play,pause,ratechange,volumechange".split(",");

	/* HTML5 Device Fixes ---------------------------------------------------------- */

	_V_.html5.prototype.support = {

		// Support for tech specific full screen. (webkitEnterFullScreen, not requestFullscreen)
		// http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLVideoElementClassReference/HTMLVideoElement/HTMLVideoElement.html
		// Seems to be broken in Chromium/Chrome && Safari in Leopard
		fullscreen: (typeof _V_.testVid.webkitEnterFullScreen !== undefined) ? (!_V_.ua.match("Chrome") && !_V_.ua.match("Mac OS X 10.5") ? true : false) : false,

		// In iOS, if you move a video element in the DOM, it breaks video playback.
		movingElementInDOM: !_V_.isIOS()

	};

	// Android
	if (_V_.isAndroid()) {

		// Override Android 2.2 and less canPlayType method which is broken
		if (_V_.androidVersion() < 3) {
			document.createElement("video").constructor.prototype.canPlayType = function (type) {
				return (type && type.toLowerCase().indexOf("video/mp4") != -1) ? "maybe" : "";
			};
		}
	}


	/* VideoJS-SWF - Custom Flash Player with HTML5-ish API - https://github.com/zencoder/video-js-swf
	================================================================================ */
	_V_.flash = _V_.PlaybackTech.extend({

		init: function (player, options) {
			this.player = player;

			var source = options.source,

					// Which element to embed in
					parentEl = options.parentEl,

					// Create a temporary element to be replaced by swf object
					placeHolder = this.el = _V_.createElement("div", { id: parentEl.id + "_temp_flash" }),

					// Generate ID for swf object
					objId = player.el.id + "_flash_api",

					// Store player options in local var for optimization
					playerOptions = player.options,

					// Merge default flashvars with ones passed in to init
					flashVars = _V_.merge({

						// SWF Callback Functions
						readyFunction: "_V_.flash.onReady",
						eventProxyFunction: "_V_.flash.onEvent",
						errorEventProxyFunction: "_V_.flash.onError",

						// Player Settings
						autoplay: playerOptions.autoplay,
						preload: playerOptions.preload,
						loop: playerOptions.loop,
						muted: playerOptions.muted

					}, options.flashVars),

					// Merge default parames with ones passed in
					params = _V_.merge({
						wmode: "opaque", // Opaque is needed to overlay controls, but can affect playback performance
						bgcolor: "#000000" // Using bgcolor prevents a white flash when the object is loading
					}, options.params),

					// Merge default attributes with ones passed in
					attributes = _V_.merge({
						id: objId,
						name: objId, // Both ID and Name needed or swf to identifty itself
						'class': 'vjs-tech'
					}, options.attributes)
			;

			// If source was supplied pass as a flash var.
			if (source) {
				flashVars.src = encodeURIComponent(source.src);
			}

			// Add placeholder to player div
			_V_.insertFirst(placeHolder, parentEl);

			// Having issues with Flash reloading on certain page actions (hide/resize/fullscreen) in certain browsers
			// This allows resetting the playhead when we catch the reload
			if (options.startTime) {
				this.ready(function () {
					this.load();
					this.play();
					this.currentTime(options.startTime);
				});
			}

			// Flash iFrame Mode
			// In web browsers there are multiple instances where changing the parent element or visibility of a plugin causes the plugin to reload.
			// - Firefox just about always. https://bugzilla.mozilla.org/show_bug.cgi?id=90268 (might be fixed by version 13)
			// - Webkit when hiding the plugin
			// - Webkit and Firefox when using requestFullScreen on a parent element
			// Loading the flash plugin into a dynamically generated iFrame gets around most of these issues.
			// Issues that remain include hiding the element and requestFullScreen in Firefox specifically

			// There's on particularly annoying issue with this method which is that Firefox throws a security error on an offsite Flash object loaded into a dynamically created iFrame.
			// Even though the iframe was inserted into a page on the web, Firefox + Flash considers it a local app trying to access an internet file.
			// I tried mulitple ways of setting the iframe src attribute but couldn't find a src that worked well. Tried a real/fake source, in/out of domain.
			// Also tried a method from stackoverflow that caused a security error in all browsers. http://stackoverflow.com/questions/2486901/how-to-set-document-domain-for-a-dynamically-generated-iframe
			// In the end the solution I found to work was setting the iframe window.location.href right before doing a document.write of the Flash object.
			// The only downside of this it seems to trigger another http request to the original page (no matter what's put in the href). Not sure why that is.

			// NOTE (2012-01-29): Cannot get Firefox to load the remote hosted SWF into a dynamically created iFrame
			// Firefox 9 throws a security error, unleess you call location.href right before doc.write.
			//    Not sure why that even works, but it causes the browser to look like it's continuously trying to load the page.
			// Firefox 3.6 keeps calling the iframe onload function anytime I write to it, causing an endless loop.

			if (options.iFrameMode == true && !_V_.isFF) {

				// Create iFrame with vjs-tech class so it's 100% width/height
				var iFrm = _V_.createElement("iframe", {
					id: objId + "_iframe",
					name: objId + "_iframe",
					className: "vjs-tech",
					scrolling: "no",
					marginWidth: 0,
					marginHeight: 0,
					frameBorder: 0
				});

				// Update ready function names in flash vars for iframe window
				flashVars.readyFunction = "ready";
				flashVars.eventProxyFunction = "events";
				flashVars.errorEventProxyFunction = "errors";

				// Tried multiple methods to get this to work in all browsers

				// Tried embedding the flash object in the page first, and then adding a place holder to the iframe, then replacing the placeholder with the page object.
				// The goal here was to try to load the swf URL in the parent page first and hope that got around the firefox security error
				// var newObj = _V_.flash.embed(options.swf, placeHolder, flashVars, params, attributes);
				// (in onload)
				//  var temp = _V_.createElement("a", { id:"asdf", innerHTML: "asdf" } );
				//  iDoc.body.appendChild(temp);

				// Tried embedding the flash object through javascript in the iframe source.
				// This works in webkit but still triggers the firefox security error
				// iFrm.src = "javascript: document.write('"+_V_.flash.getEmbedCode(options.swf, flashVars, params, attributes)+"');";

				// Tried an actual local iframe just to make sure that works, but it kills the easiness of the CDN version if you require the user to host an iframe
				// We should add an option to host the iframe locally though, because it could help a lot of issues.
				// iFrm.src = "iframe.html";

				// Wait until iFrame has loaded to write into it.
				_V_.addEvent(iFrm, "load", _V_.proxy(this, function () {

					var iDoc, objTag, swfLoc,
							iWin = iFrm.contentWindow,
							varString = "";


					// The one working method I found was to use the iframe's document.write() to create the swf object
					// This got around the security issue in all browsers except firefox.
					// I did find a hack where if I call the iframe's window.location.href="", it would get around the security error
					// However, the main page would look like it was loading indefinitely (URL bar loading spinner would never stop)
					// Plus Firefox 3.6 didn't work no matter what I tried.
					// if (_V_.ua.match("Firefox")) {
					//   iWin.location.href = "";
					// }

					// Get the iFrame's document depending on what the browser supports
					iDoc = iFrm.contentDocument ? iFrm.contentDocument : iFrm.contentWindow.document;

					// Tried ensuring both document domains were the same, but they already were, so that wasn't the issue.
					// Even tried adding /. that was mentioned in a browser security writeup
					// document.domain = document.domain+"/.";
					// iDoc.domain = document.domain+"/.";

					// Tried adding the object to the iframe doc's innerHTML. Security error in all browsers.
					// iDoc.body.innerHTML = swfObjectHTML;

					// Tried appending the object to the iframe doc's body. Security error in all browsers.
					// iDoc.body.appendChild(swfObject);

					// Using document.write actually got around the security error that browsers were throwing.
					// Again, it's a dynamically generated (same domain) iframe, loading an external Flash swf.
					// Not sure why that's a security issue, but apparently it is.
					iDoc.write(_V_.flash.getEmbedCode(options.swf, flashVars, params, attributes));

					// Setting variables on the window needs to come after the doc write because otherwise they can get reset in some browsers
					// So far no issues with swf ready event being called before it's set on the window.
					iWin.player = this.player;

					// Create swf ready function for iFrame window
					iWin.ready = _V_.proxy(this.player, function (currSwf) {
						var el = iDoc.getElementById(currSwf),
								player = this,
								tech = player.tech;

						// Update reference to playback technology element
						tech.el = el;

						// Now that the element is ready, make a click on the swf play the video
						_V_.addEvent(el, "click", tech.proxy(tech.onClick));

						// Make sure swf is actually ready. Sometimes the API isn't actually yet.
						_V_.flash.checkReady(tech);
					});

					// Create event listener for all swf events
					iWin.events = _V_.proxy(this.player, function (swfID, eventName, other) {
						var player = this;
						if (player && player.techName == "flash") {
							player.triggerEvent(eventName);
						}
					});

					// Create error listener for all swf errors
					iWin.errors = _V_.proxy(this.player, function (swfID, eventName) {
						_V_.log("Flash Error", eventName);
					});

				}));

				// Replace placeholder with iFrame (it will load now)
				placeHolder.parentNode.replaceChild(iFrm, placeHolder);

				// If not using iFrame mode, embed as normal object
			} else {
				_V_.flash.embed(options.swf, placeHolder, flashVars, params, attributes);
			}
		},

		destroy: function () {
			this.el.parentNode.removeChild(this.el);
		},

		// setupTriggers: function(){}, // Using global onEvent func to distribute events

		play: function () { this.el.vjs_play(); },
		pause: function () { this.el.vjs_pause(); },
		src: function (src) {
			this.el.vjs_src(src);

			// Currently the SWF doesn't autoplay if you load a source later.
			// e.g. Load player w/ no source, wait 2s, set src.
			if (this.player.autoplay) {
				var tech = this;
				setTimeout(function () { tech.play(); }, 0);
			}
		},
		load: function () { this.el.vjs_load(); },
		poster: function () { this.el.vjs_getProperty("poster"); },

		buffered: function () {
			return _V_.createTimeRange(0, this.el.vjs_getProperty("buffered"));
		},

		supportsFullScreen: function () {
			return false; // Flash does not allow fullscreen through javascript
		},
		enterFullScreen: function () {
			return false;
		}
	});

	// Create setters and getters for attributes
	(function () {

		var api = _V_.flash.prototype,
				readWrite = "preload,currentTime,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),
				readOnly = "error,currentSrc,networkState,readyState,seeking,initialTime,duration,startOffsetTime,paused,played,seekable,ended,videoTracks,audioTracks,videoWidth,videoHeight,textTracks".split(","),
				callOnly = "load,play,pause".split(",");
		// Overridden: buffered

		createSetter = function (attr) {
			var attrUpper = attr.charAt(0).toUpperCase() + attr.slice(1);
			api["set" + attrUpper] = function (val) { return this.el.vjs_setProperty(attr, val); };
		},

		createGetter = function (attr) {
			api[attr] = function () { return this.el.vjs_getProperty(attr); };
		}
		;

		// Create getter and setters for all read/write attributes
		_V_.each(readWrite, function (attr) {
			createGetter(attr);
			createSetter(attr);
		});

		// Create getters for read-only attributes
		_V_.each(readOnly, function (attr) {
			createGetter(attr);
		});

	})();

	/* Flash Support Testing -------------------------------------------------------- */

	_V_.flash.isSupported = function () {
		return _V_.flash.version()[0] >= 10;
		// return swfobject.hasFlashPlayerVersion("10");
	};

	_V_.flash.canPlaySource = function (srcObj) {
		if (srcObj.type in _V_.flash.prototype.support.formats) { return "maybe"; }
	};

	_V_.flash.prototype.support = {
		formats: {
			"video/flv": "FLV",
			"video/x-flv": "FLV",
			"video/mp4": "MP4",
			"video/m4v": "MP4"
		},

		// Optional events that we can manually mimic with timers
		progressEvent: false,
		timeupdateEvent: false,

		// Resizing plugins using request fullscreen reloads the plugin
		fullscreenResize: false,

		// Resizing plugins in Firefox always reloads the plugin (e.g. full window mode)
		parentResize: !(_V_.ua.match("Firefox"))
	};

	_V_.flash.onReady = function (currSwf) {

		var el = _V_.el(currSwf);

		// Get player from box
		// On firefox reloads, el might already have a player
		var player = el.player || el.parentNode.player,
				tech = player.tech;

		// Reference player on tech element
		el.player = player;

		// Update reference to playback technology element
		tech.el = el;

		// Now that the element is ready, make a click on the swf play the video
		tech.addEvent("click", tech.onClick);

		_V_.flash.checkReady(tech);
	};

	// The SWF isn't alwasy ready when it says it is. Sometimes the API functions still need to be added to the object.
	// If it's not ready, we set a timeout to check again shortly.
	_V_.flash.checkReady = function (tech) {

		// Check if API property exists
		if (tech.el.vjs_getProperty) {

			// If so, tell tech it's ready
			tech.triggerReady();

			// Otherwise wait longer.
		} else {

			setTimeout(function () {
				_V_.flash.checkReady(tech);
			}, 50);

		}
	};

	// Trigger events from the swf on the player
	_V_.flash.onEvent = function (swfID, eventName) {
		var player = _V_.el(swfID).player;
		player.triggerEvent(eventName);
	};

	// Log errors from the swf
	_V_.flash.onError = function (swfID, err) {
		_V_.log("Flash Error", err, swfID);
	};

	// Flash Version Check
	_V_.flash.version = function () {
		var version = '0,0,0'

		// IE
		try {
			version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];

			// other browsers
		} catch (e) {
			try {
				if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
					version = (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
				}
			} catch (e) { }
		}
		return version.split(",");
	}

	// Flash embedding method. Only used in non-iframe mode
	_V_.flash.embed = function (swf, placeHolder, flashVars, params, attributes) {
		var code = _V_.flash.getEmbedCode(swf, flashVars, params, attributes),

				// Get element by embedding code and retrieving created element
				obj = _V_.createElement("div", { innerHTML: code }).childNodes[0],

				par = placeHolder.parentNode
		;

		placeHolder.parentNode.replaceChild(obj, placeHolder);

		// IE6 seems to have an issue where it won't initialize the swf object after injecting it.
		// This is a dumb temporary fix
		if (_V_.isIE()) {
			var newObj = par.childNodes[0];
			setTimeout(function () {
				newObj.style.display = "block";
			}, 1000);
		}

		return obj;

	};

	_V_.flash.getEmbedCode = function (swf, flashVars, params, attributes) {

		var objTag = '<object type="application/x-shockwave-flash"',
				flashVarsString = '',
				paramsString = ''
		attrsString = '';

		// Convert flash vars to string
		if (flashVars) {
			_V_.eachProp(flashVars, function (key, val) {
				flashVarsString += (key + "=" + val + "&amp;");
			});
		}

		// Add swf, flashVars, and other default params
		params = _V_.merge({
			movie: swf,
			flashvars: flashVarsString,
			allowScriptAccess: "always", // Required to talk to swf
			allowNetworking: "all" // All should be default, but having security issues.
		}, params);

		// Create param tags string
		_V_.eachProp(params, function (key, val) {
			paramsString += '<param name="' + key + '" value="' + val + '" />';
		});

		attributes = _V_.merge({
			// Add swf to attributes (need both for IE and Others to work)
			data: swf,

			// Default to 100% width/height
			width: "100%",
			height: "100%"

		}, attributes);

		// Create Attributes string
		_V_.eachProp(attributes, function (key, val) {
			attrsString += (key + '="' + val + '" ');
		});

		return objTag + attrsString + '>' + paramsString + '</object>';
	}
	_V_.Track = function (attributes, player) {
		// Store reference to the parent player
		this.player = player;

		this.src = attributes.src;
		this.kind = attributes.kind;
		this.srclang = attributes.srclang;
		this.label = attributes.label;
		this["default"] = attributes["default"]; // 'default' is reserved-ish
		this.title = attributes.title;

		this.cues = [];
		this.currentCue = false;
		this.lastCueIndex = 0;

		// Update current cue on timeupdate
		player.addEvent("timeupdate", _V_.proxy(this, this.update));

		// Reset cue time on media end
		player.addEvent("ended", _V_.proxy(this, function () { this.lastCueIndex = 0; }));

		// Load Track File
		_V_.get(attributes.src, _V_.proxy(this, this.parseCues));
	};

	_V_.Track.prototype = {

		parseCues: function (srcContent) {
			var cue, time, text,
					lines = srcContent.split("\n"),
					line = "";

			for (var i = 0; i < lines.length; i++) {
				line = _V_.trim(lines[i]); // Trim whitespace and linebreaks
				if (line) { // Loop until a line with content

					// First line - Number
					cue = {
						id: line, // Cue Number
						index: this.cues.length // Position in Array
					};

					// Second line - Time
					line = _V_.trim(lines[++i]);
					time = line.split(" --> ");
					cue.startTime = this.parseCueTime(time[0]);
					cue.endTime = this.parseCueTime(time[1]);

					// Additional lines - Cue Text
					text = [];
					for (var j = i; j < lines.length; j++) { // Loop until a blank line or end of lines
						line = _V_.trim(lines[++i]);
						if (!line) { break; }
						text.push(line);
					}
					cue.text = text.join('<br/>');

					// Add this cue
					this.cues.push(cue);
				}
			}
		},

		parseCueTime: function (timeText) {
			var parts = timeText.split(':'),
					time = 0;
			// hours => seconds
			time += parseFloat(parts[0]) * 60 * 60;
			// minutes => seconds
			time += parseFloat(parts[1]) * 60;
			// get seconds
			var seconds = parts[2].split(/\.|,/); // Either . or ,
			time += parseFloat(seconds[0]);
			// add miliseconds
			ms = parseFloat(seconds[1]);
			if (ms) { time += ms / 1000; }
			return time;
		},

		update: function () {
			// Assuming all cues are in order by time, and do not overlap
			if (this.cues && this.cues.length > 0) {
				var time = this.player.currentTime();
				// If current cue should stay showing, don't do anything. Otherwise, find new cue.
				if (!this.currentCue || this.currentCue.startTime >= time || this.currentCue.endTime < time) {
					var newSubIndex = false,
						// Loop in reverse if lastCue is after current time (optimization)
						// Meaning the user is scrubbing in reverse or rewinding
						reverse = (this.cues[this.lastCueIndex].startTime > time),
						// If reverse, step back 1 becase we know it's not the lastCue
						i = this.lastCueIndex - (reverse ? 1 : 0);
					while (true) { // Loop until broken
						if (reverse) { // Looping in reverse
							// Stop if no more, or this cue ends before the current time (no earlier cues should apply)
							if (i < 0 || this.cues[i].endTime < time) { break; }
							// End is greater than time, so if start is less, show this cue
							if (this.cues[i].startTime < time) {
								newSubIndex = i;
								break;
							}
							i--;
						} else { // Looping forward
							// Stop if no more, or this cue starts after time (no later cues should apply)
							if (i >= this.cues.length || this.cues[i].startTime > time) { break; }
							// Start is less than time, so if end is later, show this cue
							if (this.cues[i].endTime > time) {
								newSubIndex = i;
								break;
							}
							i++;
						}
					}

					// Set or clear current cue
					if (newSubIndex !== false) {
						this.currentCue = this.cues[newSubIndex];
						this.lastCueIndex = newSubIndex;
						this.updatePlayer(this.currentCue.text);
					} else if (this.currentCue) {
						this.currentCue = false;
						this.updatePlayer("");
					}
				}
			}
		},

		// Update the stored value for the current track kind
		// and trigger an event to update all text track displays.
		updatePlayer: function (text) {
			this.player.textTrackValue(this.kind, text);
		}
	};
	_V_.addEvent(window, "load", function () {
		_V_.windowLoaded = true;
	});

	// Run Auto-load players
	_V_.autoSetup();
	// Expose to global
	window.VideoJS = window._V_ = VideoJS;

	// End self-executing function
})(window);

var bVidLaunched = false;
function triggerSDC() {
	if (!bVidLaunched) {
		var sMti = "TITLE: " + mti;
		var sMtid = "TYPE: " + mtid;
		var sMSpeed = "SPEED: 1200";
		var sBwd = "BWD: MANUAL"
		var sPartner = pid;
		var sPartner = "PARTNER: " + sPartner.toUpperCase();
		dcsMultiTrack('DCS.dcsuri', '/player/default.asp', 'WT.ti', escape(fti), 'WT.cg_n', escape(fti), 'WT.cg_s', escape(sMti) + ";" + sMtid + ";" + sMSpeed + ";" + sBwd + ";" + sPartner, 'WT.sv', pid.toUpperCase());
		bVidLaunched = true;
	}
}
function triggerEnd() {
	bVidLaunched = false;
}


// START OF SDC Advanced Tracking Code
var gService = false;
var gTimeZone = 0;
// Code section for Enable First-Party Cookie Tracking
function dcsCookie() {
	if (typeof (dcsOther) == "function") {
		dcsOther();
	}
	else if (typeof (dcsPlugin) == "function") {
		dcsPlugin();
	}
	else if (typeof (dcsFPC) == "function") {
		dcsFPC(gTimeZone);
	}
}
function dcsGetCookie(name) {
	var pos = document.cookie.indexOf(name + "=");
	if (pos != -1) {
		var start = pos + name.length + 1;
		var end = document.cookie.indexOf(";", start);
		if (end == -1) {
			end = document.cookie.length;
		}
		return unescape(document.cookie.substring(start, end));
	}
	return null;
}
function dcsGetCrumb(name, crumb) {
	var aCookie = dcsGetCookie(name).split(":");
	for (var i = 0; i < aCookie.length; i++) {
		var aCrumb = aCookie[i].split("=");
		if (crumb == aCrumb[0]) {
			return aCrumb[1];
		}
	}
	return null;
}
function dcsGetIdCrumb(name, crumb) {
    var cookie = dcsGetCookie(name);
    if (cookie == null) {
        return null;
    }
    else {
        var id = cookie.substring(0, cookie.indexOf(":lv="));
        var aCrumb = id.split("=");
        for (var i = 0; i < aCrumb.length; i++) {
            if (crumb == aCrumb[0]) {
                return aCrumb[1];
            }
        }

    }
    return null;
}
function dcsIsFpcSet(name, id, lv, ss) {
	if (id == dcsGetIdCrumb(name, "id")) {
		if (lv == dcsGetCrumb(name, "lv")) {
			if (ss = dcsGetCrumb(name, "ss")) {
				return true;
			}
		}
	}
	return false;
}
function dcsFPC(offset) {
	if (typeof (offset) == "undefined") {
		return;
	}
	if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
		return;
	}
	var name = gFpc;
	var dCur = new Date();
	var adj = (dCur.getTimezoneOffset() * 60000) + (offset * 3600000);
	dCur.setTime(dCur.getTime() + adj);
	var dExp = new Date(dCur.getTime() + 315360000000);
	var dSes = new Date(dCur.getTime());
	WT.co_f = WT.vt_sid = WT.vt_f = WT.vt_f_a = WT.vt_f_s = WT.vt_f_d = WT.vt_f_tlh = WT.vt_f_tlv = "";
	if (document.cookie.indexOf(name + "=") == -1) {
		if ((typeof (gWtId) != "undefined") && (gWtId != "")) {
			WT.co_f = gWtId;
		}
		else if ((typeof (gTempWtId) != "undefined") && (gTempWtId != "")) {
			WT.co_f = gTempWtId;
			WT.vt_f = "1";
		}
		else {
			WT.co_f = "2";
			var cur = dCur.getTime().toString();
			for (var i = 2; i <= (32 - cur.length) ; i++) {
				WT.co_f += Math.floor(Math.random() * 16.0).toString(16);
			}
			WT.co_f += cur;
			WT.vt_f = "1";
		}
		if (typeof (gWtAccountRollup) == "undefined") {
			WT.vt_f_a = "1";
		}
		WT.vt_f_s = WT.vt_f_d = "1";
		WT.vt_f_tlh = WT.vt_f_tlv = "0";
	}
	else {
		var id = dcsGetIdCrumb(name, "id");
		var lv = parseInt(dcsGetCrumb(name, "lv"));
		var ss = parseInt(dcsGetCrumb(name, "ss"));
		if ((id == null) || (id == "null") || isNaN(lv) || isNaN(ss)) {
			return;
		}
		WT.co_f = id;
		var dLst = new Date(lv);
		WT.vt_f_tlh = Math.floor((dLst.getTime() - adj) / 1000);
		dSes.setTime(ss);
		if ((dCur.getTime() > (dLst.getTime() + 1800000)) || (dCur.getTime() > (dSes.getTime() + 28800000))) {
			WT.vt_f_tlv = Math.floor((dSes.getTime() - adj) / 1000);
			dSes.setTime(dCur.getTime());
			WT.vt_f_s = "1";
		}
		if ((dCur.getDay() != dLst.getDay()) || (dCur.getMonth() != dLst.getMonth()) || (dCur.getYear() != dLst.getYear())) {
			WT.vt_f_d = "1";
		}
	}
	WT.co_f = escape(WT.co_f);
	WT.vt_sid = WT.co_f + "." + (dSes.getTime() - adj);
	var expiry = "; expires=" + dExp.toGMTString();
	document.cookie = name + "=" + "id=" + WT.co_f + ":lv=" + dCur.getTime().toString() + ":ss=" + dSes.getTime().toString() + expiry + "; path=/" + (((typeof (gFpcDom) != "undefined") && (gFpcDom != "")) ? ("; domain=" + gFpcDom) : ("")) + "; secure; SameSite=Lax";
	if (!dcsIsFpcSet(name, WT.co_f, dCur.getTime().toString(), dSes.getTime().toString())) {
		WT.co_f = WT.vt_sid = WT.vt_f_s = WT.vt_f_d = WT.vt_f_tlh = WT.vt_f_tlv = "";
		WT.vt_f = WT.vt_f_a = "2";
	}
}

// Code section for Use the new first-party cookie generated with this tag.
var gFpc = "WT_FPC";
var gConvert = true;

function dcsAdv() {
	dcsFunc("dcsET");
	dcsFunc("dcsCookie");
	dcsFunc("dcsAdSearch");
	dcsFunc("dcsTP");
}

// ********************************** END OF SDC Advanced Tracking Code ******************************************************

// START OF Basic SmartSource Data Collector TAG
// Copyright (c) 1996-2007 WebTrends Inc. All rights reserved.
// V8.0
// $DateTime: 2007/03/01 14:48:29$
var gDomain = "sdc.mymovies.net";
var gDcsId = "dcs6w42jg000008ugzspmngv7_4u2r";

if ((typeof (gConvert) != "undefined") && gConvert && (document.cookie.indexOf(gFpc + "=") == -1) && (document.cookie.indexOf("WTLOPTOUT=") == -1)) {
	document.write("<SCR" + "IPT TYPE='text/javascript' SRC='" + "http" + (window.location.protocol.indexOf('https:') == 0 ? 's' : '') + "://" + gDomain + "/" + gDcsId + "/wtid.js" + "'><\/SCR" + "IPT>");
}

var gImages = new Array;
var gIndex = 0;
var DCS = new Object();
var WT = new Object();
var DCSext = new Object();
var gQP = new Array();
var gI18n = false;
if (window.RegExp) {
	var RE = gI18n ? { "%25": /\%/g } : { "%09": /\t/g, "%20": / /g, "%23": /\#/g, "%26": /\&/g, "%2B": /\+/g, "%3F": /\?/g, "%5C": /\\/g, "%22": /\"/g, "%7F": /\x7F/g, "%A0": /\xA0/g };
	if (gI18n) {
		var EXRE = /dcs(uri)|(ref)|(aut)|(met)|(sta)|(sip)|(pro)|(byt)|(dat)|(p3p)|(cfg)|(redirect)|(cip)/i;
	}
}

// Add customizations here
function dcsMultiTrack() {
	if (arguments.length % 2 == 0) {
		for (var i = 0; i < arguments.length; i += 2) {
			if (arguments[i].indexOf('WT.') == 0) {
				WT[arguments[i].substring(3)] = arguments[i + 1];
			}
			else if (arguments[i].indexOf('DCS.') == 0) {
				DCS[arguments[i].substring(4)] = arguments[i + 1];
			}
			else if (arguments[i].indexOf('DCSext.') == 0) {
				DCSext[arguments[i].substring(7)] = arguments[i + 1];
			}
		}
		var dCurrent = new Date();
		DCS.dcsdat = dCurrent.getTime();
		dcsFunc("dcsCookie");
		dcsTag();
	}
}

function dcsVar() {
	var dCurrent = new Date();
	WT.tz = dCurrent.getTimezoneOffset() / 60 * -1;
	if (WT.tz == 0) {
		WT.tz = "0";
	}
	WT.bh = dCurrent.getHours();
	WT.ul = navigator.appName == "Netscape" ? navigator.language : navigator.userLanguage;
	if (typeof (screen) == "object") {
		WT.cd = navigator.appName == "Netscape" ? screen.pixelDepth : screen.colorDepth;
		WT.sr = screen.width + "x" + screen.height;
	}
	if (typeof (navigator.javaEnabled()) == "boolean") {
		WT.jo = navigator.javaEnabled() ? "Yes" : "No";
	}
	if (document.title) {
		WT.ti = document.title;
	}
	WT.js = "Yes";
	WT.jv = dcsJV();
	if (document.body && document.body.addBehavior) {
		document.body.addBehavior("#default#clientCaps");
		WT.ct = document.body.connectionType || "unknown";
		document.body.addBehavior("#default#homePage");
		WT.hp = document.body.isHomePage(location.href) ? "1" : "0";
	}
	else {
		WT.ct = "unknown";
	}
	if (parseInt(navigator.appVersion) > 3) {
		if ((navigator.appName == "Microsoft Internet Explorer") && document.body) {
			WT.bs = document.body.offsetWidth + "x" + document.body.offsetHeight;
		}
		else if (navigator.appName == "Netscape") {
			WT.bs = window.innerWidth + "x" + window.innerHeight;
		}
	}
	WT.fi = "No";
	if (window.ActiveXObject) {
		for (var i = 10; i > 0; i--) {
			try {
				var flash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);
				WT.fi = "Yes";
				WT.fv = i + ".0";
				break;
			}
			catch (e) {
			}
		}
	}
	else if (navigator.plugins && navigator.plugins.length) {
		for (var i = 0; i < navigator.plugins.length; i++) {
			if (navigator.plugins[i].name.indexOf('Shockwave Flash') != -1) {
				WT.fi = "Yes";
				WT.fv = navigator.plugins[i].description.split(" ")[2];
				break;
			}
		}
	}
	if (gI18n) {
		WT.em = (typeof (encodeURIComponent) == "function") ? "uri" : "esc";
		if (typeof (document.defaultCharset) == "string") {
			WT.le = document.defaultCharset;
		}
		else if (typeof (document.characterSet) == "string") {
			WT.le = document.characterSet;
		}
	}
	WT.tv = "8.0.3";
	//WT.sp="@@SPLITVALUE@@";
	DCS.dcsdat = dCurrent.getTime();
	DCS.dcssip = window.location.hostname;
	DCS.dcsuri = window.location.pathname;
	if (window.location.search) {
		DCS.dcsqry = window.location.search;
		if (gQP.length > 0) {
			for (var i = 0; i < gQP.length; i++) {
				var pos = DCS.dcsqry.indexOf(gQP[i]);
				if (pos != -1) {
					var front = DCS.dcsqry.substring(0, pos);
					var end = DCS.dcsqry.substring(pos + gQP[i].length, DCS.dcsqry.length);
					DCS.dcsqry = front + end;
				}
			}
		}
	}
	if ((window.document.referrer != "") && (window.document.referrer != "-")) {
		if (!(navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) < 4)) {
			DCS.dcsref = window.document.referrer;
		}
	}
}

function dcsA(N, V) {
	if (gI18n && !EXRE.test(N)) {
		if (N == "dcsqry") {
			var newV = "";
			var params = V.substring(1).split("&");
			for (var i = 0; i < params.length; i++) {
				var pair = params[i];
				var pos = pair.indexOf("=");
				if (pos != -1) {
					var key = pair.substring(0, pos);
					var val = pair.substring(pos + 1);
					if (i != 0) {
						newV += "&";
					}
					newV += key + "=" + dcsEncode(val);
				}
			}
			V = V.substring(0, 1) + newV;
		}
		else {
			V = dcsEncode(V);
		}
	}
	return "&" + N + "=" + dcsEscape(V, RE);
}

function dcsEscape(S, REL) {
	if (typeof (REL) != "undefined") {
		var retStr = new String(S);
		for (var R in REL) {
			retStr = retStr.replace(REL[R], R);
		}
		return retStr;
	}
	else {
		return escape(S);
	}
}

function dcsEncode(S) {
	return (typeof (encodeURIComponent) == "function") ? encodeURIComponent(S) : escape(S);
}

function dcsCreateImage(dcsSrc) {
	if (document.images) {
		gImages[gIndex] = new Image;
		gImages[gIndex].src = dcsSrc;
		gIndex++;
	}
	else {
		document.write('<IMG ALT="" BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="' + dcsSrc + '">');
	}
}

function dcsMeta() {
	var elems;
	if (document.all) {
		elems = document.all.tags("meta");
	}
	else if (document.documentElement) {
		elems = document.getElementsByTagName("meta");
	}
	if (typeof (elems) != "undefined") {
		var length = elems.length;
		for (var i = 0; i < length; i++) {
			var name = elems.item(i).name;
			var content = elems.item(i).content;
			var equiv = elems.item(i).httpEquiv;
			if (name.length > 0) {
				if (name.indexOf("WT.") == 0) {
					WT[name.substring(3)] = content;
				}
				else if (name.indexOf("DCSext.") == 0) {
					DCSext[name.substring(7)] = content;
				}
				else if (name.indexOf("DCS.") == 0) {
					DCS[name.substring(4)] = content;
				}
			}
			else if (gI18n && (equiv == "Content-Type")) {
				var pos = content.toLowerCase().indexOf("charset=");
				if (pos != -1) {
					WT.mle = content.substring(pos + 8);
				}
			}
		}
	}
}

function dcsTag() {
	if (document.cookie.indexOf("WTLOPTOUT=") != -1) {
		return;
	}
	var P = "http" + (window.location.protocol.indexOf('https:') == 0 ? 's' : '') + "://" + gDomain + (gDcsId == "" ? '' : '/' + gDcsId) + "/dcs.gif?";
	for (var N in DCS) {
		if (DCS[N]) {
			P += dcsA(N, DCS[N]);
		}
	}
	var keys = ["co_f", "vt_sid", "vt_f_tlv"];
	for (var i = 0; i < keys.length; i++) {
		var key = keys[i];
		if (WT[key]) {
			P += dcsA("WT." + key, WT[key]);
			delete WT[key];
		}
	}
	for (N in WT) {
		if (WT[N]) {
			P += dcsA("WT." + N, WT[N]);
		}
	}
	for (N in DCSext) {
		if (DCSext[N]) {
			P += dcsA(N, DCSext[N]);
		}
	}
	if (P.length > 2048 && navigator.userAgent.indexOf('MSIE') >= 0) {
		P = P.substring(0, 2040) + "&WT.tu=1";
	}
	dcsCreateImage(P);
}

function dcsJV() {
	var agt = navigator.userAgent.toLowerCase();
	var major = parseInt(navigator.appVersion);
	var mac = (agt.indexOf("mac") != -1);
	var ff = (agt.indexOf("firefox") != -1);
	var ff0 = (agt.indexOf("firefox/0.") != -1);
	var ff10 = (agt.indexOf("firefox/1.0") != -1);
	var ff15 = (agt.indexOf("firefox/1.5") != -1);
	var ff2up = (ff && !ff0 && !ff10 & !ff15);
	var nn = (!ff && (agt.indexOf("mozilla") != -1) && (agt.indexOf("compatible") == -1));
	var nn4 = (nn && (major == 4));
	var nn6up = (nn && (major >= 5));
	var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	var ie4 = (ie && (major == 4) && (agt.indexOf("msie 4") != -1));
	var ie5up = (ie && !ie4);
	var op = (agt.indexOf("opera") != -1);
	var op5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
	var op6 = (agt.indexOf("opera 6") != -1 || agt.indexOf("opera/6") != -1);
	var op7up = (op && !op5 && !op6);
	var jv = "1.1";
	if (ff2up) {
		jv = "1.7";
	}
	else if (ff15) {
		jv = "1.6";
	}
	else if (ff0 || ff10 || nn6up || op7up) {
		jv = "1.5";
	}
	else if ((mac && ie5up) || op6) {
		jv = "1.4";
	}
	else if (ie5up || nn4 || op5) {
		jv = "1.3";
	}
	else if (ie4) {
		jv = "1.2";
	}
	return jv;
}

function dcsFunc(func) {
	if (typeof (window[func]) == "function") {
		window[func]();
	}
}

dcsVar();
dcsMeta();
dcsFunc("dcsAdv");
//dcsTag();
// END OF Basic SmartSource Data Collector TAG
;
$('[data-cinema-select-showtimes] li a').each(function () {
    this.href += '#showtimes';
});

//function appendDataHeader() {
//    var $DeviceWidth = $('body').innerWidth();
//    if ($DeviceWidth <= 766) {
        
//        $('.changeCinema').css('color','red').data('cinema-select-btn-header');
//    }
//    else {
//        $('.changeCinema').data('');
//    }
//}


//$(window).resize(function () {
//    appendDataHeader()
//});


var $cinemaSelectBtnHeader = $('[data-cinema-select-btn-header]'),
    $cinemaSelectHeader = $('[data-cinema-select-header]'),
    $cinemaSelectBtnShowtimes = $('[data-cinema-select-btn-showtimes]'),
    $cinemaSelectShowtimes = $('[data-cinema-select-showtimes]');
	$cinemaSelectPortal = $('[data-cinema-select-portal]');

    $cinemaSelectBtnHeader.on('click', function () {

        $cinemaSelectHeader.toggle();

            if ($(this).hasClass('active')) {
                $(this).removeClass('active');
            }
            else {
                $(this).addClass('active');
            }
    });

    $cinemaSelectBtnShowtimes.on('click', function () {

        $cinemaSelectShowtimes.toggle();

        if ($(this).hasClass('active')) {
            $(this).removeClass('active');
            }
            else {
            $(this).addClass('active');
            }
    });

    $('html').click(function () {
        $cinemaSelectHeader.hide();
        $cinemaSelectShowtimes.hide();
    });

    $cinemaSelectBtnHeader.click(function (event) {
        event.stopPropagation();
        $cinemaSelectShowtimes.hide();
    });

    $cinemaSelectHeader.click(function (event) {
        event.stopPropagation();
        $cinemaSelectShowtimes.hide();
    });

    $cinemaSelectBtnShowtimes.click(function (event) {
        event.stopPropagation();
        $cinemaSelectHeader.hide();
    });

    $cinemaSelectShowtimes.click(function (event) {
        event.stopPropagation();
        $cinemaSelectHeader.hide();
    });

    $cinemaSelectPortal.on('vclick', function (e) {
    	document.cookie = 'PCC.Location' + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; secure; SameSite=Lax';
    });

    $cinemaSelectPortal.click(function (e) {
    	document.cookie = 'PCC.Location' + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; secure; SameSite=Lax';
    });;var pc = pc || {};

// gift card

pc.gc = {
    // Concessions is the basket object
    Concessions: [],
    order: {},    // payment - set to true at the moment
    AllConcessions: [],
    app: {
        apiVersion: 3
    }
};
var giftcardAdyen = {};
giftcardAdyen.useAdyen = true;
giftcardAdyen.adyenConfiguration = {};
giftcardAdyen.isAdyenRedirect = false;

(function ($) {

    if ($('[data-gc]').length === 0) {
        return;
    }

    var hasApplePay = false;

    function setup() {
        // this is the delivery item that gets sent with the concessions list in AddConcessions
        pc.gc.deliveryItem = {};
        pc.gc.deliveryItemAdded = false;

        pc.gc.allItems = {};
        pc.gc.types = {
            giftcards: [],
            egiftcards: [],
            customgiftcards: [],
            memberships: []
        };

        pc.gc.titles = {
            giftcards: "Your Gift Voucher",
            egiftcards: "Your eGift Voucher",
            customgiftcards: "Your Custom Gift Voucher",
            memberships: "Membership Gift Voucher"
        };

        pc.gc.details = function () {
            showLoad();
            // check basket is not empty
            if (pc.gc.Concessions.length === 0) {
                showError('empty');
                return;
            }

            saveBasket();

            if (pc.gc.Type !== 'isEGiftCard') {

                pc.gc.totalQuantity = 0;

                //test if the delivery object already added to concessions
                for (var key = pc.gc.Concessions.length - 1; key >= 0; key--) {
                    //if so remove it and create again in case they have closed TNS dialogue and added more tickets
                    if (pc.gc.Concessions[key].Description === "Postage" || pc.gc.Concessions[key].Title === "Postage") {
                        pc.gc.deliveryItemAdded = false;
                        pc.gc.Concessions.splice(key, 1);
                        break;
                    }
                }

                $.each(pc.gc.Concessions, function (key, val) {
                    if (pc.gc.Concessions[key].Description !== "Postage" && pc.gc.Concessions[key].Title !== "Postage") {
                        pc.gc.totalQuantity += pc.gc.Concessions[key].Quantity;
                    }
                });

                pc.gc.deliveryItem.Quantity = pc.gc.totalQuantity;

                pc.gc.Concessions.push(pc.gc.deliveryItem);

                pc.gc.deliveryItemAdded = true;
            }
           
            $.ajax({
                url: pc.api.booking + 'api/giftcard/AddGiftCards?cinemaId=' + pc.api.giftStoreId,
                type: 'POST',
                contentType: 'application/json',
                dataType: 'json',
                data: JSON.stringify({
                    'CinemaId': pc.api.giftStoreId,
                    'Concessions': pc.gc.Concessions
                }),
                crossDomain: true
            })
            .always(function (response) {
                var data;
                if (typeof response.responseText !== 'undefined') {
                    data = JSON.parse(response.responseText);
                }
                else {
                    data = response;
                }
                if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) {
                    var subTotal = 0,
                      orderTotal,
                      extraCost;

                    //console.log(data);

                    // save for later calls
                    pc.gc['UserSessionId'] = data.UserSessionId;
                    pc.gc['OrderId'] = data.OrderId;

                    for (var i = 0, len = pc.gc.Concessions.length; i < len; i++) {
                        var itemCost = parseFloat(pc.gc.Concessions[i].Cost),
                            itemQuantity = parseFloat(pc.gc.Concessions[i].Quantity);

                        if (itemQuantity > 0) {
                            subTotal += itemCost * itemQuantity;
                        }
                    }

                    orderTotal = parseFloat(data.VistaTotal) || subTotal;

                    // check if orderTotal is more than subTotal indicating extra costs
                    if (orderTotal > subTotal) {
                        extraCost = orderTotal - subTotal;

                        // update extra charge cost
                        $('[data-gc-extracharge-cost]').html((parseFloat(extraCost) / 100).toFixed(2));

                        // show extra charge
                        $('[data-gc-extracharge]').removeClass('dn');
                    }

                    $('[data-gc-total]').html((parseFloat(orderTotal) / 100).toFixed(2));

                    // invoke payment
                    getGcPaymentProviderAdyen(response);
                }
                else {
                    showError(data.PeachErrorCode);
                    hideLoad();
                }
            });
        };

        if ($('[data-gc]').length > 0) {
            showLoad();

            var urlParams = (function (qsRaw) {
                if (qsRaw === '') {
                    // exit as no qs
                    return {};
                }

                var qsItems = {};
                // loop qs items
                for (var i = 0, len = qsRaw.length; i < len; i++) {
                    // split parameter from value
                    var qsItem = qsRaw[i].split('=', 2);

                    if (qsItem.length === 1) {
                        // no value
                        qsItems[qsItem[0].toLowerCase()] = '';
                    }
                    else {
                        // value
                        qsItems[qsItem[0].toLowerCase()] = decodeURIComponent(qsItem[1].replace(/\+/g, ' '));
                    }
                }

                return qsItems;
            })(window.location.search.substring(1).split('&'));

            var setupGiftCards = function (data) {
                if (typeof data !== 'undefined' && data !== null && typeof data.ListConcessionGrouping !== 'undefined' && data.ListConcessionGrouping !== null && data.ListConcessionGrouping.length > 0) {

                    // loop groups
                    for (var c = 0; c < data.ListConcessionGrouping.length; c++) {
                        if (typeof data.ListConcessionGrouping[c].Items === 'undefined' || data.ListConcessionGrouping[c].Items === null || data.ListConcessionGrouping[c].Items.length === 0) {
                            // group has no items, continue to next group
                            continue;
                        }

                        // check group type
                        if (data.ListConcessionGrouping[c].Title === 'giftcards') {
                            // normal gift cards
                            pc.gc.types.giftcards = data.ListConcessionGrouping[c].Items.map(function (item) {
                                var pos = item.Title.search(/voucher/i) + 8;
                                item.pTitle = item.Title.substr(0, pos) + '<br>' + item.Title.substr(pos);
                                item.soldOut = pc.giftCardOverride.Ids.includes(item.Id);
                                return item;
                            });

                            // populate list
                            $('[data-gc-list]').html(Mustache.to_html($('#templateGiftCardItem').html(), pc.gc.types.giftcards));
                        }
                        else if (data.ListConcessionGrouping[c].Title === 'egiftcards') {
                            // e gift cards
                            pc.gc.types.egiftcards = data.ListConcessionGrouping[c].Items;

                            // update continue button
                            $('[data-gc-continue="isEGiftCard"]').data('gc-item-id', pc.gc.types.egiftcards[0].Id);
                            
                            // populate list
                            $('[data-gc-elist]').html(Mustache.to_html($('#templateEGiftCardItem').html(), pc.gc.types.egiftcards[0]));
                        }
                        else if (data.ListConcessionGrouping[c].Title === 'cgiftcards') {
                            // custom gift cards
                            var cGroups = {};

                            // split out custom types
                            for (var cgc = 0; cgc < data.ListConcessionGrouping[c].Items.length; cgc++) {
                                var cGroupTitle = $.trim(data.ListConcessionGrouping[c].Items[cgc].Title.replace(/\£([\d,]+(?:\.\d+)?)/g, ''));

                                if (typeof cGroups[cGroupTitle] === 'undefined') {
                                    cGroups[cGroupTitle] = [];
                                }

                                cGroups[cGroupTitle].push(data.ListConcessionGrouping[c].Items[cgc]);
                            }

                            var cGroupsArray = [];

                            // turn object to array
                            for (var cGroupItem in cGroups) {
                                cGroupsArray.push(cGroups[cGroupItem]);
                            }

                            var customGiftCards = [];

                            // loop custom type array
                            for (var g = 0; g < cGroupsArray.length; g++) {
                                if (typeof cGroupsArray[g] !== 'undefined' && cGroupsArray[g] !== null && cGroupsArray[g].length > 0) {
                                    // loop items and update properties
                                    cGroupsArray[g].forEach(function (item) {
                                        item.CustomId = g;
                                        item.ImageId = cGroupsArray[g][0].Id;
                                        item.DisplayName = $.trim(item.Title.replace(/\£([\d,]+(?:\.\d+)?)/g, ''));

                                        var pos = item.DisplayName.search(/voucher/i) + 8;
                                        item.pTitle = item.DisplayName.substr(0, pos) + '<br>' + item.DisplayName.substr(pos);
                                    });

                                    // set default custom gift card value
                                    if (cGroupsArray[g].length > 2) {
                                        customGiftCards.push(cGroupsArray[g][2]);
                                    }
                                    else {
                                        customGiftCards.push(cGroupsArray[g][0]);
                                    }
                                }
                            }

                            pc.gc.types.customgiftcards = cGroupsArray;
                            
                            // populate list
                            $('[data-gc-customlist]').html(Mustache.to_html($('#templateCustomGiftCardItem').html(), customGiftCards));
                        }
                        else if (data.ListConcessionGrouping[c].Title === 'delivery') {
                            // loop delivery items
                            for (var d = 0; d < data.ListConcessionGrouping[c].Items.length; d++) {
                                // find specific delivery item
                                if (data.ListConcessionGrouping[c].Items[d].Code === 'A000003496') {
                                    // save for later
                                    pc.gc.deliveryItem = data.ListConcessionGrouping[c].Items[d];
                                }
                            }
                        }
                        else if (data.ListConcessionGrouping[c].Title === 'Gift Card MemberShips') {
                            pc.gc.types.memberships = data.ListConcessionGrouping[c].Items;
                            
                            // populate list
                            $('[data-gc-membershiplist]').html(Mustache.to_html($('#templateMemberGiftCardItem').html(), [pc.gc.types.memberships[0]]));
                        }

                        // loop group items
                        for (var i = 0; i < data.ListConcessionGrouping[c].Items.length; i++) {
                            // add group items to allItems for later
                            pc.gc.allItems[data.ListConcessionGrouping[c].Items[i].Id] = $.extend({}, data.ListConcessionGrouping[c].Items[i]);
                        }
                    }

                    if (urlParams.type === 'member') {
                        if ($('[data-gc-membershiplist]').hasClass('dn')) {
                            $('[data-gc-backpage]').addClass('dn');
                        }

                        showMembershipDetails();

                        $('[data-gc-continue="isMember"]').trigger('click');
                    }
                }

                hideLoad(); 
            };   

            var changeSelectedItem = function ($elem) {

                $('[data-gc-item-index]').each(function (index) {
                    var current = $(this).find('[data-gc-select-current]').attr('data-gc-select-current');
                    var item = pc.gc.ConcessionList[$(this).find('[data-gc-select-current]').attr('data-gc-select-current')];
                    addToBasket(item.Id, 1, item.DisplayName, item.Cost, current, item.ImageId);
                    $(this).find('[data-gc-select-current]').text(parseInt(item.Cost) / 100);
                });

                renderBasket();

                if (pc.gc.Type !== 'isEGiftCard') {

                    pc.gc.totalQuantity = 0;

                    //test if the delivery object already added to concessions
                    for (var key = pc.gc.Concessions.length - 1; key >= 0; key--) {
                        //if so remove it and create again in case they have closed TNS dialogue and added more tickets
                        if (pc.gc.Concessions[key].Description === "Postage" || pc.gc.Concessions[key].Title === "Postage") {
                            pc.gc.deliveryItemAdded = false;
                            pc.gc.Concessions.splice(key, 1);
                            break;
                        }
                    }

                }

                var subTotal = 0,
                    qty = 0,
                    post = 0;

                $.each(pc.gc.Concessions, function (key, val) {
                    subTotal += pc.gc.Concessions[key].Cost * pc.gc.Concessions[key].Quantity;
                    qty += pc.gc.Concessions[key].Quantity;
                });

                $('[data-gc-subtotal]').html((parseInt(subTotal) / 100).toFixed(2));

                if (pc.gc.Type === 'isEGiftCard') {
                    $('[data-gc-total]').html((parseInt(subTotal) / 100).toFixed(2));
                }
                else {
                    pc.gc.deliveryItem.Quantity = qty;
                    post = pc.gc.deliveryItem.Quantity * pc.gc.deliveryItem.Cost;

                    subTotal += post;

                    pc.gc.totalQuantity = qty;

                    // update extra charge cost
                    $('[data-gc-extracharge-cost]').html((parseInt(post) / 100).toFixed(2));

                    // show extra charge
                    $('[data-gc-extracharge]').removeClass('dn');

                    $('[data-gc-total]').html((parseInt(subTotal) / 100).toFixed(2));
                }
            };

            var addToBasket = function (itemId, itemQuantity, displayName, itemCost, itemCurrent, ImageId) {
                // GUID gen function from http://stackoverflow.com/questions/5612582/using-jquery-guid    
                pc.gc.Concessions.push($.extend({
                    Quantity: itemQuantity,
                    Current: itemCurrent,
                    pCost: (parseFloat(itemQuantity * itemCost) / 100).toFixed(2),
                    LineId: 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
                        var r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8);
                        return v.toString(16);
                    })
                }, pc.gc.allItems[itemId]));
            };

            var addAddBtn = function (itemId, itemQuantity, displayName, itemCos, current) {
                $('[data-gc-add]').html('<div data-gc-item-cost="' + itemCos + '" data-gc-item-id="' + itemId + '" data-gc-item-displayname="' + displayName + '" data-gc-item-current="0">Add another gift card <i class="fa fa-plus fa" aria-hidden="true"></i></div>');
            };

            var renderBasket = function () {

                if (typeof dataLayer !== 'undefined') {
                    gaTrackGiftCardSelection();
                }

                var tempName = pc.apiConcessionTypeSwitch;

                $.get('/template?name=' + tempName + 'BasketItem&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    pc.gc.basketTemp = template;
                    showBasket();
                });
            };

            var showBasket = function () {
                var subtotal = 0,
                    qty = 0,
                    post = 0;

                var gvMax = 10;
                var gvLimit = [];

                if (typeof pc.gvl !== 'undefined' && pc.gvl !== null && pc.gvl !== '') {
                    var tempLimit = parseInt(pc.gvl);

                    if (tempLimit === tempLimit) {
                        gvMax = tempLimit;
                    }
                }

                for (var l = 1; l <= gvMax; l++) {
                    gvLimit.push(l);
                }

                var gcQuantityMessage = '';

                for (var i = 0; i < pc.gc.Concessions.length; i++) {
                    subtotal += pc.gc.Concessions[i].Cost * pc.gc.Concessions[i].Quantity;
                    pc.gc.Concessions[i].index = i;
                    qty += pc.gc.Concessions[i].Quantity;

                    pc.gc.Concessions[i].gvLimit = gvLimit;
                    pc.gc.Concessions[i].gcQuantityMessage = gcQuantityMessage;
                }

                // update total
                $('[data-gc-subtotal]').html((parseInt(subtotal) / 100).toFixed(2));

                if (pc.gc.Type === "isEGiftCard") {
                    $('[data-gc-total]').html((parseInt(subtotal) / 100).toFixed(2));
                }
                else {
                    pc.gc.deliveryItem.Quantity = qty;
                    post = pc.gc.deliveryItem.Quantity * pc.gc.deliveryItem.Cost;

                    subtotal += post;

                    // update extra charge cost
                    $('[data-gc-extracharge-cost]').html((parseInt(post) / 100).toFixed(2));

                    // show extra charge
                    $('[data-gc-extracharge]').removeClass('dn');

                    $('[data-gc-total]').html((parseInt(subtotal) / 100).toFixed(2));
                }


                // update basket display
                $('[data-gc-basket]').html(Mustache.to_html(pc.gc.basketTemp, pc.gc.Concessions));

                $.each(pc.gc.Concessions, function (key, value) {
                    var $item = $('[data-gc-basket] [data-gc-item-index="' + key + '"]'),
                        itemData = pc.gc.Concessions[key];

                    $item.find('[data-gc-basket-item-quantity]').val(itemData.Quantity);
                    $item.find('[data-gc-select-current]').text(itemData.Cost / 100);

                    if (typeof itemData.OrderDelivery !== 'undefined') {
                        if (typeof itemData.OrderDelivery.GiftMessage !== 'undefined' && itemData.OrderDelivery.GiftMessage !== '') {
                            $item.find('[name="RecipientDetails--GiftMessage"]').val(itemData.OrderDelivery.GiftMessage);
                        }

                        if (itemData.OrderDelivery.deliveryAddress.sendToDetails === 'recipient') {
                            $item.find('[name="SendTo"][value="recipient"]').prop('checked', true).trigger('change');
                            if (pc.apiConcessionTypeSwitch === "egiftcards") {
                                if (typeof itemData.OrderDelivery.deliveryAddress.pFirstName !== 'undefined' && itemData.OrderDelivery.deliveryAddress.pFirstName !== '') {
                                    $item.find('[name="RecipientDetails--FirstName"]').val(itemData.OrderDelivery.deliveryAddress.pFirstName);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.pLastName !== 'undefined' && itemData.OrderDelivery.deliveryAddress.pLastName !== '') {
                                    $item.find('[name="RecipientDetails--LastName"]').val(itemData.OrderDelivery.deliveryAddress.pLastName);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.Email !== 'undefined' && itemData.OrderDelivery.deliveryAddress.Email !== '') {
                                    $item.find('[name="RecipientDetails--Email"]').val(itemData.OrderDelivery.deliveryAddress.Email);
                                }
                            }
                            else {
                                if (typeof itemData.OrderDelivery.deliveryAddress.pFirstName !== 'undefined' && itemData.OrderDelivery.deliveryAddress.pFirstName !== '') {
                                    $item.find('[name="RecipientDetails--FirstName"]').val(itemData.OrderDelivery.deliveryAddress.pFirstName);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.pLastName !== 'undefined' && itemData.OrderDelivery.deliveryAddress.pLastName !== '') {
                                    $item.find('[name="RecipientDetails--LastName"]').val(itemData.OrderDelivery.deliveryAddress.pLastName);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.Address1 !== 'undefined' && itemData.OrderDelivery.deliveryAddress.Address1 !== '') {
                                    $item.find('[name="RecipientDetails-AddressLine1"]').val(itemData.OrderDelivery.deliveryAddress.Address1);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.Address2 !== 'undefined' && itemData.OrderDelivery.deliveryAddress.Address2 !== '') {
                                    $item.find('[name="RecipientDetails-AddressLine2"]').val(itemData.OrderDelivery.deliveryAddress.Address2);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.Town !== 'undefined' && itemData.OrderDelivery.deliveryAddress.Town !== '') {
                                    $item.find('[name="RecipientDetails-City"]').val(itemData.OrderDelivery.deliveryAddress.Town);
                                }
                                if (typeof itemData.OrderDelivery.deliveryAddress.Postcode !== 'undefined' && itemData.OrderDelivery.deliveryAddress.Postcode !== '') {
                                    $item.find('[name="RecipientDetails-Zip"]').val(itemData.OrderDelivery.deliveryAddress.Postcode);
                                }
                            }
                        }
                    }
                });

                // maxlength counter
                $('[data-gc] textarea[maxlength]').each(function (index) {
                    var $textarea = $(this),
                        maxLength = $textarea.attr('maxlength');

                    function updateCount() {
                        $('[data-gc-con-maxlength="' + index + '"]').html(maxLength - $textarea.val().length + ' characters');
                    }

                    $textarea.on('keyup', updateCount);

                    $textarea.on('paste', null, function () {
                        setTimeout(function () {
                            updateCount();
                        }, 20);
                    });

                    $textarea.before('<span class="formLabelNote gcMaxLen" data-gc-con-maxlength="' + index + '">' + maxLength + '</span>').trigger('keyup');
                });

                if (pc.apiConcessionTypeSwitch === 'member') {
                    var memberItems = [];

                    pc.gc.ConcessionList.forEach(function (c) {
                        memberItems.push({
                            Title: c.Description,
                            Cost: c.Cost / 100,
                            Id: c.Id,
                            isSelected: c.isSelected
                        });
                    });

                    var itemTemplate = '{{#.}}<option value="{{Id}}" data-gc-basket-item-types-item="{{Cost}}" {{#isSelected}}selected{{/isSelected}}>{{Title}}</option>{{/.}}';

                    $('[data-gc-basket-item-types]')
                        .html(Mustache.render(itemTemplate, memberItems))
                        .on('change', function () {
                            pc.gc.Concessions.length = 0;

                            var item;

                            for (var c = 0; c < pc.gc.ConcessionList.length; c++) {
                                if (pc.gc.ConcessionList[c].Id === this.value) {
                                    pc.gc.ConcessionList[c].isSelected = true;
                                    item = pc.gc.ConcessionList[c];
                                }
                                else {
                                    pc.gc.ConcessionList[c].isSelected = false;
                                }
                            }

                            addToBasket(item.Id, 1, item.DisplayName, item.Cost, item.Id, item.ImageId);

                            renderBasket();

                            pc.gc.totalQuantity = 0;

                            //test if the delivery object already added to concessions
                            for (var key = pc.gc.Concessions.length - 1; key >= 0; key--) {
                                //if so remove it and create again in case they have closed TNS dialogue and added more tickets
                                if (pc.gc.Concessions[key].Description === "Postage" || pc.gc.Concessions[key].Title === "Postage") {
                                    pc.gc.deliveryItemAdded = false;
                                    pc.gc.Concessions.splice(key, 1);
                                    break;
                                }
                            }

                            var subTotal = 0,
                                qty = 0,
                                post = 0;

                            $.each(pc.gc.Concessions, function (key, val) {
                                subTotal += pc.gc.Concessions[key].Cost * pc.gc.Concessions[key].Quantity;
                                qty += pc.gc.Concessions[key].Quantity;
                            });

                            $('[data-gc-subtotal]').html((parseInt(subTotal) / 100).toFixed(2));

                            pc.gc.deliveryItem.Quantity = qty;
                            post = pc.gc.deliveryItem.Quantity * pc.gc.deliveryItem.Cost;

                            subTotal += post;

                            pc.gc.totalQuantity = qty;

                            // update extra charge cost
                            $('[data-gc-extracharge-cost]').html((parseInt(post) / 100).toFixed(2));

                            // show extra charge
                            $('[data-gc-extracharge]').removeClass('dn');

                            $('[data-gc-total]').html((parseInt(subTotal) / 100).toFixed(2));
                        });
                }

                hideLoad();
            };

            $(document).on('click', '[data-gc-continue]', function (e) {

                e.preventDefault();

                if (typeof pc.gvholding !== 'undefined' && pc.gvholding !== null && pc.gvholding !== '') {
                    window.location.href = pc.gvholding;
                    return;
                }

                $('[data-gc-del-charge]').show();

                var gcType = $(this).data('gc-continue');

                pc.gc.Type = gcType;
                
                var giftvouchercheck = $(this).data('gc-customid');

                if (pc.gc.Type !== 'isEGiftCard') {

                    pc.gc.totalQuantity = 0;

                    //test if the delivery object already added to concessions
                    for (var key = pc.gc.Concessions.length - 1; key >= 0; key--) {
                        //if so remove it and create again in case they have closed TNS dialogue and added more tickets
                        if (pc.gc.Concessions[key].Description === "Postage" || pc.gc.Concessions[key].Title === "Postage") {
                            pc.gc.deliveryItemAdded = false;
                            pc.gc.Concessions.splice(key, 1);
                            break;
                        }
                    }
                }

                // if its a different type of voucher than the last one then empty basket

                if (pc.gc.LastType !== undefined) {

                    $('[data-modalBg]').show();

                    $('[data-voucher-prompt]').show();

                    window.scrollTo(0, 0);

                    $('body').addClass('no-scroll');

                    var $that = $(this);

                    $('[data-voucher-prompt-true]').on('click', function (e) {
                        e.preventDefault();
                        pc.gc.Concessions.length = 0;
                        $('[gc-basket]').empty();
                        $('[data-voucher-prompt]').hide();
                        $('[data-modalBg]').hide();
                        $('body').removeClass('no-scroll');
                        showLoad();
                        var $item = $that;
                        var itemQuantity = 1;
                        var itemCost = parseInt($item.attr('data-gc-item-cost') || 0);
                        var displayName = $item.attr('data-gc-item-displayname');
                        var itemId = $item.attr('data-gc-item-id');
                        var current = $item.attr('data-gc-item-current');
                        var imageId = itemId;

                        var $voucherHead = $('[data-voucher-type-head]');

                        if (gcType === 'isFixed') {
                            pc.apiConcessionTypeSwitch = "giftcards";
                            $voucherHead.text(pc.gc.titles.giftcards);
                            $('[data-gc-del-charge]').show();
                        }
                        else if (gcType === 'isEGiftCard') {
                            pc.apiConcessionTypeSwitch = "egiftcards";
                            pc.gc.ConcessionList = JSON.parse(JSON.stringify(pc.gc.types.egiftcards));
                            $voucherHead.text(pc.gc.titles.egiftcards);
                            $('[data-gc-del-charge]').hide();
                        }
                        else if (gcType.indexOf('isCustomGiftCard_') > -1) {
                            pc.apiConcessionTypeSwitch = "customgiftcards";
                            pc.gc.ConcessionList = JSON.parse(JSON.stringify(pc.gc.types.customgiftcards[giftvouchercheck]));
                            $voucherHead.text(pc.gc.titles.customgiftcards);
                            $('[data-gc-del-charge]').show();
                            imageId = pc.gc.types.customgiftcards[giftvouchercheck][0].ImageId;
                        }
                        else if (gcType === 'isMember') {
                            pc.apiConcessionTypeSwitch = "member";
                            pc.gc.ConcessionList = JSON.parse(JSON.stringify(pc.gc.types.memberships));
                            $voucherHead.text(pc.gc.titles.memberships);
                            $('[data-gc-del-charge]').show();
                        }

                        $('[data-gc-email]').toggleClass('dn', gcType !== 'isEGiftCard');
                        $('[data-gc-ap-email]').toggleClass('dn', gcType !== 'isEGiftCard' || !hasApplePay);
                        $('[data-gc-physical]').toggleClass('dn', gcType === 'isEGiftCard');

                        addToBasket(itemId, itemQuantity, displayName, itemCost, current, imageId);
                        addAddBtn(itemId, itemQuantity, displayName, itemCost);
                        renderBasket();
                        
                        changeStep('details');
                      
                        pc.gc.LastType = gcType;
                    });

                    $('[data-voucher-prompt-false]').on('click', function (e) {
                        e.preventDefault();
                        $('[data-voucher-prompt]').hide();
                        $('[data-modalBg]').hide();
                        $('body').removeClass('no-scroll');
                        changeStep('details');
                    });

                }
                else if (typeof pc.gc.LastType === 'undefined' || pc.gc.LastType === gcType) {
                    showLoad();
                    var $item = $(this);
                    var itemQuantity = 1;
                    var itemCost = parseInt($item.attr('data-gc-item-cost') || 0);
                    var displayName = $item.attr('data-gc-item-displayname');
                    var itemId = $item.attr('data-gc-item-id');
                    var current = $item.attr('data-gc-item-current');
                    var imageId = itemId;

                    var $voucherHead = $('[data-voucher-type-head]');

                    if (gcType === 'isFixed') {
                        pc.apiConcessionTypeSwitch = "giftcards";
                        $voucherHead.text(pc.gc.titles.giftcards);
                        $('[data-gc-del-charge]').show();
                    }
                    else if (gcType === 'isEGiftCard') {
                        pc.apiConcessionTypeSwitch = "egiftcards";
                        pc.gc.ConcessionList = JSON.parse(JSON.stringify(pc.gc.types.egiftcards));
                        $voucherHead.text(pc.gc.titles.egiftcards);
                        $('[data-gc-del-charge]').hide();
                    }
                    else if (gcType.indexOf('isCustomGiftCard_') > -1) {
                        pc.apiConcessionTypeSwitch = "customgiftcards";
                        pc.gc.ConcessionList = JSON.parse(JSON.stringify(pc.gc.types.customgiftcards[giftvouchercheck]));
                        $voucherHead.text(pc.gc.titles.customgiftcards);
                        $('[data-gc-del-charge]').show();
                        imageId = pc.gc.types.customgiftcards[giftvouchercheck][0].ImageId;
                    }
                    else if (gcType === 'isMember') {
                        pc.apiConcessionTypeSwitch = "member";
                        pc.gc.ConcessionList = JSON.parse(JSON.stringify(pc.gc.types.memberships));
                        $voucherHead.text(pc.gc.titles.memberships);
                        $('[data-gc-del-charge]').show();
                    }

                    $('[data-gc-email]').toggleClass('dn', gcType !== 'isEGiftCard');
                    $('[data-gc-ap-email]').toggleClass('dn', gcType !== 'isEGiftCard' || !hasApplePay);
                    $('[data-gc-physical]').toggleClass('dn', gcType === 'isEGiftCard');
                    
                    addToBasket(itemId, itemQuantity, displayName, itemCost, current, imageId);
                    addAddBtn(itemId, itemQuantity, displayName, itemCost);
                    renderBasket();
                    
                    changeStep('details');
                   
                    pc.gc.LastType = gcType;
                }

            });  

            $(document).on('click', '[data-gc-select-change]', function (e) {
                pc.gc.Concessions.length = 0;
                var cardIndex = $(this).parents('[data-gc-item-index]').data('gc-item-index');
                var $currentSelection = $('[data-gc-item-index="' + cardIndex + '"] [data-gc-select-current]');
                var currentItem = parseInt($currentSelection.attr('data-gc-select-current'));

                if (isNaN(currentItem)) {
                    return;
                }

                var direction = $(this).attr('data-gc-select-change');

                if (direction === 'down') {
                    if (currentItem > 0) {
                        currentItem--;
                    }
                } else {
                    if (currentItem < pc.gc.ConcessionList.length - 1) {
                        currentItem++;
                    }
                }

                $currentSelection.attr('data-gc-select-current', currentItem);
                changeSelectedItem($currentSelection);
            });

            $(document).on('click', '[data-gc-add] div', function (e) {
                e.preventDefault();
                showLoad();
                changeStep('products');

                $('html,body').animate({
                    scrollTop: 0
                }, 600);

                // save cards

                saveBasket();
            });

            $(document).on('change', 'select[data-gc-basket-item-quantity]', function () {
                var newSubTotal = 0;
                var post = 0;
                var qty = 0;
                var cardIndex = $(this).parents('[data-gc-item-index]').data('gc-item-index');
                var newQuantity = $(this).val();

                if (pc.gc.deliveryItemAdded) {
                    pc.gc.totalQuantity = 0;

                    //test if the delivery object already added to concessions
                    for (var key = pc.gc.Concessions.length - 1; key >= 0; key--) {
                        //if so remove it and create again in case they have closed TNS dialogue and added more tickets
                        if (pc.gc.Concessions[key].Description === "Postage" || pc.gc.Concessions[key].Title === "Postage") {
                            pc.gc.deliveryItemAdded = false;
                            pc.gc.Concessions.splice(key, 1);
                            break;
                        }
                    }
                }
                
                $.each(pc.gc.Concessions, function (key, value) {
                    if (pc.gc.Concessions[key].Description !== "Postage" && pc.gc.Concessions[key].Title !== "Postage") {
                        if (this.index === cardIndex) {
                            this.Quantity = parseInt(newQuantity);
                            this.pCost = (this.Cost * this.Quantity / 100).toFixed(2);
                            //newSubTotal += this.pCost;
                        }
                        newSubTotal += this.Cost * this.Quantity;

                        qty += this.Quantity;
                    }
                });
                
                $('[data-gc-subtotal]').html((parseInt(newSubTotal) / 100).toFixed(2));

                if (pc.gc.Type === "isEGiftCard") {
                    $('[data-gc-total]').html((parseInt(newSubTotal) / 100).toFixed(2));
                }
                else {
                    pc.gc.deliveryItem.Quantity = qty;
                    post = pc.gc.deliveryItem.Quantity * pc.gc.deliveryItem.Cost;

                    pc.gc.totalQuantity = qty;

                    pc.gc.Concessions.push(pc.gc.deliveryItem);

                    pc.gc.deliveryItemAdded = true;

                    newSubTotal += post;

                    // update extra charge cost
                    $('[data-gc-extracharge-cost]').html((parseInt(post) / 100).toFixed(2));

                    // show extra charge
                    $('[data-gc-extracharge]').removeClass('dn');

                    $('[data-gc-total]').html((parseInt(newSubTotal) / 100).toFixed(2));
                }

            });

            // back link to product list
            $('[data-gc-backpage]').on('click', function (e) {
                e.preventDefault();
                showLoad();
                changeStep('products');
            });

            // toggle voucher terms

            $('[data-voucher-terms-togg]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-voucher-terms]').show();
            });

            $('[data-voucher-terms-close]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-voucher-terms]').hide();
            });

            $('[data-gc-del-charge-info]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-gc-del-charge-overlay]').show();
            });

            $('[data-gc-del-charge-overlay-close]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-gc-del-charge-overlay]').hide();
            });

            $('[data-gc-del-charge-overlay-close]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-gc-del-charge-overlay]').hide();
            });
            
            $(document).on('change', '[data-gc] [name="SendTo"]', function () {
                var $input = $('[name="SendTo"]:checked');
                var inputVal = $input.val();

                if (inputVal.toLowerCase() === "recipient") {
                    // show recipient fields
                    $('[data-gc-sendto="recipient"]').removeClass('dn');
                }
                else {
                    // hide recipient fields
                    $('[data-gc-sendto="recipient"]').addClass('dn');
                }
            });

            $(document).on('change', '[data-gc] [name="SendToAp"]', function () {
                var $input = $('[name="SendToAp"]:checked');
                var inputVal = $input.val();

                $('[name="SendTo"][value="' + inputVal + '"]').prop('checked', true).trigger('change');

                $('[data-gc-sendto-ap="recipient"]').toggleClass('dn', inputVal.toLowerCase() !== 'recipient');
            });
            
            // remove basket line
            $('[data-gc-basket]').on('click', '[data-gc-remove]', function (e) {
                e.preventDefault();

                if (pc.gc.Type !== 'isEGiftCard') {

                    pc.gc.totalQuantity = 0;

                    //test if the delivery object already added to concessions
                    for (var key = pc.gc.Concessions.length - 1; key >= 0; key--) {
                        //if so remove it and create again in case they have closed TNS dialogue and added more tickets
                        if (pc.gc.Concessions[key].Description === "Postage" || pc.gc.Concessions[key].Title === "Postage") {
                            pc.gc.deliveryItemAdded = false;
                            pc.gc.Concessions.splice(key, 1);
                            break;
                        }
                    }

                }

                var lineIdToRemove = $(this).data('gc-remove');

                // remove line from basket object
                $.each(pc.gc.Concessions,
                    function (index) {
                        if (pc.gc.Concessions[index].LineId === lineIdToRemove) {
                            pc.gc.Concessions.splice(index, 1);

                            if (pc.gc.Concessions.length === 0) {
                                changeStep('products');
                                return false;
                            }

                            renderBasket();
                            return false;
                        }
                    });
            });

            pc.gc.submit = function () {
                // check basket is not empty
                if (pc.gc.Concessions.length === 0) {
                    showError('empty');
                    return false;
                }

                /*
                add concesssion
                http://[Domain]/api/Concession/AddConcession/{apiCinemaId}
                request
                {
                  "CinemaId": 2,
                  "Concessions": [{
                      "Id": "001",
                    "Quantity": 1,
                    "OrderDelivery": {
                          "IsGift": "true",
                          "IsGiftWrapped": "false",
                          "GiftMessage": "HELLLOOOOOOOO",
                          "DeliveryAddress": {
                              "Name": "kjhjkhj",
                              "Email": "khjkhjk"
                          }
                      }
                  }]
                }
            
                response
                {
                    "UserSessionId": "1234567",
                    "OrderId": "123",
                    "StatusCode": 200,
                    "PeachErrorCode": null
                }
                */

                var orderDelivery;

                switch ($('[name="SendTo"]').val()) {
                    case 'Friend':
                        orderDelivery = {
                            'IsGift': 'true',
                            'IsGiftWrapped': 'false',
                            'GiftMessage': $('[name="FriendDetails--GiftMessage"]').val() || '',
                            'DeliveryAddress': {
                                'Name': $('[name="FriendDetails--FirstName"]').val() + ' ' + $('[name="FriendDetails--LastName"]').val(),
                                'Email': $('[name="FriendDetails--Email"]').val()
                            }
                        };
                        break;
                    default:
                        orderDelivery = {
                            'IsGift': 'true',
                            'IsGiftWrapped': 'false',
                            'GiftMessage': '',
                            'DeliveryAddress': {
                                'Name': $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val(),
                                'Email': $('[name="CustomerDetails--Email"]').val()
                            }
                        };
                        break;
                }

                $('[data-gc-sendtoemail]').html(orderDelivery.DeliveryAddress.Email);

                for (var i = 0, len = pc.gc.Concessions.length; i < len; i++) {
                    pc.gc.Concessions[i]['OrderDelivery'] = orderDelivery;
                }

                $.ajax({
                    url: pc.api.booking + 'api/giftcard/AddGiftCards?cinemaId=' + pc.api.giftStoreId,
                    type: 'POST',
                    contentType: 'application/json',
                    dataType: 'json',
                    data: JSON.stringify({
                        'CinemaId': pc.api.giftStoreId,
                        'Concessions': pc.gc.Concessions
                    }),
                    crossDomain: true
                })
                .always(function (response) {
                    var data;
                    if (typeof response.responseText !== 'undefined') {
                        data = JSON.parse(response.responseText);
                    }
                    else {
                        data = response;
                    }
                    if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) {
                        //
                        //  console.log(data);

                        pc.gc['UserSessionId'] = data.UserSessionId;
                        pc.gc['OrderId'] = data.OrderId;

                        /*
                        complete order
                        http://[Domain]/api/Concession/CompleteOrder?cinemaId={cinemaId}
                        request
                        {
                          "CinemaId": "2", // Gift Store Cinema Id
                          "CustomerDetails": {
                            "FirstName": "sample string",
                            "LastName": "sample string",
                            "Email": "sample string"
                          },
                          "OrderId": "12345", // This should have been returned in the post AddConcessions method.
                          "Payment": {
                            "Number": "sample string",
                            "ExpiryMonth": "2",
                            "ExpiryYear": "2015",
                            "CardType": "sample string",
                            "NameOnCard": "sample string",
                            "PrimaryBillingCard": true
                          },
                          "UserSessionId": "sample string", // This should have been returned in the post AddConcessions method.
                          "LoyaltyNumber": "sample string" // Not required to purchase the concessions.
                        }
                    
                        response
                        {
                          "UserSessionId": "sample string 1",
                          "EmailAddress": "sample string 11",
                          "Concessions": [{
                            "Id": "sample string 1",
                            "RecognitionId": "sample string 2",
                            "Code": "sample string 3",
                            "Description": "sample string 4",
                            "Cost": 5,
                            "Quantity": 6      
                          }],
                          "GrandTotal": 18.0,
                          "BookingConfirmationId": "ABC"
                        }                  
                        */

                        var loyaltyNumber = '';

                        if (pc.Authentication.HasLogin) {
                            loyaltyNumber = pc.Loyalty.Member.MemberDetails.LoyaltyCardNumber;
                        }

                        $.ajax({
                            url: pc.api.booking + 'api/Concession/CompleteOrder?cinemaId=' + pc.api.giftStoreId,
                            type: 'POST',
                            contentType: 'application/json',
                            dataType: 'json',
                            data: JSON.stringify({
                                'CinemaId': pc.api.giftStoreId,
                                'CustomerDetails': {
                                    'FirstName': $('[name="CustomerDetails--FirstName"]').val(),
                                    'LastName': $('[name="CustomerDetails--LastName"]').val(),
                                    'Email': $('[name="CustomerDetails--Email"]').val()
                                },
                                'OrderId': pc.gc.OrderId,
                                'Payment': {
                                    'Number': $('[name="PaymentDetails--cardnumber"]').val(),
                                    'ExpiryMonth': $('[name="PaymentDetails--expirymonth"]').val(),
                                    'ExpiryYear': $('[name="PaymentDetails--expiryyear"]').val(),
                                    'CardType': $('[name="PaymentDetails--cardtype"]').val(),
                                    'NameOnCard': $('[name="PaymentDetails--name"]').val(),
                                    'PrimaryBillingCard': true
                                },
                                'UserSessionId': pc.gc.UserSessionId,
                                'LoyaltyNumber': loyaltyNumber
                            }),
                            crossDomain: true
                        })
                       .always(function (response) {
                           var data;
                           if (typeof response.responseText !== 'undefined') {
                               data = JSON.parse(response.responseText);
                           }
                           else {
                               data = response;
                           }
                           if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) {
                               //  console.log(data);

                               // check for newsletter sign up
                               var $newsletterField = $('[name="confirmnewsletter"]');

                               if ($newsletterField.length > 0 && $newsletterField.is(':checked') === true && $newsletterField.val() !== '' && $newsletterField.val() !== '0') {
                                   $.ajax({
                                       type: "POST",
                                       url: "/api/subscription/cinema/" + book.cinemaid + '?name=' + $fields.filter('[name="CustomerDetails--FirstName"]').val() + ' ' + $fields.filter('[name="CustomerDetails--LastName"]').val() + '?email=' + $fields.filter('[name="CustomerDetails--Email"]').val()
                                   })
                                   .done(function (data) {
                                       // ga tracking
                                       if (typeof dataLayer !== 'undefined') {
                                           dataLayer.push({ 'GAevent': 'Newsletter Success' });
                                       }

                                       // fb tracking
                                       window._fbq = window._fbq || [];
                                       window._fbq.push(['track', '6027593607513', { 'value': '0.00', 'currency': 'GBP' }]);
                                   });
                               }

                               // update BookingConfirmationId
                               $('[data-gc-bookingconfirmationid]').html(data.BookingConfirmationId);

                               // show confirmation
                               $('[data-gc-page="payment"]').addClass('dn');
                               $('[data-gc-page="confirmation"]').removeClass('dn');

                           }
                           else {
                               showError(data.PeachErrorCode);
                           }
                       });
                    }
                    else {
                        showError(data.PeachErrorCode);
                    }
                });
            };

            // get gift cards
            if (typeof pc.gvitems !== 'undefined' && pc.gvitems !== null && pc.gvitems.length > 0) {
                setupGiftCards({
                    ListConcessionGrouping: pc.gvitems
                });
            }
            else {
                $.ajax({
                    url: pc.api.booking + 'api/giftcard/GetGiftCards/' + pc.api.giftStoreId,
                    type: 'GET'
                }).always(setupGiftCards);
            } 
        }
    }
          
    function saveBasket() {
        $('[data-gc-item-index]').each(function (index) {
            var cardIndex = $(this).data('gc-item-index');
            var lineId = $('[data-gc-item-index="' + cardIndex + '"][data-gc-item-lineid]').attr('data-gc-item-lineid');

            var orderDelivery = {};
            if (pc.gc.Type === "isEGiftCard") {
                orderDelivery['IsGift'] = "true";
            }
            else {
                orderDelivery['IsGift'] = "false";
            }

            orderDelivery['IsGiftWrapped'] = "false";
            orderDelivery['GiftMessage'] = $('[data-gc-item-index="' + cardIndex + '"] [name="RecipientDetails--GiftMessage"]').val();

            var deliveryAddress = {};
            var billingAddress = {};

            deliveryAddress['sendToDetails'] = $('[name="SendTo"]:checked').val();
            // sendToArray = [];
            sendToFriend = $('[name="SendTo"]:checked').val() === "recipient" ? true : false;

            if (sendToFriend) {
                // send to recipient  
                if (pc.apiConcessionTypeSwitch === "egiftcards") {
                    deliveryAddress['pFirstName'] = $('[name="RecipientDetails--FirstName"]').val();
                    deliveryAddress['pLastName'] = $('[name="RecipientDetails--LastName"]').val();
                    deliveryAddress['Name'] = $('[name="RecipientDetails--FirstName"]').val() + ' ' + $('[name="RecipientDetails--LastName"]').val();
                    deliveryAddress['SendTo'] = $('[name="RecipientDetails--FirstName"]').val() + ' ' + $('[name="RecipientDetails--LastName"]').val();
                    deliveryAddress['Email'] = $('[name="RecipientDetails--Email"]').val();
                } else {
                    deliveryAddress['pFirstName'] = $('[name="RecipientDetails--FirstName"]').val();
                    deliveryAddress['pLastName'] = $('[name="RecipientDetails--LastName"]').val();
                    deliveryAddress['Name'] = $('[name="RecipientDetails--FirstName"]').val() + ' ' + $('[name="RecipientDetails--LastName"]').val();
                    deliveryAddress['SendTo'] = $('[name="RecipientDetails--FirstName"]').val() + ' ' + $('[name="RecipientDetails--LastName"]').val();
                    deliveryAddress['Address1'] = $('[name="RecipientDetails-AddressLine1"]').val();
                    deliveryAddress['Address2'] = $('[name="RecipientDetails-AddressLine2"]').val();
                    deliveryAddress['Town'] = $('[name="RecipientDetails-City"]').val();                    
                    deliveryAddress['Postcode'] = $('[name="RecipientDetails-Zip"]').val();
                }
            }
            else {

                if (pc.apiConcessionTypeSwitch === "egiftcards") {
                    deliveryAddress['Name'] = $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val();
                    deliveryAddress['Email'] = $('[name="CustomerDetails--Email"]').val();
                } else {
                    deliveryAddress['Name'] = $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val();
                    deliveryAddress['SendTo'] = $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val();
                    deliveryAddress['Address1'] = $('[name="CustomerDetails-AddressLine1"]').val();
                    deliveryAddress['Address2'] = $('[name="CustomerDetails-AddressLine2"]').val();
                    deliveryAddress['Town'] = $('[name="CustomerDetails-City"]').val();
                    deliveryAddress['Postcode'] = $('[name="CustomerDetails-Zip"]').val();
                }
            }


            billingAddress['Name'] = $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val();
            billingAddress['Email'] = $('[name="CustomerDetails--Email"]').val();
            billingAddress['SendTo'] = $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val();
            billingAddress['Address1'] = $('[name="CustomerDetails-AddressLine1"]').val();
            billingAddress['Address2'] = $('[name="CustomerDetails-AddressLine2"]').val();
            billingAddress['Town'] = $('[name="CustomerDetails-City"]').val();
            billingAddress['Postcode'] = $('[name="CustomerDetails-Zip"]').val();
            billingAddress['Email'] = $('[name="CustomerDetails--Email"]').val();


            orderDelivery['deliveryAddress'] = deliveryAddress;
            orderDelivery['billingAddress'] = billingAddress;

            $.each(pc.gc.Concessions, function (key, val) {
                if (pc.gc.Concessions[key].LineId === lineId) {
                    pc.gc.Concessions[key]['OrderDelivery'] = orderDelivery;
                }
            });

        });
    }

    function changeStep(newStep) {

        // reset error message
        $('[data-gc-error]').html('');
        // hide active page
        $('[data-gc-page].active').removeClass('active').addClass('dn');
        // show new page
        $('[data-gc-page="' + newStep + '"]').removeClass('dn').addClass('active');
        $('html,body').scrollTop(0);
        // hide loader
        hideLoad();

    }

    function showError(error) {
        var errorMessage = '',
            hideForm = false;

        switch (error) {
            case 'payment_1':
            case 'payment_3':
                errorMessage = "We're really sorry, but there's been a problem with your order. Please drop us a line on " + pc.support.phoneNumber + " (national call rate charges apply) or email us on <a href='" + pc.support.emailAddress + "'>" + pc.support.emailAddress + "</a> so we can confirm whether your order has gone through correctly.";
                hideForm = true;
                break;
            case 'payment_2':
                errorMessage = 'The payment has been declined. Please ensure you have entered the correct details.';
                break;
            case 'payment_4':
                errorMessage = 'Your order has already been submitted for processing. Please check your email for confirmation.';
                hideForm = true;
                break;
            default:
                errorMessage = 'Sorry we could not process your order at this time. Please try again later.';
                break;
        }

        if (hideForm) {
            // stop the form from working
            $('[data-form-submit]').remove();
            $('[data-form]').off('submit').on('submit', function (e) {
                e.preventDefault();
            });
        }

        $('[data-gc-error]').html(errorMessage).show();
    }

    function showLoad() {
        $('[data-gc-load]').show();
    }

    function hideLoad() {
        $('[data-gc-load]').hide();
    }
    
    function populateGC() {
        // add gc
        var $gcPlace = $('[data-gc]'),
			id = gc.basket.Concessions.length,
			num = id + 1;

        $gcPlace.append(Mustache.to_html(gc.temp.item, { 'id': id, 'num': num }));

        $('input[type=email][name="Concessions--Email--Confirm"]').bind('paste', function (e) {
            e.preventDefault();
        });



        addGCSummary();


        // add gc list
        if (typeof gc.temp.list === 'undefined') {
            $.get('/template?name=GiftCardList&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                gc.temp.list = template;
                populateGCList(id);
            });
        }
        else {
            populateGCList(id);
        }




    }

    function populateGCList(id) {
        // add gc items to list
        // console.log('pop ' + id);
        var $gcItem = $('[data-gc-item="' + id + '"]'),
			$gcList = $gcItem.find('[data-gc-list]'),
            $gcLess = $gcItem.find('[data-gc-list-less]'),
            $gcMore = $gcItem.find('[data-gc-list-more]'),
			$gcRemove = $gcItem.find('[data-gc-remove]'),
            $gcShow = $gcItem.find('[data-gc-con-show]'),
			$gcHide = $gcItem.find('[data-gc-con-hide]'),
            $gcHidden = $gcItem.find('[data-gc-con-hidden]'),
			$gcTextArea = $gcItem.find('textarea[maxlength]');
        $gcAdd = $gcItem.find('[data-gc-add]');

        function moveItems(d) {
            // carousel functionality

            var dataLen = gc.data.length,
                curItem = parseInt($gcList.attr('data-gc-list')),
                maxItem = dataLen - 1;
                //summTotal = gc.data[curItem].pCost,

            curItem = curItem + d;

            if (curItem <= 0) {
                curItem = 0;
                $gcLess.addClass('inactive');
                $gcMore.removeClass('inactive');
            }
            else if (curItem >= maxItem) {
                curItem = maxItem;
                $gcMore.addClass('inactive');
                $gcLess.removeClass('inactive');
            }
            else {
                $gcLess.removeClass('inactive');
                $gcMore.removeClass('inactive');
            }

            $gcList.attr('data-gc-list', curItem);

            gc.basket.Concessions[id] = JSON.parse(JSON.stringify(gc.data[curItem]));
        
            updateTotals(id, gc.data[curItem].pCost);
            // console.log(gc.data[curItem].pCost);

            $gcList.css('top', (curItem * 100 * -1) + '%');
        }

        function hiddenShow() {
            if ($gcHide.is(':checked')) {
                $gcHide.prop('checked', false);
                $gcHidden.slideDown(500);
            }
        }

        function hiddenHide(id) {
            if ($gcShow.is(':checked')) {
                $gcShow.prop('checked', false);
                $gcHidden.slideUp(500, function () {
                    $gcHidden.find('[name]').val('');
                    $gcHidden.find('.invalid').removeClass('invalid');
                    $gcHidden.find('[maxlength]').trigger('keyup');
                });

                var $firstName = $('input[name="CustomerDetails--FirstName"]').val();
                var $lastName = $('input[name="CustomerDetails--LastName"]').val();
                $('[data-gc-sendto="' + id + '"]').text($firstName + " " + $lastName);
                $('[data-gc-item-summary="' + id + '"] .gc-msg').hide();
            }
        }

        $gcList.html(Mustache.to_html(gc.temp.list, gc.data));

        // set gc item to first gc
        gc.basket.Concessions[id] = {};
        gc.basket.Concessions[id] = JSON.parse(JSON.stringify(gc.data[0]));
        $gcList.attr('data-gc-list', 0);

        updateTotals(id);

        // activate carousel
        if (gc.data.length > 1) {
            $gcLess.click(function (e) {
                e.preventDefault();
                if ($(this).hasClass('inactive') === false) {
                    moveItems(-1);
                }
            });

            $gcMore.click(function (e) {
                e.preventDefault();
                if ($(this).hasClass('inactive') === false) {
                    moveItems(1);
                }
            });

            $gcMore.removeClass('inactive');
        }

        $gcRemove.click(function (e) {
            e.preventDefault();
            removeGC(id);
        });

        $gcShow.click(function (e) {
            hiddenShow();
        });

        $gcHide.click(function (e) {
            hiddenHide(id);
        });

        $gcTextArea.each(function (index) {
            var $textarea = $(this),
				maxLength = $textarea.attr('maxlength');

            function updateCount() {
                $('[data-gc-con-maxlength="' + index + '"]').html((maxLength - $textarea.val().length) + ' characters');
            }

            $textarea.on('keyup', updateCount);

            $textarea.on('paste', null, function () {
                setTimeout(function () {
                    updateCount();
                }, 20);
            });

            $textarea.before('<span data-gc-con-maxlength="' + index + '"></span>').trigger('keyup');
        });
    }


    function addGCSummary() {
        // add gc
        if (typeof gc.temp.summ === 'undefined') {
            $.get('/template?name=GiftCardItemSummary&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                gc.temp.summ = template;
                populateGCSummary();
            });
        }
        else {
            populateGCSummary();
        }
    }

    function populateGCSummary() {
        // add gc
        var $gcSummaryPlace = $('[data-gc-summary]'),
           // $gcRemove = $gcSummaryPlace.find('[data-gc-remove]'),
			id = gc.basket.Concessions.length,
			num = id + 1;
        value = gc.data[0].pCost,
        sendTo = pc.gc.sendTo;

        $gcSummaryPlace.append(Mustache.to_html(gc.temp.summ, { 'id': id, 'num': num, 'value': value, 'sendTo': sendTo }));


    }

    // end of lmt gift card

    //////// PAYMENT STUFF COPIED FROM LOYALTY ///
    // get payment provider
    function getGcPaymentProviderAdyen(data) {
    
	    setupAdyen();
	    $('[data-gc-ap-other]').hide()
	    $('[data-adyen]').removeClass('dn');
    }

    function setupAdyen() {
        if (typeof dataLayer !== 'undefined') {
            gaTrackGiftCardStartAdyenPayment();
        }

        const enableStoreDetails = pc.Authentication.HasLogin;

        const commonPostData = {
            CinemaId: pc.api.giftStoreId,
            OrderId: pc.gc.OrderId,
        }

        const getProviderSettingsData = {
            CinemaId: commonPostData.CinemaId,
            OrderId: commonPostData.OrderId,
            BlockedPaymentMethods: []
        }

        // setup Adyen payment
        $.ajax({
            url: '/api/AdyenDropIn/getProviderSettings',
            type: 'POST',
            contentType: 'application/json',
            dataType: 'json',
            crossDomain: true,
            data: JSON.stringify(getProviderSettingsData)
        }).always(function (getProviderSettingsResponse) {

            giftcardAdyen.adyenConfiguration = {
                paymentMethodsResponse: JSON.parse(getProviderSettingsResponse.PaymentMethods),
                clientKey: getProviderSettingsResponse.ClientKey,
                locale: getProviderSettingsResponse.Locale,
                environment: getProviderSettingsResponse.Environment,
                onSubmit: (state, dropin) => {
                    // initiate Adyen payment
                    initiateAdyenPayment(state, dropin)

                },
                onAdditionalDetails: (state, dropin) => {
                    showLoad();

                    const submitAdditionalDetailsData = {
                        CinemaId: commonPostData.CinemaId,
                        OrderId: commonPostData.OrderId,
                        AdyenDropInData: state.data
                    }

                    $.ajax({
                        url: '/api/AdyenDropIn/SubmitAdditionalDetails',
                        type: 'POST',
                        contentType: 'application/json',
                        dataType: 'json',
                        crossDomain: true,
                        data: JSON.stringify(submitAdditionalDetailsData)
                    }).always(function (response) {
                        if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                            let ProviderData = JSON.parse(response.CompletePaymentResponse.ProviderData);
                            if (typeof ProviderData.resultCode !== 'undefined' && ProviderData.resultCode !== null) {
                                if (ProviderData.resultCode === "Authorised") {
	                                completePaymentSuccess(response);
                                } else {

                                    if (typeof ProviderData.action !== 'undefined' && ProviderData.action !== null) {
                                        console.log(ProviderData.action.type)
                                        dropin.handleAction(ProviderData.action)
                                    } else {
                                        completePaymentFail(response);
                                    }
                                }
                            } else {
                                completePaymentFail(response);
                            }
                        }
                        else {
                            completePaymentFail(response);
                        }
                        hideLoad();

                    });
                },
                onError: (error) => {
                    throw Error(error);
                },
                paymentMethodsConfiguration: {
                    card: {
                        hasHolderName: true,
                        holderNameRequired: true,
                        enableStoreDetails: enableStoreDetails,
                        name: 'Credit or debit card',
                        amount: {
                            value: getProviderSettingsResponse.Amount,
                            currency: getProviderSettingsResponse.Currency
                        }
                    },
                    applepay: {
                        amount: {
                            value: getProviderSettingsResponse.Amount,
                            currency: getProviderSettingsResponse.Currency
                        },
                        countryCode: "GB",
                        onSubmit: (state, dropin) => {
                            initiateAdyenPayment(state, dropin)

                        }
                    }
                }
            };

            initiateAdyen();
            hideLoad();

        });


    }

    function initiateAdyenPayment(state, dropin) {
        showLoad();

        if (typeof dataLayer !== 'undefined') {
            gaTrackGiftCardProcessAdyenPayment();
        }

        const initiatePaymentRequest = {
            CinemaId: pc.api.giftStoreId,
            OrderId: pc.gc.OrderId,
            'Name': $('[name="CustomerDetails--FirstName"]').val() + ' ' + $('[name="CustomerDetails--LastName"]').val(),
            'FirstName': $('[name="CustomerDetails--FirstName"]').val(),
            'LastName': $('[name="CustomerDetails--LastName"]').val(),
            'Email': $('[name="CustomerDetails--Email"]').val(),
            'Phone': '0',
            'AdyenDropInData': state.data
        }

        $.ajax({
            url: '/api/AdyenDropIn/InitiatePayment',
            type: 'POST',
            contentType: 'application/json',
            dataType: 'json',
            crossDomain: true,
            data: JSON.stringify(initiatePaymentRequest)
        }).always(function (response) {
            if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                let ProviderData = JSON.parse(response.CompletePaymentResponse.ProviderData);
                if (typeof ProviderData.resultCode !== 'undefined' && ProviderData.resultCode !== null) {
                    if (ProviderData.resultCode === "Authorised") {
                        completePaymentSuccess(response);
                    } else {

                        if (typeof ProviderData.action !== 'undefined' && ProviderData.action !== null && dropin)
                        {
                            if (typeof ProviderData.action.type !== 'undefined' &&
                                ProviderData.action.type !== null &&
                                ProviderData.action.type === "redirect") {
                                giftcardAdyen.isAdyenRedirect = true;
                            }
                            dropin.handleAction(ProviderData.action)
                        } else {
                            completePaymentFail(response);
                        }
                    }
                } else {
                    completePaymentFail(response);
                }
            }
            else {
                completePaymentFail(response);
            }
            hideLoad();
        });
    }



    function initiateAdyen() {
        const checkout = new AdyenCheckout(giftcardAdyen.adyenConfiguration);

        const dropin = checkout
            .create('dropin', {
                openFirstPaymentMethod: true
            })
            .mount('#dropin-container');
    }

    function setupConfirmation(response) {
        $('[data-gc-page="details"]').addClass('dn');
        $('[data-gc-page="confirmation"]').removeClass('dn');
        hideLoad();
    }

    // complete payment gift cards


    function completePaymentFail(jqXHR, status, err) {
        console.log(jqXHR)
        if (typeof jqXHR !== 'undefined' && typeof jqXHR.responseText !== 'undefined') {
            showError('payment_' + JSON.parse(jqXHR.responseText).PeachErrorCode);
            hideLoad();
        }
        else {
            showError('default');
            hideLoad();
        }
    }

    function completePaymentSuccess(response) {
        setupConfirmation(response);

        if ($("input[name='LoyaltyDetails-SendNewsletter']:checked").length > 0) {

            // check their member status before signing them up

            var subsTestFirstname = $('input[name="CustomerDetails--FirstName"]').val(),
                subsTestLastname = $('input[name="CustomerDetails--LastName"]').val(),
                subsTestEmail = $('input[name="CustomerDetails--Email"]').val();
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + "api/member/MemberSearch?circuitId=13&firstName=" + subsTestFirstname + "&lastName=" + subsTestLastname + "&emailAddress=" + subsTestEmail,
                crossDomain: true
            }).done(function (data) {

                //{"UserSessionId":null,"MemberLevel":0,"StatusCode":200,"PeachErrorCode":"Member Found","ClientErrorMessage":null,"PeachCode":0} 

                // if they are a member
                if (data.StatusCode === 200) {
                    return false;
                }
                else {
                    //not a member just carry on
                    var subscData = {};
                    subscData['Firstname'] = subsTestFirstname;
                    subscData['Lastname'] = subsTestLastname;
                    subscData['Email'] = subsTestEmail;
                    subscData['ClubId'] = '13';
                    subscData['Password'] = 'null';
                    subscData['SendNewsletter'] = 'true';
                    subscData['NewsletterFrequency'] = 'true';

                    //if (SendEventsInfo) {
                    //    subscData['ContactByThirdParty'] = 'true';
                    //}

                    $.ajax({
                        url: pc.api.members + 'api/Member/Create?circuitId=' + pc.api.circuit,
                        type: 'POST',
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        data: subscData
                        //accepts: "application/json",
                        //contentType: "application/json",
                        //dataType: 'json',
                        //crossDomain: true
                    });
                }
            });
        }

        if (typeof dataLayer !== 'undefined' && pc.gc.Concessions.length > 0) {

            if (pc.gc.Type === 'isMember') {
                gaTrackMemberGiftCardPurchase();
            }

            const completedOrderData = {
                actionId: response.BookingConfirmationId,
                revenue: response.GrandTotal
            }

            gaTrackGiftCardConfirmation(completedOrderData);
        }
    }

    function gaTrackMemberGiftCardPurchase() {

        var tracking = {
            'EVERYMAN Gift Membership': {
                'virtualPageURL': 'everyman-gift-membership',
                'virtualPageTitle': 'Everyman Gift Membership Purchase'
            },
            'EVERYICON Gift Membership': {
                'virtualPageURL': 'everyicon-gift-membership',
                'virtualPageTitle': 'Everyicon Gift Membership Purchase'
            },
            'EVERYWHERE Gift Membership': {
                'virtualPageURL': 'everywhere-gift-membership',
                'virtualPageTitle': 'Everywhere Gift Membership Purchase'
            }
        };

        for (var i = 0; i < pc.gc.Concessions.length; i++) {
            if (typeof tracking[pc.gc.Concessions[i].Description] !== 'undefined') {
                dataLayer.push({
                    'event': 'VirtualPageview',
                    'virtualPageURL': tracking[pc.gc.Concessions[i].Description].virtualPageURL,
                    'virtualPageTitle': tracking[pc.gc.Concessions[i].Description].virtualPageTitle
                });
                break;
            }
        }
    }

    //Track user selecting a gift card to purchase.
    function gaTrackGiftCardSelection() {
        const gaData = {
            stepNameEnd: "selection",
            virtualPageUrlEnd: "selection",
            virtualPageTitleEnd: "Selection",
            checkoutStepNumber: 1,
            isPurchase: false
        }

        gaGiftCardTrack(gaData);
    }

    //Track user starting an Adyen payment for a gift card.
    function gaTrackGiftCardStartAdyenPayment() {
        const gaData = {
            stepNameEnd: "start-adyen-payment",
            virtualPageUrlEnd: "start-adyen-payment",
            virtualPageTitleEnd: "Start Adyen Payment",
            checkoutStepNumber: 2,
            isPurchase: false
        };

        gaGiftCardTrack(gaData);
    }

    //Track user processing an Adyen payment for a gift card.
    function gaTrackGiftCardProcessAdyenPayment() {
        const gaData = {
            stepNameEnd: "process-adyen-payment",
            virtualPageUrlEnd: "process-adyen-payment",
            virtualPageTitleEnd: "Process Adyen Payment",
            checkoutStepNumber: 3,
            isPurchase: false
        };

        gaGiftCardTrack(gaData);
    }

    //Track gift card purchase confirmation.
    function gaTrackGiftCardConfirmation(completedOrderData) {
        const gaData = {
            stepNameEnd: "confirmation",
            virtualPageUrlEnd: "confirmation",
            virtualPageTitleEnd: "Confirmation",
            checkoutStepNumber: 4,
            revenue: completedOrderData.revenue,
            actionId: completedOrderData.actionId,
            isPurchase: true
        };

        gaGiftCardTrack(gaData);
    }

    function gaGiftCardTrack(gaData) {
        const trackingObj = Object.assign({}, gaGetAuthenticatedStatusProps(gaData), gaGetGiftCardECommerceProps(gaData));
        dataLayer.push(trackingObj);
    }

    function gaGetAuthenticatedStatusProps(gaData) {
        const props = {
            event: "VirtualPageview",
            stepName: "gift-card-" + gaData.stepNameEnd
        };

        if (pc.Authentication.HasLogin) {
            props.virtualPageUrl = "giftvouchers/member-giftcard-" + gaData.virtualPageUrlEnd;
            props.virtualPageTitle = 'Member Giftcard ' + gaData.virtualPageTitleEnd;
            props.visitorStatus = 'loggedin';
            props.customerType = 'Reward Member';
            props.userID = pc.Authentication.MemberId;
        }
        else {
            props.virtualPageUrl = "giftvouchers/guest-giftcard-" + gaData.virtualPageUrlEnd;
            props.virtualPageTitle = 'Guest Giftcard ' + gaData.virtualPageTitleEnd;
            props.visitorStatus = 'loggedoff';
        }

        return props;
    }

    function gaGetGiftCardECommerceProps(gaData) {
        const products = gaGetGiftCardProducts();

        var props = {};

        if (gaData.isPurchase === true) {
            props = {
                ecommerce: {
                    purchase: {
                        actionField: {
                            affiliation: pc.api.giftStoreName,
                            revenue: parseFloat(gaData.revenue / 100).toFixed(2),
                            id: gaData.actionId
                        },
                        products: products
                    }
                }
            }
        }
        else {
            props = {
                ecommerce: {
                    checkout: {
                        actionField: {
                            step: gaData.checkoutStepNumber,
                            affiliation: pc.api.giftStoreName,
                        },
                    },
                    products: products
                }
            }
        }

        return props;
    }

    function gaGetGiftCardProducts() {
        const products = [];

        pc.gc.Concessions.forEach(function (concessionItem) {

            if (typeof concessionItem !== 'undefined') {

                products.push(
                    {
                        name: concessionItem.Title,
                        variant: concessionItem.Title,
                        id: concessionItem.Id,
                        category: 'gift card',
                        price: (parseFloat(concessionItem.Cost) / 100).toFixed(2),
                        quantity: concessionItem.Quantity
                    })
            }
        });

        return products;
    }

    function setupApplePay() {
        ApplePaySession.canMakePaymentsWithActiveCard(pc.ap.mid).then(function (hasActiveCard) {
            function applePayClick() {
                var paymentRequest = getApplePaymentRequest();
                var apSession = new ApplePaySession(pc.gc.app.apiVersion, paymentRequest);

                apSession.onvalidatemerchant = function (e) {
                    if (typeof e !== 'undefined' && e !== null && typeof e.validationURL !== 'undefined' && e.validationURL !== null) {
                        $.ajax({
                            url: '/api/applepay/ValidateAppleURL?URL=' + encodeURIComponent(e.validationURL),
                            method: 'GET'
                        }).always(function (response) {
                            var parsedResponse = JSON.parse(response);
                            apSession.completeMerchantValidation(parsedResponse.Result);
                        });
                    }
                };

                function checkData(e) {

                    var isValid = true;
                    var messages = [];

                    if (
                        typeof e === 'undefined' ||
                        e === null ||
                        typeof e.payment === 'undefined' ||
                        e.payment === null ||
                        typeof e.payment.shippingContact === 'undefined' ||
                        e.payment.shippingContact === null ||
                        typeof e.payment.billingContact === 'undefined' ||
                        e.payment.billingContact === null ||
                        typeof e.payment.token === 'undefined' ||
                        e.payment.token === null ||
                        typeof e.payment.token.paymentData === 'undefined' ||
                        e.payment.token.paymentData === null
                    ) {
                        isValid = false;
                    }

                    // shipping
                    
                    if (
                        typeof e.payment.shippingContact.emailAddress === 'undefined' ||
                        e.payment.shippingContact.emailAddress === null ||
                        e.payment.shippingContact.emailAddress.trim() === ''
                    ) {
                        messages.push(new ApplePayError('shippingContactInvalid', 'emailAddress', 'Email address is required'));
                        isValid = false;
                    }

                    if (
                        typeof e.payment.shippingContact.givenName === 'undefined' ||
                        e.payment.shippingContact.givenName === null ||
                        e.payment.shippingContact.givenName.trim() === '' ||
                        typeof e.payment.shippingContact.familyName === 'undefined' ||
                        e.payment.shippingContact.familyName === null ||
                        e.payment.shippingContact.familyName.trim() === ''
                    ) {
                        messages.push(new ApplePayError('shippingContactInvalid', 'name', 'Name is required'));
                        isValid = false;
                    }

                    if (pc.gc.Type !== 'isEGiftCard') {
                        if (
                            typeof e.payment.shippingContact.addressLines === 'undefined' ||
                            e.payment.shippingContact.addressLines === null ||
                            e.payment.shippingContact.addressLines.join(' ').trim() === ''
                        ) {
                            messages.push(new ApplePayError('shippingContactInvalid', 'addressLines', 'Address is required'));
                            isValid = false;
                        }

                        if (
                            typeof e.payment.shippingContact.postalCode === 'undefined' ||
                            e.payment.shippingContact.postalCode === null ||
                            e.payment.shippingContact.postalCode.trim() === ''
                        ) {
                            messages.push(new ApplePayError('shippingContactInvalid', 'postalCode', 'Postcode is required'));
                            isValid = false;
                        }
                    }

                    // billing

                    if (
                        typeof e.payment.billingContact.givenName === 'undefined' ||
                        e.payment.billingContact.givenName === null ||
                        e.payment.billingContact.givenName.trim() === '' ||
                        typeof e.payment.billingContact.familyName === 'undefined' ||
                        e.payment.billingContact.familyName === null ||
                        e.payment.billingContact.familyName.trim() === ''
                    ) {
                        messages.push(new ApplePayError('billingContactInvalid', 'name', 'Name is required'));
                        isValid = false;
                    }

                    if (pc.gc.Type !== 'isEGiftCard') {
                        if (
                            typeof e.payment.billingContact.addressLines === 'undefined' ||
                            e.payment.billingContact.addressLines === null ||
                            e.payment.billingContact.addressLines.join(' ').trim() === ''
                        ) {
                            messages.push(new ApplePayError('billingContactInvalid', 'addressLines', 'Address is required'));
                            isValid = false;
                        }

                        if (
                            typeof e.payment.billingContact.postalCode === 'undefined' ||
                            e.payment.billingContact.postalCode === null ||
                            e.payment.billingContact.postalCode.trim() === ''
                        ) {
                            messages.push(new ApplePayError('billingContactInvalid', 'postalCode', 'Postcode is required'));
                            isValid = false;
                        }
                    }

                    if (isValid === false) {
                        if (messages.length > 0) {
                            apSession.completePayment({
                                status: 1,
                                errors: messages
                            });
                        }
                        else {
                            apSession.completePayment({
                                status: 1
                            });
                        }
                    }

                    return isValid;
                }

                apSession.onpaymentauthorized = function (e) {
                    //console.log(e);

                    var totalTime = 29000;
                    var startTime = performance.now();

                    var hasData = checkData(e);

                    if (hasData === false) {
                        return false;
                    }
                          
                    var deliveryAddress = {
                        Name: e.payment.shippingContact.givenName + ' ' + e.payment.shippingContact.familyName,
                        SendTo: e.payment.shippingContact.givenName + ' ' + e.payment.shippingContact.familyName,
                        Email: e.payment.shippingContact.emailAddress,
                        sendToDetails: $('[name="SendToAp"]:checked').val()
                    };

                    if (pc.gc.Type !== 'isEGiftCard') {
                        deliveryAddress.Address1 = e.payment.shippingContact.addressLines.join(' ');
                        deliveryAddress.Address2 = '';
                        deliveryAddress.Town = '';
                        deliveryAddress.Postcode = e.payment.shippingContact.postalCode;
                    }

                    var billingAddress = {
                        Name: e.payment.billingContact.givenName + ' ' + e.payment.billingContact.familyName,
                        SendTo: e.payment.billingContact.givenName + ' ' + e.payment.billingContact.familyName,
                        Address1: e.payment.billingContact.addressLines.join(' '),
                        Address2: '',
                        Town: e.payment.billingContact.locality,
                        Postcode: e.payment.billingContact.postalCode
                    };

                    if ($('[name="SendToAp"]:checked').val() === 'recipient') {
                        billingAddress.Email = $('[name="CustomerDetails--Email-AP"]').val();
                    }
                    else {
                        billingAddress.Email = e.payment.shippingContact.emailAddress;
                    }   

                    $('[data-gc-item-index]').each(function (index) {
                        var cardIndex = $(this).data('gc-item-index');
                        var lineId = $('[data-gc-item-index="' + cardIndex + '"][data-gc-item-lineid]').attr('data-gc-item-lineid');

                        var orderDelivery = {
                            IsGiftWrapped: 'false',
                            GiftMessage: $('[data-gc-item-index="' + cardIndex + '"] [name="RecipientDetails--GiftMessage"]').val(),
                            IsGift: pc.gc.type === 'isEGiftCard' ? 'true' : 'false',
                            deliveryAddress: deliveryAddress,
                            billingAddress: billingAddress
                        };
                            
                        $.each(pc.gc.Concessions, function (key, val) {
                            if (pc.gc.Concessions[key].LineId === lineId) {
                                pc.gc.Concessions[key]['OrderDelivery'] = orderDelivery;
                            }
                        });

                    });

                    var addGiftCardsTimeout = Math.ceil(totalTime - (performance.now() - startTime));

                    if (addGiftCardsTimeout <= 0) {
                        apSession.completePayment({ status: 1 });
                        showError('payment_timeout');
                        hideLoad();
                        return;
                    }

                    $.ajax({
                        url: pc.api.booking + 'api/giftcard/AddGiftCards?cinemaId=' + pc.api.giftStoreId,
                        type: 'POST',
                        contentType: 'application/json',
                        dataType: 'json',
                        data: JSON.stringify({
                            'CinemaId': pc.api.giftStoreId,
                            'Concessions': pc.gc.Concessions
                        }),
                        crossDomain: true,
                        timeout: addGiftCardsTimeout
                    }).always(function (response) {
                        var data;
                        if (typeof response.responseText !== 'undefined') {
                            data = JSON.parse(response.responseText);
                        }
                        else {
                            data = response;
                        }
                        if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) { 
                            // save for later calls
                            pc.gc['UserSessionId'] = data.UserSessionId;
                            pc.gc['OrderId'] = data.OrderId;
                                                                    
                            var completeRequest = {
                                GiftCardNumber: null,
                                GiftCardOrderValue: null,
                                VoucherServiceCinemaId: null,
                                Name: null,
                                QueryString: null,
                                TestMode: pc.hostedPayment.testMode,
                                IsNewMember: false,
                                PostValues: {
                                    Email: billingAddress.Email,
                                    FirstName: e.payment.billingContact.givenName,
                                    LastName: e.payment.billingContact.familyName,
                                    Name: e.payment.billingContact.givenName + ' ' + e.payment.billingContact.familyName,
                                    OrderId: pc.gc.OrderId,
                                    UserSessionId: pc.gc.UserSessionId,
                                    PaymentProvider: pc.ap.ppId,
                                    WalletProvider: pc.ap.wallet,
                                    PaymentToken: JSON.stringify(e.payment.token.paymentData)
                                }
                            };

                            if (pc.partpayment) {
                                completeRequest.GiftCardNumber = $('[data-gc-input]').val().toString();
                                completeRequest.GiftCardOrderValue = pc.cardValue.toString();
                            }

                            //console.log(completeRequest);

                            var completePaymentTimeout = Math.ceil(totalTime - (performance.now() - startTime));
                                                        
                            if (completePaymentTimeout <= 0) {
                                apSession.completePayment({ status: 1 });
                                showError('payment_timeout');
                                hideLoad();
                                return;
                            }

                            $.ajax({
                                url: pc.api.booking + '/api/Booking/CreateTransactionWithToken/?cinemaId=' + pc.api.giftStoreId + '&isGiftCards=true',
                                type: 'POST',
                                contentType: 'application/json',
                                dataType: 'json',
                                crossDomain: true,
                                data: JSON.stringify(completeRequest)
                            }).always(function (authReponse) {
                                if (typeof authReponse !== 'undefined' && authReponse !== null && authReponse.StatusCode === 200) {
                                    $.ajax({
                                        url: pc.api.booking + 'api/Booking/CompletePayment/?cinemaId=' + pc.api.giftStoreId,
                                        type: 'POST',
                                        contentType: 'application/json',
                                        dataType: 'json',
                                        crossDomain: true,
                                        data: JSON.stringify(completeRequest)
                                    }).always(function (response) {
                                        if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                                            completePaymentSuccess(response);
                                        }
                                        else {
                                            completePaymentFail(response);
                                        }
                                    });
                                    apSession.completePayment({ status: 0 });
                                    showLoad();
                                }
                                else {
                                    apSession.completePayment({ status: 1 });
                                    completePaymentFail(response);
                                }
                            });                                    
                        }
                        else {
                            showError(data.PeachErrorCode);
                            hideLoad();
                        }
                    });
                };

                apSession.begin();
            }

            setupApplePayElements(hasActiveCard, applePayClick);
        });
    }

    function setupApplePayElements(hasActiveCard, applePayClick) {
        function btnClick(evt) {
            evt.preventDefault();

            if (pc.gc.Concessions.length === 0) {
                showError('empty');
                return;
            }

            if ($('[name="CustomerDetails--Email-AP"]:visible').length > 0 && pc.form.validateField($('[name="CustomerDetails--Email-AP"]')) === false) {
                return;
            }
            
            if (typeof applePayClick !== 'undefined' && applePayClick !== null) {
                applePayClick();
            }
        }

        if (typeof hasActiveCard !== 'undefined' && hasActiveCard !== null && hasActiveCard === true) {
            // show apple pay button
            $('[data-gc-ap-btn="buy"]').on('click', btnClick).removeClass('dn');
        }
        else {
            // show setup apple pay button
            $('[data-gc-ap-btn="setup"]').on('click', btnClick).removeClass('dn');
        }

        // hide other payment
        $('[data-gc-ap-other]').hide();
        
        // show other payment button
        $('[data-gc-ap-btn="other"]').on('click', function (evt) {
            evt.preventDefault();
            $(this).addClass('dn');            
            $('[data-gc-ap-email]').slideUp(400);
            $('[data-gc-ap-other]').slideDown(400);
        }).removeClass('dn');

        $('[name="CustomerDetails--Email-AP"]').on('change', function () {
            $('[name="CustomerDetails--Email"]').val(this.value);
        });
    }

    function getApplePaymentRequest() {
        var requestObject = {
            countryCode: 'GB',
            currencyCode: 'GBP',
            merchantCapabilities: [
                'supports3DS'
            ],
            supportedNetworks: pc.ap.methods,
            total: {
                'label': 'Everyman Cinemas',
                'type': 'final'
            },
            requiredBillingContactFields: [
                'name',
                'postalAddress'
            ]
        };

        var subTotal = 0,
            qty = 0,
            post = 0;

        $.each(pc.gc.Concessions, function (key, val) {
            subTotal += pc.gc.Concessions[key].Cost * pc.gc.Concessions[key].Quantity;
            qty += pc.gc.Concessions[key].Quantity;
        });
            
        if (pc.gc.Type === 'isEGiftCard') {
            requestObject.requiredShippingContactFields = [
                'name',
                'email'
            ];
        }
        else {
            requestObject.requiredShippingContactFields = [
                'name',
                'email',
                'postalAddress'
            ];

            pc.gc.deliveryItem.Quantity = qty;
            post = pc.gc.deliveryItem.Quantity * pc.gc.deliveryItem.Cost;

            requestObject.lineItems = [
                {
                    label: 'Subtotal',
                    amount: (subTotal/100).toFixed(2)
                },
                {
                    label: 'Delivery charges',
                    amount: (post/100).toFixed(2)
                }
            ];
        }

        requestObject.total.amount = ((subTotal + post) / 100).toFixed(2);
        
        return requestObject;
    }

    // if (typeof pc.ap !== 'undefined' && window.ApplePaySession && ApplePaySession.canMakePayments() && ApplePaySession.supportsVersion(pc.gc.app.apiVersion)) {
    //     setupApplePay();
    //     hasApplePay = true;
    // }

    function showMembershipDetails() {
        $.ajax({
            type: "GET",
            headers: {
                'ApplicationOrigin': pc.api.applicationOrigin
            },
            contentType: 'application/json',
            dataType: 'json',
            url: pc.api.members + 'api/Member/GetMembershipPrograms?circuitId=' + pc.api.circuit,
            crossDomain: true
        }).always(function (data) {
            if (
                typeof data !== 'undefined'
                && data !== null
                && typeof data.ListConcessionGrouping !== 'undefined'
                && data.ListConcessionGrouping !== null
                && data.ListConcessionGrouping.length > 0
            ) {
                var template = $('#templateMemberItem').html() || '';

                if (template !== '') {
                    for (var g = 0; g < data.ListConcessionGrouping.length; g++) {
                        var group = data.ListConcessionGrouping[g];

                        // check for items
                        if (typeof group.Items !== 'undefined'
                            && group.Items !== null
                            && group.Items.length > 0) {
                            // loop items
                            for (var c = 0; c < group.Items.length; c++) {
                                var groupItem = group.Items[c],
                                    $item = $('[data-gc-member-item="' + groupItem.Description + '"]');

                                // check item exists
                                if ($item.length > 0) {
                                    var itemData = {
                                        Title: group.Title,
                                        Copy: groupItem.ExtendedDescriptionAlt
                                    };

                                    $item.html(Mustache.render(template, itemData));
                                    $('[data-gc-member-group]').removeClass('dn');
                                }
                            }
                        }
                    }
                }
            }
        });
    }


    setup();
    
})(jQuery);



;var pc = pc || {};

pc.contest = {};

// contest functions
(function ($) {

    pc.contest.submit = function () {
        submitContestEntry();
    };

    function setup() {
        var urlPath = window.location.pathname,
			urlPathSplit = [],
			apiUrl = pc.api.contests + 'api/Contests/';

        if (urlPath.indexOf('/') > -1) {
            // Get the cinema from the url
            urlPathSplit = urlPath.split('/');

            if (urlPathSplit.length > 2) {
                cinema = urlPathSplit[2];
            }
        }

        // Build and replace the correct contests api url to the form.
        apiUrl = apiUrl + cinema + '/';
        $('[data-form]').attr('action', apiUrl);
    };

    var yob = $('input[name="yob"]');

    function getAge(dateString) {
        var today = new Date();
        var birthDate = new Date(dateString);
        var age = today.getFullYear() - birthDate.getFullYear();
        var m = today.getMonth() - birthDate.getMonth();
        if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) {
            age--;
        }
        console.log(age);
        return age;
    }

    $('[data-dob-check] input').on('blur', function () {
        if (isNaN($(this).val())) {
            alert('Please enter a valid number');
            $(this).val("");
        }
    });

    yob.on('blur', function () {

        var dobAgeCheck = $('[data-dob-check]').attr('data-dob-check');
        $dobMonth = $('[name="mob"]').val();
        $dobDay = $('[name="dob"]').val();
        $dobYear = $('[name="yob"]').val();
        $dob = $dobYear + "/" + $dobMonth + "/" + $dobDay;

        if (dobAgeCheck !== "") {

            var age = getAge($dob);

            if (isNaN(age)) {
                alert('Please enter a valid date');
                $('[data-dob-check] input').val("");
                return false
            }

            if (age <= dobAgeCheck) {
                console.log('too young');
                $('.DobDescription').css('color', 'red');
                $('[data-dob-check] input').val("");
                return false
            }

            else {
                $('.DobDescription').css('color', 'black');
            }

        }

    })

    function submitContestEntry() {
        var $queryString = {},
		    $form = $('[data-form]'),
			url = $form.attr('action'),
	        $name = $('[name="name"]').val(),
	        $email = $('[name="email"]').val(),
	        $city = $('[name="city"]').val(),
	        $rewardsNumber = $('[name="rewardsNumber"]').val(),
            $contestName = $('[data-contest-name]').data('contest-name'),
	        //$dobMonth = $('[name="mob"]').val(),
            //$dobDay = $('[name="dob"]').val(),
            //$dobYear = $('[name="yob"]').val(),
            //$dob = $dobYear + "/" + $dobMonth + "/" + $dobDay,
	        $optIn = $('[name="optInStatus"]').is(':checked'),
	        $answers = [],
	        answerString = '',
	        params = '';


        // TODO:CL Look for the date of birth age check and compare the dob form yyyy mm dd elements for the correct age.



        $('[name="question"]').each(function () {
            $answers.push($(this).val());
        });

        $form.find('input[type=radio]').each(function () {
            var field = $(this);
            if (field.prop('checked')) {
                var radioAnswer = $(this).parent().next('.radioAnswer').text();
                $answers.push(radioAnswer);
            }

        });

        $.each($answers, function (index, value) {
            index = index + 1;
            answerString += value + '||';

        });

        answerString = answerString.slice(0, answerString.length - 2);

        //testQuery = "?name=$name&email=$email&dob=$dob&city=$city&rewardsNumber=$rewardsNumber&contestName=Contest+Template+Tester&optInStatus=$optIn&answers=Answer+One||Answer+Two||Answer+Three";
        testQuery = "?name=" + $name + "&email=" + $email + "&dob=" + $dob + "&city=" + $city + "&rewardsNumber=" + $rewardsNumber + "&contestName=" + $contestName + "&optInStatus=" + $optIn + "&answers=" + answerString;

        testQuery = testQuery.split(" ").join("%20");

        console.log(testQuery);

        $.ajax({
            url: url + testQuery,
            type: 'POST',
            success: function (data) {
                $form.hide();
                $form.siblings('[data-form-success]').show();
            },
            error: function () {
                $form.hide();
                $form.siblings('[data-form-error]').show();
                throw new Error("There has been an issue with the AJAX call");
            }
        });
    };

    $('.TandCLink').on('click', function () {
        if ($(this).hasClass('active')) {
            $(this).removeClass('active');
        }

        else {
            $(this).addClass('active');
        }

        $('.TandC').toggle();
        var txt = $(".TandC").is(':visible') ? 'Hide Terms and Conditions' : 'View Terms and Conditions';
        $(".TandCLink").text(txt);
    });

    function init() {
        var $contest = $('[data-contest]');

        // check we are on booking page
        if ($contest.length > 0) {
            setup();
        }
    };

    init();

})(jQuery);;var pc = pc || {};

(function ($) {

    var $gcInput = $('[data-check-gc-input]');
    var $gcBtn = $('[data-check-gc-btn]');
    var $gcMsg = $('[data-check-gc-msg]');
    var $gcLoad = $('[data-gc-load]');

    if ($('[data-check-gc="landing"]').length === 0 || $gcInput.length === 0 || $gcBtn.length === 0) {
        return;
    }

    function showLoad() {
        $gcLoad.show();
    }

    function hideLoad() {
        $gcLoad.hide();
    }

    function showGCCheckError() {
        $gcMsg.html('Card has expired').show();
        hideLoad();
    }

    function showGCCheckSuccess(data) {
        $gcBtn.addClass('checked disabled').prop('disabled', true);

        var msg = '';

        if (data.GiftCardType === 2 && typeof data.Description !== 'undefined' && data.Description !== null && data.Description !== '') {
            msg = 'This Gift Card is valid for membership: ' + data.Description + '.<br><a href="/membership/member" class="gcMessageBtn">Join now</a>';

            $gcMsg.html(msg).show();

            hideLoad();
        }
        else if (data.GiftCardType === 1 && typeof data.BalanceRemaining !== 'undefined') {
            if (data.BalanceRemaining === 0) {
                msg = 'The Balance on this Gift Card is £0';
            }
            else {
                msg = 'Your balance is £' + (parseFloat(data.BalanceRemaining) / 100).toFixed(2);
            }

            $gcMsg.html(msg).show();

            hideLoad();
        }
        else {
            showGCCheckError();
        }
    }

    $gcInput.focus(function () {
        $gcBtn.prop('disabled', false).removeClass('disabled checked');
    });

    $gcBtn.on('click', function (e) {
        e.preventDefault();

        showLoad();

        var barcode = $gcInput.val() || '';

        if (barcode === '') {
            showGCCheckError();
            return;
        }

        $.ajax({
            url: '/api/GiftCard/GetGiftCardBalance?cinemaId=' + pc.api.giftStoreId + '&barcode=' + barcode,
            type: 'GET'
        }).always(function (response) {
            console.log(response);

            if (typeof response !== 'undefined' && response !== null && response.PeachCode === 0) {
                showGCCheckSuccess(response);
            }
            else {
                showGCCheckError();
            }
        });
    });
})(jQuery);;(function ($) {
var monthNames = [
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December"
];

var monthObj = {
    January: { "Dates":[], "Year": 0 },
    February: { "Dates": [], "Year": 0 },
    March: { "Dates": [], "Year": 0 },
    April: { "Dates": [], "Year": 0 },
    May: { "Dates": [], "Year": 0 },
    June: { "Dates": [], "Year": 0 },
    July: { "Dates": [], "Year": 0 },
    August: { "Dates": [], "Year": 0 },
    September: { "Dates": [], "Year": 0 },
    October: { "Dates": [], "Year": 0 },
    November: { "Dates": [], "Year": 0 },
    December: { "Dates": [], "Year": 0 }
};

var options = "";

$('[data-startdate]').each(function (index) {

    var date = $(this).data('startdate');
    var dateArr = date.split('/');
    var month = dateArr[1] * 1;
    var year = dateArr[2];
    var monthName = monthNames[month - 1];
    monthObj[monthName]['Dates'].push(month);
    monthObj[monthName]['Year'] = year;
});

for (property in monthObj) {
    var mymonth = property;
    var hasDates = monthObj[property]['Dates'].length;
    var myYear = monthObj[property]['Year'];

    if (hasDates > 0) {

        var option = '<option value="' + mymonth + '" data-year="' + myYear + '">' + mymonth + " " + myYear + '</option>';

        options += option;
    } 
}

$('[data-event-filter]').append(options);

var arr = [];

$('[data-event-filter] option').each(function (i, obj) {
    var prop = {};
    prop.elem = $(this);
    prop.year = $(this).data('year');
    prop.month = $(this).data('month')
    arr.push(prop);
});

function vascending(a, b) {
    return a.year - b.year;
};

arr.sort(vascending);

options2 = "";

$.each(arr, function (index, item) {
    $('[data-event-filter]').append(item.elem);
});

$('[data-event-filter]').change(function () {
    var theMonth = $(this).val();

    if (theMonth == 0) {

        $('[data-month]').css('display', 'block');
    }
    else {

        $('[data-month]').each(function (i, obj) {
            that = $(this);
            if (that.data('month') == theMonth) {
                that.css('display', 'block');
            }

            else {
                that.css('display', 'none');
            }
        });
    }
});

})(jQuery);;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).AdyenCheckout=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=function(e){return e&&e.Math==Math&&e},r=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||function(){return this}()||Function("return this")(),a={},n=function(e){try{return!!e()}catch(e){return!0}},o=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),i={},l={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,c=s&&!l.call({1:2},1);i.f=c?function(e){var t=s(this,e);return!!t&&t.enumerable}:l;var d=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,p=function(e){return u.call(e).slice(8,-1)},m=p,h="".split,f=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==m(e)?h.call(e,""):Object(e)}:Object,y=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},b=f,v=y,g=function(e){return b(v(e))},k=function(e){return"object"==typeof e?null!==e:"function"==typeof e},C=k,_=function(e,t){if(!C(e))return e;var r,a;if(t&&"function"==typeof(r=e.toString)&&!C(a=r.call(e)))return a;if("function"==typeof(r=e.valueOf)&&!C(a=r.call(e)))return a;if(!t&&"function"==typeof(r=e.toString)&&!C(a=r.call(e)))return a;throw TypeError("Can't convert object to primitive value")},N=y,w=function(e){return Object(N(e))},P=w,F={}.hasOwnProperty,D=Object.hasOwn||function(e,t){return F.call(P(e),t)},S=k,x=r.document,A=S(x)&&S(x.createElement),B=function(e){return A?x.createElement(e):{}},T=B,z=!o&&!n((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),M=o,I=i,j=d,O=g,E=_,R=D,L=z,V=Object.getOwnPropertyDescriptor;a.f=M?V:function(e,t){if(e=O(e),t=E(t,!0),L)try{return V(e,t)}catch(e){}if(R(e,t))return j(!I.f.call(e,t),e[t])};var U={},K=k,H=function(e){if(!K(e))throw TypeError(String(e)+" is not an object");return e},q=o,G=z,Y=H,W=_,J=Object.defineProperty;U.f=q?J:function(e,t,r){if(Y(e),t=W(t,!0),Y(r),G)try{return J(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Z=U,Q=d,$=o?function(e,t,r){return Z.f(e,t,Q(1,r))}:function(e,t,r){return e[t]=r,e},X={exports:{}},ee=r,te=$,re=function(e,t){try{te(ee,e,t)}catch(r){ee[e]=t}return t},ae=re,ne="__core-js_shared__",oe=r[ne]||ae(ne,{}),ie=oe,le=Function.toString;"function"!=typeof ie.inspectSource&&(ie.inspectSource=function(e){return le.call(e)});var se=ie.inspectSource,ce=se,de=r.WeakMap,ue="function"==typeof de&&/native code/.test(ce(de)),pe={exports:{}},me=oe;(pe.exports=function(e,t){return me[e]||(me[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"});var he,fe,ye,be=0,ve=Math.random(),ge=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++be+ve).toString(36)},ke=pe.exports,Ce=ge,_e=ke("keys"),Ne=function(e){return _e[e]||(_e[e]=Ce(e))},we={},Pe=ue,Fe=k,De=$,Se=D,xe=oe,Ae=Ne,Be=we,Te="Object already initialized",ze=r.WeakMap;if(Pe||xe.state){var Me=xe.state||(xe.state=new ze),Ie=Me.get,je=Me.has,Oe=Me.set;he=function(e,t){if(je.call(Me,e))throw new TypeError(Te);return t.facade=e,Oe.call(Me,e,t),t},fe=function(e){return Ie.call(Me,e)||{}},ye=function(e){return je.call(Me,e)}}else{var Ee=Ae("state");Be[Ee]=!0,he=function(e,t){if(Se(e,Ee))throw new TypeError(Te);return t.facade=e,De(e,Ee,t),t},fe=function(e){return Se(e,Ee)?e[Ee]:{}},ye=function(e){return Se(e,Ee)}}var Re={set:he,get:fe,has:ye,enforce:function(e){return ye(e)?fe(e):he(e,{})},getterFor:function(e){return function(t){var r;if(!Fe(t)||(r=fe(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}}},Le=r,Ve=$,Ue=D,Ke=re,He=se,qe=Re.get,Ge=Re.enforce,Ye=String(String).split("String");(X.exports=function(e,t,r,a){var n,o=!!a&&!!a.unsafe,i=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof r&&("string"!=typeof t||Ue(r,"name")||Ve(r,"name",t),(n=Ge(r)).source||(n.source=Ye.join("string"==typeof t?t:""))),e!==Le?(o?!l&&e[t]&&(i=!0):delete e[t],i?e[t]=r:Ve(e,t,r)):i?e[t]=r:Ke(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&qe(this).source||He(this)}));var We=r,Je=We,Ze=r,Qe=function(e){return"function"==typeof e?e:void 0},$e=function(e,t){return arguments.length<2?Qe(Je[e])||Qe(Ze[e]):Je[e]&&Je[e][t]||Ze[e]&&Ze[e][t]},Xe={},et=Math.ceil,tt=Math.floor,rt=function(e){return isNaN(e=+e)?0:(e>0?tt:et)(e)},at=rt,nt=Math.min,ot=function(e){return e>0?nt(at(e),9007199254740991):0},it=rt,lt=Math.max,st=Math.min,ct=g,dt=ot,ut=function(e,t){var r=it(e);return r<0?lt(r+t,0):st(r,t)},pt=function(e){return function(t,r,a){var n,o=ct(t),i=dt(o.length),l=ut(a,i);if(e&&r!=r){for(;i>l;)if((n=o[l++])!=n)return!0}else for(;i>l;l++)if((e||l in o)&&o[l]===r)return e||l||0;return!e&&-1}},mt={includes:pt(!0),indexOf:pt(!1)},ht=D,ft=g,yt=mt.indexOf,bt=we,vt=function(e,t){var r,a=ft(e),n=0,o=[];for(r in a)!ht(bt,r)&&ht(a,r)&&o.push(r);for(;t.length>n;)ht(a,r=t[n++])&&(~yt(o,r)||o.push(r));return o},gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=vt,Ct=gt.concat("length","prototype");Xe.f=Object.getOwnPropertyNames||function(e){return kt(e,Ct)};var _t={};_t.f=Object.getOwnPropertySymbols;var Nt=Xe,wt=_t,Pt=H,Ft=$e("Reflect","ownKeys")||function(e){var t=Nt.f(Pt(e)),r=wt.f;return r?t.concat(r(e)):t},Dt=D,St=Ft,xt=a,At=U,Bt=n,Tt=/#|\.prototype\./,zt=function(e,t){var r=It[Mt(e)];return r==Ot||r!=jt&&("function"==typeof t?Bt(t):!!t)},Mt=zt.normalize=function(e){return String(e).replace(Tt,".").toLowerCase()},It=zt.data={},jt=zt.NATIVE="N",Ot=zt.POLYFILL="P",Et=zt,Rt=r,Lt=a.f,Vt=$,Ut=X.exports,Kt=re,Ht=function(e,t){for(var r=St(t),a=At.f,n=xt.f,o=0;o<r.length;o++){var i=r[o];Dt(e,i)||a(e,i,n(t,i))}},qt=Et,Gt=function(e,t){var r,a,n,o,i,l=e.target,s=e.global,c=e.stat;if(r=s?Rt:c?Rt[l]||Kt(l,{}):(Rt[l]||{}).prototype)for(a in t){if(o=t[a],n=e.noTargetGet?(i=Lt(r,a))&&i.value:r[a],!qt(s?a:l+(c?".":"#")+a,e.forced)&&void 0!==n){if(typeof o==typeof n)continue;Ht(o,n)}(e.sham||n&&n.sham)&&Vt(o,"sham",!0),Ut(r,a,o,e)}},Yt=vt,Wt=gt,Jt=Object.keys||function(e){return Yt(e,Wt)},Zt=o,Qt=n,$t=Jt,Xt=_t,er=i,tr=w,rr=f,ar=Object.assign,nr=Object.defineProperty,or=!ar||Qt((function(){if(Zt&&1!==ar({b:1},ar(nr({},"a",{enumerable:!0,get:function(){nr(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),a="abcdefghijklmnopqrst";return e[r]=7,a.split("").forEach((function(e){t[e]=e})),7!=ar({},e)[r]||$t(ar({},t)).join("")!=a}))?function(e,t){for(var r=tr(e),a=arguments.length,n=1,o=Xt.f,i=er.f;a>n;)for(var l,s=rr(arguments[n++]),c=o?$t(s).concat(o(s)):$t(s),d=c.length,u=0;d>u;)l=c[u++],Zt&&!i.call(s,l)||(r[l]=s[l]);return r}:ar;Gt({target:"Object",stat:!0,forced:Object.assign!==or},{assign:or}),We.Object.assign;var ir=w,lr=Jt;Gt({target:"Object",stat:!0,forced:n((function(){lr(1)}))},{keys:function(e){return lr(ir(e))}}),We.Object.keys;var sr,cr,dr=$e("navigator","userAgent")||"",ur=dr,pr=r.process,mr=pr&&pr.versions,hr=mr&&mr.v8;hr?cr=(sr=hr.split("."))[0]<4?1:sr[0]+sr[1]:ur&&(!(sr=ur.match(/Edge\/(\d+)/))||sr[1]>=74)&&(sr=ur.match(/Chrome\/(\d+)/))&&(cr=sr[1]);var fr,yr=cr&&+cr,br=yr,vr=n,gr=!!Object.getOwnPropertySymbols&&!vr((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&br&&br<41})),kr=gr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Cr=r,_r=pe.exports,Nr=D,wr=ge,Pr=gr,Fr=kr,Dr=_r("wks"),Sr=Cr.Symbol,xr=Fr?Sr:Sr&&Sr.withoutSetter||wr,Ar=function(e){return Nr(Dr,e)&&(Pr||"string"==typeof Dr[e])||(Pr&&Nr(Sr,e)?Dr[e]=Sr[e]:Dr[e]=xr("Symbol."+e)),Dr[e]},Br=U,Tr=H,zr=Jt,Mr=o?Object.defineProperties:function(e,t){Tr(e);for(var r,a=zr(t),n=a.length,o=0;n>o;)Br.f(e,r=a[o++],t[r]);return e},Ir=$e("document","documentElement"),jr=H,Or=Mr,Er=gt,Rr=we,Lr=Ir,Vr=B,Ur=Ne("IE_PROTO"),Kr=function(){},Hr=function(e){return"<script>"+e+"</"+"script>"},qr=function(){try{fr=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;qr=fr?function(e){e.write(Hr("")),e.close();var t=e.parentWindow.Object;return e=null,t}(fr):((t=Vr("iframe")).style.display="none",Lr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Hr("document.F=Object")),e.close(),e.F);for(var r=Er.length;r--;)delete qr.prototype[Er[r]];return qr()};Rr[Ur]=!0;var Gr=Object.create||function(e,t){var r;return null!==e?(Kr.prototype=jr(e),r=new Kr,Kr.prototype=null,r[Ur]=e):r=qr(),void 0===t?r:Or(r,t)},Yr=Gr,Wr=U,Jr=Ar("unscopables"),Zr=Array.prototype;null==Zr[Jr]&&Wr.f(Zr,Jr,{configurable:!0,value:Yr(null)});var Qr=function(e){Zr[Jr][e]=!0},$r=mt.includes,Xr=Qr;Gt({target:"Array",proto:!0},{includes:function(e){return $r(this,e,arguments.length>1?arguments[1]:void 0)}}),Xr("includes");var ea=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},ta=ea,ra=function(e,t,r){if(ta(e),void 0===t)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,a){return e.call(t,r,a)};case 3:return function(r,a,n){return e.call(t,r,a,n)}}return function(){return e.apply(t,arguments)}},aa=r,na=ra,oa=Function.call,ia=function(e,t,r){return na(oa,aa[e].prototype[t],r)};ia("Array","includes");var la=p,sa=Array.isArray||function(e){return"Array"==la(e)},ca=k,da=sa,ua=Ar("species"),pa=ra,ma=f,ha=w,fa=ot,ya=function(e,t){var r;return da(e)&&("function"!=typeof(r=e.constructor)||r!==Array&&!da(r.prototype)?ca(r)&&null===(r=r[ua])&&(r=void 0):r=void 0),new(void 0===r?Array:r)(0===t?0:t)},ba=[].push,va=function(e){var t=1==e,r=2==e,a=3==e,n=4==e,o=6==e,i=7==e,l=5==e||o;return function(s,c,d,u){for(var p,m,h=ha(s),f=ma(h),y=pa(c,d,3),b=fa(f.length),v=0,g=u||ya,k=t?g(s,b):r||i?g(s,0):void 0;b>v;v++)if((l||v in f)&&(m=y(p=f[v],v,h),e))if(t)k[v]=m;else if(m)switch(e){case 3:return!0;case 5:return p;case 6:return v;case 2:ba.call(k,p)}else switch(e){case 4:return!1;case 7:ba.call(k,p)}return o?-1:a||n?n:k}},ga={forEach:va(0),map:va(1),filter:va(2),some:va(3),every:va(4),find:va(5),findIndex:va(6),filterOut:va(7)},ka=Gt,Ca=ga.find,_a=Qr,Na="find",wa=!0;Na in[]&&Array(1).find((function(){wa=!1})),ka({target:"Array",proto:!0,forced:wa},{find:function(e){return Ca(this,e,arguments.length>1?arguments[1]:void 0)}}),_a(Na),ia("Array","find");var Pa=Gt,Fa=ga.findIndex,Da=Qr,Sa="findIndex",xa=!0;Sa in[]&&Array(1).findIndex((function(){xa=!1})),Pa({target:"Array",proto:!0,forced:xa},{findIndex:function(e){return Fa(this,e,arguments.length>1?arguments[1]:void 0)}}),Da(Sa),ia("Array","findIndex");var Aa=!n((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ba=D,Ta=w,za=Aa,Ma=Ne("IE_PROTO"),Ia=Object.prototype,ja=za?Object.getPrototypeOf:function(e){return e=Ta(e),Ba(e,Ma)?e[Ma]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Ia:null},Oa=k,Ea=H,Ra=function(e){if(!Oa(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e},La=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),t=r instanceof Array}catch(e){}return function(r,a){return Ea(r),Ra(a),t?e.call(r,a):r.__proto__=a,r}}():void 0),Va={},Ua=Va,Ka=Ar("iterator"),Ha=Array.prototype,qa={};qa[Ar("toStringTag")]="z";var Ga="[object z]"===String(qa),Ya=Ga,Wa=p,Ja=Ar("toStringTag"),Za="Arguments"==Wa(function(){return arguments}()),Qa=Ya?Wa:function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),Ja))?r:Za?Wa(t):"Object"==(a=Wa(t))&&"function"==typeof t.callee?"Arguments":a},$a=Qa,Xa=Va,en=Ar("iterator"),tn=H,rn=H,an=function(e){return void 0!==e&&(Ua.Array===e||Ha[Ka]===e)},nn=ot,on=ra,ln=function(e){if(null!=e)return e[en]||e["@@iterator"]||Xa[$a(e)]},sn=function(e){var t=e.return;if(void 0!==t)return tn(t.call(e)).value},cn=function(e,t){this.stopped=e,this.result=t},dn=function(e,t,r){var a,n,o,i,l,s,c,d=r&&r.that,u=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),m=!(!r||!r.INTERRUPTED),h=on(t,d,1+u+m),f=function(e){return a&&sn(a),new cn(!0,e)},y=function(e){return u?(rn(e),m?h(e[0],e[1],f):h(e[0],e[1])):m?h(e,f):h(e)};if(p)a=e;else{if("function"!=typeof(n=ln(e)))throw TypeError("Target is not iterable");if(an(n)){for(o=0,i=nn(e.length);i>o;o++)if((l=y(e[o]))&&l instanceof cn)return l;return new cn(!1)}a=n.call(e)}for(s=a.next;!(c=s.call(a)).done;){try{l=y(c.value)}catch(e){throw sn(a),e}if("object"==typeof l&&l&&l instanceof cn)return l}return new cn(!1)},un=Gt,pn=ja,mn=La,hn=Gr,fn=$,yn=d,bn=dn,vn=function(e,t){var r=this;if(!(r instanceof vn))return new vn(e,t);mn&&(r=mn(new Error(void 0),pn(r))),void 0!==t&&fn(r,"message",String(t));var a=[];return bn(e,a.push,{that:a}),fn(r,"errors",a),r};vn.prototype=hn(Error.prototype,{constructor:yn(5,vn),message:yn(5,""),name:yn(5,"AggregateError")}),un({global:!0},{AggregateError:vn});var gn=Qa,kn=Ga?{}.toString:function(){return"[object "+gn(this)+"]"},Cn=Ga,_n=X.exports,Nn=kn;Cn||_n(Object.prototype,"toString",Nn,{unsafe:!0});var wn=r.Promise,Pn=X.exports,Fn=U.f,Dn=D,Sn=Ar("toStringTag"),xn=function(e,t,r){e&&!Dn(e=r?e:e.prototype,Sn)&&Fn(e,Sn,{configurable:!0,value:t})},An=$e,Bn=U,Tn=o,zn=Ar("species"),Mn=Ar("iterator"),In=!1;try{var jn=0,On={next:function(){return{done:!!jn++}},return:function(){In=!0}};On[Mn]=function(){return this},Array.from(On,(function(){throw 2}))}catch(Pm){}var En,Rn,Ln,Vn=H,Un=ea,Kn=Ar("species"),Hn=function(e,t){var r,a=Vn(e).constructor;return void 0===a||null==(r=Vn(a)[Kn])?t:Un(r)},qn=/(?:iphone|ipod|ipad).*applewebkit/i.test(dr),Gn="process"==p(r.process),Yn=r,Wn=n,Jn=ra,Zn=Ir,Qn=B,$n=qn,Xn=Gn,eo=Yn.location,to=Yn.setImmediate,ro=Yn.clearImmediate,ao=Yn.process,no=Yn.MessageChannel,oo=Yn.Dispatch,io=0,lo={},so="onreadystatechange",co=function(e){if(lo.hasOwnProperty(e)){var t=lo[e];delete lo[e],t()}},uo=function(e){return function(){co(e)}},po=function(e){co(e.data)},mo=function(e){Yn.postMessage(e+"",eo.protocol+"//"+eo.host)};to&&ro||(to=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return lo[++io]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},En(io),io},ro=function(e){delete lo[e]},Xn?En=function(e){ao.nextTick(uo(e))}:oo&&oo.now?En=function(e){oo.now(uo(e))}:no&&!$n?(Ln=(Rn=new no).port2,Rn.port1.onmessage=po,En=Jn(Ln.postMessage,Ln,1)):Yn.addEventListener&&"function"==typeof postMessage&&!Yn.importScripts&&eo&&"file:"!==eo.protocol&&!Wn(mo)?(En=mo,Yn.addEventListener("message",po,!1)):En=so in Qn("script")?function(e){Zn.appendChild(Qn("script")).onreadystatechange=function(){Zn.removeChild(this),co(e)}}:function(e){setTimeout(uo(e),0)});var ho,fo,yo,bo,vo,go,ko,Co,_o={set:to,clear:ro},No=/web0s(?!.*chrome)/i.test(dr),wo=r,Po=a.f,Fo=_o.set,Do=qn,So=No,xo=Gn,Ao=wo.MutationObserver||wo.WebKitMutationObserver,Bo=wo.document,To=wo.process,zo=wo.Promise,Mo=Po(wo,"queueMicrotask"),Io=Mo&&Mo.value;Io||(ho=function(){var e,t;for(xo&&(e=To.domain)&&e.exit();fo;){t=fo.fn,fo=fo.next;try{t()}catch(e){throw fo?bo():yo=void 0,e}}yo=void 0,e&&e.enter()},Do||xo||So||!Ao||!Bo?zo&&zo.resolve?((ko=zo.resolve(void 0)).constructor=zo,Co=ko.then,bo=function(){Co.call(ko,ho)}):bo=xo?function(){To.nextTick(ho)}:function(){Fo.call(wo,ho)}:(vo=!0,go=Bo.createTextNode(""),new Ao(ho).observe(go,{characterData:!0}),bo=function(){go.data=vo=!vo}));var jo=Io||function(e){var t={fn:e,next:void 0};yo&&(yo.next=t),fo||(fo=t,bo()),yo=t},Oo={},Eo=ea,Ro=function(e){var t,r;this.promise=new e((function(e,a){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=a})),this.resolve=Eo(t),this.reject=Eo(r)};Oo.f=function(e){return new Ro(e)};var Lo,Vo,Uo,Ko,Ho=H,qo=k,Go=Oo,Yo=function(e,t){if(Ho(e),qo(t)&&t.constructor===e)return t;var r=Go.f(e);return(0,r.resolve)(t),r.promise},Wo=r,Jo=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Zo="object"==typeof window,Qo=Gt,$o=r,Xo=$e,ei=wn,ti=X.exports,ri=function(e,t,r){for(var a in t)Pn(e,a,t[a],r);return e},ai=La,ni=xn,oi=function(e){var t=An(e),r=Bn.f;Tn&&t&&!t[zn]&&r(t,zn,{configurable:!0,get:function(){return this}})},ii=k,li=ea,si=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e},ci=se,di=dn,ui=function(e,t){if(!t&&!In)return!1;var r=!1;try{var a={};a[Mn]=function(){return{next:function(){return{done:r=!0}}}},e(a)}catch(e){}return r},pi=Hn,mi=_o.set,hi=jo,fi=Yo,yi=function(e,t){var r=Wo.console;r&&r.error&&(1===arguments.length?r.error(e):r.error(e,t))},bi=Oo,vi=Jo,gi=Re,ki=Et,Ci=Zo,_i=Gn,Ni=yr,wi=Ar("species"),Pi="Promise",Fi=gi.get,Di=gi.set,Si=gi.getterFor(Pi),xi=ei&&ei.prototype,Ai=ei,Bi=xi,Ti=$o.TypeError,zi=$o.document,Mi=$o.process,Ii=bi.f,ji=Ii,Oi=!!(zi&&zi.createEvent&&$o.dispatchEvent),Ei="function"==typeof PromiseRejectionEvent,Ri="unhandledrejection",Li=!1,Vi=ki(Pi,(function(){var e=ci(Ai)!==String(Ai);if(!e&&66===Ni)return!0;if(Ni>=51&&/native code/.test(Ai))return!1;var t=new Ai((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};return(t.constructor={})[wi]=r,!(Li=t.then((function(){}))instanceof r)||!e&&Ci&&!Ei})),Ui=Vi||!ui((function(e){Ai.all(e).catch((function(){}))})),Ki=function(e){var t;return!(!ii(e)||"function"!=typeof(t=e.then))&&t},Hi=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;hi((function(){for(var a=e.value,n=1==e.state,o=0;r.length>o;){var i,l,s,c=r[o++],d=n?c.ok:c.fail,u=c.resolve,p=c.reject,m=c.domain;try{d?(n||(2===e.rejection&&Wi(e),e.rejection=1),!0===d?i=a:(m&&m.enter(),i=d(a),m&&(m.exit(),s=!0)),i===c.promise?p(Ti("Promise-chain cycle")):(l=Ki(i))?l.call(i,u,p):u(i)):p(a)}catch(e){m&&!s&&m.exit(),p(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Gi(e)}))}},qi=function(e,t,r){var a,n;Oi?((a=zi.createEvent("Event")).promise=t,a.reason=r,a.initEvent(e,!1,!0),$o.dispatchEvent(a)):a={promise:t,reason:r},!Ei&&(n=$o["on"+e])?n(a):e===Ri&&yi("Unhandled promise rejection",r)},Gi=function(e){mi.call($o,(function(){var t,r=e.facade,a=e.value;if(Yi(e)&&(t=vi((function(){_i?Mi.emit("unhandledRejection",a,r):qi(Ri,r,a)})),e.rejection=_i||Yi(e)?2:1,t.error))throw t.value}))},Yi=function(e){return 1!==e.rejection&&!e.parent},Wi=function(e){mi.call($o,(function(){var t=e.facade;_i?Mi.emit("rejectionHandled",t):qi("rejectionhandled",t,e.value)}))},Ji=function(e,t,r){return function(a){e(t,a,r)}},Zi=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hi(e,!0))},Qi=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ti("Promise can't be resolved itself");var a=Ki(t);a?hi((function(){var r={done:!1};try{a.call(t,Ji(Qi,r,e),Ji(Zi,r,e))}catch(t){Zi(r,t,e)}})):(e.value=t,e.state=1,Hi(e,!1))}catch(t){Zi({done:!1},t,e)}}};if(Vi&&(Bi=(Ai=function(e){si(this,Ai,Pi),li(e),Lo.call(this);var t=Fi(this);try{e(Ji(Qi,t),Ji(Zi,t))}catch(e){Zi(t,e)}}).prototype,(Lo=function(e){Di(this,{type:Pi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=ri(Bi,{then:function(e,t){var r=Si(this),a=Ii(pi(this,Ai));return a.ok="function"!=typeof e||e,a.fail="function"==typeof t&&t,a.domain=_i?Mi.domain:void 0,r.parent=!0,r.reactions.push(a),0!=r.state&&Hi(r,!1),a.promise},catch:function(e){return this.then(void 0,e)}}),Vo=function(){var e=new Lo,t=Fi(e);this.promise=e,this.resolve=Ji(Qi,t),this.reject=Ji(Zi,t)},bi.f=Ii=function(e){return e===Ai||e===Uo?new Vo(e):ji(e)},"function"==typeof ei&&xi!==Object.prototype)){Ko=xi.then,Li||(ti(xi,"then",(function(e,t){var r=this;return new Ai((function(e,t){Ko.call(r,e,t)})).then(e,t)}),{unsafe:!0}),ti(xi,"catch",Bi.catch,{unsafe:!0}));try{delete xi.constructor}catch(Pm){}ai&&ai(xi,Bi)}Qo({global:!0,wrap:!0,forced:Vi},{Promise:Ai}),ni(Ai,Pi,!1),oi(Pi),Uo=Xo(Pi),Qo({target:Pi,stat:!0,forced:Vi},{reject:function(e){var t=Ii(this);return t.reject.call(void 0,e),t.promise}}),Qo({target:Pi,stat:!0,forced:Vi},{resolve:function(e){return fi(this,e)}}),Qo({target:Pi,stat:!0,forced:Ui},{all:function(e){var t=this,r=Ii(t),a=r.resolve,n=r.reject,o=vi((function(){var r=li(t.resolve),o=[],i=0,l=1;di(e,(function(e){var s=i++,c=!1;o.push(void 0),l++,r.call(t,e).then((function(e){c||(c=!0,o[s]=e,--l||a(o))}),n)})),--l||a(o)}));return o.error&&n(o.value),r.promise},race:function(e){var t=this,r=Ii(t),a=r.reject,n=vi((function(){var n=li(t.resolve);di(e,(function(e){n.call(t,e).then(r.resolve,a)}))}));return n.error&&a(n.value),r.promise}});var $i=ea,Xi=Oo,el=Jo,tl=dn;Gt({target:"Promise",stat:!0},{allSettled:function(e){var t=this,r=Xi.f(t),a=r.resolve,n=r.reject,o=el((function(){var r=$i(t.resolve),n=[],o=0,i=1;tl(e,(function(e){var l=o++,s=!1;n.push(void 0),i++,r.call(t,e).then((function(e){s||(s=!0,n[l]={status:"fulfilled",value:e},--i||a(n))}),(function(e){s||(s=!0,n[l]={status:"rejected",reason:e},--i||a(n))}))})),--i||a(n)}));return o.error&&n(o.value),r.promise}});var rl=ea,al=$e,nl=Oo,ol=Jo,il=dn,ll="No one promise resolved";Gt({target:"Promise",stat:!0},{any:function(e){var t=this,r=nl.f(t),a=r.resolve,n=r.reject,o=ol((function(){var r=rl(t.resolve),o=[],i=0,l=1,s=!1;il(e,(function(e){var c=i++,d=!1;o.push(void 0),l++,r.call(t,e).then((function(e){d||s||(s=!0,a(e))}),(function(e){d||s||(d=!0,o[c]=e,--l||n(new(al("AggregateError"))(o,ll)))}))})),--l||n(new(al("AggregateError"))(o,ll))}));return o.error&&n(o.value),r.promise}});var sl=Gt,cl=wn,dl=n,ul=$e,pl=Hn,ml=Yo,hl=X.exports;if(sl({target:"Promise",proto:!0,real:!0,forced:!!cl&&dl((function(){cl.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=pl(this,ul("Promise")),r="function"==typeof e;return this.then(r?function(r){return ml(t,e()).then((function(){return r}))}:e,r?function(r){return ml(t,e()).then((function(){throw r}))}:e)}}),"function"==typeof cl){var fl=ul("Promise").prototype.finally;cl.prototype.finally!==fl&&hl(cl.prototype,"finally",fl,{unsafe:!0})}var yl,bl,vl,gl=rt,kl=y,Cl=function(e){return function(t,r){var a,n,o=String(kl(t)),i=gl(r),l=o.length;return i<0||i>=l?e?"":void 0:(a=o.charCodeAt(i))<55296||a>56319||i+1===l||(n=o.charCodeAt(i+1))<56320||n>57343?e?o.charAt(i):a:e?o.slice(i,i+2):n-56320+(a-55296<<10)+65536}},_l={codeAt:Cl(!1),charAt:Cl(!0)},Nl=n,wl=ja,Pl=$,Fl=D,Dl=Ar("iterator"),Sl=!1;[].keys&&("next"in(vl=[].keys())?(bl=wl(wl(vl)))!==Object.prototype&&(yl=bl):Sl=!0),(null==yl||Nl((function(){var e={};return yl[Dl].call(e)!==e})))&&(yl={}),Fl(yl,Dl)||Pl(yl,Dl,(function(){return this}));var xl={IteratorPrototype:yl,BUGGY_SAFARI_ITERATORS:Sl},Al=xl.IteratorPrototype,Bl=Gr,Tl=d,zl=xn,Ml=Va,Il=function(){return this},jl=Gt,Ol=function(e,t,r){var a=t+" Iterator";return e.prototype=Bl(Al,{next:Tl(1,r)}),zl(e,a,!1),Ml[a]=Il,e},El=ja,Rl=La,Ll=xn,Vl=$,Ul=X.exports,Kl=Va,Hl=xl.IteratorPrototype,ql=xl.BUGGY_SAFARI_ITERATORS,Gl=Ar("iterator"),Yl="keys",Wl="values",Jl="entries",Zl=function(){return this},Ql=function(e,t,r,a,n,o,i){Ol(r,t,a);var l,s,c,d=function(e){if(e===n&&f)return f;if(!ql&&e in m)return m[e];switch(e){case Yl:case Wl:case Jl:return function(){return new r(this,e)}}return function(){return new r(this)}},u=t+" Iterator",p=!1,m=e.prototype,h=m[Gl]||m["@@iterator"]||n&&m[n],f=!ql&&h||d(n),y="Array"==t&&m.entries||h;if(y&&(l=El(y.call(new e)),Hl!==Object.prototype&&l.next&&(El(l)!==Hl&&(Rl?Rl(l,Hl):"function"!=typeof l[Gl]&&Vl(l,Gl,Zl)),Ll(l,u,!0))),n==Wl&&h&&h.name!==Wl&&(p=!0,f=function(){return h.call(this)}),m[Gl]!==f&&Vl(m,Gl,f),Kl[t]=f,n)if(s={values:d(Wl),keys:o?f:d(Yl),entries:d(Jl)},i)for(c in s)(ql||p||!(c in m))&&Ul(m,c,s[c]);else jl({target:t,proto:!0,forced:ql||p},s);return s},$l=_l.charAt,Xl=Re,es=Ql,ts="String Iterator",rs=Xl.set,as=Xl.getterFor(ts);es(String,"String",(function(e){rs(this,{type:ts,string:String(e),index:0})}),(function(){var e,t=as(this),r=t.string,a=t.index;return a>=r.length?{value:void 0,done:!0}:(e=$l(r,a),t.index+=e.length,{value:e,done:!1})}));var ns=g,os=Qr,is=Va,ls=Re,ss=Ql,cs="Array Iterator",ds=ls.set,us=ls.getterFor(cs),ps=ss(Array,"Array",(function(e,t){ds(this,{type:cs,target:ns(e),index:0,kind:t})}),(function(){var e=us(this),t=e.target,r=e.kind,a=e.index++;return!t||a>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:a,done:!1}:"values"==r?{value:t[a],done:!1}:{value:[a,t[a]],done:!1}}),"values");is.Arguments=is.Array,os("keys"),os("values"),os("entries");var ms=r,hs={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},fs=ps,ys=$,bs=Ar,vs=bs("iterator"),gs=bs("toStringTag"),ks=fs.values;for(var Cs in hs){var _s=ms[Cs],Ns=_s&&_s.prototype;if(Ns){if(Ns[vs]!==ks)try{ys(Ns,vs,ks)}catch(Pm){Ns[vs]=ks}if(Ns[gs]||ys(Ns,gs,Cs),hs[Cs])for(var ws in fs)if(Ns[ws]!==fs[ws])try{ys(Ns,ws,fs[ws])}catch(Pm){Ns[ws]=fs[ws]}}}We.Promise,[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})}));var Ps=function(e,t){return(Ps=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Fs(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ps(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var Ds=function(){return(Ds=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function Ss(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function xs(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function l(e){try{s(a.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,l)}s((a=a.apply(e,t||[])).next())}))}function As(e,t){var r,a,n,o,i={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,a&&(n=2&o[0]?a.return:o[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,o[1])).done)return n;switch(a=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return i.label++,{value:o[1],done:!1};case 5:i.label++,a=o[1],o=[0];continue;case 7:o=i.ops.pop(),i.trys.pop();continue;default:if(!(n=i.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){i=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){i.label=o[1];break}if(6===o[0]&&i.label<n[1]){i.label=n[1],n=o;break}if(n&&i.label<n[2]){i.label=n[2],i.ops.push(o);break}n[2]&&i.ops.pop(),i.trys.pop();continue}o=t.call(e,i)}catch(e){o=[6,e],a=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}function Bs(e,t){for(var r=0,a=t.length,n=e.length;r<a;r++,n++)e[n]=t[r];return e}var Ts={payButton:"Pay","payButton.redirecting":"Redirecting...",storeDetails:"Save for my next payment","creditCard.holderName":"Name on card","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Invalid cardholder name","creditCard.numberField.title":"Card number","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Expiry date","creditCard.expiryDateField.placeholder":"MM/YY","creditCard.expiryDateField.month":"Month","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"YY","creditCard.expiryDateField.year":"Year","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Remember for next time","creditCard.cvcField.placeholder.4digits":"4 digits","creditCard.cvcField.placeholder.3digits":"3 digits","creditCard.taxNumber.placeholder":"YYMMDD / 0123456789",installments:"Number of installments",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} months","installments.oneTime":"One time payment","installments.installments":"Installments payment","installments.revolving":"Revolving payment","sepaDirectDebit.ibanField.invalid":"Invalid account number","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Holder Name","sepa.ibanNumber":"Account Number (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirect failed","error.subtitle.payment":"Payment failed","error.subtitle.refused":"Payment refused","error.message.unknown":"An unknown error occurred","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"Select your bank","creditCard.success":"Payment Successful",loading:"Loading\u2026",continue:"Continue",continueTo:"Continue to","wechatpay.timetopay":"You have %@ to pay","wechatpay.scanqrcode":"Scan QR code",personalDetails:"Personal details",companyDetails:"Company details","companyDetails.name":"Company name","companyDetails.registrationNumber":"Registration number",socialSecurityNumber:"Social security number",firstName:"First name",infix:"Prefix",lastName:"Last name",mobileNumber:"Mobile number","mobileNumber.invalid":"Invalid mobile number",city:"City",postalCode:"Postal code",countryCode:"Country Code",telephoneNumber:"Telephone number",dateOfBirth:"Date of birth",shopperEmail:"Email address",gender:"Gender",male:"Male",female:"Female",billingAddress:"Billing address",street:"Street",stateOrProvince:"State or province",country:"Country",houseNumberOrName:"House number",separateDeliveryAddress:"Specify a separate delivery address",deliveryAddress:"Delivery Address",zipCode:"Zip code",apartmentSuite:"Apartment / Suite",provinceOrTerritory:"Province or Territory",cityTown:"City / Town",address:"Address",state:"State","field.title.optional":"(optional)","creditCard.cvcField.title.optional":"CVC / CVV (optional)","issuerList.wallet.placeholder":"Select your wallet",privacyPolicy:"Privacy policy","afterPay.agreement":"I agree with the %@ of AfterPay",paymentConditions:"payment conditions",openApp:"Open the app","voucher.readInstructions":"Read instructions","voucher.introduction":"Thank you for your purchase, please use the following coupon to complete your payment.","voucher.expirationDate":"Expiration Date","voucher.alternativeReference":"Alternative Reference","dragonpay.voucher.non.bank.selectField.placeholder":"Select your provider","dragonpay.voucher.bank.selectField.placeholder":"Select your bank","voucher.paymentReferenceLabel":"Payment Reference","voucher.surcharge":"Incl. %@ surcharge","voucher.introduction.doku":"Thank you for your purchase, please use the following information to complete your payment.","voucher.shopperName":"Shopper Name","voucher.merchantName":"Merchant","voucher.introduction.econtext":"Thank you for your purchase, please use the following information to complete your payment.","voucher.telephoneNumber":"Phone Number","voucher.shopperReference":"Shopper Reference","voucher.collectionInstitutionNumber":"Collection Institution Number","voucher.econtext.telephoneNumber.invalid":"Telephone number must be 10 or 11 digits long","boletobancario.btnLabel":"Generate Boleto","boleto.sendCopyToEmail":"Send a copy to my email","button.copy":"Copy","button.download":"Download","boleto.socialSecurityNumber":"CPF/CNPJ","creditCard.storedCard.description.ariaLabel":"Stored card ends in %@","voucher.entity":"Entity",donateButton:"Donate",notNowButton:"Not now",thanksForYourSupport:"Thanks for your support!",preauthorizeWith:"Preauthorize with",confirmPreauthorization:"Confirm preauthorization",confirmPurchase:"Confirm purchase",applyGiftcard:"Redeem",giftcardBalance:"Gift card balance",deductedBalance:"Deducted balance","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"First 2 digits of card password","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Invalid password","creditCard.taxNumber.label":"Cardholder birthdate (YYMMDD) or Corporate registration number (10 digits)","creditCard.taxNumber.labelAlt":"Corporate registration number (10 digits)","creditCard.taxNumber.invalid":"Invalid Cardholder birthdate or Corporate registration number","storedPaymentMethod.disable.button":"Remove","storedPaymentMethod.disable.confirmation":"Remove stored payment method","storedPaymentMethod.disable.confirmButton":"Yes, remove","storedPaymentMethod.disable.cancelButton":"Cancel","ach.bankAccount":"Bank account","ach.accountHolderNameField.title":"Account holder name","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Invalid account holder name","ach.accountNumberField.title":"Account number","ach.accountNumberField.invalid":"Invalid account number","ach.accountLocationField.title":"ABA routing number","ach.accountLocationField.invalid":"Invalid ABA routing number","select.state":"Select state","select.stateOrProvince":"Select state or province","select.provinceOrTerritory":"Select province or territory","select.country":"Select country","select.noOptionsFound":"No options found","select.filter.placeholder":"Search...","telephoneNumber.invalid":"Invalid telephone number",qrCodeOrApp:"or","paypal.processingPayment":"Processing payment...",generateQRCode:"Generate QR code","await.waitForConfirmation":"Waiting for confirmation","mbway.confirmPayment":"Confirm your payment on the MB WAY app","shopperEmail.invalid":"Invalid email address","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"You must be at least 18 years old","blik.confirmPayment":"Open your banking app to confirm the payment.","blik.invalid":"Enter 6 numbers","blik.code":"6-digit code","blik.help":"Get the code from your banking app.","swish.pendingMessage":"After you scan, the status can be pending for up to 10 minutes. Attempting to pay again within this time may result in multiple charges.","error.va.gen.01":"Incomplete field","error.va.gen.02":"Field not valid","error.va.sf-cc-num.01":"Invalid card number","error.va.sf-cc-num.03":"Unsupported card entered","error.va.sf-cc-dat.01":"Card too old","error.va.sf-cc-dat.02":"Date too far in the future","error.va.sf-cc-dat.03":"Your card expires before check out date","error.giftcard.no-balance":"This gift card has zero balance","error.giftcard.card-error":"In our records we have no gift card with this number","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","amazonpay.signout":"Sign out from Amazon","amazonpay.changePaymentDetails":"Change payment details","partialPayment.warning":"Select another payment method to pay the remaining","partialPayment.remainingBalance":"Remaining balance will be %{amount}","bankTransfer.beneficiary":"Beneficiary","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.introduction":"Continue to create a new bank transfer payment. You can use the details in the following screen to finalize this payment.","bankTransfer.instructions":"Thank you for your purchase, please use the following information to complete your payment.","bacs.accountHolderName":"Bank account holder name","bacs.accountHolderName.invalid":"Invalid bank account holder name","bacs.accountNumber":"Bank account number","bacs.accountNumber.invalid":"Invalid bank account number","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Invalid sort code","bacs.consent.amount":"I agree that the above amount will be deducted from my bank account.","bacs.consent.account":"I confirm the account is in my name and I am the only signatory required to authorise the Direct Debit on this account.",edit:"Edit","bacs.confirm":"Confirm and pay","bacs.result.introduction":"Download your Direct Debit Instruction (DDI / Mandate)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe for secured card number","creditCard.encryptedCardNumber.aria.label":"Card number field","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe for secured card expiry date","creditCard.encryptedExpiryDate.aria.label":"Expiry date field","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe for secured card expiry month","creditCard.encryptedExpiryMonth.aria.label":"Expiry month field","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe for secured card expiry year","creditCard.encryptedExpiryYear.aria.label":"Expiry year field","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe for secured card security code","creditCard.encryptedSecurityCode.aria.label":"Security code field","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe for secured gift card number","giftcard.encryptedCardNumber.aria.label":"Gift card number field","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe for secured gift card security code","giftcard.encryptedSecurityCode.aria.label":"Gift card security code field",giftcardTransactionLimit:"Max. %{amount} allowed per transaction on this gift card","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe for secured bank account number","ach.encryptedBankAccountNumber.aria.label":"Bank account field","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe for secured bank routing number","ach.encryptedBankLocationId.aria.label":"Bank routing number field","pix.instructions":"Open the app with the PIX registered key, choose Pay with PIX and scan the QR Code or copy and paste the code"},zs=Object.freeze({__proto__:null,default:Ts}),Ms="en-US",Is=Ts,js={ar:function(){return Promise.resolve().then((function(){return Xv}))},"cs-CZ":function(){return Promise.resolve().then((function(){return eg}))},"da-DK":function(){return Promise.resolve().then((function(){return tg}))},"de-DE":function(){return Promise.resolve().then((function(){return rg}))},"el-GR":function(){return Promise.resolve().then((function(){return ag}))},"en-US":function(){return Promise.resolve().then((function(){return zs}))},"es-ES":function(){return Promise.resolve().then((function(){return ng}))},"fi-FI":function(){return Promise.resolve().then((function(){return og}))},"fr-FR":function(){return Promise.resolve().then((function(){return ig}))},"hr-HR":function(){return Promise.resolve().then((function(){return lg}))},"hu-HU":function(){return Promise.resolve().then((function(){return sg}))},"it-IT":function(){return Promise.resolve().then((function(){return cg}))},"ja-JP":function(){return Promise.resolve().then((function(){return dg}))},"ko-KR":function(){return Promise.resolve().then((function(){return ug}))},"nl-NL":function(){return Promise.resolve().then((function(){return pg}))},"no-NO":function(){return Promise.resolve().then((function(){return mg}))},"pl-PL":function(){return Promise.resolve().then((function(){return hg}))},"pt-BR":function(){return Promise.resolve().then((function(){return fg}))},"ro-RO":function(){return Promise.resolve().then((function(){return yg}))},"ru-RU":function(){return Promise.resolve().then((function(){return bg}))},"sk-SK":function(){return Promise.resolve().then((function(){return vg}))},"sl-SI":function(){return Promise.resolve().then((function(){return gg}))},"sv-SE":function(){return Promise.resolve().then((function(){return kg}))},"zh-CN":function(){return Promise.resolve().then((function(){return Cg}))},"zh-TW":function(){return Promise.resolve().then((function(){return _g}))}},Os=function(e){return e.toLowerCase().substring(0,2)};function Es(e){var t=e.replace("_","-");if(new RegExp("([a-z]{2})([-])([A-Z]{2})").test(t))return t;var r=t.split("-"),a=r[0],n=r[1];if(!a||!n)return null;var o=[a.toLowerCase(),n.toUpperCase()].join("-");return 5===o.length?o:null}function Rs(e,t){if(void 0===t&&(t=[]),!e||e.length<1||e.length>5)return Ms;var r=Es(e);return t.indexOf(r)>-1?r:function(e,t){return e&&"string"==typeof e&&t.find((function(t){return Os(t)===Os(e)}))||null}(r||e,t)}var Ls,Vs,Us,Ks,Hs,qs=function(e,t){return e.replace(/%{(\w+)}/g,(function(e,r){return t[r]||""}))},Gs={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3},Ys=function(e,t){var r=function(e){return Gs[e]||100}(t);return parseInt(String(e),10)/r},Ws=function(){function e(e,t){var r=this;void 0===e&&(e=Ms),void 0===t&&(t={}),this.translations=Is;var a=Object.keys(js);this.customTranslations=function(e,t){return void 0===e&&(e={}),Object.keys(e).reduce((function(r,a){var n=Es(a)||Rs(a,t);return n&&(r[n]=e[a]),r}),{})}(t,a);var n=Object.keys(this.customTranslations);this.supportedLocales=Bs(Bs([],a),n).filter((function(e,t,r){return r.indexOf(e)===t})),this.locale=Es(e)||Rs(e,this.supportedLocales)||Ms;var o=this.locale.split("-")[0];this.languageCode=o,this.loaded=function(e,t){return void 0===t&&(t={}),xs(void 0,void 0,void 0,(function(){var r,a;return As(this,(function(n){switch(n.label){case 0:return r=Rs(e,Object.keys(js))||Ms,[4,js[r]()];case 1:return a=n.sent(),[2,Ds(Ds(Ds({},Is),a.default),!!t[e]&&t[e])]}}))}))}(this.locale,this.customTranslations).then((function(e){r.translations=e}))}return e.prototype.get=function(e,t){var r=function(e,t,r){void 0===r&&(r={values:{},count:0});var a=t+"__plural",n=function(e){return t+"__"+e};return Object.prototype.hasOwnProperty.call(e,n(r.count))?qs(e[n(r.count)],r.values):Object.prototype.hasOwnProperty.call(e,a)&&r.count>1?qs(e[a],r.values):Object.prototype.hasOwnProperty.call(e,t)?qs(e[t],r.values):null}(this.translations,e,t);return null!==r?r:e},e.prototype.amount=function(e,t,r){return function(e,t,r,a){void 0===a&&(a={});var n=e.toString(),o=Ys(n,r),i=t.replace("_","-"),l=Ds({style:"currency",currency:r,currencyDisplay:"symbol"},a);try{return o.toLocaleString(i,l)}catch(e){return n}}(e,this.locale,t,r)},e.prototype.date=function(e,t){void 0===t&&(t={});var r=Ds({year:"numeric",month:"2-digit",day:"2-digit"},t);return new Date(e).toLocaleDateString(this.locale,r)},e}(),Js={},Zs=[],Qs=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function $s(e,t){for(var r in t)e[r]=t[r];return e}function Xs(e){var t=e.parentNode;t&&t.removeChild(e)}function ec(e,t,r){var a,n,o,i=arguments,l={};for(o in t)"key"==o?a=t[o]:"ref"==o?n=t[o]:l[o]=t[o];if(arguments.length>3)for(r=[r],o=3;o<arguments.length;o++)r.push(i[o]);if(null!=r&&(l.children=r),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===l[o]&&(l[o]=e.defaultProps[o]);return tc(e,l,a,n,null)}function tc(e,t,r,a,n){var o={type:e,props:t,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==n?++Ls.__v:n};return null!=Ls.vnode&&Ls.vnode(o),o}function rc(e){return e.children}function ac(e,t){this.props=e,this.context=t}function nc(e,t){if(null==t)return e.__?nc(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e)return r.__e;return"function"==typeof e.type?nc(e):null}function oc(e){var t,r;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(r=e.__k[t])&&null!=r.__e){e.__e=e.__c.base=r.__e;break}return oc(e)}}function ic(e){(!e.__d&&(e.__d=!0)&&Vs.push(e)&&!lc.__r++||Ks!==Ls.debounceRendering)&&((Ks=Ls.debounceRendering)||Us)(lc)}function lc(){for(var e;lc.__r=Vs.length;)e=Vs.sort((function(e,t){return e.__v.__b-t.__v.__b})),Vs=[],e.some((function(e){var t,r,a,n,o,i;e.__d&&(o=(n=(t=e).__v).__e,(i=t.__P)&&(r=[],(a=$s({},n)).__v=n.__v+1,yc(i,n,a,t.__n,void 0!==i.ownerSVGElement,null!=n.__h?[o]:null,r,null==o?nc(n):o,n.__h),bc(r,n),n.__e!=o&&oc(n)))}))}function sc(e,t,r,a,n,o,i,l,s,c){var d,u,p,m,h,f,y,b=a&&a.__k||Zs,v=b.length;for(r.__k=[],d=0;d<t.length;d++)if(null!=(m=r.__k[d]=null==(m=t[d])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?tc(null,m,null,null,m):Array.isArray(m)?tc(rc,{children:m},null,null,null):m.__b>0?tc(m.type,m.props,m.key,null,m.__v):m)){if(m.__=r,m.__b=r.__b+1,null===(p=b[d])||p&&m.key==p.key&&m.type===p.type)b[d]=void 0;else for(u=0;u<v;u++){if((p=b[u])&&m.key==p.key&&m.type===p.type){b[u]=void 0;break}p=null}yc(e,m,p=p||Js,n,o,i,l,s,c),h=m.__e,(u=m.ref)&&p.ref!=u&&(y||(y=[]),p.ref&&y.push(p.ref,null,m),y.push(u,m.__c||h,m)),null!=h?(null==f&&(f=h),"function"==typeof m.type&&null!=m.__k&&m.__k===p.__k?m.__d=s=cc(m,s,e):s=uc(e,m,p,b,h,s),c||"option"!==r.type?"function"==typeof r.type&&(r.__d=s):e.value=""):s&&p.__e==s&&s.parentNode!=e&&(s=nc(p))}for(r.__e=f,d=v;d--;)null!=b[d]&&("function"==typeof r.type&&null!=b[d].__e&&b[d].__e==r.__d&&(r.__d=nc(a,d+1)),gc(b[d],b[d]));if(y)for(d=0;d<y.length;d++)vc(y[d],y[++d],y[++d])}function cc(e,t,r){var a,n;for(a=0;a<e.__k.length;a++)(n=e.__k[a])&&(n.__=e,t="function"==typeof n.type?cc(n,t,r):uc(r,n,n,e.__k,n.__e,t));return t}function dc(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some((function(e){dc(e,t)})):t.push(e)),t}function uc(e,t,r,a,n,o){var i,l,s;if(void 0!==t.__d)i=t.__d,t.__d=void 0;else if(null==r||n!=o||null==n.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(n),i=null;else{for(l=o,s=0;(l=l.nextSibling)&&s<a.length;s+=2)if(l==n)break e;e.insertBefore(n,o),i=o}return void 0!==i?i:n.nextSibling}function pc(e,t,r){"-"===t[0]?e.setProperty(t,r):e[t]=null==r?"":"number"!=typeof r||Qs.test(t)?r:r+"px"}function mc(e,t,r,a,n){var o;e:if("style"===t)if("string"==typeof r)e.style.cssText=r;else{if("string"==typeof a&&(e.style.cssText=a=""),a)for(t in a)r&&t in r||pc(e.style,t,"");if(r)for(t in r)a&&r[t]===a[t]||pc(e.style,t,r[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?a||e.addEventListener(t,o?fc:hc,o):e.removeEventListener(t,o?fc:hc,o);else if("dangerouslySetInnerHTML"!==t){if(n)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==r?"":r;break e}catch(e){}"function"==typeof r||(null!=r&&(!1!==r||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,r):e.removeAttribute(t))}}function hc(e){this.l[e.type+!1](Ls.event?Ls.event(e):e)}function fc(e){this.l[e.type+!0](Ls.event?Ls.event(e):e)}function yc(e,t,r,a,n,o,i,l,s){var c,d,u,p,m,h,f,y,b,v,g,k=t.type;if(void 0!==t.constructor)return null;null!=r.__h&&(s=r.__h,l=t.__e=r.__e,t.__h=null,o=[l]),(c=Ls.__b)&&c(t);try{e:if("function"==typeof k){if(y=t.props,b=(c=k.contextType)&&a[c.__c],v=c?b?b.props.value:c.__:a,r.__c?f=(d=t.__c=r.__c).__=d.__E:("prototype"in k&&k.prototype.render?t.__c=d=new k(y,v):(t.__c=d=new ac(y,v),d.constructor=k,d.render=kc),b&&b.sub(d),d.props=y,d.state||(d.state={}),d.context=v,d.__n=a,u=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=k.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=$s({},d.__s)),$s(d.__s,k.getDerivedStateFromProps(y,d.__s))),p=d.props,m=d.state,u)null==k.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==k.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,v),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,v)||t.__v===r.__v){d.props=y,d.state=d.__s,t.__v!==r.__v&&(d.__d=!1),d.__v=t,t.__e=r.__e,t.__k=r.__k,t.__k.forEach((function(e){e&&(e.__=t)})),d.__h.length&&i.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,v),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,m,h)}))}d.context=v,d.props=y,d.state=d.__s,(c=Ls.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),d.state=d.__s,null!=d.getChildContext&&(a=$s($s({},a),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(h=d.getSnapshotBeforeUpdate(p,m)),g=null!=c&&c.type===rc&&null==c.key?c.props.children:c,sc(e,Array.isArray(g)?g:[g],t,r,a,n,o,i,l,s),d.base=t.__e,t.__h=null,d.__h.length&&i.push(d),f&&(d.__E=d.__=null),d.__e=!1}else null==o&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=function(e,t,r,a,n,o,i,l){var s,c,d,u,p=r.props,m=t.props,h=t.type,f=0;if("svg"===h&&(n=!0),null!=o)for(;f<o.length;f++)if((s=o[f])&&(s===e||(h?s.localName==h:3==s.nodeType))){e=s,o[f]=null;break}if(null==e){if(null===h)return document.createTextNode(m);e=n?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,m.is&&m),o=null,l=!1}if(null===h)p===m||l&&e.data===m||(e.data=m);else{if(o=o&&Zs.slice.call(e.childNodes),c=(p=r.props||Js).dangerouslySetInnerHTML,d=m.dangerouslySetInnerHTML,!l){if(null!=o)for(p={},u=0;u<e.attributes.length;u++)p[e.attributes[u].name]=e.attributes[u].value;(d||c)&&(d&&(c&&d.__html==c.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,r,a,n){var o;for(o in r)"children"===o||"key"===o||o in t||mc(e,o,null,r[o],a);for(o in t)n&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||r[o]===t[o]||mc(e,o,t[o],r[o],a)}(e,m,p,n,l),d)t.__k=[];else if(f=t.props.children,sc(e,Array.isArray(f)?f:[f],t,r,a,n&&"foreignObject"!==h,o,i,e.firstChild,l),null!=o)for(f=o.length;f--;)null!=o[f]&&Xs(o[f]);l||("value"in m&&void 0!==(f=m.value)&&(f!==e.value||"progress"===h&&!f)&&mc(e,"value",f,p.value,!1),"checked"in m&&void 0!==(f=m.checked)&&f!==e.checked&&mc(e,"checked",f,p.checked,!1))}return e}(r.__e,t,r,a,n,o,i,s);(c=Ls.diffed)&&c(t)}catch(e){t.__v=null,(s||null!=o)&&(t.__e=l,t.__h=!!s,o[o.indexOf(l)]=null),Ls.__e(e,t,r)}}function bc(e,t){Ls.__c&&Ls.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Ls.__e(e,t.__v)}}))}function vc(e,t,r){try{"function"==typeof e?e(t):e.current=t}catch(e){Ls.__e(e,r)}}function gc(e,t,r){var a,n,o;if(Ls.unmount&&Ls.unmount(e),(a=e.ref)&&(a.current&&a.current!==e.__e||vc(a,null,t)),r||"function"==typeof e.type||(r=null!=(n=e.__e)),e.__e=e.__d=void 0,null!=(a=e.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){Ls.__e(e,t)}a.base=a.__P=null}if(a=e.__k)for(o=0;o<a.length;o++)a[o]&&gc(a[o],t,r);null!=n&&Xs(n)}function kc(e,t,r){return this.constructor(e,r)}function Cc(e,t,r){var a,n,o;Ls.__&&Ls.__(e,t),n=(a="function"==typeof r)?null:r&&r.__k||t.__k,o=[],yc(t,e=(!a&&r||t).__k=ec(rc,null,[e]),n||Js,Js,void 0!==t.ownerSVGElement,!a&&r?[r]:n?null:t.firstChild?Zs.slice.call(t.childNodes):null,o,!a&&r?r:n?n.__e:t.firstChild,a),bc(o,e)}Ls={__e:function(e,t){for(var r,a,n;t=t.__;)if((r=t.__c)&&!r.__)try{if((a=r.constructor)&&null!=a.getDerivedStateFromError&&(r.setState(a.getDerivedStateFromError(e)),n=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e),n=r.__d),n)return r.__E=r}catch(t){e=t}throw e},__v:0},ac.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=$s({},this.state),"function"==typeof e&&(e=e($s({},r),this.props)),e&&$s(r,e),null!=e&&this.__v&&(t&&this.__h.push(t),ic(this))},ac.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),ic(this))},ac.prototype.render=rc,Vs=[],Us="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,lc.__r=0,Hs=0;var _c=function(e,t){return t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:void 0}),e)},Nc=function(){var e=this;this.events={},this.on=function(t,r){e.events[t]=e.events[t]||[],e.events[t].push(r)},this.off=function(t,r){e.events[t]&&(e.events[t]=e.events[t].reduce((function(e,t){return t!==r&&e.push(t),e}),[]))},this.emit=function(t,r){e.events[t]&&e.events[t].forEach((function(e){e(r)}))}};function wc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}var Pc=function(){function e(e){this._id=this.constructor.type+"-"+wc(),this.eventEmitter=new Nc,this.props=this.formatProps(Ds(Ds({},this.constructor.defaultProps),e)),this._parentInstance=this.props._parentInstance,this._node=null,this.state={}}return e.prototype.formatProps=function(e){return e},e.prototype.formatData=function(){return{}},e.prototype.setState=function(e){this.state=Ds(Ds({},this.state),e)},Object.defineProperty(e.prototype,"data",{get:function(){var e=_c(this.props,"modules.risk.data"),t=_c(this.props,"modules.analytics.conversionId"),r=this.state.order||this.props.order;return Ds(Ds(Ds(Ds(Ds({},e&&{riskData:{clientData:e}}),t&&{conversionId:t}),r&&{order:{orderData:r.orderData,pspReference:r.pspReference}}),this.formatData()),{clientStateDataIndicator:!0})},enumerable:!1,configurable:!0}),e.prototype.render=function(){throw new Error("Payment method cannot be rendered.")},e.prototype.mount=function(e){var t,r="string"==typeof e?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");if(this._node)throw new Error("Component is already mounted.");return this._node=r,this._component=this.render(),Cc(this._component,r),this.props.modules&&this.props.modules.analytics&&!this.props.isDropin&&this.props.modules.analytics.send({containerWidth:this._node&&this._node.offsetWidth,component:null!==(t=this.constructor.analyticsType)&&void 0!==t?t:this.constructor.type,flavor:"components"}),this},e.prototype.update=function(e){return this.props=this.formatProps(Ds(Ds({},this.props),e)),this.state={},this.unmount().remount()},e.prototype.remount=function(e){if(!this._node)throw new Error("Component is not mounted.");return Cc(e||this.render(),this._node,null),this},e.prototype.unmount=function(){return this._node&&Cc(null,this._node),this},e.prototype.remove=function(){this.unmount(),this._parentInstance&&this._parentInstance.remove(this)},e.defaultProps={},e}(),Fc="https://checkoutshopper-live.adyen.com/checkoutshopper/",Dc=["amount","countryCode","environment","loadingContext","i18n","modules","order","clientKey","showPayButton","installmentOptions","onSubmit","onAdditionalDetails","onCancel","onChange","onError","onBalanceCheck","onOrderRequest","setStatusAutomatically"],Sc=function(e){var t=e.loadingContext,r=void 0===t?Fc:t,a=e.extension,n=void 0===a?"svg":a,o=Ss(e,["loadingContext","extension"]);return function(e){return function(e){var t=e.name,r=e.loadingContext,a=e.imageFolder,n=void 0===a?"":a,o=e.parentFolder,i=void 0===o?"":o,l=e.extension,s=e.size,c=void 0===s?"":s,d=e.subFolder;return r+"images/"+n+(void 0===d?"":d)+i+t+c+"."+l}(Ds({extension:n,loadingContext:r,imageFolder:"logos/",parentFolder:"",name:e},o))}},xc={exports:{}};!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],a=0;a<arguments.length;a++){var n=arguments[a];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var i=r.apply(null,n);i&&e.push(i)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var l in n)t.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(xc);var Ac,Bc,Tc,zc=xc.exports,Mc=function(e){var t=e.inline,r=void 0!==t&&t,a=e.size;return ec("div",{className:"adyen-checkout__spinner__wrapper "+(r?"adyen-checkout__spinner__wrapper--inline":"")},ec("div",{className:"adyen-checkout__spinner adyen-checkout__spinner--"+(void 0===a?"large":a)}))},Ic=0,jc=[],Oc=Ls.__b,Ec=Ls.__r,Rc=Ls.diffed,Lc=Ls.__c,Vc=Ls.unmount;function Uc(e,t){Ls.__h&&Ls.__h(Bc,e,Ic||t),Ic=0;var r=Bc.__H||(Bc.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Kc(e){return Ic=1,Hc(td,e)}function Hc(e,t,r){var a=Uc(Ac++,2);return a.t=e,a.__c||(a.__=[r?r(t):td(void 0,t),function(e){var t=a.t(a.__[0],e);a.__[0]!==t&&(a.__=[t,a.__[1]],a.__c.setState({}))}],a.__c=Bc),a.__}function qc(e,t){var r=Uc(Ac++,3);!Ls.__s&&ed(r.__H,t)&&(r.__=e,r.__H=t,Bc.__H.__h.push(r))}function Gc(e,t){var r=Uc(Ac++,4);!Ls.__s&&ed(r.__H,t)&&(r.__=e,r.__H=t,Bc.__h.push(r))}function Yc(e){return Ic=5,Wc((function(){return{current:e}}),[])}function Wc(e,t){var r=Uc(Ac++,7);return ed(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Jc(e,t){return Ic=8,Wc((function(){return e}),t)}function Zc(){jc.forEach((function(e){if(e.__P)try{e.__H.__h.forEach($c),e.__H.__h.forEach(Xc),e.__H.__h=[]}catch(t){e.__H.__h=[],Ls.__e(t,e.__v)}})),jc=[]}Ls.__b=function(e){Bc=null,Oc&&Oc(e)},Ls.__r=function(e){Ec&&Ec(e),Ac=0;var t=(Bc=e.__c).__H;t&&(t.__h.forEach($c),t.__h.forEach(Xc),t.__h=[])},Ls.diffed=function(e){Rc&&Rc(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==jc.push(t)&&Tc===Ls.requestAnimationFrame||((Tc=Ls.requestAnimationFrame)||function(e){var t,r=function(){clearTimeout(a),Qc&&cancelAnimationFrame(t),setTimeout(e)},a=setTimeout(r,100);Qc&&(t=requestAnimationFrame(r))})(Zc)),Bc=void 0},Ls.__c=function(e,t){t.some((function(e){try{e.__h.forEach($c),e.__h=e.__h.filter((function(e){return!e.__||Xc(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],Ls.__e(r,e.__v)}})),Lc&&Lc(e,t)},Ls.unmount=function(e){Vc&&Vc(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach($c)}catch(e){Ls.__e(e,t.__v)}};var Qc="function"==typeof requestAnimationFrame;function $c(e){var t=Bc;"function"==typeof e.__c&&e.__c(),Bc=t}function Xc(e){var t=Bc;e.__c=e.__(),Bc=t}function ed(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function td(e,t){return"function"==typeof t?t(e):t}var rd=function(e,t){var r={__c:t="__cC"+Hs++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,a;return this.getChildContext||(r=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some(ic)},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}({i18n:new Ws,loadingContext:""});function ad(){return function(e){var t=Bc.context[e.__c],r=Uc(Ac++,9);return r.__c=e,t?(null==r.__&&(r.__=!0,t.sub(Bc)),t.props.value):e.__}(rd)}var nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onClick=function(e){e.preventDefault(),t.props.disabled||t.props.onClick(e,{complete:t.complete})},t.complete=function(e){void 0===e&&(e=1e3),t.setState({completed:!0}),setTimeout((function(){t.setState({completed:!1})}),e)},t}return Fs(t,e),t.prototype.render=function(e,t){var r=e.classNameModifiers,a=void 0===r?[]:r,n=e.disabled,o=e.href,i=e.icon,l=e.secondary,s=e.inline,c=e.label,d=e.status,u=t.completed,p=ad().i18n,m=i?ec("img",{className:"adyen-checkout__button__icon",src:i,alt:"","aria-hidden":"true"}):"",h=Bs(Bs(Bs(Bs(Bs([],a),s?["inline"]:[]),u?["completed"]:[]),l?["secondary"]:[]),"loading"===d||"redirect"===d?["loading"]:[]),f=zc(Bs(["adyen-checkout__button"],h.map((function(e){return"adyen-checkout__button--"+e})))),y={loading:ec(Mc,{size:"medium"}),redirect:ec("span",{className:"adyen-checkout__button__content"},ec(Mc,{size:"small",inline:!0}),p.get("payButton.redirecting")),default:ec("span",{className:"adyen-checkout__button__content"},m,ec("span",{className:"adyen-checkout__button__text"},c))},b=y[d]||y.default;return o?ec("a",{className:f,href:o,disabled:n,target:this.props.target,rel:this.props.rel},b):ec("button",{className:f,type:"button",disabled:n,onClick:this.onClick},b)},t.defaultProps={status:"default",disabled:!1,label:"",secondary:!1,inline:!1,target:"_self",onClick:function(){}},t}(ac),od=function(e){var t=e.amount,r=e.classNameModifiers,a=void 0===r?[]:r,n=e.label,o=Ss(e,["amount","classNameModifiers","label"]),i=ad().i18n,l=t&&{}.hasOwnProperty.call(t,"value")&&0===t.value?i.get("confirmPreauthorization"):i.get("payButton")+" "+((null==t?void 0:t.value)&&(null==t?void 0:t.currency)?i.amount(t.value,t.currency):"");return ec(nd,Ds({},o,{disabled:"loading"===o.status,classNameModifiers:Bs(Bs([],a),["pay"]),label:n||l}))},id=function(e){function t(t){var r=e.call(this,t)||this;return r.payButton=function(e){return ec(od,Ds({},e,{amount:r.props.amount,onClick:r.submit}))},r.submit=r.submit.bind(r),r.setState=r.setState.bind(r),r.onValid=r.onValid.bind(r),r.onComplete=r.onComplete.bind(r),r.handleAction=r.handleAction.bind(r),r.elementRef=t&&t.elementRef||r,r}return Fs(t,e),t.prototype.setState=function(e){this.state=Ds(Ds({},this.state),e),this.onChange()},t.prototype.onChange=function(){var e=this.isValid,t={data:this.data,errors:this.state.errors,valid:this.state.valid,isValid:e};return this.props.onChange&&this.props.onChange(t,this.elementRef),e&&this.onValid(),t},t.prototype.onValid=function(){var e={data:this.data};return this.props.onValid&&this.props.onValid(e,this.elementRef),e},t.prototype.startPayment=function(){return Promise.resolve(!0)},t.prototype.submit=function(){var e=this,t=this.props,r=t.onError,a=void 0===r?function(){}:r,n=t.onSubmit,o=void 0===n?function(){}:n;this.startPayment().then((function(){var t=e,r=t.data,a=t.isValid;return a?(!1!==e.props.setStatusAutomatically&&e.setStatus("loading"),o({data:r,isValid:a},e.elementRef)):(e.showValidation(),!1)})).catch((function(e){return a(e)}))},t.prototype.onComplete=function(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)},t.prototype.showValidation=function(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this},t.prototype.setStatus=function(e){return this.componentRef&&this.componentRef.setStatus&&this.componentRef.setStatus(e),this},t.prototype.handleAction=function(e,t){var r=this;if(void 0===t&&(t={}),!e||!e.type)throw new Error("Invalid Action");var a=this.props._parentInstance.createFromAction(e,Ds(Ds({},t),{onAdditionalDetails:function(e){return r.props.onAdditionalDetails(e,r.elementRef)}}));return a?(this.unmount(),a.mount(this._node),a):null},Object.defineProperty(t.prototype,"isValid",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){var e;return null!==(e=this.props.icon)&&void 0!==e?e:Sc({loadingContext:this.props.loadingContext})(this.constructor.type)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.props.name||this.constructor.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this.props.type||this.constructor.type},enumerable:!1,configurable:!0}),t}(Pc),ld=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.iframeOnLoad=function(){this.props.callback&&"function"==typeof this.props.callback&&this.props.callback(this.iframeEl.contentWindow)},t.prototype.componentDidMount=function(){this.iframeEl.addEventListener?this.iframeEl.addEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.attachEvent?this.iframeEl.attachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=this.iframeOnLoad.bind(this)},t.prototype.componentWillUnmount=function(){this.iframeEl.removeEventListener?this.iframeEl.removeEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.detachEvent?this.iframeEl.detachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=null},t.prototype.render=function(e){var t=this,r=e.name,a=e.src,n=e.width,o=e.height,i=e.minWidth,l=e.minHeight,s=e.border;return ec("iframe",{ref:function(e){t.iframeEl=e},allow:e.allow,className:"adyen-checkout__iframe adyen-checkout__iframe--"+r,name:r,src:a,width:n,height:o,"min-width":i,"min-height":l,border:s,style:{border:0},frameBorder:"0",title:e.title,referrerpolicy:"origin"})},t.defaultProps={width:"0",height:"0",minWidth:"0",minHeight:"0",border:"0",src:null,allow:null,title:"components iframe"},t}(ac),sd=function(e,t,r){var a;return{promise:new Promise((function(n,o){a=setTimeout((function(){o(r)}),e),t.then((function(e){clearTimeout(a),n(e)})).catch((function(e){clearTimeout(a),o(e)}))})),cancel:function(){clearTimeout(a)}}},cd="deviceFingerprint",dd={result:{type:cd,value:"df-timedOut"},errorCode:"timeout"},ud={result:{type:cd,value:"df-failed"}},pd="unknownError",md={timeout:"iframe loading timed out",wrongOrigin:"Result did not come from the expected origin",wrongDataType:"Result data was not of the expected type",missingProperty:"Result data did not contain the expected properties",unknownError:"An unknown error occurred"},hd=function(e,t,r,a,n){return function(o){var i=Ds({},a);if((o.origin||o.originalEvent.origin)!==e)return"Message was not sent from the expected domain";if("string"!=typeof o.data)return"Event data was not of type string";if(!o.data.length)return"Invalid event data string";try{var l=JSON.parse(o.data);if(!Object.prototype.hasOwnProperty.call(l,"type")||l.type!==n)return"Event data was not of expected type";t(l)}catch(e){return r(i),!1}return!0}},fd=function(e){var t=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(e);if(!t)return null;var r=t[1],a=t[2],n=t[3],o=t[4];return r&&a&&n?r+":"+a+n+(o?":"+o:""):null},yd=function(e){function t(t){var r=e.call(this,t)||this;return r.postMessageDomain=fd(r.props.loadingContext)||r.props.loadingContext,r}return Fs(t,e),t.prototype.getDfpPromise=function(){var e=this;return new Promise((function(t,r){e.processMessageHandler=hd(e.postMessageDomain,t,r,ud,cd),window.addEventListener("message",e.processMessageHandler)}))},t.prototype.componentDidMount=function(){var e=this;this.deviceFingerPrintPromise=sd(2e4,this.getDfpPromise(),dd),this.deviceFingerPrintPromise.promise.then((function(t){e.props.onCompleteFingerprint(t),window.removeEventListener("message",e.processMessageHandler)})).catch((function(t){e.props.onErrorFingerprint(t),window.removeEventListener("message",e.processMessageHandler)}))},t.prototype.render=function(e){var t=e.dfpURL;return ec("div",{className:"adyen-checkout-risk__device-fingerprint"},ec(ld,{name:"dfIframe",src:t,allow:"geolocation; microphone; camera;",title:"devicefingerprinting iframe"}))},t}(ac),bd=function(e){function t(t){var r=e.call(this,t)||this;return t.clientKey&&(r.state={status:"retrievingFingerPrint",dfpURL:r.props.loadingContext+"assets/html/"+t.clientKey+"/dfp.1.0.0.html"}),r}return Fs(t,e),t.prototype.setStatusComplete=function(e){var t=this;this.setState({status:"complete"},(function(){t.props.onComplete(e)}))},t.prototype.render=function(e,t){var r=this,a=e.loadingContext,n=t.dfpURL;return"retrievingFingerPrint"===this.state.status?ec("div",{className:"adyen-checkout-risk__device-fingerprint--wrapper",style:{position:"absolute",width:0,height:0}},ec(yd,{loadingContext:a,dfpURL:n,onCompleteFingerprint:function(e){r.setStatusComplete(e)},onErrorFingerprint:function(e){var t;r.props.onError({errorCode:t=e.errorCode,message:md[t]||md[pd],type:cd}),r.setStatusComplete(e.result)}})):null},t.defaultProps={onComplete:function(){},onError:function(){}},t}(ac),vd=window.atob,gd=window.btoa,kd={decode:function(e){return!!kd.isBase64(e)&&(!!kd.isBase64(e)&&(t=e,decodeURIComponent(Array.prototype.map.call(vd(t),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))));var t},encode:function(e){return gd(e)},isBase64:function(e){return!!e&&(!(e.length%4)&&gd(vd(e))===e)}},Cd=function(e){function t(t){var r,a=e.call(this,t)||this;a.nodeRiskContainer=null,a.onComplete=function(e){var t,r=Ds(Ds({},a.state.data),((t={})[e.type]=e.value,t.persistentCookie=e.persistentCookie,t.components=e.components,t));a.setState({data:r,isValid:!0}),a.props.risk.onComplete(a.data),a.cleanUp()},a.onError=function(e){a.props.risk.onError(e),a.cleanUp()},a.cleanUp=function(){a.nodeRiskContainer&&a.nodeRiskContainer.remove()};var n=((r={}).deviceFingerprint=null,r);return a.setState({data:n}),!0===a.props.risk.enabled&&(document.querySelector(a.props.risk.node)?(a.nodeRiskContainer=document.createElement("div"),document.querySelector(a.props.risk.node).appendChild(a.nodeRiskContainer),a.mount(a.nodeRiskContainer)):a.onError({message:"RiskModule node was not found"})),a}return Fs(t,e),t.prototype.formatProps=function(e){return Ds(Ds({},e),{risk:Ds(Ds({},t.defaultProps.risk),e.risk)})},Object.defineProperty(t.prototype,"isValid",{get:function(){return this.state.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){if(this.isValid){var e=Ds({version:"1.0.0"},this.state.data);return kd.encode(JSON.stringify(e))}return!1},enumerable:!1,configurable:!0}),t.prototype.componentWillUnmount=function(){this.cleanUp()},t.prototype.render=function(){return ec(bd,Ds({},this.props,{loadingContext:this.props.loadingContext,onComplete:this.onComplete,onError:this.onError}))},t.type="risk",t.defaultProps={risk:{enabled:!0,onComplete:function(){},onError:function(){},node:"body"}},t}(Pc);function _d(e){var t=e.children,r=e.classNameModifiers,a=void 0===r?[]:r,n=e.label,o=e.readonly,i=void 0!==o&&o,l=ad().i18n;return ec("div",{className:zc(Bs(Bs(["adyen-checkout__fieldset"],a.map((function(e){return"adyen-checkout__fieldset--"+e}))),[{"adyen-checkout__fieldset--readonly":i}]))},n&&ec("div",{className:"adyen-checkout__fieldset__title"},l.get(n)),ec("div",{className:"adyen-checkout__fieldset__fields"},t))}var Nd=function(e){var t=e.type,r=e.className,a=void 0===r?"":r,n=ad().loadingContext,o=Sc({loadingContext:n,imageFolder:"components/"})(t);return ec("img",{className:zc("adyen-checkout__icon",a),alt:t,src:o})},wd=function(e){function t(t){var r=e.call(this,t)||this;return r.state={focused:!1},r.onFocus=r.onFocus.bind(r),r.onBlur=r.onBlur.bind(r),r}return Fs(t,e),t.prototype.onFocus=function(e){var t=this;this.setState({focused:!0},(function(){t.props.onFocus&&t.props.onFocus(e)}))},t.prototype.onBlur=function(e){var t=this;this.setState({focused:!1},(function(){t.props.onBlur&&t.props.onBlur(e),t.props.onFieldBlur&&t.props.onFieldBlur(e)}))},t.getDerivedStateFromProps=function(e,t){return void 0!==e.focused&&e.focused!==t.focused?{focused:e.focused}:void 0!==e.filled&&e.filled!==t.filled?{filled:e.filled}:null},t.prototype.render=function(e){var t=this,r=e.className,a=void 0===r?"":r,n=e.classNameModifiers,o=void 0===n?[]:n,i=e.children,l=e.errorMessage,s=e.helper,c=e.inputWrapperModifiers,d=void 0===c?[]:c,u=e.isLoading,p=e.isValid,m=e.label,h=e.dualBrandingElements,f=e.dir;return ec("div",{className:zc("adyen-checkout__field",a,o.map((function(e){return"adyen-checkout__field--"+e})),{"adyen-checkout__field--error":l,"adyen-checkout__field--valid":p})},ec("label",{onClick:this.props.onFocusField,className:zc({"adyen-checkout__label":!0,"adyen-checkout__label--focused":this.state.focused,"adyen-checkout__label--filled":this.state.filled,"adyen-checkout__label--disabled":this.props.disabled})},"string"==typeof m&&ec("span",{className:zc({"adyen-checkout__label__text":!0,"adyen-checkout__label__text--error":l})},m),"function"==typeof m&&m(),s&&ec("span",{className:"adyen-checkout__helper-text"},s),ec("div",{className:zc(Bs(["adyen-checkout__input-wrapper"],d.map((function(e){return"adyen-checkout__input-wrapper--"+e})))),dir:f},dc(i).map((function(e){return function(e,t,r){var a,n,o,i=arguments,l=$s({},e.props);for(o in t)"key"==o?a=t[o]:"ref"==o?n=t[o]:l[o]=t[o];if(arguments.length>3)for(r=[r],o=3;o<arguments.length;o++)r.push(i[o]);return null!=r&&(l.children=r),tc(e.type,l,a||e.key,n||e.ref,null)}(e,{isValid:p,onFocus:t.onFocus,onBlur:t.onBlur,isInvalid:!!l})})),u&&ec("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--loading"},ec(Mc,{size:"small"})),p&&!h&&ec("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--valid"},ec(Nd,{type:"checkmark"})),l&&ec("span",{className:"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--invalid"},ec(Nd,{type:"field_error"}))),l&&l.length&&ec("span",{className:"adyen-checkout__error-text","aria-live":"polite"},l)))},t}(ac),Pd=function(e){var t=e.data,r=t.name,a=t.registrationNumber;return ec(_d,{classNameModifiers:["companyDetails"],label:"companyDetails",readonly:!0},r&&r+" ",a&&a+" ")};function Fd(e){var t=e.autoCorrect,r=e.classNameModifiers,a=e.isInvalid,n=e.isValid,o=e.readonly,i=void 0===o?null:o,l=e.spellCheck,s=e.type,c=zc("adyen-checkout__input",["adyen-checkout__input--"+s],e.className,{"adyen-checkout__input--invalid":a,"adyen-checkout__input--valid":n},r.map((function(e){return"adyen-checkout__input--"+e})));e.classNameModifiers;var d=Ss(e,["classNameModifiers"]);return ec("input",Ds({},d,{type:s,className:c,onInput:function(t){t.target.value=t.target.value.replace(/[\uff01-\uff5e]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)-65248)})),e.onInput(t)},readOnly:i,spellCheck:l,autoCorrect:t}))}function Dd(e){return ec(Fd,Ds({classNameModifiers:["large"]},e,{type:"text"}))}Fd.defaultProps={type:"text",classNameModifiers:[]};var Sd=function(){var e=document.createElement("input");return e.setAttribute("type","date"),"date"===e.type},xd=function(e){if(void 0===e&&(e=""),-1===e.indexOf("/"))return e;var t=e.split("/"),r=t[0],a=void 0===r?"":r,n=t[1],o=void 0===n?"":n,i=t[2],l=void 0===i?"":i;return a&&o&&l?l+"-"+o+"-"+a:null};function Ad(e){return ec(Fd,Wc(Sd,[])?Ds({},e,{type:"date"}):Ds({},e,{onInput:function(t){var r=t.target.value;t.target.value=function(e){var t=e.replace(/\D|\s/g,"").replace(/^(00)(.*)?/,"01$2").replace(/^(3[2-9])(.*)?/,"0$1$2").replace(/^([4-9])(.*)?/,"0$1").replace(/^([0-9]{2})(00)(.*)?/,"$101").replace(/^(3[01])(02)(.*)?/,"29$2").replace(/^([0-9]{2})([2-9]|1[3-9])(.*)?/,"$10$2").replace(/^([0-9]{2})([0-9]{2})([0-9])/,"$1/$2/$3").replace(/^([0-9]{2})([0-9])/,"$1/$2"),r=t.split("/"),a=r[0],n=void 0===a?"":a,o=r[1],i=void 0===o?"":o,l=r[2],s=void 0===l?"":l;return 4===s.length&&"29"===n&&"02"===i&&(Number(s)%4!=0||"00"===s.substr(2,2)&&Number(s)%400!=0)?t.replace(/^29/,"28"):t}(r),e.onInput(t)},maxLength:10}))}function Bd(e){return ec(Fd,Ds({},e,{type:"tel"}))}function Td(e){return ec(Fd,Ds({},e,{type:"email",autoCapitalize:"off"}))}function zd(e){var t=e.items,r=e.i18n,a=e.name,n=e.onChange,o=e.value,i=e.isInvalid;return ec("div",{className:"adyen-checkout__radio_group"},t.map((function(t){return ec("label",{key:t.id,className:"adyen-checkout__radio_group__input-wrapper"},ec("input",{type:"radio",checked:o===t.id,className:"adyen-checkout__radio_group__input",name:a,onChange:n,onClick:n,value:t.id}),ec("span",{className:zc(["adyen-checkout__label__text","adyen-checkout__radio_group__label",e.className,{"adyen-checkout__radio_group__label--invalid":i}])},r.get(t.name)))})))}function Md(e){var t=e.classNameModifiers,r=void 0===t?[]:t,a=e.label,n=e.isInvalid,o=e.onChange,i=Ss(e,["classNameModifiers","label","isInvalid","onChange"]);return ec("label",{className:"adyen-checkout__checkbox"},ec("input",Ds({},i,{className:zc(["adyen-checkout__checkbox__input",[i.className],{"adyen-checkout__checkbox__input--invalid":n},r.map((function(e){return"adyen-checkout__input--"+e}))]),type:"checkbox",onChange:o})),ec("span",{className:"adyen-checkout__checkbox__label"},a))}zd.defaultProps={onChange:function(){},items:[]},Md.defaultProps={onChange:function(){}};var Id="Select-module_adyen-checkout__dropdown__2kGp2",jd="Select-module_adyen-checkout__dropdown__button__waz0I",Od="Select-module_adyen-checkout__dropdown__button--active__1EqeU",Ed="Select-module_adyen-checkout__filter-input__HMjy5",Rd="Select-module_adyen-checkout__dropdown__list__2UxAp",Ld="Select-module_adyen-checkout__dropdown__list--active__Mlt8t",Vd="Select-module_adyen-checkout__dropdown__element__3nIQR";function Ud(e){var t=e.backgroundUrl,r=void 0===t?"":t,a=e.className,n=void 0===a?"":a,o=e.classNameModifiers,i=void 0===o?[]:o,l=e.src,s=void 0===l?"":l,c=e.alt,d=void 0===c?"":c,u=e.showOnError,p=void 0!==u&&u,m=Kc(!1),h=m[0],f=m[1],y=Yc(null),b=function(){f(!0)},v=zc.apply(void 0,Bs([[n],"adyen-checkout__image",{"adyen-checkout__image--loaded":h}],i.map((function(e){return"adyen-checkout__image--"+e}))));return qc((function(){var e=r?new Image:y.current;e.src=r||s,e.onload=b,f(!!e.complete)}),[]),r?ec("div",Ds({style:{backgroundUrl:r}},e,{className:v})):ec("img",Ds({},e,{alt:d,ref:y,className:v,onError:function(){f(p)}}))}function Kd(e){var t=e.filterable,r=e.toggleButtonRef,a=Ss(e,["filterable","toggleButtonRef"]);return ec(t?"div":"button",Ds({},a,{ref:r}))}function Hd(e){var t,r=ad().i18n,a=e.active,n=e.readonly,o=e.showList;return ec(Kd,{"aria-disabled":n,"aria-expanded":o,"aria-haspopup":"listbox",className:zc((t={"adyen-checkout__dropdown__button":!0},t[jd]=!0,t["adyen-checkout__dropdown__button--readonly"]=n,t["adyen-checkout__dropdown__button--active"]=o,t[Od]=o,t["adyen-checkout__dropdown__button--invalid"]=e.isInvalid,t)),filterable:e.filterable,onClick:n?null:e.toggleList,onKeyDown:n?null:e.onButtonKeyDown,role:e.filterable?"button":null,tabIndex:"0",title:a.name||e.placeholder,toggleButtonRef:e.toggleButtonRef,type:e.filterable?null:"button"},o&&e.filterable?ec("input",{"aria-autocomplete":"list","aria-controls":e.selectListId,"aria-expanded":o,"aria-owns":e.selectListId,autoComplete:"off",className:zc("adyen-checkout__filter-input",[Ed]),onInput:e.onInput,placeholder:r.get("select.filter.placeholder"),ref:e.filterInputRef,role:"combobox",type:"text"}):ec(rc,null,ec("span",{className:"adyen-checkout__dropdown__button__text"},a.selectedOptionName||a.name||e.placeholder),a.icon&&ec(Ud,{className:"adyen-checkout__dropdown__button__icon",src:a.icon,alt:a.name})))}var qd=function(e){var t=e.item,r=e.selected,a=Ss(e,["item","selected"]);return ec("li",{"aria-disabled":!!t.disabled,"aria-selected":r,className:zc(["adyen-checkout__dropdown__element",Vd,{"adyen-checkout__dropdown__element--active":r,"adyen-checkout__dropdown__element--disabled":!!t.disabled}]),"data-disabled":!!t.disabled,"data-value":t.id,onClick:a.onSelect,onKeyDown:a.onKeyDown,role:"option",tabIndex:-1},ec("span",null,t.name),t.icon&&ec(Ud,{className:"adyen-checkout__dropdown__element__icon",alt:t.name,src:t.icon}))};function Gd(e){var t,r=e.active,a=e.items,n=e.showList,o=e.textFilter,i=Ss(e,["active","items","showList","textFilter"]),l=ad().i18n,s=a.filter((function(e){return!o||e.name.toLowerCase().includes(o)}));return ec("ul",{className:zc((t={test:!0,"adyen-checkout__dropdown__list":!0},t[Rd]=!0,t["adyen-checkout__dropdown__list--active"]=n,t[Ld]=n,t)),id:i.selectListId,ref:i.selectListRef,role:"listbox"},s.length?s.map((function(e){return ec(qd,{item:e,key:e.id,onKeyDown:i.onKeyDown,onSelect:i.onSelect,selected:e.id===r.id})})):ec("div",{className:"adyen-checkout__dropdown__element adyen-checkout__dropdown__element--no-options"},l.get("select.noOptionsFound")))}var Yd={arrowDown:"ArrowDown",arrowUp:"ArrowUp",enter:"Enter",escape:"Escape",space:" ",tab:"Tab"};function Wd(e){var t=Yc(null),r=Yc(null),a=Yc(null),n=Yc(null),o=Kc(null),i=o[0],l=o[1],s=Kc(!1),c=s[0],d=s[1],u=Wc((function(){return"select-"+wc()}),[]),p=e.items.find((function(t){return t.id===e.selected}))||{},m=function(){l(null),d(!1),a.current&&a.current.focus()},h=function(t){t.preventDefault();var r=n.current.contains(t.currentTarget)?t.currentTarget:n.current.firstElementChild;if(!r.getAttribute("data-disabled")){m();var a=r.getAttribute("data-value");e.onChange({target:{value:a,name:e.name}})}},f=function(e){r.current.contains(e.target)||d(!1)};return qc((function(){c&&e.filterable&&t.current&&t.current.focus()}),[c]),qc((function(){return document.addEventListener("click",f,!1),function(){document.removeEventListener("click",f,!1)}}),[]),ec("div",{className:zc(Bs(["adyen-checkout__dropdown",Id,e.className],e.classNameModifiers.map((function(e){return"adyen-checkout__dropdown--"+e})))),ref:r},ec(Hd,{active:p,filterInputRef:t,filterable:e.filterable,isInvalid:e.isInvalid,onButtonKeyDown:function(t){var r;t.key===Yd.enter&&e.filterable&&c&&i?h(t):t.key===Yd.escape?m():![Yd.arrowUp,Yd.arrowDown,Yd.enter].includes(t.key)&&(t.key!==Yd.space||e.filterable&&c)?(t.shiftKey&&t.key===Yd.tab||t.key===Yd.tab)&&m():(t.preventDefault(),d(!0),(null===(r=n.current)||void 0===r?void 0:r.firstElementChild)&&n.current.firstElementChild.focus())},onInput:function(e){var t=e.target.value;l(t.toLowerCase())},placeholder:e.placeholder,readonly:e.readonly,selectListId:u,showList:c,toggleButtonRef:a,toggleList:function(e){e.preventDefault(),d(!c)}}),ec(Gd,{active:p,items:e.items,onKeyDown:function(r){var a=r.target;switch(r.key){case Yd.escape:r.preventDefault(),m();break;case Yd.space:case Yd.enter:h(r);break;case Yd.arrowDown:r.preventDefault(),a.nextElementSibling&&a.nextElementSibling.focus();break;case Yd.arrowUp:r.preventDefault(),a.previousElementSibling?a.previousElementSibling.focus():e.filterable&&t.current&&t.current.focus();break;case Yd.tab:m()}},onSelect:h,selectListId:u,selectListRef:n,showList:c,textFilter:i}))}Wd.defaultProps={className:"",classNameModifiers:[],filterable:!0,items:[],readonly:!1,onChange:function(){}};var Jd=function(e,t){var r={boolean:Md,date:Ad,emailAddress:Td,radio:zd,select:Wd,tel:Bd,text:Dd,default:Dd};return ec(r[e]||r.default,Ds({},t))},Zd=/^\s*[\w\-+_]+(\.[\w\-+_]+)*@[\w\-+_]+\.[\w\-+_]+(\.[\w-+_]+)*\s*$/,Qd=/^[+]*[(]{0,1}[0-9]{1,3}[)]{0,1}[-\s./0-9]*$/,$d=function(){function e(e,t,r,a){this.shouldValidate=e.modes.includes(r),this.isValid=e.validate(t,a),this.errorMessage=e.errorMessage}return e.prototype.hasError=function(){return!this.isValid&&this.shouldValidate},e}(),Xd=function(){function e(e){this.validationResults=e}return Object.defineProperty(e.prototype,"isValid",{get:function(){return this.validationResults.every((function(e){return e.isValid}))},enumerable:!1,configurable:!0}),e.prototype.hasError=function(){return Boolean(this.getError())},e.prototype.getError=function(){return this.validationResults.find((function(e){return e.hasError()}))},e.prototype.getAllErrors=function(){return this.validationResults.filter((function(e){return e.hasError()}))},e}(),eu=function(){function e(e){void 0===e&&(e={}),this.rules={shopperEmail:{validate:function(e){return Zd.test(e)},errorMessage:"error.va.gen.01",modes:["blur"]},default:{validate:function(){return!0},modes:["blur","input"]}},this.setRules(e)}return e.prototype.setRules=function(e){this.rules=Ds(Ds({},this.rules),e)},e.prototype.getRulesFor=function(e){var t,r=null!==(t=this.rules[e])&&void 0!==t?t:this.rules.default;return Array.isArray(r)||(r=[r]),r},e.prototype.validate=function(e,t){var r=e.key,a=e.value,n=e.mode,o=void 0===n?"blur":n,i=this.getRulesFor(r).map((function(e){return new $d(e,a,o,t)}));return new Xd(i)},e}(),tu=function(e,t){return Object.keys(e).filter((function(e){return!t.includes(e)})).reduce((function(t,r){return t[r]=e[r],t}),{})},ru=function(e,t,r,a){return t.reduce((function(e,t){var n,o,i;return Ds(Ds({},e),((n={})[t]=null!==(i=null!==(o=e[t])&&void 0!==o?o:a[t])&&void 0!==i?i:r,n))}),e)};function au(e){var t=e.schema,r=e.defaultData,a=e.processField,n=t.reduce((function(e,t){var n,o,i,l=function(e){var t;if(void 0===r[e])return{valid:!1,errors:null,data:null};var n=a({key:e,value:r[e],mode:"blur"},{state:{data:r}}),o=n[0],i=n[1];return{valid:null!==(t=i.isValid)&&void 0!==t&&t,errors:i.hasError()?i.getError():null,data:o}}(t),s=l.valid,c=l.errors,d=l.data;return{valid:Ds(Ds({},e.valid),(n={},n[t]=s,n)),errors:Ds(Ds({},e.errors),(o={},o[t]=c,o)),data:Ds(Ds({},e.data),(i={},i[t]=d,i))}}),{data:{},valid:{},errors:{}});return{schema:t,data:n.data,valid:n.valid,errors:n.errors}}function nu(e){var t,r=e.rules,a=void 0===r?{}:r,n=e.formatters,o=void 0===n?{}:n,i=e.defaultData,l=void 0===i?{}:i,s=Wc((function(){return new eu(a)}),[]),c=function(e,t){var r=e.key,a=e.value,n=e.mode,i=o[r]?o[r](null!=a?a:""):a;return[i,s.validate({key:r,value:i,mode:n},t)]},d=Hc(function(e){return function(t,r){var a,n,o,i,l,s,c,d=r.type,u=r.key,p=r.value,m=r.mode,h=r.defaultData,f=r.schema;switch(d){case"setData":return Ds(Ds({},t),{data:Ds(Ds({},t.data),(a={},a[u]=p,a))});case"setValid":return Ds(Ds({},t),{valid:Ds(Ds({},t.valid),(n={},n[u]=p,n))});case"setErrors":return Ds(Ds({},t),{errors:Ds(Ds({},t.errors),(o={},o[u]=p,o))});case"updateField":var y=e({key:u,value:p,mode:m},{state:t}),b=y[0],v=y[1];return Ds(Ds({},t),{data:Ds(Ds({},t.data),(i={},i[u]=b,i)),errors:Ds(Ds({},t.errors),(l={},l[u]=v.hasError()?v.getError():null,l)),valid:Ds(Ds({},t.valid),(s={},s[u]=null!==(c=v.isValid)&&void 0!==c&&c,s))});case"setSchema":var g=au({schema:f,defaultData:h,processField:e}),k=t.schema.filter((function(e){return!f.includes(e)})),C=f.filter((function(e){return!t.schema.includes(e)})),_=ru(tu(t.data,k),C,null,g.data),N=ru(tu(t.valid,k),C,!1,g.valid),w=ru(tu(t.errors,k),C,null,g.errors);return Ds(Ds({},t),{schema:f,data:_,valid:N,errors:w});case"validateForm":var P=t.schema.reduce((function(r,a){var n,o,i,l=e({key:a,value:t.data[a],mode:"blur"},{state:t})[1];return{valid:Ds(Ds({},r.valid),(n={},n[a]=null!==(i=l.isValid)&&void 0!==i&&i,n)),errors:Ds(Ds({},r.errors),(o={},o[a]=l.hasError()?l.getError():null,o))}}),{valid:t.valid,errors:t.errors});return Ds(Ds({},t),{valid:P.valid,errors:P.errors});default:throw new Error("Undefined useForm action")}}}(c),{defaultData:l,schema:null!==(t=e.schema)&&void 0!==t?t:[],processField:c},au),u=d[0],p=d[1],m=Wc((function(){return u.schema.every((function(e){return u.valid[e]}))}),[u.schema,u.valid]),h=Jc((function(){p({type:"validateForm"})}),[]),f=Jc((function(e,t){return p({type:"setErrors",key:e,value:t})}),[]),y=Jc((function(e,t){return p({type:"setValid",key:e,value:t})}),[]),b=Jc((function(e,t){return p({type:"setData",key:e,value:t})}),[]);return{handleChangeFor:function(e,t){return void 0===t&&(t="blur"),function(r){var a=function(e,t){return t.target?"checkbox"===t.target.type?!u.data[e]:t.target.value:t}(e,r);p({type:"updateField",key:e,value:a,mode:t})}},triggerValidation:h,setSchema:Jc((function(e){return p({type:"setSchema",schema:e,defaultData:l})}),[u.schema]),setData:b,setValid:y,setErrors:f,isValid:m,schema:u.schema,valid:u.valid,errors:u.errors,data:u.data}}function ou(e){var t=e.label,r=void 0===t?"":t,a=e.namePrefix,n=e.requiredFields,o=e.visibility,i=ad().i18n,l=nu({schema:n,rules:e.validationRules,defaultData:e.data}),s=l.handleChangeFor,c=l.triggerValidation,d=l.data,u=l.valid,p=l.errors,m=l.isValid,h=function(e){return(a?a+".":"")+e},f=function(e){return function(t){var r=t.target.name.split(a+".").pop();s(r,e)(t)}};return qc((function(){var t=function(e){var t=e.name,r=e.registrationNumber;return Ds({},(t||r)&&{company:Ds(Ds({},t&&{name:t}),r&&{registrationNumber:r})})}(d);e.onChange({data:t,valid:u,errors:p,isValid:m})}),[d,u,p,m]),this.showValidation=c,"hidden"===o?null:"readOnly"===o?ec(Pd,Ds({},e,{data:d})):ec(_d,{classNameModifiers:[r],label:r},n.includes("name")&&ec(wd,{label:i.get("companyDetails.name"),classNameModifiers:["name"],errorMessage:!!p.name},Jd("text",{name:h("name"),value:d.name,classNameModifiers:["name"],onInput:f("input"),onChange:f("blur"),spellCheck:!1})),n.includes("registrationNumber")&&ec(wd,{label:i.get("companyDetails.registrationNumber"),classNameModifiers:["registrationNumber"],errorMessage:!!p.registrationNumber},Jd("text",{name:h("registrationNumber"),value:d.registrationNumber,classNameModifiers:["registrationNumber"],onInput:f("input"),onChange:f("blur"),spellCheck:!1})))}ou.defaultProps={data:{},onChange:function(){},visibility:"editable",requiredFields:["name","registrationNumber"],validationRules:{default:{validate:function(e){return e&&e.length>0},modes:["blur"]}}};var iu,lu,su,cu,du,uu,pu,mu,hu,fu=function(e){var t=e.data,r=t.firstName,a=t.lastName,n=t.shopperEmail,o=t.telephoneNumber;return ec(_d,{classNameModifiers:["personalDetails"],label:"personalDetails",readonly:!0},r&&r+" ",a&&a+" ",n&&ec(rc,null,ec("br",null),n),o&&ec(rc,null,ec("br",null),o))},yu={default:{validate:function(e){return e&&e.length>0},modes:["blur"]},dateOfBirth:{validate:function(e){return function(e){if(!e)return!1;var t=xd(e),r=Date.now()-Date.parse(t);return new Date(r).getFullYear()-1970>=18}(e)},errorMessage:"dateOfBirth.invalid",modes:["blur"]},telephoneNumber:{validate:function(e){return Qd.test(e)},modes:["blur"]},shopperEmail:{validate:function(e){return Zd.test(e)},modes:["blur"]}};function bu(e){var t=e.label,r=void 0===t?"":t,a=e.namePrefix,n=e.placeholders,o=e.requiredFields,i=e.visibility,l=ad().i18n,s=Wc(Sd,[]),c=nu({schema:o,rules:e.validationRules,defaultData:e.data}),d=c.handleChangeFor,u=c.triggerValidation,p=c.data,m=c.valid,h=c.errors,f=c.isValid,y=function(e){return function(t){var r=t.target.name.split(a+".").pop();d(r,e)(t)}},b=function(e){return(a?a+".":"")+e},v=function(e){return e&&e.errorMessage?l.get(e.errorMessage):!!e};return qc((function(){var t=function(e){var t=e.firstName,r=e.lastName,a=e.gender,n=e.dateOfBirth,o=e.shopperEmail,i=e.telephoneNumber;return Ds(Ds(Ds(Ds({},(t||r)&&{shopperName:Ds(Ds(Ds({},t&&{firstName:t}),r&&{lastName:r}),a&&{gender:a})}),n&&{dateOfBirth:xd(n)}),o&&{shopperEmail:o}),i&&{telephoneNumber:i})}(p);e.onChange({data:t,valid:m,errors:h,isValid:f})}),[p,m,h,f]),this.showValidation=u,"hidden"===i?null:"readOnly"===i?ec(fu,Ds({},e,{data:p})):ec(_d,{classNameModifiers:["personalDetails"],label:r},o.includes("firstName")&&ec(wd,{label:l.get("firstName"),classNameModifiers:["col-50","firstName"],errorMessage:!!h.firstName},Jd("text",{name:b("firstName"),value:p.firstName,classNameModifiers:["firstName"],onInput:y("input"),onChange:y("blur"),placeholder:n.firstName,spellCheck:!1})),o.includes("lastName")&&ec(wd,{label:l.get("lastName"),classNameModifiers:["col-50","lastName"],errorMessage:!!h.lastName},Jd("text",{name:b("lastName"),value:p.lastName,classNameModifiers:["lastName"],onInput:y("input"),onChange:y("blur"),placeholder:n.lastName,spellCheck:!1})),o.includes("gender")&&ec(wd,{errorMessage:!!h.gender,classNameModifiers:["gender"]},Jd("radio",{i18n:l,name:b("gender"),value:p.gender,items:[{id:"MALE",name:"male"},{id:"FEMALE",name:"female"}],classNameModifiers:["gender"],onInput:y("input"),onChange:y("blur")})),o.includes("dateOfBirth")&&ec(wd,{label:l.get("dateOfBirth"),classNameModifiers:["col-50","lastName"],errorMessage:v(h.dateOfBirth),helper:s?null:l.get("dateOfBirth.format")},Jd("date",{name:b("dateOfBirth"),value:p.dateOfBirth,classNameModifiers:["dateOfBirth"],onInput:y("input"),onChange:y("blur"),placeholder:n.dateOfBirth})),o.includes("shopperEmail")&&ec(wd,{label:l.get("shopperEmail"),classNameModifiers:["shopperEmail"],errorMessage:v(h.shopperEmail),dir:"ltr"},Jd("emailAddress",{name:b("shopperEmail"),value:p.shopperEmail,classNameModifiers:["shopperEmail"],onInput:y("input"),onChange:y("blur"),placeholder:n.shopperEmail})),o.includes("telephoneNumber")&&ec(wd,{label:l.get("telephoneNumber"),classNameModifiers:["telephoneNumber"],errorMessage:v(h.telephoneNumber),dir:"ltr"},Jd("tel",{name:b("telephoneNumber"),value:p.telephoneNumber,classNameModifiers:["telephoneNumber"],onInput:y("input"),onChange:y("blur"),placeholder:n.telephoneNumber})))}bu.defaultProps={data:{},onChange:function(){},placeholders:{},requiredFields:["firstName","lastName","gender","dateOfBirth","shopperEmail","telephoneNumber"],validationRules:yu,visibility:"editable"};var vu="N/A",gu=["street","houseNumberOrName","postalCode","city","stateOrProvince","country"],ku=gu[0],Cu=gu[1],_u=gu[2],Nu=gu[3],wu=gu[4],Pu=gu[5],Fu={AU:{hasDataset:!0,labels:(iu={},iu[Cu]="apartmentSuite",iu[wu]="state",iu[ku]="address",iu),optionalFields:[Cu],placeholders:(lu={},lu[wu]="select.state",lu),schema:[Pu,ku,Cu,Nu,[[wu,50],[_u,50]]]},BR:{hasDataset:!0,labels:(su={},su[wu]="state",su),placeholders:(cu={},cu[wu]="select.state",cu)},CA:{hasDataset:!0,labels:(du={},du[Cu]="apartmentSuite",du[wu]="provinceOrTerritory",du[ku]="address",du),optionalFields:[Cu],schema:[Pu,ku,Cu,[[Nu,70],[_u,30]],wu]},GB:{labels:(uu={},uu[Nu]="cityTown",uu),schema:[Pu,[[Cu,30],[ku,70]],[[Nu,70],[_u,30]],wu]},US:{hasDataset:!0,labels:(pu={},pu[_u]="zipCode",pu[Cu]="apartmentSuite",pu[wu]="state",pu[ku]="address",pu),optionalFields:[Cu],placeholders:(mu={},mu[wu]="select.state",mu),schema:[Pu,ku,Cu,Nu,[[wu,50],[_u,50]]]},default:{optionalFields:[],placeholders:(hu={},hu[wu]="select.provinceOrTerritory",hu),schema:[Pu,[[ku,70],[Cu,30]],[[_u,30],[Nu,70]],wu]}},Du=function(e){var t=e.data,r=e.label,a=t.street,n=t.houseNumberOrName,o=t.city,i=t.postalCode,l=t.stateOrProvince,s=t.country;return ec(_d,{classNameModifiers:[r],label:r,readonly:!0},!!a&&a,n&&", "+n+",",ec("br",null),i&&""+i,o&&", "+o,l&&l!==vu&&", "+l,s&&", "+s+" ")},Su=function(e){return{houseNumberOrName:{validate:function(t,r){var a,n,o=null===(n=null===(a=r.state)||void 0===a?void 0:a.data)||void 0===n?void 0:n.country;return o&&e.countryHasOptionalField(o,"houseNumberOrName")||(null==t?void 0:t.length)>0},modes:["blur"]},default:{validate:function(e){return(null==e?void 0:e.length)>0},modes:["blur"]}}},xu="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==xu&&xu,Au="URLSearchParams"in xu,Bu="Symbol"in xu&&"iterator"in Symbol,Tu="FileReader"in xu&&"Blob"in xu&&function(){try{return new Blob,!0}catch(e){return!1}}(),zu="FormData"in xu,Mu="ArrayBuffer"in xu;if(Mu)var Iu=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],ju=ArrayBuffer.isView||function(e){return e&&Iu.indexOf(Object.prototype.toString.call(e))>-1};function Ou(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function Eu(e){return"string"!=typeof e&&(e=String(e)),e}function Ru(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Bu&&(t[Symbol.iterator]=function(){return t}),t}function Lu(e){this.map={},e instanceof Lu?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Vu(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Uu(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function Ku(e){var t=new FileReader,r=Uu(t);return t.readAsArrayBuffer(e),r}function Hu(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function qu(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Tu&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:zu&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:Au&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Mu&&Tu&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Hu(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Mu&&(ArrayBuffer.prototype.isPrototypeOf(e)||ju(e))?this._bodyArrayBuffer=Hu(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Au&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Tu&&(this.blob=function(){var e=Vu(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=Vu(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(Ku)}),this.text=function(){var e=Vu(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,r=Uu(t);return t.readAsText(e),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),a=0;a<t.length;a++)r[a]=String.fromCharCode(t[a]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},zu&&(this.formData=function(){return this.text().then(Wu)}),this.json=function(){return this.text().then(JSON.parse)},this}Lu.prototype.append=function(e,t){e=Ou(e),t=Eu(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},Lu.prototype.delete=function(e){delete this.map[Ou(e)]},Lu.prototype.get=function(e){return e=Ou(e),this.has(e)?this.map[e]:null},Lu.prototype.has=function(e){return this.map.hasOwnProperty(Ou(e))},Lu.prototype.set=function(e,t){this.map[Ou(e)]=Eu(t)},Lu.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},Lu.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),Ru(e)},Lu.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Ru(e)},Lu.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),Ru(e)},Bu&&(Lu.prototype[Symbol.iterator]=Lu.prototype.entries);var Gu=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Yu(e,t){if(!(this instanceof Yu))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(t=t||{}).body;if(e instanceof Yu){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Lu(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Lu(t.headers)),this.method=function(e){var t=e.toUpperCase();return Gu.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;if(a.test(this.url))this.url=this.url.replace(a,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Wu(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),a=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(n))}})),t}function Ju(e,t){if(!(this instanceof Ju))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new Lu(t.headers),this.url=t.url||"",this._initBody(e)}Yu.prototype.clone=function(){return new Yu(this,{body:this._bodyInit})},qu.call(Yu.prototype),qu.call(Ju.prototype),Ju.prototype.clone=function(){return new Ju(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Lu(this.headers),url:this.url})},Ju.error=function(){var e=new Ju(null,{status:0,statusText:""});return e.type="error",e};var Zu=[301,302,303,307,308];Ju.redirect=function(e,t){if(-1===Zu.indexOf(t))throw new RangeError("Invalid status code");return new Ju(null,{status:t,headers:{location:e}})};var Qu=xu.DOMException;try{new Qu}catch(e){(Qu=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),Qu.prototype.constructor=Qu}function $u(e,t){return new Promise((function(r,a){var n=new Yu(e,t);if(n.signal&&n.signal.aborted)return a(new Qu("Aborted","AbortError"));var o=new XMLHttpRequest;function i(){o.abort()}o.onload=function(){var e,t,a={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Lu,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),a=r.shift().trim();if(a){var n=r.join(":").trim();t.append(a,n)}})),t)};a.url="responseURL"in o?o.responseURL:a.headers.get("X-Request-URL");var n="response"in o?o.response:o.responseText;setTimeout((function(){r(new Ju(n,a))}),0)},o.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){a(new Qu("Aborted","AbortError"))}),0)},o.open(n.method,function(e){try{return""===e&&xu.location.href?xu.location.href:e}catch(t){return e}}(n.url),!0),"include"===n.credentials?o.withCredentials=!0:"omit"===n.credentials&&(o.withCredentials=!1),"responseType"in o&&(Tu?o.responseType="blob":Mu&&n.headers.get("Content-Type")&&-1!==n.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof Lu?n.headers.forEach((function(e,t){o.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){o.setRequestHeader(e,Eu(t.headers[e]))})),n.signal&&(n.signal.addEventListener("abort",i),o.onreadystatechange=function(){4===o.readyState&&n.signal.removeEventListener("abort",i)}),o.send(void 0===n._bodyInit?null:n._bodyInit)}))}$u.polyfill=!0,xu.fetch||(xu.fetch=$u,xu.Headers=Lu,xu.Request=Yu,xu.Response=Ju);var Xu="fetch"in window?window.fetch:$u;function ep(e,t){var r=e.headers,a=void 0===r?[]:r,n=e.errorLevel,o=void 0===n?"warn":n,i=e.loadingContext,l=void 0===i?Fc:i,s=e.method,c=void 0===s?"GET":s,d=e.path,u=Ds({method:c,mode:"cors",cache:"default",credentials:"same-origin",headers:Ds({Accept:"application/json, text/plain, */*","Content-Type":"POST"===c?"application/json":"text/plain"},a),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},t&&{body:JSON.stringify(t)}),p=""+l+d;return Xu(p,u).then((function(t){return t.ok?t.json():tp(e.errorMessage||"Service at "+p+" is not available",o)})).catch((function(t){return tp(e.errorMessage||"Call to "+p+" failed. Error= "+t,o)}))}function tp(e,t){switch(t){case"silent":return null;case"info":case"warn":case"error":return console[t](e);default:throw new Error(e)}}var rp=function(e,t){return ep(Ds(Ds({},e),{method:"POST"}),t)};function ap(e,t,r){return function(e,t){return ep(Ds(Ds({},e),{method:"GET"}),t)}({loadingContext:t,errorLevel:"warn",errorMessage:"Dataset "+e+" is not available",path:"datasets/"+e+"/"+r+".json"})}function np(e){var t=e.classNameModifiers,r=e.label,a=e.onDropdownChange,n=e.readOnly,o=e.selectedCountry,i=e.specifications,l=e.value,s=ad(),c=s.i18n,d=s.loadingContext,u=Kc([]),p=u[0],m=u[1],h=Kc(!1),f=h[0],y=h[1],b=i.getPlaceholderKeyForField("stateOrProvince",o);return Gc((function(){if(!o||!i.countryHasDataset(o))return m([]),void y(!0);ap("states/"+o,d,c.locale).then((function(e){var t=e&&e.length?e:[];m(t),y(!0)})).catch((function(){m([]),y(!0)}))}),[o]),f&&p.length?ec(wd,{label:r,classNameModifiers:t,errorMessage:e.errorMessage},Jd("select",{name:"stateOrProvince",onChange:a,selected:l,placeholder:c.get(b),items:p,readonly:n&&!!l})):null}function op(e){var t=e.allowedCountries,r=void 0===t?[]:t,a=e.classNameModifiers,n=void 0===a?[]:a,o=e.errorMessage,i=e.onDropdownChange,l=e.value,s=ad(),c=s.i18n,d=s.loadingContext,u=Kc([]),p=u[0],m=u[1],h=Kc(!1),f=h[0],y=h[1],b=Kc(e.readOnly),v=b[0],g=b[1];return Gc((function(){ap("countries",d,c.locale).then((function(e){var t=r.length?e.filter((function(e){return r.includes(e.id)})):e;m(t||[]),g(1===t.length||v),y(!0)})).catch((function(e){console.error(e),m([]),y(!0)}))}),[]),f?ec(wd,{label:c.get("country"),errorMessage:o,classNameModifiers:n},Jd("select",{onChange:i,name:"country",placeholder:c.get("select.country"),selected:l,items:p,readonly:v&&!!l})):null}function ip(e){var t=ad().i18n,r=e.classNameModifiers,a=void 0===r?[]:r,n=e.data,o=e.errors,i=e.fieldName,l=e.onInput,s=!!o[i],c=n[i],d=n.country,u=e.specifications.countryHasOptionalField(d,i),p=e.specifications.getKeyForField(i,d),m=u?" "+t.get("field.title.optional"):"",h=""+t.get(p)+m;switch(i){case"country":return ec(op,{allowedCountries:e.allowedCountries,classNameModifiers:a,label:h,errorMessage:s,onDropdownChange:e.onDropdownChange,value:c});case"stateOrProvince":return ec(np,{classNameModifiers:a,label:h,errorMessage:s,onDropdownChange:e.onDropdownChange,selectedCountry:d,specifications:e.specifications,value:c});default:return ec(wd,{label:h,classNameModifiers:a,errorMessage:s},Jd("text",{classNameModifiers:a,name:i,value:c,onInput:l}))}}var lp=function(){function e(e){this.specifications=Ds(Ds({},Fu),e)}return e.prototype.countryHasDataset=function(e){var t,r;return!!(null===(r=null===(t=this.specifications)||void 0===t?void 0:t[e])||void 0===r?void 0:r.hasDataset)},e.prototype.countryHasOptionalField=function(e,t){var r,a,n;return!!(null===(n=null===(a=null===(r=this.specifications)||void 0===r?void 0:r[e])||void 0===a?void 0:a.optionalFields)||void 0===n?void 0:n.includes(t))},e.prototype.getAddressSchemaForCountry=function(e){var t,r;return(null===(r=null===(t=this.specifications)||void 0===t?void 0:t[e])||void 0===r?void 0:r.schema)||this.specifications.default.schema},e.prototype.getOptionalFieldsForCountry=function(e){var t,r,a;return(null===(r=null===(t=this.specifications)||void 0===t?void 0:t[e])||void 0===r?void 0:r.optionalFields)||(null===(a=this.specifications.default)||void 0===a?void 0:a.optionalFields)||[]},e.prototype.getKeyForField=function(e,t){var r,a,n;return(null===(n=null===(a=null===(r=this.specifications)||void 0===r?void 0:r[t])||void 0===a?void 0:a.labels)||void 0===n?void 0:n[e])||e},e.prototype.getPlaceholderKeyForField=function(e,t){var r,a,n,o,i,l;return(null===(n=null===(a=null===(r=this.specifications)||void 0===r?void 0:r[t])||void 0===a?void 0:a.placeholders)||void 0===n?void 0:n[e])||(null===(l=null===(i=null===(o=this.specifications)||void 0===o?void 0:o.default)||void 0===i?void 0:i.placeholders)||void 0===l?void 0:l[e])},e}();function sp(e){var t=e.label,r=void 0===t?"":t,a=e.requiredFields,n=e.visibility,o=Wc((function(){return new lp(e.specifications)}),[e.specifications]),i=nu({schema:a,defaultData:e.data,rules:e.validationRules||Su(o)}),l=i.data,s=i.errors,c=i.valid,d=i.isValid,u=i.handleChangeFor,p=i.triggerValidation;if(qc((function(){var e=o.countryHasDataset(l.country)?"":vu,t=Ds(Ds({},l),{stateOrProvince:e});a.forEach((function(e){var r;u(e,"input")(null!==(r=t[e])&&void 0!==r?r:"")}))}),[l.country]),qc((function(){var e=a.includes("stateOrProvince"),t=l.country&&o.countryHasDataset(l.country),r=e&&t,n=l.stateOrProvince||(r?"":vu);u("stateOrProvince","input")(n)}),[]),qc((function(){var t=o.getOptionalFieldsForCountry(l.country),r=gu.reduce((function(r,n){var o=t.includes(n),i=a.includes(n),s=l[n],c=e.data[n],d=o&&!s||!i?i||s||!c?vu:c:s;return(null==d?void 0:d.length)&&(r[n]=d),r}),{});e.onChange({data:r,valid:c,errors:s,isValid:d})}),[l,c,s,d]),this.showValidation=p,"hidden"===n)return null;if("readOnly"===n)return ec(Du,{data:l,label:r});var m=function(t,r){var n=r.classNameModifiers,i=void 0===n?[]:n;return a.includes(t)?ec(ip,{key:t,allowedCountries:e.allowedCountries,classNameModifiers:Bs(Bs([],i),[t]),data:l,errors:s,fieldName:t,onInput:u(t,"input"),onDropdownChange:u(t,"blur"),specifications:o}):null};return ec(_d,{classNameModifiers:[r],label:r},o.getAddressSchemaForCountry(l.country).map((function(e){return e instanceof Array?ec("div",{className:"adyen-checkout__field-group"},e.map((function(e){var t=e[0],r=e[1];return m(t,{classNameModifiers:["col-"+r]})}))):m(e,{})})))}function cp(e){var t,r,a=e.errorMessage,n=e.label,o=e.onChange,i=Ss(e,["errorMessage","label","onChange"]);return ec(wd,{classNameModifiers:["consentCheckbox"],errorMessage:a},ec(Md,{name:"consentCheckbox",classNameModifiers:Bs(Bs([],null!==(t=i.classNameModifiers)&&void 0!==t?t:i.classNameModifiers=[]),["consentCheckbox"]),onInput:o,value:null===(r=null==i?void 0:i.data)||void 0===r?void 0:r.consentCheckbox,label:n,checked:i.checked}))}sp.defaultProps={countryCode:null,data:{},onChange:function(){},visibility:"editable",requiredFields:gu,specifications:{}};var dp=["companyDetails","personalDetails","billingAddress","deliveryAddress"],up=function(e,t){return void 0===t&&(t={}),dp.reduce((function(r,a){var n,o="hidden"!==e[a],i="deliveryAddress"===a,l="hidden"===(null==e?void 0:e.billingAddress);return r[a]=o&&(!i||l||(void 0===(n=t[a])&&(n={}),Object.keys(n).length>1)),r}),{})};function pp(e){var t=e.countryCode,r=e.visibility,a=ad().i18n,n=Kc(up(r,e.data)),o=n[0],i=n[1],l=dp.reduce((function(e,t){return e[t]={current:null},e}),{}),s=!!e.consentCheckboxLabel,c=!s&&Object.keys(o).every((function(e){return!o[e]})),d="editable"===r.deliveryAddress&&"hidden"!==r.billingAddress,u=Kc(Ds(Ds({},e.data),s&&{consentCheckbox:!1})),p=u[0],m=u[1],h=Kc({}),f=h[0],y=h[1],b=Kc({}),v=b[0],g=b[1],k=Kc("ready"),C=k[0],_=k[1];this.setStatus=_,qc((function(){var t=Object.keys(o).every((function(e){return!o[e]||!!v[e]})),r=!s||!!v.consentCheckbox,a=t&&r,n=function(e,t){return Object.keys(t).filter((function(t){return e[t]})).reduce((function(e,r){return e[r]=t[r],e}),{})}(o,p);e.onChange({data:n,errors:f,valid:v,isValid:a})}),[p,o]);var N=function(e){return function(t){m((function(r){var a;return Ds(Ds({},r),((a={})[e]=t.data,a))})),g((function(r){var a;return Ds(Ds({},r),((a={})[e]=t.isValid,a))})),y((function(r){var a;return Ds(Ds({},r),((a={})[e]=t.errors,a))}))}};return this.showValidation=function(){dp.forEach((function(e){l[e].current&&l[e].current.showValidation()})),y(Ds({},s&&{consentCheckbox:!p.consentCheckbox}))},ec("div",{className:"adyen-checkout__open-invoice"},o.companyDetails&&ec(ou,{data:e.data.companyDetails,label:"companyDetails",onChange:N("companyDetails"),ref:l.companyDetails,visibility:r.companyDetails}),o.personalDetails&&ec(bu,{data:e.data.personalDetails,requiredFields:e.personalDetailsRequiredFields,label:"personalDetails",onChange:N("personalDetails"),ref:l.personalDetails,visibility:r.personalDetails}),o.billingAddress&&ec(sp,{allowedCountries:e.allowedCountries,countryCode:t,data:p.billingAddress,label:"billingAddress",onChange:N("billingAddress"),ref:l.billingAddress,visibility:r.billingAddress}),d&&ec(Md,{label:a.get("separateDeliveryAddress"),checked:o.deliveryAddress,classNameModifiers:["separateDeliveryAddress"],name:"separateDeliveryAddress",onChange:function(){i((function(e){return Ds(Ds({},e),{deliveryAddress:!o.deliveryAddress})}))}}),o.deliveryAddress&&ec(sp,{allowedCountries:e.allowedCountries,countryCode:t,data:p.deliveryAddress,label:"deliveryAddress",onChange:N("deliveryAddress"),ref:l.deliveryAddress,visibility:r.deliveryAddress}),s&&ec(cp,{data:p,errorMessage:!!f.consentCheckbox,label:e.consentCheckboxLabel,onChange:function(e){var t=e.target.checked;m((function(e){return Ds(Ds({},e),{consentCheckbox:t})})),g((function(e){return Ds(Ds({},e),{consentCheckbox:t})})),y((function(e){return Ds(Ds({},e),{consentCheckbox:!t})}))}}),e.showPayButton&&e.payButton({status:C,classNameModifiers:Bs([],c?["standalone"]:[]),label:a.get("confirmPurchase")}))}var mp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={loaded:!1},t}return Fs(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.i18n?this.props.i18n.loaded.then((function(){e.setState({loaded:!0})})):this.setState({loaded:!0})},t.prototype.render=function(e){var t=e.children;return this.state.loaded?ec(rd.Provider,{value:{i18n:this.props.i18n,loadingContext:this.props.loadingContext}},dc(t)):null},t}(ac),hp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatProps=function(e){var r,a,n=e.countryCode||(null===(a=null===(r=e.data)||void 0===r?void 0:r.billingAddress)||void 0===a?void 0:a.countryCode);return Ds(Ds({},e),{allowedCountries:[n],visibility:Ds(Ds({},t.defaultProps.visibility),e.visibility),data:Ds(Ds({},e.data),{billingAddress:Ds(Ds({},e.data.billingAddress),{country:n}),deliveryAddress:Ds(Ds({},e.data.deliveryAddress),{country:n})})})},t.prototype.formatData=function(){var e=this.state.data,t=void 0===e?{}:e,r=t.companyDetails,a=void 0===r?{}:r,n=t.personalDetails,o=void 0===n?{}:n,i=t.billingAddress,l=t.deliveryAddress;return Ds(Ds(Ds(Ds({paymentMethod:{type:this.constructor.type}},o),a),i&&{billingAddress:i}),(l||i)&&{deliveryAddress:l||i})},t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(pp,Ds({ref:function(t){e.componentRef=t}},this.props,this.state,{consentCheckbox:this.props.consentCheckbox,onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.defaultProps={onChange:function(){},data:{companyDetails:{},personalDetails:{},billingAddress:{},deliveryAddress:{}},visibility:{companyDetails:"hidden",personalDetails:"editable",billingAddress:"editable",deliveryAddress:"editable"}},t}(id);function fp(e){var t=ad().i18n,r=t.get("paymentConditions"),a=t.get("afterPay.agreement").split("%@"),n=a[0],o=a[1];return n&&o?ec(rc,null,n,ec("a",{className:"adyen-checkout__link",target:"_blank",rel:"noopener noreferrer",href:e.url},r),o):ec("span",{className:"adyen-checkout__checkbox__label"},t.get("privacyPolicy"))}var yp=["BE","NL"];var bp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){var r,a,n;return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:yp,consentCheckboxLabel:ec(fp,{url:(a=t.countryCode,n=null===(r=t.i18n)||void 0===r?void 0:r.locale,"en"===(null==n?void 0:n.toLowerCase().slice(0,2))?"https://www.afterpay.nl/en/algemeen/pay-with-afterpay/payment-conditions":"be"===(null==a?void 0:a.toLowerCase())?"https://www.afterpay.be/be/footer/betalen-met-afterpay/betalingsvoorwaarden":"https://www.afterpay.nl/nl/algemeen/betalen-met-afterpay/betalingsvoorwaarden")})})},t.type="afterpay_default",t}(hp),vp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:yp,consentCheckboxLabel:ec(fp,{url:"https://www.afterpay.nl/nl/algemeen/zakelijke-partners/betalingsvoorwaarden-zakelijk"})})},t.type="afterpay_b2b",t.defaultProps={onChange:function(){},data:{companyDetails:{},personalDetails:{},billingAddress:{},deliveryAddress:{}},visibility:{companyDetails:"editable",personalDetails:"editable",billingAddress:"editable",deliveryAddress:"editable"}},t}(hp);function gp(){var e=_c(window,"screen.colorDepth")||"",t=!!_c(window,"navigator.javaEnabled")&&window.navigator.javaEnabled(),r=_c(window,"screen.height")||"",a=_c(window,"screen.width")||"",n=_c(window,"navigator.userAgent")||"";return{acceptHeader:"*/*",colorDepth:e,language:_c(window,"navigator.language")||_c(window,"navigator.browserLanguage"),javaEnabled:t,screenHeight:r,screenWidth:a,userAgent:n,timeZoneOffset:(new Date).getTimezoneOffset()}}var kp=["en_GB","de_DE","fr_FR","it_IT","es_ES"],Cp=["en_US"];function _p(e,t){return function(e){return"US"===e?Cp:kp}(t).includes(e)?e:function(e){return"US"===e?"en_US":"en_GB"}(t)}function Np(e){return"noTagline"===e?"C0001":null}function wp(e){var t=e.amount,r=e.addressDetails,a=e.cancelUrl,n=e.checkoutMode,o=e.deliverySpecifications,i=e.returnUrl,l=e.merchantMetadata,s=e.configuration.storeId,c="ProcessOrder"===n,d=c?function(e){return{amount:String(Ys(e.value,e.currency)),currencyCode:e.currency}}(t):null;return Ds(Ds(Ds(Ds({storeId:s,webCheckoutDetails:Ds(Ds(Ds({},c?{checkoutResultReturnUrl:i}:{checkoutReviewReturnUrl:i}),a&&{checkoutCancelUrl:a}),c&&{checkoutMode:n})},c&&{paymentDetails:{chargeAmount:d,paymentIntent:"Confirm"}}),l&&{merchantMetadata:l}),o&&{deliverySpecifications:o}),r&&{addressDetails:r})}function Pp(e,t,r){return rp({loadingContext:e,path:"v1/AmazonPayUtility/getCheckoutDetails?clientKey="+t},r)}function Fp(e){var t=this,r=ad().loadingContext,a=e.amazonRef,n=e.configuration,o=void 0===n?{}:n,i=Kc(null),l=i[0],s=i[1],c=wp(e),d=function(e){var t;return Ds(Ds(Ds({},e.buttonColor&&{buttonColor:e.buttonColor}),e.design&&{design:Np(e.design)}),{checkoutLanguage:_p(e.locale,e.region),ledgerCurrency:e.currency||(null===(t=e.amount)||void 0===t?void 0:t.currency),merchantId:e.configuration.merchantId,productType:e.productType,placement:e.placement,sandbox:"TEST"===e.environment})}(e),u=function(){new Promise(e.onClick).then(t.initCheckout).catch((function(r){e.onError(r,t.componentRef)}))};return this.initCheckout=function(){var e={payloadJSON:JSON.stringify(c),publicKeyId:o.publicKeyId,signature:l};a.Pay.initCheckout(Ds(Ds({},d),{createCheckoutSessionConfig:e}))},qc((function(){var n=e.clientKey;(function(e,t,r){var a={loadingContext:e,path:"v1/AmazonPayUtility/signString?clientKey="+t},n={stringToSign:JSON.stringify(r)};return rp(a,n)})(r,n,c).then((function(t){if(!(null==t?void 0:t.signature))return console.error("Could not get AmazonPay signature");s(t.signature),e.showPayButton&&a.Pay.renderButton("#amazonPayButton",d).onClick(u)})).catch((function(r){console.error(r),e.onError&&e.onError(r,t.componentRef)}))}),[]),e.showPayButton?ec("div",{className:"adyen-checkout__amazonpay__button",id:"amazonPayButton"}):null}function Dp(e){var t=ad().i18n,r=e.amazonRef,a=e.amazonCheckoutSessionId;return qc((function(){var e={amazonCheckoutSessionId:a,changeAction:"changeAddress"};r.Pay.bindChangeAction(".adyen-checkout__amazonpay__button--changeAddress",e)}),[]),ec("button",{type:"button",className:"adyen-checkout__button adyen-checkout__button--ghost adyen-checkout__amazonpay__button--changeAddress"},t.get("amazonpay.changePaymentDetails"))}function Sp(e){var t=this,r=ad(),a=r.i18n,n=r.loadingContext;return this.createOrder=function(){var r=e.amazonCheckoutSessionId,a=e.amount,o=e.clientKey,i=e.publicKeyId,l=e.returnUrl;(function(e,t,r){return rp({loadingContext:e,path:"v1/AmazonPayUtility/updateCheckoutSession?clientKey="+t},r)})(n,o,{amount:a,checkoutResultReturnUrl:l,checkoutSessionId:r,publicKeyId:i}).then((function(e){var t;if(!(null===(t=null==e?void 0:e.action)||void 0===t?void 0:t.type))return console.error(e.errorMessage||"Could not get the AmazonPay URL");"redirect"===e.action.type&&window.location.assign(e.action.url)})).catch((function(r){e.onError&&e.onError(r,t.componentRef)}))},ec(nd,{classNameModifiers:["standalone","pay"],label:a.get("confirmPurchase"),onClick:this.createOrder})}function xp(e){return ec("button",{type:"button",className:"adyen-checkout__button  adyen-checkout__button--ghost adyen-checkout__amazonpay__button--signOut",onClick:function(){new Promise(e.onSignOut).then((function(){e.amazonRef.Pay.signout()})).catch(console.error)}},ad().i18n.get("amazonpay.signout"))}var Ap=function(e,t){var r=this;void 0===t&&(t="body"),this.load=function(){return new Promise((function(e,t){r.script.src=r.src,r.script.async=!0,r.script.onload=e,r.script.onerror=function(){r.remove(),t(new Error("Unable to load script "+r.src))};var a=document.querySelector(r.node),n=a.querySelector('script[src="'+r.src+'"]');n?n.addEventListener("load",e):a.appendChild(r.script)}))},this.remove=function(){return r.script.remove()},this.script=document.createElement("script"),this.src=e,this.node=t};function Bp(e){var t,r=Kc("pending"),a=r[0],n=r[1],o=Yc(null),i=Yc(null),l=function(){n("ready")};return this.submit=function(){return o.current&&o.current.initCheckout?o.current.initCheckout():i.current&&i.current.createOrder?i.current.createOrder():void 0},qc((function(){var t="US"===e.region?"https://static-na.payments-amazon.com/checkout.js":"https://static-eu.payments-amazon.com/checkout.js",r=new Ap(t);return window.amazon?l():r.load().then(l),function(){r.remove()}}),[]),"pending"===a?ec("div",{className:"adyen-checkout__amazonpay"},ec("div",{className:"adyen-checkout__amazonpay__status adyen-checkout__amazonpay__status--pending"},ec(Mc,null))):e.showSignOutButton?ec("div",{className:"adyen-checkout__amazonpay"},ec(xp,{amazonRef:window.amazon,onSignOut:e.onSignOut})):e.amazonCheckoutSessionId?ec("div",{className:"adyen-checkout__amazonpay"},e.showOrderButton&&ec(Sp,{amazonCheckoutSessionId:e.amazonCheckoutSessionId,amount:e.amount,clientKey:e.clientKey,onError:e.onError,publicKeyId:null===(t=e.configuration)||void 0===t?void 0:t.publicKeyId,returnUrl:e.returnUrl,ref:i}),e.showChangePaymentDetailsButton&&ec(Dp,{amazonCheckoutSessionId:e.amazonCheckoutSessionId,amazonRef:window.amazon})):ec("div",{className:"adyen-checkout__amazonpay"},ec(Fp,Ds({},e,{amazonRef:window.amazon,ref:o})))}var Tp={cancelUrl:window.location.href,configuration:{},environment:"TEST",locale:"en_GB",placement:"Cart",productType:"PayAndShip",region:"EU",returnUrl:window.location.href,showOrderButton:!0,showChangePaymentDetailsButton:!1,showSignOutButton:!1,showPayButton:!0,onClick:function(e){return e()},onSignOut:function(e){return e()}},zp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(e){return Ds(Ds({},e),{checkoutMode:e.isDropin?"ProcessOrder":e.checkoutMode,environment:e.environment.toUpperCase(),locale:e.locale.replace("-","_"),productType:e.isDropin&&!e.addressDetails?"PayOnly":e.productType,region:e.region.toUpperCase()})},t.prototype.formatData=function(){var e=this.props.amazonCheckoutSessionId;return{paymentMethod:Ds({type:t.type},e&&{checkoutSessionId:e}),browserInfo:this.browserInfo}},t.prototype.getShopperDetails=function(){var e=this.props,t=e.amazonCheckoutSessionId,r=e.configuration,a=void 0===r?{}:r,n=e.loadingContext,o=e.clientKey;return t?Pp(n,o,{checkoutSessionId:t,getDeliveryAddress:!0,publicKeyId:a.publicKeyId}):console.error("Could not shopper details. Missing checkoutSessionId.")},t.prototype.handleDeclineFlow=function(){var e=this,t=this.props,r=t.amazonCheckoutSessionId,a=t.configuration,n=void 0===a?{}:a,o=t.loadingContext,i=t.clientKey;if(!r)return console.error("Could handle the decline flow. Missing checkoutSessionId.");Pp(o,i,{checkoutSessionId:r,getDeclineFlowUrl:!0,publicKeyId:n.publicKeyId}).then((function(e){if(void 0===e&&(e={}),!(null==e?void 0:e.declineFlowUrl))throw e;window.location.assign(e.declineFlowUrl)})).catch((function(t){e.props.onError&&e.props.onError(t,e.componentRef)}))},Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"browserInfo",{get:function(){return gp()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var e=this.data,t=this.isValid,r=this.props.onSubmit,a=void 0===r?function(){}:r;return this.componentRef&&this.componentRef.submit?this.componentRef.submit():a({data:e,isValid:t},this)},t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(Bp,Ds({ref:function(t){e.componentRef=t}},this.props)))},t.type="amazonpay",t.defaultProps=Tp,t}(id),Mp={"apple-pay-button":"ApplePayButton-module_apple-pay-button__26P3-","apple-pay-button-black":"ApplePayButton-module_apple-pay-button-black__3Ml54","apple-pay-button-white":"ApplePayButton-module_apple-pay-button-white__1qE8A","apple-pay-button-white-with-line":"ApplePayButton-module_apple-pay-button-white-with-line__j9FE5","apple-pay-button--type-plain":"ApplePayButton-module_apple-pay-button--type-plain__2mnnX","apple-pay-button--type-buy":"ApplePayButton-module_apple-pay-button--type-buy__eMnIy","apple-pay-button--type-donate":"ApplePayButton-module_apple-pay-button--type-donate__3zvI8","apple-pay-button--type-check-out":"ApplePayButton-module_apple-pay-button--type-check-out__ipg0J","apple-pay-button--type-book":"ApplePayButton-module_apple-pay-button--type-book__155Xs","apple-pay-button--type-subscribe":"ApplePayButton-module_apple-pay-button--type-subscribe__3uPJ5","apple-pay-button--type-add-money":"ApplePayButton-module_apple-pay-button--type-add-money__xmCaj","apple-pay-button--type-contribute":"ApplePayButton-module_apple-pay-button--type-contribute__RCq2P","apple-pay-button--type-order":"ApplePayButton-module_apple-pay-button--type-order__f5tpZ","apple-pay-button--type-reload":"ApplePayButton-module_apple-pay-button--type-reload__1P53C","apple-pay-button--type-rent":"ApplePayButton-module_apple-pay-button--type-rent__2J4wk","apple-pay-button--type-support":"ApplePayButton-module_apple-pay-button--type-support__3-p0R","apple-pay-button--type-tip":"ApplePayButton-module_apple-pay-button--type-tip__2-gCt","apple-pay-button--type-top-up":"ApplePayButton-module_apple-pay-button--type-top-up__9UKXI"},Ip=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.render=function(e){var t=e.buttonColor,r=e.buttonType;return ec("button",{type:"button","aria-label":this.props.i18n.get("payButton"),lang:this.props.i18n.languageCode,className:zc("adyen-checkout__applepay__button","adyen-checkout__applepay__button--"+t,"adyen-checkout__applepay__button--"+r,[Mp["apple-pay-button"]],[Mp["apple-pay-button-"+t]],[Mp["apple-pay-button--type-"+r]]),onClick:this.props.onClick})},t.defaultProps={onClick:function(){},buttonColor:"black",buttonType:"plain"},t}(ac),jp=function(){function e(e,t){var r=this;this.session=new ApplePaySession(t.version,e),this.session.onvalidatemerchant=function(e){return r.onvalidatemerchant(e,t.onValidateMerchant)},this.session.onpaymentauthorized=function(e){return r.onpaymentauthorized(e,t.onPaymentAuthorized)},this.session.oncancel=function(e){return r.oncancel(e,t.onCancel)},"function"==typeof t.onPaymentMethodSelected&&(this.session.onpaymentmethodselected=function(e){return r.onpaymentmethodselected(e,t.onPaymentMethodSelected)}),"function"==typeof t.onShippingContactSelected&&(this.session.onshippingcontactselected=function(e){return r.onshippingcontactselected(e,t.onShippingContactSelected)}),"function"==typeof t.onShippingMethodSelected&&(this.session.onshippingmethodselected=function(e){return r.onshippingmethodselected(e,t.onShippingMethodSelected)})}return e.prototype.begin=function(){return this.session.begin()},e.prototype.onvalidatemerchant=function(e,t){var r=this;new Promise((function(r,a){return t(r,a,e.validationURL)})).then((function(e){r.session.completeMerchantValidation(e)})).catch((function(e){console.error(e),r.session.abort()}))},e.prototype.onpaymentauthorized=function(e,t){var r=this;return new Promise((function(r,a){return t(r,a,e)})).then((function(){r.session.completePayment(ApplePaySession.STATUS_SUCCESS)})).catch((function(){r.session.completePayment(ApplePaySession.STATUS_FAILURE)}))},e.prototype.onpaymentmethodselected=function(e,t){var r=this;return new Promise((function(r,a){return t(r,a,e)})).then((function(e){r.session.completePaymentMethodSelection(e)})).catch((function(e){r.session.completePaymentMethodSelection(e)}))},e.prototype.onshippingcontactselected=function(e,t){var r=this;return new Promise((function(r,a){return t(r,a,e)})).then((function(e){r.session.completeShippingContactSelection(e)})).catch((function(e){r.session.completeShippingContactSelection(e)}))},e.prototype.onshippingmethodselected=function(e,t){var r=this;return new Promise((function(r,a){return t(r,a,e)})).then((function(e){r.session.completeShippingMethodSelection(e)})).catch((function(e){r.session.completeShippingMethodSelection(e)}))},e.prototype.oncancel=function(e,t){return t(e)},e}(),Op={amount:{currency:"USD",value:0},countryCode:"US",totalPriceStatus:"final",totalPriceLabel:void 0,configuration:{merchantName:"",merchantId:""},initiative:"web",lineItems:void 0,merchantCapabilities:["supports3DS"],shippingMethods:void 0,shippingType:void 0,supportedCountries:void 0,supportedNetworks:["amex","discover","masterCard","visa"],requiredBillingContactFields:void 0,requiredShippingContactFields:void 0,billingContact:void 0,shippingContact:void 0,applicationData:void 0,onClick:function(e){return e()},onSubmit:function(){},onError:function(){},onAuthorized:function(e){return e()},onPaymentMethodSelected:null,onShippingContactSelected:null,onShippingMethodSelected:null,buttonType:"plain",buttonColor:"black",showPayButton:!0},Ep=function(e){var t=e.countryCode;e.companyName;var r=e.amount,a=Ss(e,["countryCode","companyName","amount"]),n=function(e){return String(Ys(e.value,e.currency))}(r);return{countryCode:t,currencyCode:r.currency,total:{label:a.totalPriceLabel,amount:n,type:a.totalPriceStatus},lineItems:a.lineItems,shippingMethods:a.shippingMethods,shippingType:a.shippingType,merchantCapabilities:a.merchantCapabilities,supportedCountries:a.supportedCountries,supportedNetworks:a.supportedNetworks,requiredShippingContactFields:a.requiredShippingContactFields,requiredBillingContactFields:a.requiredBillingContactFields,billingContact:a.billingContact,shippingContact:a.shippingContact,applicationData:a.applicationData}};var Rp=function(e){function t(t){var r=e.call(this,t)||this;return r.startSession=r.startSession.bind(r),r.submit=r.submit.bind(r),r.validateMerchant=r.validateMerchant.bind(r),r}return Fs(t,e),t.prototype.formatProps=function(e){var t,r,a,n,o=e.version||function(e){for(var t=[],r=e;r>0;r--)t.push(r);return t.find((function(e){return e&&window.ApplePaySession&&ApplePaySession.supportsVersion(e)}))}(11),i=(null===(t=e.brands)||void 0===t?void 0:t.length)?(a=e.brands,n={mc:"masterCard",amex:"amex",visa:"visa",elodebit:"elo",elo:"elo",interac:"interac",discover:"discover",jcb:"jcb",electron:"electron",maestro:"maestro",girocard:"girocard",cartebancaire:"cartesBancaires"},a.reduce((function(e,t){return n[t]&&!e.includes(n[t])&&e.push(n[t]),e}),[])):e.supportedNetworks;return Ds(Ds({},e),{configuration:e.configuration,supportedNetworks:i,version:o,totalPriceLabel:e.totalPriceLabel||(null===(r=e.configuration)||void 0===r?void 0:r.merchantName),onCancel:function(t){return e.onError(t)}})},t.prototype.formatData=function(){return{paymentMethod:Ds({type:t.type},this.state)}},t.prototype.submit=function(){var e=this;this.startSession((function(t,r,a){e.props.onSubmit&&e.props.onSubmit({data:e.data,isValid:e.isValid},e.elementRef),e.props.onAuthorized(t,r,a)}))},t.prototype.startPayment=function(){var e=this;return new Promise((function(t){e.startSession((function(r,a,n){return e.props.onAuthorized(r,a,n),t(!0)}))}))},t.prototype.startSession=function(e){var t=this,r=this.props,a=r.version,n=r.onValidateMerchant,o=r.onCancel,i=r.onPaymentMethodSelected,l=r.onShippingMethodSelected,s=r.onShippingContactSelected;return new Promise((function(e,r){return t.props.onClick(e,r)})).then((function(){var r=Ep(Ds({companyName:t.props.configuration.merchantName},t.props));new jp(r,{version:a,onCancel:o,onPaymentMethodSelected:i,onShippingMethodSelected:l,onShippingContactSelected:s,onValidateMerchant:n||t.validateMerchant,onPaymentAuthorized:function(r,a,n){n.payment.token&&n.payment.token.paymentData&&t.setState({applePayToken:btoa(JSON.stringify(n.payment.token.paymentData))}),e(r,a,n)}}).begin()}))},t.prototype.validateMerchant=function(e,t){return xs(this,void 0,void 0,(function(){var r,a,n,o,i,l,s,c,d,u,p,m,h;return As(this,(function(f){switch(f.label){case 0:r=window.location.hostname,a=this.props,n=a.clientKey,o=a.configuration,i=a.loadingContext,l=a.initiative,s=o.merchantName,c=o.merchantId,d={loadingContext:i,path:"v1/applePay/sessions?clientKey="+n},u={displayName:s,domainName:r,initiative:l,merchantIdentifier:c},f.label=1;case 1:return f.trys.push([1,3,,4]),[4,rp(d,u)];case 2:return p=f.sent(),(m=kd.decode(p.data))||t("Could not decode Apple Pay session"),h=JSON.parse(m),e(h),[3,4];case 3:return f.sent(),t("Could not get Apple Pay session"),[3,4];case 4:return[2]}}))}))},Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.isAvailable=function(){return"https:"!==document.location.protocol?Promise.reject(new Error("Trying to start an Apple Pay session from an insecure document")):this.props.onValidateMerchant||this.props.clientKey?window.ApplePaySession&&ApplePaySession.canMakePayments()&&ApplePaySession.supportsVersion(this.props.version)?Promise.resolve(ApplePaySession.canMakePayments()):Promise.reject(new Error("Apple Pay is not available on this device")):Promise.reject(new Error("clientKey was not provided"))},t.prototype.render=function(){var e=this;return this.props.showPayButton?ec(Ip,{i18n:this.props.i18n,buttonColor:this.props.buttonColor,buttonType:this.props.buttonType,onClick:function(t){t.preventDefault(),e.submit()}}):null},t.type="applepay",t.defaultProps=Op,t}(id),Lp=function(e,t){var r,a=e.issuer,n=null===(r=e.items.find((function(e){return e.id===a})))||void 0===r?void 0:r.name;return a&&n?t.get("continueTo")+" "+n:t.get("continue")},Vp=["issuer"],Up={issuer:{validate:function(e){return!!e&&e.length>0},modes:["blur"]}};function Kp(e){var t=e.items,r=e.placeholder,a=e.issuer,n=Ss(e,["items","placeholder","issuer"]),o=ad().i18n,i=nu({schema:Vp,defaultData:{issuer:a},rules:Up}),l=i.handleChangeFor,s=i.triggerValidation,c=i.data,d=i.valid,u=i.errors,p=i.isValid,m=Kc("ready"),h=m[0],f=m[1];return this.setStatus=function(e){f(e)},qc((function(){n.onChange({data:c,valid:d,errors:u,isValid:p})}),[c,d,u,p]),this.showValidation=function(){s()},ec("div",{className:"adyen-checkout__issuer-list"},ec(wd,{errorMessage:!!u.issuer,classNameModifiers:["issuer-list"]},Jd("select",{items:t,selected:c.issuer,placeholder:o.get(r),name:"issuer",className:"adyen-checkout__issuer-list__dropdown",onChange:l("issuer")})),n.showPayButton&&n.payButton({status:h,label:Lp({issuer:c.issuer,items:t},o)}))}Kp.defaultProps={onChange:function(){},placeholder:"idealIssuer.selectField.placeholder"};var Hp,qp=function(e,t){return function(r){if(!r)return null;var a=Ds({parentFolder:r?t+"/":"",type:r||t},e);return Sc(a)(r)}},Gp=function(e){function t(t){var r=e.call(this,t)||this;if(r.props.showImage){var a=qp({loadingContext:r.props.loadingContext},r.constructor.type);r.props.issuers=r.props.issuers.map((function(e){return Ds(Ds({},e),{icon:a(e.id)})}))}return r}return Fs(t,e),t.prototype.formatProps=function(e){var t=e.details&&e.details.length&&(e.details.find((function(e){return"issuer"===e.key}))||{}).items||e.issuers||[];return Ds(Ds({},e),{issuers:t})},t.prototype.formatData=function(){var e,t;return{paymentMethod:{type:this.constructor.type,issuer:null===(t=null===(e=this.state)||void 0===e?void 0:e.data)||void 0===t?void 0:t.issuer}}},Object.defineProperty(t.prototype,"isValid",{get:function(){var e;return!!(null===(e=this.state)||void 0===e?void 0:e.isValid)},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(Kp,Ds({ref:function(t){e.componentRef=t},items:this.props.issuers},this.props,this.state,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.defaultProps={showImage:!0,onValid:function(){},issuers:[],loadingContext:Fc},t}(id),Yp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{showImage:!1})},t.type="billdesk_online",t}(Gp),Wp=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{showImage:!1,placeholder:"issuerList.wallet.placeholder"})},t.type="billdesk_wallet",t}(Gp),Jp="encryptedCardNumber",Zp="encryptedExpiryDate",Qp="encryptedExpiryMonth",$p="encryptedExpiryYear",Xp="encryptedSecurityCode",em="encryptedPassword",tm="giftcard",rm=["amex","mc","visa"],am=["sepa","sepadirectdebit","ach",tm],nm="required",om="optional",im="hidden",lm=nm,sm=im,cm="Unsupported card entered",dm=((Hp={})["incomplete field"]="error.va.gen.01",Hp["field not valid"]="error.va.gen.02",Hp["luhn check failed"]="error.va.sf-cc-num.01",Hp["Card too old"]="error.va.sf-cc-dat.01",Hp["Date too far in future"]="error.va.sf-cc-dat.02",Hp["Your card expires before check out date"]="error.va.sf-cc-dat.03",Hp["Unsupported card entered"]="error.va.sf-cc-num.03",Hp),um=dm["incomplete field"],pm=function(e,t){return t===Zp?(e.encryptedExpiryMonth=!1,e.encryptedExpiryYear=!1):e[t]=!1,e},mm=function(e,t){return function(r,a){var n=!0!==t.valid[a]?function(e,t){return 1!==t||e!==Qp&&e!==$p?e:Zp}(a,e):null;return(n=function(e,t){var r=e===Xp,a=!t.errors.encryptedSecurityCode;return(t.cvcPolicy===om||t.cvcPolicy===im)&&a&&r?null:e}(n,t))&&!r.includes(n)&&r.push(n),r}},hm=function(e,t){var r="card"===e?"nocard":e||"nocard";return Sc({type:r,extension:"svg",loadingContext:t})(r)};function fm(e){return"object"==typeof e&&null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function ym(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fm(e[0])?e[0]:e;return{from:function(e){return r.map((function(t){var r;return t in e?((r={})[t]=e[t],r):{}})).reduce((function(e,t){return Ds(Ds({},e),t)}),{})}}}function bm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=fm(e[0])?e[0]:e;return{from:function(e){var t=Object.keys(e).filter((function(e){return!r.includes(e)}));return ym.apply(void 0,t).from(e)}}}var vm=Object.prototype.toString;function gm(e){return"object"==typeof e&&null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function km(e){return null!=e}function Cm(e){return!1!==e&&km(e)}function _m(e){return!!e&&"object"==typeof e}function Nm(e,t){void 0===e&&(e={}),void 0===t&&(t={});var r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(var n=0,o=r;n<o.length;n++){var i=o[n];if(_m(e[i])&&!Nm(e[i],t[i]))return!1;if(e[i]!==t[i])return!1}return!0}function wm(e){return!Cm(e)||(!(!("number"==typeof(t=e)||_m(t)&&"[object Number]"===vm.call(t))||0!==e&&!Number.isNaN(e))||(!(!gm(e)&&!function(e){return"string"==typeof e||_m(e)&&"[object String]"===vm.call(e)}(e)||0!==e.length)||!(!_m(e)||0!==Object.keys(e).length)));var t}var Pm=window.console&&window.console.error&&window.console.error.bind(window.console);window.console&&window.console.info&&window.console.info.bind(window.console);var Fm=window.console&&window.console.log&&window.console.log.bind(window.console),Dm=window.console&&window.console.warn&&window.console.warn.bind(window.console);function Sm(){var e;this.config.cardGroupTypes=gm(e=this.props.cardGroupTypes)&&e.length?e:rm;var t=this.props.loadingContext;if(t){var r;this.config.loadingContext="/"===(r=t).charAt(r.length-1)?t:t+"/",this.config.isCreditCardType=!1===am.includes(this.props.type),this.config.iframeUIConfig=this.props.iframeUIConfig,this.config.allowedDOMAccess=!(!1===this.props.allowedDOMAccess||"false"===this.props.allowedDOMAccess),this.config.autoFocus=!(!1===this.props.autoFocus||"false"===this.props.autoFocus),this.config.showWarnings=!0===this.props.showWarnings||"true"===this.props.showWarnings,this.config.trimTrailingSeparator=!(!1===this.props.trimTrailingSeparator||"false"===this.props.trimTrailingSeparator),this.config.keypadFix=!(!1===this.props.keypadFix||"false"===this.props.keypadFix),this.config.legacyInputMode=this.props.legacyInputMode||null,this.config.minimumExpiryDate=this.props.minimumExpiryDate||null,this.config.sfLogAtStart=!0===this.props._b$dl;var a=this.config.isCreditCardType?"card":this.props.type;a.indexOf("sepa")>-1&&(a="iban");var n=btoa(window.location.origin);this.config.iframeSrc=this.config.loadingContext+"securedfields/"+this.props.clientKey+"/3.5.3/securedFields.html?type="+a+"&d="+n}else Dm("WARNING Config :: no loadingContext has been specified!")}var xm=function(){};function Am(e){void 0===e&&(e={}),this.callbacks.onLoad=e.onLoad?e.onLoad:xm,this.callbacks.onConfigSuccess=e.onConfigSuccess?e.onConfigSuccess:xm,this.callbacks.onFieldValid=e.onFieldValid?e.onFieldValid:xm,this.callbacks.onAllValid=e.onAllValid?e.onAllValid:xm,this.callbacks.onBrand=e.onBrand?e.onBrand:xm,this.callbacks.onError=e.onError?e.onError:xm,this.callbacks.onFocus=e.onFocus?e.onFocus:xm,this.callbacks.onBinValue=e.onBinValue?e.onBinValue:xm,this.callbacks.onAutoComplete=e.onAutoComplete?e.onAutoComplete:xm,this.callbacks.onAdditionalSFConfig=e.onAdditionalSFConfig?e.onAdditionalSFConfig:xm,this.callbacks.onAdditionalSFRemoved=e.onAdditionalSFRemoved?e.onAdditionalSFRemoved:xm}var Bm=function(e,t,r){if(t){var a=JSON.stringify(e);t.postMessage(a,r)}},Tm=function(e,t){return!Nm(e,t)};function zm(e){if(e.fieldType===Jp){var t={brand:e.brand,cvcPolicy:e.cvcPolicy,showSocialSecurityNumber:e.showSocialSecurityNumber},r=Tm(t,this.state.brand);if(!r)return null;var a="card"===this.state.type||"bcmc"===this.state.type;if(a&&r&&(this.state.brand=t,Object.prototype.hasOwnProperty.call(this.state.securedFields,Xp))){var n={txVariant:this.state.type,brand:t.brand,fieldType:Xp,cvcPolicy:e.cvcPolicy,numKey:this.state.securedFields.encryptedSecurityCode.numKey};Bm(n,this.getIframeContentWin(Xp),this.config.loadingContext)}var o=a?ym(["brand","cvcPolicy","cvcText","datePolicy","showSocialSecurityNumber"]).from(e):null;if(o&&o.brand){var i=o;i.type=this.state.type,i.rootNode=this.props.rootNode,this.callbacks.onBrand(i)}return!0}return!1}var Mm=function(e){return{fieldType:e.fieldType,encryptedFieldName:e.encryptedFieldName,uid:e.uuid,valid:e.isValid,type:e.txVariant,rootNode:e.rootNode}},Im=function(e,t){var r=[];return e&&"function"==typeof e.querySelectorAll&&(r=[].slice.call(e.querySelectorAll(t))),r},jm=function(e,t){if(e)return e.querySelector(t)},Om=function(e,t){if(e)return e.getAttribute(t)},Em=function(e,t,r,a){if("function"!=typeof e.addEventListener){if(!e.attachEvent)throw new Error(": Unable to bind "+t+"-event");e.attachEvent("on"+t,r)}else e.addEventListener(t,r,a)},Rm=function(e,t,r,a){if("function"==typeof e.addEventListener)e.removeEventListener(t,r,a);else{if(!e.attachEvent)throw new Error(": Unable to unbind "+t+"-event");e.detachEvent("on"+t,r)}},Lm=function(e,t,r,a,n){if(!Object.prototype.hasOwnProperty.call(e,"error"))return null;var o=t,i={rootNode:a,fieldType:e.fieldType,error:null,type:null},l=""!==e.error;return l||o.hasError?o.errorType===dm["Unsupported card entered"]?null:(i.error=l?e.error:"",i.type=r,o.hasError=l,o.errorType=i.error,n(i),i):null};function Vm(e){var t,r,a,n,o=e.fieldType;if("card"===this.state.type&&Object.prototype.hasOwnProperty.call(e,"cvcPolicy")&&km(e.cvcPolicy)&&Object.prototype.hasOwnProperty.call(this.state.securedFields,Xp)&&(this.state.securedFields.encryptedSecurityCode.cvcPolicy=e.cvcPolicy),Lm(e,this.state.securedFields[o],this.state.type,this.props.rootNode,this.callbacks.onError),this.state.securedFields[o].isEncrypted){t=function(e){var t,r,a=e.fieldType,n=e.txVariant,o=e.rootNode,i=a===Zp,l=[],s=["encryptedExpiryMonth","encryptedExpiryYear"],c=i?2:1;for(t=0;t<c;t+=1){r=i?s[t]:a;var d=Mm({fieldType:a,encryptedFieldName:i?r:a,uuid:n+"-encrypted-"+r,isValid:!1,txVariant:n,rootNode:o});l.push(d)}return l}({fieldType:o,txVariant:this.state.type,rootNode:this.props.rootNode}),o===Jp&&(t[0].endDigits="");for(var i=0,l=t.length;i<l;i+=1)this.config.allowedDOMAccess&&(r=this.props.rootNode,a=t[i].uid,n=void 0,(n=jm(r,"#"+a))&&r.removeChild(n)),this.callbacks.onFieldValid(t[i]);this.state.securedFields[o].isEncrypted=!1}this.assessFormValidity(),Object.prototype.hasOwnProperty.call(e,"brand")&&this.processBrand(e)}function Um(e){var t,r,a=e.fieldType;this.config.autoFocus&&("year"!==e.type&&a!==$p||this.setFocusOnFrame(Xp),a===Qp&&this.setFocusOnFrame($p));var n=e[a];this.state.securedFields[a].isEncrypted=!0,this.config.allowedDOMAccess&&function(e,t,r){var a,n,o,i,l,s,c,d;for(a=0;a<e.length;a+=1){var u=e[a];n=t+"-encrypted-"+(o=u.encryptedFieldName),l=o,s=u.blob,d=void 0,(d=jm(i=r,"#"+(c=n)))||((d=document.createElement("input")).type="hidden",d.name=l,d.id=c,i.appendChild(d)),d.setAttribute("value",s)}}(n,this.state.type,this.props.rootNode),Lm({error:"",fieldType:a},this.state.securedFields[a],this.state.type,this.props.rootNode,this.callbacks.onError);var o=function(e){var t,r,a,n,o,i=e.fieldType,l=e.txVariant,s=e.rootNode,c=e.encryptedObjArr,d=[];for(t=0;t<c.length;t+=1){r=l+"-encrypted-"+(n=(a=c[t]).encryptedFieldName),o=a.blob;var u=Mm({fieldType:i,encryptedFieldName:n,uuid:r,isValid:!0,txVariant:l,rootNode:s});u.blob=o,d.push(u)}return d}({fieldType:a,txVariant:this.state.type,rootNode:this.props.rootNode,encryptedObjArr:n});if(a===Qp&&Object.prototype.hasOwnProperty.call(this.state.securedFields,$p)){var i={txVariant:this.state.type,code:e.code,blob:n[0].blob,fieldType:$p,numKey:this.state.securedFields.encryptedExpiryYear.numKey};Bm(i,this.getIframeContentWin($p),this.config.loadingContext)}for(a===Jp&&Cm(e.endDigits)&&(o[0].endDigits=e.endDigits),t=0,r=o.length;t<r;t+=1)this.callbacks.onFieldValid(o[t]);this.assessFormValidity()}var Km={__NO_BRAND:"noBrand",cards:[]};Km.cards.push({cardType:"mc",startingRules:[51,52,53,54,55,22,23,24,25,26,27],permittedLengths:[16],pattern:/^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,securityCode:"CVC"}),Km.cards.push({cardType:"visadankort",startingRules:[4571],permittedLengths:[16],pattern:/^(4571)[0-9]{0,12}$/}),Km.cards.push({cardType:"visa",startingRules:[4],permittedLengths:[13,16,19],pattern:/^4[0-9]{0,18}$/,securityCode:"CVV"}),Km.cards.push({cardType:"amex",startingRules:[34,37],permittedLengths:[15],pattern:/^3[47][0-9]{0,13}$/,securityCode:"CID"}),Km.cards.push({cardType:"diners",startingRules:[36],permittedLengths:[14],pattern:/^(36)[0-9]{0,12}$/}),Km.cards.push({cardType:"maestrouk",startingRules:[6759],permittedLengths:[16,18,19],pattern:/^(6759)[0-9]{0,15}$/}),Km.cards.push({cardType:"solo",startingRules:[6767],permittedLengths:[16,18,19],pattern:/^(6767)[0-9]{0,15}$/}),Km.cards.push({cardType:"laser",startingRules:[6304,6706,677117,677120],permittedLengths:[16,17,18,19],pattern:/^(6304|6706|6709|6771)[0-9]{0,15}$/,cvcPolicy:"optional"}),Km.cards.push({cardType:"discover",startingRules:[6011,644,645,646,647,648,649,65],permittedLengths:[16],pattern:/^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/}),Km.cards.push({cardType:"jcb",startingRules:[3528,3529,353,354,355,356,357,358],permittedLengths:[16,19],pattern:/^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,securityCode:"CAV"}),Km.cards.push({cardType:"bcmc",startingRules:[6703,479658,606005],permittedLengths:[16,17,18,19],pattern:/^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,cvcPolicy:"hidden"}),Km.cards.push({cardType:"bijcard",startingRules:[5100081],permittedLengths:[16],pattern:/^(5100081)[0-9]{0,9}$/}),Km.cards.push({cardType:"dankort",startingRules:[5019],permittedLengths:[16],pattern:/^(5019)[0-9]{0,12}$/}),Km.cards.push({cardType:"hipercard",startingRules:[606282],permittedLengths:[16],pattern:/^(606282)[0-9]{0,10}$/}),Km.cards.push({cardType:"cup",startingRules:[62,81],permittedLengths:[14,15,16,17,18,19],pattern:/^(62|81)[0-9]{0,17}$/}),Km.cards.push({cardType:"maestro",startingRules:[50,56,57,58,6],permittedLengths:[16,17,18,19],pattern:/^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,cvcPolicy:"optional"}),Km.cards.push({cardType:"elo",startingRules:[506699,50670,50671,50672,50673,50674,50675,50676,506770,506771,506772,506773,506774,506775,506776,506777,506778,401178,438935,451416,457631,457632,504175,627780,636297,636368],permittedLengths:[16],pattern:/^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/}),Km.cards.push({cardType:"uatp",startingRules:[1],permittedLengths:[15],pattern:/^1[0-9]{0,14}$/,cvcPolicy:"optional"}),Km.cards.push({cardType:"cartebancaire",startingRules:[4,5,6],permittedLengths:[16],pattern:/^[4-6][0-9]{0,15}$/}),Km.cards.push({cardType:"visaalphabankbonus",startingRules:[450903],permittedLengths:[16],pattern:/^(450903)[0-9]{0,10}$/}),Km.cards.push({cardType:"mcalphabankbonus",startingRules:[510099],permittedLengths:[16],pattern:/^(510099)[0-9]{0,10}$/}),Km.cards.push({cardType:"hiper",startingRules:[637095,637568,637599,637609,637612],permittedLengths:[16],pattern:/^(637095|637568|637599|637609|637612)[0-9]{0,10}$/}),Km.cards.push({cardType:"oasis",startingRules:[982616],permittedLengths:[16],pattern:/^(982616)[0-9]{0,10}$/,cvcPolicy:"optional"}),Km.cards.push({cardType:"karenmillen",startingRules:[98261465],permittedLengths:[16],pattern:/^(98261465)[0-9]{0,8}$/,cvcPolicy:"optional"}),Km.cards.push({cardType:"warehouse",startingRules:[982633],permittedLengths:[16],pattern:/^(982633)[0-9]{0,10}$/,cvcPolicy:"optional"}),Km.cards.push({cardType:"mir",startingRules:[220],permittedLengths:[16,17,18,19],pattern:/^(220)[0-9]{0,16}$/}),Km.cards.push({cardType:"codensa",startingRules:[590712],permittedLengths:[16],pattern:/^(590712)[0-9]{0,10}$/}),Km.cards.push({cardType:"naranja",startingRules:[377798,377799,402917,402918,527571,527572,589562],permittedLengths:[16,17,18,19],pattern:/^(37|40|5[28])([279])\d*$/}),Km.cards.push({cardType:"cabal",startingRules:[589657,600691,603522,6042,6043,636908],permittedLengths:[16,17,18,19],pattern:/^(58|6[03])([03469])\d*$/}),Km.cards.push({cardType:"shopping",startingRules:[2799,589407,603488],permittedLengths:[16,17,18,19],pattern:/^(27|58|60)([39])\d*$/}),Km.cards.push({cardType:"argencard",startingRules:[501],permittedLengths:[16,17,18,19],pattern:/^(50)(1)\d*$/}),Km.cards.push({cardType:"troy",startingRules:[9792],permittedLengths:[16],pattern:/^(97)(9)\d*$/}),Km.cards.push({cardType:"forbrugsforeningen",startingRules:[600722],permittedLengths:[16],pattern:/^(60)(0)\d*$/}),Km.cards.push({cardType:"vpay",startingRules:[401,408,413,434,435,437,439,441,442,443,444,446,447,455,458,460,461,463,466,471,479,482,483,487],permittedLengths:[13,14,15,16,17,18,19],pattern:/^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/}),Km.cards.push({cardType:"rupay",startingRules:[508528],permittedLengths:[16],pattern:/^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/});var Hm=function(e){return Km.cards.filter((function(t){return t.cardType===e}))[0]},qm=function(e){return void 0===e&&(e="card"),"card"===e||"scheme"===e};Km.__NO_BRAND,Km.cards;var Gm=function(e){var t=dm[e];return t||((t=Object.keys(dm).find((function(t){return dm[t]===e})))||e)},Ym=function(e,t){var r=Ds({},e);return r.error=r.error?r.error:function(e){return Object.keys(dm).reduce((function(t,r){var a=dm[r];return(a.indexOf("sf-")>-1||a.indexOf("gen.01")>-1)&&(t[a]=e.get(a)),t}),{})}(t),r};var Wm,Jm=function(e){function t(t,r){var a=e.call(this)||this,n=["fieldType","iframeSrc","cvcPolicy","datePolicy","loadingContext","holderEl"],o=bm(n).from(t);a.config=Ds(Ds(Ds({},a.config),o),{iframeUIConfig:Ds({},o.iframeUIConfig)});var i=ym(n).from(t);return a.fieldType=i.fieldType,a.cvcPolicy=i.cvcPolicy,a.datePolicy=i.datePolicy,a.iframeSrc=i.iframeSrc,a.loadingContext=i.loadingContext,a.holderEl=i.holderEl,a.isValid=!1,a.iframeContentWindow=null,a.numKey=function(){if(!window.crypto)return 4294967296*Math.random()|0;var e=new Uint32Array(1);return window.crypto.getRandomValues(e),e[0]}(),a.isEncrypted=!1,a.hasError=!1,a.errorType="",a.init(r)}return Fs(t,e),t.prototype.init=function(e){var t=function(e,t,r){var a,n="card"===e.txVariant?"creditCard":e.txVariant,o=r.get(n+"."+t+".aria.iframeTitle"),i=r.get(n+"."+t+".aria.label"),l=r.locale,s=Ym({iframeTitle:o,label:i},r);return Ds(Ds({},l&&{lang:l}),((a={})[t]=s,a))}(this.config,this.fieldType,e);this.config.iframeUIConfig.ariaConfig=t;var r=function(e,t,r){var a,n,o,i=e.txVariant,l=function(e){var t;return(t={}).encryptedCardNumber=e.get&&e.get("creditCard.numberField.placeholder"),t.encryptedExpiryDate=e.get&&e.get("creditCard.expiryDateField.placeholder"),t.encryptedExpiryMonth=e.get&&e.get("creditCard.expiryDateField.month.placeholder"),t.encryptedExpiryYear=e.get&&e.get("creditCard.expiryDateField.year.placeholder"),t.encryptedSecurityCode=e.get&&e.get("creditCard.cvcField.placeholder"),t.encryptedSecurityCode3digits=e.get&&e.get("creditCard.cvcField.placeholder.3digits"),t.encryptedSecurityCode4digits=e.get&&e.get("creditCard.cvcField.placeholder.4digits"),t.encryptedPassword=e.get&&e.get("creditCard.encryptedPassword.placeholder"),t}(r);return Ds(Ds(Ds({},t!==Xp&&((a={})[t]=l[t],a)),t===Xp&&i===tm&&((n={})[t]=l[t],n)),t===Xp&&i!==tm&&((o={}).encryptedSecurityCode3digits=l.encryptedSecurityCode3digits,o.encryptedSecurityCode4digits=l.encryptedSecurityCode4digits,o))}(this.config,this.fieldType,e);this.config.iframeUIConfig.placeholders=r;var a=function(e){var t=e.src,r=e.title,a=void 0===r?"iframe element":r,n=e.policy,o=void 0===n?"origin":n,i=e.styleStr,l=void 0===i?"border: none; height:100%; width:100%;":i,s=document.createElement("iframe");s.setAttribute("src",t),s.setAttribute("class","js-iframe"),s.setAttribute("title",a),s.setAttribute("frameborder","0"),s.setAttribute("scrolling","no"),s.setAttribute("allowtransparency","true"),s.setAttribute("style",l),s.setAttribute("referrerpolicy",o);var c=document.createTextNode("<p>Your browser does not support iframes.</p>");return s.appendChild(c),s}({src:this.iframeSrc,title:t[this.fieldType].iframeTitle,policy:"origin"});this.holderEl.appendChild(a);var n=jm(this.holderEl,".js-iframe");return n&&(this.iframeContentWindow=n.contentWindow,this.iframeOnLoadListener=this.iframeOnLoadListenerFn,Em(n,"load",this.iframeOnLoadListener,!1)),this},t.prototype.iframeOnLoadListenerFn=function(){Rm(window,"load",this.iframeOnLoadListener,!1),this.postMessageListener=this.postMessageListenerFn,Em(window,"message",this.postMessageListener,!1);var e={fieldType:this.fieldType,cvcPolicy:this.cvcPolicy,numKey:this.numKey,txVariant:this.config.txVariant,extraFieldData:this.config.extraFieldData,cardGroupTypes:this.config.cardGroupTypes,iframeUIConfig:this.config.iframeUIConfig,sfLogAtStart:this.config.sfLogAtStart,showWarnings:this.config.showWarnings,trimTrailingSeparator:this.config.trimTrailingSeparator,isCreditCardType:this.config.isCreditCardType,legacyInputMode:this.config.legacyInputMode,minimumExpiryDate:this.config.minimumExpiryDate};Bm(e,this.iframeContentWindow,this.loadingContext),this.onIframeLoadedCallback()},t.prototype.postMessageListenerFn=function(e){if(function(e,t,r){var a=e.origin,n=t.indexOf("/checkoutshopper/"),o=n>-1?t.substring(0,n):t,i=o.length-1;return"/"===o.charAt(i)&&(o=o.substring(0,i)),a===o||(r&&(Dm("WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!\n Received message with origin:",a,"but the only allowed origin for messages to CSF is",o),Dm("### event.data=",e.data)),!1)}(e,this.loadingContext,this.config.showWarnings)){var t;try{t=JSON.parse(e.data)}catch(t){return function(e){return e.data&&e.data.type&&"string"==typeof e.data.type&&e.data.type.indexOf("webpack")>-1}(e)?void(this.config.showWarnings&&Fm("### SecuredField::postMessageListenerFn:: PARSE FAIL - WEBPACK")):function(e){return e.data&&"string"==typeof e.data&&e.data.indexOf("cvox")>-1}(e)?void(this.config.showWarnings&&Fm("### SecuredField::postMessageListenerFn:: PARSE FAIL - CHROMEVOX")):void(this.config.showWarnings&&Fm("### SecuredField::postMessageListenerFn:: PARSE FAIL - UNKNOWN REASON: event.data=",e.data))}if(Object.prototype.hasOwnProperty.call(t,"action")&&Object.prototype.hasOwnProperty.call(t,"numKey"))if(this.numKey===t.numKey)switch(t.action){case"encryption":this.isValid=!0,this.onEncryptionCallback(t);break;case"config":this.onConfigCallback(t);break;case"focus":this.onFocusCallback(t);break;case"binValue":this.onBinValueCallback(t);break;case"click":this.onClickCallback(t);break;case"shifttab":this.onShiftTabCallback(t);break;case"autoComplete":this.onAutoCompleteCallback(t);break;default:this.isValid=!1,this.onValidationCallback(t)}else this.config.showWarnings&&Dm("WARNING SecuredField :: postMessage listener for iframe :: data mismatch! (Probably a message from an unrelated securedField)");else this.config.showWarnings&&Dm("WARNING SecuredField :: postMessage listener for iframe :: data mismatch!")}},t.prototype.destroy=function(){Rm(window,"message",this.postMessageListener,!1),this.iframeContentWindow=null,function(e){for(;e.firstChild;)e.removeChild(e.firstChild)}(this.holderEl)},t.prototype.onIframeLoaded=function(e){return this.onIframeLoadedCallback=e,this},t.prototype.onEncryption=function(e){return this.onEncryptionCallback=e,this},t.prototype.onValidation=function(e){return this.onValidationCallback=e,this},t.prototype.onConfig=function(e){return this.onConfigCallback=e,this},t.prototype.onFocus=function(e){return this.onFocusCallback=e,this},t.prototype.onBinValue=function(e){return this.onBinValueCallback=e,this},t.prototype.onClick=function(e){return this.onClickCallback=e,this},t.prototype.onShiftTab=function(e){return this.onShiftTabCallback=e,this},t.prototype.onAutoComplete=function(e){return this.onAutoCompleteCallback=e,this},Object.defineProperty(t.prototype,"errorType",{get:function(){return this._errorType},set:function(e){this._errorType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasError",{get:function(){return this._hasError},set:function(e){this._hasError=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){if(this.fieldType===Xp)switch(this.cvcPolicy){case im:return!0;case om:return!this.hasError;default:return this._isValid}return this.fieldType===Zp&&this.datePolicy===sm||this._isValid},set:function(e){this._isValid=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cvcPolicy",{get:function(){return this._cvcPolicy},set:function(e){this.fieldType===Xp&&e!==this.cvcPolicy&&(this._cvcPolicy=e,this.hasError&&"isValidated"===this.errorType&&(this.hasError=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"datePolicy",{get:function(){return this._datePolicy},set:function(e){this.fieldType===Zp&&e!==this.datePolicy&&(this._datePolicy=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iframeContentWindow",{get:function(){return this._iframeContentWindow},set:function(e){this._iframeContentWindow=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isEncrypted",{get:function(){return this._isEncrypted},set:function(e){this._isEncrypted=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"numKey",{get:function(){return this._numKey},set:function(e){this._numKey=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iframeOnLoadListener",{get:function(){return this._iframeOnLoadListener},set:function(e){this._iframeOnLoadListener=e.bind(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"postMessageListener",{get:function(){return this._postMessageListener},set:function(e){this._postMessageListener=e.bind(this)},enumerable:!1,configurable:!0}),t}((function(){this.config={}}));function Zm(){this.encryptedAttrName="data-encrypted-field";var e=Im(this.props.rootNode,"["+this.encryptedAttrName+"]");return e.length||(this.encryptedAttrName="data-cse",e=Im(this.props.rootNode,"["+this.encryptedAttrName+"]")),Wm=nm,this.config.isCreditCardType?(this.isSingleBrandedCard=!1,this.securityCode="",this.createCardSecuredFields(e)):this.createNonCardSecuredFields(e)}function Qm(e){return e.forEach(this.setupSecuredField.bind(this)),e.length}function $m(e){var t=this,r=this.state.type;if("card"===r&&1===this.config.cardGroupTypes.length&&(r=this.config.cardGroupTypes[0],this.state.type=r),this.isSingleBrandedCard="card"!==r,this.isSingleBrandedCard){var a=Hm(r);km(a)?(Wm=a.cvcPolicy||nm,this.securityCode=a.securityCode):this.state.type="unrecognised-single-brand"}if(e.forEach(this.setupSecuredField.bind(this)),this.isSingleBrandedCard){var n={type:this.state.type,rootNode:this.props.rootNode,brand:r,cvcPolicy:Wm,cvcText:this.securityCode};setTimeout((function(){t.callbacks.onBrand(n)}),0)}return e.length}function Xm(e){var t=this,r=Om(e,this.encryptedAttrName);r===$p&&(this.state.hasSeparateDateFields=!0);var a={fieldType:r,extraFieldData:Om(e,"data-info"),txVariant:this.state.type,cardGroupTypes:this.config.cardGroupTypes,iframeUIConfig:this.config.iframeUIConfig?this.config.iframeUIConfig:{},sfLogAtStart:this.config.sfLogAtStart,trimTrailingSeparator:this.config.trimTrailingSeparator,cvcPolicy:Wm,datePolicy:lm,isCreditCardType:this.config.isCreditCardType,iframeSrc:this.config.iframeSrc,loadingContext:this.config.loadingContext,showWarnings:this.config.showWarnings,holderEl:e,legacyInputMode:this.config.legacyInputMode,minimumExpiryDate:this.config.minimumExpiryDate},n=new Jm(a,this.props.i18n).onIframeLoaded((function(){if(t.state.iframeCount+=1,t.state.iframeCount===t.state.originalNumIframes){t.callbacks.onLoad({iframesLoaded:!0})}})).onConfig((function(e){t.handleIframeConfigFeedback(e)})).onFocus((function(e){t.handleFocus(e)})).onBinValue((function(e){t.handleBinValue(e)})).onClick((function(e){t.postMessageToAllIframes({fieldType:e.fieldType,click:!0})})).onShiftTab((function(e){t.handleSFShiftTab(e.fieldType)})).onEncryption((function(e){t.handleEncryption(e)})).onValidation((function(e){t.handleValidation(e)})).onAutoComplete((function(e){t.processAutoComplete(e)}));this.state.securedFields[r]=n}function eh(e,t){if(Object.prototype.hasOwnProperty.call(this.state.securedFields,e)){var r={txVariant:this.state.type,fieldType:e,focus:!0,numKey:this.state.securedFields[e].numKey};Bm(r,this.getIframeContentWin(e),this.config.loadingContext)}}function th(e){var t=this,r=Object.keys(e||{});r.length&&Object.keys(this.state.securedFields).forEach((function(a){var n={txVariant:t.state.type,fieldType:a,numKey:t.state.securedFields[a].numKey};r.forEach((function(t){n[t]=e[t]})),Bm(n,t.getIframeContentWin(a),t.config.loadingContext)}))}function rh(){var e=this;this.postMessageToAllIframes({destroy:!0}),Object.keys(this.state.securedFields).forEach((function(t){var r=e.state.securedFields[t];r&&r.destroy(),e.state.securedFields[t]=null})),this.destroyTouchendListener(),this.state.securedFields={}}function ah(e){var t=this;if("cc-name"===e.name){var r=Ds({},e);delete r.numKey;var a=r;this.callbacks.onAutoComplete(a)}if("cc-exp"===e.name){var n=e.value.replace(/[^0-9]/gi,"/").split("/");if(2!==n.length)return;1===n[0].length&&(n[0]="0"+n[0]);var o=n[0],i=n[1].substr(2),l=o+"/"+i;if(Object.prototype.hasOwnProperty.call(this.state.securedFields,Zp)){var s={txVariant:this.state.type,fieldType:Zp,autoComplete:l,numKey:this.state.securedFields.encryptedExpiryDate.numKey};return void Bm(s,this.getIframeContentWin(Zp),this.config.loadingContext)}if(Object.prototype.hasOwnProperty.call(this.state.securedFields,Qp)){s={txVariant:this.state.type,fieldType:Qp,autoComplete:o,numKey:this.state.securedFields.encryptedExpiryMonth.numKey};Bm(s,this.getIframeContentWin(Qp),this.config.loadingContext)}Object.prototype.hasOwnProperty.call(this.state.securedFields,$p)&&setTimeout((function(){var e={txVariant:t.state.type,fieldType:$p,autoComplete:i,numKey:t.state.securedFields.encryptedExpiryYear.numKey};Bm(e,t.getIframeContentWin($p),t.config.loadingContext)}),0)}}function nh(e){var t=Ds({},e);delete t.numKey,t.rootNode=this.props.rootNode,t.type=this.state.type;var r=t.fieldType;t.focus?this.state.currentFocusObject!==r&&(this.state.currentFocusObject=r,this.state.registerFieldForIos||this.handleAdditionalFields()):this.state.currentFocusObject===r&&(this.state.currentFocusObject=null);var a=t;a.currentFocusObject=this.state.currentFocusObject,this.callbacks.onFocus(a)}function oh(e){if(this.state.iframeConfigCount+=1,this.state.isConfigured){var t={additionalIframeConfigured:!0,fieldType:e.fieldType,type:this.state.type};this.callbacks.onAdditionalSFConfig(t)}else if(this.state.iframeConfigCount===this.state.originalNumIframes)return this.isConfigured(),!0;return!1}function ih(){var e;this.state.isConfigured=!0;var t={iframesConfigured:!0,type:this.state.type,rootNode:this.props.rootNode};if(this.callbacks.onConfigSuccess(t),1===this.state.numIframes&&this.config.isCreditCardType){if("card"===this.state.type)return void Pm("ERROR: Payment method with a single secured field - but 'type' has not been set to a specific card brand");var r=Hm(this.state.type);if(r)(null!==(e=r.cvcPolicy)&&void 0!==e?e:nm)!==nm&&this.assessFormValidity()}}function lh(){var e=function(e){for(var t=Object.keys(e),r=0,a=t.length;r<a;r+=1)if(!e[t[r]].isValid)return!1;return!0}(this.state.securedFields),t=e!==this.state.allValid;if(this.state.allValid=e,e||t){var r={allValid:e,type:this.state.type,rootNode:this.props.rootNode};this.callbacks.onAllValid(r)}}function sh(e){var t=e.binValue,r=e.encryptedBin,a=e.uuid,n={binValue:t,type:this.state.type};r&&(n.encryptedBin=r,n.uuid=a),this.callbacks.onBinValue(n)}function ch(e){if(Object.prototype.hasOwnProperty.call(this.state.securedFields,Jp)){var t=Ds(Ds({txVariant:this.state.type},e),{fieldType:Jp,numKey:this.state.securedFields.encryptedCardNumber.numKey});Bm(t,this.getIframeContentWin(Jp),this.config.loadingContext)}}function dh(e){var t,r="card"===this.state.type;if(!e||!Object.keys(e).length)return r&&this.sendBrandToCardSF({brand:"reset"}),void("card"===this.state.type&&Object.prototype.hasOwnProperty.call(this.state.securedFields,Zp)&&(this.state.securedFields.encryptedExpiryDate.datePolicy=lm));var a=e.supportedBrands[0],n=a.brand,o=!0===a.showExpiryDate?lm:sm,i={brand:n,cvcPolicy:a.cvcPolicy,datePolicy:o,cvcText:"Security code",showSocialSecurityNumber:null!==(t=a.showSocialSecurityNumber)&&void 0!==t&&t,fieldType:Jp};this.processBrand(i),r&&this.sendBrandToCardSF({brand:n,enableLuhnCheck:!1!==e.supportedBrands[0].enableLuhnCheck}),Object.prototype.hasOwnProperty.call(this.state.securedFields,Xp)&&(this.state.securedFields.encryptedSecurityCode.cvcPolicy=a.cvcPolicy),Object.prototype.hasOwnProperty.call(this.state.securedFields,Zp)&&(this.state.securedFields.encryptedExpiryDate.datePolicy=o),this.assessFormValidity()}var uh={__IS_ANDROID:/(android)/i.test(navigator.userAgent),__IS_IE:function(){var e=navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var a=e.indexOf("Edge/");return a>0&&parseInt(e.substring(a+5,e.indexOf(".",a)),10)}(),__IS_IOS:/iphone|ipod|ipad/i.test(navigator.userAgent),__IS_FIREFOX:/(firefox)/i.test(navigator.userAgent),__IS_SAFARI:/(safari)/i.test(navigator.userAgent)&&!/(chrome)/i.test(navigator.userAgent)};var ph={touchendListener:function(e){var t,r=e.target;if(r instanceof HTMLInputElement||HTMLTextAreaElement&&r instanceof HTMLTextAreaElement){var a=r.value,n="selectionStart"in(t=r)?t.selectionStart:0,o=!1;n===a.length&&(n-=1,o=!0),r.value=a,r.setSelectionRange&&(r.focus(),r.setSelectionRange(n,n),o&&(n+=1,setTimeout((function(){r.setSelectionRange(n,n)}),0)))}else{if(this.config.keypadFix){var i=this.props.rootNode,l=document.createElement("input");l.style.width="1px",l.style.height="1px",l.style.opacity="0",l.style.fontSize="18px",i.appendChild(l),l.focus(),i.removeChild(l)}}this.destroyTouchendListener(),this.state.registerFieldForIos=!1,this.postMessageToAllIframes({fieldType:"additionalField",click:!0})},handleAdditionalFields:function(){if(uh.__IS_IOS){var e=jm(document,"body");e.style.cursor="pointer",Em(e,"touchend",this.touchendListener),this.state.registerFieldForIos=!0}},destroyTouchendListener:function(){if(uh.__IS_IOS){var e=jm(document,"body");e.style.cursor="auto",Rm(e,"touchend",this.touchendListener)}}},mh=function(e,t){return function(e,t){void 0===t&&(t=!0);var r=Array.prototype.slice.call(Im(document,"*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[tabindex], *[contenteditable]")),a=[];r.forEach((function(e){var t=e.getAttribute("tabindex"),r=!t||parseInt(t,10)>=0,n=e.getBoundingClientRect(),o=n.width>0&&n.height>0;r&&o&&a.push(e)}));var n=function(e,t){for(var r=0;r<e.length;r+=1)if(t(e[r]))return r;return-1}(a,(function(t){return t===e||e.contains(t)}));return a[n+(t?-1:1)]}(jm(t,"[data-cse="+e+"]"))};var hh=function(e){var t;switch(this.state.type){case"ach":t=function(e){var t;return"encryptedBankLocationId"===e&&(t="encryptedBankAccountNumber"),{fieldToFocus:t,additionalField:void 0}}(e);break;case"giftcard":t=function(e,t){var r,a;switch(e){case Jp:r=mh(Jp,t);break;case Xp:a=Jp}return{fieldToFocus:a,additionalField:r}}(e,this.props.rootNode);break;default:t=this.state.isKCP?function(e,t,r){var a,n;switch(e){case Jp:a=mh(Jp,t);break;case Zp:case Qp:n=Jp;break;case $p:n=Qp;break;case Xp:n=r?$p:Zp;break;case em:case"encryptedPin":a=mh(e,t)}return{fieldToFocus:n,additionalField:a}}(e,this.props.rootNode,this.state.hasSeparateDateFields):function(e,t,r,a){var n,o;switch(e){case Jp:n=mh(Jp,t);break;case Zp:case Qp:o=Jp;break;case $p:o=Qp;break;case Xp:1===a?n=mh(Xp,t):o=r?$p:Zp}return{fieldToFocus:o,additionalField:n}}(e,this.props.rootNode,this.state.hasSeparateDateFields,this.state.numIframes)}var r,a=t.fieldToFocus,n=t.additionalField;a?this.setFocusOnFrame(a,false):n&&(r=n)&&(r.focus(),r.blur(),r.focus())},fh=function(e){(uh.__IS_FIREFOX||uh.__IS_IE&&uh.__IS_IE<=11)&&this.handleShiftTab(e)},yh=function(e){void 0===e&&(e="You cannot use secured fields"),Dm(e+" - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.")},bh=function(e){function t(t){var r=e.call(this,t)||this;return r.state={type:r.props.type,brand:"card"!==r.props.type?{brand:r.props.type,cvcPolicy:"required"}:{brand:null,cvcPolicy:"required"},allValid:void 0,numIframes:0,originalNumIframes:0,iframeCount:0,iframeConfigCount:0,isConfigured:!1,hasSeparateDateFields:!1,currentFocusObject:null,registerFieldForIos:!1,securedFields:{},isKCP:!1},r.configHandler=Sm,r.callbacksHandler=Am,r.handleIframeConfigFeedback=oh,r.isConfigured=ih,r.assessFormValidity=lh,r.processBrand=zm,r.handleValidation=Vm,r.handleEncryption=Um,r.createSecuredFields=Zm,r.createNonCardSecuredFields=Qm,r.createCardSecuredFields=$m,r.setupSecuredField=Xm,r.postMessageToAllIframes=th,r.setFocusOnFrame=eh,r.handleFocus=nh,r.handleAdditionalFields=ph.handleAdditionalFields,r.touchendListener=ph.touchendListener.bind(r),r.destroyTouchendListener=ph.destroyTouchendListener,r.handleSFShiftTab=fh,r.handleShiftTab=hh,r.destroySecuredFields=rh,r.processAutoComplete=ah,r.handleBinValue=sh,r.brandsFromBinLookup=dh,r.sendBrandToCardSF=ch,r.init(),r}return Fs(t,e),t.prototype.init=function(){this.configHandler(),this.callbacksHandler(this.props.callbacks);var e=this.createSecuredFields();this.state.numIframes=this.state.originalNumIframes=e,this.state.isKCP=!!this.props.isKCP},t.prototype.createReturnObject=function(){var e=this;return{updateStyles:function(t){e.state.isConfigured?e.postMessageToAllIframes({styleObject:t}):Dm("You cannot update the secured fields styling - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.")},setFocusOnFrame:function(t){e.state.isConfigured?e.setFocusOnFrame(t):yh("You cannot set focus on any secured field")},isValidated:function(t,r){if(e.state.isConfigured){if(Object.prototype.hasOwnProperty.call(e.state.securedFields,t)){e.state.securedFields[t].hasError=!0,""===e.state.securedFields[t].errorType&&(e.state.securedFields[t].errorType="isValidated");var a={txVariant:e.state.type,fieldType:t,externalValidation:!0,code:r,numKey:e.state.securedFields[t].numKey};Bm(a,e.getIframeContentWin(t),e.config.loadingContext)}}else yh("You cannot set validated on any secured field")},hasUnsupportedCard:function(t,r){if(e.state.isConfigured){if(Object.prototype.hasOwnProperty.call(e.state.securedFields,t)){e.state.securedFields[t].hasError=!!r,e.state.securedFields[t].errorType=r;var a={txVariant:e.state.type,fieldType:t,unsupportedCard:!!r,code:r,numKey:e.state.securedFields[t].numKey};Bm(a,e.getIframeContentWin(t),e.config.loadingContext)}}else yh("You cannot set hasUnsupportedCard on any secured field")},destroy:function(){e.state.isConfigured?e.destroySecuredFields():yh("You cannot destroy secured fields")},brandsFromBinLookup:function(t){if(!e.config.isCreditCardType)return null;e.state.isConfigured?e.brandsFromBinLookup(t):yh("You cannot set pass brands to secured fields")},addSecuredField:function(t){var r=jm(e.props.rootNode,'[data-cse="'+t+'"]');r&&(e.state.numIframes+=1,e.setupSecuredField(r))},removeSecuredField:function(t){if(e.state.securedFields[t]){e.state.securedFields[t].destroy(),delete e.state.securedFields[t],e.state.numIframes-=1;var r={additionalIframeRemoved:!0,fieldType:t,type:e.state.type};e.callbacks.onAdditionalSFRemoved(r)}},setKCPStatus:function(t){e.state.isKCP=t}}},t.prototype.getIframeContentWin=function(e){var t;return(null===(t=this.state.securedFields[e])||void 0===t?void 0:t.iframeContentWindow)||null},t}((function(e){this.props=e,this.state={},this.config={},this.callbacks={}})),vh=function(e){if(!e)throw new Error("No securedFields configuration object defined");var t=Ds({},e),r=qm(t.type);if(t.type=r?"card":t.type,!Object.prototype.hasOwnProperty.call(t,"rootNode"))return Pm('ERROR: SecuredFields configuration object is missing a "rootNode" property'),null;if(wm(t.clientKey))return Dm('WARNING: AdyenCheckout configuration object is missing a "clientKey" property.'),null;var a=function(e){var t;return"object"==typeof e&&(t=e),"string"!=typeof e||(t=jm(document,e))?t:null}(t.rootNode);return a?(t.rootNode=a,new bh(t).createReturnObject()):(window.console&&window.console.error&&window.console.error("ERROR: SecuredFields cannot find a valid rootNode element for",t.type),null)};var gh={handleFocus:function(e){e.fieldType===Xp&&(this.numCharsInCVC=e.numChars),this.props.onFocus(e)},handleOnAllValid:function(e){var t=this;return!this.state.hasUnsupportedCard&&(this.setState({isSfpValid:e.allValid},(function(){t.props.onChange(t.state),t.props.onAllValid(e)})),!0)},handleOnAutoComplete:function(e){var t=this;this.setState({autoCompleteName:e.value},(function(){t.props.onChange(t.state),t.setState({autoCompleteName:null})})),this.props.onAutoComplete(e)},handleOnFieldValid:function(e){var t=this;return(!this.state.hasUnsupportedCard||e.fieldType!==Jp)&&(this.setState((function(t){var r,a,n,o;return{data:Ds(Ds({},t.data),(r={},r[e.encryptedFieldName]=e.blob,r)),valid:Ds(Ds({},t.valid),(a={},a[e.encryptedFieldName]=e.valid,a)),errors:Ds(Ds({},t.errors),(n={},n[e.fieldType]=null!==(o=t.errors[e.fieldType])&&void 0!==o&&o,n))}}),(function(){t.props.onChange(t.state),t.props.onFieldValid(e)})),!0)},handleOnLoad:function(e){var t=this;this.props.onLoad(e),this.originKeyErrorTimeout=setTimeout((function(){"ready"!==t.state.status&&(t.setState({status:"originKeyError"}),t.props.onError({error:"originKeyError",fieldType:"defaultError"}))}),this.originKeyTimeoutMS)},handleOnConfigSuccess:function(e){var t=this;clearTimeout(this.originKeyErrorTimeout),this.setState({status:"ready"},(function(){t.props.onConfigSuccess(e)}))},handleOnBrand:function(e){var t=this;this.setState((function(r){var a,n,o=(e.cvcPolicy!==om&&e.cvcPolicy!==im||0!==t.numCharsInCVC)&&r.errors.encryptedSecurityCode;return{brand:e.brand,cvcPolicy:null!==(n=e.cvcPolicy)&&void 0!==n?n:nm,showSocialSecurityNumber:e.showSocialSecurityNumber,errors:Ds(Ds({},r.errors),km(o)&&(a={},a.encryptedSecurityCode=o,a)),hideDateForBrand:e.datePolicy===sm}}),(function(){var r,a;t.props.onChange(t.state);var n=null!==(a=null===(r=t.props.brandsConfiguration[e.brand])||void 0===r?void 0:r.icon)&&void 0!==a?a:hm(e.brand,t.props.loadingContext);t.props.onBrand(Ds(Ds({},e),{brandImageUrl:n}))}))},handleOnError:function(e,t){var r=this;void 0===t&&(t=null);var a=e.error;this.setState((function(r){var n;return{errors:Ds(Ds({},r.errors),(n={},n[e.fieldType]=a||!1,n)),hasUnsupportedCard:null!==t&&t}}),(function(){r.props.onChange(r.state)})),e.errorI18n=this.props.i18n.get(a);var n=Gm(a);return e.errorText=""!==n?n:"error was cleared",this.props.onError(e),!0},handleOnNoDataRequired:function(){var e=this;this.setState({status:"ready"},(function(){return e.props.onChange({isSfpValid:!0})}))}},kh={type:"card",keypadFix:!0,rootNode:null,loadingContext:null,groupTypes:[],allowedDOMAccess:!1,showWarnings:!1,autoFocus:!0,trimTrailingSeparator:!0,onChange:function(){},onLoad:function(){},onConfigSuccess:function(){},onAllValid:function(){},onFieldValid:function(){},onBrand:function(){},onError:function(){},onBinValue:function(){},onFocus:function(){},onAutoComplete:function(){},placeholders:{},styles:{}},Ch=function(e){function t(t){var r=e.call(this,t)||this;r.setRootNode=function(e){r.rootNode=e};var a={status:"loading",brand:t.type,errors:{},valid:{},data:{},cvcPolicy:nm,isSfpValid:!1,hasKoreanFields:r.props.hasKoreanFields};return r.state=a,r.originKeyErrorTimeout=null,r.originKeyTimeoutMS=15e3,r.numCharsInCVC=0,r.handleOnLoad=gh.handleOnLoad.bind(r),r.handleOnConfigSuccess=gh.handleOnConfigSuccess.bind(r),r.handleOnFieldValid=gh.handleOnFieldValid.bind(r),r.handleOnAllValid=gh.handleOnAllValid.bind(r),r.handleOnBrand=gh.handleOnBrand.bind(r),r.handleFocus=gh.handleFocus.bind(r),r.handleOnError=gh.handleOnError.bind(r),r.handleOnNoDataRequired=gh.handleOnNoDataRequired.bind(r),r.handleOnAutoComplete=gh.handleOnAutoComplete.bind(r),r.processBinLookupResponse=r.processBinLookupResponse.bind(r),r.setFocusOn=r.setFocusOn.bind(r),r.updateStyles=r.updateStyles.bind(r),r.handleUnsupportedCard=r.handleUnsupportedCard.bind(r),r.showValidation=r.showValidation.bind(r),r.destroy=r.destroy.bind(r),r}return Fs(t,e),t.prototype.componentDidMount=function(){this.props.rootNode&&this.setRootNode(this.props.rootNode);var e,t=(e=this.rootNode)?Array.prototype.slice.call(e.querySelectorAll('[data-cse*="encrypted"]')).map((function(e){return e.getAttribute("data-cse")})):[],r=t.reduce(pm,{});this.setState({valid:r}),this.numDateFields=t.filter((function(e){return e.match(/Expiry/)})).length,t.length?(this.destroy(),this.initializeCSF(this.rootNode)):this.handleOnNoDataRequired()},t.prototype.componentDidUpdate=function(){this.checkForKCPFields()},t.prototype.componentWillUnmount=function(){this.csf=null},t.prototype.initializeCSF=function(e){var t=this.props.loadingContext,r={rootNode:e,type:this.props.type,clientKey:this.props.clientKey,cardGroupTypes:this.props.groupTypes,allowedDOMAccess:this.props.allowedDOMAccess,autoFocus:this.props.autoFocus,trimTrailingSeparator:this.props.trimTrailingSeparator,loadingContext:t,keypadFix:this.props.keypadFix,showWarnings:this.props.showWarnings,iframeUIConfig:{sfStyles:this.props.styles},i18n:this.props.i18n,callbacks:{onLoad:this.handleOnLoad,onConfigSuccess:this.handleOnConfigSuccess,onFieldValid:this.handleOnFieldValid,onAllValid:this.handleOnAllValid,onBrand:this.handleOnBrand,onError:this.handleOnError,onFocus:this.handleFocus,onBinValue:this.props.onBinValue,onAutoComplete:this.handleOnAutoComplete,onAdditionalSFConfig:this.props.onAdditionalSFConfig,onAdditionalSFRemoved:this.props.onAdditionalSFRemoved},isKCP:this.state.hasKoreanFields,legacyInputMode:this.props.legacyInputMode,minimumExpiryDate:this.props.minimumExpiryDate};this.csf=vh(r)},t.prototype.checkForKCPFields=function(){var e=this,t=!1;if(this.props.koreanAuthenticationRequired&&(t=this.issuingCountryCode?"kr"===this.issuingCountryCode:"kr"===this.props.countryCode),this.state.hasKoreanFields&&!t){this.setState((function(e){var t,r,a;return{data:Ds(Ds({},e.data),(t={},t.encryptedPassword=void 0,t)),valid:Ds(Ds({},e.valid),(r={},r.encryptedPassword=!1,r)),errors:Ds(Ds({},e.errors),(a={},a.encryptedPassword=!1,a)),hasKoreanFields:!1}}),(function(){e.props.onChange(e.state)})),this.csf.removeSecuredField(em),this.csf.setKCPStatus(!1)}if(!this.state.hasKoreanFields&&t){this.setState((function(e){var t;return{valid:Ds(Ds({},e.valid),(t={},t.encryptedPassword=!1,t)),hasKoreanFields:!0,isSfpValid:!1}}),(function(){e.props.onChange(e.state)})),this.csf.addSecuredField(em),this.csf.setKCPStatus(!0)}},t.prototype.getChildContext=function(){return{i18n:this.props.i18n}},t.prototype.handleUnsupportedCard=function(e){var t=!!e.error;return e.rootNode=this.rootNode,this.handleOnError(e,t),this.csf&&this.csf.hasUnsupportedCard(Jp,e.error),t},t.prototype.setFocusOn=function(e){this.csf&&this.csf.setFocusOnFrame(e)},t.prototype.updateStyles=function(e){this.csf&&this.csf.updateStyles(e)},t.prototype.destroy=function(){this.csf&&this.csf.destroy()},t.prototype.showValidation=function(){var e=this,t=this.numDateFields,r=this.state;Object.keys(r.valid).reduce(mm(t,r),[]).forEach((function(t){var a=function(e,t,r){return{rootNode:t,fieldType:e,error:_c(r,"errors."+e)||um,type:"card"}}(t,e.rootNode,r);e.handleOnError(a,r.hasUnsupportedCard),e.csf&&e.csf.isValidated&&e.csf.isValidated(t,a.error)}))},t.prototype.mapErrorsToValidationRuleResult=function(){var e=this;return Object.keys(this.state.errors).reduce((function(t,r){return e.state.errors[r]?t[r]={isValid:!1,errorMessage:Gm(e.state.errors[r])}:t[r]=null,t}),{})},t.prototype.processBinLookupResponse=function(e,t){var r,a=this;if(this.state.hasUnsupportedCard&&(this.setState((function(e){var t;return{errors:Ds(Ds({},e.errors),(t={},t.encryptedCardNumber=!1,t)),hasUnsupportedCard:!1}})),this.csf&&e)){this.handleUnsupportedCard({type:"card",fieldType:"encryptedCardNumber",error:""})}this.issuingCountryCode=null===(r=null==e?void 0:e.issuingCountryCode)||void 0===r?void 0:r.toLowerCase(),(null==t?void 0:t.brand)&&this.setState(t,(function(){a.props.onChange(a.state)})),this.csf&&this.csf.brandsFromBinLookup(e)},t.prototype.render=function(e,t){return e.render({setRootNode:this.setRootNode,setFocusOn:this.setFocusOn},t)},t.defaultProps=kh,t}(ac),_h={base:{caretColor:"#0066FF"}},Nh={"card-input__wrapper":"CardInput-module_card-input__wrapper__2tAzu","card-input__icon":"CardInput-module_card-input__icon__2Iaf5","card-input__form":"CardInput-module_card-input__form__2Ij_n","card-input__spinner":"CardInput-module_card-input__spinner__1wHzq","card-input__spinner--active":"CardInput-module_card-input__spinner--active__1Dzoe","card-input__form--loading":"CardInput-module_card-input__form--loading__3zh3Y","adyen-checkout__input":"CardInput-module_adyen-checkout__input__3Jmld","adyen-checkout__card__cvc__input--hidden":"CardInput-module_adyen-checkout__card__cvc__input--hidden__1Z1lp","adyen-checkout__card__exp-date__input--hidden":"CardInput-module_adyen-checkout__card__exp-date__input--hidden__3850Y","adyen-checkout__card__exp-cvc__exp-date__input--hidden":"CardInput-module_adyen-checkout__card__exp-cvc__exp-date__input--hidden__3wxr3","revolving-plan-installments__disabled":"CardInput-module_revolving-plan-installments__disabled__2yP53"},wh="LoadingWrapper-module_loading-input__form__1jpVs",Ph="LoadingWrapper-module_loading-input__form--loading__3LDWz",Fh="LoadingWrapper-module_loading-input__spinner__3eCyK",Dh="LoadingWrapper-module_loading-input__spinner--active__3UDtX",Sh=function(e){var t,r,a=e.children,n=e.status,o=zc("adyen-checkout__loading-input__form",wh,((t={})[Ph]="loading"===n,t));return ec("div",{style:{position:"relative"}},ec("div",{className:zc(((r={})[Fh]=!0,r[Dh]="loading"===n,r))},ec(Mc,null)),ec("div",{className:o},a))};function xh(e){var t=e.frontCVC,r=void 0!==t&&t;return ec("div",{className:zc({"adyen-checkout__card__cvc__hint__wrapper":!0,"adyen-checkout__field__cvc--front-hint":!!r,"adyen-checkout__field__cvc--back-hint":!r})},ec("svg",{className:"adyen-checkout__card__cvc__hint adyen-checkout__card__cvc__hint--front",width:"27",height:"18",viewBox:"0 0 27 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ec("path",{d:"M0 3C0 1.34315 1.34315 0 3 0H24C25.6569 0 27 1.34315 27 3V15C27 16.6569 25.6569 18 24 18H3C1.34315 18 0 16.6569 0 15V3Z",fill:"#E6E9EB"}),ec("rect",{x:"4",y:"12",width:"19",height:"2",fill:"#B9C4C9"}),ec("rect",{x:"4",y:"4",width:"4",height:"4",rx:"1",fill:"white"}),ec("rect",{className:"adyen-checkout__card__cvc__hint__location",x:"16.5",y:"4.5",width:"7",height:"5",rx:"2.5",stroke:"#D10244"})),ec("svg",{className:"adyen-checkout__card__cvc__hint adyen-checkout__card__cvc__hint--back",width:"27",height:"18",viewBox:"0 0 27 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},ec("path",{d:"M27 4.00001V3.37501C27 2.4799 26.6444 1.62146 26.0115 0.988518C25.3786 0.355581 24.5201 0 23.625 0H3.375C2.47989 0 1.62145 0.355581 0.988514 0.988518C0.355579 1.62146 0 2.4799 0 3.37501V4.00001H27Z",fill:"#E6E9EB"}),ec("path",{d:"M0 6.99994V14.6666C0 15.5507 0.355579 16.3985 0.988514 17.0237C1.62145 17.6488 2.47989 18 3.375 18H23.625C24.5201 18 25.3786 17.6488 26.0115 17.0237C26.6444 16.3985 27 15.5507 27 14.6666V6.99994H0Z",fill:"#E6E9EB"}),ec("rect",{y:"4.00012",width:"27",height:"3.00001",fill:"#687282"}),ec("path",{d:"M4 11C4 10.4477 4.44772 10 5 10H21C22.1046 10 23 10.8954 23 12C23 13.1046 22.1046 14 21 14H5C4.44771 14 4 13.5523 4 13V11Z",fill:"white"}),ec("rect",{className:"adyen-checkout__card__cvc__hint__location",x:"16.5",y:"9.5",width:"7",height:"5",rx:"2.5",stroke:"#D10244"})))}function Ah(e){var t,r,a=e.label,n=e.onFocusField,o=void 0===n?function(){}:n,i=e.error,l=void 0===i?"":i,s=e.className,c=void 0===s?"":s,d=e.classNameModifiers,u=void 0===d?[]:d,p=e.focused,m=e.filled,h=e.isValid,f=e.frontCVC,y=void 0!==f&&f,b=e.cvcPolicy,v=void 0===b?nm:b,g=ad().i18n,k=zc(c,((t={"adyen-checkout__field__cvc":!0})[Nh["adyen-checkout__card__cvc__input--hidden"]]=v===im,t["adyen-checkout__field__cvc--optional"]=v===om,t)),C=zc(((r={"adyen-checkout__input":!0,"adyen-checkout__input--small":!0,"adyen-checkout__card__cvc__input":!0,"adyen-checkout__input--error":l,"adyen-checkout__input--focus":p,"adyen-checkout__input--valid":h})[Nh["adyen-checkout__input"]]=!0,r)),_=v!==om?a:g.get("creditCard.cvcField.title.optional");return ec(wd,{label:_,focused:p,filled:m,classNameModifiers:Bs(Bs([],u),["securityCode"]),onFocusField:function(){return o("encryptedSecurityCode")},className:k,errorMessage:l&&g.get(l),isValid:h,dir:"ltr"},ec("span",{className:C,"data-cse":"encryptedSecurityCode"}),ec(xh,{frontCVC:y}))}function Bh(e){var t=e.brand,r=e.hasCVC,a=e.onFocusField,n=e.errors,o=e.valid,i=Ss(e,["brand","hasCVC","onFocusField","errors","valid"]),l=ad().i18n;return ec("div",{className:"adyen-checkout__card__form adyen-checkout__card__form--oneClick","aria-label":l.get("creditCard.storedCard.description.ariaLabel").replace("%@",i.lastFour)+" "+l.get("creditCard.expiryDateField.title")+" "+i.expiryMonth+"/"+i.expiryYear},ec("div",{className:"adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper"},ec(wd,{label:l.get("creditCard.expiryDateField.title"),className:"adyen-checkout__field--50",classNameModifiers:["storedCard"],disabled:!0},ec("div",{className:"adyen-checkout__input adyen-checkout__input--disabled adyen-checkout__card__exp-date__input--oneclick",dir:"ltr"},i.expiryMonth," / ",i.expiryYear)),r&&ec(Ah,{cvcPolicy:i.cvcPolicy,error:n.encryptedSecurityCode,focused:"encryptedSecurityCode"===i.focusedElement,filled:!!o.encryptedSecurityCode||!!n.encryptedSecurityCode,isValid:!!o.encryptedSecurityCode,label:l.get("creditCard.cvcField.title"),onFocusField:a,className:"adyen-checkout__field--50",classNameModifiers:["storedCard"],frontCVC:"amex"===t})))}function Th(e){var t,r,a=ad().i18n,n=e.amount,o=e.brand,i=e.onChange,l=e.type,s=e.installmentOptions[o]||e.installmentOptions.card,c=Kc((null==s?void 0:s.preselectedValue)||(null==s?void 0:s.values[0])),d=c[0],u=c[1],p=Kc("onetime"),m=p[0],h=p[1],f=null===(t=null==s?void 0:s.plans)||void 0===t?void 0:t.includes("revolving"),y=function(e){var t=e.target.value;u(Number(t))},b=function(e){var t,r,o;return"amount"===l?(t="installmentOption",r={count:e,values:{times:e,partialValue:(o=e,a.amount(n.value/o,n.currency))}}):(t="installmentOptionMonths",r={count:e,values:{times:e}}),{id:e,name:n.value?a.get(t,r):""+e}};return qc((function(){var e,t=(null===(e=null==s?void 0:s.values)||void 0===e?void 0:e.includes(d))?d:null==s?void 0:s.values[0];u(t)}),[o]),qc((function(){var e=Ds(Ds({value:d},f&&"revolving"===m&&{plan:m,value:1}),f&&"onetime"===m&&{value:1});i(s?e:{value:null})}),[d,s,m]),s?0===n.value?null:ec("div",{className:"adyen-checkout__installments"},f?ec(_d,{classNameModifiers:["revolving-plan"],label:""},ec(zd,{items:[{id:"onetime",name:"installments.oneTime"},{id:"installments",name:"installments.installments"},{id:"revolving",name:"installments.revolving"}],i18n:a,onChange:function(e){var t=e.currentTarget.getAttribute("value");h(t)},value:m}),ec(wd,{className:"installments"!==m?""+Nh["revolving-plan-installments__disabled"]:""+Nh["revolving-plan-installments"],classNameModifiers:["revolving-plan-installments"]},Jd("select",{filterable:!1,items:s.values.map(b),selected:d,onChange:y,name:"installments"}))):ec(wd,{label:a.get("installments"),classNameModifiers:["installments"]},Jd("select",{filterable:!1,items:s.values.map(b),selected:d,onChange:y,name:"installments",readonly:1===(null===(r=null==s?void 0:s.values)||void 0===r?void 0:r.length)}))):null}Th.defaultProps={brand:"",amount:{},onChange:function(){}};var zh=function(e,t){return Sc({type:"card"===e?"nocard":e||"nocard",extension:"svg",loadingContext:t})(e)};function Mh(e){var t,r,a=e.brand,n=e.brandsConfiguration,o=void 0===n?{}:n,i=ad().loadingContext,l="card"===a?"nocard":a,s=null!==(r=null===(t=o[a])||void 0===t?void 0:t.icon)&&void 0!==r?r:zh(l,i);return ec("img",{className:Nh["card-input__icon"]+" adyen-checkout__card__cardNumber__brandIcon",onError:function(e){e.target.style.cssText="display: none"},alt:a,src:s})}var Ih=function(e){var t,r,a=e.brand,n=e.onClick,o=e.dataValue,i=e.notSelected,l=e.brandsConfiguration,s=void 0===l?{}:l,c=ad().loadingContext,d="card"===a?"nocard":a,u=null!==(r=null===(t=s[a])||void 0===t?void 0:t.icon)&&void 0!==r?r:zh(d,c);return ec("img",{className:Nh["card-input__icon"]+" "+(i?"adyen-checkout__card__cardNumber__brandIcon--not-selected":"")+" adyen-checkout__card__cardNumber__brandIcon",onError:function(e){e.target.style.cssText="display: none"},alt:a,src:u,onClick:n,"data-value":o})};function jh(e){var t,r=ad().i18n,a=e.error,n=void 0===a?"":a,o=e.isValid,i=void 0!==o&&o,l=e.onFocusField,s=void 0===l?function(){}:l,c=e.dualBrandingElements,d=e.dualBrandingChangeHandler,u=e.dualBrandingSelected;return ec(wd,{label:e.label,focused:e.focused,filled:e.filled,classNameModifiers:["cardNumber"],onFocusField:function(){return s("encryptedCardNumber")},errorMessage:n&&r.get(n),isValid:i,dualBrandingElements:c,dir:"ltr"},ec("span",{"data-cse":"encryptedCardNumber",className:zc((t={"adyen-checkout__input":!0,"adyen-checkout__input--large":!0,"adyen-checkout__card__cardNumber__input":!0},t[Nh["adyen-checkout__input"]]=!0,t["adyen-checkout__input--error"]=n,t["adyen-checkout__input--focus"]=e.focused,t["adyen-checkout__input--valid"]=i,t["adyen-checkout__card__cardNumber__input--noBrand"]=!e.showBrandIcon,t))},e.showBrandIcon&&!c&&ec(Mh,{brandsConfiguration:e.brandsConfiguration,brand:e.brand})),c&&!n&&ec("div",{className:zc(["adyen-checkout__card__dual-branding__buttons",{"adyen-checkout__card__dual-branding__buttons--active":i}])},c.map((function(t){return ec(Ih,{key:t.id,brand:t.id,brandsConfiguration:e.brandsConfiguration,onClick:d,dataValue:t.id,notSelected:""!==u&&u!==t.id})}))))}function Oh(e){var t,r=e.label,a=e.focused,n=e.filled,o=e.onFocusField,i=e.className,l=void 0===i?"":i,s=e.error,c=void 0===s?"":s,d=e.isValid,u=void 0!==d&&d,p=e.hideDateForBrand,m=void 0!==p&&p,h=ad().i18n,f=zc(l,((t={})[Nh["adyen-checkout__card__exp-date__input--hidden"]]=m,t));return ec(wd,{label:r,classNameModifiers:["expiryDate"],className:f,focused:a,filled:n,onFocusField:function(){return o("encryptedExpiryDate")},errorMessage:c&&h.get(c),isValid:u,dir:"ltr"},ec("span",{"data-cse":"encryptedExpiryDate",className:zc("adyen-checkout__input","adyen-checkout__input--small","adyen-checkout__card__exp-date__input",[Nh["adyen-checkout__input"]],{"adyen-checkout__input--error":c,"adyen-checkout__input--focus":a,"adyen-checkout__input--valid":u})}))}function Eh(e){var t,r=e.brand,a=e.brandsConfiguration,n=e.dualBrandingElements,o=e.dualBrandingChangeHandler,i=e.dualBrandingSelected,l=e.errors,s=e.focusedElement,c=e.hasCVC,d=e.cvcPolicy,u=e.hideDateForBrand,p=e.onFocusField,m=e.showBrandIcon,h=e.valid,f=ad().i18n;return ec("div",{className:"adyen-checkout__card__form"},ec(jh,{brand:r,brandsConfiguration:a,error:l.encryptedCardNumber,focused:"encryptedCardNumber"===s,isValid:!!h.encryptedCardNumber,label:f.get("creditCard.numberField.title"),onFocusField:p,filled:!!l.encryptedCardNumber||!!h.encryptedCardNumber,showBrandIcon:m,dualBrandingElements:n,dualBrandingChangeHandler:o,dualBrandingSelected:i}),ec("div",{className:zc("adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper",(t={},t[Nh["adyen-checkout__card__exp-cvc__exp-date__input--hidden"]]=u,t))},ec(Oh,{error:l.encryptedExpiryDate||l.encryptedExpiryYear||l.encryptedExpiryMonth,focused:"encryptedExpiryDate"===s,isValid:!!h.encryptedExpiryMonth&&!!h.encryptedExpiryYear,filled:!!l.encryptedExpiryDate||!!h.encryptedExpiryYear,label:f.get("creditCard.expiryDateField.title"),onFocusField:p,className:"adyen-checkout__field--50",hideDateForBrand:u}),c&&ec(Ah,{error:l.encryptedSecurityCode,focused:"encryptedSecurityCode"===s,cvcPolicy:d,isValid:!!h.encryptedSecurityCode,filled:!!l.encryptedSecurityCode||!!h.encryptedSecurityCode,label:f.get("creditCard.cvcField.title"),onFocusField:p,className:"adyen-checkout__field--50",frontCVC:"amex"===r})))}function Rh(e){var t,r=ad().i18n,a=Wc((function(){var t;return(null===(t=e.value)||void 0===t?void 0:t.length)>6?r.get("creditCard.taxNumber.labelAlt"):r.get("creditCard.taxNumber.label")}),[e.value]);return ec("div",{className:"adyen-checkout__card__kcp-authentication"},ec(wd,{label:a,filled:e.filled,classNameModifiers:["kcp-taxNumber"],errorMessage:e.error&&r.get("creditCard.taxNumber.invalid"),isValid:e.isValid,dir:"ltr"},Jd("tel",{className:"adyen-checkout__card__kcp-taxNumber__input "+Nh["adyen-checkout__input"],placeholder:r.get("creditCard.taxNumber.placeholder"),maxLength:10,minLength:6,autoComplete:!1,value:e.value,required:!0,onChange:e.onChange,onInput:e.onInput})),ec(wd,{label:r.get("creditCard.encryptedPassword.label"),focused:"encryptedPassword"===e.focusedElement,filled:e.filled,classNameModifiers:["50","koreanAuthentication-encryptedPassword"],onFocusField:function(){return e.onFocusField("encryptedPassword")},errorMessage:e.encryptedPasswordState.errors&&r.get("creditCard.encryptedPassword.invalid"),isValid:e.encryptedPasswordState.valid,dir:"ltr"},ec("span",{"data-cse":"encryptedPassword",className:zc((t={"adyen-checkout__input":!0,"adyen-checkout__input--large":!0},t[Nh["adyen-checkout__input"]]=!0,t["adyen-checkout__input--error"]=e.encryptedPasswordState.errors,t["adyen-checkout__input--valid"]=e.encryptedPasswordState.valid,t["adyen-checkout__input--focus"]="encryptedPassword"===e.focusedElement,t))})))}function Lh(e){var t=e.onChange,r=e.onInput,a=e.valid,n=void 0!==a&&a,o=e.error,i=void 0===o?null:o,l=e.data,s=void 0===l?"":l,c=ad().i18n;return ec(wd,{label:""+c.get("boleto.socialSecurityNumber"),classNameModifiers:["socialSecurityNumber"],errorMessage:!!i,isValid:Boolean(n)},Jd("text",{name:"socialSecurityNumber",autocorrect:"off",spellcheck:!1,value:s,maxLength:18,onInput:r,onChange:t}))}function Vh(e){var t=e.storeDetails,r=void 0!==t&&t,a=Ss(e,["storeDetails"]),n=ad().i18n,o=Kc(r),i=o[0],l=o[1];return qc((function(){a.onChange(i)}),[i]),ec("div",{className:"adyen-checkout__store-details"},Jd("boolean",{onChange:function(e){l(e.target.checked)},label:n.get("storeDetails"),value:i,name:"storeDetails"}))}function Uh(e){return e.replace(/[^0-9]/g,"").trim()}function Kh(e){if(void 0===e&&(e=""),"string"!=typeof e)return"";var t=Uh(e);return t.length>11?function(e){return e.replace(/^(\d{2})(\d{3})(\d{3})?(\d{4})?(\d{1,2})?$/g,(function(e,t,r,a,n,o){return void 0===n&&(n=""),void 0===o&&(o=""),t+"."+r+"."+a+"/"+n+(o.length?"-"+o:"")}))}(t):function(e){return e.replace(/\W/gi,"").replace(/(\d{3})(?!$)/g,"$1.").replace(/(.{11}).(\d{1,2})$/g,"$1-$2")}(t)}function Hh(e){return/(^\d{3}\.\d{3}\.\d{3}-\d{2}$)|(^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$)/.test(e)}var qh={socialSecurityNumber:Kh},Gh={socialSecurityNumber:[{modes:["blur"],validate:Hh}],taxNumber:[{modes:["blur"],validate:function(e){return 6===(null==e?void 0:e.length)||10===(null==e?void 0:e.length)}}],holderName:[{modes:["blur"],validate:function(e){return e.trim().length>0}}],default:[{modes:["blur"],validate:function(e){return!!e&&"string"==typeof e&&e.trim().length>0}}]};function Yh(e,t,r){var a=t.sfp,n=r.dualBrandSelectElements,o=r.setDualBrandSelectElements,i=r.setSelectedBrandValue,l=r.issuingCountryCode,s=r.setIssuingCountryCode;return{processBinLookup:function(t,r){var n,l=(null==t?void 0:t.issuingCountryCode)?t.issuingCountryCode.toLowerCase():null;if(s(l),t&&Object.keys(t).length){if(null===(n=t.supportedBrands)||void 0===n?void 0:n.length){var c=t.supportedBrands;if(c.length>1){var d=(p=(u=c)[0],m=u[1],{dualBrandSelectElements:[{id:p.brand,brandObject:p},{id:m.brand,brandObject:m}],selectedBrandValue:"",leadBrand:p});o(d.dualBrandSelectElements),i(d.selectedBrandValue),a.current.processBinLookupResponse({issuingCountryCode:t.issuingCountryCode,supportedBrands:[d.leadBrand]})}else o([]),i(""),i(c[0].brand),a.current.processBinLookupResponse({issuingCountryCode:t.issuingCountryCode,supportedBrands:c})}var u,p,m}else{o([]),i("");var h=r&&"card"!==e.type?e.type:null;a.current.processBinLookupResponse(t,{brand:h,cvcPolicy:e.cvcPolicy})}},handleDualBrandSelection:function(e){var t=e;if(e instanceof Event){var r=e.target;t=r.getAttribute("data-value")||r.getAttribute("alt")}i(t);var o=n.reduce((function(e,r){return r.brandObject.brand===t&&e.push(r.brandObject),e}),[]);a.current.processBinLookupResponse({issuingCountryCode:l,supportedBrands:o})}}}function Wh(e){var t=e.onChange,r=e.onInput,a=e.placeholder,n=e.value,o=e.required,i=e.error,l=void 0!==i&&i,s=e.isValid,c=ad().i18n;return ec(wd,{label:c.get("creditCard.holderName"),className:"adyen-checkout__card__holderName",errorMessage:l&&c.get("creditCard.holderName.invalid"),isValid:!!s},Jd("text",{className:"adyen-checkout__card__holderName__input "+Nh["adyen-checkout__input"],placeholder:a||c.get("creditCard.holderName.placeholder"),value:n,required:o,onChange:t,onInput:r}))}function Jh(e){var t,r,a=this,n=Yc(null),o=Yc(null),i=Kc("ready"),l=i[0],s=i[1],c=Kc({}),d=c[0],u=c[1],p=Kc(Ds({},e.holderNameRequired&&{holderName:!1})),m=p[0],h=p[1],f=Kc(Ds({},e.hasHolderName&&{holderName:null!==(t=e.data.holderName)&&void 0!==t?t:""})),y=f[0],b=f[1],v=Kc(""),g=v[0],k=v[1],C=Kc(!1),_=C[0],N=C[1],w=Kc(!1),P=w[0],F=w[1],D=Kc(nm),S=D[0],x=D[1],A=Kc(null),B=A[0],T=A[1],z=Kc([]),M=z[0],I=z[1],j=Kc(""),O=j[0],E=j[1],R=Kc(!1),L=R[0],V=R[1],U=Kc(e.billingAddressRequired?e.data.billingAddress:null),K=U[0],H=U[1],q=Kc(!1),G=q[0],Y=q[1],W=Kc(""),J=W[0],Z=W[1],Q=Kc({value:null}),$=Q[0],X=Q[1],ee=nu({schema:[],defaultData:e.data,formatters:qh,rules:Gh}),te=ee.handleChangeFor,re=ee.triggerValidation,ae=ee.data,ne=ee.valid,oe=ee.errors,ie=ee.setSchema,le=ee.setData,se=ee.setValid,ce=ee.setErrors,de=!!Object.keys(e.installmentOptions).length,ue=null===(r=e.showInstallmentAmounts)||void 0===r||r,pe="kr"===(null!=B?B:e.countryCode),me=e.configuration.koreanAuthenticationRequired&&pe,he=G&&"auto"===e.configuration.socialSecurityNumberMode||"show"===e.configuration.socialSecurityNumberMode,fe=function(e){V(e)},ye=function(e){X(e)},be=function(e){le("billingAddress",e.data),se("billingAddress",e.isValid),ce("billingAddress",e.errors)},ve=Wc((function(){return Yh(e,{sfp:n},{dualBrandSelectElements:M,setDualBrandSelectElements:I,setSelectedBrandValue:E,issuingCountryCode:B,setIssuingCountryCode:T})}),[M,B]);this.showValidation=function(){n.current.showValidation(),re(),(null==o?void 0:o.current)&&o.current.showValidation()},this.processBinLookupResponse=function(e,t){ve.processBinLookup(e,t)},this.setStatus=s,qc((function(){return a.setFocusOn=n.current.setFocusOn,a.updateStyles=n.current.updateStyles,a.handleUnsupportedCard=n.current.handleUnsupportedCard,function(){n.current.destroy()}}),[]),qc((function(){var t=Bs(Bs(Bs(Bs([],e.hasHolderName?["holderName"]:[]),he?["socialSecurityNumber"]:[]),me?["taxNumber"]:[]),e.billingAddressRequired?["billingAddress"]:[]);ie(t)}),[e.hasHolderName,he,me]),qc((function(){var t;b(Ds(Ds({},y),{holderName:null!==(t=ae.holderName)&&void 0!==t?t:"",taxNumber:ae.taxNumber})),Z(ae.socialSecurityNumber),e.billingAddressRequired&&H(Ds({},ae.billingAddress)),h(Ds(Ds({},m),{holderName:!e.holderNameRequired||ne.holderName,socialSecurityNumber:!!ne.socialSecurityNumber&&ne.socialSecurityNumber,taxNumber:!!ne.taxNumber&&ne.taxNumber,billingAddress:!!ne.billingAddress&&ne.billingAddress})),u(Ds(Ds({},d),{holderName:e.holderNameRequired&&oe.holderName?oe.holderName:null,socialSecurityNumber:he&&oe.socialSecurityNumber?oe.socialSecurityNumber:null,taxNumber:me&&oe.taxNumber?oe.taxNumber:null,billingAddress:e.billingAddressRequired&&oe.billingAddress?oe.billingAddress:null}))}),[ae,ne,oe]),qc((function(){var t=m.holderName,r=_,a=!e.billingAddressRequired||m.billingAddress,o=!me||!!m.taxNumber&&!!m.encryptedPassword,i=!he||!!m.socialSecurityNumber,l=r&&t&&a&&o&&i,s=n.current.mapErrorsToValidationRuleResult();e.onChange({data:y,valid:m,errors:Ds(Ds({},d),s),isValid:l,billingAddress:K,selectedBrandValue:O,storePaymentMethod:L,socialSecurityNumber:J,installments:$})}),[y,m,d,O,L,$]);var ge=ec(Wh,{required:e.holderNameRequired,placeholder:e.placeholders.holderName,value:ae.holderName,error:!!oe.holderName,isValid:!!ne.holderName,onChange:te("holderName","blur"),onInput:te("holderName","input")}),ke=function(t){return ec(Th,{amount:e.amount,brand:t,installmentOptions:e.installmentOptions,onChange:ye,type:ue?"amount":"months"})};return ec(Ch,Ds({ref:n},e,{styles:Ds(Ds({},_h),e.styles),koreanAuthenticationRequired:e.configuration.koreanAuthenticationRequired,hasKoreanFields:!(!e.configuration.koreanAuthenticationRequired||"kr"!==e.countryCode),onChange:function(t){if(t.autoCompleteName){if(!e.hasHolderName)return;var r=(a="blur",Gh["holderName"].reduce((function(e,t){return e.length||t.modes.includes(a)&&e.push(t.validate),e}),[])[0])(t.autoCompleteName)?t.autoCompleteName:null;r&&(le("holderName",r),se("holderName",!0),ce("holderName",null))}else{var a;b(Ds(Ds({},y),t.data)),u(Ds(Ds({},d),t.errors)),h(Ds(Ds({},m),t.valid)),N(t.isSfpValid),x(t.cvcPolicy),Y(t.showSocialSecurityNumber),F(t.hideDateForBrand)}},onBrand:e.onBrand,onFocus:function(t){k(t.currentFocusObject),!0===t.focus?e.onFocus(t):e.onBlur(t)},type:e.brand,render:function(t,r){var n,i=t.setRootNode,s=t.setFocusOn;return ec("div",{ref:i,className:"adyen-checkout__card-input "+Nh["card-input__wrapper"]+" adyen-checkout__card-input--"+(null!==(n=e.fundingSource)&&void 0!==n?n:"credit")},e.storedPaymentMethodId?ec(Sh,{status:r.status},ec(Bh,Ds({},e,{errors:r.errors,brand:r.brand,hasCVC:e.hasCVC,cvcPolicy:S,onFocusField:s,focusedElement:g,status:r.status,valid:r.valid})),de&&ke(r.brand)):ec(Sh,{status:r.status},e.hasHolderName&&e.positionHolderNameOnTop&&ge,ec(Eh,Ds({},e,{brand:r.brand,brandsConfiguration:a.props.brandsConfiguration,focusedElement:g,onFocusField:s,hasCVC:e.hasCVC,cvcPolicy:S,hideDateForBrand:P,errors:r.errors,valid:r.valid,dualBrandingElements:M.length>0&&M,dualBrandingChangeHandler:ve.handleDualBrandSelection,dualBrandingSelected:O})),e.hasHolderName&&!e.positionHolderNameOnTop&&ge,me&&ec(Rh,{onFocusField:s,focusedElement:g,encryptedPasswordState:{data:r.encryptedPassword,valid:!!r.valid&&r.valid.encryptedPassword,errors:!!r.errors&&r.errors.encryptedPassword},value:y.taxNumber,error:!!d.taxNumber,isValid:!!m.taxNumber,onChange:te("taxNumber","blur"),onInput:te("taxNumber","input")}),he&&ec("div",{className:"adyen-checkout__card__socialSecurityNumber"},ec(Lh,{onChange:te("socialSecurityNumber","blur"),onInput:te("socialSecurityNumber","input"),error:null==d?void 0:d.socialSecurityNumber,valid:null==m?void 0:m.socialSecurityNumber,data:J})),e.enableStoreDetails&&ec(Vh,{onChange:fe}),de&&ke(r.brand),e.billingAddressRequired&&ec(sp,{label:"billingAddress",data:K,onChange:be,allowedCountries:e.billingAddressAllowedCountries,requiredFields:e.billingAddressRequiredFields,ref:o})),e.showPayButton&&e.payButton({status:l,icon:Sc({loadingContext:e.loadingContext,imageFolder:"components/"})("lock")}))}}))}Jh.defaultProps={details:[],type:"card",hasHolderName:!1,holderNameRequired:!1,enableStoreDetails:!1,hideCVC:!1,hasCVC:!0,hasStoreDetails:!1,storedDetails:null,showBrandIcon:!0,positionHolderNameOnTop:!1,billingAddressRequired:!1,billingAddressRequiredFields:["street","houseNumberOrName","postalCode","city","stateOrProvince","country"],installmentOptions:{},configuration:{koreanAuthenticationRequired:!1,socialSecurityNumberMode:"auto"},onLoad:function(){},onConfigSuccess:function(){},onAllValid:function(){},onFieldValid:function(){},onBrand:function(){},onError:function(){},onBinValue:function(){},onBlur:function(){},onFocus:function(){},onChange:function(){},data:{billingAddress:{}},styles:{},placeholders:{}};var Zh=function(e){return function(t){return t.brand===e}},Qh=function(e){return e.brand.includes("plcc")||e.brand.includes("cbcc")},$h=function(e){var t=null;return function(r){if(!1!==e.props.doBinLookup){if(r.encryptedBin&&e.props.clientKey)t=r.uuid,rp({loadingContext:e.props.loadingContext,path:"v2/bin/binLookup?token="+e.props.clientKey},{supportedBrands:e.props.brands||rm,encryptedBin:r.encryptedBin,requestId:r.uuid}).then((function(a){var n;if((null==a?void 0:a.requestId)===t)if(null===(n=a.brands)||void 0===n?void 0:n.length){var o=(2===a.brands.length?function(e,t){var r=e.map((function(e){return Ds({},e)})),a=r.some(Zh("bcmc")),n=r.some(Zh("maestro")),o=r.some(Zh("visa")),i=r.some(Zh("cartebancaire")),l=r.some(Qh);return"bcmc"===t&&a&&"bcmc"!==r[0].brand&&r.reverse(),"bcmc"===t&&a&&n&&(r[1].cvcPolicy=im),"card"===t&&o&&i&&"visa"!==r[0].brand&&r.reverse(),"card"===t&&l&&(r[0].brand.includes("plcc")||r[0].brand.includes("cbcc")||r.reverse()),r}(a.brands,e.props.type):a.brands).reduce((function(e,t){return e.detectedBrands.push(t.brand),!0===t.supported?(e.supportedBrands.push(t),e):e}),{supportedBrands:[],detectedBrands:[]});if(o.supportedBrands.length)return e.processBinLookupResponse(Ds({issuingCountryCode:a.issuingCountryCode,supportedBrands:o.supportedBrands},a.showSocialSecurityNumber?{showSocialSecurityNumber:a.showSocialSecurityNumber}:{})),void e.onBinLookup({type:r.type,detectedBrands:o.detectedBrands,supportedBrands:o.supportedBrands.map((function(e){return e.brand})),supportedBrandsRaw:o.supportedBrands,brands:e.props.brands||rm});if(o.detectedBrands.length){var i={type:"card",fieldType:"encryptedCardNumber",error:Gm(cm),detectedBrands:o.detectedBrands};return e.handleUnsupportedCard(i),void e.onBinLookup({type:r.type,detectedBrands:o.detectedBrands,supportedBrands:null,brands:e.props.brands||rm})}}else e.onBinLookup({type:r.type,detectedBrands:null,supportedBrands:null,brands:e.props.brands||rm}),e.processBinLookupResponse({},!0);else(null==a?void 0:a.requestId)||e.props.onError(a||{errorType:"binLookup",message:"unknownError"})}));else if(t){e.processBinLookupResponse(null,!0),t=null;e.handleUnsupportedCard({type:"card",fieldType:"encryptedCardNumber",error:""}),e.onBinLookup({isReset:!0})}e.props.onBinValue&&e.props.onBinValue(r)}else e.props.onBinValue&&e.props.onBinValue(r)}},Xh=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onBrand=function(e){t.eventEmitter.emit("brand",Ds(Ds({},e),{brand:"card"===e.brand?null:e.brand})),t.props.onBrand&&t.props.onBrand(e)},t.onBinValue=$h(t),t}return Fs(t,e),t.prototype.formatProps=function(e){var t,r,a,n;return Ds(Ds(Ds(Ds({},e),{holderNameRequired:!!e.hasHolderName&&e.holderNameRequired,hasCVC:!(e.brand&&"bcmc"===e.brand||e.hideCVC),billingAddressRequired:!e.storedPaymentMethodId&&e.billingAddressRequired}),e.brands&&!e.groupTypes&&{groupTypes:e.brands}),{type:"scheme"===e.type?"card":e.type,countryCode:e.countryCode?e.countryCode.toLowerCase():null,configuration:Ds(Ds({},e.configuration),{socialSecurityNumberMode:null!==(r=null===(t=e.configuration)||void 0===t?void 0:t.socialSecurityNumberMode)&&void 0!==r?r:"auto"}),brandsConfiguration:e.brandsConfiguration||(null===(a=e.configuration)||void 0===a?void 0:a.brandsConfiguration)||{},icon:e.icon||(null===(n=e.configuration)||void 0===n?void 0:n.icon)})},t.prototype.formatData=function(){var e=this.state.selectedBrandValue||this.props.brand,r=this.props.enableStoreDetails&&void 0!==this.state.storePaymentMethod;return Ds(Ds(Ds(Ds(Ds({paymentMethod:Ds(Ds(Ds(Ds({type:t.type},this.state.data),this.props.storedPaymentMethodId&&{storedPaymentMethodId:this.props.storedPaymentMethodId}),e&&{brand:e}),this.props.fundingSource&&{fundingSource:this.props.fundingSource})},this.state.billingAddress&&{billingAddress:this.state.billingAddress}),this.state.socialSecurityNumber&&{socialSecurityNumber:this.state.socialSecurityNumber}),r&&{storePaymentMethod:Boolean(this.state.storePaymentMethod)}),this.state.installments&&this.state.installments.value&&{installments:this.state.installments}),{browserInfo:this.browserInfo})},t.prototype.updateStyles=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.updateStyles)&&this.componentRef.updateStyles(e),this},t.prototype.setFocusOn=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.setFocusOn)&&this.componentRef.setFocusOn(e),this},t.prototype.processBinLookupResponse=function(e,t){var r;return void 0===t&&(t=!1),(null===(r=this.componentRef)||void 0===r?void 0:r.processBinLookupResponse)&&this.componentRef.processBinLookupResponse(e,t),this},t.prototype.handleUnsupportedCard=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.handleUnsupportedCard)&&this.componentRef.handleUnsupportedCard(e),this},t.prototype.onBinLookup=function(e){if(!e.isReset){var t=bm("supportedBrandsRaw").from(e);this.props.onBinLookup(t)}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){var e;return null!==(e=this.props.icon)&&void 0!==e?e:Sc({loadingContext:this.props.loadingContext})(this.brand)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"brands",{get:function(){var e=this.props,t=e.brands,r=e.loadingContext,a=e.brandsConfiguration;return t?t.map((function(e){var t,n;return{icon:null!==(n=null===(t=a[e])||void 0===t?void 0:t.icon)&&void 0!==n?n:Sc({loadingContext:r})(e),name:e}})):[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"brand",{get:function(){return this.props.brand||this.props.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.props.storedPaymentMethodId?"\u2022\u2022\u2022\u2022 "+this.props.lastFour:this.props.name||t.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"browserInfo",{get:function(){return gp()},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(Jh,Ds({ref:function(t){e.componentRef=t}},this.props,this.state,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton,onBrand:this.onBrand,onBinValue:this.onBinValue,brand:this.brand})))},t.type="scheme",t.defaultProps={onBinLookup:function(){}},t}(id),ef=function(e){function t(t){var r=e.call(this,t)||this;return r.onBrand=function(e){r.props.onBrand&&r.props.onBrand(e)},r}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{brands:["bcmc","maestro","visa"],type:"bcmc",cvcPolicy:im})},t}(Xh);function tf(e){var t=e.description,r=void 0===t?"":t,a=e.name,n=void 0===a?"":a,o=e.logoUrl,i=void 0===o?"":o,l=e.url,s=void 0===l?"":l,c=e.backgroundUrl,d=void 0===c?"":c;return ec("div",{className:"adyen-checkout__campaign-container"},ec(Ud,{className:"adyen-checkout__campaign-background-image",style:{backgroundImage:"linear-gradient(0, #000, #0003), url("+d+")"},backgroundUrl:d}),ec("div",{className:"adyen-checkout__campaign-content"},i&&ec("img",{src:i,className:"adyen-checkout__campaign-logo",alt:n}),n&&ec("div",{className:"adyen-checkout__campaign-title"},n),r&&ec("div",{className:"adyen-checkout__campaign-description"},r,s&&" \u203a")))}function rf(e){var t=e.url;return ec("div",{className:"adyen-checkout__campaign"},!t&&ec(tf,Ds({},e)),t&&ec("a",{href:t,className:"adyen-checkout__campaign-link",target:"_blank",rel:"noopener noreferrer"},ec(tf,Ds({},e))))}var af=function(e){var t=e.options,r=void 0===t?[]:t,a=e.name,n=e.onChange;return ec("div",{className:"adyen-checkout__button-group"},r.map((function(e,t){var r=e.label,o=e.selected,i=e.value,l=e.disabled;return ec("label",{key:""+a+t,className:zc({"adyen-checkout__button":!0,"adyen-checkout__button--selected":o,"adyen-checkout__button--disabled":l})},ec("input",{type:"radio",className:"adyen-checkout__button-group__input",value:i,checked:o,onChange:n,disabled:l}),ec("span",{className:"adyen-checkout__button-text"},r))})))};function nf(e){var t=e.amounts,r=e.onCancel,a=e.onDonate,n=e.showCancelButton,o=void 0===n||n,i=ad(),l=i.i18n,s=i.loadingContext,c=t.currency,d=Kc("ready"),u=d[0],p=d[1],m=Kc(!1),h=m[0],f=m[1],y=Kc({currency:c,value:null}),b=y[0],v=y[1];this.setStatus=function(e){p(e)};var g=function(e,t){return l.amount(e,t,{minimumFractionDigits:0,maximumFractionDigits:0})};return qc((function(){e.onChange({data:{amount:b},isValid:h})}),[b,h]),"error"===u?ec("div",{className:"adyen-checkout__adyen-giving"},ec(Ud,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--error",src:Sc({loadingContext:s,imageFolder:"components/"})("error"),alt:l.get("error.message.unknown")}),ec("div",{className:"adyen-checkout__status__text"},l.get("error.message.unknown"))):"success"===u?ec("div",{className:"adyen-checkout__adyen-giving"},ec(Ud,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--success",src:Sc({loadingContext:s,imageFolder:"components/"})("heart"),alt:l.get("thanksForYourSupport")}),ec("div",{className:"adyen-checkout__status__text"},l.get("thanksForYourSupport"))):ec("div",{className:"adyen-checkout__adyen-giving"},ec(rf,Ds({},e)),ec("div",{className:"adyen-checkout__adyen-giving-actions"},ec("div",{className:"adyen-checkout__amounts"},ec(af,{options:t.values.map((function(e){return{value:e,label:g(e,c),disabled:"loading"===u,selected:e===b.value}})),name:"amount",onChange:function(e){var t=e.target,r=parseInt(t.value,10);f(!0),v((function(e){return Ds(Ds({},e),{value:r})}))}})),ec(nd,{classNameModifiers:["donate"],onClick:function(){p("loading"),a({data:{amount:b}})},label:l.get("donateButton"),disabled:!b.value,status:u}),o&&ec(nd,{classNameModifiers:["ghost","decline"],onClick:function(){p("loading"),r({data:{amount:b},isValid:h})},disabled:"loading"===u,label:l.get("notNowButton")+" \u203a"})))}nf.defaultProps={onCancel:function(){},onChange:function(){},onDonate:function(){},amounts:{},showCancelButton:!0};var of=function(e){function t(t){var r=e.call(this,t)||this;return r.handleRef=function(e){r.componentRef=e},r.donate=r.donate.bind(r),r}return Fs(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.state.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){this.state=Ds(Ds({},this.state),e)},t.prototype.donate=function(){var e=this.data,t=this.isValid;this.props.onDonate({data:e,isValid:t},this)},t.prototype.render=function(){return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(nf,Ds({},this.props,{ref:this.handleRef,onChange:this.setState,onDonate:this.donate})))},t.type="donation",t.defaultProps={onCancel:function(){},onDonate:function(){}},t}(id),lf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.componentDidMount=function(){var e=this;new Promise((function(t,r){return e.props.beforeRedirect(t,r,e.props.url)})).then((function(){e.postForm?e.postForm.submit():window.location.assign(e.props.url)})).catch((function(){}))},t.prototype.render=function(e){var t=this,r=e.url,a=e.method,n=e.data,o=void 0===n?{}:n;return"POST"===a?ec("form",{method:"post",action:r,style:{display:"none"},ref:function(e){t.postForm=e}},Object.keys(o).map((function(e){return ec("input",{type:"hidden",name:e,key:e,value:o[e]})}))):null},t.defaultProps={beforeRedirect:function(e){return e()},method:"GET",data:{}},t}(ac);function sf(e){var t=e.payButton,r=e.onSubmit,a=e.amount,n=void 0===a?null:a,o=e.name,i=Ss(e,["payButton","onSubmit","amount","name"]),l=ad().i18n,s=Kc("ready"),c=s[0],d=s[1];this.setStatus=function(e){d(e)};return ec(rc,null,t(Ds(Ds({},i),{status:c,classNameModifiers:["standalone"],label:n&&{}.hasOwnProperty.call(n,"value")&&0===n.value?l.get("preauthorizeWith")+" "+o:l.get("continueTo")+" "+o,onClick:r})))}var cf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(e){return Ds(Ds({},e),{showButton:!!e.showPayButton})},t.prototype.formatData=function(){return{paymentMethod:{type:this.props.type}}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return Sc({loadingContext:this.props.loadingContext})(this.props.type)},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return this.props.url&&this.props.method?ec(lf,Ds({},this.props)):this.props.showButton?ec(mp,Ds({},this.props,{loadingContext:this.props.loadingContext}),ec(sf,Ds({},this.props,{onSubmit:this.submit,payButton:this.payButton,ref:function(t){e.componentRef=t}}))):null},t.type="redirect",t.defaultProps={type:t.type,showPayButton:!0},t}(id),df=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(e){var t;return Ds(Ds({},e),{showPayButton:null!==(t=e.showButton)&&void 0!==t?t:e.showPayButton})},t.prototype.formatData=function(){return{paymentMethod:{type:t.type}}},Object.defineProperty(t.prototype,"displayName",{get:function(){return this.props.name||this.constructor.type},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return this.props.showPayButton?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(sf,Ds({},this.props,{name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:function(t){e.componentRef=t}}))):null},t.type="giropay",t}(cf),uf=2,pf=0,mf="adyen",hf="https://pay.google.com/gp/p/js/pay.js";function ff(e){var t=e.amount,r=e.countryCode,a=void 0===r?"US":r,n=e.totalPriceStatus,o=void 0===n?"FINAL":n,i=Ss(e,["amount","countryCode","totalPriceStatus"]),l=String(Ys(t.value,t.currency));return Ds({countryCode:a,currencyCode:t.currency,totalPrice:l,totalPriceStatus:o},i.transactionInfo)}function yf(e){var t=e.configuration,r=Ss(e,["configuration"]);return{apiVersion:uf,apiVersionMinor:pf,transactionInfo:ff(r),merchantInfo:{merchantId:t.merchantId,merchantName:t.merchantName},allowedPaymentMethods:[{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:mf,gatewayMerchantId:t.gatewayMerchantId}},parameters:{allowedAuthMethods:r.allowedAuthMethods,allowedCardNetworks:r.allowedCardNetworks,allowPrepaidCards:r.allowPrepaidCards,allowCreditCards:r.allowCreditCards,billingAddressRequired:r.billingAddressRequired,billingAddressParameters:r.billingAddressParameters}}],emailRequired:r.emailRequired,shippingAddressRequired:r.shippingAddressRequired,shippingAddressParameters:r.shippingAddressParameters,shippingOptionRequired:r.shippingOptionRequired,shippingOptionParameters:r.shippingOptionParameters,callbackIntents:r.callbackIntents}}var bf=["en","ar","bg","ca","cs","da","de","el","es","et","fi","fr","hr","id","it","ja","ko","ms","nl","no","pl","pt","ru","sk","sl","sr","sv","th","tr","uk","zh"];var vf=function(){function e(e){var t=function(e){switch(void 0===e&&(e="TEST"),e.toLowerCase()){case"production":case"live":return"PRODUCTION";default:return"TEST"}}(e.environment);this.paymentsClient=this.getGooglePaymentsClient({environment:t,paymentDataCallbacks:e.paymentDataCallbacks})}return e.prototype.getGooglePaymentsClient=function(e){var t;return xs(this,void 0,void 0,(function(){return As(this,(function(r){switch(r.label){case 0:return(null===(t=window.google)||void 0===t?void 0:t.payments)?[3,2]:[4,new Ap(hf).load()];case 1:r.sent(),r.label=2;case 2:return[2,new google.payments.api.PaymentsClient(e)]}}))}))},e.prototype.isReadyToPay=function(e){return this.paymentsClient?this.paymentsClient.then((function(t){return t.isReadyToPay(function(e){var t=e.allowedAuthMethods,r=e.allowedCardNetworks,a=e.existingPaymentMethodRequired;return{apiVersion:uf,apiVersionMinor:pf,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:t,allowedCardNetworks:r},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{}}}],existingPaymentMethodRequired:void 0!==a&&a}}(e))})):Promise.reject(new Error("Google Pay is not available"))},e.prototype.prefetchPaymentData=function(e){if(!this.paymentsClient)throw new Error("Google Pay is not available");var t=yf(e);this.paymentsClient.then((function(e){return e.prefetchPaymentData(t)}))},e.prototype.initiatePayment=function(e){if(!this.paymentsClient)throw new Error("Google Pay is not available");var t=yf(e);return this.paymentsClient.then((function(e){return e.loadPaymentData(t)}))},e}(),gf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.clicked=!1,t.handleClick=function(e){e.preventDefault(),e.stopPropagation(),t.clicked||(t.props.onClick(e),t.clicked=!0,setTimeout((function(){t.clicked=!1}),300))},t}return Fs(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,r=t.buttonColor,a=t.buttonType,n=t.buttonLocale,o=t.buttonSizeMode;t.paymentsClient.then((function(t){return t.createButton({onClick:e.handleClick,buttonType:a,buttonColor:r,buttonLocale:n,buttonSizeMode:o})})).then((function(t){e.paywithgoogleWrapper.appendChild(t)}))},t.prototype.render=function(){var e=this;return ec("span",{className:"adyen-checkout__paywithgoogle",ref:function(t){e.paywithgoogleWrapper=t}})},t.defaultProps={buttonColor:"default",buttonType:"long",buttonSizeMode:"static"},t}(ac),kf={environment:"TEST",existingPaymentMethodRequired:!1,buttonColor:"default",buttonType:"long",buttonSizeMode:void 0,showPayButton:!0,configuration:{gatewayMerchantId:"",merchantId:"",merchantName:""},amount:{value:0,currency:"USD"},countryCode:"US",totalPriceStatus:"FINAL",onError:function(){},onAuthorized:function(e){return e},onSubmit:function(){},onClick:function(e){return e()},allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],allowCreditCards:!0,allowPrepaidCards:!0,billingAddressRequired:!1,billingAddressParameters:void 0,emailRequired:!1,shippingAddressRequired:!1,shippingAddressParameters:void 0,shippingOptionRequired:!1,shippingOptionParameters:void 0,paymentMethods:[]},Cf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.googlePay=new vf(t.props),t.loadPayment=function(){var e=t.props.onAuthorized,r=void 0===e?function(){}:e;return new Promise((function(e,r){return t.props.onClick(e,r)})).then((function(){return t.googlePay.initiatePayment(t.props)})).then((function(e){return t.setState({googlePayToken:e.paymentMethodData.tokenizationData.token,googlePayCardNetwork:e.paymentMethodData.info.cardNetwork}),r(e)})).catch((function(e){t.props.onError&&t.props.onError(e)}))},t.submit=function(){return t.loadPayment().then((function(){t.props.onSubmit&&t.isValid&&t.props.onSubmit({data:t.data,isValid:t.isValid},t.elementRef)}))},t.startPayment=function(){return t.loadPayment()},t.isAvailable=function(){return t.isReadyToPay().then((function(e){if(!e.result)throw new Error("Google Pay is not available");if(!1===e.paymentMethodPresent)throw new Error("Google Pay - No paymentMethodPresent");return!0})).catch((function(){return!1}))},t.isReadyToPay=function(){return t.googlePay.isReadyToPay(t.props)},t.prefetch=function(){return t.googlePay.prefetchPaymentData(t.props)},t}return Fs(t,e),t.prototype.formatProps=function(e){var t,r,a,n,o,i,l=(null===(t=e.brands)||void 0===t?void 0:t.length)?(o=e.brands,i={mc:"MASTERCARD",amex:"AMEX",visa:"VISA",interac:"INTERAC",discover:"DISCOVER"},o.reduce((function(e,t){return i[t]&&!e.includes(i[t])&&e.push(i[t]),e}),[])):e.allowedCardNetworks,s=null!==(r=e.buttonSizeMode)&&void 0!==r?r:e.isDropin?"fill":"static",c=function(e){void 0===e&&(e="");var t=e.toLowerCase().substring(0,2);return bf.includes(t)?t:null}(null!==(a=e.buttonLocale)&&void 0!==a?a:null===(n=e.i18n)||void 0===n?void 0:n.locale);return Ds(Ds({},e),{showButton:!0===e.showPayButton,configuration:e.configuration,allowedCardNetworks:l,buttonSizeMode:s,buttonLocale:c})},t.prototype.formatData=function(){var e;return{paymentMethod:Ds({type:null!==(e=this.props.type)&&void 0!==e?e:t.type},this.state),browserInfo:this.browserInfo}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.googlePayToken},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"browserInfo",{get:function(){return gp()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){var e;return null!==(e=this.props.icon)&&void 0!==e?e:Sc({loadingContext:this.props.loadingContext})("googlepay")},enumerable:!1,configurable:!0}),t.prototype.render=function(){return this.props.showPayButton?ec(gf,{buttonColor:this.props.buttonColor,buttonType:this.props.buttonType,buttonSizeMode:this.props.buttonSizeMode,buttonLocale:this.props.buttonLocale,paymentsClient:this.googlePay.paymentsClient,onClick:this.submit}):null},t.type="paywithgoogle",t.defaultProps=kf,t}(id),_f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="entercash",t}(Gp),Nf={telephoneNumber:[{validate:function(e){return!!e&&e.length<=11},errorMessage:"voucher.econtext.telephoneNumber.invalid",modes:["input","blur"]},{validate:function(e){return!!e&&Qd.test(e)&&(10===e.length||11===e.length)},errorMessage:"voucher.econtext.telephoneNumber.invalid",modes:["blur"]}]};function wf(e){var t=Yc(null),r=ad().i18n,a=Kc("ready"),n=a[0],o=a[1];return this.setStatus=o,this.showValidation=function(){t.current&&t.current.showValidation()},ec("div",{className:"adyen-checkout__econtext-input__field"},ec(bu,{data:e.data,requiredFields:["firstName","lastName","telephoneNumber","shopperEmail"],onChange:e.onChange,namePrefix:"econtext",ref:t,validationRules:Nf}),e.showPayButton&&e.payButton({status:n,label:r.get("confirmPurchase")}))}function Pf(e){var t,r,a=(t=e,(r=document.createElement("textArea")).readOnly=!0,r.value=t,document.body.appendChild(r),r);if(window.navigator.userAgent.match(/ipad|iphone/i)){var n=document.createRange();n.selectNodeContents(a);var o=window.getSelection();o.removeAllRanges(),o.addRange(n),a.setSelectionRange(0,999999)}else a.select();document.execCommand("copy"),document.body.removeChild(a)}function Ff(e){var t=e.voucherDetails,r=void 0===t?[]:t,a=e.className,n=void 0===a?"":a,o=Ss(e,["voucherDetails","className"]),i=ad(),l=i.i18n,s=i.loadingContext;return ec("div",{className:zc("adyen-checkout__voucher-result","adyen-checkout__voucher-result--"+o.paymentMethodType,n)},ec("div",{className:"adyen-checkout__voucher-result__top"},ec("div",{className:"adyen-checkout__voucher-result__image"},!!o.imageUrl&&ec("span",{className:"adyen-checkout__voucher-result__image__wrapper"},ec("img",{alt:o.paymentMethodType,className:"adyen-checkout__voucher-result__image__brand",src:o.imageUrl})),!!o.issuerImageUrl&&ec("span",{className:"adyen-checkout__voucher-result__image__wrapper"},ec("img",{alt:o.paymentMethodType,className:"adyen-checkout__voucher-result__image__issuer",src:o.issuerImageUrl}))),ec("div",{className:"adyen-checkout__voucher-result__introduction"},o.introduction," ",o.instructionsUrl&&ec("a",{className:"adyen-checkout__link adyen-checkout__link--voucher-result-instructions",href:o.instructionsUrl,target:"_blank",rel:"noopener noreferrer"},l.get("voucher.readInstructions")," \u203a")),o.amount&&ec("div",{className:"adyen-checkout__voucher-result__amount"},o.amount,o.surcharge&&ec("span",{className:"adyen-checkout__voucher-result__surcharge"},"(",l.get("voucher.surcharge").replace("%@",o.surcharge),")"))),o.reference&&ec("div",{className:"adyen-checkout__voucher-result__separator"},ec("div",{className:"adyen-checkout__voucher-result__separator__inner"}),ec("div",{className:"adyen-checkout__voucher-result__code__label"},ec("span",{className:"adyen-checkout__voucher-result__code__label__text"},l.get("voucher.paymentReferenceLabel")))),ec("div",{className:"adyen-checkout__voucher-result__bottom"},o.reference&&ec("div",{className:"adyen-checkout__voucher-result__code"},o.barcode&&ec("img",{alt:l.get("voucher.paymentReferenceLabel"),className:"adyen-checkout__voucher-result__code__barcode",src:o.barcode}),ec("span",null,o.reference)),(!!o.downloadUrl||!!o.copyBtn)&&ec("ul",{className:"adyen-checkout__voucher-result__actions"},!!o.copyBtn&&ec("li",{className:"adyen-checkout__voucher-result__actions__item"},ec(nd,{inline:!0,secondary:!0,onClick:function(e,t){var r=t.complete;Pf(o.reference),r()},icon:Sc({loadingContext:s,imageFolder:"components/"})("copy"),label:l.get("button.copy")})),!!o.downloadUrl&&ec("li",{className:"adyen-checkout__voucher-result__actions__item"},ec(nd,{inline:!0,secondary:!0,href:o.downloadUrl,icon:Sc({loadingContext:s,imageFolder:"components/"})("download"),label:o.downloadButtonText||l.get("button.download"),target:"_blank",rel:"noopener noreferrer"}))),ec("ul",{className:"adyen-checkout__voucher-result__details"},r.filter((function(e){var t=e.label,r=e.value;return!!t&&!!r})).map((function(e,t){var r=e.label,a=e.value;return ec("li",{key:t,className:"adyen-checkout__voucher-result__details__item"},ec("span",{className:"adyen-checkout__voucher-result__details__label"},r),ec("span",{className:"adyen-checkout__voucher-result__details__value"},a))})))))}var Df=function(e){var t=e.reference,r=e.totalAmount,a=e.expiresAt,n=e.paymentMethodType,o=e.maskedTelephoneNumber,i=e.instructionsUrl,l=e.collectionInstitutionNumber,s=ad(),c=s.loadingContext,d=s.i18n;return ec(Ff,{paymentMethodType:n,reference:t,introduction:d.get("voucher.introduction.econtext"),imageUrl:Sc({loadingContext:c})(n),instructionsUrl:i,amount:r&&d.amount(r.value,r.currency),voucherDetails:[{label:d.get("voucher.collectionInstitutionNumber"),value:l},{label:d.get("voucher.expirationDate"),value:d.date(a)},{label:d.get("voucher.telephoneNumber"),value:o}],copyBtn:!0})},Sf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatData=function(){return Ds(Ds({},this.state.data),{paymentMethod:{type:this.props.type||t.type}})},Object.defineProperty(t.prototype,"icon",{get:function(){return Sc({loadingContext:this.props.loadingContext})(this.props.type)},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.reference?ec(Df,Ds({ref:function(t){e.componentRef=t}},this.props)):ec(wf,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="econtext",t}(id),xf=["ES","FR"],Af=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:xf})},t.type="facilypay_3x",t}(hp),Bf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:xf})},t.type="facilypay_4x",t}(hp),Tf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:xf})},t.type="facilypay_6x",t}(hp),zf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:xf})},t.type="facilypay_10x",t}(hp),Mf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:xf})},t.type="facilypay_12x",t}(hp),If=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="ideal",t}(Gp),jf=["black","white"],Of=["en_US","en_AU","en_GB","fr_CA","es_ES","it_IT","fr_FR","de_DE","pt_BR","zh_CN","da_DK","zh_HK","id_ID","he_IL","ja_JP","ko_KR","nl_NL","no_NO","pl_PL","pt_PT","ru_RU","sv_SE","th_TH","zh_TW"],Ef=function(e,t){return void 0===t&&(t={}),"paypal"===e?Ds({},t):Object.keys(t).reduce((function(e,r){var a=t[r];return("color"!==r||jf.includes(a))&&(e[r]=a),e}),{})},Rf=function(e){var t=e.amount,r=e.countryCode,a=e.debug,n=e.environment,o=void 0===n?"":n,i=e.locale,l=e.configuration,s=e.commit,c=e.vault,d=function(e){var t=e?e.replace("-","_"):null;return Of.includes(t)?t:null}(i),u=t?t.currency:null,p="test"===o.toLowerCase(),m=p?"AVzsPoGmjcm99YG02kq0iWL3KP3JedbMQJO2QUnVUc-t7aUzjkBWte7relkAC5SPUL50ovLGKmxfA674":"AU0Z-TP9t5_9196agaBN6ZD3UAwypdP1IX8ZYH3PcNNAQMXUTDQlChruXqQEhyI6-NKBKowN6ydkj477",h=l.merchantId,f=l.intent;return Ds(Ds(Ds(Ds(Ds(Ds(Ds({},h&&{"merchant-id":h}),d&&{locale:d}),r&&p&&{"buyer-country":r}),a&&p&&{debug:a}),u&&{currency:u}),f&&{intent:f}),{commit:s,vault:c,"client-id":m,"integration-date":"2020-02-01",components:"buttons,funding-eligibility"})};function Lf(e){var t=e.onInit,r=e.onComplete,a=e.onClick,n=e.onCancel,o=e.onError,i=e.onShippingChange,l=e.onSubmit,s=e.paypalRef,c=e.style,d=Yc(null),u=Yc(null),p=function(e,d){var u=s.Buttons({fundingSource:e,style:Ef(e,c),onInit:t,onClick:a,onCancel:n,onError:o,onShippingChange:i,createOrder:l,onApprove:r});u.isEligible()&&u.render(d.current)};return qc((function(){var t=s.FUNDING,r=t.PAYPAL,a=t.CREDIT;p(r,d),e.blockPayPalCreditButton||p(a,u)}),[]),ec("div",{className:"adyen-checkout__paypal__buttons"},ec("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--paypal",ref:d}),ec("div",{className:"adyen-checkout__paypal__button adyen-checkout__paypal__button--credit",ref:u}))}function Vf(e){var t=ad().i18n,r=Kc("pending"),a=r[0],n=r[1];this.setStatus=function(e){n(e)};var o=function(){n("ready")};return qc((function(){var t=function(e){var t=Rf(e);return"https://www.paypal.com/sdk/js?"+decodeURIComponent(Object.keys(t).map((function(e){return e+"="+t[e]})).join("&"))}(e),r=new Ap(t);return window.paypal?o():r.load().then(o),function(){r.remove()}}),[]),ec("div",{className:"adyen-checkout__paypal"},"pending"===a?ec("div",{className:"adyen-checkout__paypal__status adyen-checkout__paypal__status--pending"},ec(Mc,null)):"processing"===a?ec("div",{className:"adyen-checkout__paypal__status adyen-checkout__paypal__status--processing"},ec(Mc,{size:"medium",inline:!0})," ",t.get("paypal.processingPayment")):ec(Lf,Ds({},e,{onComplete:function(t){n("processing"),e.onComplete(t)},paypalRef:window.paypal})))}var Uf={environment:"TEST",status:"loading",showPayButton:!0,merchantId:"",intent:null,commit:!0,vault:!1,style:{height:48},blockPayPalCreditButton:!1,configuration:{merchantId:"",intent:null},onSubmit:function(){},onAdditionalDetails:function(){},onInit:function(){},onClick:function(){},onCancel:function(){},onError:function(){},onShippingChange:function(){}},Kf="No token was provided",Hf="Calling submit() is not supported for this payment method",qf="The instance of the PayPal component being used is not the same which started the payment",Gf=function(e){function t(t){var r=e.call(this,t)||this;return r.paymentData=null,r.resolve=null,r.reject=null,r.handleAction=r.handleAction.bind(r),r.updateWithAction=r.updateWithAction.bind(r),r.handleCancel=r.handleCancel.bind(r),r.handleComplete=r.handleComplete.bind(r),r.handleError=r.handleError.bind(r),r.handleSubmit=r.handleSubmit.bind(r),r.submit=r.submit.bind(r),r}return Fs(t,e),t.prototype.formatData=function(){return{paymentMethod:{type:t.type,subtype:t.subtype}}},t.prototype.handleAction=function(e){return this.updateWithAction(e)},t.prototype.updateWithAction=function(e){if(e.paymentMethodType!==this.data.paymentMethod.type)throw new Error("Invalid Action");return e.paymentData&&(this.paymentData=e.paymentData),e.sdkData&&e.sdkData.token?this.handleResolve(e.sdkData.token):this.handleReject(Kf),null},Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.handleCancel=function(e){this.props.onCancel(e,this.elementRef)},t.prototype.handleComplete=function(e){var t={data:{details:e,paymentData:this.paymentData}};this.props.onAdditionalDetails(t,this.elementRef)},t.prototype.handleError=function(e){this.props.onError(e,this.elementRef)},t.prototype.handleResolve=function(e){if(!this.resolve)return this.handleError(qf);this.resolve(e)},t.prototype.handleReject=function(e){if(!this.reject)return this.handleError(qf);this.reject(new Error(e))},t.prototype.startPayment=function(){return Promise.reject(Hf)},t.prototype.handleSubmit=function(){var e=this,t=this.data,r=this.isValid;return this.props.onSubmit&&this.props.onSubmit({data:t,isValid:r},this.elementRef),new Promise((function(t,r){e.resolve=t,e.reject=r}))},t.prototype.submit=function(){var e=this;this.startPayment().catch((function(t){e.props.onError(t,e.elementRef)}))},t.prototype.render=function(){var e=this;return this.props.showPayButton?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(Vf,Ds({ref:function(t){e.componentRef=t}},this.props,{onCancel:this.handleCancel,onChange:this.setState,onComplete:this.handleComplete,onError:this.handleError,onSubmit:this.handleSubmit}))):null},t.type="paypal",t.subtype="sdk",t.defaultProps=Uf,t}(id);function Yf(e){var t,r=ad().i18n,a=Kc("ready"),n=a[0],o=a[1],i=!!(null===(t=null==e?void 0:e.items)||void 0===t?void 0:t.length),l=nu({schema:Bs(Bs([],i?["phonePrefix"]:[]),["phoneNumber"]),defaultData:Ds({},i?{phonePrefix:e.selected}:{}),rules:{phoneNumber:{modes:["blur"],errorMessage:"error.va.gen.01",validate:function(e){return(null==e?void 0:e.length)>6}}}}),s=l.handleChangeFor,c=l.triggerValidation,d=l.data,u=l.valid,p=l.errors,m=l.isValid;return qc((function(){e.onChange({data:d,valid:u,errors:p,isValid:m})}),[d,u,p,m]),this.showValidation=c,this.setStatus=o,ec("div",{className:"adyen-checkout__phone-input"},ec(wd,{errorMessage:!!p.phoneNumber,label:r.get(e.phoneLabel),className:zc({"adyen-checkout__input--phone-number":!0}),inputWrapperModifiers:["phoneInput"]},ec("div",{className:"adyen-checkout__input-wrapper"},ec("div",{className:zc({"adyen-checkout__input":!0,"adyen-checkout__input--invalid":!!p.phoneNumber})},!!i&&ec(wd,{inputWrapperModifiers:["phoneInput"]},Jd("select",{className:"adyen-checkout__dropdown--small adyen-checkout__countryFlag",filterable:!1,items:e.items,name:e.prefixName,onChange:s("phonePrefix"),placeholder:r.get("infix"),selected:d.phonePrefix}),ec("div",{className:"adyen-checkout__phoneNumber"},ec("div",null,d.phonePrefix),ec("input",{type:"tel",name:e.phoneName,value:d.phoneNumber,onInput:s("phoneNumber","input"),onChange:s("phoneNumber","blur"),placeholder:"123 456 789",className:"adyen-checkout__input adyen-checkout__input--phoneNumber",autoCorrect:"off"})))))),this.props.showPayButton&&this.props.payButton({status:n}))}Yf.defaultProps={phoneLabel:"telephoneNumber"};var Wf=function(e){if(!e)throw new Error("No item passed");if(!e.code||!e.id)return!1;var t=e.code.toUpperCase().replace(/./g,(function(e){return String.fromCodePoint?String.fromCodePoint(e.charCodeAt(0)+127397):""}));return Ds(Ds({},e),{name:t+" "+e.name+" ("+e.id+")",selectedOptionName:t})},Jf=function(e,t){if(e&&t){var r=e.find((function(e){return e.code===t}));return!!r&&r.id}return!1},Zf=[{id:"+7",name:"Russian Federation",code:"RU"},{id:"+9955",name:"Georgia",code:"GE"},{id:"+507",name:"Panama",code:"PA"},{id:"+44",name:"United Kingdom",code:"GB"},{id:"+992",name:"Tajikistan",code:"TJ"},{id:"+370",name:"Lithuania",code:"LT"},{id:"+972",name:"Israel",code:"IL"},{id:"+996",name:"Kyrgyzstan",code:"KG"},{id:"+380",name:"Ukraine",code:"UA"},{id:"+84",name:"Viet Nam",code:"VN"},{id:"+90",name:"Turkey",code:"TR"},{id:"+994",name:"Azerbaijan",code:"AZ"},{id:"+374",name:"Armenia",code:"AM"},{id:"+371",name:"Latvia",code:"LV"},{id:"+91",name:"India",code:"IN"},{id:"+66",name:"Thailand",code:"TH"},{id:"+373",name:"Moldova",code:"MD"},{id:"+1",name:"United States",code:"US"},{id:"+81",name:"Japan",code:"JP"},{id:"+998",name:"Uzbekistan",code:"UZ"},{id:"+77",name:"Kazakhstan",code:"KZ"},{id:"+375",name:"Belarus",code:"BY"},{id:"+372",name:"Estonia",code:"EE"},{id:"+40",name:"Romania",code:"RO"},{id:"+82",name:"Korea",code:"KR"}],Qf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatProps=function(e){return Ds(Ds({onValid:function(){}},e),{selected:Jf(e.items,e.countryCode)})},t.prototype.formatData=function(){return{paymentMethod:{type:t.type,"qiwiwallet.telephoneNumberPrefix":this.state.data?this.state.data.phonePrefix:"","qiwiwallet.telephoneNumber":this.state.data?this.state.data.phoneNumber:""}}},t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(Yf,Ds({ref:function(t){e.componentRef=t}},this.props,this.state,{phoneLabel:"mobileNumber",onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="qiwiwallet",t.defaultProps={items:Zf.map(Wf).filter((function(e){return!1!==e})),countryCode:Zf[0].code,prefixName:"qiwiwallet.telephoneNumberPrefix",phoneName:"qiwiwallet.telephoneNumber"},t}(id);function $f(e){var t=this,r=Yc(null),a=Kc({}),n=a[0],o=a[1],i=Kc({}),l=i[0],s=i[1],c=Kc({}),d=c[0],u=c[1],p=Kc(!1),m=p[0],h=p[1],f=Kc(null),y=f[0],b=f[1],v=Kc([]),g=v[0],k=v[1],C=Kc(""),_=C[0],N=C[1],w=Wc((function(){return Yh(e,{sfp:r},{dualBrandSelectElements:g,setDualBrandSelectElements:k,setSelectedBrandValue:N,issuingCountryCode:y,setIssuingCountryCode:b})}),[g,y]);return this.processBinLookupResponse=function(e,t){w.processBinLookup(e,t)},this.dualBrandingChangeHandler=w.handleDualBrandSelection,qc((function(){return t.setFocusOn=r.current.setFocusOn,t.updateStyles=r.current.updateStyles,t.showValidation=r.current.showValidation,t.handleUnsupportedCard=r.current.handleUnsupportedCard,function(){r.current.destroy()}}),[]),qc((function(){e.onChange({data:d,valid:l,errors:n,isValid:m,selectedBrandValue:_})}),[d,l,n,_]),ec(Ch,Ds({ref:r},e,{onChange:function(e){u(Ds(Ds({},d),e.data)),o(Ds(Ds({},n),e.errors)),s(Ds(Ds({},l),e.valid)),h(e.isSfpValid)},render:function(){return null}}))}$f.defaultProps={onChange:function(){},onError:function(){}};var Xf=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onBinValue=$h(t),t}return Fs(t,e),t.prototype.formatProps=function(e){return Ds(Ds(Ds({},e),{type:"scheme"===e.type?"card":e.type}),e.brands&&!e.groupTypes&&{groupTypes:e.brands})},t.prototype.formatData=function(){var e=this.state.selectedBrandValue||this.props.brand;return{paymentMethod:Ds(Ds({type:t.type},this.state.data),e&&{brand:e}),browserInfo:this.browserInfo}},t.prototype.updateStyles=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.updateStyles)&&this.componentRef.updateStyles(e),this},t.prototype.setFocusOn=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.setFocusOn)&&this.componentRef.setFocusOn(e),this},t.prototype.processBinLookupResponse=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.processBinLookupResponse)&&this.componentRef.processBinLookupResponse(e),this},t.prototype.dualBrandingChangeHandler=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.dualBrandingChangeHandler)&&this.componentRef.dualBrandingChangeHandler(e),this},t.prototype.handleUnsupportedCard=function(e){var t;return(null===(t=this.componentRef)||void 0===t?void 0:t.handleUnsupportedCard)&&this.componentRef.handleUnsupportedCard(e),this},t.prototype.onBinLookup=function(e){var t,r=this,a=Ds({},e);a.rootNode=this._node,a.isReset||(a.supportedBrandsRaw=null===(t=e.supportedBrandsRaw)||void 0===t?void 0:t.map((function(e){var t,a;return e.brandImageUrl=null!==(a=null===(t=r.props.brandsConfiguration[e.brand])||void 0===t?void 0:t.icon)&&void 0!==a?a:hm(e.brand,r.props.loadingContext),e}))),this.props.onBinLookup(a)},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return Sc({loadingContext:this.props.loadingContext})(this.props.type)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"browserInfo",{get:function(){return gp()},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec($f,Ds({ref:function(t){e.componentRef=t}},this.props,this.state,{rootNode:this._node,onChange:this.setState,onBinValue:this.onBinValue})))},t.type="scheme",t.analyticsType="custom-scheme",t.defaultProps={onBinLookup:function(){},brandsConfiguration:{}},t}(id),ey={AD:{length:24,structure:"F04F04A12",example:"AD9912345678901234567890"},AE:{length:23,structure:"F03F16",example:"AE993331234567890123456"},AL:{length:28,structure:"F08A16",example:"AL47212110090000000235698741"},AT:{length:20,structure:"F05F11",example:"AT611904300234573201"},AZ:{length:28,structure:"U04A20",example:"AZ21NABZ00000000137010001944"},BA:{length:20,structure:"F03F03F08F02",example:"BA391290079401028494"},BE:{length:16,structure:"F03F07F02",example:"BE68 5390 0754 7034"},BG:{length:22,structure:"U04F04F02A08",example:"BG80BNBG96611020345678"},BH:{length:22,structure:"U04A14",example:"BH67BMAG00001299123456"},BR:{length:29,structure:"F08F05F10U01A01",example:"BR9700360305000010009795493P1"},CH:{length:21,structure:"F05A12",example:"CH9300762011623852957"},CR:{length:22,structure:"F04F14",example:"CR72012300000171549015"},CY:{length:28,structure:"F03F05A16",example:"CY17002001280000001200527600"},CZ:{length:24,structure:"F04F06F10",example:"CZ6508000000192000145399"},DE:{length:22,structure:"F08F10",example:"DE00123456789012345678"},DK:{length:18,structure:"F04F09F01",example:"DK5000400440116243"},DO:{length:28,structure:"U04F20",example:"DO28BAGR00000001212453611324"},EE:{length:20,structure:"F02F02F11F01",example:"EE382200221020145685"},ES:{length:24,structure:"F04F04F01F01F10",example:"ES9121000418450200051332"},FI:{length:18,structure:"F06F07F01",example:"FI2112345600000785"},FO:{length:18,structure:"F04F09F01",example:"FO6264600001631634"},FR:{length:27,structure:"F05F05A11F02",example:"FR1420041010050500013M02606"},GB:{length:22,structure:"U04F06F08",example:"GB29NWBK60161331926819"},GE:{length:22,structure:"U02F16",example:"GE29NB0000000101904917"},GI:{length:23,structure:"U04A15",example:"GI75NWBK000000007099453"},GL:{length:18,structure:"F04F09F01",example:"GL8964710001000206"},GR:{length:27,structure:"F03F04A16",example:"GR1601101250000000012300695"},GT:{length:28,structure:"A04A20",example:"GT82TRAJ01020000001210029690"},HR:{length:21,structure:"F07F10",example:"HR1210010051863000160"},HU:{length:28,structure:"F03F04F01F15F01",example:"HU42117730161111101800000000"},IE:{length:22,structure:"U04F06F08",example:"IE29AIBK93115212345678"},IL:{length:23,structure:"F03F03F13",example:"IL620108000000099999999"},IS:{length:26,structure:"F04F02F06F10",example:"IS140159260076545510730339"},IT:{length:27,structure:"U01F05F05A12",example:"IT60X0542811101000000123456"},KW:{length:30,structure:"U04A22",example:"KW81CBKU0000000000001234560101"},KZ:{length:20,structure:"F03A13",example:"KZ86125KZT5004100100"},LB:{length:28,structure:"F04A20",example:"LB62099900000001001901229114"},LC:{length:32,structure:"U04F24",example:"LC07HEMM000100010012001200013015"},LI:{length:21,structure:"F05A12",example:"LI21088100002324013AA"},LT:{length:20,structure:"F05F11",example:"LT121000011101001000"},LU:{length:20,structure:"F03A13",example:"LU280019400644750000"},LV:{length:21,structure:"U04A13",example:"LV80BANK0000435195001"},MC:{length:27,structure:"F05F05A11F02",example:"MC5811222000010123456789030"},MD:{length:24,structure:"U02A18",example:"MD24AG000225100013104168"},ME:{length:22,structure:"F03F13F02",example:"ME25505000012345678951"},MK:{length:19,structure:"F03A10F02",example:"MK07250120000058984"},MR:{length:27,structure:"F05F05F11F02",example:"MR1300020001010000123456753"},MT:{length:31,structure:"U04F05A18",example:"MT84MALT011000012345MTLCAST001S"},MU:{length:30,structure:"U04F02F02F12F03U03",example:"MU17BOMM0101101030300200000MUR"},NL:{length:18,structure:"U04F10",example:"NL99BANK0123456789"},NO:{length:15,structure:"F04F06F01",example:"NO9386011117947"},PK:{length:24,structure:"U04A16",example:"PK36SCBL0000001123456702"},PL:{length:28,structure:"F08F16",example:"PL00123456780912345678901234"},PS:{length:29,structure:"U04A21",example:"PS92PALS000000000400123456702"},PT:{length:25,structure:"F04F04F11F02",example:"PT50000201231234567890154"},RO:{length:24,structure:"U04A16",example:"RO49AAAA1B31007593840000"},RS:{length:22,structure:"F03F13F02",example:"RS35260005601001611379"},SA:{length:24,structure:"F02A18",example:"SA0380000000608010167519"},SE:{length:24,structure:"F03F16F01",example:"SE4550000000058398257466"},SI:{length:19,structure:"F05F08F02",example:"SI56263300012039086"},SK:{length:24,structure:"F04F06F10",example:"SK3112000000198742637541"},SM:{length:27,structure:"U01F05F05A12",example:"SM86U0322509800000000270100"},ST:{length:25,structure:"F08F11F02",example:"ST68000100010051845310112"},TL:{length:23,structure:"F03F14F02",example:"TL380080012345678910157"},TN:{length:24,structure:"F02F03F13F02",example:"TN5910006035183598478831"},TR:{length:26,structure:"F05F01A16",example:"TR330006100519786457841326"},VG:{length:24,structure:"U04F16",example:"VG96VPVG0000012345678901"},XK:{length:20,structure:"F04F10F02",example:"XK051212012345678906"},AO:{length:25,structure:"F21",example:"AO69123456789012345678901"},BF:{length:27,structure:"F23",example:"BF2312345678901234567890123"},BI:{length:16,structure:"F12",example:"BI41123456789012"},BJ:{length:28,structure:"F24",example:"BJ39123456789012345678901234"},CI:{length:28,structure:"U01F23",example:"CI17A12345678901234567890123"},CM:{length:27,structure:"F23",example:"CM9012345678901234567890123"},CV:{length:25,structure:"F21",example:"CV30123456789012345678901"},DZ:{length:24,structure:"F20",example:"DZ8612345678901234567890"},IR:{length:26,structure:"F22",example:"IR861234568790123456789012"},JO:{length:30,structure:"A04F22",example:"JO15AAAA1234567890123456789012"},MG:{length:27,structure:"F23",example:"MG1812345678901234567890123"},ML:{length:28,structure:"U01F23",example:"ML15A12345678901234567890123"},MZ:{length:25,structure:"F21",example:"MZ25123456789012345678901"},QA:{length:29,structure:"U04A21",example:"QA30AAAA123456789012345678901"},SN:{length:28,structure:"U01F23",example:"SN52A12345678901234567890123"},UA:{length:29,structure:"F25",example:"UA511234567890123456789012345"}},ty=function(e){return e.replace(/\W/gi,"").replace(/(.{4})(?!$)/g,"$1 ").trim()},ry=function(e){return e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase()},ay=function(e,t){return function(e,t){if(null===t||!ey[t]||!ey[t].structure)return!1;var r=ey[t].structure.match(/(.{3})/g).map((function(e){var t,r=e.slice(0,1),a=parseInt(e.slice(1),10);switch(r){case"A":t="0-9A-Za-z";break;case"B":t="0-9A-Z";break;case"C":t="A-Za-z";break;case"F":t="0-9";break;case"L":t="a-z";break;case"U":t="A-Z";break;case"W":t="0-9a-z"}return"(["+t+"]{"+a+"})"}));return new RegExp("^"+r.join("")+"$")}(0,t)},ny=function(e){return void 0===e&&(e=null),e&&ey[e]&&ey[e].example?ty(ey[e].example):"AB00 1234 5678 9012 3456 7890"};function oy(e,t){void 0===t&&(t=null),this.status=e,this.code=t}var iy=function(e){var t=ry(e);return 1===function(e){for(var t,r=e;r.length>2;)t=r.slice(0,9),r=parseInt(t,10)%97+r.slice(t.length);return parseInt(r,10)%97}(function(e){var t=e,r="A".charCodeAt(0),a="Z".charCodeAt(0);return(t=(t=t.toUpperCase()).substr(4)+t.substr(0,4)).split("").map((function(e){var t=e.charCodeAt(0);return t>=r&&t<=a?t-r+10:e})).join("")}(t))&&function(e){var t=e.slice(0,2),r=ay(0,t);return r.test&&r.test(e.slice(4))||!1}(t)},ly=function(e){var t=ry(e);if(e.length<2)return new oy("no-validate","TOO_SHORT");var r=function(e){return!(!e||!ey[e])&&ey[e]}(t.slice(0,2));return r?t.length>r.length?new oy("invalid","TOO_LONG"):t.length===r.length?iy(e)?new oy("valid","VALID"):new oy("invalid","INVALID_IBAN"):new oy("no-validate","UNKNOWN"):new oy("invalid","INVALID_COUNTRY")},sy=function(e){return!!(e&&e.length&&e.length>0)},cy=function(e){function t(t){var r,a,n=e.call(this,t)||this;if(n.setData=function(e,t,r){n.setState((function(r){var a;return{data:Ds(Ds({},r.data),(a={},a[e]=t,a))}}),r)},n.setError=function(e,t,r){n.setState((function(r){var a;return{errors:Ds(Ds({},r.errors),(a={},a[e]=t,a))}}),r)},n.setValid=function(e,t,r){n.setState((function(r){var a;return{valid:Ds(Ds({},r.valid),(a={},a[e]=t,a))}}),r)},n.handleHolderInput=function(e){n.setState((function(t){return{data:Ds(Ds({},t.data),{"sepa.ownerName":e})}}),(function(){n.setError("holder",!sy(n.state.data["sepa.ownerName"])),n.onChange()}))},n.handleIbanInput=function(e){var t=e.target.value,r=ry(t),a=ty(r),o=ly(a).status,i=e.target.selectionStart,l=n.state.data["sepa.ibanNumber"],s=function(e,t,r){if(0===e||!t.length)return 0;var a=t.length-r.length,n=a>0,o=function(e,t){return/\s/.test(e.charAt(t))},i=e-a;return n&&(o(t,i+1)||o(t,i))?e+1:!n&&o(t,e-1)?e-1:e}(i,a,l);n.setState((function(e){return{data:Ds(Ds({},e.data),{"sepa.ibanNumber":a}),errors:Ds(Ds({},e.errors),{iban:"invalid"===o?"sepaDirectDebit.ibanField.invalid":null}),valid:Ds(Ds({},e.valid),{iban:"valid"===o})}}),(function(){e.target.setSelectionRange(s,s),n.onChange()}))},n.handleIbanBlur=function(e){var t=e.target.value;if(t.length>0){var r=ly(t).status;n.setError("iban","valid"!==r?"sepaDirectDebit.ibanField.invalid":null)}},n.state={status:"ready",data:{"sepa.ownerName":(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.ownerName)||"","sepa.ibanNumber":(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.ibanNumber)||""},isValid:!1,cursor:0,errors:{},valid:{}},n.state.data["sepa.ibanNumber"]){var o=ry(n.state.data["sepa.ibanNumber"]);n.state.data["sepa.ibanNumber"]=ty(o)}if(n.state.data["sepa.ibanNumber"]||n.state.data["sepa.ownerName"]){var i=n.props.holderName?sy(n.state.data["sepa.ownerName"]):"",l=(n.state.data["sepa.ibanNumber"]?"valid"===ly(n.state.data["sepa.ibanNumber"]).status:"")&&i,s={data:n.state.data,isValid:l};n.props.onChange(s)}return n}return Fs(t,e),t.prototype.setStatus=function(e){this.setState({status:e})},t.prototype.onChange=function(){var e=this.props.holderName?sy(this.state.data["sepa.ownerName"]):"",t="valid"===ly(this.state.data["sepa.ibanNumber"]).status&&e,r={data:this.state.data,isValid:t};this.props.onChange(r)},t.prototype.showValidation=function(){var e=ly(this.state.data["sepa.ibanNumber"]).status,t=sy(this.state.data["sepa.ownerName"]);this.setError("iban","valid"!==e?"sepaDirectDebit.ibanField.invalid":null),this.setError("holder",!t||null)},t.prototype.render=function(e,t){var r=this,a=e.placeholders,n=e.countryCode,o=t.data,i=t.errors,l=t.valid,s=ad().i18n;return ec("div",{className:"adyen-checkout__iban-input"},this.props.holderName&&ec(wd,{className:"adyen-checkout__field--owner-name",label:s.get("sepa.ownerName"),filled:o["sepa.ownerName"]&&o["sepa.ownerName"].length,errorMessage:!!i.holder&&s.get("creditCard.holderName.invalid"),dir:"ltr"},Jd("text",{name:"sepa.ownerName",className:"adyen-checkout__iban-input__owner-name",placeholder:"ownerName"in a?a.ownerName:s.get("sepaDirectDebit.nameField.placeholder"),value:o["sepa.ownerName"],"aria-invalid":!!this.state.errors.holder,"aria-label":s.get("sepa.ownerName"),onInput:function(e){return r.handleHolderInput(e.target.value)}})),ec(wd,{className:"adyen-checkout__field--iban-number",label:s.get("sepa.ibanNumber"),errorMessage:!!i.iban&&s.get(i.iban),filled:o["sepa.ibanNumber"]&&o["sepa.ibanNumber"].length,isValid:l.iban,onBlur:this.handleIbanBlur,dir:"ltr"},Jd("text",{ref:function(e){r.ibanNumber=e},name:"sepa.ibanNumber",className:"adyen-checkout__iban-input__iban-number",classNameModifiers:["large"],placeholder:"ibanNumber"in a?a.ibanNumber:ny(n),value:o["sepa.ibanNumber"],onInput:this.handleIbanInput,"aria-invalid":!!this.state.errors.iban,"aria-label":s.get("sepa.ibanNumber"),autocorrect:"off",spellcheck:!1})),this.props.showPayButton&&this.props.payButton({status:this.state.status}))},t.defaultProps={onChange:function(){},countryCode:null,holderName:!0,placeholders:{}},t}(ac),dy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(e){return Ds({holderName:!0},e)},t.prototype.formatData=function(){return{paymentMethod:{type:t.type,iban:this.state.data["sepa.ibanNumber"],ownerName:this.state.data["sepa.ownerName"]}}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,Ds({},this.props,{loadingContext:this.props.loadingContext}),ec(cy,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="sepadirectdebit",t}(id),uy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.componentDidMount=function(){this.formEl.submit()},t.prototype.render=function(e){var t=this,r=e.name,a=e.action,n=e.target,o=e.inputName,i=e.inputValue;return ec("form",{ref:function(e){t.formEl=e},method:"POST",className:zc(["adyen-checkout__threeds2__form","adyen-checkout__threeds2__form--"+r]),name:r,action:a,target:n,style:{display:"none"}},ec("input",{name:o,value:i}))},t}(ac),py={result:{transStatus:"U"},type:"challengeResult"},my={result:{transStatus:"U"},type:"challengeResult",errorCode:"timeout"},hy={result:{threeDSCompInd:"N"},type:"fingerPrintResult"},fy={result:{threeDSCompInd:"N"},type:"fingerPrintResult",errorCode:"timeout"},yy="unknownError",by={timeout:"ThreeDS2 timed out",wrongOrigin:"Result came in the right format but not from the expected origin",HTMLElementError:"No proper HTML element was passed",wrongDataType:"Result data was not of the expected type",missingProperty:"Result data did not contain the expected properties",unknownError:"An unknown error occurred"},vy={"01":["250px","400px"],"02":["390px","400px"],"03":["500px","600px"],"04":["600px","400px"],"05":["100%","100%"]},gy=function(e){var t=kd.decode(e);try{return t&&JSON.parse(t)}catch(e){throw new Error("Could not decode token")}},ky=function(e){if(!e||!Object.keys(e).length)throw new Error("No (populated) data object to encode");return kd.encode(JSON.stringify(e))},Cy=function(e){var t=1===e.length?"0"+e:e;return Object.prototype.hasOwnProperty.call(vy,t)?t:"02"},_y=function(e,t,r){var a;return{data:(a={},a[e]=ky({threeDSCompInd:t.threeDSCompInd}),a.paymentData=r,a)}},Ny=function(e,t,r){return{data:{details:{"threeds2.fingerprint":ky(t)},paymentData:r}}},wy=function(e,t,r){var a;return{data:{details:(a={},a[e]=ky({transStatus:t,authorisationToken:r}),a)}}},Py=function(e,t,r){return{data:{details:{"threeds2.challengeResult":ky({transStatus:t})},paymentData:r}}},Fy=function(e){return{errorCode:e,message:by[e]||by[yy]}},Dy=function(e){var t=window.btoa(e).split("=")[0];return t=(t=t.replace(/\+/g,"-")).replace(/\//g,"_")},Sy=["elementRef"],xy=["createFromAction","onAdditionalDetails"],Ay="threeDSIframe",By=function(e){function t(t){var r=e.call(this,t)||this;r.iframeCallback=function(){r.setState({status:"iframeLoaded"})};var a=JSON.stringify(r.props.cReqData),n=Dy(a);return r.state={base64URLencodedData:n},r}return Fs(t,e),t.prototype.get3DS2ChallengePromise=function(){var e=this;return new Promise((function(t,r){e.processMessageHandler=hd(e.props.postMessageDomain,t,r,py,"challengeResult"),window.addEventListener("message",e.processMessageHandler)}))},t.prototype.componentDidMount=function(){var e=this;this.challengePromise=sd(6e5,this.get3DS2ChallengePromise(),my),this.challengePromise.promise.then((function(t){window.removeEventListener("message",e.processMessageHandler),e.props.onCompleteChallenge(t)})).catch((function(t){window.removeEventListener("message",e.processMessageHandler),e.props.onErrorChallenge(t)}))},t.prototype.componentWillUnmount=function(){this.challengePromise&&this.challengePromise.cancel(),window.removeEventListener("message",this.processMessageHandler)},t.prototype.render=function(e,t){var r=e.acsURL,a=e.cReqData,n=e.iframeSizeArr,o=t.base64URLencodedData,i=t.status,l=n[0],s=n[1];return ec("div",{className:zc(["adyen-checkout__threeds2__challenge","adyen-checkout__threeds2__challenge--"+a.challengeWindowSize])},"iframeLoaded"!==i&&ec(Mc,null),ec(ld,{name:Ay,width:l,height:s,callback:this.iframeCallback}),ec(uy,{name:"cReqForm",action:r,target:Ay,inputName:"creq",inputValue:o}))},t}(ac),Ty=function(e){function t(t){var r=e.call(this,t)||this;if(r.props.token){var a=function(e){var t,r=e.token,a=e.size,n=gy(r),o=n.acsTransID,i=n.acsURL,l=n.messageVersion,s=n.threeDSNotificationURL,c=n.threeDSServerTransID,d=fd(s);return{acsURL:i,cReqData:{acsTransID:o,messageVersion:l,threeDSServerTransID:c,messageType:"CReq",challengeWindowSize:Cy(a)},iframeSizeArr:(t=a,vy[Cy(t)]),postMessageDomain:d}}({token:r.props.token,size:r.props.challengeWindowSize||r.props.size});r.state={status:"retrievingChallengeToken",challengeData:a}}else r.state={status:"error"},r.props.onError("Missing challengeToken parameter");return r}return Fs(t,e),t.prototype.setStatusComplete=function(e){var t=this;this.setState({status:"complete"},(function(){var r=(t.props.useOriginalFlow?Py:wy)(t.props.dataKey,e.transStatus,t.props.paymentData);t.props.onComplete(r)}))},t.prototype.render=function(e,t){var r=this,a=t.challengeData;return"retrievingChallengeToken"===this.state.status?ec(By,Ds({onCompleteChallenge:function(e){r.setStatusComplete(e.result)},onErrorChallenge:function(e){var t=Fy(e.errorCode);r.props.onError(t),r.setStatusComplete(e.result)}},a)):null},t.defaultProps={onComplete:function(){},onError:function(){}},t}(ac),zy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.render=function(){return km(this.props.paymentData)?ec(Ty,Ds({},this.props,{onComplete:this.onComplete})):(this.props.onError({errorCode:"threeds2.challenge",message:"No paymentData received. Challenge cannot proceed"}),null)},t.type="threeDS2Challenge",t.defaultProps={dataKey:"threeDSResult",size:"02",type:"ChallengeShopper"},t}(id),My="threeDSMethodIframe",Iy=function(e){function t(t){var r=e.call(this,t)||this,a=r.props,n=a.threeDSServerTransID,o=a.threeDSMethodNotificationURL,i=JSON.stringify({threeDSServerTransID:n,threeDSMethodNotificationURL:o}),l=Dy(i);return r.state={base64URLencodedData:l},r}return Fs(t,e),t.prototype.get3DS2MethodPromise=function(){var e=this;return new Promise((function(t,r){e.processMessageHandler=hd(e.props.postMessageDomain,t,r,hy,"fingerPrintResult"),window.addEventListener("message",e.processMessageHandler)}))},t.prototype.componentDidMount=function(){var e=this;this.fingerPrintPromise=sd(1e4,this.get3DS2MethodPromise(),fy),this.fingerPrintPromise.promise.then((function(t){window.removeEventListener("message",e.processMessageHandler),e.props.onCompleteFingerprint(t)})).catch((function(t){window.removeEventListener("message",e.processMessageHandler),e.props.onErrorFingerprint(t)}))},t.prototype.componentWillUnmount=function(){this.fingerPrintPromise&&this.fingerPrintPromise.cancel(),window.removeEventListener("message",this.processMessageHandler)},t.prototype.render=function(e,t){var r=e.threeDSMethodURL,a=t.base64URLencodedData;return ec("div",{className:"adyen-checkout__3ds2-device-fingerprint"},this.props.showSpinner&&ec(Mc,null),ec("div",{style:{display:"none"}},ec(ld,{name:My}),ec(uy,{name:"threeDSMethodForm",action:r,target:My,inputName:"threeDSMethodData",inputValue:a})))},t.defaultProps={showSpinner:!0},t}(ac),jy=function(e){function t(t){var r=e.call(this,t)||this,a=r.props,n=a.token,o=a.notificationURL;if(n){var i=function(e){var t=e.token,r=e.notificationURL,a=gy(t),n=a.threeDSMethodNotificationURL,o=a.threeDSMethodUrl,i=r||n;return{threeDSServerTransID:a.threeDSServerTransID,threeDSMethodURL:o,threeDSMethodNotificationURL:i,postMessageDomain:fd(i)}}({token:n,notificationURL:o});r.state={status:"init",fingerPrintData:i}}else r.state={status:"error"},r.props.onError("Missing fingerprintToken parameter");return r}return Fs(t,e),t.prototype.componentDidMount=function(){this.state.fingerPrintData&&this.state.fingerPrintData.threeDSMethodURL&&this.state.fingerPrintData.threeDSMethodURL.length?this.setState({status:"retrievingFingerPrint"}):this.setStatusComplete({threeDSCompInd:"U"})},t.prototype.setStatusComplete=function(e){var t=this;this.setState({status:"complete"},(function(){var r=(t.props.useOriginalFlow?Ny:_y)(t.props.dataKey,e,t.props.paymentData);t.props.onComplete(r)}))},t.prototype.render=function(e,t){var r=this,a=t.fingerPrintData;return"retrievingFingerPrint"===this.state.status?ec(Iy,Ds({onCompleteFingerprint:function(e){r.setStatusComplete(e.result)},onErrorFingerprint:function(e){var t=Fy(e.errorCode);r.props.onError(t),r.setStatusComplete(e.result)},showSpinner:this.props.showSpinner},a)):null},t.type="scheme",t.defaultProps={onComplete:function(){},onError:function(){},paymentData:"",showSpinner:!0},t}(ac);function Oy(e){var t=this,r=e.data;rp({path:"v1/submitThreeDS2Fingerprint?token="+this.props.clientKey,loadingContext:this.props.loadingContext},Ds({},r)).then((function(e){var r,a,n,o=null!==(r=t.props.elementRef)&&void 0!==r?r:t;if(e.action||e.details){if("completed"===e.type){var i=e.details;return t.onComplete({data:{details:i}})}return"threeDS2"===(null===(a=e.action)||void 0===a?void 0:a.type)?o.handleAction(e.action,ym("challengeWindowSize").from(t.props)):"redirect"===(null===(n=e.action)||void 0===n?void 0:n.type)?o.handleAction(e.action):void 0}console.error("Handled Error::callSubmit3DS2Fingerprint::FAILED:: resData=",e)}))}var Ey=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.callSubmit3DS2Fingerprint=Oy.bind(t),t}return Fs(t,e),t.prototype.render=function(){return km(this.props.paymentData)?ec(jy,Ds({},this.props,{onComplete:this.props.useOriginalFlow?this.onComplete:this.callSubmit3DS2Fingerprint})):(this.props.onError({errorCode:t.defaultProps.dataKey,message:"No paymentData received. Fingerprinting cannot proceed"}),null)},t.type="threeDS2Fingerprint",t.defaultProps={dataKey:"fingerprintResult",type:"IdentifyShopper"},t}(id),Ry=function(e,t){if(void 0===t&&(t=2),0===t)return e;var r=String(e);return r.length>=t?r:("0".repeat(t)+r).slice(-1*t)},Ly=function(e,t){var r=new Date,a=t.getTime()-r.getTime(),n=a/1e3,o=function(e,t,r){var a=r.getTime()-e.getTime();return 100-Math.round(100*(t.getTime()-e.getTime())/a)}(e,r,t);return{total:a,minutes:Ry(Math.floor(n/60%60)),seconds:Ry(Math.floor(n%60)),completed:a<=0,percentage:o}},Vy=function(e){function t(t){var r=e.call(this,t)||this,a=6e4*r.props.minutesFromNow,n=(new Date).getTime();return r.state={startTime:new Date(n),endTime:new Date(n+a),minutes:"-",seconds:"-"},r}return Fs(t,e),t.prototype.tick=function(){var e=Ly(this.state.startTime,this.state.endTime);if(e.completed)return this.props.onCompleted(),this.clearInterval();var t={minutes:e.minutes,seconds:e.seconds,percentage:e.percentage};return this.setState(Ds({},t)),this.props.onTick(t),t},t.prototype.clearInterval=function(){clearInterval(this.interval),delete this.interval},t.prototype.componentDidMount=function(){var e=this;this.interval=setInterval((function(){e.tick()}),1e3)},t.prototype.componentWillUnmount=function(){this.clearInterval()},t.prototype.render=function(){return ec("span",{className:"adyen-checkout__countdown"},ec("span",{className:"countdown__minutes"},this.state.minutes),ec("span",{className:"countdown__separator"},":"),ec("span",{className:"countdown__seconds"},this.state.seconds))},t.defaultProps={onTick:function(){},onCompleted:function(){}},t}(ac);function Uy(e,t,r){if(!e||!t)throw new Error("Could not check the payment status");return rp({loadingContext:r,path:"services/PaymentInitiation/v1/status?clientKey="+t},{paymentData:e})}var Ky=function(e){switch(e.resultCode.toLowerCase()){case"refused":case"error":case"cancelled":return{type:"error",props:Ds(Ds({},e),{message:"error.subtitle.refused"})};case"unknown":return{type:"error",props:Ds(Ds({},e),{message:"error.message.unknown"})};case"pending":case"received":return{type:e.resultCode.toLowerCase(),props:e};case"authorised":default:return{type:"success",props:e}}},Hy=function(e){if(!e.type&&e.resultCode)return Ky(e);if(!e.type)return{type:"error",props:e};switch(e.type.toLowerCase()){case"pending":return{type:"pending",props:e};case"complete":return Ky(e);case"validation":default:return{type:"error",props:e}}},qy=function(e){function t(t){var r=e.call(this,t)||this;return r.statusInterval=function(){r.checkStatus(),r.setState({timePassed:r.state.timePassed+r.props.delay}),r.state.timePassed>=r.props.throttleTime&&r.setState({delay:r.props.throttledInterval})},r.redirectToApp=function(e,t){void 0===t&&(t=function(){}),setTimeout((function(){r.props.onError(r.props.type+" App was not found"),t()}),25),window.location.assign(e)},r.state={buttonStatus:"default",completed:!1,delay:t.delay,expired:!1,loading:!0,onError:function(){},percentage:100,timePassed:0},r.onTimeUp=r.onTimeUp.bind(r),r.onTick=r.onTick.bind(r),r.onComplete=r.onComplete.bind(r),r.onError=r.onError.bind(r),r.checkStatus=r.checkStatus.bind(r),r}return Fs(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,r=t.shouldRedirectOnMobile,a=t.url,n=window.matchMedia("(max-width: 768px)").matches&&/Android|iPhone|iPod/.test(navigator.userAgent),o=function(){e.interval=setInterval(e.statusInterval,e.state.delay)};r&&a&&n?this.redirectToApp(a,o):o()},t.prototype.componentDidUpdate=function(e,t){t.delay!==this.state.delay&&(clearInterval(this.interval),this.interval=setInterval(this.statusInterval,this.state.delay))},t.prototype.componentWillUnmount=function(){clearInterval(this.interval)},t.prototype.onTick=function(e){this.setState({percentage:e.percentage})},t.prototype.onTimeUp=function(){return this.setState({expired:!0}),clearInterval(this.interval),this.props.onError({type:"error",props:{errorMessage:"Payment Expired"}})},t.prototype.onComplete=function(e){return clearInterval(this.interval),this.setState({completed:!0,loading:!1}),this.props.onComplete({data:{details:{payload:e.props.payload},paymentData:this.props.paymentData}}),e},t.prototype.onError=function(e){return clearInterval(this.interval),this.setState({expired:!0,loading:!1}),this.props.onComplete({data:{details:{payload:e.props.payload},paymentData:this.props.paymentData}}),e},t.prototype.checkStatus=function(){var e=this,t=this.props;return Uy(t.paymentData,t.clientKey,t.loadingContext).then(Hy).catch((function(e){return{type:"network-error",props:e}})).then((function(t){switch(t.type){case"success":return e.onComplete(t);case"error":return e.onError(t);default:e.setState({loading:!1})}return t}))},t.prototype.render=function(e,t){var r=this,a=e.amount,n=e.url,o=e.brandLogo,i=e.countdownTime,l=e.i18n,s=e.loadingContext,c=e.type,d=t.expired,u=t.completed,p=t.loading,m=this.props.qrCodeData?s+"barcode.shtml?barcodeType=qrCode&fileType=png&data="+this.props.qrCodeData:this.props.qrCodeImage,h=function(e,t){return ec("div",{className:"adyen-checkout__qr-loader adyen-checkout__qr-loader--result"},ec("img",{className:"adyen-checkout__qr-loader__icon adyen-checkout__qr-loader__icon--result",src:Sc({loadingContext:s,imageFolder:"components/"})(e),alt:l.get(t)}),ec("div",{className:"adyen-checkout__qr-loader__subtitle adyen-checkout__qr-loader__subtitle--result"},l.get(t)))};if(d)return h("error","error.subtitle.payment");if(u)return h("success","creditCard.success");if(p)return ec("div",{className:"adyen-checkout__qr-loader"},o&&ec("img",{alt:c,src:o,className:"adyen-checkout__qr-loader__brand-logo"}),ec(Mc,null));var f=l.get("wechatpay.timetopay").split("%@");return ec("div",{className:"\n                    adyen-checkout__qr-loader\n                    adyen-checkout__qr-loader--"+c+"\n                    "+this.props.classNameModifiers.map((function(e){return"adyen-checkout__qr-loader--"+e}))+"\n                "},o&&ec("img",{src:o,alt:c,className:"adyen-checkout__qr-loader__brand-logo"}),ec("div",{className:"adyen-checkout__qr-loader__subtitle"},l.get(this.props.introduction)),ec("img",{src:m,alt:l.get("wechatpay.scanqrcode")}),a&&a.value&&a.currency&&ec("div",{className:"adyen-checkout__qr-loader__payment_amount"},l.amount(a.value,a.currency)),ec("div",{className:"adyen-checkout__qr-loader__progress"},ec("span",{className:"adyen-checkout__qr-loader__percentage",style:{width:this.state.percentage+"%"}})),ec("div",{className:"adyen-checkout__qr-loader__countdown"},f[0],"\xa0",ec(Vy,{minutesFromNow:i,onTick:this.onTick,onCompleted:this.onTimeUp}),"\xa0",f[1]),this.props.instructions&&ec("div",{className:"adyen-checkout__qr-loader__instructions"},l.get(this.props.instructions)),this.props.copyBtn&&ec("div",{className:"adyen-checkout__qr-loader__actions"},ec(nd,{inline:!0,secondary:!0,onClick:function(e,t){var a=t.complete;Pf(r.props.qrCodeData),a()},icon:Sc({loadingContext:s,imageFolder:"components/"})("copy"),label:l.get("button.copy")})),n&&ec("div",{className:"adyen-checkout__qr-loader__app-link"},ec("span",{className:"adyen-checkout__qr-loader__separator__label"},l.get("or")),ec(nd,{classNameModifiers:["qr-loader"],onClick:function(){return r.redirectToApp(n)},label:l.get("openApp")})))},t.defaultProps={delay:2e3,countdownTime:15,onError:function(){},onComplete:function(){},throttleTime:6e4,classNameModifiers:[],throttledInterval:1e4,introduction:"wechatpay.scanqrcode"},t}(ac),Gy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatData=function(){return{paymentMethod:Ds({type:this.props.type||this.constructor.type},this.state.data)}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return this.props.paymentData?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(qy,Ds({ref:function(t){e.componentRef=t}},this.props,{shouldRedirectOnMobile:this.props.shouldRedirectOnMobile,type:this.constructor.type,brandLogo:this.props.brandLogo||this.icon,delay:this.props.delay,onComplete:this.onComplete,countdownTime:this.props.countdownTime,instructions:this.props.instructions}))):this.props.showPayButton?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(sf,{name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:function(t){e.componentRef=t}})):null},t.defaultProps={qrCodeImage:"",amount:null,paymentData:null,onError:function(){},onComplete:function(){}},t}(id),Yy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds({delay:2e3,countdownTime:15},e.prototype.formatProps.call(this,t))},t.type="wechatpayQR",t}(Gy),Wy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){var r=window.matchMedia("(max-width: 768px)").matches&&/Android|iPhone|iPod/.test(navigator.userAgent);return Ds({delay:2e3,countdownTime:15,shouldRedirectOnMobile:!0,buttonLabel:r?"openApp":"generateQRCode"},e.prototype.formatProps.call(this,t))},t.type="bcmc_mobile",t}(Gy),Jy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="molpay_ebanking_fpx_MY",t}(Gp),Zy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="molpay_ebanking_TH",t}(Gp),Qy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="molpay_ebanking_VN",t}(Gp),$y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="openbanking_UK",t}(Gp);function Xy(e){var t=ad().i18n,r=function(){return["dragonpay_ebanking","dragonpay_otc_banking","dragonpay_otc_non_banking"].indexOf(e.type)>-1},a=nu({schema:Bs(Bs([],r()?["issuer"]:[]),["shopperEmail"]),rules:{issuer:{validate:function(e){return r()&&!!e},modes:["input","blur"]}}}),n=a.handleChangeFor,o=a.triggerValidation,i=a.data,l=a.valid,s=a.errors,c=a.isValid,d=qp({},e.type),u=e.items.map((function(e){return Ds(Ds({},e),{icon:d(e.id&&e.id.toLowerCase())})})),p=function(e){return"dragonpay_otc_non_banking"===e?"dragonpay.voucher.non.bank.selectField.placeholder":"dragonpay.voucher.bank.selectField.placeholder"};qc((function(){e.onChange({isValid:c,data:i,valid:l,errors:s})}),[c,i,l,s]);var m=Kc("ready"),h=m[0],f=m[1];return this.setStatus=f,this.showValidation=o,ec("div",{className:"adyen-checkout__dragonpay-input__field"},ec(wd,{label:t.get("shopperEmail"),errorMessage:!!s.shopperEmail},Jd("emailAddress",{name:"dragonpay.shopperEmail",autoCorrect:"off",value:i.shopperEmail,className:"adyen-checkout__input--large",spellCheck:!1,onInput:n("shopperEmail","input"),onChange:n("shopperEmail","blur")})),r()&&ec(wd,{label:t.get(p(e.type)),errorMessage:!!s.issuer},Jd("select",{items:u,selected:i.issuer,placeholder:t.get(p(e.type)),name:"issuer",className:"adyen-checkout__dropdown--large adyen-checkout__issuer-list__dropdown",onChange:n("issuer")})),e.showPayButton&&e.payButton({status:h,label:t.get("confirmPurchase")}))}function eb(e){var t=e.reference,r=e.totalAmount,a=e.surcharge,n=e.expiresAt,o=e.alternativeReference,i=e.instructionsUrl,l=e.icon,s=e.issuer,c=e.paymentMethodType,d=ad(),u=d.loadingContext,p=d.i18n,m=qp({loadingContext:u},c)(s.toLowerCase());return ec(Ff,{reference:t,paymentMethodType:c,introduction:p.get("voucher.introduction"),imageUrl:l,issuerImageUrl:m,instructionsUrl:i,amount:r&&p.amount(r.value,r.currency),surcharge:a&&p.amount(a.value,a.currency),voucherDetails:[{label:p.get("voucher.expirationDate"),value:p.date(n)},{label:p.get("voucher.alternativeReference"),value:o}],copyBtn:!0})}Xy.defaultProps={data:{},items:[],onChange:function(){}};var tb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatData=function(){var e=this.state.data,r=e.issuer,a=e.shopperEmail;return Ds(Ds({},a&&{shopperEmail:a}),{paymentMethod:Ds(Ds({},r&&{issuer:r}),{type:this.props.type||t.type})})},t.prototype.formatProps=function(e){var t,r,a;return Ds(Ds({},e),{issuers:null!==(a=null===(r=null===(t=e.details)||void 0===t?void 0:t.find((function(e){return"issuer"===e.key})))||void 0===r?void 0:r.items)&&void 0!==a?a:e.issuers})},t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.reference?ec(eb,Ds({ref:function(t){e.componentRef=t},icon:this.icon},this.props)):ec(Xy,Ds({ref:function(t){e.componentRef=t},items:this.props.issuers},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="dragonpay",t}(id);function rb(e){var t=Yc(null),r=ad().i18n,a=Kc("ready"),n=a[0],o=a[1];return this.setStatus=o,this.showValidation=function(){t.current&&t.current.showValidation()},ec("div",{className:"adyen-checkout__doku-input__field"},ec(bu,{data:e.data,requiredFields:["firstName","lastName","shopperEmail"],onChange:e.onChange,namePrefix:"doku",ref:t}),e.showPayButton&&e.payButton({status:n,label:r.get("confirmPurchase")}))}var ab=function(e){var t=e.reference,r=e.expiresAt,a=e.instructionsUrl,n=e.shopperName,o=e.merchantName,i=e.totalAmount,l=e.paymentMethodType,s=ad(),c=s.loadingContext,d=s.i18n;return ec(Ff,{paymentMethodType:l,reference:t,introduction:d.get("voucher.introduction.doku"),imageUrl:Sc({loadingContext:c})(l),instructionsUrl:a,amount:i&&d.amount(i.value,i.currency),voucherDetails:[{label:d.get("voucher.expirationDate"),value:d.date(r)},{label:d.get("voucher.shopperName"),value:n},{label:d.get("voucher.merchantName"),value:o}],copyBtn:!0})},nb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatData=function(){return Ds(Ds({},this.state.data),{paymentMethod:{type:this.props.type||t.type}})},Object.defineProperty(t.prototype,"icon",{get:function(){return Sc({loadingContext:this.props.loadingContext})(this.props.type)},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.reference?ec(ab,Ds({ref:function(t){e.componentRef=t}},this.props)):ec(rb,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="doku",t}(id),ob={socialSecurityNumber:{validate:Hh,errorMessage:"",modes:["blur"]},default:{validate:function(e){return!!e&&e.length>0},errorMessage:"",modes:["blur"]}},ib={socialSecurityNumber:function(e){return Kh(e)}};function lb(e){var t=e.errors,r=e.value,a=e.onInput,n=e.onChange,o=ad().i18n,i=Kc(!1),l=i[0],s=i[1];return ec("div",{className:zc("adyen-checkout__fieldset","adyen-checkout__fieldset--sendCopyToEmail",e.classNames)},ec(wd,{classNameModifiers:["sendCopyToEmail"]},Jd("boolean",{onChange:function(t){s(t.target.checked),e.onToggle(l)},label:o.get("boleto.sendCopyToEmail"),name:"sendCopyToEmail",value:l})),l&&ec(wd,{label:o.get("shopperEmail"),classNameModifiers:["shopperEmail"],errorMessage:t},Jd("emailAddress",{name:"shopperEmail",autoCorrect:"off",spellCheck:!1,value:r,onInput:a,onChange:n})))}function sb(e){var t=ad().i18n,r=Yc(null),a=nu({schema:["firstName","lastName","socialSecurityNumber","billingAddress","shopperEmail"],defaultData:e.data,rules:ob,formatters:ib}),n=a.handleChangeFor,o=a.triggerValidation,i=a.setSchema,l=a.setData,s=a.setValid,c=a.setErrors,d=a.data,u=a.valid,p=a.errors,m=a.isValid,h=Kc(!1),f=h[0],y=h[1];qc((function(){var t=Bs(Bs(Bs([],e.personalDetailsRequired?["firstName","lastName","socialSecurityNumber"]:[]),e.billingAddressRequired?["billingAddress"]:[]),f?["shopperEmail"]:[]);i(t)}),[f,e.personalDetailsRequired,e.billingAddressRequired]);var b=Kc("ready"),v=b[0],g=b[1];this.setStatus=g,this.showValidation=function(){o(),e.billingAddressRequired&&r.current.showValidation()},qc((function(){var t=!e.billingAddressRequired||Boolean(u.billingAddress);e.onChange({data:d,valid:u,errors:p,isValid:m&&t})}),[d,u,p]);var k=Bs([],e.personalDetailsRequired||e.billingAddressRequired||e.showEmailAddress?[]:["standalone"]);return ec("div",{className:"adyen-checkout__boleto-input__field"},e.personalDetailsRequired&&ec("div",{className:"adyen-checkout__fieldset adyen-checkout__fieldset--address adyen-checkout__fieldset--personalDetails"},ec("div",{className:"adyen-checkout__fieldset__title"},t.get("personalDetails")),ec("div",{className:"adyen-checkout__fieldset__fields"},ec(wd,{label:t.get("firstName"),classNameModifiers:["firstName","col-50"],errorMessage:!!p.firstName},Jd("text",{name:"firstName",autocorrect:"off",spellcheck:!1,value:d.firstName,onInput:n("firstName","input"),onChange:n("firstName")})),ec(wd,{label:t.get("lastName"),classNameModifiers:["lastName","col-50"],errorMessage:!!p.lastName},Jd("text",{name:"lastName",autocorrect:"off",spellcheck:!1,value:d.lastName,onInput:n("lastName","input"),onChange:n("lastName")})),ec(Lh,{data:d.socialSecurityNumber,error:p.socialSecurityNumber,valid:u.socialSecurityNumber,onInput:n("socialSecurityNumber","input"),onChange:n("socialSecurityNumber")}))),e.billingAddressRequired&&ec(sp,{allowedCountries:["BR"],label:"billingAddress",data:Ds(Ds({},e.data.billingAddress),{country:"BR"}),onChange:function(e){l("billingAddress",e.data),s("billingAddress",e.isValid),c("billingAddress",e.errors)},requiredFields:["country","street","houseNumberOrName","postalCode","city","stateOrProvince"],ref:r}),e.showEmailAddress&&ec(lb,{value:d.shopperEmail,errors:p.shopperEmail,onToggle:function(){return y(!f)},onInput:n("shopperEmail","input"),onChange:n("shopperEmail")}),e.showPayButton&&e.payButton({status:v,label:t.get("boletobancario.btnLabel"),classNameModifiers:k}))}sb.defaultProps={data:{},showEmailAddress:!0,personalDetailsRequired:!0,billingAddressRequired:!0};var cb=function(e){var t=ad(),r=t.i18n,a=t.loadingContext,n=e.reference,o=e.expiresAt,i=e.totalAmount,l=e.paymentMethodType,s=e.downloadUrl,c=n.replace(/[^\d]/g,"").replace(/^(\d{4})(\d{5})\d{1}(\d{10})\d{1}(\d{10})\d{1}(\d{15})$/,"$1$5$2$3$4");return ec(Ff,{reference:n,paymentMethodType:"boletobancario",barcode:a+"barcode.shtml?data="+c+"&barcodeType=BT_Int2of5A&fileType=png",introduction:r.get("voucher.introduction"),imageUrl:Sc({loadingContext:a})(l),amount:i&&r.amount(i.value,i.currency),voucherDetails:[{label:r.get("voucher.expirationDate"),value:r.date(o)}],downloadUrl:s,copyBtn:!0})},db=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRef=function(e){t.componentRef=e},t}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatData=function(){var e=this.state.data,r=void 0===e?{}:e,a=r.billingAddress,n=r.shopperEmail,o=r.firstName,i=r.lastName,l=r.socialSecurityNumber,s=void 0===l?"":l;return Ds(Ds(Ds(Ds({paymentMethod:{type:this.props.type||t.type}},a&&{billingAddress:a}),n&&{shopperEmail:n}),o&&i&&{shopperName:{firstName:o,lastName:i}}),s&&{socialSecurityNumber:Uh(s)})},t.prototype.render=function(){return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.reference?ec(cb,Ds({ref:this.handleRef,icon:this.icon},this.props)):ec(sb,Ds({ref:this.handleRef},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="boletobancario",t}(id),ub=function(e){var t=ad(),r=t.i18n,a=t.loadingContext,n=e.alternativeReference,o=e.reference,i=e.expiresAt,l=e.merchantReference,s=e.totalAmount,c=e.paymentMethodType,d=e.downloadUrl,u=a+"barcode.shtml?data="+o+"&barcodeType=BT_Code128C&fileType=png",p=Bs(Bs(Bs([],i?[{label:r.get("voucher.expirationDate"),value:r.date(i)}]:[]),l?[{label:r.get("voucher.shopperReference"),value:l}]:[]),n?[{label:r.get("voucher.alternativeReference"),value:n}]:[]);return ec(Ff,{amount:s&&r.amount(s.value,s.currency),barcode:u,copyBtn:!0,downloadUrl:d,imageUrl:Sc({loadingContext:a})(c),introduction:r.get("voucher.introduction"),paymentMethodType:"oxxo",reference:o,voucherDetails:p})},pb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRef=function(e){t.componentRef=e},t}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.formatProps=function(e){return Ds(Ds({},e),{name:"Oxxo"})},t.prototype.formatData=function(){return{paymentMethod:{type:this.props.type||t.type}}},t.prototype.render=function(){return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.reference?ec(ub,Ds({ref:this.handleRef},this.props)):this.payButton(Ds(Ds({},this.props),{classNameModifiers:["standalone"],label:this.props.i18n.get("continueTo")+" "+this.props.name,onClick:this.submit})))},t.type="oxxo",t}(id),mb=function(e){var t=ad(),r=t.i18n,a=t.loadingContext,n=e.entity,o=e.reference,i=e.expiresAt,l=e.merchantReference,s=e.totalAmount,c=e.paymentMethodType,d=e.downloadUrl,u=Bs(Bs(Bs([],n?[{label:r.get("voucher.entity"),value:n}]:[]),i?[{label:r.get("voucher.expirationDate"),value:r.date(i)}]:[]),l?[{label:r.get("voucher.shopperReference"),value:l}]:[]);return ec(Ff,{amount:s&&r.amount(s.value,s.currency),barcode:null,copyBtn:!0,downloadUrl:d,imageUrl:Sc({loadingContext:a})(c),introduction:r.get("voucher.introduction"),paymentMethodType:"multibanco",reference:o,voucherDetails:u})},hb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRef=function(e){t.componentRef=e},t}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.formatProps=function(e){return Ds(Ds({},e),{name:e.name||"Multibanco"})},t.prototype.formatData=function(){return{paymentMethod:{type:this.props.type||t.type}}},t.prototype.render=function(){var e=this;return this.props.reference?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(mb,Ds({ref:this.handleRef},this.props))):this.props.showPayButton?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(sf,{name:this.displayName,amount:this.props.amount,payButton:this.payButton,onSubmit:this.submit,ref:function(t){e.componentRef=t}})):null},t.type="multibanco",t.defaultProps={showPayButton:!0},t}(id),fb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="dotpay",t}(Gp),yb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{showImage:!1})},t.type="eps",t}(Gp);function bb(e){var t=e.children,r=e.classNames,a=void 0===r?[]:r,n=e.type,o=void 0===n?"error":n,i=e.icon;return ec("div",{className:zc("adyen-checkout__alert-message","adyen-checkout__alert-message--"+o,a)},i&&ec(Nd,{className:"adyen-checkout__alert-message__icon",type:i}),t)}function vb(e){e.brand;var t=e.amount,r=e.balance,a=e.transactionLimit,n=Ss(e,["brand","amount","balance","transactionLimit"]),o=ad().i18n,i=t.value>(null==a?void 0:a.value)?a:t,l=(null==r?void 0:r.value)-(null==i?void 0:i.value);return ec("div",{className:"adyen-checkout__giftcard-result"},ec("ul",{className:"adyen-checkout__giftcard-result__balance"},ec("li",{className:"adyen-checkout__giftcard-result__balance__item"},ec("span",{className:"adyen-checkout__giftcard-result__balance__title"},o.get("giftcardBalance")),ec("span",{className:"adyen-checkout__giftcard-result__balance__value adyen-checkout__giftcard-result__balance__value--amount"},o.amount(r.value,r.currency))),a&&ec("li",{className:"adyen-checkout__giftcard-result__balance__item"},ec("span",{className:"adyen-checkout__giftcard-result__balance__title adyen-checkout__giftcard-result__balance__title--transactionLimit"},o.get("giftcardTransactionLimit",{values:{amount:o.amount(a.value,a.currency)}})))),this.props.showPayButton&&this.props.payButton({amount:i,status:n.status,onClick:n.onSubmit}),ec("p",{className:"adyen-checkout__giftcard-result__remaining-balance"},o.get("partialPayment.remainingBalance",{values:{amount:o.amount(l,r.currency)}})))}var gb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={status:"ready",data:{},balance:null,transactionLimit:null,focusedElement:!1,isValid:!1},t.onChange=function(e){t.props.onChange({data:e.data,isValid:e.isSfpValid})},t.showValidation=function(){t.sfp.showValidation()},t.handleFocus=function(e){t.setState({focusedElement:e.currentFocusObject}),!0===e.focus?t.props.onFocus(e):t.props.onBlur(e)},t.setBalance=function(e){var r=e.balance,a=e.transactionLimit;t.setState({balance:r,transactionLimit:a})},t}return Fs(t,e),t.prototype.setStatus=function(e){this.setState({status:e})},t.prototype.render=function(e,t){var r,a=this,n=t.focusedElement,o=t.balance,i=t.transactionLimit,l=ad().i18n,s=(null==i?void 0:i.value)<(null==o?void 0:o.value)?i:o,c=(null==s?void 0:s.value)>=(null===(r=this.props.amount)||void 0===r?void 0:r.value);if(s&&c)return ec(vb,Ds({balance:o,transactionLimit:i,onSubmit:e.onSubmit},e));var d=function(e){if(e.errors.encryptedCardNumber)return l.get("error.va.gen.01");switch(a.state.status){case"no-balance":return l.get("error.giftcard.no-balance");case"card-error":return l.get("error.giftcard.card-error");case"currency-error":return l.get("error.giftcard.currency-error");default:return null}};return ec("div",{className:"adyen-checkout__giftcard"},"error"===this.state.status&&ec(bb,{icon:"cross"},l.get("error.message.unknown")),ec(Ch,Ds({},this.props,{ref:function(e){a.sfp=e},onChange:this.onChange,onFocus:this.handleFocus,type:tm,render:function(t,r){var a=t.setRootNode,o=t.setFocusOn;return ec("div",{ref:a,className:"adyen-checkout__field-wrapper"},ec(wd,{label:l.get("creditCard.numberField.title"),classNameModifiers:Bs(["number"],e.pinRequired?["70"]:["100"]),errorMessage:d(r),focused:"encryptedCardNumber"===n,onFocusField:function(){return o("encryptedCardNumber")},dir:"ltr"},ec("span",{"data-cse":"encryptedCardNumber","data-info":'{"length":"15-32", "maskInterval":4}',className:zc({"adyen-checkout__input":!0,"adyen-checkout__input--large":!0,"adyen-checkout__card__cardNumber__input":!0,"adyen-checkout__input--error":d(r),"adyen-checkout__input--focus":"encryptedCardNumber"===n})})),e.pinRequired&&ec(wd,{label:l.get("creditCard.pin.title"),classNameModifiers:["pin","30"],errorMessage:r.errors.encryptedSecurityCode&&l.get(r.errors.encryptedSecurityCode),focused:"encryptedSecurityCode"===n,onFocusField:function(){return o("encryptedSecurityCode")},dir:"ltr"},ec("span",{"data-cse":"encryptedSecurityCode","data-info":'{"length":"3-10", "maskInterval": 0}',className:zc({"adyen-checkout__input":!0,"adyen-checkout__input--large":!0,"adyen-checkout__card__cvc__input":!0,"adyen-checkout__input--error":r.errors.encryptedSecurityCode,"adyen-checkout__input--focus":"encryptedSecurityCode"===n})})))}})),this.props.showPayButton&&this.props.payButton({status:this.state.status,onClick:this.props.onBalanceCheck,label:l.get("applyGiftcard")}))},t.defaultProps={pinRequired:!0,onChange:function(){},onFocus:function(){},onBlur:function(){}},t}(ac),kb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onBalanceCheck=function(){return t.props.onBalanceCheck?t.isValid?new Promise((function(e,r){t.setStatus("loading"),t.props.onBalanceCheck(e,r,t.formatData())})).then((function(e){var r,a=e.balance,n=e.transactionLimit;if(!a)throw new Error("card-error");if((null==a?void 0:a.currency)!==(null===(r=t.props.amount)||void 0===r?void 0:r.currency))throw new Error("currency-error");if((null==a?void 0:a.value)<=0)throw new Error("no-balance");if(t.componentRef.setBalance({balance:a,transactionLimit:n}),t.props.amount.value>a.value||t.props.amount.value>n.value)return t.props.order?t.submit():t.onOrderRequest(t.data)})).catch((function(e){t.setStatus((null==e?void 0:e.message)||"error"),t.props.onError&&t.props.onError(e)})):(t.showValidation(),!1):t.submit()},t.onOrderRequest=function(e){return new Promise((function(r,a){t.props.onOrderRequest(r,a,e)})).then((function(e){t.setState({order:{orderData:e.orderData,pspReference:e.pspReference}}),t.submit()}))},t.payButton=function(e){return ec(od,Ds({},e))},t}return Fs(t,e),t.prototype.formatProps=function(e){return Ds(Ds({},null==e?void 0:e.configuration),e)},t.prototype.formatData=function(){var e,t;return{paymentMethod:{type:this.constructor.type,brand:this.props.brand,encryptedCardNumber:null===(e=this.state.data)||void 0===e?void 0:e.encryptedCardNumber,encryptedSecurityCode:null===(t=this.state.data)||void 0===t?void 0:t.encryptedSecurityCode}}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){var e;return(null===(e=this.props.brandsConfiguration[this.props.brand])||void 0===e?void 0:e.icon)||this.props.icon||Sc({loadingContext:this.props.loadingContext})(this.props.brand)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(gb,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onBalanceCheck:this.onBalanceCheck,onSubmit:this.submit,payButton:this.payButton})))},t.type="giftcard",t.defaultProps={brandsConfiguration:{}},t}(id),Cb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.type="vipps",t.defaultProps={type:t.type,showPayButton:!0,name:"Vipps"},t}(cf),_b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{showImage:!1})},t.type="payu_IN_cashcard",t}(Gp),Nb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{showImage:!1})},t.type="payu_IN_nb",t}(Gp),wb=["AT","CH","DE","NL"],Pb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:t.countryCode?[t.countryCode]:wb})},t.type="ratepay",t}(hp),Fb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds({shouldRedirectOnMobile:!0,delay:2e3,countdownTime:15,instructions:"swish.pendingMessage"},e.prototype.formatProps.call(this,t))},t.type="swish",t}(Gy),Db={isDropin:!0,onReady:function(){},onComplete:function(){},onCancel:function(){},onError:function(){},onSelect:function(){},onDisableStoredPaymentMethod:null,onChange:function(){},onSubmit:function(){},onAdditionalDetails:function(){},amount:{},installmentOptions:{},paymentMethodsConfiguration:{},openFirstPaymentMethod:!0,openFirstStoredPaymentMethod:!0,showStoredPaymentMethods:!0,showPaymentMethods:!0,showRemoveStoredPaymentMethodButton:!1,showPayButton:!0},Sb=function(e){var t=e.paymentMethodComponent,r=e.isLoaded;return t&&r?ec("div",{className:"adyen-checkout__payment-method__details__content"},t):null},xb={"adyen-checkout__payment-methods-list":"DropinComponent-module_adyen-checkout__payment-methods-list__2T9kQ","adyen-checkout__payment-method":"DropinComponent-module_adyen-checkout__payment-method__2ZClo","adyen-checkout__payment-method__details":"DropinComponent-module_adyen-checkout__payment-method__details__2_jFP","adyen-checkout__payment-method__image":"DropinComponent-module_adyen-checkout__payment-method__image__Fg2uw","adyen-checkout__payment-method__image__wrapper":"DropinComponent-module_adyen-checkout__payment-method__image__wrapper__pTTKr","adyen-checkout__payment-method--selected":"DropinComponent-module_adyen-checkout__payment-method--selected__1zXEA"},Ab=["googlepay","paywithgoogle"],Bb=function(e){var t=e.src,r=e.name,a=e.type,n=e.disabled,o=void 0!==n&&n;return ec("span",{className:zc("adyen-checkout__payment-method__image__wrapper",xb["adyen-checkout__payment-method__image__wrapper"],{"adyen-checkout__payment-method__image__wrapper--outline":!Ab.includes(a),"adyen-checkout__payment-method__image__wrapper--disabled":!!o}),"aria-hidden":"true"},ec(Ud,{className:"adyen-checkout__payment-method__image "+xb["adyen-checkout__payment-method__image"],src:t,alt:r,"aria-label":r,focusable:"false"}))},Tb=function(e){var t=e.id,r=e.open,a=e.onDisable,n=e.onCancel,o=ad().i18n;return ec("div",{id:t,"aria-hidden":!r,className:zc({"adyen-checkout__payment-method__disable-confirmation":!0,"adyen-checkout__payment-method__disable-confirmation--open":r})},ec("div",{className:"adyen-checkout__payment-method__disable-confirmation__content"},o.get("storedPaymentMethod.disable.confirmation"),ec("div",{className:"adyen-checkout__payment-method__disable-confirmation__buttons"},ec("button",{className:zc("adyen-checkout__button","adyen-checkout__payment-method__disable-confirmation__button","adyen-checkout__payment-method__disable-confirmation__button--remove"),disabled:!r,onClick:a},o.get("storedPaymentMethod.disable.confirmButton")),ec("button",{className:zc("adyen-checkout__button","adyen-checkout__payment-method__disable-confirmation__button","adyen-checkout__payment-method__disable-confirmation__button--cancel"),disabled:!r,onClick:n},o.get("storedPaymentMethod.disable.cancelButton")))))},zb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={showDisableStoredPaymentMethodConfirmation:!1},t.isMouseDown=!1,t.onFocus=function(){t.isMouseDown||t.props.onSelect()},t.onMouseDown=function(){t.isMouseDown=!0},t.onMouseUp=function(){t.isMouseDown=!1},t.toggleDisableConfirmation=function(){t.setState({showDisableStoredPaymentMethodConfirmation:!t.state.showDisableStoredPaymentMethodConfirmation})},t.onDisableStoredPaymentMethod=function(){t.props.onDisableStoredPaymentMethod(t.props.paymentMethod),t.toggleDisableConfirmation()},t}return Fs(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.paymentMethod.eventEmitter.on("brand",(function(t){e.setState({activeBrand:t.brand})}))},t.prototype.componentWillUnmount=function(){var e=this;this.props.paymentMethod.eventEmitter.off("brand",(function(t){e.setState({activeBrand:t.brand})}))},t.prototype.render=function(e,t){var r,a,n=e.paymentMethod,o=e.isSelected,i=e.isDisabling,l=e.isLoaded,s=e.isLoading,c=e.onSelect,d=e.standalone,u=t.activeBrand,p=void 0===u?null:u,m=ad().i18n;if(!n)return null;var h=zc(((r={"adyen-checkout__payment-method":!0})[xb["adyen-checkout__payment-method"]]=!0,r["adyen-checkout__payment-method--"+n.props.type]=!0,r["adyen-checkout__payment-method--"+(null!==(a=n.props.fundingSource)&&void 0!==a?a:"credit")]=!0,r["adyen-checkout__payment-method--selected"]=o,r[xb["adyen-checkout__payment-method--selected"]]=o,r["adyen-checkout__payment-method--loading"]=s,r["adyen-checkout__payment-method--disabling"]=i,r["adyen-checkout__payment-method--confirming"]=this.state.showDisableStoredPaymentMethodConfirmation,r["adyen-checkout__payment-method--standalone"]=d,r[xb["adyen-checkout__payment-method--loading"]]=s,r[n._id]=!0,r[this.props.className]=!0,r)),f=this.props.showRemovePaymentMethodButton&&n.props.oneClick&&o,y="remove-"+n._id,b=!n.props.oneClick&&n.brands&&n.brands.length>0;return ec("li",{key:n._id,className:h,onFocus:this.onFocus,onClick:c,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,tabIndex:s?-1:0},ec("div",{className:"adyen-checkout__payment-method__header"},ec("div",{className:"adyen-checkout__payment-method__header__title"},ec("span",{className:zc({"adyen-checkout__payment-method__radio":!0,"adyen-checkout__payment-method__radio--selected":o}),"aria-hidden":"true"}),ec(Bb,{name:n.displayName,type:n.type,src:n.icon}),ec("span",{className:zc({"adyen-checkout__payment-method__name":!0,"adyen-checkout__payment-method__name--selected":o}),"aria-hidden":"true"},n.displayName)),f&&ec("button",{type:"button",className:"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link",onClick:this.toggleDisableConfirmation,"aria-expanded":this.state.showDisableStoredPaymentMethodConfirmation,"aria-controls":y},m.get("storedPaymentMethod.disable.button")),b&&ec("span",{className:"adyen-checkout__payment-method__brands"},n.brands.map((function(e){return ec(Bb,{key:e.name,name:e.name,type:e.name,disabled:p&&e.name!==p,src:e.icon})})))),ec("div",{className:"adyen-checkout__payment-method__details "+xb["adyen-checkout__payment-method__details"]},f&&ec(Tb,{id:y,open:this.state.showDisableStoredPaymentMethodConfirmation,onDisable:this.onDisableStoredPaymentMethod,onCancel:this.toggleDisableConfirmation}),ec(Sb,{paymentMethodComponent:n.render(),isLoaded:l})))},t.defaultProps={paymentMethod:null,isSelected:!1,isLoaded:!1,isLoading:!1,showDisableStoredPaymentMethodConfirmation:!1,onSelect:function(){}},t}(ac),Mb=function(e){var t,r=e.order,a=e.orderStatus,n=e.onOrderCancel,o=ad(),i=o.loadingContext,l=o.i18n;return ec("div",null,ec("ul",{className:"adyen-checkout__order-payment-methods-list"},null===(t=null==a?void 0:a.paymentMethods)||void 0===t?void 0:t.map((function(e,t){return ec("li",{key:e.type+"-"+t,className:"adyen-checkout__order-payment-method"},ec("div",{className:"adyen-checkout__order-payment-method__header"},ec("div",{className:"adyen-checkout__payment-method__header__title"},ec(Bb,{name:e.type,type:e.type,src:Sc({loadingContext:i})(e.type)}),"\u2022\u2022\u2022\u2022 ",e.lastFour),n&&ec("button",{type:"button",className:"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link",onClick:function(){n({order:r})}},l.get("storedPaymentMethod.disable.button"))),ec("div",{className:"adyen-checkout__order-payment-method__details"},ec("div",{className:"adyen-checkout__order-payment-method__deducted-amount"},ec("div",{className:"adyen-checkout__order-payment-method__deducted-amount__label"},l.get("deductedBalance")),ec("div",{className:"adyen-checkout__order-payment-method__deducted-amount__value"},l.amount(e.amount.value,e.amount.currency)))))}))),a.remainingAmount&&ec("div",{className:"adyen-checkout__order-remaining-amount"},l.get("partialPayment.warning")," ",ec("strong",null,l.amount(a.remainingAmount.value,a.remainingAmount.currency))))},Ib=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.onSelect=function(e){return function(){return t.props.onSelect(e)}},t}return Fs(t,e),t.prototype.componentDidMount=function(){if(this.props.paymentMethods[0]){var e=this.props.paymentMethods[0];(this.props.openFirstStoredPaymentMethod&&!0===_c(e,"props.oneClick")||this.props.openFirstPaymentMethod)&&this.onSelect(e)()}},t.prototype.render=function(e){var t,r=this,a=e.paymentMethods,n=e.activePaymentMethod,o=e.cachedPaymentMethods,i=e.isLoading,l=zc(((t={})[xb["adyen-checkout__payment-methods-list"]]=!0,t["adyen-checkout__payment-methods-list"]=!0,t["adyen-checkout__payment-methods-list--loading"]=i,t));return ec(rc,null,this.props.orderStatus&&ec(Mb,{order:this.props.order,orderStatus:this.props.orderStatus,onOrderCancel:this.props.onOrderCancel}),ec("ul",{className:l},a.map((function(e,t,l){var s=n&&n._id===e._id,c=e._id in o,d=n&&l[t+1]&&n._id===l[t+1]._id;return ec(zb,{className:zc({"adyen-checkout__payment-method--next-selected":d}),standalone:1===a.length,paymentMethod:e,isSelected:s,isDisabling:s&&r.props.isDisabling,isLoaded:c,isLoading:i,onSelect:r.onSelect(e),key:e._id,showRemovePaymentMethodButton:r.props.showRemovePaymentMethodButton,onDisableStoredPaymentMethod:r.props.onDisableStoredPaymentMethod})}))))},t.defaultProps={paymentMethods:[],activePaymentMethod:null,cachedPaymentMethods:{},orderStatus:null,onSelect:function(){},onDisableStoredPaymentMethod:function(){},isDisabling:!1,isLoading:!1},t}(ac),jb=function(e){var t=e.message,r=ad(),a=r.i18n,n=r.loadingContext;return ec("div",{className:"adyen-checkout__status adyen-checkout__status--success"},ec(Ud,{height:"88",className:"adyen-checkout__status__icon",src:Sc({loadingContext:n,extension:"gif",imageFolder:"components/"})("success"),alt:a.get(t||"creditCard.success")}),ec("span",{className:"adyen-checkout__status__text"},a.get(t||"creditCard.success")))},Ob=function(e){var t=e.message,r=ad(),a=r.loadingContext,n=r.i18n;return ec("div",{className:"adyen-checkout__status adyen-checkout__status--error"},ec(Ud,{className:"adyen-checkout__status__icon",src:Sc({loadingContext:a,extension:"gif",imageFolder:"components/"})("error"),alt:n.get(t||"error.message.unknown"),height:"88"}),ec("span",{className:"adyen-checkout__status__text"},n.get(t||"error.message.unknown")))};function Eb(e,t){var r={path:"v1/order/status?clientKey="+e.clientKey,loadingContext:e.loadingContext};return rp(r,{orderData:t.orderData})}var Rb=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={elements:[],orderStatus:null,isDisabling:!1,status:{type:"loading"},activePaymentMethod:null,cachedPaymentMethods:{}},t.prepareDropinData=function(){var e=t.props,r=e.order,a=e.clientKey,n=e.loadingContext,o=t.props.onCreateElements(),i=o[0],l=o[1],s=r?Eb({clientKey:a,loadingContext:n},r):null;Promise.all([i,l,s]).then((function(e){var r=e[0],a=e[1],n=e[2];t.setState({elements:Bs(Bs([],r),a),orderStatus:n}),t.setStatus({type:"ready"}),t.props.modules.analytics&&t.props.modules.analytics.send({containerWidth:t.base&&t.base.offsetWidth,paymentMethods:a.map((function(e){return e.props.type})),component:"dropin",flavor:"dropin"})}))},t.setStatus=function(e){t.setState({status:e})},t.setActivePaymentMethod=function(e){t.setState((function(t){var r;return{activePaymentMethod:e,cachedPaymentMethods:Ds(Ds({},t.cachedPaymentMethods),(r={},r[e._id]=!0,r))}}))},t.handleOnSelectPaymentMethod=function(e){var r=t.state.activePaymentMethod;t.setActivePaymentMethod(e),(r&&r._id!==e._id||!r)&&t.props.onSelect(e)},t.handleDisableStoredPaymentMethod=function(e){t.setState({isDisabling:!0}),new Promise((function(r,a){return t.props.onDisableStoredPaymentMethod(e.props.storedPaymentMethodId,r,a)})).then((function(){t.setState((function(t){return{elements:t.elements.filter((function(t){return t._id!==e._id}))}})),t.setState({isDisabling:!1})})).catch((function(){t.setState({isDisabling:!1})}))},t}return Fs(t,e),t.prototype.componentDidMount=function(){this.prepareDropinData()},t.prototype.componentDidUpdate=function(e,t){t.status.type!==this.state.status.type&&this.state.activePaymentMethod&&this.state.activePaymentMethod.setStatus(this.state.status.type),"ready"===this.state.status.type&&"ready"!==t.status.type&&this.props.onReady&&this.props.onReady()},t.prototype.closeActivePaymentMethod=function(){this.setState({activePaymentMethod:null})},t.prototype.render=function(e,t){var r,a,n=t.elements,o=t.status,i=t.activePaymentMethod,l=t.cachedPaymentMethods,s="loading"===o.type,c="redirect"===o.type;switch(o.type){case"success":return ec(jb,{message:null===(r=o.props)||void 0===r?void 0:r.message});case"error":return ec(Ob,{message:null===(a=o.props)||void 0===a?void 0:a.message});case"custom":return o.props.component.render();default:return ec("div",{className:"adyen-checkout__dropin adyen-checkout__dropin--"+o.type},c&&o.props.component&&o.props.component.render(),s&&o.props&&o.props.component&&o.props.component.render(),n&&!!n.length&&ec(Ib,{isLoading:s||c,isDisabling:this.state.isDisabling,paymentMethods:n,activePaymentMethod:i,cachedPaymentMethods:l,order:this.props.order,orderStatus:this.state.orderStatus,onOrderCancel:this.props.onOrderCancel,onSelect:this.handleOnSelectPaymentMethod,openFirstPaymentMethod:this.props.openFirstPaymentMethod,openFirstStoredPaymentMethod:this.props.openFirstStoredPaymentMethod,onDisableStoredPaymentMethod:this.handleDisableStoredPaymentMethod,showRemovePaymentMethodButton:this.props.showRemovePaymentMethodButton}))}},t}(ac);var Lb=["androidpay","samsungpay"],Vb=function(e){return!Lb.includes(e.constructor.type)},Ub=function(e){return!!e},Kb=function(e){if(e.isAvailable){var t=new Promise((function(e,t){return setTimeout(t,5e3)}));return Promise.race([e.isAvailable(),t])}return Promise.resolve(!!e)},Hb=function(e,t,r){void 0===e&&(e=[]);var a=e.map((function(e){return r(e,t)})).filter(Ub).filter(Vb),n=a.map(Kb).map((function(e){return e.catch((function(e){return e}))}));return Promise.all(n).then((function(e){return a.filter((function(t,r){return!0===e[r]}))}))},qb=function(e){function t(t){var r=e.call(this,t)||this;return r.dropinRef=null,r.handleSubmit=function(){var e=r.activePaymentMethod,t=e.data,a=e.isValid;return a?(!1!==r.props.setStatusAutomatically&&r.setStatus("loading"),r.props.onSubmit({data:t,isValid:a},r)):(r.showValidation(),!1)},r.handleCreate=function(){var e=r.props,t=e.paymentMethods,a=e.storedPaymentMethods,n=e.showStoredPaymentMethods,o=e.showPaymentMethods,i=e._parentInstance,l=function(e){return{elementRef:e.elementRef,showPayButton:e.showPayButton,isDropin:!0}}(Ds(Ds({},r.props),{elementRef:r.elementRef}));return[n?function(e,t,r){return void 0===e&&(e=[]),Hb(e,Ds(Ds({},t),{oneClick:!0}),r)}(a,l,null==i?void 0:i.create):[],o?Hb(t,l,null==i?void 0:i.create):[]]},r.submit=r.submit.bind(r),r}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.dropinRef&&!!this.dropinRef.state.activePaymentMethod&&!!this.dropinRef.state.activePaymentMethod.isValid},enumerable:!1,configurable:!0}),t.prototype.showValidation=function(){return this.dropinRef.state.activePaymentMethod&&this.dropinRef.state.activePaymentMethod.showValidation(),this},t.prototype.setStatus=function(e,t){var r;return void 0===t&&(t={}),null===(r=this.dropinRef)||void 0===r||r.setStatus({type:e,props:t}),this},Object.defineProperty(t.prototype,"activePaymentMethod",{get:function(){var e,t;return(null===(e=this.dropinRef)||void 0===e?void 0:e.state)||(null===(t=this.dropinRef)||void 0===t?void 0:t.state.activePaymentMethod)?this.dropinRef.state.activePaymentMethod:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.activePaymentMethod?this.dropinRef.state.activePaymentMethod.data:null},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var e=this;if(!this.activePaymentMethod)throw new Error("No active payment method.");this.activePaymentMethod.startPayment().then(this.handleSubmit).catch((function(t){return e.props.onError(t)}))},t.prototype.handleAction=function(e,t){var r,a=this;if(void 0===t&&(t={}),!e||!e.type)throw new Error("Invalid Action");if(null===(r=this.activePaymentMethod)||void 0===r?void 0:r.updateWithAction)return this.activePaymentMethod.updateWithAction(e);var n=this.props._parentInstance.createFromAction(e,Ds(Ds({},t),{elementRef:this.elementRef,onAdditionalDetails:function(e){return a.props.onAdditionalDetails(e,a.elementRef)},isDropin:!0}));return n?this.setStatus(n.props.statusType,{component:n}):null},t.prototype.closeActivePaymentMethod=function(){this.dropinRef.closeActivePaymentMethod()},t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(Rb,Ds({},this.props,{onChange:this.setState,onSubmit:this.handleSubmit,elementRef:this.elementRef,onCreateElements:this.handleCreate,ref:function(t){e.dropinRef=t}})))},t.type="dropin",t.defaultProps=Db,t}(id),Gb="AchInput-module_sf-input__wrapper__1V7mk",Yb="AchInput-module_adyen-checkout__input__1SeSl",Wb=function(e){var t,r=e.id,a=e.dataInfo,n=e.className,o=void 0===n?"":n,i=e.label,l=e.focused,s=e.filled,c=e.errorMessage,d=void 0===c?"":c,u=e.isValid,p=void 0!==u&&u,m=e.onFocusField,h=e.dir,f="encrypted"+(r.charAt(0).toUpperCase()+r.slice(1));return ec(wd,{label:i,focused:l,filled:s,classNameModifiers:[r],onFocusField:function(){return m(f)},errorMessage:d,isValid:p,className:o,dir:h},ec("span",{"data-cse":f,"data-info":a,className:zc((t={"adyen-checkout__input":!0,"adyen-checkout__input--large":!0},t[Yb]=!0,t["adyen-checkout__input--error"]=d.length,t["adyen-checkout__input--focus"]=l,t["adyen-checkout__input--valid"]=p,t))}))},Jb=function(e){var t=e.focusedElement,r=e.onFocusField,a=e.errors,n=e.valid,o=ad().i18n;return ec("div",{className:"adyen-checkout__ach-sf__form adyen-checkout__field-wrapper"},ec(Wb,{id:"bankAccountNumber",focused:"encryptedBankAccountNumber"===t,isValid:!!n.encryptedBankAccountNumber,label:o.get("ach.accountNumberField.title"),onFocusField:r,filled:!!a.encryptedBankAccountNumber||!!n.encryptedBankAccountNumber,errorMessage:!!a.encryptedBankAccountNumber&&o.get("ach.accountNumberField.invalid"),dataInfo:'{"length":"4-17", "maskInterval": 4}',className:"adyen-checkout__field--50",dir:"ltr"}),ec(Wb,{id:"bankLocationId",focused:"encryptedBankLocationId"===t,isValid:!!n.encryptedBankLocationId,label:o.get("ach.accountLocationField.title"),onFocusField:r,filled:!!a.encryptedBankLocationId||!!n.encryptedBankLocationId,errorMessage:!!a.encryptedBankLocationId&&o.get("ach.accountLocationField.invalid"),dataInfo:'{"length":9}',className:"adyen-checkout__field--50",dir:"ltr"}))},Zb={base:{caretColor:"#0066FF"}};function Qb(e,t){return void 0===t&&(t=!1),!t||!!e&&"string"==typeof e&&e.trim().length>0}function $b(e){var t=this,r=ad().i18n,a=e.hasHolderName&&(e.holderName||e.data.holderName),n=Kc({}),o=n[0],i=n[1],l=Kc(Ds({},e.holderNameRequired&&{holderName:a})),s=l[0],c=l[1],d=Kc(Ds({},e.hasHolderName&&{holderName:e.holderName||e.data.holderName})),u=d[0],p=d[1],m=Kc(e.billingAddressRequired?e.data.billingAddress:null),h=m[0],f=m[1],y=Kc(!1),b=y[0],v=y[1],g=Kc(""),k=g[0],C=g[1],_=function(e){f(Ds(Ds({},h),e.data)),c(Ds(Ds({},s),{billingAddress:e.isValid}))},N=function(t){var r=t.target.value;p(Ds(Ds({},u),{holderName:r})),i(Ds(Ds({},o),{holderName:!!e.holderNameRequired&&!Qb(r)})),c(Ds(Ds({},s),{holderName:!e.holderNameRequired||Qb(r,e.holderNameRequired)}))},w=Yc(null),P=Yc(null),F=Kc("ready"),D=F[0],S=F[1];return this.setStatus=function(e){S(e)},this.showValidation=function(){w.current.showValidation(),e.holderNameRequired&&!s.holderName&&i(Ds(Ds({},o),{holderName:!0})),P.current&&P.current.showValidation()},qc((function(){return t.setFocusOn=w.current.setFocusOn,t.updateStyles=w.current.updateStyles,function(){w.current.destroy()}}),[]),qc((function(){var t=Qb(u.holderName,e.holderNameRequired),r=b,a=!e.billingAddressRequired||Boolean(s.billingAddress),n=r&&t&&a;e.onChange({data:u,isValid:n,billingAddress:h})}),[u,s,o]),ec("div",{className:"adyen-checkout__ach"},ec(Ch,Ds({ref:w},e,{styles:Ds(Ds({},Zb),e.styles),onChange:function(t){var r=t,a=r.autoCompleteName?r.autoCompleteName:u.holderName;p(Ds(Ds(Ds({},u),r.data),{holderName:a})),i(Ds(Ds({},o),r.errors)),c(Ds(Ds(Ds({},s),r.valid),{holderName:!e.holderNameRequired||Qb(a,e.holderNameRequired)})),v(r.isSfpValid)},onFocus:function(t){var r=!0===t.focus;C(t.currentFocusObject),r?e.onFocus(t):e.onBlur(t)},render:function(t,a){var n=t.setRootNode,i=t.setFocusOn;return ec("div",{ref:n,className:"adyen-checkout__ach-input "+Gb},ec(Sh,{status:a.status},ec("div",{className:zc(["adyen-checkout__fieldset","adyen-checkout__fieldset--ach"])},ec("div",{className:"adyen-checkout__fieldset__title"},r.get("ach.bankAccount")),e.hasHolderName&&ec(wd,{label:r.get("ach.accountHolderNameField.title"),className:"adyen-checkout__pm__holderName",errorMessage:!!o.holderName&&r.get("ach.accountHolderNameField.invalid"),isValid:!!s.holderName},Jd("text",{className:"adyen-checkout__pm__holderName__input "+Yb,placeholder:e.placeholders.holderName||r.get("ach.accountHolderNameField.placeholder"),value:u.holderName,required:e.holderNameRequired,onInput:N})),ec(Jb,{focusedElement:k,onFocusField:i,errors:a.errors,valid:a.valid})),e.billingAddressRequired&&ec(sp,{label:"billingAddress",data:h,onChange:_,allowedCountries:e.billingAddressAllowedCountries,requiredFields:e.billingAddressRequiredFields,ref:P})))}})),e.showPayButton&&e.payButton({status:D,label:r.get("confirmPurchase")}))}$b.defaultProps={details:[],type:"ach",hasHolderName:!0,holderNameRequired:!0,billingAddressRequired:!0,billingAddressAllowedCountries:["US","PR"],onLoad:function(){},onConfigSuccess:function(){},onAllValid:function(){},onFieldValid:function(){},onBrand:function(){},onError:function(){},onBinValue:function(){},onBlur:function(){},onFocus:function(){},onChange:function(){},holderName:"",data:{holderName:"",billingAddress:{}},styles:{},placeholders:{}};var Xb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(e){var t;return Ds(Ds({},e),{holderNameRequired:null!==(t=e.hasHolderName)&&void 0!==t?t:e.holderNameRequired})},t.prototype.formatData=function(){var e,r=Ds(Ds({type:t.type},this.state.data),{ownerName:null===(e=this.state.data)||void 0===e?void 0:e.holderName});return delete r.holderName,Ds({paymentMethod:r},this.state.billingAddress&&{billingAddress:this.state.billingAddress})},t.prototype.updateStyles=function(e){return this.componentRef&&this.componentRef.updateStyles&&this.componentRef.updateStyles(e),this},t.prototype.setFocusOn=function(e){return this.componentRef&&this.componentRef.setFocusOn&&this.componentRef.setFocusOn(e),this},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec($b,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="ach",t}(id),ev=/^[+]*[0-9]{1,4}[\s/0-9]*$/;function tv(e){var t=ad().i18n,r=nu({schema:["telephoneNumber"],defaultData:e.data,rules:{telephoneNumber:{validate:function(e){return ev.test(e)&&e.length>=7},errorMessage:"mobileNumber.invalid",modes:["blur"]}},formatters:{telephoneNumber:function(e){return e.replace(/[^0-9+\s]/g,"")}}}),a=r.handleChangeFor,n=r.triggerValidation,o=r.data,i=r.valid,l=r.errors,s=r.isValid,c=Kc("ready"),d=c[0],u=c[1];return this.setStatus=u,this.showValidation=n,qc((function(){e.onChange({data:o,valid:i,errors:l,isValid:s})}),[o,i,l,s]),ec("div",{className:"adyen-checkout__mb-way"},ec(wd,{errorMessage:!!l.telephoneNumber&&t.get("mobileNumber.invalid"),label:t.get("mobileNumber"),className:zc("adyen-checkout__input--phone-number"),isValid:i.telephoneNumber,dir:"ltr"},Jd("tel",{value:o.telephoneNumber,className:"adyen-checkout__pm__phoneNumber__input",placeholder:e.placeholders.telephoneNumber,required:!0,autoCorrect:"off",onChange:a("telephoneNumber","blur"),onInput:a("telephoneNumber","input")})),e.showPayButton&&e.payButton({status:d,label:t.get("confirmPurchase")}))}tv.defaultProps={onChange:function(){}};var rv=2e3,av=15,nv=6e4,ov=1e4,iv="mbway",lv="mbway.confirmPayment",sv="await.waitForConfirmation",cv=!1;function dv(e){var t=this,r=ad(),a=r.i18n,n=r.loadingContext,o=Kc(!1),i=o[0],l=o[1],s=Kc(!1),c=s[0],d=s[1],u=Kc(!0),p=u[0],m=u[1],h=Kc(e.delay),f=h[0],y=h[1],b=Kc(100),v=b[0],g=b[1],k=Kc(0),C=k[0],_=k[1],N=Kc(!1),w=N[0],P=N[1],F=Kc(null),D=F[0],S=F[1],x=function(){Uy(e.paymentData,e.clientKey,n).then(Hy).catch((function(e){var r=e.message,a=Ss(e,["message"]);return{type:"network-error",props:Ds(Ds({},r&&{message:t.props.i18n.get(r)}),a)}})).then((function(r){switch(r.type){case"success":!function(r){l(!0);var a={data:{details:{payload:r.props.payload},paymentData:e.paymentData}};e.onComplete(a,t)}(r);break;case"error":!function(r){d(!0);var a={data:{details:{payload:r.props.payload},paymentData:e.paymentData}};e.onComplete(a,t)}(r);break;default:m(!1)}}))};qc((function(){var r=e.shouldRedirectOnMobile,a=e.url,n=window.matchMedia("(max-width: 768px)").matches&&/Android|iPhone|iPod/.test(navigator.userAgent);return r&&a&&n?t.redirectToApp(a,x):x(),function(){clearTimeout(D)}}),[]),qc((function(){if(c)return clearTimeout(D);if(i)return clearTimeout(D);if(!p){S(setTimeout((function(){x();var t=C+f;_(t),t>=e.throttleTime&&!w&&(y(e.throttleInterval),P(!0))}),f))}}),[p,C,c,i]);var A=function(e,t){return ec("div",{className:"adyen-checkout__await adyen-checkout__await--result"},ec("img",{className:"adyen-checkout__await__icon adyen-checkout__await__icon--result",src:Sc({loadingContext:n,imageFolder:"components/"})(e),alt:a.get(t)}),ec("div",{className:"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result"},a.get(t)))};if(c)return A("error","error.subtitle.payment");if(i)return A("success","creditCard.success");if(p)return ec("div",{className:"adyen-checkout__await"},e.brandLogo&&ec("img",{src:e.brandLogo,alt:e.type,className:"adyen-checkout__await__brand-logo"}),ec(Mc,{inline:!1,size:"large"}));var B=a.get("wechatpay.timetopay").split("%@");return ec("div",{className:zc("adyen-checkout__await","adyen-checkout__await--"+e.type,e.classNameModifiers.map((function(e){return"adyen-checkout__await--"+e})))},e.brandLogo&&ec("img",{src:e.brandLogo,alt:e.type,className:"adyen-checkout__await__brand-logo"}),ec("div",{className:"adyen-checkout__await__subtitle"},e.messageText),ec("div",{className:"adyen-checkout__await__indicator-holder"},ec("div",{className:"adyen-checkout__await__indicator-spinner"},ec(Mc,{inline:!1,size:"medium"})),ec("div",{className:"adyen-checkout__await__indicator-text"},e.awaitText)),e.showCountdownTimer&&ec("div",{className:"adyen-checkout__await__countdown-holder"},ec("div",{className:"adyen-checkout__await__progress"},ec("span",{className:"adyen-checkout__await__percentage",style:{width:v+"%"}})),ec("div",{className:"adyen-checkout__await__countdown"},B[0],"\xa0",ec(Vy,{minutesFromNow:e.countdownTime,onTick:function(e){g(e.percentage)},onCompleted:function(){d(!0),clearTimeout(D);e.onError({type:"error",props:{errorMessage:"Payment Expired"}},t)}}),"\xa0",B[1])),e.url&&ec("div",{className:"adyen-checkout__await__app-link"},ec("span",{className:"adyen-checkout__await__separator__label"},a.get("or")),ec(nd,{classNameModifiers:["await"],onClick:function(){return r=e.url,void 0===a&&(a=function(){}),setTimeout((function(){var r=e.type+" App was not found";e.onError(r,t),a()}),25),void window.location.assign(r);var r,a},label:a.get("openApp")})))}dv.defaultProps={countdownTime:15,onError:function(){},onComplete:function(){},throttleTime:6e4,throttleInterval:1e4,showCountdownTimer:!0,classNameModifiers:[],shouldRedirectOnMobile:!1,url:null};var uv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(e){var t=e.data,r=void 0===t?{}:t,a=e.placeholders,n=void 0===a?{}:a;return Ds(Ds({},e),{data:{telephoneNumber:r.telephoneNumber||r.phoneNumber},placeholders:{telephoneNumber:n.telephoneNumber||n.phoneNumber||"+351 932 123 456"}})},t.prototype.formatData=function(){var e;return{paymentMethod:Ds({type:t.type},(null===(e=this.state.data)||void 0===e?void 0:e.telephoneNumber)&&{telephoneNumber:this.state.data.telephoneNumber})}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.props.name},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return this.props.paymentData?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(dv,{ref:function(t){e.componentRef=t},clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,type:iv,messageText:this.props.i18n.get(lv),awaitText:this.props.i18n.get(sv),showCountdownTimer:cv,delay:rv,countdownTime:av,throttleTime:nv,throttleInterval:ov})):ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(tv,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="mbway",t}(id);function pv(e){var t=this,r=ad(),a=r.i18n,n=r.loadingContext,o=nu({schema:["blikCode"],rules:{blikCode:{validate:function(e){return 6===(null==e?void 0:e.length)},errorMessage:"blik.invalid",modes:["blur"]}}}),i=o.handleChangeFor,l=o.triggerValidation,s=o.data,c=o.valid,d=o.errors,u=o.isValid;qc((function(){e.onChange({data:s,errors:d,valid:c,isValid:u},t)}),[s,c,d,u]);var p=Kc("ready"),m=p[0],h=p[1];return this.setStatus=h,this.showValidation=l,ec("div",{className:"adyen-checkout__blik"},ec("p",{className:"adyen-checkout__blik__helper"},a.get("blik.help")),ec(wd,{errorMessage:!!d.blikCode&&a.get(d.blikCode.errorMessage),label:a.get("blik.code"),classNameModifiers:["blikCode","50"],isValid:c.blikCode,dir:"ltr"},Jd("text",{value:s.blikCode,name:"blikCode",spellcheck:!1,required:!0,autocorrect:"off",onInput:i("blikCode","input"),onChange:i("blikCode","blur"),placeholder:"123456",maxLength:6})),e.showPayButton&&e.payButton({status:m,icon:Sc({loadingContext:n,imageFolder:"components/"})("lock")}))}pv.defaultProps={data:{blikCode:""}};var mv=2e3,hv=15,fv=6e4,yv=1e4,bv="blik",vv="blik.confirmPayment",gv="await.waitForConfirmation",kv=!1,Cv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatData=function(){var e=!!this.props.storedPaymentMethodId;return{paymentMethod:Ds(Ds({type:t.type},!e&&{blikCode:this.state.data.blikCode}),e&&{storedPaymentMethodId:this.props.storedPaymentMethodId})}},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.props.storedPaymentMethodId||!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return this.props.paymentData?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(dv,{ref:function(t){e.componentRef=t},clientKey:this.props.clientKey,paymentData:this.props.paymentData,onError:this.props.onError,onComplete:this.onComplete,brandLogo:this.icon,type:bv,messageText:this.props.i18n.get(vv),awaitText:this.props.i18n.get(gv),showCountdownTimer:kv,delay:mv,countdownTime:hv,throttleTime:fv,throttleInterval:yv})):ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.storedPaymentMethodId?ec(sf,{name:this.displayName,amount:this.props.amount,payButton:this.payButton,onSubmit:this.submit,ref:function(t){e.componentRef=t}}):ec(pv,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,onSubmit:this.submit,payButton:this.payButton})))},t.type="blik",t}(id);function _v(e){var t=e.reference,r=e.totalAmount,a=e.paymentMethodType,n=ad(),o=n.loadingContext,i=n.i18n;return ec(Ff,{paymentMethodType:a,introduction:i.get("bankTransfer.instructions"),imageUrl:Sc({loadingContext:o})(a),amount:r&&i.amount(r.value,r.currency),voucherDetails:[{label:i.get("bankTransfer.beneficiary"),value:e.beneficiary},{label:i.get("bankTransfer.iban"),value:e.iban},{label:i.get("bankTransfer.bic"),value:e.bic},{label:i.get("bankTransfer.reference"),value:t}]})}function Nv(e){var t=ad().i18n,r=Kc(!1),a=r[0],n=r[1],o=nu({schema:[],defaultData:e.data}),i=o.handleChangeFor,l=o.triggerValidation,s=o.data,c=o.valid,d=o.errors,u=o.isValid,p=o.setSchema;return qc((function(){p(a?["shopperEmail"]:[])}),[a]),this.showValidation=l,qc((function(){e.onChange({data:s,errors:d,valid:c,isValid:u})}),[s,c,d,a,u]),ec("div",{className:"adyen-checkout__bankTransfer"},ec("p",{className:"adyen-checkout__bankTransfer__introduction"},t.get("bankTransfer.introduction")),ec(lb,{classNames:"adyen-checkout__bankTransfer__emailField",value:s.shopperEmail,errors:d.shopperEmail,onToggle:function(){return n(!a)},onInput:i("shopperEmail","input"),onChange:i("shopperEmail","blur")}))}var wv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isValid:!t.props.showEmailAddress,data:{}},t.handleRef=function(e){t.componentRef=e},t}return Fs(t,e),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.formatData=function(){var e=this.state.data.shopperEmail;return Ds({paymentMethod:{type:t.type}},e&&{shopperEmail:e})},t.prototype.render=function(){return this.props.reference?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(_v,Ds({ref:this.handleRef},this.props))):this.props.showPayButton?ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.showEmailAddress&&ec(Nv,Ds({ref:this.handleRef},this.props,{onChange:this.setState})),ec(sf,Ds({},this.props,{name:this.displayName,onSubmit:this.submit,payButton:this.payButton}))):null},t.type="bankTransfer_IBAN",t.defaultProps={showPayButton:!0,showEmailAddress:!0},t}(id),Pv=["CA","US"],Fv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds(Ds({},e.prototype.formatProps.call(this,t)),{allowedCountries:Pv,personalDetailsRequiredFields:["firstName","lastName","telephoneNumber","shopperEmail"]})},t.type="affirm",t}(hp),Dv=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),t.prototype.formatProps=function(t){return Ds({delay:2e3,countdownTime:15,copyBtn:!0,introduction:"pix.instructions"},e.prototype.formatProps.call(this,t))},t.type="pix",t}(Gy),Sv=/^(\d){1,8}$/,xv=/^(\d){6}$/,Av=/[^0-9]/g,Bv={bankAccountNumber:{modes:["blur","input"],validate:function(e){return!!e&&Sv.test(e)}},bankLocationId:[{modes:["input"],validate:function(e){return!!e&&/^(\d){1,6}$/.test(e)}},{modes:["blur"],validate:function(e){return!!e&&xv.test(e)}}],amountConsentCheckbox:{modes:["blur"],validate:function(e){return!!e}},accountConsentCheckbox:{modes:["blur"],validate:function(e){return!!e}},default:{modes:["blur"],validate:function(e){return!!e&&e.length>0}}},Tv={bankAccountNumber:function(e){return e.replace(Av,"")},bankLocationId:function(e){return e.replace(Av,"")}},zv="enter-data",Mv="confirm-data";function Iv(e){var t,r,a=this,n=ad().i18n,o=nu({schema:["holderName","bankAccountNumber","bankLocationId","shopperEmail","amountConsentCheckbox","accountConsentCheckbox"],defaultData:e.data,formatters:Tv,rules:Bv}),i=o.handleChangeFor,l=o.triggerValidation,s=o.data,c=o.valid,d=o.errors,u=o.isValid,p=Kc(zv),m=p[0],h=p[1];this.setStatus=h,this.showValidation=l;return qc((function(){e.onChange({data:s,valid:c,errors:d,isValid:u})}),[s,c,d,u]),ec("div",{className:zc({"adyen-checkout__bacs":!0,"adyen-checkout__bacs--confirm":m===Mv||"loading"===m})},m==Mv&&ec("div",{className:zc({"adyen-checkout__bacs--edit":!0,"adyen-checkout__bacs--edit-dropin":e.isDropin})},Jd("text",{name:"bacsEdit",className:"adyen-checkout__bacs--edit-button",value:n.get("edit"),"aria-label":n.get("edit"),readonly:!0,onClick:function(){return a.setStatus(zv)}})),ec(wd,{className:zc({"adyen-checkout__bacs--holder-name":!0,"adyen-checkout__field--inactive":m===Mv||"loading"===m}),label:n.get("bacs.accountHolderName"),errorMessage:!!d.holderName&&n.get("bacs.accountHolderName.invalid"),isValid:c.holderName},Jd("text",{name:"bacs.accountHolderName",className:"adyen-checkout__bacs-input--holder-name",placeholder:e.placeholders.holderName,value:s.holderName,"aria-invalid":!c.holderName,"aria-label":n.get("bacs.accountHolderName"),"aria-required":"true",required:!0,readonly:m===Mv||"loading"===m,autocorrect:"off",onChange:i("holderName","blur"),onInput:i("holderName","input")})),ec("div",{className:"adyen-checkout__bacs__num-id adyen-checkout__field-wrapper"},ec(wd,{errorMessage:!!d.bankAccountNumber&&n.get("bacs.accountNumber.invalid"),label:n.get("bacs.accountNumber"),className:zc({"adyen-checkout__bacs--bank-account-number":!0,"adyen-checkout__field--inactive":m===Mv||"loading"===m}),classNameModifiers:["col-70"],isValid:c.bankAccountNumber},Jd("text",{value:s.bankAccountNumber,className:"adyen-checkout__bacs-input--bank-account-number",placeholder:e.placeholders.bankAccountNumber,"aria-invalid":!c.bankAccountNumber,"aria-label":n.get("bacs.accountNumber"),"aria-required":"true",required:!0,readonly:m===Mv||"loading"===m,autocorrect:"off",onChange:i("bankAccountNumber","blur"),onInput:i("bankAccountNumber","input")})),ec(wd,{errorMessage:!!d.bankLocationId&&n.get("bacs.bankLocationId.invalid"),label:n.get("bacs.bankLocationId"),className:zc({"adyen-checkout__bacs--bank-location-id":!0,"adyen-checkout__field--inactive":m===Mv||"loading"===m}),classNameModifiers:["col-30"],isValid:c.bankLocationId},Jd("text",{value:s.bankLocationId,className:"adyen-checkout__bacs-input--bank-location-id",placeholder:e.placeholders.bankLocationId,"aria-invalid":!c.bankLocationId,"aria-label":n.get("bacs.bankLocationId"),"aria-required":"true",required:!0,readonly:m===Mv||"loading"===m,autocorrect:"off",onChange:i("bankLocationId","blur"),onInput:i("bankLocationId","input")}))),ec(wd,{errorMessage:!!d.shopperEmail&&n.get("shopperEmail.invalid"),label:n.get("shopperEmail"),className:zc({"adyen-checkout__bacs--shopper-email":!0,"adyen-checkout__field--inactive":m===Mv||"loading"===m}),isValid:c.shopperEmail},Jd("emailAddress",{value:s.shopperEmail,name:"shopperEmail",className:"adyen-checkout__bacs-input--shopper-email",classNameModifiers:["large"],placeholder:e.placeholders.shopperEmail,spellcheck:!1,"aria-invalid":!c.shopperEmail,"aria-label":n.get("shopperEmail"),"aria-required":"true",required:!0,readonly:m===Mv||"loading"===m,autocorrect:"off",onInput:i("shopperEmail","input"),onChange:i("shopperEmail","blur")})),m===zv&&ec(cp,{classNameModifiers:["amountConsentCheckbox"],errorMessage:!!d.amountConsentCheckbox,label:n.get("bacs.consent.amount"),onChange:i("amountConsentCheckbox"),checked:!!s.amountConsentCheckbox}),m===zv&&ec(cp,{classNameModifiers:["accountConsentCheckbox"],errorMessage:!!d.accountConsentCheckbox,label:n.get("bacs.consent.account"),onChange:i("accountConsentCheckbox"),checked:!!s.accountConsentCheckbox}),e.showPayButton&&e.payButton({status:m,label:m===zv?n.get("continue"):n.get("bacs.confirm")+" "+((null===(t=e.amount)||void 0===t?void 0:t.value)&&(null===(r=e.amount)||void 0===r?void 0:r.currency)?n.amount(e.amount.value,e.amount.currency):""),icon:Sc({loadingContext:e.loadingContext,imageFolder:"components/"})("lock"),onClick:function(){return u?m===zv?a.setStatus(Mv):m===Mv?e.onSubmit():void 0:a.showValidation()}}))}Iv.defaultProps={data:{},placeholders:{}};var jv=function(e){var t=ad(),r=t.i18n,a=t.loadingContext,n=e.url,o=e.paymentMethodType;return ec(Ff,{paymentMethodType:o,introduction:r.get("bacs.result.introduction"),imageUrl:Sc({loadingContext:a})(o),downloadUrl:n,downloadButtonText:r.get("download.pdf")})},Ov=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.payButton=function(e){return ec(od,Ds({amount:t.props.amount,onClick:t.submit},e))},t}return Fs(t,e),t.prototype.formatData=function(){var e,r,a,n;return Ds({paymentMethod:Ds(Ds(Ds({type:t.type},(null===(e=this.state.data)||void 0===e?void 0:e.holderName)&&{holderName:this.state.data.holderName}),(null===(r=this.state.data)||void 0===r?void 0:r.bankAccountNumber)&&{bankAccountNumber:this.state.data.bankAccountNumber}),(null===(a=this.state.data)||void 0===a?void 0:a.bankLocationId)&&{bankLocationId:this.state.data.bankLocationId})},(null===(n=this.state.data)||void 0===n?void 0:n.shopperEmail)&&{shopperEmail:this.state.data.shopperEmail})},Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},this.props.url?ec(jv,{ref:function(t){e.componentRef=t},icon:this.icon,url:this.props.url,paymentMethodType:this.props.paymentMethodType}):ec(Iv,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState,payButton:this.payButton,onSubmit:this.submit})))},t.type="directdebit_GB",t}(id),Ev={dropin:qb,ach:Xb,address:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.state.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(sp,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState})))},t}(id),afterpay:bp,afterpay_default:bp,afterpay_b2b:vp,amazonpay:zp,amex:Xh,applepay:Rp,bankTransfer_IBAN:wv,bcmc:ef,bcmc_mobile:Wy,bcmc_mobile_QR:Wy,blik:Cv,billdesk_online:Yp,billdesk_wallet:Wp,boletobancario:db,boletobancario_bancodobrasil:db,boletobancario_bradesco:db,boletobancario_hsbc:db,boletobancario_itau:db,boletobancario_santander:db,primeiropay_boleto:db,card:Xh,storedCard:Xh,diners:Xh,directdebit_GB:Ov,discover:Xh,doku:nb,doku_alfamart:nb,doku_permata_lite_atm:nb,doku_indomaret:nb,doku_atm_mandiri_va:nb,doku_sinarmas_va:nb,doku_mandiri_va:nb,doku_cimb_va:nb,doku_danamon_va:nb,doku_bri_va:nb,doku_bni_va:nb,doku_bca_va:nb,doku_wallet:nb,donation:of,dotpay:fb,dragonpay_ebanking:tb,dragonpay_otc_banking:tb,dragonpay_otc_non_banking:tb,dragonpay_otc_philippines:tb,econtext_seven_eleven:Sf,econtext_atm:Sf,econtext_stores:Sf,econtext_online:Sf,entercash:_f,eps:yb,facilypay_3x:Af,facilypay_4x:Bf,facilypay_6x:Tf,facilypay_10x:zf,facilypay_12x:Mf,giropay:df,ideal:If,jcb:Xh,kcp:Xh,maestro:Xh,mbway:uv,mc:Xh,molpay_ebanking_fpx_MY:Jy,molpay_ebanking_TH:Zy,molpay_ebanking_VN:Qy,openbanking_UK:$y,paypal:Gf,payu_IN_cashcard:_b,payu_IN_nb:Nb,paywithgoogle:Cf,personal_details:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Fs(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.state.data},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return!!this.state.isValid},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this;return ec(mp,{i18n:this.props.i18n,loadingContext:this.props.loadingContext},ec(bu,Ds({ref:function(t){e.componentRef=t}},this.props,{onChange:this.setState})))},t}(id),googlepay:Cf,pix:Dv,qiwiwallet:Qf,ratepay:Pb,redirect:cf,securedfields:Xf,sepadirectdebit:dy,scheme:Xh,threeDS2Challenge:zy,threeDS2DeviceFingerprint:Ey,visa:Xh,wechatpay:Yy,wechatpayQR:Yy,oxxo:pb,multibanco:hb,giftcard:kb,vipps:Cb,swish:Fb,affirm:Fv,default:null},Rv=function(e,t){var r=Ev[e]||Ev.default;return r?new r(Ds(Ds({},t),{id:e+"-"+wc()})):null},Lv=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r=!1);var a=e;return"scheme"===e&&(a=r?"storedCard":"card"),t[a]||{}};function Vv(e){return!this.length||this.indexOf(e.type)>-1}function Uv(e){return!this.length||this.indexOf(e.type)<0}function Kv(e){return!!e&&!!e.supportedShopperInteractions&&e.supportedShopperInteractions.includes("Ecommerce")}var Hv=["scheme","blik"];function qv(e){return!!e&&!!e.type&&Hv.includes(e.type)}var Gv=function(e){return Ds(Ds({},e),{storedPaymentMethodId:e.id})},Yv=function(){function e(e,t){void 0===t&&(t={}),this.paymentMethods=[],this.storedPaymentMethods=[],function(e){var t,r;if("string"==typeof e)throw new Error('paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).Try JSON.parse("{...}") your paymentMethodsResponse.');if(e instanceof Array)throw new Error("paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).Please check you are passing the whole response.");!e||(null===(t=null==e?void 0:e.paymentMethods)||void 0===t?void 0:t.length)||(null===(r=null==e?void 0:e.storePaymentMethods)||void 0===r?void 0:r.length)||console.warn("paymentMethodsResponse was provided but no payment methods were found.")}(e),this.paymentMethods=e?function(e,t){var r=t.allowPaymentMethods,a=void 0===r?[]:r,n=t.removePaymentMethods,o=void 0===n?[]:n;return e?e.filter(Vv,a).filter(Uv,o):[]}(e.paymentMethods,t):[],this.storedPaymentMethods=e?function(e,t){var r=t.allowPaymentMethods,a=void 0===r?[]:r,n=t.removePaymentMethods,o=void 0===n?[]:n;return e?e.filter(qv).filter(Vv,a).filter(Uv,o).filter(Kv).map(Gv):[]}(e.storedPaymentMethods,t):[]}return e.prototype.has=function(e){return Boolean(this.paymentMethods.find((function(t){return t.type===e})))},e.prototype.find=function(e){return this.paymentMethods.find((function(t){return t.type===e}))},e}(),Wv={redirect:function(e,t){return Rv("redirect",Ds(Ds(Ds({},t),e),{statusType:"redirect"}))},threeDS2Fingerprint:function(e,t){return Rv("threeDS2DeviceFingerprint",Ds(Ds({createFromAction:t.createFromAction,token:e.token,paymentData:e.paymentData,onError:t.onError,showSpinner:!t.isDropin,isDropin:!!t.isDropin},t),{type:"IdentifyShopper",onComplete:t.onAdditionalDetails,statusType:"loading",useOriginalFlow:!0}))},threeDS2Challenge:function(e,t){var r;return Rv("threeDS2Challenge",Ds(Ds({},t),{token:e.token,paymentData:e.paymentData,onComplete:t.onAdditionalDetails,onError:t.onError,size:null!==(r=t.size)&&void 0!==r?r:"02",isDropin:!!t.isDropin,type:"ChallengeShopper",statusType:"custom",useOriginalFlow:!0}))},threeDS2:function(e,t){var r="fingerprint"===e.subtype?"threeDS2DeviceFingerprint":"threeDS2Challenge",a="fingerprint"===e.subtype?e.paymentData:e.authorisationToken,n=Ds({token:e.token,paymentData:a,onComplete:t.onAdditionalDetails,onError:t.onError,isDropin:!!t.isDropin,loadingContext:t.loadingContext,clientKey:t.clientKey,_parentInstance:t._parentInstance,paymentMethodType:t.paymentMethodType,challengeWindowSize:t.challengeWindowSize},function(e,t){if("fingerprint"===e){var r=ym(t.elementRef?Sy:xy).from(t);return r.showSpinner=!t.isDropin,r.statusType="loading",r}return{statusType:"custom"}}(e.subtype,t));return Rv(r,n)},voucher:function(e,t){return Rv(e.paymentMethodType,Ds(Ds(Ds({},e),t),{i18n:t.i18n,loadingContext:t.loadingContext,statusType:"custom"}))},qrCode:function(e,t){return Rv(e.paymentMethodType,Ds(Ds(Ds({},e),t),{onComplete:t.onAdditionalDetails,onError:t.onError,statusType:"custom"}))},await:function(e,t){return Rv(e.paymentMethodType,Ds(Ds(Ds({},e),t),{onComplete:t.onAdditionalDetails,onError:t.onError,statusType:"custom"}))},bankTransfer:function(e,t){return Rv(e.paymentMethodType,Ds(Ds(Ds({},e),t),{onComplete:t.onAdditionalDetails,onError:t.onError,statusType:"custom"}))}};var Jv=function(){function e(){this.events=[]}return e.prototype.add=function(e){this.events.push(e)},e.prototype.run=function(e){var t=this.events.map((function(t){return t(e)}));return this.events=[],Promise.all(t)},e}(),Zv=function(){function e(t){var r=t.loadingContext,a=t.locale,n=t.clientKey,o=t.analytics;this.conversionId=null,this.queue=new Jv,this.props=Ds(Ds({},e.defaultProps),o),this.logEvent=function(e){return function(t){var r=Ds({version:"4.7.2",payload_version:1,platform:"web",locale:e.locale},t),a=Object.keys(r).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(r[e])})).join("&");(new Image).src=e.loadingContext+"images/analytics.png?"+a}}({loadingContext:r,locale:a}),this.logTelemetry=function(e){return function(t){if(!e.clientKey)return Promise.reject();var r={errorLevel:"silent",loadingContext:e.loadingContext,path:"v1/analytics/log?clientKey="+e.clientKey},a=Ds({version:"4.7.2",platform:"web",locale:e.locale,flavor:"components",userAgent:navigator.userAgent,referrer:window.location.href,screenWidth:window.screen.width},t);return rp(r,a)}}({loadingContext:r,locale:a,clientKey:n}),this.collectId=function(e){var t,r=e.loadingContext,a=e.clientKey,n={errorLevel:"silent",loadingContext:r,path:"v1/analytics/id?clientKey="+a};return function(){return t||(a?t=rp(n).then((function(e){return null==e?void 0:e.id})).catch((function(){})):Promise.reject())}}({loadingContext:r,clientKey:n});var i=this.props,l=i.conversion,s=i.enabled;!0===l&&!0===s&&this.props.conversionId&&(this.conversionId=this.props.conversionId,this.queue.run(this.conversionId))}return e.prototype.send=function(e){var t=this,r=this.props,a=r.conversion,n=r.enabled,o=r.payload,i=r.telemetry;if(!0===n){if(!0!==a||this.conversionId||this.collectId().then((function(e){t.conversionId=e,t.queue.run(t.conversionId)})),!0===i){this.queue.add((function(r){return t.logTelemetry(Ds(Ds(Ds({},e),o&&Ds({},o)),{conversionId:r})).catch((function(){}))})),a&&!this.conversionId||this.queue.run(this.conversionId)}this.logEvent(e)}},e.defaultProps={enabled:!0,telemetry:!0,conversion:!1,conversionId:null},e}();function Qv(e){return Object.keys(e).reduce((function(t,r){return Dc.includes(r)&&(t[r]=e[r]),t}),{})}var $v=function(){function e(e){var t=this;this.components=[],this.update=function(e){return void 0===e&&(e={}),t.setOptions(e),t.components.forEach((function(e){return e.update(t.getPropsForComponent(t.options))})),t},this.remove=function(e){return t.components=t.components.filter((function(t){return t._id!==e._id})),e.unmount(),t},this.setOptions=function(e){return t.options=Ds(Ds({},t.options),e),t.options.loadingContext=function(e){void 0===e&&(e="https://checkoutshopper-live.adyen.com/checkoutshopper/");var t={test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/"};return t[e]||t[e.toLowerCase()]||e}(t.options.environment),t.modules={risk:new Cd(t.options),analytics:new Zv(t.options),i18n:new Ws(t.options.locale,t.options.translations)},t.paymentMethodsResponse=new Yv(t.options.paymentMethodsResponse,t.options),t},this.create=this.create.bind(this),this.createFromAction=this.createFromAction.bind(this),this.setOptions(e)}return e.prototype.create=function(e,t){var r=this.getPropsForComponent(t);return e?this.handleCreate(e,r):this.handleCreateError()},e.prototype.createFromAction=function(e,t){if(void 0===t&&(t={}),e.type){var r=Lv(e.type,this.options.paymentMethodsConfiguration);return function(e,t){void 0===t&&(t={});var r=Wv[e.type];if(r&&"function"==typeof r)return r(e,t);throw new Error("Invalid Action")}(e,Ds(Ds(Ds({},Qv(this.options)),r),this.getPropsForComponent(t)))}return this.handleCreateError()},e.prototype.getPropsForComponent=function(e){return Ds(Ds({paymentMethods:this.paymentMethodsResponse.paymentMethods,storedPaymentMethods:this.paymentMethodsResponse.storedPaymentMethods},e),{i18n:this.modules.i18n,modules:this.modules,createFromAction:this.createFromAction,_parentInstance:this})},e.prototype.handleCreate=function(e,t){if(void 0===t&&(t={}),e.prototype instanceof id){var r=t.supportedShopperInteractions?[]:this.paymentMethodsResponse.find(e.type),a=Lv(e.type,this.options.paymentMethodsConfiguration,!!t.storedPaymentMethodId),n=Qv(this.options),o=new e(Ds(Ds(Ds(Ds({},n),r),a),t));return t.isDropin||this.components.push(o),o}if("string"==typeof e&&Ev[e])return this.handleCreate(Ev[e],t);if("string"==typeof e&&this.paymentMethodsResponse.has(e)){a=Lv(e,this.options.paymentMethodsConfiguration);return this.handleCreate(Ev.redirect,Ds(Ds(Ds(Ds({},Qv(this.options)),this.paymentMethodsResponse.find(e)),a),t))}if("object"==typeof e&&"string"==typeof e.type){a=Lv(e.type,this.options.paymentMethodsConfiguration,!!e.storedPaymentMethodId);return this.handleCreate(e.type,Ds(Ds(Ds({},e),t),a))}return this.handleCreateError(e)},e.prototype.handleCreateError=function(e){var t=e&&e.name?e.name:"The passed payment method";throw new Error(e?t+" is not a valid Checkout Component":"No Payment Method component was passed")},e.version={version:"4.7.2",revision:"c66f7a3",branch:"HEAD",buildId:"@adyen/adyen-web-f2920526-2c16-4773-a640-aa5af1704492"},e}(),Xv=Object.freeze({__proto__:null,default:{payButton:"\u062f\u0641\u0639","payButton.redirecting":"\u062c\u0627\u0631\u0650 \u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u062c\u064a\u0647...",storeDetails:"\u062d\u0641\u0638 \u0644\u0645\u062f\u0641\u0648\u0639\u0627\u062a\u064a \u0627\u0644\u0642\u0627\u062f\u0645\u0629","creditCard.holderName":"\u0627\u0644\u0627\u0633\u0645 \u0639\u0644\u0649 \u0627\u0644\u0628\u0637\u0627\u0642\u0629","creditCard.holderName.placeholder":"\u062c\u0645\u064a\u0644 \u0633\u0639\u064a\u062f","creditCard.holderName.invalid":"\u0627\u0633\u0645 \u0635\u0627\u062d\u0628 \u0628\u0637\u0627\u0642\u0629 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","creditCard.numberField.title":"\u0631\u0642\u0645 \u0627\u0644\u0628\u0637\u0627\u0642\u0629","creditCard.numberField.placeholder":"3456 9012 5678 1234","creditCard.expiryDateField.title":"\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0627\u0646\u062a\u0647\u0627\u0621","creditCard.expiryDateField.placeholder":"\u0634\u0647\u0631/\u0633\u0646\u0629","creditCard.expiryDateField.month":"\u0634\u0647\u0631","creditCard.expiryDateField.month.placeholder":"\u0634\u0647\u0631","creditCard.expiryDateField.year.placeholder":"\u0633\u0646\u0629","creditCard.expiryDateField.year":"\u0633\u0646\u0629","creditCard.cvcField.title":"\u0631\u0645\u0632 CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\u0627\u062d\u062a\u0641\u0638 \u0628\u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0644\u0644\u0645\u0631\u0629 \u0627\u0644\u0642\u0627\u062f\u0645\u0629","creditCard.cvcField.placeholder.4digits":"4 \u0623\u0631\u0642\u0627\u0645","creditCard.cvcField.placeholder.3digits":"3 \u0623\u0631\u0642\u0627\u0645","creditCard.taxNumber.placeholder":"\u064a\u0648\u0645 \u0634\u0647\u0631 \u0633\u0646\u0629 / 0123456789",installments:"\u0639\u062f\u062f \u0627\u0644\u0623\u0642\u0633\u0627\u0637",installmentOption:"%{times} x %{partialValue}",installmentOptionMonths:"%{times} \u0623\u0634\u0647\u0631","installments.oneTime":"\u0627\u0644\u062f\u0641\u0639 \u0645\u0631\u0629 \u0648\u0627\u062d\u062f\u0629","installments.installments":"\u0627\u0644\u062f\u0641\u0639 \u0639\u0644\u0649 \u0623\u0642\u0633\u0627\u0637","installments.revolving":"\u0627\u0644\u062f\u0641\u0639 \u0627\u0644\u062f\u0648\u0631\u064a","sepaDirectDebit.ibanField.invalid":"\u0631\u0642\u0645 \u062d\u0633\u0627\u0628 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","sepaDirectDebit.nameField.placeholder":"\u062c\u0645\u064a\u0644 \u0633\u0639\u064a\u062f","sepa.ownerName":"\u0635\u0627\u062d\u0628 \u0627\u0644\u062d\u0633\u0627\u0628","sepa.ibanNumber":"\u0631\u0642\u0645 \u0627\u0644\u062d\u0633\u0627\u0628 (IBAN)","error.title":"\u062e\u0637\u0623","error.subtitle.redirect":"\u0641\u0634\u0644 \u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u062a\u0648\u062c\u064a\u0647","error.subtitle.payment":"\u0641\u0634\u0644 \u0627\u0644\u062f\u0641\u0639","error.subtitle.refused":"\u062a\u0645 \u0631\u0641\u0636 \u0627\u0644\u062f\u0641\u0639","error.message.unknown":"\u062d\u062f\u062b \u062e\u0637\u0623 \u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641","idealIssuer.selectField.title":"\u0627\u0644\u0628\u0646\u0643","idealIssuer.selectField.placeholder":"\u062d\u062f\u062f \u0627\u0644\u0628\u0646\u0643 \u0627\u0644\u0630\u064a \u062a\u062a\u0639\u0627\u0645\u0644 \u0645\u0639\u0647","creditCard.success":"\u0646\u062c\u062d \u0627\u0644\u062f\u0641\u0639",loading:"\u062c\u0627\u0631\u0650 \u0627\u0644\u062a\u062d\u0645\u064a\u0644...",continue:"\u0645\u062a\u0627\u0628\u0639\u0629",continueTo:"\u0645\u062a\u0627\u0628\u0639\u0629 \u0625\u0644\u0649","wechatpay.timetopay":"\u0644\u062f\u064a\u0643 %@ \u0644\u0644\u062f\u0641\u0639","wechatpay.scanqrcode":"\u0645\u0633\u062d \u0631\u0645\u0632 \u0627\u0644\u0627\u0633\u062a\u062c\u0627\u0628\u0629 \u0627\u0644\u0633\u0631\u064a\u0639\u0629",personalDetails:"\u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0634\u062e\u0635\u064a\u0629",companyDetails:"\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0634\u0631\u0643\u0629","companyDetails.name":"\u0627\u0633\u0645 \u0627\u0644\u0634\u0631\u0643\u0629","companyDetails.registrationNumber":"\u0631\u0642\u0645 \u0627\u0644\u062a\u0633\u062c\u064a\u0644",socialSecurityNumber:"\u0631\u0642\u0645 \u0627\u0644\u0636\u0645\u0627\u0646 \u0627\u0644\u0627\u062c\u062a\u0645\u0627\u0639\u064a",firstName:"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0644",infix:"\u0628\u0627\u062f\u0626\u0629",lastName:"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u062e\u064a\u0631",mobileNumber:"\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644","mobileNumber.invalid":"\u0631\u0642\u0645 \u062c\u0648\u0627\u0644 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d",city:"\u0627\u0644\u0645\u062f\u064a\u0646\u0629",postalCode:"\u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0628\u0631\u064a\u062f\u064a",countryCode:"\u0631\u0645\u0632 \u0627\u0644\u0628\u0644\u062f",telephoneNumber:"\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062a\u0641",dateOfBirth:"\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0645\u064a\u0644\u0627\u062f",shopperEmail:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a",gender:"\u0627\u0644\u0646\u0648\u0639",male:"\u0630\u0643\u0631",female:"\u0623\u0646\u062b\u0649",billingAddress:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0641\u0648\u0627\u062a\u064a\u0631",street:"\u0627\u0644\u0634\u0627\u0631\u0639",stateOrProvince:"\u0627\u0644\u0648\u0644\u0627\u064a\u0629 \u0623\u0648 \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629",country:"\u0627\u0644\u0628\u0644\u062f",houseNumberOrName:"\u0631\u0642\u0645 \u0627\u0644\u0645\u0646\u0632\u0644",separateDeliveryAddress:"\u062d\u062f\u062f \u0639\u0646\u0648\u0627\u0646 \u062a\u0633\u0644\u064a\u0645 \u0645\u0646\u0641\u0635\u0644",deliveryAddress:"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u062a\u0633\u0644\u064a\u0645",zipCode:"\u0627\u0644\u0631\u0645\u0632 \u0627\u0644\u0628\u0631\u064a\u062f\u064a",apartmentSuite:"\u0627\u0644\u0634\u0642\u0629 / \u0627\u0644\u062c\u0646\u0627\u062d",provinceOrTerritory:"\u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629 \u0623\u0648 \u0627\u0644\u0625\u0642\u0644\u064a\u0645",cityTown:"\u0627\u0644\u0645\u062f\u064a\u0646\u0629 / \u0627\u0644\u0628\u0644\u062f\u0629",address:"\u0627\u0644\u0639\u0646\u0648\u0627\u0646",state:"\u0627\u0644\u0648\u0644\u0627\u064a\u0629","field.title.optional":"(\u0627\u062e\u062a\u064a\u0627\u0631\u064a)","creditCard.cvcField.title.optional":"\u0631\u0645\u0632 CVC / CVV (\u0627\u062e\u062a\u064a\u0627\u0631\u064a)","issuerList.wallet.placeholder":"\u062d\u062f\u062f \u0645\u062d\u0641\u0638\u062a\u0643",privacyPolicy:"\u0633\u064a\u0627\u0633\u0629 \u0627\u0644\u062e\u0635\u0648\u0635\u064a\u0629","afterPay.agreement":"\u0623\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 %@ \u0644\u0634\u0631\u0643\u0629 AfterPay",paymentConditions:"\u0634\u0631\u0648\u0637 \u0627\u0644\u062f\u0641\u0639",openApp:"\u0641\u062a\u062d \u0627\u0644\u062a\u0637\u0628\u064a\u0642","voucher.readInstructions":"\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u062a\u0639\u0644\u064a\u0645\u0627\u062a","voucher.introduction":"\u0634\u0643\u0631\u064b\u0627 \u0644\u0643 \u0639\u0644\u0649 \u0634\u0631\u0627\u0626\u0643\u060c \u064a\u0631\u062c\u0649 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0642\u0633\u064a\u0645\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629 \u0644\u0625\u062a\u0645\u0627\u0645 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062f\u0641\u0639.","voucher.expirationDate":"\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0627\u0646\u062a\u0647\u0627\u0621","voucher.alternativeReference":"\u0627\u0644\u0645\u0631\u062c\u0639 \u0627\u0644\u0628\u062f\u064a\u0644","dragonpay.voucher.non.bank.selectField.placeholder":"\u062d\u062f\u062f \u0645\u0642\u062f\u0645 \u0627\u0644\u062e\u062f\u0645\u0629","dragonpay.voucher.bank.selectField.placeholder":"\u062d\u062f\u062f \u0627\u0644\u0628\u0646\u0643 \u0627\u0644\u0630\u064a \u062a\u062a\u0639\u0627\u0645\u0644 \u0645\u0639\u0647","voucher.paymentReferenceLabel":"\u0645\u0631\u062c\u0639 \u0627\u0644\u062f\u0641\u0639","voucher.surcharge":"\u0628\u0645\u0627 \u0641\u064a \u0630\u0644\u0643 %@ \u0631\u0633\u0645\u064b\u0627 \u0625\u0636\u0627\u0641\u064a\u064b\u0627","voucher.introduction.doku":"\u0634\u0643\u0631\u064b\u0627 \u0644\u0643 \u0639\u0644\u0649 \u0634\u0631\u0627\u0626\u0643\u060c \u064a\u0631\u062c\u0649 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u0627\u0644\u064a\u0629 \u0644\u0625\u062a\u0645\u0627\u0645 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062f\u0641\u0639.","voucher.shopperName":"\u0627\u0633\u0645 \u0627\u0644\u0645\u062a\u0633\u0648\u0642","voucher.merchantName":"\u0627\u0644\u062a\u0627\u062c\u0631","voucher.introduction.econtext":"\u0634\u0643\u0631\u064b\u0627 \u0644\u0643 \u0639\u0644\u0649 \u0634\u0631\u0627\u0626\u0643\u060c \u064a\u0631\u062c\u0649 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u0627\u0644\u064a\u0629 \u0644\u0625\u062a\u0645\u0627\u0645 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062f\u0641\u0639.","voucher.telephoneNumber":"\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062a\u0641","voucher.shopperReference":"\u0645\u0631\u062c\u0639 \u0627\u0644\u0645\u062a\u0633\u0648\u0642","voucher.collectionInstitutionNumber":"\u0631\u0642\u0645 \u0627\u0644\u0645\u0624\u0633\u0633\u0629 \u0627\u0644\u0645\u0643\u0644\u0641\u0629 \u0628\u0627\u0644\u062a\u062d\u0635\u064a\u0644","voucher.econtext.telephoneNumber.invalid":"\u064a\u062c\u0628 \u0623\u0646 \u064a\u0643\u0648\u0646 \u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062a\u0641 \u0628\u0637\u0648\u0644 10 \u0623\u0648 11 \u0631\u0642\u0645\u064b\u0627","boletobancario.btnLabel":"\u0625\u0646\u0634\u0627\u0621 \u0637\u0631\u064a\u0642\u0629 \u062f\u0641\u0639 Boleto","boleto.sendCopyToEmail":"\u0625\u0631\u0633\u0627\u0644 \u0646\u0633\u062e\u0629 \u0625\u0644\u0649 \u0628\u0631\u064a\u062f\u064a \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a","button.copy":"\u0646\u0633\u062e","button.download":"\u062a\u0646\u0632\u064a\u0644","creditCard.storedCard.description.ariaLabel":"\u062a\u0646\u062a\u0647\u064a \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0645\u062e\u0632\u0646\u0629 \u0641\u064a %@","voucher.entity":"\u0627\u0644\u0643\u064a\u0627\u0646",donateButton:"\u0627\u0644\u062a\u0628\u0631\u0639",notNowButton:"\u0644\u064a\u0633 \u0627\u0644\u0622\u0646",thanksForYourSupport:"\u0634\u0643\u0631\u064b\u0627 \u0639\u0644\u0649 \u062f\u0639\u0645\u0643!",preauthorizeWith:"\u062a\u0641\u0648\u064a\u0636 \u0645\u0633\u0628\u0642 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645",confirmPreauthorization:"\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u062a\u0641\u0648\u064a\u0636 \u0627\u0644\u0645\u0633\u0628\u0642",confirmPurchase:"\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u0634\u0631\u0627\u0621",applyGiftcard:"\u0627\u0633\u062a\u0631\u062f\u0627\u062f",giftcardBalance:"\u0631\u0635\u064a\u062f \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627",deductedBalance:"\u0627\u0644\u0631\u0635\u064a\u062f \u0627\u0644\u0645\u062e\u0635\u0648\u0645","creditCard.pin.title":"\u0631\u0642\u0645 \u0627\u0644\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0634\u062e\u0635\u064a","creditCard.encryptedPassword.label":"\u0623\u0648\u0644 \u0631\u0642\u0645\u0627\u0646 \u0645\u0646 \u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631 \u0627\u0644\u0628\u0637\u0627\u0642\u0629","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\u0643\u0644\u0645\u0629 \u0645\u0631\u0648\u0631 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d\u0629","creditCard.taxNumber.label":"\u062a\u0627\u0631\u064a\u062e \u0645\u064a\u0644\u0627\u062f \u062d\u0627\u0645\u0644 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 (\u064a\u0648\u0645 \u0634\u0647\u0631 \u0633\u0646\u0629) \u0623\u0648 \u0631\u0642\u0645 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u0634\u0631\u0643\u0629 (10 \u0623\u0631\u0642\u0627\u0645)","creditCard.taxNumber.labelAlt":"\u0631\u0642\u0645 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u0634\u0631\u0643\u0629 (10 \u0623\u0631\u0642\u0627\u0645)","creditCard.taxNumber.invalid":"\u062a\u0627\u0631\u064a\u062e \u0645\u064a\u0644\u0627\u062f \u062d\u0627\u0645\u0644 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0623\u0648 \u0631\u0642\u0645 \u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u0634\u0631\u0643\u0629 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","storedPaymentMethod.disable.button":"\u0625\u0632\u0627\u0644\u0629","storedPaymentMethod.disable.confirmation":"\u0625\u0632\u0627\u0644\u0629 \u0637\u0631\u064a\u0642\u0629 \u0627\u0644\u062f\u0641\u0639 \u0627\u0644\u0645\u062e\u0632\u0646\u0629","storedPaymentMethod.disable.confirmButton":"\u0646\u0639\u0645\u060c \u0623\u0631\u063a\u0628 \u0641\u064a \u0625\u0632\u0627\u0644\u062a\u0647\u0627","storedPaymentMethod.disable.cancelButton":"\u0625\u0644\u063a\u0627\u0621","ach.bankAccount":"\u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0628\u0646\u0643\u064a","ach.accountHolderNameField.title":"\u0627\u0633\u0645 \u0635\u0627\u062d\u0628 \u0627\u0644\u062d\u0633\u0627\u0628","ach.accountHolderNameField.placeholder":"\u062c\u0645\u064a\u0644 \u0633\u0639\u064a\u062f","ach.accountHolderNameField.invalid":"\u0627\u0633\u0645 \u0635\u0627\u062d\u0628 \u062d\u0633\u0627\u0628 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","ach.accountNumberField.title":"\u0631\u0642\u0645 \u0627\u0644\u062d\u0633\u0627\u0628","ach.accountNumberField.invalid":"\u0631\u0642\u0645 \u062d\u0633\u0627\u0628 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","ach.accountLocationField.title":"\u0631\u0642\u0645 \u062a\u0648\u062c\u064a\u0647 ABA","ach.accountLocationField.invalid":"\u0631\u0642\u0645 \u062a\u0648\u062c\u064a\u0647 ABA \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","select.state":"\u062d\u062f\u062f \u0627\u0644\u0648\u0644\u0627\u064a\u0629","select.stateOrProvince":"\u062d\u062f\u062f \u0627\u0644\u0648\u0644\u0627\u064a\u0629 \u0623\u0648 \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629","select.provinceOrTerritory":"\u062d\u062f\u062f \u0627\u0644\u0645\u0642\u0627\u0637\u0639\u0629 \u0623\u0648 \u0627\u0644\u0625\u0642\u0644\u064a\u0645","select.country":"\u062d\u062f\u062f \u0627\u0644\u0628\u0644\u062f","select.noOptionsFound":"\u0644\u0627 \u062a\u0648\u062c\u062f \u062e\u064a\u0627\u0631\u0627\u062a","select.filter.placeholder":"\u0628\u062d\u062b...","telephoneNumber.invalid":"\u0631\u0642\u0645 \u0647\u0627\u062a\u0641 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d",qrCodeOrApp:"\u0623\u0648","paypal.processingPayment":"\u062c\u0627\u0631\u0650 \u0645\u0639\u0627\u0644\u062c\u0629 \u0627\u0644\u0645\u062f\u0641\u0648\u0639\u0627\u062a...",generateQRCode:"\u0625\u0646\u0634\u0627\u0621 \u0631\u0645\u0632 \u0627\u0633\u062a\u062c\u0627\u0628\u0629 \u0633\u0631\u064a\u0639\u0629","await.waitForConfirmation":"\u0641\u064a \u0627\u0646\u062a\u0638\u0627\u0631 \u0627\u0644\u062a\u0623\u0643\u064a\u062f","mbway.confirmPayment":"\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u062f\u0641\u0639 \u0639\u0644\u0649 \u062a\u0637\u0628\u064a\u0642 MB WAY","shopperEmail.invalid":"\u0639\u0646\u0648\u0627\u0646 \u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","dateOfBirth.format":"\u064a\u0648\u0645/\u0634\u0647\u0631/\u0633\u0646\u0629","dateOfBirth.invalid":"\u064a\u062c\u0628 \u0623\u0644\u0627 \u064a\u0642\u0644 \u0639\u0645\u0631\u0643 \u0639\u0646 18 \u0639\u0627\u0645\u064b\u0627","blik.confirmPayment":"\u0627\u0641\u062a\u062d \u062a\u0637\u0628\u064a\u0642\u0643 \u0627\u0644\u0628\u0646\u0643\u064a \u0644\u062a\u0623\u0643\u064a\u062f \u0627\u0644\u062f\u0641\u0639.","blik.invalid":"\u0623\u062f\u062e\u0644 6 \u0623\u0631\u0642\u0627\u0645","blik.code":"\u0631\u0645\u0632 \u0645\u0643\u0648\u0646 \u0645\u0646 6 \u0623\u0631\u0642\u0627\u0645","blik.help":"\u0627\u062d\u0635\u0644 \u0639\u0644\u0649 \u0627\u0644\u0631\u0645\u0632 \u0645\u0646 \u062a\u0637\u0628\u064a\u0642\u0643 \u0627\u0644\u0628\u0646\u0643\u064a.","swish.pendingMessage":"\u0628\u0639\u062f \u0642\u064a\u0627\u0645\u0643 \u0628\u0645\u0633\u062d \u0631\u0645\u0632 \u0627\u0644\u0627\u0633\u062a\u062c\u0627\u0628\u0629 \u0627\u0644\u0633\u0631\u064a\u0639\u0629 \u0636\u0648\u0626\u064a\u064b\u0627\u060c \u064a\u0645\u0643\u0646 \u0623\u0646 \u062a\u0638\u0644 \u0627\u0644\u062d\u0627\u0644\u0629 \u0645\u0639\u0644\u0642\u0629 \u0644\u0645\u062f\u0629 \u062a\u0635\u0644 \u0625\u0644\u0649 10 \u062f\u0642\u0627\u0626\u0642. \u0642\u062f \u062a\u0624\u062f\u064a \u0645\u062d\u0627\u0648\u0644\u0629 \u0627\u0644\u062f\u0641\u0639 \u0645\u0631\u0629 \u0623\u062e\u0631\u0649 \u062e\u0644\u0627\u0644 \u0647\u0630\u0627 \u0627\u0644\u0648\u0642\u062a \u0625\u0644\u0649 \u0641\u0631\u0636 \u0631\u0633\u0648\u0645 \u0645\u062a\u0639\u062f\u062f\u0629.","error.va.gen.01":"\u062d\u0642\u0644 \u063a\u064a\u0631 \u0645\u0643\u062a\u0645\u0644","error.va.gen.02":"\u062d\u0642\u0644 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","error.va.sf-cc-num.01":"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","error.va.sf-cc-num.03":"\u062a\u0645 \u0625\u062f\u062e\u0627\u0644 \u0628\u0637\u0627\u0642\u0629 \u063a\u064a\u0631 \u0645\u062f\u0639\u0648\u0645\u0629","error.va.sf-cc-dat.01":"\u0628\u0637\u0627\u0642\u0629 \u0642\u062f\u064a\u0645\u0629 \u062c\u062f\u064b\u0627","error.va.sf-cc-dat.02":"\u0627\u0644\u062a\u0627\u0631\u064a\u062e \u0628\u0639\u064a\u062f \u0644\u0644\u063a\u0627\u064a\u0629 \u0641\u064a \u0627\u0644\u0645\u0633\u062a\u0642\u0628\u0644","error.va.sf-cc-dat.03":"\u062a\u0646\u062a\u0647\u064a \u0635\u0644\u0627\u062d\u064a\u0629 \u0628\u0637\u0627\u0642\u062a\u0643 \u0642\u0628\u0644 \u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0633\u062f\u0627\u062f","error.giftcard.no-balance":"\u0644\u0627 \u064a\u0648\u062c\u062f \u0631\u0635\u064a\u062f \u0628\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627 \u0647\u0630\u0647","error.giftcard.card-error":"\u0644\u0627 \u062a\u0648\u062c\u062f \u0628\u0633\u062c\u0644\u0627\u062a\u0646\u0627 \u0628\u0637\u0627\u0642\u0629 \u0647\u062f\u0627\u064a\u0627 \u062a\u062d\u0645\u0644 \u0647\u0630\u0627 \u0627\u0644\u0631\u0642\u0645","error.giftcard.currency-error":"\u0644\u0627 \u062a\u0633\u0631\u064a \u0628\u0637\u0627\u0642\u0627\u062a \u0627\u0644\u0647\u062f\u0627\u064a\u0627 \u0625\u0644\u0627 \u0628\u0627\u0644\u0639\u0645\u0644\u0629 \u0627\u0644\u062a\u064a \u0635\u062f\u0631\u062a \u0628\u0647\u0627","amazonpay.signout":"\u062a\u0633\u062c\u064a\u0644 \u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0645\u0648\u0642\u0639 Amazon","amazonpay.changePaymentDetails":"\u062a\u063a\u064a\u064a\u0631 \u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u062f\u0641\u0639","partialPayment.warning":"\u062a\u062d\u062f\u064a\u062f \u0637\u0631\u064a\u0642\u0629 \u062f\u0641\u0639 \u0623\u062e\u0631\u0649 \u0644\u062a\u0633\u062f\u064a\u062f \u0627\u0644\u0645\u0628\u0644\u063a \u0627\u0644\u0645\u062a\u0628\u0642\u064a","partialPayment.remainingBalance":"\u0633\u064a\u0628\u0644\u063a \u0627\u0644\u0631\u0635\u064a\u062f \u0627\u0644\u0645\u062a\u0628\u0642\u064a %{amount}","bankTransfer.beneficiary":"\u0627\u0644\u0645\u0633\u062a\u0641\u064a\u062f","bankTransfer.iban":"IBAN","bankTransfer.bic":"\u0643\u0648\u062f \u0627\u0644\u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0628\u0646\u0643\u064a","bankTransfer.reference":"\u0627\u0644\u0645\u0631\u062c\u0639","bankTransfer.introduction":"\u0642\u0645 \u0628\u0627\u0644\u0645\u062a\u0627\u0628\u0639\u0629 \u0644\u0625\u0646\u0634\u0627\u0621 \u0645\u062f\u0641\u0648\u0639\u0627\u062a \u062a\u062d\u0648\u064a\u0644 \u0628\u0646\u0643\u064a\u0629 \u062c\u062f\u064a\u062f\u0629. \u064a\u0645\u0643\u0646\u0643 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0648\u0627\u0631\u062f\u0629 \u0641\u064a \u0627\u0644\u0634\u0627\u0634\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629 \u0644\u0625\u062a\u0645\u0627\u0645 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062f\u0641\u0639.","bankTransfer.instructions":"\u0634\u0643\u0631\u064b\u0627 \u0644\u0643 \u0639\u0644\u0649 \u0634\u0631\u0627\u0626\u0643\u060c \u064a\u0631\u062c\u0649 \u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a \u0627\u0644\u062a\u0627\u0644\u064a\u0629 \u0644\u0625\u062a\u0645\u0627\u0645 \u0639\u0645\u0644\u064a\u0629 \u0627\u0644\u062f\u0641\u0639.","bacs.accountHolderName":"\u0627\u0633\u0645 \u0635\u0627\u062d\u0628 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0628\u0646\u0643\u064a","bacs.accountHolderName.invalid":"\u0627\u0633\u0645 \u0635\u0627\u062d\u0628 \u062d\u0633\u0627\u0628 \u0628\u0646\u0643\u064a \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","bacs.accountNumber":"\u0631\u0642\u0645 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0628\u0646\u0643\u064a","bacs.accountNumber.invalid":"\u0631\u0642\u0645 \u062d\u0633\u0627\u0628 \u0628\u0646\u0643\u064a \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","bacs.bankLocationId":"\u0631\u0645\u0632 \u062a\u0639\u0631\u064a\u0641 \u0627\u0644\u0628\u0646\u0643","bacs.bankLocationId.invalid":"\u0631\u0645\u0632 \u062a\u0639\u0631\u064a\u0641 \u0628\u0646\u0643 \u063a\u064a\u0631 \u0635\u062d\u064a\u062d","bacs.consent.amount":"\u0623\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u062e\u0635\u0645 \u0627\u0644\u0645\u0628\u0644\u063a \u0623\u0639\u0644\u0627\u0647 \u0645\u0646 \u062d\u0633\u0627\u0628\u064a \u0627\u0644\u0628\u0646\u0643\u064a.","bacs.consent.account":"\u0623\u0624\u0643\u062f \u0623\u0646 \u0627\u0644\u062d\u0633\u0627\u0628 \u0628\u0627\u0633\u0645\u064a \u0648\u0623\u0646\u0627 \u0648\u062d\u062f\u064a \u0635\u0627\u062d\u0628 \u0627\u0644\u062a\u0648\u0642\u064a\u0639 \u0627\u0644\u0645\u0637\u0627\u0644\u0628 \u0628\u0627\u0644\u0625\u0630\u0646 \u0628\u0627\u0644\u062e\u0635\u0645 \u0627\u0644\u0645\u0628\u0627\u0634\u0631 \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u062d\u0633\u0627\u0628.",edit:"\u062a\u062d\u0631\u064a\u0631","bacs.confirm":"\u062a\u0623\u0643\u064a\u062f \u0648\u062f\u0641\u0639","bacs.result.introduction":"\u062a\u0646\u0632\u064a\u0644 \u062a\u0639\u0644\u064a\u0645\u0627\u062a \u0627\u0644\u062e\u0635\u0645 \u0627\u0644\u0645\u0628\u0627\u0634\u0631 (\u062a\u0639\u0644\u064a\u0645\u0627\u062a / \u062a\u0641\u0648\u064a\u0636 DDI)","download.pdf":"\u062a\u0646\u0632\u064a\u0644 \u0645\u0644\u0641 PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0631\u0642\u0645 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","creditCard.encryptedCardNumber.aria.label":"\u062d\u0642\u0644 \u0631\u0642\u0645 \u0627\u0644\u0628\u0637\u0627\u0642\u0629","creditCard.encryptedExpiryDate.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u062a\u0627\u0631\u064a\u062e \u0627\u0646\u062a\u0647\u0627\u0621 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","creditCard.encryptedExpiryDate.aria.label":"\u062d\u0642\u0644 \u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0627\u0646\u062a\u0647\u0627\u0621","creditCard.encryptedExpiryMonth.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0634\u0647\u0631 \u0627\u0646\u062a\u0647\u0627\u0621 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","creditCard.encryptedExpiryMonth.aria.label":"\u062d\u0642\u0644 \u0634\u0647\u0631 \u0627\u0644\u0627\u0646\u062a\u0647\u0627\u0621","creditCard.encryptedExpiryYear.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0633\u0646\u0629 \u0627\u0646\u062a\u0647\u0627\u0621 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","creditCard.encryptedExpiryYear.aria.label":"\u062d\u0642\u0644 \u0633\u0646\u0629 \u0627\u0644\u0627\u0646\u062a\u0647\u0627\u0621","creditCard.encryptedSecurityCode.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0631\u0645\u0632 \u0623\u0645\u0627\u0646 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","creditCard.encryptedSecurityCode.aria.label":"\u062d\u0642\u0644 \u0631\u0645\u0632 \u0627\u0644\u0623\u0645\u0627\u0646","giftcard.encryptedCardNumber.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","giftcard.encryptedCardNumber.aria.label":"\u062d\u0642\u0644 \u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627","giftcard.encryptedSecurityCode.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0631\u0645\u0632 \u0623\u0645\u0627\u0646 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627 \u0627\u0644\u0645\u0624\u0645\u0646\u0629","giftcard.encryptedSecurityCode.aria.label":"\u062d\u0642\u0644 \u0631\u0645\u0632 \u0623\u0645\u0627\u0646 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627",giftcardTransactionLimit:"\u064a\u0633\u0645\u062d \u0641\u0642\u0637 \u0628\u062d\u062f \u0623\u0642\u0635\u0649 %{amount} \u0644\u0643\u0644 \u0645\u0639\u0627\u0645\u0644\u0629 \u0639\u0644\u0649 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0647\u062f\u0627\u064a\u0627 \u0647\u0630\u0647","ach.encryptedBankAccountNumber.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0631\u0642\u0645 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0628\u0646\u0643\u064a \u0627\u0644\u0645\u0624\u0645\u0646","ach.encryptedBankAccountNumber.aria.label":"\u062d\u0642\u0644 \u0627\u0644\u062d\u0633\u0627\u0628 \u0627\u0644\u0628\u0646\u0643\u064a","ach.encryptedBankLocationId.aria.iframeTitle":"\u0627\u0644\u0625\u0637\u0627\u0631 \u0627\u0644\u0645\u0636\u0645\u0646 \u0644\u0631\u0642\u0645 \u0627\u0644\u062a\u0648\u062c\u064a\u0647 \u0627\u0644\u0628\u0646\u0643\u064a \u0627\u0644\u0645\u0624\u0645\u0646","ach.encryptedBankLocationId.aria.label":"\u062d\u0642\u0644 \u0631\u0642\u0645 \u0627\u0644\u062a\u0648\u062c\u064a\u0647 \u0627\u0644\u0628\u0646\u0643\u064a","pix.instructions":"\u0627\u0641\u062a\u062d \u0627\u0644\u062a\u0637\u0628\u064a\u0642 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 \u0645\u0641\u062a\u0627\u062d PIX \u0627\u0644\u0645\u0633\u062c\u0644\u060c \u0648\u0627\u062e\u062a\u0631 \u0627\u0644\u062f\u0641\u0639 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 PIX \u0648\u0627\u0645\u0633\u062d \u0631\u0645\u0632 \u0627\u0644\u0627\u0633\u062a\u062c\u0627\u0628\u0629 \u0627\u0644\u0633\u0631\u064a\u0639\u0629 \u0636\u0648\u0626\u064a\u064b\u0627 \u0623\u0648 \u0627\u0646\u0633\u062e \u0627\u0644\u0631\u0645\u0632 \u0648\u0627\u0644\u0635\u0642\u0647"}}),eg=Object.freeze({__proto__:null,default:{payButton:"Zaplatit","payButton.redirecting":"P\u0159esm\u011brov\xe1n\xed...",storeDetails:"Ulo\u017eit pro\xa0p\u0159\xed\u0161t\xed platby","creditCard.holderName":"Jm\xe9no na\xa0kart\u011b","creditCard.holderName.placeholder":"Jan Nov\xe1k","creditCard.holderName.invalid":"Neplatn\xe9 jm\xe9no dr\u017eitele karty","creditCard.numberField.title":"\u010c\xedslo karty","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Konec platnosti","creditCard.expiryDateField.placeholder":"MM/RR","creditCard.expiryDateField.month":"M\u011bs\xedc","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"RR","creditCard.expiryDateField.year":"Rok","creditCard.cvcField.title":"K\xf3d CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Zapamatovat si pro\xa0p\u0159\xed\u0161t\u011b","creditCard.cvcField.placeholder.4digits":"4 \u010d\xedslice","creditCard.cvcField.placeholder.3digits":"3 \u010d\xedslice","creditCard.taxNumber.placeholder":"RRMMDD / 0123456789",installments:"Po\u010det spl\xe1tek",installmentOption:"%{times}\xd7 %{partialValue}",installmentOptionMonths:"%{times} m\u011bs\xedc\u016f","installments.oneTime":"Jednor\xe1zov\xe1 platba","installments.installments":"Platba na\xa0spl\xe1tky","installments.revolving":"Opakuj\xedc\xed se platba","sepaDirectDebit.ibanField.invalid":"Neplatn\xe9 \u010d\xedslo \xfa\u010dtu","sepaDirectDebit.nameField.placeholder":"Jan Nov\xe1k","sepa.ownerName":"Jm\xe9no dr\u017eitele \xfa\u010dtu","sepa.ibanNumber":"\u010c\xedslo \xfa\u010dtu (IBAN)","error.title":"Chyba","error.subtitle.redirect":"P\u0159esm\u011brov\xe1n\xed selhalo","error.subtitle.payment":"Platba selhala","error.subtitle.refused":"Platba zam\xedtnuta","error.message.unknown":"Do\u0161lo k\xa0nezn\xe1m\xe9 chyb\u011b","idealIssuer.selectField.title":"Banka","idealIssuer.selectField.placeholder":"Vyberte svou banku","creditCard.success":"Platba prob\u011bhla \xfasp\u011b\u0161n\u011b",loading:"Na\u010d\xedt\xe1n\xed\u2026",continue:"Pokra\u010dovat",continueTo:"Pokra\u010dovat k","wechatpay.timetopay":"Na\xa0zaplacen\xed v\xe1m zb\xfdv\xe1 %@","wechatpay.scanqrcode":"Naskenovat QR k\xf3d",personalDetails:"Osobn\xed \xfadaje",companyDetails:"\xdadaje o\xa0spole\u010dnosti","companyDetails.name":"N\xe1zev spole\u010dnosti","companyDetails.registrationNumber":"Registra\u010dn\xed \u010d\xedslo",socialSecurityNumber:"Rodn\xe9 \u010d\xedslo",firstName:"Jm\xe9no",infix:"Prefix",lastName:"P\u0159\xedjmen\xed",mobileNumber:"\u010c\xedslo na mobil","mobileNumber.invalid":"Neplatn\xe9 \u010d\xedslo mobiln\xedho telefonu",city:"M\u011bsto",postalCode:"PS\u010c",countryCode:"K\xf3d zem\u011b",telephoneNumber:"Telefonn\xed \u010d\xedslo",dateOfBirth:"Datum narozen\xed",shopperEmail:"E-mailov\xe1 adresa",gender:"Pohlav\xed",male:"Mu\u017e",female:"\u017dena",billingAddress:"Faktura\u010dn\xed adresa",street:"Ulice",stateOrProvince:"Kraj nebo okres",country:"Zem\u011b",houseNumberOrName:"\u010c\xedslo popisn\xe9",separateDeliveryAddress:"Zadat dodac\xed adresu odli\u0161nou od faktura\u010dn\xed",deliveryAddress:"Dodac\xed adresa",zipCode:"PS\u010c",apartmentSuite:"Byt",provinceOrTerritory:"Provincie nebo teritorium",cityTown:"M\u011bsto",address:"Adresa",state:"St\xe1t","field.title.optional":"(nepovinn\xe9)","creditCard.cvcField.title.optional":"K\xf3d CVC/CVV (voliteln\xe9)","issuerList.wallet.placeholder":"Vyberte svou pen\u011b\u017eenku",privacyPolicy:"Z\xe1sady ochrany osobn\xedch \xfadaj\u016f","afterPay.agreement":"Souhlas\xedm s %@ spole\u010dnosti AfterPay",paymentConditions:"platebn\xedmi podm\xednkami",openApp:"Otev\u0159ete aplikaci","voucher.readInstructions":"P\u0159e\u010dt\u011bte si pokyny","voucher.introduction":"D\u011bkujeme za\xa0n\xe1kup. K\xa0dokon\u010den\xed platby pou\u017eijte pros\xedm n\xe1sleduj\xedc\xed kup\xf3n.","voucher.expirationDate":"Datum konce platnosti","voucher.alternativeReference":"N\xe1hradn\xed \u010d\xedslo","dragonpay.voucher.non.bank.selectField.placeholder":"Vyberte sv\xe9ho poskytovatele","dragonpay.voucher.bank.selectField.placeholder":"Vyberte svou banku","voucher.paymentReferenceLabel":"\u010c\xedslo platby","voucher.surcharge":"V\u010detn\u011b p\u0159ir\xe1\u017eky %@","voucher.introduction.doku":"D\u011bkujeme za n\xe1kup. K dokon\u010den\xed platby pou\u017eijte pros\xedm n\xe1sleduj\xedc\xed informace.","voucher.shopperName":"Jm\xe9no kupuj\xedc\xedho","voucher.merchantName":"Obchodn\xedk","voucher.introduction.econtext":"D\u011bkujeme za n\xe1kup. K dokon\u010den\xed platby pou\u017eijte pros\xedm n\xe1sleduj\xedc\xed informace.","voucher.telephoneNumber":"Telefonn\xed \u010d\xedslo","voucher.shopperReference":"\u010c\xedslo kupuj\xedc\xedho","voucher.collectionInstitutionNumber":"\u010c\xedslo inkasn\xed instituce","voucher.econtext.telephoneNumber.invalid":"Telefonn\xed \u010d\xedslo mus\xed obsahovat 10 nebo 11 \u010d\xedslic.","boletobancario.btnLabel":"Vygenerovat Boleto","boleto.sendCopyToEmail":"Poslat mi kopii na e-mail","button.copy":"Kop\xedrovat","button.download":"St\xe1hnout","creditCard.storedCard.description.ariaLabel":"Ulo\u017een\xe1 karta kon\u010d\xed na %@","voucher.entity":"Subjekt",donateButton:"P\u0159isp\u011bt",notNowButton:"Te\u010f ne",thanksForYourSupport:"D\u011bkujeme v\xe1m za podporu!",preauthorizeWith:"P\u0159edautorizovat pomoc\xed",confirmPreauthorization:"Potvrdit p\u0159edautorizaci",confirmPurchase:"Potvrdit n\xe1kup",applyGiftcard:"Uplatnit",giftcardBalance:"Z\u016fstatek na d\xe1rkov\xe9 kart\u011b",deductedBalance:"Ode\u010dten\xfd z\u016fstatek","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"Prvn\xed 2 \u010d\xedslice hesla karty","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Neplatn\xe9 heslo","creditCard.taxNumber.label":"Datum narozen\xed dr\u017eitele karty (RRMMDD) nebo registra\u010dn\xed \u010d\xedslo spole\u010dnosti (10 \u010d\xedslic)","creditCard.taxNumber.labelAlt":"Registra\u010dn\xed \u010d\xedslo spole\u010dnosti (10 \u010d\xedslic)","creditCard.taxNumber.invalid":"Neplatn\xe9 datum narozen\xed dr\u017eitele karty nebo registra\u010dn\xed \u010d\xedslo spole\u010dnosti","storedPaymentMethod.disable.button":"Odebrat","storedPaymentMethod.disable.confirmation":"Odebrat ulo\u017een\xfd zp\u016fsob platby","storedPaymentMethod.disable.confirmButton":"Ano, odebrat","storedPaymentMethod.disable.cancelButton":"Zru\u0161it","ach.bankAccount":"Bankovn\xed \xfa\u010det","ach.accountHolderNameField.title":"Jm\xe9no dr\u017eitele \xfa\u010dtu","ach.accountHolderNameField.placeholder":"Jan Nov\xe1k","ach.accountHolderNameField.invalid":"Neplatn\xe9 jm\xe9no dr\u017eitele \xfa\u010dtu","ach.accountNumberField.title":"\u010c\xedslo \xfa\u010dtu","ach.accountNumberField.invalid":"Neplatn\xe9 \u010d\xedslo \xfa\u010dtu","ach.accountLocationField.title":"Sm\u011brovac\xed tranzitn\xed \u010d\xedslo ABA","ach.accountLocationField.invalid":"Neplatn\xe9 sm\u011brovac\xed tranzitn\xed \u010d\xedslo ABA","select.state":"Vyberte st\xe1t","select.stateOrProvince":"Vyberte kraj nebo okres","select.provinceOrTerritory":"Vyberte provincii nebo teritorium","select.country":"Vyberte zemi","select.noOptionsFound":"Nebyly nalezeny \u017e\xe1dn\xe9 mo\u017enosti","select.filter.placeholder":"Hledat...","telephoneNumber.invalid":"Neplatn\xe9 telefonn\xed \u010d\xedslo",qrCodeOrApp:"nebo","paypal.processingPayment":"Zpracov\xe1n\xed platby...",generateQRCode:"Vygenerovat QR k\xf3d","await.waitForConfirmation":"\u010cek\xe1 se na\xa0potvrzen\xed","mbway.confirmPayment":"Potvr\u010fte platbu v\xa0aplikaci MB WAY","shopperEmail.invalid":"Neplatn\xe1 e-mailov\xe1 adresa","dateOfBirth.format":"DD/MM/RRRR","dateOfBirth.invalid":"Mus\xed v\xe1m b\xfdt alespo\u0148 18 let","blik.confirmPayment":"Spus\u0165te bankovn\xed aplikaci a potvr\u010fte platbu.","blik.invalid":"Zadejte 6 \u010d\xedsel","blik.code":"\u0160estim\xedstn\xfd k\xf3d","blik.help":"Z\xedskejte k\xf3d z bankovn\xed aplikace.","swish.pendingMessage":"Po naskenov\xe1n\xed QR k\xf3du m\u016f\u017ee trvat a\u017e 10 minut, ne\u017e se stav zm\u011bn\xed. Pokud budete zkou\u0161et b\u011bhem t\xe9to doby platbu opakovat, m\u016f\u017ee b\xfdt \u010d\xe1stka zaplacena v\xedcekr\xe1t.","error.va.gen.01":"Ne\xfapln\xe9 pole","error.va.gen.02":"Pole nen\xed platn\xe9","error.va.sf-cc-num.01":"Neplatn\xe9 \u010d\xedslo karty","error.va.sf-cc-num.03":"Zad\xe1na nepodporovan\xe1 karta","error.va.sf-cc-dat.01":"P\u0159\xedli\u0161 star\xe1 karta","error.va.sf-cc-dat.02":"Datum p\u0159\xedli\u0161 daleko v budoucnosti","error.va.sf-cc-dat.03":"Platnost karty vypr\u0161\xed p\u0159ed datem z\xfa\u010dtov\xe1n\xed","error.giftcard.no-balance":"Na d\xe1rkov\xe9 kart\u011b je nulov\xfd z\u016fstatek","error.giftcard.card-error":"V\xa0na\u0161ich z\xe1znamech nen\xed \u017e\xe1dn\xe1 d\xe1rkov\xe1 karta s\xa0t\xedmto \u010d\xedslem","error.giftcard.currency-error":"D\xe1rkov\xe9 karty jsou platn\xe9 jenom v\xa0m\u011bn\u011b, ve kter\xe9 byly vystaven\xe9","amazonpay.signout":"Odhl\xe1sit se z Amazonu","amazonpay.changePaymentDetails":"Zm\u011bnit \xfadaje o platb\u011b","partialPayment.warning":"Zvolte jin\xfd zp\u016fsob platby pro platbu zb\xfdvaj\xedc\xedch","partialPayment.remainingBalance":"Zb\xfdvaj\xedc\xed z\u016fstatek bude %{amount}","bankTransfer.beneficiary":"P\u0159\xedjemce","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Odkaz","bankTransfer.introduction":"Vytvo\u0159te novou platbu bankovn\xedm p\u0159evodem. K dokon\u010den\xed t\xe9to platby m\u016f\u017eete pou\u017e\xedt \xfadaje na n\xe1sleduj\xedc\xed obrazovce.","bankTransfer.instructions":"D\u011bkujeme za n\xe1kup. K dokon\u010den\xed platby pou\u017eijte pros\xedm n\xe1sleduj\xedc\xed informace.","bacs.accountHolderName":"Jm\xe9no dr\u017eitele bankovn\xedho \xfa\u010dtu","bacs.accountHolderName.invalid":"Neplatn\xe9 jm\xe9no dr\u017eitele bankovn\xedho \xfa\u010dtu","bacs.accountNumber":"\u010c\xedslo bankovn\xedho \xfa\u010dtu","bacs.accountNumber.invalid":"Neplatn\xe9 \u010d\xedslo bankovn\xedho \xfa\u010dtu","bacs.bankLocationId":"K\xf3d Sort","bacs.bankLocationId.invalid":"Neplatn\xfd k\xf3d Sort","bacs.consent.amount":"Souhlas\xedm s\xa0t\xedm, \u017ee mi bude n\xe1sleduj\xedc\xed \u010d\xe1stka ode\u010dtena z\xa0bankovn\xedho \xfa\u010dtu.","bacs.consent.account":"Potvrzuji, \u017ee \xfa\u010det je veden na moje jm\xe9no a\xa0jsem jedin\xfdm disponentem, jeho\u017e podpis je nutn\xfd ke schv\xe1len\xed p\u0159\xedm\xe9ho inkasa.",edit:"Editovat","bacs.confirm":"Potvrdit a\xa0zaplatit","bacs.result.introduction":"St\xe1hn\u011bte si pokyny k\xa0p\u0159\xedm\xe9mu inkasu (DDI / podpisov\xe9 pr\xe1vo)","download.pdf":"St\xe1hnout PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe pro \u010d\xedslo zabezpe\u010den\xe9 karty","creditCard.encryptedCardNumber.aria.label":"Pole pro \u010d\xedslo karty","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe pro datum vypr\u0161en\xed platnosti zabezpe\u010den\xe9 karty","creditCard.encryptedExpiryDate.aria.label":"Pole pro datum vypr\u0161en\xed platnosti","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe pro m\u011bs\xedc vypr\u0161en\xed platnosti zabezpe\u010den\xe9 karty","creditCard.encryptedExpiryMonth.aria.label":"Pole pro m\u011bs\xedc vypr\u0161en\xed platnosti","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe pro rok vypr\u0161en\xed platnosti zabezpe\u010den\xe9 karty","creditCard.encryptedExpiryYear.aria.label":"Pole pro rok vypr\u0161en\xed platnosti","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe pro bezpe\u010dnostn\xed k\xf3d zabezpe\u010den\xe9 karty","creditCard.encryptedSecurityCode.aria.label":"Pole pro bezpe\u010dnostn\xed k\xf3d","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe pro \u010d\xedslo zabezpe\u010den\xe9 d\xe1rkov\xe9 karty","giftcard.encryptedCardNumber.aria.label":"Pole pro \u010d\xedslo d\xe1rkov\xe9 karty","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe pro bezpe\u010dnostn\xed k\xf3d zabezpe\u010den\xe9 d\xe1rkov\xe9 karty","giftcard.encryptedSecurityCode.aria.label":"Pole pro bezpe\u010dnostn\xed k\xf3d d\xe1rkov\xe9 karty",giftcardTransactionLimit:"Maxim\xe1ln\xed povolen\xe1 \u010d\xe1stka za jednu transakci touto d\xe1rkovou kartou je %{amount}.","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe pro \u010d\xedslo zabezpe\u010den\xe9ho bankovn\xedho \xfa\u010dtu","ach.encryptedBankAccountNumber.aria.label":"Pole pro bankovn\xed \xfa\u010det","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe pro \u010d\xedslo zabezpe\u010den\xe9ho k\xf3du banky","ach.encryptedBankLocationId.aria.label":"Pole pro k\xf3d banky"}}),tg=Object.freeze({__proto__:null,default:{payButton:"Betal","payButton.redirecting":"Omdirigerer ...",storeDetails:"Gem til min n\xe6ste betaling","creditCard.holderName":"Navn p\xe5 kort","creditCard.holderName.placeholder":"J. Hansen","creditCard.holderName.invalid":"Ugyldigt kortholdernavn","creditCard.numberField.title":"Kortnummer","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Udl\xf8bsdato","creditCard.expiryDateField.placeholder":"MM/\xc5\xc5","creditCard.expiryDateField.month":"M\xe5ned","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"\xc5\xc5","creditCard.expiryDateField.year":"\xc5r","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Husk til n\xe6ste gang","creditCard.cvcField.placeholder.4digits":"4 cifre","creditCard.cvcField.placeholder.3digits":"3 cifre","creditCard.taxNumber.placeholder":"\xc5\xc5MMDD/0123456789",installments:"Antal rater",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} m\xe5neder","installments.oneTime":"Engangsbetaling","installments.installments":"Afdragsbetaling","installments.revolving":"L\xf8bende betaling","sepaDirectDebit.ibanField.invalid":"Ugyldigt kontonummer","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Kontohavernavn","sepa.ibanNumber":"Kontonummer (IBAN)","error.title":"Fejl","error.subtitle.redirect":"Omdirigering fejlede","error.subtitle.payment":"Betaling fejlede","error.subtitle.refused":"Betaling afvist","error.message.unknown":"Der opstod en ukendt fejl","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"V\xe6lg din bank","creditCard.success":"Betaling gennemf\xf8rt",loading:"Indl\xe6ser\u2026",continue:"Forts\xe6t",continueTo:"Forts\xe6t til","wechatpay.timetopay":"Du har %@ at betale","wechatpay.scanqrcode":"Scan QR-kode",personalDetails:"Personlige oplysninger",companyDetails:"Virksomhedsoplysninger","companyDetails.name":"Virksomhedsnavn","companyDetails.registrationNumber":"CVR-nummer",socialSecurityNumber:"CPR-nummer",firstName:"Fornavn",infix:"Pr\xe6fiks",lastName:"Efternavn",mobileNumber:"Mobilnummer","mobileNumber.invalid":"Ugyldigt mobilnummer",city:"By",postalCode:"Postnummer",countryCode:"Landekode",telephoneNumber:"Telefonnummer",dateOfBirth:"F\xf8dselsdato",shopperEmail:"E-mailadresse",gender:"K\xf8n",male:"Mand",female:"Kvinde",billingAddress:"Faktureringsadresse",street:"Gade",stateOrProvince:"Region eller kommune",country:"Land",houseNumberOrName:"Husnummer",separateDeliveryAddress:"Angiv en separat leveringsadresse",deliveryAddress:"Leveringsadresse",zipCode:"Postnummer",apartmentSuite:"Lejlighed/suite",provinceOrTerritory:"Provins eller territorium",cityTown:"By",address:"Adresse",state:"Stat","field.title.optional":"(valgfrit)","creditCard.cvcField.title.optional":"CVC / CVV (valgfrit)","issuerList.wallet.placeholder":"V\xe6lg tegnebog",privacyPolicy:"Politik om privatlivets fred","afterPay.agreement":"Jeg accepterer AfterPays %@",paymentConditions:"betalingsbetingelser",openApp:"\xc5bn appen","voucher.readInstructions":"L\xe6s anvisningerne","voucher.introduction":"Tak for dit k\xf8b. Brug f\xf8lgende kupon til at gennemf\xf8re din betaling.","voucher.expirationDate":"Udl\xf8bsdato","voucher.alternativeReference":"Alternativ reference","dragonpay.voucher.non.bank.selectField.placeholder":"V\xe6lg din udbyder","dragonpay.voucher.bank.selectField.placeholder":"V\xe6lg din bank","voucher.paymentReferenceLabel":"Betalingsreference","voucher.surcharge":"Inkl. till\xe6gsbegyr p\xe5 %@","voucher.introduction.doku":"Tak for dit k\xf8b. Brug f\xf8lgende oplysninger til at gennemf\xf8re din betaling.","voucher.shopperName":"Kundenavn","voucher.merchantName":"S\xe6lger","voucher.introduction.econtext":"Tak for dit k\xf8b. Brug f\xf8lgende oplysninger til at gennemf\xf8re din betaling.","voucher.telephoneNumber":"Telefonnummer","voucher.shopperReference":"K\xf8bers reference","voucher.collectionInstitutionNumber":"Id-nummer til opkr\xe6vningsinstitution","voucher.econtext.telephoneNumber.invalid":"Telefonnummer skal best\xe5 af 10 eller 11 cifre","boletobancario.btnLabel":"Gener\xe9r Boleto","boleto.sendCopyToEmail":"Send en kopi til min e-mail","button.copy":"Kopi\xe9r","button.download":"Download","creditCard.storedCard.description.ariaLabel":"Gemt kort ender p\xe5 %@","voucher.entity":"Enhed",donateButton:"Giv et bidrag",notNowButton:"Ikke nu",thanksForYourSupport:"Tak for din st\xf8tte!",preauthorizeWith:"Forh\xe5ndsgodkend med",confirmPreauthorization:"Bekr\xe6ft forh\xe5ndsgodkendelse",confirmPurchase:"Bekr\xe6ft k\xf8b",applyGiftcard:"Indl\xf8s",giftcardBalance:"Saldo p\xe5 gavekort",deductedBalance:"Fratrukket saldo","creditCard.pin.title":"Pinkode","creditCard.encryptedPassword.label":"F\xf8rste 2 cifre i adgangskode til kort","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Ugyldig adgangskode","creditCard.taxNumber.label":"Kortholders f\xf8dselsdato (\xc5\xc5MMDD) eller virksomheds registreringsnummer (10 cifre)","creditCard.taxNumber.labelAlt":"Virksomheds registreringsnummer (10 cifre)","creditCard.taxNumber.invalid":"Ugyldig f\xf8dselsdato for kortholder eller virksomheds registreringsnummer","storedPaymentMethod.disable.button":"Fjern","storedPaymentMethod.disable.confirmation":"Fjern gemt betalingsm\xe5de","storedPaymentMethod.disable.confirmButton":"Ja, fjern","storedPaymentMethod.disable.cancelButton":"Annuller","ach.bankAccount":"Bankkonto","ach.accountHolderNameField.title":"Kontohavers navn","ach.accountHolderNameField.placeholder":"J. Hansen","ach.accountHolderNameField.invalid":"Ugyldigt kontohavernavn","ach.accountNumberField.title":"Kontonummer","ach.accountNumberField.invalid":"Ugyldigt kontonummer","ach.accountLocationField.title":"ABA-registreringsnummer","ach.accountLocationField.invalid":"Ugyldigt ABA-registreringsnummer","select.state":"V\xe6lg stat","select.stateOrProvince":"V\xe6lg region eller kommune","select.provinceOrTerritory":"V\xe6lg provins eller territorium","select.country":"V\xe6lg land","select.noOptionsFound":"Ingen muligheder fundet","select.filter.placeholder":"S\xf8g ...","telephoneNumber.invalid":"Ugyldigt telefonnummer",qrCodeOrApp:"eller","paypal.processingPayment":"Behandler betaling ...",generateQRCode:"Gener\xe9r QR-kode","await.waitForConfirmation":"Venter p\xe5 bekr\xe6ftelse","mbway.confirmPayment":"Bekr\xe6ft din betaling p\xe5 appen MB WAY","shopperEmail.invalid":"Ugyldig e-mailadresse","dateOfBirth.format":"DD/MM/\xc5\xc5\xc5\xc5","dateOfBirth.invalid":"Du skal v\xe6re mindst 18 \xe5r","blik.confirmPayment":"\xc5bn din bankapp for at bekr\xe6fte betalingen.","blik.invalid":"Indtast 6 tal","blik.code":"6-cifret kode","blik.help":"F\xe5 koden fra din bankapp.","swish.pendingMessage":"Visning af status kan tage op til 10 minutter efter scanning. Et nyt fors\xf8g p\xe5 betaling inden for dette tidsrum kan muligvis medf\xf8re flere gebyrer.","error.va.gen.01":"Felt ikke udfyldt","error.va.gen.02":"Ugyldigt felt","error.va.sf-cc-num.01":"Ugyldigt kortnummer","error.va.sf-cc-num.03":"Ikke-underst\xf8ttet kort indtastet","error.va.sf-cc-dat.01":"Kort for gammelt","error.va.sf-cc-dat.02":"Dato for langt ude i fremtiden","error.va.sf-cc-dat.03":"Dit kort udl\xf8ber f\xf8r betalingsdatoen","error.giftcard.no-balance":"Saldoen p\xe5 gavekortet er 0","error.giftcard.card-error":"Vi har ikke et gavekort med dette nummer i vores optegnelser","error.giftcard.currency-error":"Gavekort er kun gyldige i udstedelsesvalutaen","amazonpay.signout":"Log ud af Amazon","amazonpay.changePaymentDetails":"Skift betalingsoplysninger","partialPayment.warning":"V\xe6lg en anden betalingsm\xe5de til betaling af restbel\xf8bet","partialPayment.remainingBalance":"Restbel\xf8bet vil v\xe6re %{amount}","bankTransfer.beneficiary":"Betalingsmodtager","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.introduction":"Forts\xe6t med at oprette ny betalingsoverf\xf8rsel via bank. Du kan bruge oplysningerne p\xe5 den f\xf8lgende sk\xe6rm til at afslutte betalingen.","bankTransfer.instructions":"Tak for dit k\xf8b. Brug f\xf8lgende oplysninger til at gennemf\xf8re din betaling.","bacs.accountHolderName":"Bankkontohavers navn","bacs.accountHolderName.invalid":"Ugyldigt navn p\xe5 bankkontohaver","bacs.accountNumber":"Bankkontonummer","bacs.accountNumber.invalid":"Ugyldigt bankkontonummer","bacs.bankLocationId":"Registreringsnummer","bacs.bankLocationId.invalid":"Ugyldigt registreringsnummer","bacs.consent.amount":"Jeg accepterer, at bel\xf8bet ovenfor tr\xe6kkes p\xe5 min bankkonto.","bacs.consent.account":"Jeg bekr\xe6fter, at kontoen er i mit navn, og at jeg er den eneste underskriver, der kr\xe6ves for at godkende direkte debitering af kontoen.",edit:"Rediger","bacs.confirm":"Bekr\xe6ft, og betal","bacs.result.introduction":"Download vejledningen til direkte debitering (fuldmagt til direkte debitering)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe til sikret kortnummer","creditCard.encryptedCardNumber.aria.label":"Kortnummerfelt","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe til udl\xf8bsdato for sikret kort","creditCard.encryptedExpiryDate.aria.label":"Felt til udl\xf8bsdato","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe til udl\xf8bsm\xe5ned for sikret kort","creditCard.encryptedExpiryMonth.aria.label":"Felt til udl\xf8bsm\xe5ned","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe til udl\xf8bs\xe5r for sikret kort","creditCard.encryptedExpiryYear.aria.label":"Felt til udl\xf8bs\xe5r","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe til sikkerhedskode for sikret kort","creditCard.encryptedSecurityCode.aria.label":"Felt til sikkerhedskode","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe til nummer for sikret gavekort","giftcard.encryptedCardNumber.aria.label":"Felt til gavekortnummer","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe til sikkerhedskode for sikret gavekort","giftcard.encryptedSecurityCode.aria.label":"Felt til sikkerhedskode for gavekort",giftcardTransactionLimit:"Maks. %{amount} tilladt pr. transaktion p\xe5 dette gavekort","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe til sikret bankkontonummer","ach.encryptedBankAccountNumber.aria.label":"Felt til bankkonto","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe til registreringsnummer for sikret bank","ach.encryptedBankLocationId.aria.label":"Felt til registreringsnummer for bank"}}),rg=Object.freeze({__proto__:null,default:{payButton:"Zahlen","payButton.redirecting":"Umleiten\xa0\u2026",storeDetails:"F\xfcr zuk\xfcnftige Zahlvorg\xe4nge speichern","creditCard.holderName":"Name auf der Karte","creditCard.holderName.placeholder":"A. M\xfcller","creditCard.holderName.invalid":"Ung\xfcltiger Karteninhabername","creditCard.numberField.title":"Kartennummer","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Ablaufdatum","creditCard.expiryDateField.placeholder":"MM/JJ","creditCard.expiryDateField.month":"Monat","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"JJ","creditCard.expiryDateField.year":"Jahr","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"F\xfcr das n\xe4chste Mal speichern","creditCard.cvcField.placeholder.4digits":"4 Stellen","creditCard.cvcField.placeholder.3digits":"3 Stellen","creditCard.taxNumber.placeholder":"JJMMTT/0123456789",installments:"Anzahl der Raten",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} Monate","installments.oneTime":"Einmalige Zahlung","installments.installments":"Ratenzahlung","installments.revolving":"Ratenzahlung","sepaDirectDebit.ibanField.invalid":"Ung\xfcltige Kontonummer","sepaDirectDebit.nameField.placeholder":"L. Schmidt","sepa.ownerName":"Name des Kontoinhabers","sepa.ibanNumber":"Kontonummer (IBAN)","error.title":"Fehler","error.subtitle.redirect":"Weiterleitung fehlgeschlagen","error.subtitle.payment":"Zahlung fehlgeschlagen","error.subtitle.refused":"Zahlvorgang verweigert","error.message.unknown":"Es ist ein unbekannter Fehler aufgetreten.","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"W\xe4hlen Sie Ihre Bank","creditCard.success":"Zahlung erfolgreich",loading:"Laden \u2026",continue:"Weiter",continueTo:"Weiter zu","wechatpay.timetopay":"Sie haben noch %@ um zu zahlen","wechatpay.scanqrcode":"QR-Code scannen",personalDetails:"Pers\xf6nliche Angaben",companyDetails:"Unternehmensdaten","companyDetails.name":"Unternehmensname","companyDetails.registrationNumber":"Registrierungsnummer",socialSecurityNumber:"Sozialversicherungsnummer",firstName:"Vorname",infix:"Vorwahl",lastName:"Nachname",mobileNumber:"Handynummer","mobileNumber.invalid":"Ung\xfcltige Handynummer",city:"Stadt",postalCode:"Postleitzahl",countryCode:"Landesvorwahl",telephoneNumber:"Telefonnummer",dateOfBirth:"Geburtsdatum",shopperEmail:"E-Mail-Adresse",gender:"Geschlecht",male:"M\xe4nnlich",female:"Weiblich",billingAddress:"Rechnungsadresse",street:"Stra\xdfe",stateOrProvince:"Bundesland",country:"Land",houseNumberOrName:"Hausnummer",separateDeliveryAddress:"Abweichende Lieferadresse angeben",deliveryAddress:"Lieferadresse",zipCode:"PLZ",apartmentSuite:"Wohnung/Geschoss",provinceOrTerritory:"Provinz oder Territorium",cityTown:"Ort",address:"Stra\xdfe und Hausnummer",state:"Bundesstaat","field.title.optional":"(optional)","creditCard.cvcField.title.optional":"CVC / CVV (optional)","issuerList.wallet.placeholder":"Virtuelle Brieftasche ausw\xe4hlen",privacyPolicy:"Datenschutz","afterPay.agreement":"Ich bin mit den %@ von AfterPay einverstanden",paymentConditions:"Zahlungsbedingungen",openApp:"App \xf6ffnen","voucher.readInstructions":"Anweisungen lesen","voucher.introduction":"Vielen Dank f\xfcr Ihren Kauf. Bitte schlie\xdfen Sie Ihre Zahlung unter Verwendung des folgenden Gutscheins ab.","voucher.expirationDate":"G\xfcltig bis","voucher.alternativeReference":"Alternative Referenz","dragonpay.voucher.non.bank.selectField.placeholder":"Anbieter ausw\xe4hlen","dragonpay.voucher.bank.selectField.placeholder":"Bank ausw\xe4hlen","voucher.paymentReferenceLabel":"Zahlungsreferenz","voucher.surcharge":"Inkl. % @Zuschlag","voucher.introduction.doku":"Vielen Dank f\xfcr Ihren Kauf. Bitte schlie\xdfen Sie Ihre Zahlung unter Verwendung der folgenden Informationen ab.","voucher.shopperName":"Name des K\xe4ufers","voucher.merchantName":"H\xe4ndler","voucher.introduction.econtext":"Vielen Dank f\xfcr Ihren Kauf. Bitte schlie\xdfen Sie Ihre Zahlung unter Verwendung der folgenden Informationen ab.","voucher.telephoneNumber":"Telefonnummer","voucher.shopperReference":"Kundenreferenz","voucher.collectionInstitutionNumber":"Nummer der Zahlungsannahmestelle","voucher.econtext.telephoneNumber.invalid":"Die Telefonnummer muss 10- oder 11-stellig sein","boletobancario.btnLabel":"Boleto generieren","boleto.sendCopyToEmail":"Eine Kopie an meine E-Mail-Adresse senden","button.copy":"Kopieren","button.download":"Herunterladen","creditCard.storedCard.description.ariaLabel":"Gespeicherte Karte endet auf %@","voucher.entity":"Entit\xe4t",donateButton:"Spenden",notNowButton:"Nicht jetzt",thanksForYourSupport:"Danke f\xfcr Ihre Unterst\xfctzung!",preauthorizeWith:"Vorautorisieren mit",confirmPreauthorization:"Vorautorisierung best\xe4tigen",confirmPurchase:"Kauf best\xe4tigen",applyGiftcard:"Einl\xf6sen",giftcardBalance:"Saldo der Geschenkkarte",deductedBalance:"Abgezogener Betrag","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Die ersten zwei Ziffern des Kartenpassworts","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Ung\xfcltiges Passwort","creditCard.taxNumber.label":"Geburtsdatum des Karteninhabers (JJMMTT) oder Unternehmensregistrierungsnummer (10-stellig)","creditCard.taxNumber.labelAlt":"Unternehmensregistrierungsnummer (10-stellig)","creditCard.taxNumber.invalid":"Ung\xfcltiges Geburtsdatum des Karteninhabers oder ung\xfcltige Unternehmensregistrierungsnummer","storedPaymentMethod.disable.button":"Entfernen","storedPaymentMethod.disable.confirmation":"Gespeicherte Zahlungsmethode entfernen","storedPaymentMethod.disable.confirmButton":"Ja, entfernen","storedPaymentMethod.disable.cancelButton":"Abbrechen","ach.bankAccount":"Bankkonto","ach.accountHolderNameField.title":"Name des Kontoinhabers","ach.accountHolderNameField.placeholder":"A. M\xfcller","ach.accountHolderNameField.invalid":"Ung\xfcltiger Kontoinhabername","ach.accountNumberField.title":"Kontonummer","ach.accountNumberField.invalid":"Ung\xfcltige Kontonummer","ach.accountLocationField.title":"ABA-Nummer","ach.accountLocationField.invalid":"Ung\xfcltige ABA-Nummer","select.state":"Bundesstaat ausw\xe4hlen","select.stateOrProvince":"Bundesland oder Provinz/Region ausw\xe4hlen","select.provinceOrTerritory":"Provinz oder Territorium ausw\xe4hlen","select.country":"Land ausw\xe4hlen","select.noOptionsFound":"Keine Optionen gefunden","select.filter.placeholder":"Suche\xa0\u2026","telephoneNumber.invalid":"Ung\xfcltige Telefonnummer",qrCodeOrApp:"oder","paypal.processingPayment":"Zahlung wird verarbeitet\xa0\u2026",generateQRCode:"QR-Code generieren","await.waitForConfirmation":"Warten auf Best\xe4tigung","mbway.confirmPayment":"Best\xe4tigen Sie Ihre Zahlung in der MB WAY-App","shopperEmail.invalid":"Ung\xfcltige E-Mail-Adresse","dateOfBirth.format":"TT.MM.JJJJ","dateOfBirth.invalid":"Sie m\xfcssen mindestens 18 Jahre alt sein","blik.confirmPayment":"\xd6ffnen Sie Ihre Banking-App, um die Zahlung zu best\xe4tigen.","blik.invalid":"6 Zahlen eingeben","blik.code":"6-stelliger Code","blik.help":"Rufen Sie den Code \xfcber Ihre Banking-App ab.","swish.pendingMessage":"Es kann sein, dass der Status bis zu 10 Minuten nach dem Scan \u201eausstehend\u201c lautet. Wenn Sie w\xe4hrenddessen einen neuen Zahlungsversuch unternehmen, kann es sein, dass Ihnen mehrere Betr\xe4ge in Rechnung gestellt werden.","error.va.gen.01":"Feld nicht ausgef\xfcllt","error.va.gen.02":"Feld ung\xfcltig","error.va.sf-cc-num.01":"Ung\xfcltige Kartennummer","error.va.sf-cc-num.03":"Nicht unterst\xfctzte Karte eingegeben","error.va.sf-cc-dat.01":"Karte zu alt","error.va.sf-cc-dat.02":"Datum zu weit in der Zukunft","error.va.sf-cc-dat.03":"Ihre Karte l\xe4uft vor dem Bezahldatum ab.","error.giftcard.no-balance":"Auf dieser Geschenkkarte ist kein Guthaben vorhanden","error.giftcard.card-error":"Es gibt in unserem System keine Geschenkkarte mit dieser Nummer","error.giftcard.currency-error":"Geschenkkarten sind nur in der W\xe4hrung g\xfcltig, in der sie ausgestellt wurden","amazonpay.signout":"Von Amazon abmelden","amazonpay.changePaymentDetails":"Zahlungsinformationen \xe4ndern","partialPayment.warning":"W\xe4hlen Sie eine andere Zahlungsmethode zur Zahlung des Restbetrags","partialPayment.remainingBalance":"Es verbleibt ein Restbetrag von %{amount}","bankTransfer.beneficiary":"Empf\xe4nger","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referenz","bankTransfer.introduction":"Fortfahren, um eine neue Bank\xfcberweisungszahlung zu erstellen. Sie k\xf6nnen die Informationen auf dem n\xe4chsten Bildschirm verwenden, um diese Zahlung abzuschlie\xdfen.","bankTransfer.instructions":"Vielen Dank f\xfcr Ihren Kauf. Bitte schlie\xdfen Sie Ihre Zahlung unter Verwendung der folgenden Informationen ab.","bacs.accountHolderName":"Name des Bankkontoinhabers","bacs.accountHolderName.invalid":"Ung\xfcltiger Bankkontoinhabername","bacs.accountNumber":"Bankkontonummer","bacs.accountNumber.invalid":"Ung\xfcltige Bankkontonummer","bacs.bankLocationId":"Bankleitzahl","bacs.bankLocationId.invalid":"Ung\xfcltige Bankleitzahl","bacs.consent.amount":"Ich bin damit einverstanden, dass der oben genannte Betrag von meinem Bankkonto abgebucht wird.","bacs.consent.account":"Ich best\xe4tige, dass das Konto unter meinem Namen l\xe4uft und ich der einzige erforderliche Unterzeichner bin, um die Lastschrift f\xfcr dieses Konto zu autorisieren.",edit:"Bearbeiten","bacs.confirm":"Best\xe4tigen und bezahlen","bacs.result.introduction":"Laden Sie Ihre Lastschriftanweisung (DDI/Einzugserm\xe4chtigung) herunter","download.pdf":"PDF herunterladen","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe f\xfcr Nummer der gesicherten Karte","creditCard.encryptedCardNumber.aria.label":"Feld \u201eKartennummer\u201c","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe f\xfcr Ablaufdatum der gesicherten Karte","creditCard.encryptedExpiryDate.aria.label":"Feld \u201eAblaufdatum\u201c","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe f\xfcr Monat des Ablaufdatums der gesicherten Karte","creditCard.encryptedExpiryMonth.aria.label":"Feld \u201eMonat des Ablaufdatums\u201c","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe f\xfcr Jahr des Ablaufdatums der gesicherten Karte","creditCard.encryptedExpiryYear.aria.label":"Feld \u201eJahr des Ablaufdatums\u201c","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe f\xfcr Sicherheitscode der gesicherten Karte","creditCard.encryptedSecurityCode.aria.label":"Feld \u201eSicherheitscode\u201c","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe f\xfcr Geschenkkartennummer der gesicherten Karte","giftcard.encryptedCardNumber.aria.label":"Feld \u201eGeschenkkartennummer\u201c","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe f\xfcr Sicherheitscode der gesicherten Geschenkkarte","giftcard.encryptedSecurityCode.aria.label":"Feld \u201eSicherheitscode der Geschenkkarte\u201c",giftcardTransactionLimit:"Der zul\xe4ssige H\xf6chstbetrag pro Transaktion f\xfcr diese Geschenkkarte ist %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe f\xfcr gesicherte Bankkontonummer","ach.encryptedBankAccountNumber.aria.label":"Feld \u201eBankkonto\u201c","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe f\xfcr gesicherte BLZ","ach.encryptedBankLocationId.aria.label":"Bankleitzahl-Feld"}}),ag=Object.freeze({__proto__:null,default:{payButton:"\u03a0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae","payButton.redirecting":"\u0391\u03bd\u03b1\u03ba\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7...",storeDetails:"\u0391\u03c0\u03bf\u03b8\u03ae\u03ba\u03b5\u03c5\u03c3\u03b7 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03bc\u03bf\u03c5","creditCard.holderName":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03c3\u03c4\u03b7\u03bd \u03ba\u03ac\u03c1\u03c4\u03b1","creditCard.holderName.placeholder":"\u0393. \u03a0\u03b1\u03c0\u03b1\u03b4\u03ac\u03ba\u03b7\u03c2","creditCard.holderName.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03ba\u03b1\u03c4\u03cc\u03c7\u03bf\u03c5 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.numberField.title":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03bb\u03ae\u03be\u03b7\u03c2","creditCard.expiryDateField.placeholder":"\u039c\u039c/\u0395\u0395","creditCard.expiryDateField.month":"\u039c\u03ae\u03bd\u03b1\u03c2","creditCard.expiryDateField.month.placeholder":"\u039c\u039c","creditCard.expiryDateField.year.placeholder":"\u0395\u0395","creditCard.expiryDateField.year":"\u0388\u03c4\u03bf\u03c2","creditCard.cvcField.title":"CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\u0391\u03c0\u03bf\u03bc\u03bd\u03b7\u03bc\u03cc\u03bd\u03b5\u03c5\u03c3\u03b7 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03c6\u03bf\u03c1\u03ac","creditCard.cvcField.placeholder.4digits":"4\u03c8\u03ae\u03c6\u03b9\u03bf\u03c2","creditCard.cvcField.placeholder.3digits":"3\u03c8\u03ae\u03c6\u03b9\u03bf\u03c2","creditCard.taxNumber.placeholder":"\u0395\u0395\u039c\u039c\u0397\u0397 / 0123456789",installments:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03b4\u03cc\u03c3\u03b5\u03c9\u03bd",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} \u03bc\u03ae\u03bd\u03b5\u03c2","installments.oneTime":"\u0395\u03c6\u03ac\u03c0\u03b1\u03be \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae","installments.installments":"\u03a0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03bc\u03b5 \u03b4\u03cc\u03c3\u03b5\u03b9\u03c2","installments.revolving":"\u0391\u03bd\u03b1\u03ba\u03c5\u03ba\u03bb\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae","sepaDirectDebit.ibanField.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","sepaDirectDebit.nameField.placeholder":"\u0393. \u03a0\u03b1\u03c0\u03b1\u03b4\u03ac\u03ba\u03b7\u03c2","sepa.ownerName":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03ba\u03b1\u03c4\u03cc\u03c7\u03bf\u03c5","sepa.ibanNumber":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd (IBAN)","error.title":"\u03a3\u03c6\u03ac\u03bb\u03bc\u03b1","error.subtitle.redirect":"\u0397 \u03b1\u03bd\u03b1\u03ba\u03b1\u03c4\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03b1\u03c0\u03ad\u03c4\u03c5\u03c7\u03b5","error.subtitle.payment":"\u0397 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03b1\u03c0\u03ad\u03c4\u03c5\u03c7\u03b5","error.subtitle.refused":"\u0397 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03b1\u03c0\u03bf\u03c1\u03c1\u03af\u03c6\u03b8\u03b7\u03ba\u03b5","error.message.unknown":"\u03a0\u03c1\u03bf\u03ad\u03ba\u03c5\u03c8\u03b5 \u03ac\u03b3\u03bd\u03c9\u03c3\u03c4\u03bf \u03c3\u03c6\u03ac\u03bb\u03bc\u03b1","idealIssuer.selectField.title":"\u03a4\u03c1\u03ac\u03c0\u03b5\u03b6\u03b1","idealIssuer.selectField.placeholder":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c4\u03c1\u03ac\u03c0\u03b5\u03b6\u03ac \u03c3\u03b1\u03c2","creditCard.success":"\u0397 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03b8\u03b7\u03ba\u03b5 \u03b5\u03c0\u03b9\u03c4\u03c5\u03c7\u03ce\u03c2",loading:"\u03a6\u03cc\u03c1\u03c4\u03c9\u03c3\u03b7...",continue:"\u03a3\u03c5\u03bd\u03ad\u03c7\u03b5\u03b9\u03b1",continueTo:"\u039c\u03b5\u03c4\u03ac\u03b2\u03b1\u03c3\u03b7 \u03c3\u03c4\u03b7\u03bd","wechatpay.timetopay":"\u0388\u03c7\u03b5\u03c4\u03b5 \u03c3\u03c4\u03b7 \u03b4\u03b9\u03ac\u03b8\u03b5\u03c3\u03ae \u03c3\u03b1\u03c2 %@ \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae","wechatpay.scanqrcode":"\u03a3\u03ac\u03c1\u03c9\u03c3\u03b7 \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd QR",personalDetails:"\u03a0\u03c1\u03bf\u03c3\u03c9\u03c0\u03b9\u03ba\u03ac \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1",companyDetails:"\u03a3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1 \u03b5\u03c4\u03b1\u03b9\u03c1\u03b5\u03af\u03b1\u03c2","companyDetails.name":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03b5\u03c4\u03b1\u03b9\u03c1\u03b5\u03af\u03b1\u03c2","companyDetails.registrationNumber":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bc\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5",socialSecurityNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c6\u03bf\u03c1\u03bf\u03bb\u03bf\u03b3\u03b9\u03ba\u03bf\u03cd \u03bc\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5",firstName:"\u038c\u03bd\u03bf\u03bc\u03b1",infix:"\u03a0\u03c1\u03cc\u03b8\u03b5\u03bc\u03b1",lastName:"\u0395\u03c0\u03ce\u03bd\u03c5\u03bc\u03bf",mobileNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03ba\u03b9\u03bd\u03b7\u03c4\u03bf\u03cd","mobileNumber.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03ba\u03b9\u03bd\u03b7\u03c4\u03bf\u03cd",city:"\u03a0\u03cc\u03bb\u03b7",postalCode:"\u03a4\u03b1\u03c7\u03c5\u03b4\u03c1\u03bf\u03bc\u03b9\u03ba\u03cc\u03c2 \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2",countryCode:"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03c7\u03ce\u03c1\u03b1\u03c2",telephoneNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c4\u03b7\u03bb\u03b5\u03c6\u03ce\u03bd\u03bf\u03c5",dateOfBirth:"\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b3\u03ad\u03bd\u03bd\u03b7\u03c3\u03b7\u03c2",shopperEmail:"\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 email",gender:"\u03a6\u03cd\u03bb\u03bf",male:"\u0386\u03bd\u03c4\u03c1\u03b1\u03c2",female:"\u0393\u03c5\u03bd\u03b1\u03af\u03ba\u03b1",billingAddress:"\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03c4\u03b9\u03bc\u03bf\u03bb\u03cc\u03b3\u03b7\u03c3\u03b7\u03c2",street:"\u039f\u03b4\u03cc\u03c2",stateOrProvince:"\u03a0\u03bf\u03bb\u03b9\u03c4\u03b5\u03af\u03b1 \u03ae \u03b5\u03c0\u03b1\u03c1\u03c7\u03af\u03b1",country:"\u03a7\u03ce\u03c1\u03b1",houseNumberOrName:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bf\u03b9\u03ba\u03af\u03b1\u03c2",separateDeliveryAddress:"\u039a\u03b1\u03b8\u03bf\u03c1\u03af\u03c3\u03c4\u03b5 \u03bc\u03b9\u03b1 \u03be\u03b5\u03c7\u03c9\u03c1\u03b9\u03c3\u03c4\u03ae \u03b4\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03c0\u03b1\u03c1\u03ac\u03b4\u03bf\u03c3\u03b7\u03c2",deliveryAddress:"\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 \u03c0\u03b1\u03c1\u03ac\u03b4\u03bf\u03c3\u03b7\u03c2",zipCode:"\u03a4\u03b1\u03c7\u03c5\u03b4\u03c1\u03bf\u03bc\u03b9\u03ba\u03cc\u03c2 \u03ba\u03ce\u03b4\u03b9\u03ba\u03b1\u03c2",apartmentSuite:"\u0394\u03b9\u03b1\u03bc\u03ad\u03c1\u03b9\u03c3\u03bc\u03b1/\u0393\u03c1\u03b1\u03c6\u03b5\u03af\u03bf",provinceOrTerritory:"\u0395\u03c0\u03b1\u03c1\u03c7\u03af\u03b1 \u03ae \u03c0\u03b5\u03c1\u03b9\u03c6\u03ad\u03c1\u03b5\u03b9\u03b1",cityTown:"\u03a0\u03cc\u03bb\u03b7 / \u039a\u03bf\u03b9\u03bd\u03cc\u03c4\u03b7\u03c4\u03b1",address:"\u0394\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7",state:"\u03a0\u03bf\u03bb\u03b9\u03c4\u03b5\u03af\u03b1","field.title.optional":"(\u03c0\u03c1\u03bf\u03b1\u03b9\u03c1\u03b5\u03c4\u03b9\u03ba\u03cc)","creditCard.cvcField.title.optional":"CVC/CVV (\u03c0\u03c1\u03bf\u03b1\u03b9\u03c1\u03b5\u03c4\u03b9\u03ba\u03ac)","issuerList.wallet.placeholder":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c4\u03bf \u03c0\u03bf\u03c1\u03c4\u03bf\u03c6\u03cc\u03bb\u03b9 \u03c3\u03b1\u03c2",privacyPolicy:"\u03a0\u03bf\u03bb\u03b9\u03c4\u03b9\u03ba\u03ae \u03b1\u03c0\u03bf\u03c1\u03c1\u03ae\u03c4\u03bf\u03c5","afterPay.agreement":"\u0391\u03c0\u03bf\u03b4\u03ad\u03c7\u03bf\u03bc\u03b1\u03b9 \u03c4\u03bf\u03c5\u03c2 %@ \u03c4\u03bf\u03c5 AfterPay",paymentConditions:"\u03cc\u03c1\u03bf\u03c5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2",openApp:"\u0386\u03bd\u03bf\u03b9\u03b3\u03bc\u03b1 \u03c4\u03b7\u03c2 \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae\u03c2","voucher.readInstructions":"\u0394\u03b9\u03b1\u03b2\u03ac\u03c3\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03bf\u03b4\u03b7\u03b3\u03af\u03b5\u03c2","voucher.introduction":"\u03a3\u03b1\u03c2 \u03b5\u03c5\u03c7\u03b1\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd\u03bc\u03b5 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b1\u03b3\u03bf\u03c1\u03ac. \u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03bf \u03c0\u03b1\u03c1\u03b1\u03ba\u03ac\u03c4\u03c9 \u03ba\u03bf\u03c5\u03c0\u03cc\u03bd\u03b9 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae.","voucher.expirationDate":"\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03bb\u03ae\u03be\u03b7\u03c2","voucher.alternativeReference":"\u0395\u03bd\u03b1\u03bb\u03bb\u03b1\u03ba\u03c4\u03b9\u03ba\u03ae \u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac","dragonpay.voucher.non.bank.selectField.placeholder":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c4\u03bf\u03bd \u03c0\u03ac\u03c1\u03bf\u03c7\u03cc \u03c3\u03b1\u03c2","dragonpay.voucher.bank.selectField.placeholder":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c4\u03c1\u03ac\u03c0\u03b5\u03b6\u03ac \u03c3\u03b1\u03c2","voucher.paymentReferenceLabel":"\u0391\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2","voucher.surcharge":"\u03a0\u03b5\u03c1\u03b9\u03bb\u03b1\u03bc\u03b2\u03ac\u03bd\u03b5\u03c4\u03b1\u03b9 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03b7 \u03c7\u03c1\u03ad\u03c9\u03c3\u03b7 %@","voucher.introduction.doku":"\u03a3\u03b1\u03c2 \u03b5\u03c5\u03c7\u03b1\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd\u03bc\u03b5 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b1\u03b3\u03bf\u03c1\u03ac. \u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03b1\u03ba\u03cc\u03bb\u03bf\u03c5\u03b8\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae.","voucher.shopperName":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03b1\u03b3\u03bf\u03c1\u03b1\u03c3\u03c4\u03ae","voucher.merchantName":"\u0388\u03bc\u03c0\u03bf\u03c1\u03bf\u03c2","voucher.introduction.econtext":"\u03a3\u03b1\u03c2 \u03b5\u03c5\u03c7\u03b1\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd\u03bc\u03b5 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b1\u03b3\u03bf\u03c1\u03ac. \u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03b1\u03ba\u03cc\u03bb\u03bf\u03c5\u03b8\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae.","voucher.telephoneNumber":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c4\u03b7\u03bb\u03b5\u03c6\u03ce\u03bd\u03bf\u03c5","voucher.shopperReference":"\u0391\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03b1\u03b3\u03bf\u03c1\u03b1\u03c3\u03c4\u03ae","voucher.collectionInstitutionNumber":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c0\u03c1\u03b1\u03ba\u03c4\u03bf\u03c1\u03b5\u03af\u03bf\u03c5 \u03b5\u03b9\u03c3\u03c0\u03c1\u03ac\u03be\u03b5\u03c9\u03bd","voucher.econtext.telephoneNumber.invalid":"\u039f \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c4\u03b7\u03bb\u03b5\u03c6\u03ce\u03bd\u03bf\u03c5 \u03c0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03c0\u03b5\u03c1\u03b9\u03ad\u03c7\u03b5\u03b9 10 \u03ae 11 \u03c8\u03b7\u03c6\u03af\u03b1","boletobancario.btnLabel":"\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 Boleto","boleto.sendCopyToEmail":"\u0391\u03c0\u03bf\u03c3\u03c4\u03bf\u03bb\u03ae \u03b1\u03bd\u03c4\u03b9\u03b3\u03c1\u03ac\u03c6\u03bf\u03c5 \u03c3\u03c4\u03b7 \u03b4\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 email \u03bc\u03bf\u03c5","button.copy":"\u0391\u03bd\u03c4\u03b9\u03b3\u03c1\u03b1\u03c6\u03ae","button.download":"\u039b\u03ae\u03c8\u03b7","creditCard.storedCard.description.ariaLabel":"\u0397 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03bc\u03ad\u03bd\u03b7 \u03ba\u03ac\u03c1\u03c4\u03b1 \u03c4\u03b5\u03bb\u03b5\u03b9\u03ce\u03bd\u03b5\u03b9 \u03c3\u03b5 %@","voucher.entity":"\u039f\u03bd\u03c4\u03cc\u03c4\u03b7\u03c4\u03b1",donateButton:"\u0394\u03c9\u03c1\u03b5\u03ac",notNowButton:"\u038c\u03c7\u03b9 \u03c4\u03ce\u03c1\u03b1",thanksForYourSupport:"\u03a3\u03b1\u03c2 \u03b5\u03c5\u03c7\u03b1\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd\u03bc\u03b5 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03c5\u03c0\u03bf\u03c3\u03c4\u03ae\u03c1\u03b9\u03be\u03b7!",preauthorizeWith:"\u03a0\u03c1\u03bf\u03b5\u03be\u03bf\u03c5\u03c3\u03b9\u03bf\u03b4\u03cc\u03c4\u03b7\u03c3\u03b7 \u03bc\u03b5",confirmPreauthorization:"\u0395\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7 \u03c0\u03c1\u03bf\u03b5\u03be\u03bf\u03c5\u03c3\u03b9\u03bf\u03b4\u03cc\u03c4\u03b7\u03c3\u03b7\u03c2",confirmPurchase:"\u0395\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7 \u03b1\u03b3\u03bf\u03c1\u03ac\u03c2",applyGiftcard:"\u0395\u03be\u03b1\u03c1\u03b3\u03cd\u03c1\u03c9\u03c3\u03b7",giftcardBalance:"\u03a5\u03c0\u03cc\u03bb\u03bf\u03b9\u03c0\u03bf \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1\u03c2",deductedBalance:"\u03a5\u03c0\u03cc\u03bb\u03bf\u03b9\u03c0\u03bf \u03c0\u03bf\u03c5 \u03b1\u03c6\u03b1\u03b9\u03c1\u03ad\u03b8\u03b7\u03ba\u03b5","creditCard.pin.title":"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 PIN","creditCard.encryptedPassword.label":"\u03a4\u03b1 \u03c0\u03c1\u03ce\u03c4\u03b1 2 \u03c8\u03b7\u03c6\u03af\u03b1 \u03c4\u03bf\u03c5 \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2 \u03c4\u03b7\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03c0\u03c1\u03cc\u03c3\u03b2\u03b1\u03c3\u03b7\u03c2","creditCard.taxNumber.label":"\u0397\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b3\u03ad\u03bd\u03bd\u03b7\u03c3\u03b7\u03c2 \u03ba\u03b1\u03c4\u03cc\u03c7\u03bf\u03c5 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2 (YYMMDD) \u03ae \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bc\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 \u03b5\u03c4\u03b1\u03b9\u03c1\u03b5\u03b9\u03ce\u03bd (10 \u03c8\u03b7\u03c6\u03af\u03b1)","creditCard.taxNumber.labelAlt":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bc\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 \u03b5\u03c4\u03b1\u03b9\u03c1\u03b5\u03b9\u03ce\u03bd (10 \u03c8\u03b7\u03c6\u03af\u03b1)","creditCard.taxNumber.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03b7 \u03b7\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b3\u03ad\u03bd\u03bd\u03b7\u03c3\u03b7\u03c2 \u03ba\u03b1\u03c4\u03cc\u03c7\u03bf\u03c5 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2 \u03ae \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bc\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 \u03b5\u03c4\u03b1\u03b9\u03c1\u03b5\u03b9\u03ce\u03bd","storedPaymentMethod.disable.button":"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7","storedPaymentMethod.disable.confirmation":"\u0391\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7 \u03b1\u03c0\u03bf\u03b8\u03b7\u03ba\u03b5\u03c5\u03bc\u03ad\u03bd\u03bf\u03c5 \u03c4\u03c1\u03cc\u03c0\u03bf\u03c5 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2","storedPaymentMethod.disable.confirmButton":"\u039d\u03b1\u03b9, \u03b1\u03c6\u03b1\u03af\u03c1\u03b5\u03c3\u03b7","storedPaymentMethod.disable.cancelButton":"\u0386\u03ba\u03c5\u03c1\u03bf","ach.bankAccount":"\u03a4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03cc\u03c2 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03cc\u03c2","ach.accountHolderNameField.title":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03ba\u03b1\u03c4\u03cc\u03c7\u03bf\u03c5 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","ach.accountHolderNameField.placeholder":"\u0393. \u03a0\u03b1\u03c0\u03b1\u03b4\u03ac\u03ba\u03b7\u03c2","ach.accountHolderNameField.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03ba\u03b1\u03c4\u03cc\u03c7\u03bf\u03c5 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","ach.accountNumberField.title":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","ach.accountNumberField.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","ach.accountLocationField.title":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03b4\u03c1\u03bf\u03bc\u03bf\u03bb\u03cc\u03b3\u03b7\u03c3\u03b7\u03c2 ABA","ach.accountLocationField.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03b4\u03c1\u03bf\u03bc\u03bf\u03bb\u03cc\u03b3\u03b7\u03c3\u03b7\u03c2 ABA","select.state":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c0\u03bf\u03bb\u03b9\u03c4\u03b5\u03af\u03b1","select.stateOrProvince":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c0\u03bf\u03bb\u03b9\u03c4\u03b5\u03af\u03b1 \u03ae \u03b5\u03c0\u03b1\u03c1\u03c7\u03af\u03b1","select.provinceOrTerritory":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03b5\u03c0\u03b1\u03c1\u03c7\u03af\u03b1 \u03ae \u03c0\u03b5\u03c1\u03b9\u03c6\u03ad\u03c1\u03b5\u03b9\u03b1","select.country":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03c7\u03ce\u03c1\u03b1","select.noOptionsFound":"\u0394\u03b5\u03bd \u03b2\u03c1\u03ad\u03b8\u03b7\u03ba\u03b1\u03bd \u03b5\u03c0\u03b9\u03bb\u03bf\u03b3\u03ad\u03c2","select.filter.placeholder":"\u0391\u03bd\u03b1\u03b6\u03ae\u03c4\u03b7\u03c3\u03b7...","telephoneNumber.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c4\u03b7\u03bb\u03b5\u03c6\u03ce\u03bd\u03bf\u03c5",qrCodeOrApp:"\u03ae","paypal.processingPayment":"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2...",generateQRCode:"\u0394\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03af\u03b1 \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd QR","await.waitForConfirmation":"\u0391\u03bd\u03b1\u03bc\u03bf\u03bd\u03ae \u03b3\u03b9\u03b1 \u03b5\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7\u2026","mbway.confirmPayment":"\u0395\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03b9\u03ce\u03c3\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03c3\u03c4\u03b7\u03bd \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae MB WAY","shopperEmail.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03b7 \u03b4\u03b9\u03b5\u03cd\u03b8\u03c5\u03bd\u03c3\u03b7 email","dateOfBirth.format":"\u0397\u0397/\u039c\u039c/\u0395\u0395\u0395\u0395","dateOfBirth.invalid":"\u03a0\u03c1\u03ad\u03c0\u03b5\u03b9 \u03bd\u03b1 \u03b5\u03af\u03c3\u03c4\u03b5 \u03c4\u03bf\u03c5\u03bb\u03ac\u03c7\u03b9\u03c3\u03c4\u03bf\u03bd 18 \u03b5\u03c4\u03ce\u03bd","blik.confirmPayment":"\u0391\u03bd\u03bf\u03af\u03be\u03c4\u03b5 \u03c4\u03b7\u03bd \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03ae\u03c2 \u03c3\u03b1\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03b5\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03b9\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae.","blik.invalid":"\u0395\u03b9\u03c3\u03b1\u03b3\u03ac\u03b3\u03b5\u03c4\u03b5 6 \u03c8\u03b7\u03c6\u03af\u03b1","blik.code":"6\u03c8\u03ae\u03c6\u03b9\u03bf\u03c2 \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2","blik.help":"\u039b\u03ac\u03b2\u03b5\u03c4\u03b5 \u03c4\u03bf\u03bd \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03b5\u03c6\u03b1\u03c1\u03bc\u03bf\u03b3\u03ae \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03ae\u03c2 \u03c3\u03b1\u03c2.","swish.pendingMessage":"\u039c\u03b5\u03c4\u03ac \u03c4\u03b7 \u03c3\u03ac\u03c1\u03c9\u03c3\u03b7, \u03b7 \u03ba\u03b1\u03c4\u03ac\u03c3\u03c4\u03b1\u03c3\u03b7 \u03bc\u03c0\u03bf\u03c1\u03b5\u03af \u03bd\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03b5\u03ba\u03ba\u03c1\u03b5\u03bc\u03ae\u03c2 \u03b3\u03b9\u03b1 \u03ad\u03c9\u03c2 10 \u03bb\u03b5\u03c0\u03c4\u03ac. \u0397 \u03b1\u03c0\u03cc\u03c0\u03b5\u03b9\u03c1\u03b1 \u03b5\u03ba \u03bd\u03ad\u03bf\u03c5 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2 \u03b5\u03bd\u03c4\u03cc\u03c2 \u03b1\u03c5\u03c4\u03bf\u03cd \u03c4\u03bf\u03c5 \u03c7\u03c1\u03bf\u03bd\u03b9\u03ba\u03bf\u03cd \u03b4\u03b9\u03b1\u03c3\u03c4\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2 \u03b5\u03bd\u03b4\u03ad\u03c7\u03b5\u03c4\u03b1\u03b9 \u03bd\u03b1 \u03c0\u03c1\u03bf\u03ba\u03b1\u03bb\u03ad\u03c3\u03b5\u03b9 \u03c0\u03c1\u03cc\u03c3\u03b8\u03b5\u03c4\u03b7 \u03c7\u03c1\u03ad\u03c9\u03c3\u03b7.","error.va.gen.01":"\u0395\u03bb\u03bb\u03b9\u03c0\u03ad\u03c2 \u03c0\u03b5\u03b4\u03af\u03bf","error.va.gen.02":"\u03a4\u03bf \u03c0\u03b5\u03b4\u03af\u03bf \u03b4\u03b5\u03bd \u03b5\u03af\u03bd\u03b1\u03b9 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf","error.va.sf-cc-num.01":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","error.va.sf-cc-num.03":"\u0395\u03b9\u03c3\u03ac\u03c7\u03b8\u03b7\u03ba\u03b5 \u03bc\u03b7 \u03c5\u03c0\u03bf\u03c3\u03c4\u03b7\u03c1\u03b9\u03b6\u03cc\u03bc\u03b5\u03bd\u03b7 \u03ba\u03ac\u03c1\u03c4\u03b1","error.va.sf-cc-dat.01":"\u0397 \u03ba\u03ac\u03c1\u03c4\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c0\u03bf\u03bb\u03cd \u03c0\u03b1\u03bb\u03b9\u03ac","error.va.sf-cc-dat.02":"\u0397 \u03b7\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c0\u03bf\u03bb\u03cd \u03bc\u03b1\u03ba\u03c1\u03b9\u03bd\u03ae","error.va.sf-cc-dat.03":"\u0397 \u03ba\u03ac\u03c1\u03c4\u03b1 \u03c3\u03b1\u03c2 \u03bb\u03ae\u03b3\u03b5\u03b9 \u03c0\u03c1\u03b9\u03bd \u03b1\u03c0\u03cc \u03c4\u03b7\u03bd \u03b7\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03b1\u03bd\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7\u03c2","error.giftcard.no-balance":"\u0397 \u03c3\u03c5\u03b3\u03ba\u03b5\u03ba\u03c1\u03b9\u03bc\u03ad\u03bd\u03b7 \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1 \u03ad\u03c7\u03b5\u03b9 \u03bc\u03b7\u03b4\u03b5\u03bd\u03b9\u03ba\u03cc \u03c5\u03c0\u03cc\u03bb\u03bf\u03b9\u03c0\u03bf","error.giftcard.card-error":"\u03a3\u03c4\u03b1 \u03b1\u03c1\u03c7\u03b5\u03af\u03b1 \u03bc\u03b1\u03c2 \u03b4\u03b5\u03bd \u03c5\u03c0\u03ac\u03c1\u03c7\u03b5\u03b9 \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1 \u03bc\u03b5 \u03b1\u03c5\u03c4\u03cc\u03bd \u03c4\u03bf\u03bd \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc","error.giftcard.currency-error":"\u039f\u03b9 \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b5\u03c2 \u03b9\u03c3\u03c7\u03cd\u03bf\u03c5\u03bd \u03bc\u03cc\u03bd\u03bf \u03b3\u03b9\u03b1 \u03c4\u03bf \u03bd\u03cc\u03bc\u03b9\u03c3\u03bc\u03b1 \u03c3\u03c4\u03bf \u03bf\u03c0\u03bf\u03af\u03bf \u03b5\u03ba\u03b4\u03cc\u03b8\u03b7\u03ba\u03b1\u03bd","amazonpay.signout":"\u0391\u03c0\u03bf\u03c3\u03cd\u03bd\u03b4\u03b5\u03c3\u03b7 \u03b1\u03c0\u03cc \u03c4\u03bf Amazon","amazonpay.changePaymentDetails":"\u0391\u03bb\u03bb\u03b1\u03b3\u03ae \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03c9\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2","partialPayment.warning":"\u0395\u03c0\u03b9\u03bb\u03ad\u03be\u03c4\u03b5 \u03ad\u03bd\u03b1\u03bd \u03ac\u03bb\u03bb\u03bf \u03c4\u03c1\u03cc\u03c0\u03bf \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae\u03c2 \u03b3\u03b9\u03b1 \u03ba\u03b1\u03c4\u03b1\u03b2\u03bf\u03bb\u03ae \u03c4\u03bf\u03c5 \u03b5\u03bd\u03b1\u03c0\u03bf\u03bc\u03b5\u03af\u03bd\u03b1\u03bd\u03c4\u03bf\u03c2 \u03c0\u03bf\u03c3\u03bf\u03cd","partialPayment.remainingBalance":"\u03a4\u03bf \u03c5\u03c0\u03cc\u03bb\u03bf\u03b9\u03c0\u03bf \u03b8\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 %{amount}","bankTransfer.beneficiary":"\u0394\u03b9\u03ba\u03b1\u03b9\u03bf\u03cd\u03c7\u03bf\u03c2","bankTransfer.iban":"\u0399\u0392\u0391\u039d","bankTransfer.bic":"BIC","bankTransfer.reference":"\u0391\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac","bankTransfer.introduction":"\u03a3\u03c5\u03bd\u03b5\u03c7\u03af\u03c3\u03c4\u03b5 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03b4\u03b7\u03bc\u03b9\u03bf\u03c5\u03c1\u03b3\u03ae\u03c3\u03b5\u03c4\u03b5 \u03bd\u03ad\u03b1 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae \u03bc\u03ad\u03c3\u03c9 \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03ae\u03c2 \u03bc\u03b5\u03c4\u03b1\u03c6\u03bf\u03c1\u03ac\u03c2. \u039c\u03c0\u03bf\u03c1\u03b5\u03af\u03c4\u03b5 \u03bd\u03b1 \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b1 \u03c3\u03c4\u03bf\u03b9\u03c7\u03b5\u03af\u03b1 \u03c3\u03c4\u03b7\u03bd \u03b1\u03ba\u03cc\u03bb\u03bf\u03c5\u03b8\u03b7 \u03bf\u03b8\u03cc\u03bd\u03b7 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae.","bankTransfer.instructions":"\u03a3\u03b1\u03c2 \u03b5\u03c5\u03c7\u03b1\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd\u03bc\u03b5 \u03b3\u03b9\u03b1 \u03c4\u03b7\u03bd \u03b1\u03b3\u03bf\u03c1\u03ac. \u03a7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03ae\u03c3\u03c4\u03b5 \u03c4\u03b9\u03c2 \u03b1\u03ba\u03cc\u03bb\u03bf\u03c5\u03b8\u03b5\u03c2 \u03c0\u03bb\u03b7\u03c1\u03bf\u03c6\u03bf\u03c1\u03af\u03b5\u03c2 \u03b3\u03b9\u03b1 \u03bd\u03b1 \u03bf\u03bb\u03bf\u03ba\u03bb\u03b7\u03c1\u03ce\u03c3\u03b5\u03c4\u03b5 \u03c4\u03b7\u03bd \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae.","bacs.accountHolderName":"\u038c\u03bd\u03bf\u03bc\u03b1 \u03b4\u03b9\u03ba\u03b1\u03b9\u03bf\u03cd\u03c7\u03bf\u03c5 \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03bf\u03cd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","bacs.accountHolderName.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf \u03cc\u03bd\u03bf\u03bc\u03b1 \u03b4\u03b9\u03ba\u03b1\u03b9\u03bf\u03cd\u03c7\u03bf\u03c5 \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03bf\u03cd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","bacs.accountNumber":"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03bf\u03cd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","bacs.accountNumber.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03bf\u03cd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","bacs.bankLocationId":"\u039a\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03c4\u03c1\u03ac\u03c0\u03b5\u03b6\u03b1\u03c2","bacs.bankLocationId.invalid":"\u039c\u03b7 \u03ad\u03b3\u03ba\u03c5\u03c1\u03bf\u03c2 \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc\u03c2 \u03c4\u03c1\u03ac\u03c0\u03b5\u03b6\u03b1\u03c2","bacs.consent.amount":"\u0391\u03c0\u03bf\u03b4\u03ad\u03c7\u03bf\u03bc\u03b1\u03b9 \u03cc\u03c4\u03b9 \u03c4\u03bf \u03c0\u03b9\u03bf \u03c0\u03ac\u03bd\u03c9 \u03c0\u03bf\u03c3\u03cc \u03b8\u03b1 \u03b1\u03c6\u03b1\u03b9\u03c1\u03b5\u03b8\u03b5\u03af \u03b1\u03c0\u03cc \u03c4\u03bf\u03bd \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03cc \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03cc \u03bc\u03bf\u03c5.","bacs.consent.account":"\u0395\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03b9\u03ce\u03bd\u03c9 \u03cc\u03c4\u03b9 \u03bf \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03cc\u03c2 \u03b5\u03af\u03bd\u03b1\u03b9 \u03c3\u03c4\u03bf \u03cc\u03bd\u03bf\u03bc\u03ac \u03bc\u03bf\u03c5 \u03ba\u03b1\u03b9 \u03c0\u03c9\u03c2 \u03b5\u03af\u03bc\u03b1\u03b9 \u03bf/\u03b7 \u03bc\u03bf\u03bd\u03b1\u03b4\u03b9\u03ba\u03cc\u03c2/\u03bc\u03bf\u03bd\u03b1\u03b4\u03b9\u03ba\u03ae \u03c5\u03c0\u03bf\u03b3\u03c1\u03ac\u03c6\u03c9\u03bd/\u03c5\u03c0\u03bf\u03b3\u03c1\u03ac\u03c6\u03bf\u03c5\u03c3\u03b1 \u03c0\u03bf\u03c5 \u03b1\u03c0\u03b1\u03b9\u03c4\u03b5\u03af\u03c4\u03b1\u03b9 \u03b3\u03b9\u03b1 \u03b5\u03be\u03bf\u03c5\u03c3\u03b9\u03bf\u03b4\u03cc\u03c4\u03b7\u03c3\u03b7 \u03c4\u03b7\u03c2 \u0386\u03bc\u03b5\u03c3\u03b7\u03c2 \u03a7\u03c1\u03ad\u03c9\u03c3\u03b7\u03c2 \u03c3\u03b5 \u03b1\u03c5\u03c4\u03cc\u03bd \u03c4\u03bf\u03bd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03cc.",edit:"\u0395\u03c0\u03b5\u03be\u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1","bacs.confirm":"\u0395\u03c0\u03b9\u03b2\u03b5\u03b2\u03b1\u03af\u03c9\u03c3\u03b7 \u03ba\u03b1\u03b9 \u03c0\u03bb\u03b7\u03c1\u03c9\u03bc\u03ae","bacs.result.introduction":"\u039a\u03b1\u03c4\u03b5\u03b2\u03ac\u03c3\u03c4\u03b5 \u03c4\u03b7\u03bd \u0395\u03bd\u03c4\u03bf\u03bb\u03ae \u0386\u03bc\u03b5\u03c3\u03b7\u03c2 \u03a7\u03c1\u03ad\u03c9\u03c3\u03b7\u03c2 (DDI/\u0395\u03bd\u03c4\u03bf\u03bb\u03ae)","download.pdf":"\u039b\u03ae\u03c8\u03b7 PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedCardNumber.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03b1\u03c1\u03b9\u03b8\u03bc\u03bf\u03cd \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03b7\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1 \u03bb\u03ae\u03be\u03b7\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedExpiryDate.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03b7\u03bc\u03b5\u03c1\u03bf\u03bc\u03b7\u03bd\u03af\u03b1\u03c2 \u03bb\u03ae\u03be\u03b7\u03c2","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03bc\u03ae\u03bd\u03b1 \u03bb\u03ae\u03be\u03b7\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedExpiryMonth.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03bc\u03ae\u03bd\u03b1 \u03bb\u03ae\u03be\u03b7\u03c2","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ad\u03c2 \u03ad\u03c4\u03bf\u03c2 \u03bb\u03ae\u03be\u03b7\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedExpiryYear.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03ad\u03c4\u03bf\u03c5\u03c2 \u03bb\u03ae\u03be\u03b7\u03c2","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc \u03b1\u03c3\u03c6\u03b1\u03bb\u03b5\u03af\u03b1\u03c2 \u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","creditCard.encryptedSecurityCode.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd \u03b1\u03c3\u03c6\u03b1\u03bb\u03b5\u03af\u03b1\u03c2","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","giftcard.encryptedCardNumber.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03b1\u03c1\u03b9\u03b8\u03bc\u03bf\u03cd \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03ba\u03c9\u03b4\u03b9\u03ba\u03cc \u03b1\u03c3\u03c6\u03b1\u03bb\u03b5\u03af\u03b1\u03c2 \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1\u03c2","giftcard.encryptedSecurityCode.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd \u03b1\u03c3\u03c6\u03b1\u03bb\u03b5\u03af\u03b1\u03c2 \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1\u03c2",giftcardTransactionLimit:"\u03a4\u03bf \u03bc\u03ad\u03b3\u03b9\u03c3\u03c4\u03bf \u03b5\u03c0\u03b9\u03c4\u03c1\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u03c0\u03bf\u03c3\u03cc \u03b1\u03bd\u03ac \u03c3\u03c5\u03bd\u03b1\u03bb\u03bb\u03b1\u03b3\u03ae \u03c3\u03b5 \u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7 \u03b4\u03c9\u03c1\u03bf\u03ba\u03ac\u03c1\u03c4\u03b1 \u03b5\u03af\u03bd\u03b1\u03b9 %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03bf\u03cd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","ach.encryptedBankAccountNumber.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03c4\u03c1\u03b1\u03c0\u03b5\u03b6\u03b9\u03ba\u03bf\u03cd \u03bb\u03bf\u03b3\u03b1\u03c1\u03b9\u03b1\u03c3\u03bc\u03bf\u03cd","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe \u03b3\u03b9\u03b1 \u03b1\u03c3\u03c6\u03b1\u03bb\u03ae \u03b1\u03c1\u03b9\u03b8\u03bc\u03cc \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd \u03c5\u03c0\u03bf\u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2 \u03c4\u03c1\u03ac\u03c0\u03b5\u03b6\u03b1\u03c2","ach.encryptedBankLocationId.aria.label":"\u03a0\u03b5\u03b4\u03af\u03bf \u03b1\u03c1\u03b9\u03b8\u03bc\u03bf\u03cd \u03ba\u03c9\u03b4\u03b9\u03ba\u03bf\u03cd \u03c5\u03c0\u03bf\u03ba\u03b1\u03c4\u03b1\u03c3\u03c4\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2 \u03c4\u03c1\u03ac\u03c0\u03b5\u03b6\u03b1\u03c2"}}),ng=Object.freeze({__proto__:null,default:{payButton:"Pagar","payButton.redirecting":"Redirigiendo...",storeDetails:"Recordar para mi pr\xf3ximo pago","creditCard.holderName":"Nombre en la tarjeta","creditCard.holderName.placeholder":"Juan P\xe9rez","creditCard.holderName.invalid":"Nombre del titular de tarjeta no v\xe1lido","creditCard.numberField.title":"N\xfamero de tarjeta","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Fecha de expiraci\xf3n","creditCard.expiryDateField.placeholder":"MM/AA","creditCard.expiryDateField.month":"Mes","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"AA","creditCard.expiryDateField.year":"A\xf1o","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Recordar para la pr\xf3xima vez","creditCard.cvcField.placeholder.4digits":"4 d\xedgitos","creditCard.cvcField.placeholder.3digits":"3 d\xedgitos","creditCard.taxNumber.placeholder":"YYMMDD/0123456789",installments:"N\xfamero de plazos",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times}\xa0meses","installments.oneTime":"Pago \xfanico","installments.installments":"Pago fraccionado","installments.revolving":"Pago rotativo","sepaDirectDebit.ibanField.invalid":"N\xfamero de cuenta no v\xe1lido","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Nombre del titular de cuenta","sepa.ibanNumber":"N\xfamero de cuenta (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirecci\xf3n fallida","error.subtitle.payment":"Pago fallido","error.subtitle.refused":"Pago rechazado","error.message.unknown":"Se ha producido un error desconocido","idealIssuer.selectField.title":"Banco","idealIssuer.selectField.placeholder":"Seleccione su banco","creditCard.success":"Pago realizado correctamente",loading:"Cargando...",continue:"Continuar",continueTo:"Continuar a","wechatpay.timetopay":"Tiene %@ para pagar","wechatpay.scanqrcode":"Escanear c\xf3digo QR",personalDetails:"Datos personales",companyDetails:"Datos de la empresa","companyDetails.name":"Nombre de la empresa","companyDetails.registrationNumber":"N\xfamero de registro",socialSecurityNumber:"N\xfamero de seguridad social",firstName:"Nombre",infix:"Prefijo",lastName:"Apellidos",mobileNumber:"Tel\xe9fono m\xf3vil","mobileNumber.invalid":"N\xfamero de m\xf3vil no v\xe1lido",city:"Ciudad",postalCode:"C\xf3digo postal",countryCode:"Prefijo internacional",telephoneNumber:"N\xfamero de tel\xe9fono",dateOfBirth:"Fecha de nacimiento",shopperEmail:"Direcci\xf3n de correo electr\xf3nico",gender:"G\xe9nero",male:"Masculino",female:"Femenino",billingAddress:"Direcci\xf3n de facturaci\xf3n",street:"Calle",stateOrProvince:"Provincia o estado",country:"Pa\xeds",houseNumberOrName:"N\xfamero de vivienda",separateDeliveryAddress:"Especificar otra direcci\xf3n de env\xedo",deliveryAddress:"Direcci\xf3n de env\xedo",zipCode:"C\xf3digo postal",apartmentSuite:"Apartamento/suite",provinceOrTerritory:"Provincia o territorio",cityTown:"Ciudad/poblaci\xf3n",address:"Direcci\xf3n",state:"Estado","field.title.optional":"(opcional)","creditCard.cvcField.title.optional":"CVC / CVV (opcional)","issuerList.wallet.placeholder":"Seleccione su monedero electr\xf3nico",privacyPolicy:"Pol\xedtica de privacidad","afterPay.agreement":"S\xed, acepto las %@ de AfterPay",paymentConditions:"condiciones de pago",openApp:"Abrir la aplicaci\xf3n","voucher.readInstructions":"Leer instrucciones","voucher.introduction":"Gracias por su compra. Use el siguiente cup\xf3n para completar su pago.","voucher.expirationDate":"Fecha de caducidad","voucher.alternativeReference":"Referencia alternativa","dragonpay.voucher.non.bank.selectField.placeholder":"Seleccione su proveedor","dragonpay.voucher.bank.selectField.placeholder":"Seleccione su banco","voucher.paymentReferenceLabel":"Referencia de pago","voucher.surcharge":"Incluye recargo de %@","voucher.introduction.doku":"Gracias por su compra. Use la informaci\xf3n siguiente para completar su pago.","voucher.shopperName":"Nombre del comprador","voucher.merchantName":"Vendedor","voucher.introduction.econtext":"Gracias por su compra. Use la informaci\xf3n siguiente para completar su pago.","voucher.telephoneNumber":"N\xfamero de tel\xe9fono","voucher.shopperReference":"Referencia cliente","voucher.collectionInstitutionNumber":"N\xfamero de instituci\xf3n de cobro","voucher.econtext.telephoneNumber.invalid":"El n\xfamero de tel\xe9fono debe tener 10 u 11 d\xedgitos","boletobancario.btnLabel":"Generar Boleto","boleto.sendCopyToEmail":"Enviar copia a mi correo electr\xf3nico","button.copy":"Copiar","button.download":"Descargar","creditCard.storedCard.description.ariaLabel":"La tarjeta almacenada termina en %@","voucher.entity":"Entidad",donateButton:"Donar",notNowButton:"Ahora no",thanksForYourSupport:"\xa1Gracias por su contribuci\xf3n!",preauthorizeWith:"Preautorizar con",confirmPreauthorization:"Confirmar preautorizaci\xf3n",confirmPurchase:"Confirmar compra",applyGiftcard:"Canjear",giftcardBalance:"Saldo de la tarjeta regalo",deductedBalance:"Saldo deducido","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Primeros 2 d\xedgitos de la contrase\xf1a de la tarjeta","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Contrase\xf1a incorrecta","creditCard.taxNumber.label":"Fecha de nacimiento del titular de la tarjeta (AAMMDD) o n\xfamero de registro comercial (10 d\xedgitos)","creditCard.taxNumber.labelAlt":"N\xfamero de registro comercial (10 d\xedgitos)","creditCard.taxNumber.invalid":"Fecha de nacimiento del titular o n\xfamero de registro comercial incorrectos","storedPaymentMethod.disable.button":"Eliminar","storedPaymentMethod.disable.confirmation":"Eliminar m\xe9todo de pago almacenado","storedPaymentMethod.disable.confirmButton":"S\xed, eliminar","storedPaymentMethod.disable.cancelButton":"Cancelar","ach.bankAccount":"Cuenta bancaria","ach.accountHolderNameField.title":"Nombre del titular de la cuenta","ach.accountHolderNameField.placeholder":"Juan P\xe9rez","ach.accountHolderNameField.invalid":"El nombre del titular de la cuenta no es v\xe1lido","ach.accountNumberField.title":"N\xfamero de cuenta","ach.accountNumberField.invalid":"N\xfamero de cuenta no v\xe1lido","ach.accountLocationField.title":"N\xfamero de ruta ABA","ach.accountLocationField.invalid":"El n\xfamero de ruta ABA no es v\xe1lido","select.state":"Seleccione el estado","select.stateOrProvince":"Seleccione el estado o provincia","select.provinceOrTerritory":"Seleccione la provincia o territorio","select.country":"Seleccione el pa\xeds","select.noOptionsFound":"No se encontraron opciones","select.filter.placeholder":"Buscar...","telephoneNumber.invalid":"El n\xfamero de tel\xe9fono no es v\xe1lido",qrCodeOrApp:"o","paypal.processingPayment":"Procesando pago...",generateQRCode:"Generar c\xf3digo QR","await.waitForConfirmation":"Esperando confirmaci\xf3n","mbway.confirmPayment":"Confirme su pago en la aplicaci\xf3n MB WAY","shopperEmail.invalid":"La direcci\xf3n de correo electr\xf3nico no es v\xe1lida","dateOfBirth.format":"DD/MM/AAAA","dateOfBirth.invalid":"Debe ser mayor de 18 a\xf1os","blik.confirmPayment":"Abra la aplicaci\xf3n de su banco para confirmar el pago.","blik.invalid":"Introduzca 6 d\xedgitos","blik.code":"C\xf3digo de 6 d\xedgitos","blik.help":"Consiga el c\xf3digo en la aplicaci\xf3n de su banco.","swish.pendingMessage":"Tras escanearlo, su estado puede seguir en pendiente hasta 10\xa0minutos. Podr\xedan realizarse varios cargos si se intenta pagar de nuevo durante este periodo.","error.va.gen.01":"Campo incompleto","error.va.gen.02":"Campo no v\xe1lido","error.va.sf-cc-num.01":"N\xfamero de tarjeta no v\xe1lido","error.va.sf-cc-num.03":"Se ha introducido una tarjeta no admitida","error.va.sf-cc-dat.01":"Tarjeta demasiado vieja","error.va.sf-cc-dat.02":"Fecha con demasiada antelaci\xf3n","error.va.sf-cc-dat.03":"Su tarjeta caduca antes de la fecha de pago","error.giftcard.no-balance":"Esta tarjeta regalo no tiene saldo","error.giftcard.card-error":"No tenemos ninguna tarjeta regalo con este n\xfamero en nuestros registros.","error.giftcard.currency-error":"Las tarjetas regalo solo son v\xe1lidas en la moneda en que fueron emitidas","amazonpay.signout":"Salir de Amazon","amazonpay.changePaymentDetails":"Cambiar detalles de pago","partialPayment.warning":"Seleccione otro m\xe9todo de pago para pagar la cantidad restante","partialPayment.remainingBalance":"El saldo restante ser\xe1 %{{amount}","bankTransfer.beneficiary":"Beneficiario","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"referencia","bankTransfer.introduction":"Contin\xfae para crear un nuevo pago mediante transferencia bancaria. Puede utilizar los detalles en la siguiente pantalla para finalizar este pago.","bankTransfer.instructions":"Gracias por su compra. Use la siguiente informaci\xf3n para completar su pago.","bacs.accountHolderName":"Nombre del titular de la cuenta bancaria","bacs.accountHolderName.invalid":"El nombre del titular de la cuenta bancaria no es v\xe1lido","bacs.accountNumber":"N\xfamero de cuenta bancaria","bacs.accountNumber.invalid":"El n\xfamero de cuenta bancaria no es v\xe1lido","bacs.bankLocationId":"C\xf3digo de sucursal","bacs.bankLocationId.invalid":"El c\xf3digo de sucursal no es v\xe1lido","bacs.consent.amount":"Estoy de acuerdo con que la cantidad anterior se deduzca de mi cuenta bancaria.","bacs.consent.account":"Confirmo que la cuenta est\xe1 a mi nombre y soy el \xfanico firmante necesario para autorizar d\xe9bitos directos en esta cuenta.",edit:"Editar","bacs.confirm":"Confirmar y pagar","bacs.result.introduction":"Descargue su instrucci\xf3n de d\xe9bito directo (IDD/mandato)","download.pdf":"Descargar PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe del n\xfamero de tarjeta asegurada","creditCard.encryptedCardNumber.aria.label":"Campo del n\xfamero de tarjeta","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe de la fecha de caducidad de la tarjeta asegurada","creditCard.encryptedExpiryDate.aria.label":"Campo de la fecha de caducidad","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe del mes de caducidad de tarjeta asegurada","creditCard.encryptedExpiryMonth.aria.label":"Campo del mes de caducidad","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe del a\xf1o de caducidad de la tarjeta asegurada","creditCard.encryptedExpiryYear.aria.label":"Campo del a\xf1o de caducidad","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe del c\xf3digo de seguridad de la tarjeta asegurada","creditCard.encryptedSecurityCode.aria.label":"Campo del c\xf3digo de seguridad","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe del n\xfamero de la tarjeta de regalo asegurada","giftcard.encryptedCardNumber.aria.label":"Campo del n\xfamero de la tarjeta de regalo","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe del c\xf3digo de seguridad de la tarjeta de regalo asegurada","giftcard.encryptedSecurityCode.aria.label":"Campo del c\xf3digo de seguridad de la tarjeta de regalo",giftcardTransactionLimit:"Se permite un m\xe1ximo de %{amount} por transacci\xf3n en esta tarjeta regalo","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe del n\xfamero de la cuenta bancaria asegurada","ach.encryptedBankAccountNumber.aria.label":"Campo de la cuenta bancaria","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe del n\xfamero de ruta del banco asegurado","ach.encryptedBankLocationId.aria.label":"Campo del n\xfamero de ruta del banco"}}),og=Object.freeze({__proto__:null,default:{payButton:"Maksa","payButton.redirecting":"Uudelleenohjataan ...",storeDetails:"Tallenna seuraavaa maksuani varten","creditCard.holderName":"Nimi kortilla","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Ei-kelvollinen kortinhaltijan nimi","creditCard.numberField.title":"Kortin numero","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Voimassaolop\xe4iv\xe4m\xe4\xe4r\xe4","creditCard.expiryDateField.placeholder":"KK / VV","creditCard.expiryDateField.month":"Kuukausi","creditCard.expiryDateField.month.placeholder":"KK","creditCard.expiryDateField.year.placeholder":"VV","creditCard.expiryDateField.year":"Vuosi","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Muista seuraavalla kerralla","creditCard.cvcField.placeholder.4digits":"4 lukua","creditCard.cvcField.placeholder.3digits":"3 lukua","creditCard.taxNumber.placeholder":"VVKKPP / 0123456789",installments:"Asennusten m\xe4\xe4r\xe4",installmentOption:"% {kertaa} x% {osittainenarvo}",installmentOptionMonths:"% {kertaa} kuukautta","installments.oneTime":"Kertamaksu","installments.installments":"Er\xe4maksu","installments.revolving":"Toistuva maksu","sepaDirectDebit.ibanField.invalid":"V\xe4\xe4r\xe4 tilin numero","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Haltijan nimi","sepa.ibanNumber":"Tilinumero (IBAN)","error.title":"Virhe","error.subtitle.redirect":"Uuteen kohteeseen siirto ep\xe4onnistui","error.subtitle.payment":"Maksu ep\xe4nnistui","error.subtitle.refused":"Maksu hyl\xe4tty","error.message.unknown":"Tapahtui tuntematon virhe","idealIssuer.selectField.title":"Pankki","idealIssuer.selectField.placeholder":"Valitse pankkisi","creditCard.success":"Maksu onnistui",loading:"Ladataan...",continue:"Jatka",continueTo:"Jatka kohteeseen","wechatpay.timetopay":"Sinulla on %@ maksettavana","wechatpay.scanqrcode":"Skannaa QR-koodi",personalDetails:"Henkil\xf6tiedot",companyDetails:"Yhti\xf6n tiedot","companyDetails.name":"Yhti\xf6n nimi","companyDetails.registrationNumber":"Rekisterinumero",socialSecurityNumber:"Sosiaaliturvatunnus",firstName:"Etunimi",infix:"Etuliite",lastName:"Sukunimi",mobileNumber:"Matkapuhelinnumero","mobileNumber.invalid":"Ei-kelvollinen matkapuhelinnumero",city:"Kaupunki",postalCode:"Postinumero",countryCode:"Maakoodi",telephoneNumber:"Puhelinnumero",dateOfBirth:"Syntym\xe4aika",shopperEmail:"S\xe4hk\xf6postiosoite",gender:"Sukupuoli",male:"Mies",female:"Nainen",billingAddress:"Laskutusosoite",street:"Katu",stateOrProvince:"Osavaltio tai l\xe4\xe4ni",country:"Maa",houseNumberOrName:"Talon numero",separateDeliveryAddress:"M\xe4\xe4rit\xe4 erillinen toimitusosoite",deliveryAddress:"Toimitusosoite",zipCode:"Postinumero",apartmentSuite:"Huoneisto / sviitti",provinceOrTerritory:"Maakunta tai alue",cityTown:"Kaupunki / taajama",address:"Osoite",state:"Osavaltio","field.title.optional":"(valinnainen)","creditCard.cvcField.title.optional":"CVC / CVV (valinnainen)","issuerList.wallet.placeholder":"Valitse lompakkosi",privacyPolicy:"Tietosuojamenettely","afterPay.agreement":"Hyv\xe4ksyn AfterPayn %@",paymentConditions:"maksuehdot",openApp:"Avaa sovellus","voucher.readInstructions":"Lue ohjeet","voucher.introduction":"Kiitos hankinnastasi, k\xe4yt\xe4 seuraavaa kuponkia vied\xe4ksesi maksusi p\xe4\xe4t\xf6kseen.","voucher.expirationDate":"Vanhenemisp\xe4iv\xe4m\xe4\xe4r\xe4","voucher.alternativeReference":"Vaihtoehtoinen viite","dragonpay.voucher.non.bank.selectField.placeholder":"Valitse toimittajasi","dragonpay.voucher.bank.selectField.placeholder":"Valitse pankkisi","voucher.paymentReferenceLabel":"Maksun viite","voucher.surcharge":"Sis. %@ lis\xe4maksun","voucher.introduction.doku":"Kiitos hankinnastasi, k\xe4yt\xe4 seuraavia tietoja p\xe4\xe4tt\xe4\xe4ksesi maksusi.","voucher.shopperName":"Ostajan nimi","voucher.merchantName":"Kauppias","voucher.introduction.econtext":"Kiitos hankinnastasi, k\xe4yt\xe4 seuraavia tietoja p\xe4\xe4tt\xe4\xe4ksesi maksusi.","voucher.telephoneNumber":"Puhelinnumero","voucher.shopperReference":"Ostajan viite","voucher.collectionInstitutionNumber":"Ker\xe4\xe4v\xe4n laitoksen numero","voucher.econtext.telephoneNumber.invalid":"Puhelinnumeron on oltava 10 tai 11 numeroa pitk\xe4","boletobancario.btnLabel":"Luo Boleto","boleto.sendCopyToEmail":"L\xe4het\xe4 kopio s\xe4hk\xf6postiini","button.copy":"Kopio","button.download":"Lataa","creditCard.storedCard.description.ariaLabel":"Tallennetun kortin viimeiset luvut ovat %@","voucher.entity":"Kokonaisuus",donateButton:"Lahjoita",notNowButton:"Ei nyt",thanksForYourSupport:"Kiitos tuestasi!",preauthorizeWith:"Ennkkolupa k\xe4ytt\xe4j\xe4n kanssa",confirmPreauthorization:"Vahvista ennakkolupa",confirmPurchase:"Vahvista hankinta",applyGiftcard:"Lunasta",giftcardBalance:"Lahjakortin saldo",deductedBalance:"V\xe4hennetty saldo","creditCard.pin.title":"Pin-tunnus","creditCard.encryptedPassword.label":"Kortin salasanan ensimm\xe4iset 2 lukua","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Kelpaamaton salasana","creditCard.taxNumber.label":"Kortinhaltijan syntym\xe4p\xe4iv\xe4 (VVKKPP) tai yrityksen rekisterinumero (10 lukua)","creditCard.taxNumber.labelAlt":"Yrityksen rekisterinumero (10 lukua)","creditCard.taxNumber.invalid":"Kelpaamaton kortinhaltijan syntym\xe4p\xe4iv\xe4 (VVKKPP) tai yrityksen rekisterinumero","storedPaymentMethod.disable.button":"Poista","storedPaymentMethod.disable.confirmation":"Poista tallennettu maksutapa","storedPaymentMethod.disable.confirmButton":"Kyll\xe4, poista","storedPaymentMethod.disable.cancelButton":"Peruuta","ach.bankAccount":"Pankkitili","ach.accountHolderNameField.title":"Tilinhaltijan nimi","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Ei-kelvollinen tilinhaltijan nimi","ach.accountNumberField.title":"Tilinumero","ach.accountNumberField.invalid":"V\xe4\xe4r\xe4 tilin numero","ach.accountLocationField.title":"ABA-reititysnumero","ach.accountLocationField.invalid":"Ei-kelvollinen ABA-reititysnumero","select.state":"Valitse osavaltio","select.stateOrProvince":"Valitse osavaltio tai l\xe4\xe4ni","select.provinceOrTerritory":"Valitse maakunta tai alue","select.country":"Valitse maa","select.noOptionsFound":"Vaihtoehtoja ei l\xf6ytynyt","select.filter.placeholder":"Hae...","telephoneNumber.invalid":"Ei-kelvollinen puhelinnumero",qrCodeOrApp:"tai","paypal.processingPayment":"Maksua k\xe4sitell\xe4\xe4n...",generateQRCode:"Tuota QR-koodi","await.waitForConfirmation":"Odottaa vahvistusta","mbway.confirmPayment":"Vahvista maksusi MB WAY -sovelluksella","shopperEmail.invalid":"Ei-kelvollinen s\xe4hk\xf6postiosoite","dateOfBirth.format":"PP/KK/VVVV","dateOfBirth.invalid":"Sinun on oltava v\xe4hint\xe4\xe4n 18-vuotias","blik.confirmPayment":"Avaa pankkisovelluksesi vahvistaaksesi maksun.","blik.invalid":"Sy\xf6t\xe4 6 lukua","blik.code":"6-numeroinen koodi","blik.help":"Hanki koodi pankkisovelluksestasi.","swish.pendingMessage":"Skannattuasi, tila voi odottaa jopa 10 minuuttia. Yritys maksaa uudelleen t\xe4ss\xe4 ajassa voi tuottaa moninkertaisia maksuja.","error.va.gen.01":"T\xe4ydent\xe4m\xe4t\xf6n kentt\xe4","error.va.gen.02":"Kentt\xe4 ei kelpaa","error.va.sf-cc-num.01":"V\xe4\xe4r\xe4 kortin numero","error.va.sf-cc-num.03":"Ei-tuettu kortti asetettu","error.va.sf-cc-dat.01":"Kortti on liian vanha","error.va.sf-cc-dat.02":"P\xe4iv\xe4m\xe4\xe4r\xe4 liian kaukana tulevaisuudessa","error.va.sf-cc-dat.03":"Korttisi vanhenee ennen l\xe4ht\xf6p\xe4iv\xe4\xe4","error.giftcard.no-balance":"Lahjakortin saldo on nolla","error.giftcard.card-error":"Asiakirjoissamme ei ole t\xe4m\xe4n numeron lahjakorttia","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","amazonpay.signout":"Kirjaudu ulos Amazonista","amazonpay.changePaymentDetails":"Muuta maksutietoja","partialPayment.warning":"Valitse toinen maksutapa j\xe4\xe4nn\xf6ksen maksamiseksi","partialPayment.remainingBalance":"J\xe4ljell\xe4 oleva saldo on% {summa}","bankTransfer.beneficiary":"Edunsaaja","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Viite","bankTransfer.introduction":"Jatka uuden pankkisiirtomaksun luomista. Voit viimeistell\xe4 t\xe4m\xe4n maksun seuraavan n\xe4yt\xf6n tietojen avulla.","bankTransfer.instructions":"Kiitos hankinnastasi, k\xe4yt\xe4 seuraavia tietoja p\xe4\xe4tt\xe4\xe4ksesi maksusi.","bacs.accountHolderName":"Tilinhaltijan nimi","bacs.accountHolderName.invalid":"Ei-kelvollinen tilinhaltijan nimi","bacs.accountNumber":"Pankkitilinumero","bacs.accountNumber.invalid":"V\xe4\xe4r\xe4 tilin numero","bacs.bankLocationId":"Lajittelukoodi","bacs.bankLocationId.invalid":"Ei-kelvollinen lajittelukoodi","bacs.consent.amount":"Hyv\xe4ksyn, ett\xe4 alla oleva summa veloitetaan pankkitililt\xe4ni.","bacs.consent.account":"Vahvistan, ett\xe4 tili on nimess\xe4ni ja olen ainoa allekirjoittaja, joka vaaditaan valtuuttamaan suoraveloitus t\xe4ll\xe4 tilill\xe4.",edit:"Muokkaa","bacs.confirm":"Vahvista ja maksa","bacs.result.introduction":"Lataa suoraveloitusohjeet (DDI / Mandate)","download.pdf":"Lataa PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe suojatulle kortin numerolle","creditCard.encryptedCardNumber.aria.label":"Kortin numero -kentt\xe4","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe suojatulle kortin viimeiselle k\xe4ytt\xf6p\xe4iv\xe4lle","creditCard.encryptedExpiryDate.aria.label":"Viimeinen voimassaolop\xe4iv\xe4 -kentt\xe4","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe suojatulle kortin viimeiselle k\xe4ytt\xf6kuukaudelle","creditCard.encryptedExpiryMonth.aria.label":"Viimeinen voimassaolokuukausi -kentt\xe4","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe suojatulle kortin viimeiselle voimassaolovuodelle","creditCard.encryptedExpiryYear.aria.label":"Viimeinen voimassaolovuosi-kentt\xe4","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe suojatulle kortin turvakoodille","creditCard.encryptedSecurityCode.aria.label":"Turvakoodikentt\xe4","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe suojatulle lahjakortin numerolle","giftcard.encryptedCardNumber.aria.label":"Lahjakorttinumeron kentt\xe4","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe suojatulle lahjakortin turvakoodille","giftcard.encryptedSecurityCode.aria.label":"Lahjakortin turvakoodikentt\xe4",giftcardTransactionLimit:"Maks. % {summa} sallittu tapahtumaa kohti t\xe4ll\xe4 lahjakortilla","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe suojatulle pankkitilinumerolle","ach.encryptedBankAccountNumber.aria.label":"Pankkitilikentt\xe4","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe suojatulle pankin reititysnumerolle","ach.encryptedBankLocationId.aria.label":"Pankin reititysnumerokentt\xe4"}}),ig=Object.freeze({__proto__:null,default:{payButton:"Payer","payButton.redirecting":"Redirection...",storeDetails:"Sauvegarder pour mon prochain paiement","creditCard.holderName":"Nom sur la carte","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Nom du porteur de carte incorrect","creditCard.numberField.title":"Num\xe9ro de la carte","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Date d'expiration","creditCard.expiryDateField.placeholder":"MM/AA","creditCard.expiryDateField.month":"Mois","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"AA","creditCard.expiryDateField.year":"Ann\xe9e","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Enregistrer pour la prochaine fois","creditCard.cvcField.placeholder.4digits":"4\xa0chiffres","creditCard.cvcField.placeholder.3digits":"3\xa0chiffres","creditCard.taxNumber.placeholder":"AAMMJJ / 0123456789",installments:"Nombre de versements",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times}\xa0mois","installments.oneTime":"Paiement unique","installments.installments":"Paiement \xe9chelonn\xe9","installments.revolving":"Paiement en plusieurs fois","sepaDirectDebit.ibanField.invalid":"Num\xe9ro de compte non valide","sepaDirectDebit.nameField.placeholder":"N. Bernard","sepa.ownerName":"Au nom de","sepa.ibanNumber":"Num\xe9ro de compte (IBAN)","error.title":"Erreur","error.subtitle.redirect":"\xc9chec de la redirection","error.subtitle.payment":"\xc9chec du paiement","error.subtitle.refused":"Paiement refus\xe9","error.message.unknown":"Une erreur inconnue s'est produite","idealIssuer.selectField.title":"Banque","idealIssuer.selectField.placeholder":"S\xe9lectionnez votre banque","creditCard.success":"Paiement r\xe9ussi",loading:"Chargement en cours...",continue:"Continuer",continueTo:"Poursuivre vers","wechatpay.timetopay":"Vous avez %@ pour payer cette somme","wechatpay.scanqrcode":"Scanner le code QR",personalDetails:"Informations personnelles",companyDetails:"Coordonn\xe9es de l'entreprise","companyDetails.name":"Nom de l'entreprise","companyDetails.registrationNumber":"Num\xe9ro d'enregistrement",socialSecurityNumber:"Num\xe9ro de s\xe9curit\xe9 sociale",firstName:"Pr\xe9nom",infix:"Pr\xe9fixe",lastName:"Nom de famille",mobileNumber:"Num\xe9ro de portable","mobileNumber.invalid":"Num\xe9ro de portable non valide",city:"Ville",postalCode:"Code postal",countryCode:"Code pays",telephoneNumber:"Num\xe9ro de t\xe9l\xe9phone",dateOfBirth:"Date de naissance",shopperEmail:"Adresse e-mail",gender:"Sexe",male:"Homme",female:"Femme",billingAddress:"Adresse de facturation",street:"Rue",stateOrProvince:"\xc9tat ou province",country:"Pays",houseNumberOrName:"Num\xe9ro de rue",separateDeliveryAddress:"Indiquer une adresse de livraison distincte",deliveryAddress:"Adresse de livraison",zipCode:"Code postal",apartmentSuite:"Appartement",provinceOrTerritory:"Province ou territoire",cityTown:"Ville",address:"Adresse",state:"\xc9tat","field.title.optional":"(facultatif)","creditCard.cvcField.title.optional":"CVC / CVV (facultatif)","issuerList.wallet.placeholder":"S\xe9lectionnez votre portefeuille",privacyPolicy:"Politique de confidentialit\xe9","afterPay.agreement":"J'accepte les %@ de AfterPay",paymentConditions:"conditions de paiement",openApp:"Ouvrir l'application","voucher.readInstructions":"Lire les instructions","voucher.introduction":"Merci pour votre achat, veuillez utiliser le coupon suivant pour finaliser votre paiement.","voucher.expirationDate":"Date d'expiration","voucher.alternativeReference":"Autre r\xe9f\xe9rence","dragonpay.voucher.non.bank.selectField.placeholder":"S\xe9lectionnez votre fournisseur","dragonpay.voucher.bank.selectField.placeholder":"S\xe9lectionnez votre banque","voucher.paymentReferenceLabel":"R\xe9f\xe9rence du paiement","voucher.surcharge":"Comprend une surcharge de %@","voucher.introduction.doku":"Nous vous remercions de votre achat. Veuillez finaliser votre paiement \xe0 l'aide des informations suivantes.","voucher.shopperName":"Nom de l'acheteur","voucher.merchantName":"Marchand","voucher.introduction.econtext":"Nous vous remercions de votre achat. Veuillez finaliser votre paiement \xe0 l'aide des informations suivantes.","voucher.telephoneNumber":"Num\xe9ro de t\xe9l\xe9phone","voucher.shopperReference":"R\xe9f\xe9rence client","voucher.collectionInstitutionNumber":"Num\xe9ro du point de paiement","voucher.econtext.telephoneNumber.invalid":"Le num\xe9ro de t\xe9l\xe9phone doit comporter 10 ou 11\xa0chiffres","boletobancario.btnLabel":"G\xe9n\xe9rer un Boleto","boleto.sendCopyToEmail":"Envoyer une copie \xe0 mon adresse e-mail","button.copy":"Copier","button.download":"T\xe9l\xe9charger","creditCard.storedCard.description.ariaLabel":"La carte enregistr\xe9e se termine en %@","voucher.entity":"Entit\xe9",donateButton:"Faire un don",notNowButton:"Pas maintenant",thanksForYourSupport:"Merci de votre soutien\xa0!",preauthorizeWith:"Pr\xe9-autoriser avec",confirmPreauthorization:"Confirmer la pr\xe9-autorisation",confirmPurchase:"Confirmer l'achat",applyGiftcard:"Utiliser",giftcardBalance:"Solde de la carte cadeau",deductedBalance:"Solde d\xe9duit","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Les deux premiers chiffres du code de votre carte","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Code incorrect","creditCard.taxNumber.label":"Date de naissance du porteur de carte (au format AAMMJJ) ou num\xe9ro d'identification de l'entreprise (\xe0 10\xa0chiffres)","creditCard.taxNumber.labelAlt":"Num\xe9ro d'identification de l'entreprise (\xe0 10\xa0chiffres)","creditCard.taxNumber.invalid":"Date de naissance du porteur de carte ou num\xe9ro d'identification de l'entreprise incorrect(e)","storedPaymentMethod.disable.button":"Supprimer","storedPaymentMethod.disable.confirmation":"Supprimer le mode de paiement enregistr\xe9","storedPaymentMethod.disable.confirmButton":"Oui, supprimer","storedPaymentMethod.disable.cancelButton":"Annuler","ach.bankAccount":"Compte bancaire","ach.accountHolderNameField.title":"Nom du titulaire du compte","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Nom du titulaire du compte incorrect","ach.accountNumberField.title":"Num\xe9ro du compte","ach.accountNumberField.invalid":"Num\xe9ro du compte incorrect","ach.accountLocationField.title":"Code ABA","ach.accountLocationField.invalid":"Code ABA incorrect","select.state":"S\xe9lectionnez l'\xc9tat","select.stateOrProvince":"S\xe9lectionnez l'\xc9tat ou la province","select.provinceOrTerritory":"S\xe9lectionnez la province ou le territoire","select.country":"S\xe9lectionnez le pays","select.noOptionsFound":"Aucune option trouv\xe9e","select.filter.placeholder":"Recherche...","telephoneNumber.invalid":"Num\xe9ro de t\xe9l\xe9phone incorrect",qrCodeOrApp:"ou","paypal.processingPayment":"Traitement du paiement en cours...",generateQRCode:"G\xe9n\xe9rer un code QR","await.waitForConfirmation":"En attente de confirmation","mbway.confirmPayment":"Confirmez votre paiement sur l'application MB WAY","shopperEmail.invalid":"Adresse e-mail incorrecte","dateOfBirth.format":"JJ/MM/AAAA","dateOfBirth.invalid":"Vous devez \xeatre \xe2g\xe9(e) d'au moins 18\xa0ans","blik.confirmPayment":"Ouvrez votre application bancaire pour confirmer le paiement.","blik.invalid":"Saisissez les 6\xa0chiffres","blik.code":"Code \xe0 6\xa0chiffres","blik.help":"Ouvrez votre application bancaire pour obtenir le code.","swish.pendingMessage":"Apr\xe8s avoir scann\xe9 le code QR, la mise \xe0 jour du statut de paiement peut prendre jusqu'\xe0 10\xa0minutes. Si vous effectuez une nouvelle tentative de paiement dans ce d\xe9lai, cela pourrait occasionner plusieurs d\xe9bits.","error.va.gen.01":"Champ incomplet","error.va.gen.02":"Champ non valide","error.va.sf-cc-num.01":"Num\xe9ro de carte non valide","error.va.sf-cc-num.03":"Carte ins\xe9r\xe9e non prise en charge","error.va.sf-cc-dat.01":"Carte trop ancienne","error.va.sf-cc-dat.02":"La date doit \xeatre plus proche","error.va.sf-cc-dat.03":"Votre carte expirera avant la date de paiement","error.giftcard.no-balance":"Aucun solde n'est disponible sur cette carte cadeau","error.giftcard.card-error":"Aucune carte cadeau ne correspond \xe0 ce num\xe9ro","error.giftcard.currency-error":"Les cartes cadeaux sont valables uniquement dans la devise dans laquelle elles ont \xe9t\xe9 \xe9mises","amazonpay.signout":"Se d\xe9connecter d'Amazon","amazonpay.changePaymentDetails":"Modifier les informations de paiement","partialPayment.warning":"S\xe9lectionnez un autre mode de paiement pour r\xe9gler le solde","partialPayment.remainingBalance":"Le solde restant sera de %{amount}","bankTransfer.beneficiary":"B\xe9n\xe9ficiaire","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"R\xe9f\xe9rence","bankTransfer.introduction":"Continuez \xe0 cr\xe9er un nouveau paiement par virement bancaire. Utilisez les informations de l'\xe9cran suivant pour finaliser ce paiement.","bankTransfer.instructions":"Merci pour votre achat\xa0! Veuillez utiliser les informations suivantes pour finaliser votre paiement.","bacs.accountHolderName":"Nom du titulaire du compte bancaire","bacs.accountHolderName.invalid":"Nom du titulaire du compte bancaire incorrect","bacs.accountNumber":"Num\xe9ro du compte bancaire","bacs.accountNumber.invalid":"Num\xe9ro du compte bancaire incorrect","bacs.bankLocationId":"Code de tri (sort code)","bacs.bankLocationId.invalid":"Code de tri (sort code) non valide","bacs.consent.amount":"J'accepte que le montant ci-dessus soit d\xe9duit de mon compte bancaire.","bacs.consent.account":"Je confirme \xeatre le titulaire du compte et qu'aucune autre signature que la mienne n'est requise pour autoriser un pr\xe9l\xe8vement sur ce compte.",edit:"Modifier","bacs.confirm":"Confirmer et payer","bacs.result.introduction":"T\xe9l\xe9chargez votre mandat de pr\xe9l\xe8vement (DDI)","download.pdf":"T\xe9l\xe9charger le PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe pour le num\xe9ro de carte avec garantie","creditCard.encryptedCardNumber.aria.label":"Champ du num\xe9ro de carte","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe pour la date d'expiration de la carte avec garantie","creditCard.encryptedExpiryDate.aria.label":"Champ de la date d'expiration","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe pour le mois d'expiration de la carte avec garantie","creditCard.encryptedExpiryMonth.aria.label":"Champ du mois d'expiration","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe pour l'ann\xe9e d'expiration de la carte avec garantie","creditCard.encryptedExpiryYear.aria.label":"Champ de l'ann\xe9e d'expiration","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe pour le code de s\xe9curit\xe9 de la carte avec garantie","creditCard.encryptedSecurityCode.aria.label":"Champ du code de s\xe9curit\xe9","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe pour le num\xe9ro de la carte-cadeau avec garantie","giftcard.encryptedCardNumber.aria.label":"Champ du num\xe9ro de la carte cadeau","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe pour le code de s\xe9curit\xe9 de la carte-cadeau avec garantie","giftcard.encryptedSecurityCode.aria.label":"Champ du code de s\xe9curit\xe9 de la carte-cadeau",giftcardTransactionLimit:"Montant maximum autoris\xe9 par transaction avec cette carte cadeau\xa0: %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe pour le num\xe9ro du compte bancaire avec garantie","ach.encryptedBankAccountNumber.aria.label":"Champ du compte bancaire","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe pour le num\xe9ro de routage du compte avec garantie","ach.encryptedBankLocationId.aria.label":"Champ du num\xe9ro de routage"}}),lg=Object.freeze({__proto__:null,default:{payButton:"Platiti","payButton.redirecting":"Preusmjeravanje...",storeDetails:"Pohrani za moje sljede\u0107e pla\u0107anje","creditCard.holderName":"Ime na kartici","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Neva\u017ee\u0107e ime vlasnika kartice","creditCard.numberField.title":"Broj kartice","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Datum isteka","creditCard.expiryDateField.placeholder":"MM/GG","creditCard.expiryDateField.month":"Mjesec","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"GG","creditCard.expiryDateField.year":"Godina","creditCard.cvcField.title":"CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Zapamtiti za sljede\u0107i put","creditCard.cvcField.placeholder.4digits":"4 znamenke","creditCard.cvcField.placeholder.3digits":"3 znamenke","creditCard.taxNumber.placeholder":"YYMMDD / 0123456789",installments:"Broj rata",installmentOption:"%{times} x %{partialValue}",installmentOptionMonths:"Mjeseci: %{times}","installments.oneTime":"Jednokratno pla\u0107anje","installments.installments":"Pla\u0107anje na rate","installments.revolving":"Obnovljivo pla\u0107anje","sepaDirectDebit.ibanField.invalid":"Neva\u017ee\u0107i broj ra\u010duna","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Ime vlasnika","sepa.ibanNumber":"Broj ra\u010duna (IBAN)","error.title":"Gre\u0161ka","error.subtitle.redirect":"Preusmjeravanje nije uspjelo","error.subtitle.payment":"Pla\u0107anje nije uspjelo","error.subtitle.refused":"Pla\u0107anje odbijeno","error.message.unknown":"Dogodila se nepoznata gre\u0161ka","idealIssuer.selectField.title":"Banka","idealIssuer.selectField.placeholder":"Odaberite banku","creditCard.success":"Pla\u0107anje uspje\u0161no",loading:"U\u010ditavanje\u2026",continue:"Nastavi",continueTo:"Nastavi na","wechatpay.timetopay":"Imate %@ za pla\u0107anje","wechatpay.scanqrcode":"Skeniraj QR k\xf4d",personalDetails:"Osobni podatci",companyDetails:"Detalji tvrtke","companyDetails.name":"Naziv tvrtke","companyDetails.registrationNumber":"Mati\u010dni broj",socialSecurityNumber:"Broj socijalnog osiguranja",firstName:"Ime",infix:"Prefiks",lastName:"Prezime",mobileNumber:"Broj mobilnog telefona","mobileNumber.invalid":"Neva\u017ee\u0107i broj mobilnog telefona",city:"Grad",postalCode:"Po\u0161tanski broj",countryCode:"Pozivni broj dr\u017eave",telephoneNumber:"Telefonski broj",dateOfBirth:"Datum ro\u0111enja",shopperEmail:"Adresa e-po\u0161te",gender:"Spol",male:"Mu\u0161karac",female:"\u017dena",billingAddress:"Adresa za ra\u010dun",street:"Ulica",stateOrProvince:"Dr\u017eava ili pokrajina",country:"Zemlja",houseNumberOrName:"Ku\u0107ni broj",separateDeliveryAddress:"Navedite zasebnu adresu za dostavu",deliveryAddress:"Adresa za dostavu",zipCode:"Po\u0161tanski broj",apartmentSuite:"Stan/apartman",provinceOrTerritory:"Pokrajina ili teritorij",cityTown:"Grad",address:"Adresa",state:"Savezna dr\u017eava","field.title.optional":"(neobavezno)","creditCard.cvcField.title.optional":"CVC/CVV (nije obavezno)","issuerList.wallet.placeholder":"Odaberite svoju nov\u010danik",privacyPolicy:"Politika privatnosti","afterPay.agreement":"Sla\u017eem se s %@ usluge AfterPay",paymentConditions:"uvjetima pla\u0107anja",openApp:"Otvorite aplikaciju","voucher.readInstructions":"Pro\u010ditajte upute","voucher.introduction":"Zahvaljujemo na kupnji, upotrijebite sljede\u0107i kupon za dovr\u0161etak pla\u0107anja.","voucher.expirationDate":"Datum isteka","voucher.alternativeReference":"Alternativna referenca","dragonpay.voucher.non.bank.selectField.placeholder":"Odaberite davatelja usluge","dragonpay.voucher.bank.selectField.placeholder":"Odaberite banku","voucher.paymentReferenceLabel":"Referenca za pla\u0107anje","voucher.surcharge":"Uklju\u010duje %@ nadoplate","voucher.introduction.doku":"Zahvaljujemo na kupnji, upotrijebite sljede\u0107e podatke za dovr\u0161etak pla\u0107anja.","voucher.shopperName":"Ime kupca","voucher.merchantName":"Trgovac","voucher.introduction.econtext":"Zahvaljujemo na kupnji, upotrijebite sljede\u0107e podatke za dovr\u0161etak pla\u0107anja.","voucher.telephoneNumber":"Broj telefona","voucher.shopperReference":"Referenca kupca","voucher.collectionInstitutionNumber":"Broj ustanove za prikupljanje","voucher.econtext.telephoneNumber.invalid":"Telefonski broj mora imati 10 ili 11 znamenki","boletobancario.btnLabel":"Generiraj Boleto","boleto.sendCopyToEmail":"Po\u0161alji kopiju na moju e-po\u0161tu","button.copy":"Kopiraj","button.download":"Preuzmi","creditCard.storedCard.description.ariaLabel":"Pohranjena kartica zavr\u0161ava na %@","voucher.entity":"Entitet",donateButton:"Doniraj",notNowButton:"Ne sada",thanksForYourSupport:"Hvala na podr\u0161ci!",preauthorizeWith:"Prethodno odobri s",confirmPreauthorization:"Potvrdite prethodno odobrenje",confirmPurchase:"Potvrdite kupnju",applyGiftcard:"Iskoristite",giftcardBalance:"Stanje na poklon-kartici",deductedBalance:"Potro\u0161eni iznos","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"Prve 2 znamenke lozinke kartice","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Lozinka je neto\u010dna","creditCard.taxNumber.label":"Datum ro\u0111enja vlasnika kartice (GGMMDD) ili registracijski broj tvrtke (10 znamenki)","creditCard.taxNumber.labelAlt":"Registracijski broj tvrtke (10 znamenki)","creditCard.taxNumber.invalid":"Neto\u010dan datum ro\u0111enja vlasnika kartice (GGMMDD) ili registracijski broj tvrtke (10 znamenki)","storedPaymentMethod.disable.button":"Ukloni","storedPaymentMethod.disable.confirmation":"Uklonite pohranjeni na\u010din pla\u0107anja","storedPaymentMethod.disable.confirmButton":"Da, ukloni","storedPaymentMethod.disable.cancelButton":"Otka\u017ei","ach.bankAccount":"Bankovni ra\u010dun","ach.accountHolderNameField.title":"Ime vlasnika ra\u010duna","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Neva\u017ee\u0107e ime vlasnika ra\u010duna","ach.accountNumberField.title":"Broj ra\u010duna","ach.accountNumberField.invalid":"Neva\u017ee\u0107i broj ra\u010duna","ach.accountLocationField.title":"ABA identifikacijski broj","ach.accountLocationField.invalid":"Neva\u017ee\u0107i ABA identifikacijski broj","select.state":"Odaberite saveznu dr\u017eavu","select.stateOrProvince":"Odaberite dr\u017eavu ili provinciju","select.provinceOrTerritory":"Odaberite provinciju ili teritorij","select.country":"Odaberite dr\u017eavu","select.noOptionsFound":"Nije prona\u0111ena nijedna opcija","select.filter.placeholder":"Tra\u017ei...","telephoneNumber.invalid":"Neva\u017ee\u0107i telefonski broj",qrCodeOrApp:"ili","paypal.processingPayment":"Obrada pla\u0107anja u tijeku...",generateQRCode:"Generirajte QR k\xf4d","await.waitForConfirmation":"\u010ceka se potvrda","mbway.confirmPayment":"Potvrdite uplatu u aplikaciji MB WAY","shopperEmail.invalid":"Neva\u017ee\u0107a adresa e-po\u0161te","dateOfBirth.format":"DD/MM/GGGG","dateOfBirth.invalid":"Morate imati najmanje 18 godina","blik.confirmPayment":"Otvorite svoju bankovnu aplikaciju kako biste potvrdili pla\u0107anje.","blik.invalid":"Unesite 6 znamenki","blik.code":"6-znamenkasti k\xf4d","blik.help":"Preuzmite k\xf4d iz bankovne aplikacije.","swish.pendingMessage":"Nakon skeniranja status mo\u017ee biti na \u010dekanju do 10 minuta. Poku\u0161aj ponovnog pla\u0107anja u istom periodu mo\u017ee rezultirati vi\u0161estrukim naplatama.","error.va.gen.01":"Nepotpuno polje","error.va.gen.02":"Neva\u017ee\u0107e polje","error.va.sf-cc-num.01":"Neva\u017ee\u0107i broj kartice","error.va.sf-cc-num.03":"Unijeli ste nepodr\u017eanu vrstu kartice","error.va.sf-cc-dat.01":"Kartica je prestara","error.va.sf-cc-dat.02":"Datum je predaleko u budu\u0107nosti","error.va.sf-cc-dat.03":"Va\u0161a kartica istje\u010de prije datuma pla\u0107anja","error.giftcard.no-balance":"Stanje na ovoj poklon-kartici iznosi nula","error.giftcard.card-error":"U na\u0161oj evidenciji nemamo poklon-karticu s ovim brojem","error.giftcard.currency-error":"Poklon-kartice vrijede samo u valuti u kojoj su izdane","amazonpay.signout":"Odjava iz Amazona","amazonpay.changePaymentDetails":"Promijenite pojedinosti o pla\u0107anju","partialPayment.warning":"Odaberite drugi na\u010din pla\u0107anja da biste platili preostali iznos","partialPayment.remainingBalance":"Preostalo stanje na ra\u010dunu iznosit \u0107e %{amount}","bankTransfer.beneficiary":"Primatelj","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referenca","bankTransfer.introduction":"Nastavite da biste kreirali novu uplatu putem bankovne transakcije. Za finaliziranje ovog pla\u0107anja mo\u017eete se koristiti pojedinostima na sljede\u0107em zaslonu.","bankTransfer.instructions":"Zahvaljujemo na kupnji, upotrijebite sljede\u0107e podatke za dovr\u0161etak pla\u0107anja.","bacs.accountHolderName":"Ime vlasnika bankovnog ra\u010duna","bacs.accountHolderName.invalid":"Neva\u017ee\u0107e ime vlasnika bankovnog ra\u010duna","bacs.accountNumber":"Broj bankovnog ra\u010duna","bacs.accountNumber.invalid":"Neva\u017ee\u0107i broj bankovnog ra\u010duna","bacs.bankLocationId":"Identifikacijski k\xf4d banke (UK)","bacs.bankLocationId.invalid":"Neva\u017ee\u0107i identifikacijski k\xf4d banke (UK)","bacs.consent.amount":"Sla\u017eem se da se gore navedeni iznos oduzme s mog bankovnog ra\u010duna.","bacs.consent.account":"Potvr\u0111ujem da je ra\u010dun na moje ime i da sam jedini potpisnik potreban za autorizaciju izravnog tere\u0107enja na ovom ra\u010dunu.",edit:"Uredi","bacs.confirm":"Potvrdi i plati","bacs.result.introduction":"Preuzmite upute za izravno tere\u0107enje (DDI / mandat)","download.pdf":"Preuzmite PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe za broj prepaid kartice","creditCard.encryptedCardNumber.aria.label":"Polje za broj kartice","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe za datum isteka prepaid kartice","creditCard.encryptedExpiryDate.aria.label":"Polje za datum isteka","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe za mjesec isteka prepaid kartice","creditCard.encryptedExpiryMonth.aria.label":"Polje za mjesec isteka","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe za godinu isteka prepaid kartice","creditCard.encryptedExpiryYear.aria.label":"Polje za godinu isteka","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe za sigurnosni k\xf4d prepaid kartice","creditCard.encryptedSecurityCode.aria.label":"Polje za sigurnosni k\xf4d","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe za broj prepaid poklon-kartice","giftcard.encryptedCardNumber.aria.label":"Polje za broj poklon-kartice","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe za sigurnosni k\xf4d prepaid poklon-kartice","giftcard.encryptedSecurityCode.aria.label":"Polje za sigurnosni k\xf4d poklon-kartice",giftcardTransactionLimit:"Na ovoj je poklon-kartici maks. dopu\u0161teno %{amount} po transakciji","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe za prepaid broj bankovnog ra\u010duna","ach.encryptedBankAccountNumber.aria.label":"Polje za broj bankovnog ra\u010duna","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe za identifikacijski broj prepaid banke","ach.encryptedBankLocationId.aria.label":"Polje za identifikacijski broj banke"}}),sg=Object.freeze({__proto__:null,default:{payButton:"Fizet\xe9s","payButton.redirecting":"\xc1tir\xe1ny\xedt\xe1s...",storeDetails:"Ment\xe9s a k\xf6vetkez\u0151 fizet\xe9shez","creditCard.holderName":"A k\xe1rty\xe1n szerepl\u0151 n\xe9v","creditCard.holderName.placeholder":"Gipsz Jakab","creditCard.holderName.invalid":"A k\xe1rtyatulajdonos neve \xe9rv\xe9nytelen","creditCard.numberField.title":"K\xe1rtyasz\xe1m","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Lej\xe1rati d\xe1tum","creditCard.expiryDateField.placeholder":"HH/\xc9\xc9","creditCard.expiryDateField.month":"H\xf3nap","creditCard.expiryDateField.month.placeholder":"HH","creditCard.expiryDateField.year.placeholder":"\xc9\xc9","creditCard.expiryDateField.year":"\xc9v","creditCard.cvcField.title":"CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Megjegyz\xe9s a k\xf6vetkez\u0151 alkalomra","creditCard.cvcField.placeholder.4digits":"4 sz\xe1mjegy\u0171","creditCard.cvcField.placeholder.3digits":"3 sz\xe1mjegy\u0171","creditCard.taxNumber.placeholder":"\xc9\xc9HHNN / 0123456789",installments:"R\xe9szletek sz\xe1ma",installmentOption:"%{times} x %{partialValue}",installmentOptionMonths:"%{times} h\xf3nap","installments.oneTime":"Egy\xf6sszeg\u0171 fizet\xe9s","installments.installments":"R\xe9szletfizet\xe9s","installments.revolving":"T\xf6bb\xf6sszeg\u0171 fizet\xe9s","sepaDirectDebit.ibanField.invalid":"\xc9rv\xe9nytelen sz\xe1mlasz\xe1m","sepaDirectDebit.nameField.placeholder":"Gipsz Jakab","sepa.ownerName":"Sz\xe1mlatulajdonos neve","sepa.ibanNumber":"Sz\xe1mlasz\xe1m (IBAN)","error.title":"Hiba","error.subtitle.redirect":"Sikertelen \xe1tir\xe1ny\xedt\xe1s","error.subtitle.payment":"Sikertelen fizet\xe9s","error.subtitle.refused":"A fizet\xe9s elutas\xedtva","error.message.unknown":"Ismeretlen hiba t\xf6rt\xe9nt","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"Bank kiv\xe1laszt\xe1sa","creditCard.success":"Sikeres fizet\xe9s",loading:"Bet\xf6lt\xe9s\u2026",continue:"Folytat\xe1s",continueTo:"Folytat\xe1s a k\xf6vetkez\u0151vel:","wechatpay.timetopay":"Fizet\xe9shez rendelkez\xe9sre \xe1ll\xf3 id\u0151: %@","wechatpay.scanqrcode":"QR-k\xf3d beolvas\xe1sa",personalDetails:"Szem\xe9lyes adatok",companyDetails:"C\xe9g adatai","companyDetails.name":"C\xe9gn\xe9v","companyDetails.registrationNumber":"C\xe9gjegyz\xe9ksz\xe1m",socialSecurityNumber:"Szem\xe9lyi igazolv\xe1ny sz\xe1ma",firstName:"Keresztn\xe9v",infix:"El\u0151tag",lastName:"Vezet\xe9kn\xe9v",mobileNumber:"Mobiltelefonsz\xe1m","mobileNumber.invalid":"\xc9rv\xe9nytelen mobilsz\xe1m",city:"V\xe1ros",postalCode:"Ir\xe1ny\xedt\xf3sz\xe1m",countryCode:"Orsz\xe1gk\xf3d",telephoneNumber:"Telefonsz\xe1m",dateOfBirth:"Sz\xfclet\xe9si d\xe1tum",shopperEmail:"E-mail-c\xedm",gender:"Nem",male:"F\xe9rfi",female:"N\u0151",billingAddress:"Sz\xe1ml\xe1z\xe1si c\xedm",street:"Utca",stateOrProvince:"\xc1llam vagy tartom\xe1ny",country:"Orsz\xe1g",houseNumberOrName:"H\xe1zsz\xe1m",separateDeliveryAddress:"Elt\xe9r\u0151 sz\xe1ll\xedt\xe1si c\xedm megad\xe1sa",deliveryAddress:"Sz\xe1ll\xedt\xe1si c\xedm",zipCode:"Ir\xe1ny\xedt\xf3sz\xe1m",apartmentSuite:"Lak\xe1s/ajt\xf3sz\xe1m",provinceOrTerritory:"Tartom\xe1ny vagy ter\xfclet",cityTown:"V\xe1ros",address:"C\xedm",state:"\xc1llam","field.title.optional":"(nem k\xf6telez\u0151)","creditCard.cvcField.title.optional":"CVC/CVV (opcion\xe1lis)","issuerList.wallet.placeholder":"P\xe9nzt\xe1rca kiv\xe1laszt\xe1sa",privacyPolicy:"Adatv\xe9delmi szab\xe1lyzat","afterPay.agreement":"Elfogadom az AfterPay %@",paymentConditions:"fizet\xe9si felt\xe9teleit",openApp:"Alkalmaz\xe1s megnyit\xe1sa","voucher.readInstructions":"Olvassa el az utas\xedt\xe1sokat","voucher.introduction":"K\xf6sz\xf6nj\xfck a v\xe1s\xe1rl\xe1st! K\xe9rj\xfck, a fizet\xe9shez haszn\xe1lja a k\xf6vetkez\u0151 kupont.","voucher.expirationDate":"Lej\xe1rati d\xe1tum","voucher.alternativeReference":"Alternat\xedv hivatkoz\xe1s","dragonpay.voucher.non.bank.selectField.placeholder":"Szolg\xe1ltat\xf3 kiv\xe1laszt\xe1sa","dragonpay.voucher.bank.selectField.placeholder":"Bank kiv\xe1laszt\xe1sa","voucher.paymentReferenceLabel":"Fizet\xe9si referencia","voucher.surcharge":"%@ p\xf3td\xedjat tartalmaz","voucher.introduction.doku":"K\xf6sz\xf6nj\xfck a v\xe1s\xe1rl\xe1st! K\xe9rj\xfck, a fizet\xe9shez haszn\xe1lja a k\xf6vetkez\u0151 inform\xe1ci\xf3t.","voucher.shopperName":"V\xe1s\xe1rl\xf3 neve","voucher.merchantName":"Keresked\u0151","voucher.introduction.econtext":"K\xf6sz\xf6nj\xfck a v\xe1s\xe1rl\xe1st! K\xe9rj\xfck, a fizet\xe9shez haszn\xe1lja a k\xf6vetkez\u0151 inform\xe1ci\xf3t.","voucher.telephoneNumber":"Telefonsz\xe1m","voucher.shopperReference":"V\xe1s\xe1rl\xf3i referencia","voucher.collectionInstitutionNumber":"Beszed\u0151 c\xe9g sz\xe1ma","voucher.econtext.telephoneNumber.invalid":"A telefonsz\xe1mnak 10 vagy 11 sz\xe1mjegyb\u0151l kell \xe1llnia","boletobancario.btnLabel":"Boleto l\xe9trehoz\xe1sa","boleto.sendCopyToEmail":"M\xe1solat k\xfcld\xe9se az e-mail-c\xedmemre","button.copy":"M\xe1sol\xe1s","button.download":"Let\xf6lt\xe9s","creditCard.storedCard.description.ariaLabel":"A t\xe1rolt k\xe1rtya sz\xe1m\xe1nak v\xe9gz\u0151d\xe9se: %@","voucher.entity":"Entit\xe1s",donateButton:"Adom\xe1nyoz\xe1s",notNowButton:"Most nem",thanksForYourSupport:"K\xf6sz\xf6nj\xfck a t\xe1mogat\xe1s\xe1t!",preauthorizeWith:"El\u0151zetes meghatalmaz\xe1s a k\xf6vetkez\u0151vel:",confirmPreauthorization:"El\u0151zetes meghatalmaz\xe1s j\xf3v\xe1hagy\xe1sa",confirmPurchase:"Fizet\xe9s j\xf3v\xe1hagy\xe1sa",applyGiftcard:"Bev\xe1lt\xe1s",giftcardBalance:"Aj\xe1nd\xe9kk\xe1rtya egyenlege",deductedBalance:"Levont egyenleg","creditCard.pin.title":"PIN-k\xf3d","creditCard.encryptedPassword.label":"K\xe1rtya jelszav\xe1nak els\u0151 2 sz\xe1mjegye","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\xc9rv\xe9nytelen jelsz\xf3","creditCard.taxNumber.label":"K\xe1rtyatulajdonos sz\xfclet\xe9si d\xe1tuma (\xc9\xc9HHNN) vagy c\xe9gjegyz\xe9ksz\xe1m (10 sz\xe1mjegy\u0171)","creditCard.taxNumber.labelAlt":"C\xe9gjegyz\xe9ksz\xe1m (10 sz\xe1mjegy\u0171)","creditCard.taxNumber.invalid":"A k\xe1rtyatulajdonos sz\xfclet\xe9si d\xe1tuma vagy a c\xe9gjegyz\xe9ksz\xe1m \xe9rv\xe9nytelen","storedPaymentMethod.disable.button":"Elt\xe1vol\xedt\xe1s","storedPaymentMethod.disable.confirmation":"T\xe1rolt fizet\xe9si m\xf3d elt\xe1vol\xedt\xe1sa","storedPaymentMethod.disable.confirmButton":"Igen, elt\xe1vol\xedtom","storedPaymentMethod.disable.cancelButton":"M\xe9gse","ach.bankAccount":"Banksz\xe1mla","ach.accountHolderNameField.title":"Sz\xe1mlatulajdonos neve","ach.accountHolderNameField.placeholder":"Gipsz Jakab","ach.accountHolderNameField.invalid":"A sz\xe1mlatulajdonos neve \xe9rv\xe9nytelen","ach.accountNumberField.title":"Sz\xe1mlasz\xe1m","ach.accountNumberField.invalid":"\xc9rv\xe9nytelen sz\xe1mlasz\xe1m","ach.accountLocationField.title":"ABA-ir\xe1ny\xedt\xf3sz\xe1m","ach.accountLocationField.invalid":"\xc9rv\xe9nytelen ABA-ir\xe1ny\xedt\xf3sz\xe1m","select.state":"\xc1llam kiv\xe1laszt\xe1sa","select.stateOrProvince":"\xc1llam vagy tartom\xe1ny kiv\xe1laszt\xe1sa","select.provinceOrTerritory":"Tartom\xe1ny vagy ter\xfclet kiv\xe1laszt\xe1sa","select.country":"Orsz\xe1g kiv\xe1laszt\xe1sa","select.noOptionsFound":"Nincsenek tal\xe1latok","select.filter.placeholder":"Keres\xe9s...","telephoneNumber.invalid":"\xc9rv\xe9nytelen telefonsz\xe1m",qrCodeOrApp:"vagy","paypal.processingPayment":"Fizet\xe9s feldolgoz\xe1sa\u2026",generateQRCode:"QR-k\xf3d l\xe9trehoz\xe1sa","await.waitForConfirmation":"V\xe1rakoz\xe1s a j\xf3v\xe1hagy\xe1sra","mbway.confirmPayment":"Fizet\xe9s j\xf3v\xe1hagy\xe1sa az MB WAY alkalmaz\xe1sban","shopperEmail.invalid":"\xc9rv\xe9nytelen e-mail-c\xedm","dateOfBirth.format":"NN/HH/\xc9\xc9\xc9\xc9","dateOfBirth.invalid":"Legal\xe1bb 18 \xe9vesnek kell lennie","blik.confirmPayment":"A fizet\xe9s j\xf3v\xe1hagy\xe1s\xe1hoz nyissa meg a banki alkalmaz\xe1st.","blik.invalid":"Adjon meg 6 sz\xe1mjegyet","blik.code":"6 sz\xe1mjegy\u0171 k\xf3d","blik.help":"K\xf3d lek\xe9r\xe9se a banki alkalmaz\xe1sb\xf3l.","swish.pendingMessage":"A QR-k\xf3d beolvas\xe1s\xe1t k\xf6vet\u0151en az \xe1llapot ak\xe1r 10 percig is f\xfcgg\u0151ben lehet. Ha ek\xf6zben \xfajb\xf3l fizet\xe9st k\xeds\xe9rel meg, az t\xf6bbsz\xf6ri fizet\xe9st eredm\xe9nyezhet.","error.va.gen.01":"Hi\xe1nyos mez\u0151","error.va.gen.02":"\xc9rv\xe9nytelen mez\u0151","error.va.sf-cc-num.01":"\xc9rv\xe9nytelen k\xe1rtyasz\xe1m","error.va.sf-cc-num.03":"A megadott k\xe1rtya nem t\xe1mogatott","error.va.sf-cc-dat.01":"A k\xe1rtya t\xfal r\xe9gi","error.va.sf-cc-dat.02":"T\xfal t\xe1voli j\xf6v\u0151beli d\xe1tum","error.va.sf-cc-dat.03":"A k\xe1rtya lej\xe1r a fizet\xe9s d\xe1tuma el\u0151tt","error.giftcard.no-balance":"Az aj\xe1nd\xe9kk\xe1rtya egyenlege nulla","error.giftcard.card-error":"Nyilv\xe1ntart\xe1sunkban nem szerepel ilyen sz\xe1m\xfa aj\xe1nd\xe9kk\xe1rtya","error.giftcard.currency-error":"Az aj\xe1nd\xe9kk\xe1rty\xe1k csak abban a p\xe9nznemben \xe9rv\xe9nyesek, amelyre ki\xe1ll\xedtott\xe1k azokat","amazonpay.signout":"Kijelentkez\xe9s az Amazonr\xf3l","amazonpay.changePaymentDetails":"Fizet\xe9si adatok m\xf3dos\xedt\xe1sa","partialPayment.warning":"M\xe1sik fizet\xe9si m\xf3d v\xe1laszt\xe1sa a fennmarad\xf3 r\xe9sz fizet\xe9s\xe9hez","partialPayment.remainingBalance":"A fennmarad\xf3 egyenleg %{amount} lesz","bankTransfer.beneficiary":"Kedvezm\xe9nyezett","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referencia","bankTransfer.introduction":"Folytassa, hogy elind\xedtson egy \xfaj banki \xe1tutal\xe1sos fizet\xe9st. A fizet\xe9s v\xe9gleges\xedt\xe9s\xe9hez felhaszn\xe1lhatja a k\xf6vetkez\u0151 k\xe9perny\u0151n megjelen\u0151 adatokat.","bankTransfer.instructions":"K\xf6sz\xf6nj\xfck a v\xe1s\xe1rl\xe1st! K\xe9rj\xfck, a fizet\xe9shez haszn\xe1lja a k\xf6vetkez\u0151 inform\xe1ci\xf3t.","bacs.accountHolderName":"Banksz\xe1mla-tulajdonos neve","bacs.accountHolderName.invalid":"A banksz\xe1mla-tulajdonos neve \xe9rv\xe9nytelen","bacs.accountNumber":"Banksz\xe1mlasz\xe1m","bacs.accountNumber.invalid":"\xc9rv\xe9nytelen banksz\xe1mlasz\xe1m","bacs.bankLocationId":"Banki azonos\xedt\xf3","bacs.bankLocationId.invalid":"\xc9rv\xe9nytelen banki azonos\xedt\xf3","bacs.consent.amount":"Elfogadom, hogy a fenti \xf6sszeget levonj\xe1k a banksz\xe1ml\xe1mr\xf3l.","bacs.consent.account":"Meger\u0151s\xedtem, hogy a banksz\xe1mla az \xe9n nevemen van, \xe9s \xe9n vagyok a banksz\xe1ml\xe1t \xe9rint\u0151 beszed\xe9si megb\xedz\xe1s j\xf3v\xe1hagy\xe1s\xe1hoz sz\xfcks\xe9ges egyetlen al\xe1\xedr\xf3.",edit:"Szerkeszt\xe9s","bacs.confirm":"Meger\u0151s\xedt\xe9s \xe9s fizet\xe9s","bacs.result.introduction":"Beszed\xe9si megb\xedz\xe1si utas\xedt\xe1s (meghatalmaz\xe1s) let\xf6lt\xe9se","download.pdf":"PDF let\xf6lt\xe9se","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe a biztons\xe1gos k\xe1rtyasz\xe1mhoz","creditCard.encryptedCardNumber.aria.label":"K\xe1rtyasz\xe1m mez\u0151je","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe a biztons\xe1gos k\xe1rtyalej\xe1rati d\xe1tumhoz","creditCard.encryptedExpiryDate.aria.label":"Lej\xe1rati d\xe1tum mez\u0151je","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe a biztons\xe1gos k\xe1rtyalej\xe1rati h\xf3naphoz","creditCard.encryptedExpiryMonth.aria.label":"Lej\xe1rati h\xf3nap mez\u0151je","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe a biztons\xe1gos k\xe1rtyalej\xe1rati \xe9vhez","creditCard.encryptedExpiryYear.aria.label":"Lej\xe1rati \xe9v mez\u0151je","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe a biztons\xe1gos k\xe1rtyabiztons\xe1gi k\xf3dhoz","creditCard.encryptedSecurityCode.aria.label":"Biztons\xe1gi k\xf3d mez\u0151je","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe a biztons\xe1gos aj\xe1nd\xe9kk\xe1rtyasz\xe1mhoz","giftcard.encryptedCardNumber.aria.label":"Aj\xe1nd\xe9kk\xe1rtyasz\xe1m mez\u0151je","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe a biztons\xe1gos aj\xe1nd\xe9kk\xe1rtya biztons\xe1gi k\xf3dhoz","giftcard.encryptedSecurityCode.aria.label":"Aj\xe1nd\xe9kk\xe1rtya biztons\xe1gi k\xf3dj\xe1nak mez\u0151je",giftcardTransactionLimit:"Ezen az aj\xe1nd\xe9kk\xe1rty\xe1n a tranzakci\xf3nk\xe9nt enged\xe9lyezett maxim\xe1lis \xf6sszeg %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe a biztons\xe1gos banksz\xe1mlasz\xe1mhoz","ach.encryptedBankAccountNumber.aria.label":"Banksz\xe1mla mez\u0151je","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe a biztons\xe1gos bankazonos\xedt\xf3 k\xf3dhoz","ach.encryptedBankLocationId.aria.label":"Bankazonos\xedt\xf3 k\xf3d mez\u0151je"}}),cg=Object.freeze({__proto__:null,default:{payButton:"Paga","payButton.redirecting":"Reindirizzamento...",storeDetails:"Salva per il prossimo pagamento","creditCard.holderName":"Nome sulla carta","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Nome del titolare della carta non valido","creditCard.numberField.title":"Numero carta","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Data di scadenza","creditCard.expiryDateField.placeholder":"MM/AA","creditCard.expiryDateField.month":"Mese","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"AA","creditCard.expiryDateField.year":"Anno","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Ricorda per la prossima volta","creditCard.cvcField.placeholder.4digits":"4 cifre","creditCard.cvcField.placeholder.3digits":"3 cifre","creditCard.taxNumber.placeholder":"AAMMGG/0123456789",installments:"Numero di rate",installmentOption:"%{partialValue} x%{times}",installmentOptionMonths:"%{times} mesi","installments.oneTime":"Pagamento una tantum","installments.installments":"Pagamento rateale","installments.revolving":"Pagamento ricorrente","sepaDirectDebit.ibanField.invalid":"Numero di conto non valido","sepaDirectDebit.nameField.placeholder":"A. Bianchi","sepa.ownerName":"Nome Intestatario Conto","sepa.ibanNumber":"Numero di conto (IBAN)","error.title":"Errore","error.subtitle.redirect":"Reindirizzamento non riuscito","error.subtitle.payment":"Pagamento non riuscito","error.subtitle.refused":"Pagamento respinto","error.message.unknown":"Si \xe8 verificato un errore sconosciuto","idealIssuer.selectField.title":"Banca","idealIssuer.selectField.placeholder":"Seleziona la banca","creditCard.success":"Pagamento riuscito",loading:"Caricamento in corso...",continue:"Continua",continueTo:"Procedi verso","wechatpay.timetopay":"Devi pagare %@","wechatpay.scanqrcode":"Scansiona il codice QR",personalDetails:"Dati personali",companyDetails:"Informazioni dell'azienda","companyDetails.name":"Ragione sociale","companyDetails.registrationNumber":"Numero di registrazione",socialSecurityNumber:"Numero di previdenza sociale",firstName:"Nome",infix:"Prefisso",lastName:"Cognome",mobileNumber:"Numero di cellulare","mobileNumber.invalid":"Numero di cellulare non valido",city:"Citt\xe0",postalCode:"Codice postale",countryCode:"Codice nazionale",telephoneNumber:"Numero di telefono",dateOfBirth:"Data di nascita",shopperEmail:"Indirizzo e-mail",gender:"Sesso",male:"Uomo",female:"Donna",billingAddress:"Indirizzo di fatturazione",street:"Via",stateOrProvince:"Stato o provincia",country:"Paese",houseNumberOrName:"Numero civico",separateDeliveryAddress:"Specifica un indirizzo di consegna alternativo",deliveryAddress:"Indirizzo di consegna",zipCode:"CAP",apartmentSuite:"Appartamento/suite",provinceOrTerritory:"Provincia o territorio",cityTown:"Citt\xe0",address:"Indirizzo",state:"Stato","field.title.optional":"(facoltativo)","creditCard.cvcField.title.optional":"CVC/CVV (facoltativo)","issuerList.wallet.placeholder":"Seleziona il tuo portafoglio",privacyPolicy:"Informativa sulla privacy","afterPay.agreement":"Accetto i %@ di AfterPay",paymentConditions:"termini di pagamento",openApp:"Apri l'app","voucher.readInstructions":"Leggi le istruzioni","voucher.introduction":"Grazie per il tuo acquisto, utilizza il seguente coupon per completare il pagamento.","voucher.expirationDate":"Data di scadenza","voucher.alternativeReference":"Riferimento alternativo","dragonpay.voucher.non.bank.selectField.placeholder":"Seleziona il tuo fornitore","dragonpay.voucher.bank.selectField.placeholder":"Seleziona la banca","voucher.paymentReferenceLabel":"Riferimento del pagamento","voucher.surcharge":"Include un sovrapprezzo di %@","voucher.introduction.doku":"Grazie per il tuo acquisto, utilizza i seguenti dati per completare il pagamento.","voucher.shopperName":"Nome dell'acquirente","voucher.merchantName":"Esercente","voucher.introduction.econtext":"Grazie per il tuo acquisto, utilizza i seguenti dati per completare il pagamento.","voucher.telephoneNumber":"Numero di telefono","voucher.shopperReference":"Riferimento dell'acquirente","voucher.collectionInstitutionNumber":"Codice identificativo del negozio","voucher.econtext.telephoneNumber.invalid":"Il numero di telefono deve essere di 10 o 11 cifre","boletobancario.btnLabel":"Genera Boleto","boleto.sendCopyToEmail":"Invia una copia alla mia e-mail","button.copy":"Copia","button.download":"Scarica","creditCard.storedCard.description.ariaLabel":"La carta memorizzata termina in %@","voucher.entity":"Entit\xe0",donateButton:"Dona",notNowButton:"Non ora",thanksForYourSupport:"Grazie per il tuo sostegno!",preauthorizeWith:"Preautorizza con",confirmPreauthorization:"Conferma preautorizzazione",confirmPurchase:"Conferma acquisto",applyGiftcard:"Riscatta",giftcardBalance:"Saldo del buono",deductedBalance:"Importo detratto","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"Prime 2 cifre della password della carta","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Password non valida","creditCard.taxNumber.label":"Data di nascita del titolare della carta (AAMMGG) o numero di registrazione aziendale (10 cifre)","creditCard.taxNumber.labelAlt":"Numero di registrazione aziendale (10 cifre)","creditCard.taxNumber.invalid":"Data di nascita del titolare della carta o numero di registrazione aziendale non validi","storedPaymentMethod.disable.button":"Rimuovi","storedPaymentMethod.disable.confirmation":"Rimuovi il metodo di pagamento archiviato","storedPaymentMethod.disable.confirmButton":"S\xec, rimuoverli","storedPaymentMethod.disable.cancelButton":"Cancella","ach.bankAccount":"Conto bancario","ach.accountHolderNameField.title":"Nome del titolare del conto","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Nome del titolare del conto non valido","ach.accountNumberField.title":"Numero di conto","ach.accountNumberField.invalid":"Numero di conto non valido","ach.accountLocationField.title":"Codice ABA","ach.accountLocationField.invalid":"Codice ABA non valido","select.state":"Seleziona stato","select.stateOrProvince":"Seleziona stato o provincia","select.provinceOrTerritory":"Seleziona provincia o territorio","select.country":"Seleziona paese","select.noOptionsFound":"Nessuna opzione trovata","select.filter.placeholder":"Cerca...","telephoneNumber.invalid":"Numero di telefono non valido",qrCodeOrApp:"o","paypal.processingPayment":"Elaborazione del pagamento in corso...",generateQRCode:"Genera codice QR","await.waitForConfirmation":"In attesa di conferma","mbway.confirmPayment":"Conferma il pagamento con l'app MB WAY","shopperEmail.invalid":"Indirizzo e-mail non valido","dateOfBirth.format":"GG/MM/AAAA","dateOfBirth.invalid":"Devi avere almeno 18 anni","blik.confirmPayment":"Apri l'app della tua banca per confermare il pagamento.","blik.invalid":"Inserisci 6 numeri","blik.code":"Codice a 6 cifre","blik.help":"Ottieni il codice dalla app della tua banca.","swish.pendingMessage":"In seguito alla scansione, lo stato della transazione pu\xf2 rimanere in sospeso per un massimo di 10 minuti. Un nuovo tentativo di pagamento durante questo lasso di tempo pu\xf2 comportare pagamenti multipli.","error.va.gen.01":"Campo incompleto","error.va.gen.02":"Campo non valido","error.va.sf-cc-num.01":"Numero carta non valido","error.va.sf-cc-num.03":"Tipo di carta non supportato","error.va.sf-cc-dat.01":"Carta troppo vecchia","error.va.sf-cc-dat.02":"Data troppo avanti nel futuro","error.va.sf-cc-dat.03":"La tua carta scade prima della data di check out","error.giftcard.no-balance":"Questo buono regalo ha un saldo pari a zero","error.giftcard.card-error":"Non abbiamo alcun buono regalo con questo numero nei nostri archivi","error.giftcard.currency-error":"I buono regalo sono validi solo nella valuta in cui sono state emessi","amazonpay.signout":"Esci da Amazon","amazonpay.changePaymentDetails":"Modifica i dettagli di pagamento","partialPayment.warning":"Seleziona un altro metodo di pagamento per pagare l'importo rimanente","partialPayment.remainingBalance":"Il saldo rimanente sar\xe0 di %{amount}","bankTransfer.beneficiary":"Beneficiario","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Riferimento","bankTransfer.introduction":"Continua per creare un nuovo pagamento tramite bonifico bancario. Puoi utilizzare i dettagli nella schermata seguente per completare l'operazione.","bankTransfer.instructions":"Grazie per il tuo acquisto, utilizza i seguenti dati per completare il pagamento.","bacs.accountHolderName":"Nome del titolare del conto bancario","bacs.accountHolderName.invalid":"Nome del titolare del conto bancario non valido","bacs.accountNumber":"Numero di conto bancario","bacs.accountNumber.invalid":"Numero di conto bancario non valido","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Sort code non valido","bacs.consent.amount":"Accetto che l'importo sopra indicato venga detratto dal mio conto bancario.","bacs.consent.account":"Confermo che il conto \xe8 intestato al sottoscritto e che sono l'unico firmatario a dover autorizzare l'addebito diretto su questo conto.",edit:"Modifica","bacs.confirm":"Conferma e paga","bacs.result.introduction":"Scarica le Istruzioni per l'addebito diretto (DDI / Mandato)","download.pdf":"Scarica PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe per numero di carta protetta","creditCard.encryptedCardNumber.aria.label":"Campo numero di carta","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe data di scadenza per numero di carta protetta","creditCard.encryptedExpiryDate.aria.label":"Campo data di scadenza","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe mese di scadenza per numero di carta protetta","creditCard.encryptedExpiryMonth.aria.label":"Campo mese di scadenza","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe anno di scadenza per numero di carta protetta","creditCard.encryptedExpiryYear.aria.label":"Campo anno di scadenza","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe per codice di sicurezza della carta protetta","creditCard.encryptedSecurityCode.aria.label":"Campo codice di sicurezza","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe per numero di carta regalo protetta","giftcard.encryptedCardNumber.aria.label":"Campo numero carta regalo","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe per codice di sicurezza della carta regalo protetta","giftcard.encryptedSecurityCode.aria.label":"Campo codice di sicurezza della carta regalo",giftcardTransactionLimit:"Importo massimo di %{amount} per transazione su questo buono regalo","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe per numero di numero di conto bancario protetto","ach.encryptedBankAccountNumber.aria.label":"Campo conto bancario","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe per numero di routing bancario sicuro","ach.encryptedBankLocationId.aria.label":"Campo numero di routing bancario"}}),dg=Object.freeze({__proto__:null,default:{payButton:"\u652f\u6255\u3046","payButton.redirecting":"\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u3044\u307e\u3059...",storeDetails:"\u6b21\u56de\u306e\u304a\u652f\u6255\u3044\u306e\u305f\u3081\u8a73\u7d30\u3092\u4fdd\u5b58","creditCard.holderName":"\u30ab\u30fc\u30c9\u4e0a\u306e\u540d\u524d","creditCard.holderName.placeholder":"Taro Yamada","creditCard.holderName.invalid":"\u7121\u52b9\u306a\u30ab\u30fc\u30c9\u6240\u6709\u8005\u540d","creditCard.numberField.title":"\u30ab\u30fc\u30c9\u756a\u53f7","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"\u6709\u52b9\u671f\u9650","creditCard.expiryDateField.placeholder":"MM/YY","creditCard.expiryDateField.month":"\u6708","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"YY","creditCard.expiryDateField.year":"\u5e74","creditCard.cvcField.title":"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u30b3\u30fc\u30c9 (CVC)","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\u6b21\u56de\u306e\u305f\u3081\u306b\u4fdd\u5b58\u3057\u307e\u3059","creditCard.cvcField.placeholder.4digits":"4\u6841","creditCard.cvcField.placeholder.3digits":"3\u6841","creditCard.taxNumber.placeholder":"\u5e74\u6708\u65e5\uff08YYMMDD\uff09/ 0123456789",installments:"\u5206\u5272\u56de\u6570",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times}\u304b\u6708","installments.oneTime":"\u4e00\u62ec\u6255\u3044","installments.installments":"\u5206\u5272\u6255\u3044","installments.revolving":"\u30ea\u30dc\u6255\u3044","sepaDirectDebit.ibanField.invalid":"\u53e3\u5ea7\u756a\u53f7\u306e\u5165\u529b\u9593\u9055\u3044","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"\u540d\u7fa9","sepa.ibanNumber":"\u53e3\u5ea7\u756a\u53f7 (IBAN)","error.title":"\u30a8\u30e9\u30fc","error.subtitle.redirect":"\u753b\u9762\u306e\u5207\u308a\u66ff\u3048\u5931\u6557\u306b\u3057\u307e\u3057\u305f","error.subtitle.payment":"\u652f\u6255\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f","error.subtitle.refused":"\u30ab\u30fc\u30c9\u4f1a\u793e\u3067\u53d6\u5f15\u304c\u627f\u8a8d\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002","error.message.unknown":"\u4e0d\u660e\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f","idealIssuer.selectField.title":"\u9280\u884c","idealIssuer.selectField.placeholder":"\u9280\u884c\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","creditCard.success":"\u8a8d\u8a3c\u304c\u6210\u529f\u3057\u307e\u3057\u305f",loading:"\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...",continue:"\u7d9a\u3051\u308b",continueTo:"\u6b21\u3078\u9032\u3080\uff1a","wechatpay.timetopay":"%@\u3092\u304a\u652f\u6255\u3044\u4e0b\u3055\u3044\u3002","wechatpay.scanqrcode":"QR \u30b3\u30fc\u30c9\u3092\u30b9\u30ad\u30e3\u30f3\u3059\u308b",personalDetails:"\u500b\u4eba\u60c5\u5831",companyDetails:"\u4f1a\u793e\u60c5\u5831","companyDetails.name":"\u4f1a\u793e\u540d","companyDetails.registrationNumber":"\u767b\u9332\u756a\u53f7",socialSecurityNumber:"\u30bd\u30fc\u30b7\u30e3\u30eb\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u756a\u53f7",firstName:"\u540d",infix:"\u656c\u79f0",lastName:"\u59d3",mobileNumber:"\u643a\u5e2f\u756a\u53f7","mobileNumber.invalid":"\u7121\u52b9\u306a\u643a\u5e2f\u96fb\u8a71\u756a\u53f7",city:"\u5e02\u533a",postalCode:"\u90f5\u4fbf\u756a\u53f7",countryCode:"\u56fd\u30b3\u30fc\u30c9",telephoneNumber:"\u96fb\u8a71\u756a\u53f7",dateOfBirth:"\u751f\u5e74\u6708\u65e5",shopperEmail:"E\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9",gender:"\u6027\u5225",male:"\u7537\u6027",female:"\u5973\u6027",billingAddress:"\u3054\u8acb\u6c42\u4f4f\u6240",street:"\u756a\u5730",stateOrProvince:"\u90fd\u9053\u5e9c\u770c",country:"\u56fd",houseNumberOrName:"\u90e8\u5c4b\u756a\u53f7",separateDeliveryAddress:"\u5225\u306e\u914d\u9001\u5148\u4f4f\u6240\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044",deliveryAddress:"\u914d\u9001\u5148\u4f4f\u6240",zipCode:"\u90f5\u4fbf\u756a\u53f7",apartmentSuite:"\u30a2\u30d1\u30fc\u30c8\u540d/\u90e8\u5c4b\u540d",provinceOrTerritory:"\u5dde\u307e\u305f\u306f\u6e96\u5dde",cityTown:"\u5e02\u533a\u753a\u6751",address:"\u4f4f\u6240",state:"\u90fd\u9053\u5e9c\u770c","field.title.optional":"\uff08\u4efb\u610f\uff09","creditCard.cvcField.title.optional":"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30fc\u30b3\u30fc\u30c9(\u4efb\u610f)","issuerList.wallet.placeholder":"\u30a6\u30a9\u30ec\u30c3\u30c8\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044",privacyPolicy:"\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc\u30dd\u30ea\u30b7\u30fc","afterPay.agreement":"AfterPay\u306e%@\u3067\u540c\u610f",paymentConditions:"\u652f\u6255\u6761\u4ef6",openApp:"\u30a2\u30d7\u30ea\u3092\u958b\u304f","voucher.readInstructions":"\u624b\u9806\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044","voucher.introduction":"\u304a\u8cb7\u3044\u4e0a\u3052\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30af\u30fc\u30dd\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3001\u304a\u652f\u6255\u3044\u3092\u5b8c\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002","voucher.expirationDate":"\u6709\u52b9\u671f\u9650","voucher.alternativeReference":"\u5225\u306e\u53c2\u7167","dragonpay.voucher.non.bank.selectField.placeholder":"\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","dragonpay.voucher.bank.selectField.placeholder":"\u9280\u884c\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","voucher.paymentReferenceLabel":"\u652f\u6255\u306e\u53c2\u7167","voucher.surcharge":"%@ \u306e\u8ffd\u52a0\u6599\u91d1\u3092\u542b\u3080","voucher.introduction.doku":"\u304a\u8cb7\u3044\u4e0a\u3052\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u4f7f\u7528\u3057\u3066\u3001\u304a\u652f\u6255\u3044\u3092\u5b8c\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002","voucher.shopperName":"\u8cfc\u5165\u8005\u6c0f\u540d","voucher.merchantName":"\u696d\u8005","voucher.introduction.econtext":"\u304a\u8cb7\u3044\u4e0a\u3052\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u4f7f\u7528\u3057\u3066\u3001\u304a\u652f\u6255\u3044\u3092\u5b8c\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002","voucher.telephoneNumber":"\u96fb\u8a71\u756a\u53f7","voucher.shopperReference":"\u8cfc\u5165\u8005\u5411\u3051\u53c2\u8003\u60c5\u5831","voucher.collectionInstitutionNumber":"\u53ce\u7d0d\u6a5f\u95a2\u756a\u53f7","voucher.econtext.telephoneNumber.invalid":"\u96fb\u8a71\u756a\u53f7\u306f10\u6841\u307e\u305f\u306f11\u6841\u306b\u3057\u3066\u304f\u3060\u3055\u3044","boletobancario.btnLabel":"Boleto\u3092\u751f\u6210\u3059\u308b","boleto.sendCopyToEmail":"\u81ea\u5206\u306e\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306b\u30b3\u30d4\u30fc\u3092\u9001\u4fe1\u3059\u308b","button.copy":"\u30b3\u30d4\u30fc","button.download":"\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","creditCard.storedCard.description.ariaLabel":"\u4fdd\u5b58\u3055\u308c\u305f\u30ab\u30fc\u30c9\u306f\uff05@\u306b\u7d42\u4e86\u3057\u307e\u3059","voucher.entity":"\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3",donateButton:"\u5bc4\u4ed8\u3059\u308b",notNowButton:"\u4eca\u306f\u3057\u306a\u3044",thanksForYourSupport:"\u3054\u652f\u63f4\u3044\u305f\u3060\u304d\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002",preauthorizeWith:"\u6b21\u3067\u4e8b\u524d\u8a8d\u8a3c\u3059\u308b\uff1a",confirmPreauthorization:"\u4e8b\u524d\u627f\u8a8d\u3092\u78ba\u8a8d\u3059\u308b",confirmPurchase:"\u8cfc\u5165\u3092\u78ba\u8a8d\u3059\u308b",applyGiftcard:"\u5229\u7528\u3059\u308b",giftcardBalance:"\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u306e\u6b8b\u9ad8",deductedBalance:"\u5dee\u3057\u5f15\u304d\u5f8c\u6b8b\u9ad8","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"\u30ab\u30fc\u30c9\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u6700\u521d\u306e2\u6841","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u7121\u52b9\u3067\u3059","creditCard.taxNumber.label":"\u30ab\u30fc\u30c9\u6240\u6709\u8005\u306e\u751f\u5e74\u6708\u65e5\uff08YYMMDD\uff09\u307e\u305f\u306f\u6cd5\u4eba\u767b\u9332\u756a\u53f7\uff0810\u6841\uff09","creditCard.taxNumber.labelAlt":"\u6cd5\u4eba\u767b\u9332\u756a\u53f7\uff0810\u6841\uff09","creditCard.taxNumber.invalid":"\u30ab\u30fc\u30c9\u6240\u6709\u8005\u306e\u751f\u5e74\u6708\u65e5\u307e\u305f\u306f\u6cd5\u4eba\u767b\u9332\u756a\u53f7\u304c\u7121\u52b9\u3067\u3059","storedPaymentMethod.disable.button":"\u524a\u9664","storedPaymentMethod.disable.confirmation":"\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u652f\u6255\u65b9\u6cd5\u3092\u524a\u9664\u3059\u308b","storedPaymentMethod.disable.confirmButton":"\u306f\u3044\u3001\u524a\u9664\u3057\u307e\u3059","storedPaymentMethod.disable.cancelButton":"\u30ad\u30e3\u30f3\u30bb\u30eb","ach.bankAccount":"\u9280\u884c\u53e3\u5ea7","ach.accountHolderNameField.title":"\u53e3\u5ea7\u540d\u7fa9","ach.accountHolderNameField.placeholder":"Taro Yamada","ach.accountHolderNameField.invalid":"\u7121\u52b9\u306a\u53e3\u5ea7\u540d\u7fa9","ach.accountNumberField.title":"\u53e3\u5ea7\u756a\u53f7","ach.accountNumberField.invalid":"\u53e3\u5ea7\u756a\u53f7\u306e\u5165\u529b\u9593\u9055\u3044","ach.accountLocationField.title":"ABA\u30ca\u30f3\u30d0\u30fc","ach.accountLocationField.invalid":"\u7121\u52b9\u306aABA\u30ca\u30f3\u30d0\u30fc","select.state":"\u90fd\u9053\u5e9c\u770c\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","select.stateOrProvince":"\u90fd\u9053\u5e9c\u770c\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","select.provinceOrTerritory":"\u5dde\u307e\u305f\u306f\u6e96\u5dde\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","select.country":"\u56fd\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","select.noOptionsFound":"\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f","select.filter.placeholder":"\u691c\u7d22...","telephoneNumber.invalid":"\u7121\u52b9\u306a\u96fb\u8a71\u756a\u53f7",qrCodeOrApp:"\u307e\u305f\u306f","paypal.processingPayment":"\u652f\u6255\u3044\u3092\u51e6\u7406\u3057\u3066\u3044\u307e\u3059...",generateQRCode:"QR\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b","await.waitForConfirmation":"\u78ba\u8a8d\u3092\u5f85\u3063\u3066\u3044\u307e\u3059","mbway.confirmPayment":"MB WAY\u30a2\u30d7\u30ea\u3067\u652f\u6255\u3092\u78ba\u8a8d\u3059\u308b","shopperEmail.invalid":"E\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u304c\u7121\u52b9\u3067\u3059","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"18\u6b73\u4ee5\u4e0a\u306e\u65b9\u306e\u307f\u3054\u5229\u7528\u3044\u305f\u3060\u3051\u307e\u3059","blik.confirmPayment":"\u30d0\u30f3\u30ad\u30f3\u30b0\u30a2\u30d7\u30ea\u3092\u958b\u3044\u3066\u3001\u652f\u6255\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002","blik.invalid":"6\u3064\u306e\u6570\u5b57\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044","blik.code":"6\u6841\u306e\u30b3\u30fc\u30c9","blik.help":"\u30d0\u30f3\u30ad\u30f3\u30b0\u30a2\u30d7\u30ea\u304b\u3089\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3057\u3066\u304f\u3060\u3055\u3044\u3002","swish.pendingMessage":"\u30b9\u30ad\u30e3\u30f3\u5f8c\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u306f\u6700\u592710\u5206\u9593\u4fdd\u7559\u72b6\u614b\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u9593\u306b\u518d\u5ea6\u304a\u652f\u6255\u3044\u3044\u305f\u3060\u3053\u3046\u3068\u3059\u308b\u3068\u3001\u8907\u6570\u306e\u8acb\u6c42\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002","error.va.gen.01":"\u4e0d\u5b8c\u5168\u306a\u30d5\u30a3\u30fc\u30eb\u30c9","error.va.gen.02":"\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u7121\u52b9\u3067\u3059","error.va.sf-cc-num.01":"\u30ab\u30fc\u30c9\u756a\u53f7\u304c\u7121\u52b9\u3067\u3059","error.va.sf-cc-num.03":"\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30ab\u30fc\u30c9\u304c\u5165\u529b\u3055\u308c\u307e\u3057\u305f","error.va.sf-cc-dat.01":"\u30ab\u30fc\u30c9\u304c\u53e4\u3059\u304e\u307e\u3059","error.va.sf-cc-dat.02":"\u672a\u6765\u306e\u65e5\u4ed8\u304c\u5148\u3059\u304e\u3067\u3059","error.va.sf-cc-dat.03":"\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u65e5\u3088\u308a\u524d\u306b\u30ab\u30fc\u30c9\u306e\u6709\u52b9\u671f\u9650\u304c\u5207\u308c\u307e\u3059","error.giftcard.no-balance":"\u3053\u306e\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u306e\u6b8b\u9ad8\u306f\u30bc\u30ed\u3067\u3059","error.giftcard.card-error":"\u8a18\u9332\u3067\u306f\u3001\u3053\u306e\u756a\u53f7\u306e\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u306f\u3042\u308a\u307e\u305b\u3093","error.giftcard.currency-error":"\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u306f\u3001\u767a\u884c\u3055\u308c\u305f\u901a\u8ca8\u3067\u306e\u307f\u6709\u52b9\u3067\u3059\u3002","amazonpay.signout":"Amazon\u304b\u3089\u30b5\u30a4\u30f3\u30a2\u30a6\u30c8\u3059\u308b","amazonpay.changePaymentDetails":"\u652f\u6255\u660e\u7d30\u3092\u5909\u66f4\u3059\u308b","partialPayment.warning":"\u6b8b\u91d1\u3092\u652f\u6255\u3046\u5225\u306e\u652f\u6255\u65b9\u6cd5\u3092\u9078\u629e\u3057\u3066\u304f\u3060\u3055\u3044","partialPayment.remainingBalance":"\u6b8b\u308a\u306e\u6b8b\u9ad8\u306f%{amount}\u306b\u306a\u308a\u307e\u3059","bankTransfer.beneficiary":"\u53d7\u76ca\u8005","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"\u53c2\u7167","bankTransfer.introduction":"\u65b0\u3057\u3044\u9280\u884c\u632f\u8fbc\u306b\u3088\u308b\u304a\u652f\u6255\u306e\u4f5c\u6210\u3092\u7d9a\u884c\u3057\u307e\u3059\u3002\u6b21\u306e\u753b\u9762\u306e\u8a73\u7d30\u3092\u4f7f\u7528\u3057\u3066\u3001\u3053\u306e\u304a\u652f\u6255\u3044\u3092\u78ba\u5b9a\u3067\u304d\u307e\u3059\u3002","bankTransfer.instructions":"\u304a\u8cb7\u3044\u4e0a\u3052\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u60c5\u5831\u3092\u4f7f\u7528\u3057\u3066\u3001\u304a\u652f\u6255\u3044\u3092\u5b8c\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002","bacs.accountHolderName":"\u9280\u884c\u53e3\u5ea7\u540d\u7fa9","bacs.accountHolderName.invalid":"\u9280\u884c\u53e3\u5ea7\u540d\u7fa9\u304c\u7121\u52b9\u3067\u3059","bacs.accountNumber":"\u9280\u884c\u53e3\u5ea7\u756a\u53f7","bacs.accountNumber.invalid":"\u9280\u884c\u53e3\u5ea7\u756a\u53f7\u304c\u7121\u52b9\u3067\u3059","bacs.bankLocationId":"\u30bd\u30fc\u30c8\u30b3\u30fc\u30c9","bacs.bankLocationId.invalid":"\u30bd\u30fc\u30c8\u30b3\u30fc\u30c9\u304c\u7121\u52b9\u3067\u3059","bacs.consent.amount":"\u4e0a\u8a18\u306e\u91d1\u984d\u304c\u79c1\u306e\u9280\u884c\u53e3\u5ea7\u304b\u3089\u5f15\u304d\u843d\u3068\u3055\u308c\u308b\u3053\u3068\u306b\u540c\u610f\u3057\u307e\u3059\u3002","bacs.consent.account":"\u53e3\u5ea7\u304c\u79c1\u306e\u540d\u7fa9\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3001\u3053\u306e\u53e3\u5ea7\u304b\u3089\u306e\u81ea\u52d5\u5f15\u304d\u843d\u3068\u3057\u3092\u627f\u8a8d\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u552f\u4e00\u306e\u7f72\u540d\u8005\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002",edit:"\u7de8\u96c6","bacs.confirm":"\u78ba\u8a8d\u3057\u3066\u652f\u6255\u3046","bacs.result.introduction":"\u81ea\u52d5\u5f15\u304d\u843d\u3068\u3057\u306e\u8aac\u660e (DDI/\u59d4\u4efb\u72b6) \u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b","download.pdf":"PDF\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9","creditCard.encryptedCardNumber.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ab\u30fc\u30c9\u756a\u53f7\u306e iframe","creditCard.encryptedCardNumber.aria.label":"\u30ab\u30fc\u30c9\u756a\u53f7\u30d5\u30a3\u30fc\u30eb\u30c9","creditCard.encryptedExpiryDate.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ab\u30fc\u30c9\u306e\u6709\u52b9\u671f\u9650\u65e5\u306e iframe","creditCard.encryptedExpiryDate.aria.label":"\u6709\u52b9\u671f\u9650\u65e5\u30d5\u30a3\u30fc\u30eb\u30c9","creditCard.encryptedExpiryMonth.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ab\u30fc\u30c9\u306e\u6709\u52b9\u671f\u9650\u6708\u306e iframe","creditCard.encryptedExpiryMonth.aria.label":"\u6709\u52b9\u671f\u9650\u6708\u30d5\u30a3\u30fc\u30eb\u30c9","creditCard.encryptedExpiryYear.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ab\u30fc\u30c9\u306e\u6709\u52b9\u671f\u9650\u5e74\u306e iframe","creditCard.encryptedExpiryYear.aria.label":"\u6709\u52b9\u671f\u9650\u5e74\u30d5\u30a3\u30fc\u30eb\u30c9","creditCard.encryptedSecurityCode.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ab\u30fc\u30c9\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30fc\u30c9\u306e iframe","creditCard.encryptedSecurityCode.aria.label":"\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30fc\u30c9\u30d5\u30a3\u30fc\u30eb\u30c9","giftcard.encryptedCardNumber.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u306e iframe","giftcard.encryptedCardNumber.aria.label":"\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u756a\u53f7\u30d5\u30a3\u30fc\u30eb\u30c9","giftcard.encryptedSecurityCode.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30fc\u30c9\u306e iframe","giftcard.encryptedSecurityCode.aria.label":"\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b3\u30fc\u30c9\u30d5\u30a3\u30fc\u30eb\u30c9",giftcardTransactionLimit:"\u3053\u306e\u30ae\u30d5\u30c8\u30ab\u30fc\u30c9\u3067\u306e\u53d6\u5f15\u3054\u3068\u306b\u8a31\u53ef\u3055\u308c\u308b\u6700\u5927%{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u9280\u884c\u53e3\u5ea7\u756a\u53f7\u306e iframe","ach.encryptedBankAccountNumber.aria.label":"\u9280\u884c\u53e3\u5ea7\u30d5\u30a3\u30fc\u30eb\u30c9","ach.encryptedBankLocationId.aria.iframeTitle":"\u4fdd\u8b77\u3055\u308c\u305f\u9280\u884c\u652f\u5e97\u756a\u53f7\u306e iframe","ach.encryptedBankLocationId.aria.label":"\u9280\u884c\u652f\u5e97\u756a\u53f7\u30d5\u30a3\u30fc\u30eb\u30c9"}}),ug=Object.freeze({__proto__:null,default:{payButton:"\uacb0\uc81c","payButton.redirecting":"\ub9ac\ub514\ub809\uc158 \uc911...",storeDetails:"\ub2e4\uc74c \uacb0\uc81c\ub97c \uc704\ud574 \uc774 \uc218\ub2e8 \uc800\uc7a5","creditCard.holderName":"\uce74\ub4dc\uc0c1\uc758 \uc774\ub984","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uce74\ub4dc \uc18c\uc720\uc790 \uc774\ub984","creditCard.numberField.title":"\uce74\ub4dc \ubc88\ud638","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"\ub9cc\ub8cc\uc77c","creditCard.expiryDateField.placeholder":"MM/YY","creditCard.expiryDateField.month":"\uc6d4","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"YY","creditCard.expiryDateField.year":"\uc5f0\ub3c4","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\ub2e4\uc74c\uc744 \uc704\ud574 \uc800\uc7a5","creditCard.cvcField.placeholder.4digits":"4\uc790\ub9ac","creditCard.cvcField.placeholder.3digits":"3\uc790\ub9ac","creditCard.taxNumber.placeholder":"YYMMDD / 0123456789",installments:"\ud560\ubd80 \uac1c\uc6d4 \uc218",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times}\uac1c\uc6d4","installments.oneTime":"\uc77c\uc2dc\ubd88 \uacb0\uc81c","installments.installments":"\ud560\ubd80 \uacb0\uc81c","installments.revolving":"\ub9ac\ubcfc\ube59 \uacb0\uc81c","sepaDirectDebit.ibanField.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uacc4\uc88c \ubc88\ud638","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"\uc18c\uc720\uc790 \uc774\ub984","sepa.ibanNumber":"\uacc4\uc88c \ubc88\ud638(IBAN)","error.title":"\uc624\ub958","error.subtitle.redirect":"\ub9ac\ub514\ub809\uc158 \uc2e4\ud328","error.subtitle.payment":"\uacb0\uc81c \uc2e4\ud328","error.subtitle.refused":"\uacb0\uc81c \uac70\ubd80","error.message.unknown":"\uc54c \uc218 \uc5c6\ub294 \uc624\ub958 \ubc1c\uc0dd","idealIssuer.selectField.title":"\uc740\ud589","idealIssuer.selectField.placeholder":"\uc740\ud589 \uc120\ud0dd","creditCard.success":"\uacb0\uc81c \uc131\uacf5",loading:"\ub85c\ub4dc \uc911\u2026",continue:"\uacc4\uc18d",continueTo:"\ub2e4\uc74c\uc73c\ub85c \uacc4\uc18d:","wechatpay.timetopay":"\ub0a8\uc740 \uacb0\uc81c \uc2dc\ud55c: %@","wechatpay.scanqrcode":"QR \ucf54\ub4dc \uc2a4\uce94",personalDetails:"\uac1c\uc778 \uc815\ubcf4",companyDetails:"\ud68c\uc0ac \uc815\ubcf4","companyDetails.name":"\ud68c\uc0ac\uba85","companyDetails.registrationNumber":"\ub4f1\ub85d \ubc88\ud638",socialSecurityNumber:"\uc0ac\ud68c \ubcf4\uc7a5 \ubc88\ud638(\uc8fc\ubbfc\ub4f1\ub85d\ubc88\ud638)",firstName:"\uc774\ub984",infix:"\uba85\uce6d",lastName:"\uc131",mobileNumber:"\ud734\ub300\ud3f0 \ubc88\ud638","mobileNumber.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \ud734\ub300\ud3f0 \ubc88\ud638",city:"\uc2dc",postalCode:"\uc6b0\ud3b8\ubc88\ud638",countryCode:"\uad6d\uac00 \ucf54\ub4dc",telephoneNumber:"\uc804\ud654\ubc88\ud638",dateOfBirth:"\uc0dd\ub144\uc6d4\uc77c",shopperEmail:"\uc774\uba54\uc77c \uc8fc\uc18c",gender:"\uc131\ubcc4",male:"\ub0a8\uc131",female:"\uc5ec\uc131",billingAddress:"\uccad\uad6c\uc9c0 \uc8fc\uc18c",street:"\ub3c4\ub85c\uba85",stateOrProvince:"\uc8fc/\ub3c4",country:"\uad6d\uac00",houseNumberOrName:"\uc9d1 \uc804\ud654\ubc88\ud638",separateDeliveryAddress:"\ubc30\uc1a1 \uc8fc\uc18c \ubcc4\ub3c4 \uc9c0\uc815",deliveryAddress:"\ubc30\uc1a1 \uc8fc\uc18c",zipCode:"\uc6b0\ud3b8\ubc88\ud638",apartmentSuite:"\uc544\ud30c\ud2b8/\uac74\ubb3c",provinceOrTerritory:"\ub3c4",cityTown:"\uc2dc/\uad6c",address:"\uc8fc\uc18c",state:"\uc8fc","field.title.optional":"(\uc120\ud0dd \uc0ac\ud56d)","creditCard.cvcField.title.optional":"CVC / CVV (\uc120\ud0dd)","issuerList.wallet.placeholder":"\uc804\uc790 \uc9c0\uac11 \uc120\ud0dd",privacyPolicy:"\uac1c\uc778\uc815\ubcf4 \ubcf4\ud638\uc815\ucc45","afterPay.agreement":"AfterPay\uc758 %@\uc5d0 \ub3d9\uc758\ud569\ub2c8\ub2e4.",paymentConditions:"\uacb0\uc81c \uc870\uac74",openApp:"\uc571 \uc5f4\uae30","voucher.readInstructions":"\uc548\ub0b4 \uc77d\uae30","voucher.introduction":"\uad6c\ub9e4\ud574 \uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4. \ub2e4\uc74c \ucfe0\ud3f0\uc744 \uc0ac\uc6a9\ud558\uc5ec \uacb0\uc81c\ub97c \uc644\ub8cc\ud558\uc2ed\uc2dc\uc624.","voucher.expirationDate":"\ub9cc\ub8cc\uc77c","voucher.alternativeReference":"\ub300\uccb4 \ucc38\uc870\ubc88\ud638","dragonpay.voucher.non.bank.selectField.placeholder":"\uc81c\uacf5 \uc5c5\uccb4 \uc120\ud0dd","dragonpay.voucher.bank.selectField.placeholder":"\uc740\ud589 \uc120\ud0dd","voucher.paymentReferenceLabel":"\uacb0\uc81c \ucc38\uc870\ubc88\ud638","voucher.surcharge":"%@ \ud560\uc99d\ub8cc \ud3ec\ud568","voucher.introduction.doku":"\uad6c\ub9e4\ud574 \uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4. \ub2e4\uc74c \uc815\ubcf4\ub97c \uc774\uc6a9\ud558\uc5ec \uacb0\uc81c\ub97c \uc644\ub8cc\ud558\uc2ed\uc2dc\uc624.","voucher.shopperName":"\uad6c\ub9e4\uc790 \uc774\ub984","voucher.merchantName":"\uac00\ub9f9\uc810","voucher.introduction.econtext":"\uad6c\ub9e4\ud574 \uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4. \ub2e4\uc74c \uc815\ubcf4\ub97c \uc774\uc6a9\ud558\uc5ec \uacb0\uc81c\ub97c \uc644\ub8cc\ud558\uc2ed\uc2dc\uc624.","voucher.telephoneNumber":"\uc804\ud654\ubc88\ud638","voucher.shopperReference":"\uad6c\ub9e4\uc790 \ucc38\uc870\ubc88\ud638","voucher.collectionInstitutionNumber":"\uc218\uae08 \uae30\uad00 \ubc88\ud638","voucher.econtext.telephoneNumber.invalid":"\uc804\ud654\ubc88\ud638\ub294 10\uc790\ub9ac \ub610\ub294 11\uc790\ub9ac \uc22b\uc790\uc5ec\uc57c \ud569\ub2c8\ub2e4","boletobancario.btnLabel":"Boleto \uc0dd\uc131","boleto.sendCopyToEmail":"\ub0b4 \uc774\uba54\uc77c\ub85c \uc0ac\ubcf8 \ubcf4\ub0b4\uae30","button.copy":"\ubcf5\uc0ac","button.download":"\ub2e4\uc6b4\ub85c\ub4dc","creditCard.storedCard.description.ariaLabel":"\uc800\uc7a5\ub41c \uce74\ub4dc\ub294 %@ \ud6c4 \uc885\ub8cc\ub429\ub2c8\ub2e4.","voucher.entity":"\ubc1c\uae09\uc0ac",donateButton:"\uae30\ubd80\ud558\uae30",notNowButton:"\ub2e4\uc74c\uc5d0 \ud558\uae30",thanksForYourSupport:"\ub3c4\uc640\uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4!",preauthorizeWith:"\uc0ac\uc804 \uc2b9\uc778 \ubc29\ubc95:",confirmPreauthorization:"\uc0ac\uc804 \uc2b9\uc778 \ud655\uc778",confirmPurchase:"\uad6c\ub9e4 \ud655\uc778",applyGiftcard:"\uae30\ud504\ud2b8 \uce74\ub4dc\ub85c \uacb0\uc81c",giftcardBalance:"\uae30\ud504\ud2b8 \uce74\ub4dc \uc794\uc561",deductedBalance:"\uacf5\uc81c \uc794\uc561","creditCard.pin.title":"\ube44\ubc00\ubc88\ud638","creditCard.encryptedPassword.label":"\uce74\ub4dc \ube44\ubc00\ubc88\ud638 \uccab 2\uc790\ub9ac","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \ubc88\ud638","creditCard.taxNumber.label":"\uce74\ub4dc \uc18c\uc720\uc790 \uc0dd\ub144\uc6d4\uc77c(\uc608: 870130) \ub610\ub294 \ubc95\uc778 \ub4f1\ub85d \ubc88\ud638(10\uc790\ub9ac)","creditCard.taxNumber.labelAlt":"\ubc95\uc778 \ub4f1\ub85d \ubc88\ud638(10\uc790\ub9ac)","creditCard.taxNumber.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uce74\ub4dc \uc18c\uc720\uc790 \uc0dd\ub144\uc6d4\uc77c \ub610\ub294 \ubc95\uc778 \ub4f1\ub85d \ubc88\ud638","storedPaymentMethod.disable.button":"\uc0ad\uc81c","storedPaymentMethod.disable.confirmation":"\uc800\uc7a5\ub41c \uacb0\uc81c \uc218\ub2e8 \uc0ad\uc81c","storedPaymentMethod.disable.confirmButton":"\uc608, \uc0ad\uc81c\ud569\ub2c8\ub2e4","storedPaymentMethod.disable.cancelButton":"\ucde8\uc18c","ach.bankAccount":"\uc740\ud589 \uacc4\uc88c","ach.accountHolderNameField.title":"\uacc4\uc88c \uc18c\uc720\uc790 \uc774\ub984","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uacc4\uc88c \uc18c\uc720\uc790 \uc774\ub984","ach.accountNumberField.title":"\uacc4\uc88c \ubc88\ud638","ach.accountNumberField.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uacc4\uc88c \ubc88\ud638","ach.accountLocationField.title":"ABA \ub77c\uc6b0\ud305 \ubc88\ud638","ach.accountLocationField.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 ABA \ub77c\uc6b0\ud305 \ubc88\ud638","select.state":"\uc8fc \uc120\ud0dd","select.stateOrProvince":"\uc8fc/\ub3c4 \uc120\ud0dd","select.provinceOrTerritory":"\ub3c4 \uc120\ud0dd","select.country":"\uad6d\uac00 \uc120\ud0dd","select.noOptionsFound":"\uac80\uc0c9\ub41c \uc635\uc158 \uc5c6\uc74c","select.filter.placeholder":"\uac80\uc0c9...","telephoneNumber.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc804\ud654\ubc88\ud638",qrCodeOrApp:"\ub610\ub294","paypal.processingPayment":"\uacb0\uc81c \ucc98\ub9ac \uc911...",generateQRCode:"QR \ucf54\ub4dc \uc0dd\uc131","await.waitForConfirmation":"\ud655\uc778 \ub300\uae30\uc911","mbway.confirmPayment":"MB WAY \uc571\uc5d0\uc11c \uacb0\uc81c\ub97c \ud655\uc778\ud558\uc2ed\uc2dc\uc624","shopperEmail.invalid":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc774\uba54\uc77c \uc8fc\uc18c","dateOfBirth.format":"DD(\uc77c)/MM(\uc6d4)/YYYY(\uc5f0\ub3c4)","dateOfBirth.invalid":"\ucd5c\uc18c 18\uc138 \uc774\uc0c1\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4","blik.confirmPayment":"\ubc45\ud0b9 \uc571\uc744 \uc5f4\uc5b4\uc11c \uacb0\uc81c\ub97c \ud655\uc778\ud558\uc138\uc694.","blik.invalid":"6\uc790\ub9ac \uc22b\uc790 \uc785\ub825","blik.code":"6\uc790\ub9ac \ucf54\ub4dc","blik.help":"\ubc45\ud0b9 \uc571\uc5d0\uc11c \ucf54\ub4dc\ub97c \uac00\uc838\uc624\uc138\uc694.","swish.pendingMessage":"\uc2a4\uce94 \ud6c4 \ucd5c\ub300 10\ubd84 \ub3d9\uc548 \uc0c1\ud0dc\uac00 \ubcf4\ub958\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4. 10\ubd84 \ub0b4\uc5d0 \ub2e4\uc2dc \uc2dc\ub3c4\ud560 \uacbd\uc6b0 \uae08\uc561\uc774 \uc5ec\ub7ec \ubc88 \uccad\uad6c\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","error.va.gen.01":"\ubbf8\uc644\ub8cc \ud544\ub4dc","error.va.gen.02":"\ud544\ub4dc\uac00 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4","error.va.sf-cc-num.01":"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uce74\ub4dc \ubc88\ud638\uc785\ub2c8\ub2e4","error.va.sf-cc-num.03":"\uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uce74\ub4dc\uac00 \uc785\ub825\ub418\uc5c8\uc2b5\ub2c8\ub2e4","error.va.sf-cc-dat.01":"\uce74\ub4dc\uac00 \ub108\ubb34 \uc624\ub798\ub418\uc5c8\uc2b5\ub2c8\ub2e4","error.va.sf-cc-dat.02":"\ud604\uc7ac\ub85c\ubd80\ud130 \ub108\ubb34 \uba3c \ub0a0\uc9dc\uc785\ub2c8\ub2e4","error.va.sf-cc-dat.03":"\uadc0\ud558\uc758 \uce74\ub4dc\uac00 \uacb0\uc81c\uc77c \uc804\uc5d0 \ub9cc\ub8cc\ub429\ub2c8\ub2e4.","error.giftcard.no-balance":"\uc774 \uae30\ud504\ud2b8 \uce74\ub4dc\uc5d0\ub294 \uc794\uc561\uc774 \uc5c6\uc2b5\ub2c8\ub2e4","error.giftcard.card-error":"\uc774 \uae30\ud504\ud2b8 \uce74\ub4dc \ubc88\ud638\ub294 \ub2f9\uc0ac\uc5d0 \ub4f1\ub85d\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4","error.giftcard.currency-error":"\uae30\ud504\ud2b8 \uce74\ub4dc\ub294 \ubc1c\uae09\ub41c \ud1b5\ud654\ub85c\ub9cc \uc0ac\uc6a9\ud558\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4","amazonpay.signout":"Amazon\uc5d0\uc11c \ub85c\uadf8\uc544\uc6c3","amazonpay.changePaymentDetails":"\uacb0\uc81c \uc815\ubcf4 \ubcc0\uacbd","partialPayment.warning":"\ub098\uba38\uc9c0 \ube44\uc6a9 \uc9c0\ubd88\uc5d0 \uc0ac\uc6a9\ud560 \ub2e4\ub978 \uacb0\uc81c \uc218\ub2e8 \uc120\ud0dd\ud558\uae30","partialPayment.remainingBalance":"\ub0a8\uc740 \uc794\uc561\uc740 %{amount}\uc785\ub2c8\ub2e4","bankTransfer.beneficiary":"\uc218\ub839\uc778","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"\ucc38\uc870 \ubc88\ud638","bankTransfer.introduction":"\uc0c8 \uacc4\uc88c \uc774\uccb4 \uac74\uc744 \uacc4\uc18d \uc9c4\ud589\ud569\ub2c8\ub2e4. \ub2e4\uc74c \ud654\uba74\uc5d0 \ub098\uc624\ub294 \uc815\ubcf4\ub97c \uc774\uc6a9\ud574 \uc774\uccb4\ub97c \uc644\ub8cc\ud558\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.","bankTransfer.instructions":"\uad6c\ub9e4\ud574 \uc8fc\uc154\uc11c \uac10\uc0ac\ud569\ub2c8\ub2e4. \ub2e4\uc74c \uc815\ubcf4\ub97c \uc774\uc6a9\ud558\uc5ec \uacb0\uc81c\ub97c \uc644\ub8cc\ud558\uc2ed\uc2dc\uc624.","bacs.accountHolderName":"\uc608\uae08\uc8fc \uc774\ub984","bacs.accountHolderName.invalid":"\uc608\uae08\uc8fc \uc774\ub984\uc774 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4","bacs.accountNumber":"\uacc4\uc88c \ubc88\ud638","bacs.accountNumber.invalid":"\uacc4\uc88c \ubc88\ud638\uac00 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4","bacs.bankLocationId":"\uc740\ud589 \uc2dd\ubcc4 \ucf54\ub4dc","bacs.bankLocationId.invalid":"\uc740\ud589 \uc2dd\ubcc4 \ucf54\ub4dc\uac00 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4","bacs.consent.amount":"\uacc4\uc88c\uc5d0\uc11c \uc704\uc758 \uae08\uc561\uc744 \uc774\uccb4\ud558\ub294 \uac83\uc5d0 \ub3d9\uc758\ud569\ub2c8\ub2e4.","bacs.consent.account":"\ubcf8\uc778\uc774 \uc774 \uacc4\uc88c\uc758 \uc608\uae08\uc8fc\uc774\uba70, \uc774 \uacc4\uc88c\uc5d0\uc11c\uc758 \uc790\ub3d9 \uc774\uccb4\ub97c \uc2b9\uc778\ud558\uae30 \uc704\ud574 \ud544\uc694\ud55c \uc720\uc77c\ud55c \uc11c\uba85\uc778\uc785\ub2c8\ub2e4.",edit:"\uc218\uc815","bacs.confirm":"\ud655\uc778 \ubc0f \uacb0\uc81c","bacs.result.introduction":"\uc790\ub3d9 \uc774\uccb4 \uc548\ub0b4(DDI/\ud544\uc218) \ub2e4\uc6b4\ub85c\ub4dc","download.pdf":"PDF \ub2e4\uc6b4\ub85c\ub4dc","creditCard.encryptedCardNumber.aria.iframeTitle":"\uce74\ub4dc \ubc88\ud638 \ubcf4\uc548\uc744 \uc704\ud55c Iframe","creditCard.encryptedCardNumber.aria.label":"\uce74\ub4dc \ubc88\ud638 \uc785\ub825\ub780","creditCard.encryptedExpiryDate.aria.iframeTitle":"\uce74\ub4dc \ub9cc\ub8cc \ub0a0\uc9dc \ubcf4\uc548\uc744 \uc704\ud55c Iframe","creditCard.encryptedExpiryDate.aria.label":"\ub9cc\ub8cc \ub0a0\uc9dc \uc785\ub825\ub780","creditCard.encryptedExpiryMonth.aria.iframeTitle":"\uce74\ub4dc \ub9cc\ub8cc \uc6d4 \ubcf4\uc548\uc744 \uc704\ud55c Iframe","creditCard.encryptedExpiryMonth.aria.label":"\ub9cc\ub8cc \uc6d4 \uc785\ub825\ub780","creditCard.encryptedExpiryYear.aria.iframeTitle":"\uce74\ub4dc \ub9cc\ub8cc \uc5f0\ub3c4 \ubcf4\uc548\uc744 \uc704\ud55c Iframe","creditCard.encryptedExpiryYear.aria.label":"\ub9cc\ub8cc \uc5f0\ub3c4 \uc785\ub825\ub780","creditCard.encryptedSecurityCode.aria.iframeTitle":"\uce74\ub4dc \ubcf4\uc548 \ucf54\ub4dc \ubcf4\uc548\uc744 \uc704\ud55c Iframe","creditCard.encryptedSecurityCode.aria.label":"\ubcf4\uc548 \ucf54\ub4dc \uc785\ub825\ub780","giftcard.encryptedCardNumber.aria.iframeTitle":"\uae30\ud504\ud2b8 \uce74\ub4dc \ubc88\ud638 \ubcf4\uc548\uc744 \uc704\ud55c Iframe","giftcard.encryptedCardNumber.aria.label":"\uae30\ud504\ud2b8 \uce74\ub4dc \ubc88\ud638 \uc785\ub825\ub780","giftcard.encryptedSecurityCode.aria.iframeTitle":"\uae30\ud504\ud2b8 \uce74\ub4dc \ubcf4\uc548 \ucf54\ub4dc \ubcf4\uc548\uc744 \uc704\ud55c Iframe","giftcard.encryptedSecurityCode.aria.label":"\uae30\ud504\ud2b8 \uce74\ub4dc \ubcf4\uc548 \ucf54\ub4dc \uc785\ub825\ub780",giftcardTransactionLimit:"\uc774 \uae30\ud504\ud2b8\uce74\ub4dc\ub85c \uac74\ub2f9 \uacb0\uc81c \uac00\ub2a5\ud55c \ucd5c\uace0 \uc561\uc218\ub294 %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"\uc740\ud589 \uacc4\uc88c \ubc88\ud638 \ubcf4\uc548\uc744 \uc704\ud55c Iframe","ach.encryptedBankAccountNumber.aria.label":"\uc740\ud589 \uacc4\uc88c \uc785\ub825\ub780","ach.encryptedBankLocationId.aria.iframeTitle":"\uc740\ud589 \ub77c\uc6b0\ud305 \ubc88\ud638 \ubcf4\uc548\uc744 \uc704\ud55c Iframe","ach.encryptedBankLocationId.aria.label":"\uc740\ud589 \ub77c\uc6b0\ud305 \ubc88\ud638 \uc785\ub825\ub780"}}),pg=Object.freeze({__proto__:null,default:{payButton:"Betaal","payButton.redirecting":"U wordt doorverwezen...",storeDetails:"Bewaar voor mijn volgende betaling","creditCard.holderName":"Naam op kaart","creditCard.holderName.placeholder":"J. Janssen","creditCard.holderName.invalid":"Ongeldige naam kaarthouder","creditCard.numberField.title":"Kaartnummer","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Vervaldatum","creditCard.expiryDateField.placeholder":"MM/JJ","creditCard.expiryDateField.month":"Maand","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"JJ","creditCard.expiryDateField.year":"Jaar","creditCard.cvcField.title":"Verificatiecode","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Onthouden voor de volgende keer","creditCard.cvcField.placeholder.4digits":"4 cijfers","creditCard.cvcField.placeholder.3digits":"3 cijfers","creditCard.taxNumber.placeholder":"JJMMDD / 0123456789",installments:"Aantal termijnen",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} maanden","installments.oneTime":"Eenmalige betaling","installments.installments":"Betaling termijnen","installments.revolving":"Terugkerende betaling","sepaDirectDebit.ibanField.invalid":"Ongeldig rekeningnummer","sepaDirectDebit.nameField.placeholder":"P. de Ridder","sepa.ownerName":"Ten name van","sepa.ibanNumber":"Rekeningnummer (IBAN)","error.title":"Fout","error.subtitle.redirect":"Doorsturen niet gelukt","error.subtitle.payment":"Betaling is niet geslaagd","error.subtitle.refused":"Betaling geweigerd","error.message.unknown":"Er is een onbekende fout opgetreden","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"Selecteer uw bank","creditCard.success":"Betaling geslaagd",loading:"Laden....",continue:"Doorgaan",continueTo:"Doorgaan naar","wechatpay.timetopay":"U heeft %@ om te betalen","wechatpay.scanqrcode":"QR-code scannen",personalDetails:"Persoonlijke gegevens",companyDetails:"Bedrijfsgegevens","companyDetails.name":"Bedrijfsnaam","companyDetails.registrationNumber":"Registratienummer",socialSecurityNumber:"Burgerservicenummer",firstName:"Voornaam",infix:"Voorvoegsel",lastName:"Achternaam",mobileNumber:"Telefoonnummer mobiel","mobileNumber.invalid":"Ongeldig mobiel nummer",city:"Stad",postalCode:"Postcode",countryCode:"Landcode",telephoneNumber:"Telefoonnummer",dateOfBirth:"Geboortedatum",shopperEmail:"E-mailadres",gender:"Geslacht",male:"Man",female:"Vrouw",billingAddress:"Factuuradres",street:"Straatnaam",stateOrProvince:"Staat of provincie",country:"Land",houseNumberOrName:"Huisnummer",separateDeliveryAddress:"Een afwijkend bezorgadres opgeven",deliveryAddress:"Bezorgadres",zipCode:"Postcode",apartmentSuite:"Appartement/Suite",provinceOrTerritory:"Provincie of territorium",cityTown:"Stad",address:"Adres",state:"Staat","field.title.optional":"(optioneel)","creditCard.cvcField.title.optional":"CVC / CVV (optioneel)","issuerList.wallet.placeholder":"Selecteer uw portemonnee",privacyPolicy:"Privacybeleid","afterPay.agreement":"Ik ga akkoord met de %@ van AfterPay",paymentConditions:"betalingsvoorwaarden",openApp:"Open de app","voucher.readInstructions":"Instructies lezen","voucher.introduction":"Bedankt voor uw aankoop. Gebruik deze coupon om uw betaling te voltooien.","voucher.expirationDate":"Vervaldatum","voucher.alternativeReference":"Alternatieve referentie","dragonpay.voucher.non.bank.selectField.placeholder":"Selecteer uw aanbieder","dragonpay.voucher.bank.selectField.placeholder":"Selecteer uw bank","voucher.paymentReferenceLabel":"Betalingsreferentie","voucher.surcharge":"Inclusief %@ toeslag","voucher.introduction.doku":"Bedankt voor uw aankoop. Gebruik de volgende informatie om uw betaling te voltooien.","voucher.shopperName":"Klantnaam","voucher.merchantName":"Verkoper","voucher.introduction.econtext":"Bedankt voor uw aankoop. Gebruik de volgende informatie om uw betaling te voltooien.","voucher.telephoneNumber":"Telefoonnummer","voucher.shopperReference":"Klant referentie","voucher.collectionInstitutionNumber":"Nummer ophaallocatie","voucher.econtext.telephoneNumber.invalid":"Het telefoonnummer moet uit 10 of 11 cijfers bestaan","boletobancario.btnLabel":"Boleto genereren","boleto.sendCopyToEmail":"Stuur een kopie naar mijn e-mailadres","button.copy":"Kopi\xebren","button.download":"Downloaden","creditCard.storedCard.description.ariaLabel":"Opgeslagen kaart eindigt op %@","voucher.entity":"Entiteit",donateButton:"Doneren",notNowButton:"Niet nu",thanksForYourSupport:"Bedankt voor uw donatie!",preauthorizeWith:"Preautorisatie uitvoeren met",confirmPreauthorization:"Preautorisatie bevestigen",confirmPurchase:"Aankoop bevestigen",applyGiftcard:"Inwisselen",giftcardBalance:"Saldo cadeaukaart",deductedBalance:"Afgetrokken bedrag","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Eerste twee cijfers van het wachtwoord van de kaart","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Ongeldig wachtwoord","creditCard.taxNumber.label":"Geboortedatum (JJ-MM-DD) of bedrijfsregistratienummer (10 cijfers) van kaarthouder","creditCard.taxNumber.labelAlt":"Bedrijfsregistratienummer (10 cijfers)","creditCard.taxNumber.invalid":"Geboortedatum of bedrijfsregistratienummer van kaarthouder is ongeldig","storedPaymentMethod.disable.button":"Verwijderen","storedPaymentMethod.disable.confirmation":"Opgeslagen betalingsmethode verwijderen","storedPaymentMethod.disable.confirmButton":"Ja, verwijderen","storedPaymentMethod.disable.cancelButton":"Annuleren","ach.bankAccount":"Bankrekening","ach.accountHolderNameField.title":"Naam rekeninghouder","ach.accountHolderNameField.placeholder":"J. Janssen","ach.accountHolderNameField.invalid":"Ongeldige naam rekeninghouder","ach.accountNumberField.title":"Rekeningnummer","ach.accountNumberField.invalid":"Ongeldig rekeningnummer","ach.accountLocationField.title":"Routingnummer (ABA)","ach.accountLocationField.invalid":"Ongeldig routingnummer (ABA)","select.state":"Selecteer staat","select.stateOrProvince":"Selecteer staat of provincie","select.provinceOrTerritory":"Selecteer provincie of territorium","select.country":"Selecteer land","select.noOptionsFound":"Geen opties gevonden","select.filter.placeholder":"Zoeken...","telephoneNumber.invalid":"Ongeldig telefoonnummer",qrCodeOrApp:"of","paypal.processingPayment":"Betaling wordt verwerkt...",generateQRCode:"Genereer QR-code","await.waitForConfirmation":"Wacht op bevestiging","mbway.confirmPayment":"Bevestig uw betaling via de MB WAY-app","shopperEmail.invalid":"Ongeldig e-mailadres","dateOfBirth.format":"DD/MM/JJJJ","dateOfBirth.invalid":"U moet minimaal 18 jaar oud zijn","blik.confirmPayment":"Open uw bankapp om de betaling te bevestigen.","blik.invalid":"Voer 6 cijfers in","blik.code":"6-cijferige code","blik.help":"Haal de code op in uw bankapp.","swish.pendingMessage":"Nadat u hebt gescand, kan de status maximaal 10 minuten in behandeling zijn. Als u binnen deze periode opnieuw probeert te betalen, kunnen er meerdere keren kosten in rekening worden gebracht.","error.va.gen.01":"Onvolledig veld","error.va.gen.02":"Veld niet geldig","error.va.sf-cc-num.01":"Ongeldig kaartnummer","error.va.sf-cc-num.03":"Niet-ondersteunde kaart ingevoerd","error.va.sf-cc-dat.01":"Kaart te oud","error.va.sf-cc-dat.02":"Datum te ver in de toekomst","error.va.sf-cc-dat.03":"Uw kaart verloopt voor de betaaldatum","error.giftcard.no-balance":"Deze cadeaukaart heeft geen saldo","error.giftcard.card-error":"We hebben geen cadeaukaart met dit nummer in onze administratie","error.giftcard.currency-error":"Cadeaukaarten zijn alleen geldig in de valuta waarin ze zijn uitgegeven","amazonpay.signout":"Afmelden bij Amazon","amazonpay.changePaymentDetails":"Betalingsgegevens wijzigen","partialPayment.warning":"Selecteer een andere betaalmethode om het resterende deel te betalen","partialPayment.remainingBalance":"Het resterende saldo is %{amount}","bankTransfer.beneficiary":"Begunstigde","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referentie","bankTransfer.introduction":"Ga door om een nieuwe overschrijving aan te maken. U kunt de gegevens in het volgende scherm gebruiken om deze betaling af te ronden.","bankTransfer.instructions":"Bedankt voor uw aankoop. Gebruik de volgende informatie om uw betaling te voltooien.","bacs.accountHolderName":"Naam bankrekeninghouder","bacs.accountHolderName.invalid":"Ongeldige naam bankrekeninghouder","bacs.accountNumber":"Bankrekeningnummer","bacs.accountNumber.invalid":"Ongeldig bankrekeningnummer","bacs.bankLocationId":"Bankcode","bacs.bankLocationId.invalid":"Ongeldige bankcode","bacs.consent.amount":"Ik ga ermee akkoord dat het bovengenoemde bedrag van mijn bankrekening wordt afgeschreven.","bacs.consent.account":"Ik bevestig dat de rekening op mijn naam staat en dat ik de enige ondertekenaar ben die toestemming kan geven voor automatische incasso's vanaf deze rekening.",edit:"Bewerken","bacs.confirm":"Bevestigen en betalen","bacs.result.introduction":"Download uw machtiging automatische incasso","download.pdf":"PDF downloaden","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe voor beveiligd kaartnummer","creditCard.encryptedCardNumber.aria.label":"Veld voor kaartnummer","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe voor vervaldatum beveiligde kaart","creditCard.encryptedExpiryDate.aria.label":"Veld voor vervaldatum","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe voor vervalmaand beveiligde kaart","creditCard.encryptedExpiryMonth.aria.label":"Veld voor vervalmaand","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe voor vervaljaar beveiligde kaart","creditCard.encryptedExpiryYear.aria.label":"Veld voor vervaljaar","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe voor beveiligingscode beveiligde kaart","creditCard.encryptedSecurityCode.aria.label":"Veld voor beveiligingscode","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe voor beveiligd cadeaubonnummer","giftcard.encryptedCardNumber.aria.label":"Veld voor cadeaubonnummer","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe voor beveiligingscode beveiligde cadeaubon","giftcard.encryptedSecurityCode.aria.label":"Veld beveiligingscode cadeaubon",giftcardTransactionLimit:"Max. %{amount} toegestaan per transactie met deze cadeaubon","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe voor beveiligd bankrekeningnummer","ach.encryptedBankAccountNumber.aria.label":"Veld voor bankrekening","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe voor beveiligde BIC-code","ach.encryptedBankLocationId.aria.label":"Veld voor BIC-code"}}),mg=Object.freeze({__proto__:null,default:{payButton:"Betal","payButton.redirecting":"Omdirigerer...",storeDetails:"Lagre til min neste betaling","creditCard.holderName":"Navn p\xe5 kortet","creditCard.holderName.placeholder":"O. Nordmann","creditCard.holderName.invalid":"Ugyldig navn p\xe5 kortholder","creditCard.numberField.title":"Kortnummer","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Utl\xf8psdato","creditCard.expiryDateField.placeholder":"MM/\xc5\xc5","creditCard.expiryDateField.month":"M\xe5ned","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"\xc5\xc5","creditCard.expiryDateField.year":"\xc5r","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Husk til neste gang","creditCard.cvcField.placeholder.4digits":"4 siffer","creditCard.cvcField.placeholder.3digits":"3 siffer","creditCard.taxNumber.placeholder":"YYMMDD / 0123456789",installments:"Antall avdrag",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} m\xe5neder","installments.oneTime":"Engangsbetaling","installments.installments":"Avdragsbetaling","installments.revolving":"Gjentakende betaling","sepaDirectDebit.ibanField.invalid":"Ugyldig kontonummer","sepaDirectDebit.nameField.placeholder":"O. Nordmann","sepa.ownerName":"Kortholders navn","sepa.ibanNumber":"Kontonummer (IBAN)","error.title":"Feil","error.subtitle.redirect":"Videresending feilet","error.subtitle.payment":"Betaling feilet","error.subtitle.refused":"Betaling avvist","error.message.unknown":"En ukjent feil oppstod","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"Velg din bank","creditCard.success":"Betalingen var vellykket",loading:"Laster...",continue:"Fortsett",continueTo:"Fortsett til","wechatpay.timetopay":"Du har %@ igjen til \xe5 betale","wechatpay.scanqrcode":"Skann QR-kode",personalDetails:"Personopplysninger",companyDetails:"Firmadetaljer","companyDetails.name":"Firmanavn","companyDetails.registrationNumber":"Registreringsnummer",socialSecurityNumber:"Personnummer",firstName:"Fornavn",infix:"Prefiks",lastName:"Etternavn",mobileNumber:"Mobilnummer","mobileNumber.invalid":"Ugyldig mobilnummer",city:"Poststed",postalCode:"Postnummer",countryCode:"Landkode",telephoneNumber:"Telefonnummer",dateOfBirth:"F\xf8dselsdato",shopperEmail:"E-postadresse",gender:"Kj\xf8nn",male:"Mann",female:"Kvinne",billingAddress:"Faktureringsadresse",street:"Gate",stateOrProvince:"Fylke",country:"Land",houseNumberOrName:"Husnummer",separateDeliveryAddress:"Spesifiser en separat leveringsadresse",deliveryAddress:"Leveringsadresse",zipCode:"Postnummer",apartmentSuite:"Leilighet/suite",provinceOrTerritory:"Provins eller territorium",cityTown:"By",address:"Adresse",state:"Delstat","field.title.optional":"(valgfritt)","creditCard.cvcField.title.optional":"CVC / CVV (valgfritt)","issuerList.wallet.placeholder":"Velg lommebok",privacyPolicy:"Retningslinjer for personvern","afterPay.agreement":"Jeg godtar AfterPays %@",paymentConditions:"betalingsbetingelser",openApp:"\xc5pne appen","voucher.readInstructions":"Les instruksjoner","voucher.introduction":"Takk for ditt kj\xf8p. Vennligst bruk den f\xf8lgende kupongen til \xe5 fullf\xf8re betalingen.","voucher.expirationDate":"Utl\xf8psdato","voucher.alternativeReference":"Alternativ referanse","dragonpay.voucher.non.bank.selectField.placeholder":"Velg din leverand\xf8r","dragonpay.voucher.bank.selectField.placeholder":"Velg din bank","voucher.paymentReferenceLabel":"Betalingsreferanse","voucher.surcharge":"Inkl. %@ tilleggsavgift","voucher.introduction.doku":"Takk for ditt kj\xf8p, vennligst bruk den f\xf8lgende informasjonen for \xe5 fullf\xf8re betalingen.","voucher.shopperName":"Kundenavn","voucher.merchantName":"Forhandler","voucher.introduction.econtext":"Takk for ditt kj\xf8p, vennligst bruk den f\xf8lgende informasjonen for \xe5 fullf\xf8re betalingen.","voucher.telephoneNumber":"Telefonnummer","voucher.shopperReference":"Kundereferanse","voucher.collectionInstitutionNumber":"Innbetalingslokasjonsnummer","voucher.econtext.telephoneNumber.invalid":"Telefonnummeret m\xe5 v\xe6re 10 eller 11 sifre langt","boletobancario.btnLabel":"Generer Boleto","boleto.sendCopyToEmail":"Send meg en kopi p\xe5 e-post","button.copy":"Kopier","button.download":"Last ned","creditCard.storedCard.description.ariaLabel":"Lagret kort slutter p\xe5 %@","voucher.entity":"Enhet",donateButton:"Don\xe9r",notNowButton:"Ikke n\xe5",thanksForYourSupport:"Takk for din st\xf8tte!",preauthorizeWith:"Forh\xe5ndsgodkjenn med",confirmPreauthorization:"Bekreft forh\xe5ndsgodkjenning",confirmPurchase:"Bekreft kj\xf8p",applyGiftcard:"L\xf8s inn",giftcardBalance:"Gavekortsaldo",deductedBalance:"Fratrukket bel\xf8p","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"F\xf8rste 2 sifre av kortpassord","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Ugyldig passord","creditCard.taxNumber.label":"Kortholders f\xf8dselsdato (YYMMDD) eller bedriftsregistreringsnummer (10 siffer)","creditCard.taxNumber.labelAlt":"Bedriftsregistreringsnummer (10 siffer)","creditCard.taxNumber.invalid":"Ugyldig kortholders f\xf8dselsdato eller bedriftsregistreringsnummer","storedPaymentMethod.disable.button":"Fjern","storedPaymentMethod.disable.confirmation":"Fjern lagret betalingsmetode","storedPaymentMethod.disable.confirmButton":"Ja, fjern","storedPaymentMethod.disable.cancelButton":"Avbryt","ach.bankAccount":"Bankkonto","ach.accountHolderNameField.title":"Kontoholders navn","ach.accountHolderNameField.placeholder":"O. Nordmann","ach.accountHolderNameField.invalid":"Ugyldig navn p\xe5 kontoholder","ach.accountNumberField.title":"Kontonummer","ach.accountNumberField.invalid":"Ugyldig kontonummer","ach.accountLocationField.title":"ABA-dirigeringsnummer","ach.accountLocationField.invalid":"Ugyldig ABA-dirigeringsnummer","select.state":"Velg delstat","select.stateOrProvince":"Velg delstat eller provins","select.provinceOrTerritory":"Velg provins eller territorium","select.country":"Velg land","select.noOptionsFound":"Ingen alternativer funnet","select.filter.placeholder":"S\xf8k\xa0\u2026","telephoneNumber.invalid":"Ugyldig telefonnummer",qrCodeOrApp:"eller","paypal.processingPayment":"Behandler betaling \u2026",generateQRCode:"Generer QR-kode","await.waitForConfirmation":"Venter p\xe5 bekreftelse","mbway.confirmPayment":"Bekreft betalingen din i MB WAY-appen","shopperEmail.invalid":"Ugyldig e-postadresse","dateOfBirth.format":"DD/MM/\xc5\xc5\xc5\xc5","dateOfBirth.invalid":"Du m\xe5 v\xe6re minst 18 \xe5r gammel","blik.confirmPayment":"\xc5pne bank-appen din for \xe5 bekrefte betalingen.","blik.invalid":"Tast inn 6 tall","blik.code":"6-sifret kode","blik.help":"Hent koden fra bank-appen din.","swish.pendingMessage":"Etter at du har skannet koden kan det ta opptil 10 minutter f\xf8r betalingen vises som bekreftet. Fors\xf8k p\xe5 \xe5 betale igjen kan f\xf8re til flere innbetalinger.","error.va.gen.01":"Ufullstendig felt","error.va.gen.02":"Feltet er ikke gyldig","error.va.sf-cc-num.01":"Ugyldig kortnummer","error.va.sf-cc-num.03":"Det angitte kortet st\xf8ttes ikke","error.va.sf-cc-dat.01":"Kortet er for gammelt","error.va.sf-cc-dat.02":"Datoen er for langt inn i fremtiden","error.va.sf-cc-dat.03":"Kortet ditt utl\xf8per f\xf8r betalingsdatoen","error.giftcard.no-balance":"Dette gavekortet har en saldo p\xe5 null","error.giftcard.card-error":"Vi har ikke noe gavekort med dette nummeret i registrene v\xe5re","error.giftcard.currency-error":"Gavekort er kun gyldige i den valutaen de ble utstedt i","amazonpay.signout":"Logg ut av Amazon","amazonpay.changePaymentDetails":"Endre betalingsdetaljer","partialPayment.warning":"Velg en annen betalingsmetode for \xe5 betale det gjenv\xe6rende","partialPayment.remainingBalance":"Gjenv\xe6rende saldo vil v\xe6re %{amount}","bankTransfer.beneficiary":"Mottaker","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"referanse","bankTransfer.introduction":"Fortsett for \xe5 opprette en ny betaling via bankoverf\xf8ring. Du kan bruke detaljene i det f\xf8lgende skjermbildet for \xe5 fullf\xf8re betalingen.","bankTransfer.instructions":"Takk for kj\xf8pet. Vennligst benytt den f\xf8lgende informasjonen til \xe5 fullf\xf8re betalingen.","bacs.accountHolderName":"Kontoholders navn","bacs.accountHolderName.invalid":"Ugyldig kontoholdernavn","bacs.accountNumber":"Bankkontonummer","bacs.accountNumber.invalid":"Ugyldig bankkontonummer","bacs.bankLocationId":"Sorteringskode","bacs.bankLocationId.invalid":"Ugyldig sorteringskode","bacs.consent.amount":"Jeg samtykker til at bel\xf8pet ovenfor blir trukket fra bankkontoen min.","bacs.consent.account":"Jeg bekrefter at kontoen st\xe5r i mitt navn, og at jeg er den eneste signataren som kreves for \xe5 autorisere direktebelastningen p\xe5 denne kontoen.",edit:"Endre","bacs.confirm":"Bekreft og betal","bacs.result.introduction":"Last ned instruksjoner for direktebelastning (DDI/ mandat)","download.pdf":"Last ned PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe for sikret kortnummer","creditCard.encryptedCardNumber.aria.label":"Kortnummerfelt","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe for sikret kortutl\xf8psdato","creditCard.encryptedExpiryDate.aria.label":"Felt for utl\xf8psdato","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe for sikret kortutl\xf8psm\xe5ned","creditCard.encryptedExpiryMonth.aria.label":"Felt for utl\xf8psm\xe5ned","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe for sikret kortutl\xf8ps\xe5r","creditCard.encryptedExpiryYear.aria.label":"Felt for utl\xf8ps\xe5r","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe for sikret kortsikkerhetskode","creditCard.encryptedSecurityCode.aria.label":"Felt for sikkerhetskode","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe for sikret gavekortnummer","giftcard.encryptedCardNumber.aria.label":"Felt for gavekortnummer","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe for sikret gavekort-sikkerhetskode","giftcard.encryptedSecurityCode.aria.label":"Felt for sikkerhetskode for gavekort",giftcardTransactionLimit:"Maksimalt %{amount} per transaksjon er tillatt p\xe5 dette gavekortet","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe for sikret bankkontonummer","ach.encryptedBankAccountNumber.aria.label":"Bankkontofelt","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe for sikret bankdirigeringsnummer","ach.encryptedBankLocationId.aria.label":"Felt for bankdirigeringsnummer"}}),hg=Object.freeze({__proto__:null,default:{payButton:"Zap\u0142a\u0107","payButton.redirecting":"Przekierowywanie...",storeDetails:"Zapisz na potrzeby nast\u0119pnej p\u0142atno\u015bci","creditCard.holderName":"Imi\u0119 i nazwisko na karcie","creditCard.holderName.placeholder":"J. Kowalski","creditCard.holderName.invalid":"Nieprawid\u0142owe imi\u0119 i nazwisko posiadacza karty","creditCard.numberField.title":"Numer karty ","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Data wa\u017cno\u015bci","creditCard.expiryDateField.placeholder":"MM/RR","creditCard.expiryDateField.month":"Miesi\u0105c","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"RR","creditCard.expiryDateField.year":"Rok","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Zapami\u0119taj na przysz\u0142o\u015b\u0107","creditCard.cvcField.placeholder.4digits":"4 cyfry","creditCard.cvcField.placeholder.3digits":"3 cyfry","creditCard.taxNumber.placeholder":"RRMMDD / 0123456789",installments:"Liczba rat",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} miesi\u0119cy","installments.oneTime":"P\u0142atno\u015b\u0107 jednorazowa","installments.installments":"P\u0142atno\u015b\u0107 ratalna","installments.revolving":"P\u0142atno\u015b\u0107 odnawialna","sepaDirectDebit.ibanField.invalid":"Nieprawid\u0142owy numer rachunku","sepaDirectDebit.nameField.placeholder":"J. Kowalski","sepa.ownerName":"Imi\u0119 i nazwisko posiadacza karty","sepa.ibanNumber":"Numer rachunku (IBAN)","error.title":"B\u0142\u0105d","error.subtitle.redirect":"Przekierowanie nie powiod\u0142o si\u0119","error.subtitle.payment":"P\u0142atno\u015b\u0107 nie powiod\u0142a si\u0119","error.subtitle.refused":"P\u0142atno\u015b\u0107 zosta\u0142a odrzucona","error.message.unknown":"Wyst\u0105pi\u0142 nieoczekiwany b\u0142\u0105d","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"Wybierz sw\xf3j bank","creditCard.success":"P\u0142atno\u015b\u0107 zako\u0144czona sukcesem",loading:"\u0141adowanie...",continue:"Kontynuuj",continueTo:"Przejd\u017a do","wechatpay.timetopay":"Masz do zap\u0142acenia %@","wechatpay.scanqrcode":"Zeskanuj kod QR",personalDetails:"Dane osobowe",companyDetails:"Dane firmy","companyDetails.name":"Nazwa firmy","companyDetails.registrationNumber":"Numer w rejestrze",socialSecurityNumber:"Numer dowodu osobistego",firstName:"Imi\u0119",infix:"Prefiks",lastName:"Nazwisko",mobileNumber:"Numer telefonu kom\xf3rkowego","mobileNumber.invalid":"Nieprawid\u0142owy numer telefonu kom\xf3rkowego",city:"Miasto",postalCode:"Kod pocztowy",countryCode:"Kod kraju",telephoneNumber:"Numer telefonu",dateOfBirth:"Data urodzenia",shopperEmail:"Adres e-mail",gender:"P\u0142e\u0107",male:"M\u0119\u017cczyzna",female:"Kobieta",billingAddress:"Adres rozliczeniowy",street:"Ulica",stateOrProvince:"Wojew\xf3dztwo",country:"Kraj",houseNumberOrName:"Numer domu i mieszkania",separateDeliveryAddress:"Podaj osobny adres dostawy",deliveryAddress:"Adres dostawy",zipCode:"Kod pocztowy",apartmentSuite:"Numer domu/mieszkania",provinceOrTerritory:"Region lub terytorium",cityTown:"Miejscowo\u015b\u0107",address:"Adres",state:"Stan","field.title.optional":"(opcjonalnie)","creditCard.cvcField.title.optional":"CVC / CVV (opcjonalnie)","issuerList.wallet.placeholder":"Wybierz sw\xf3j portfel",privacyPolicy:"Polityka prywatno\u015bci.","afterPay.agreement":"Zgadzam si\u0119 z dokumentem %@ AfterPay",paymentConditions:"warunki p\u0142atno\u015bci",openApp:"Otw\xf3rz aplikacj\u0119","voucher.readInstructions":"Przeczytaj instrukcje","voucher.introduction":"Dzi\u0119kujemy za zakup, doko\u0144cz p\u0142atno\u015b\u0107 przy u\u017cyciu tego kuponu.","voucher.expirationDate":"Data wa\u017cno\u015bci","voucher.alternativeReference":"Dodatkowy numer referencyjny","dragonpay.voucher.non.bank.selectField.placeholder":"Wybierz dostawc\u0119","dragonpay.voucher.bank.selectField.placeholder":"Wybierz sw\xf3j bank","voucher.paymentReferenceLabel":"Nr referencyjny p\u0142atno\u015bci","voucher.surcharge":"Zawiera %@ op\u0142aty dodatkowej","voucher.introduction.doku":"Dzi\u0119kujemy za zakup. Doko\u0144cz p\u0142atno\u015b\u0107 przy u\u017cyciu poni\u017cszych informacji.","voucher.shopperName":"Imi\u0119 i nazwisko klienta","voucher.merchantName":"Sprzedaj\u0105cy","voucher.introduction.econtext":"Dzi\u0119kujemy za zakup. Doko\u0144cz p\u0142atno\u015b\u0107 przy u\u017cyciu poni\u017cszych informacji.","voucher.telephoneNumber":"Numer telefonu","voucher.shopperReference":"Dane referencyjne kupuj\u0105cych","voucher.collectionInstitutionNumber":"Numer instytucji pobieraj\u0105cej op\u0142at\u0119","voucher.econtext.telephoneNumber.invalid":"Numer telefonu musi mie\u0107 10 lub 11 cyfr","boletobancario.btnLabel":"Wygeneruj p\u0142atno\u015b\u0107 Boleto","boleto.sendCopyToEmail":"Wy\u015blij kopi\u0119 na m\xf3j e-mail","button.copy":"Kopiuj","button.download":"Pobierz","creditCard.storedCard.description.ariaLabel":"Zapisana karta ko\u0144czy si\u0119 na % @","voucher.entity":"Pozycja",donateButton:"Przeka\u017c darowizn\u0119",notNowButton:"Nie teraz",thanksForYourSupport:"Dzi\u0119kujemy za wsparcie!",preauthorizeWith:"Autoryzuj wst\u0119pnie za pomoc\u0105:",confirmPreauthorization:"Potwierd\u017a autoryzacj\u0119 wst\u0119pn\u0105",confirmPurchase:"Potwierd\u017a zakup",applyGiftcard:"Wykorzystaj",giftcardBalance:"Saldo karty podarunkowej",deductedBalance:"Saldo potr\u0105cone","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Pierwsze 2 cyfry has\u0142a karty","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Nieprawid\u0142owe has\u0142o","creditCard.taxNumber.label":"Data urodzenia posiadacza karty (RRMMDD) lub firmowy numer rejestracyjny (10 cyfr)","creditCard.taxNumber.labelAlt":"Firmowy numer rejestracyjny (10 cyfr)","creditCard.taxNumber.invalid":"Nieprawid\u0142owa data urodzenia posiadacza karty lub nieprawid\u0142owy firmowy numer rejestracyjny","storedPaymentMethod.disable.button":"Usu\u0144","storedPaymentMethod.disable.confirmation":"Usu\u0144 zapisan\u0105 metod\u0119 p\u0142atno\u015bci","storedPaymentMethod.disable.confirmButton":"Tak, usu\u0144","storedPaymentMethod.disable.cancelButton":"Anuluj","ach.bankAccount":"Rachunek bankowy","ach.accountHolderNameField.title":"Imi\u0119 i nazwisko posiadacza rachunku","ach.accountHolderNameField.placeholder":"J. Kowalski","ach.accountHolderNameField.invalid":"Nieprawid\u0142owe imi\u0119 i nazwisko posiadacza rachunku","ach.accountNumberField.title":"Numer rachunku","ach.accountNumberField.invalid":"Nieprawid\u0142owy numer rachunku","ach.accountLocationField.title":"Kod bankowy ABA Routing Number","ach.accountLocationField.invalid":"Nieprawid\u0142owy kod bankowy ABA Routing Number","select.state":"Wybierz stan","select.stateOrProvince":"Wybierz stan/wojew\xf3dztwo","select.provinceOrTerritory":"Wybierz region/terytorium","select.country":"Wybierz kraj","select.noOptionsFound":"Nie znaleziono opcji","select.filter.placeholder":"Szukaj...","telephoneNumber.invalid":"Nieprawid\u0142owy numer telefonu",qrCodeOrApp:"lub","paypal.processingPayment":"Przetwarzanie p\u0142atno\u015bci...",generateQRCode:"Wygeneruj kod QR","await.waitForConfirmation":"Oczekiwanie na potwierdzenie","mbway.confirmPayment":"Potwierd\u017a p\u0142atno\u015b\u0107 w aplikacji MB WAY","shopperEmail.invalid":"Niepoprawny adres email","dateOfBirth.format":"DD/MM/RRRR","dateOfBirth.invalid":"Musisz mie\u0107 co najmniej 18 lat","blik.confirmPayment":"Otw\xf3rz aplikacj\u0119 bankow\u0105, aby potwierdzi\u0107 p\u0142atno\u015b\u0107.","blik.invalid":"Wpisz 6 cyfr","blik.code":"6-cyfrowy kod","blik.help":"Uzyskaj kod ze swojej aplikacji bankowej.","swish.pendingMessage":"Po zeskanowaniu transakcja mo\u017ce mie\u0107 status \u201eOczekuj\u0105ca\u201d do 10 minut. Pr\xf3ba ponownego dokonania p\u0142atno\u015bci w tym czasie mo\u017ce spowodowa\u0107 wielokrotne naliczenie op\u0142aty.","error.va.gen.01":"Niekompletne dane w polu","error.va.gen.02":"Dane w polu s\u0105 nieprawid\u0142owe","error.va.sf-cc-num.01":"Nieprawid\u0142owy numer karty","error.va.sf-cc-num.03":"Wprowadzono nieobs\u0142ugiwan\u0105 kart\u0119","error.va.sf-cc-dat.01":"Termin wa\u017cno\u015bci karty min\u0105\u0142","error.va.sf-cc-dat.02":"Data w zbyt odleg\u0142ej przysz\u0142o\u015bci","error.va.sf-cc-dat.03":"Twoja karta traci wa\u017cno\u015b\u0107 przed dat\u0105 p\u0142atno\u015bci","error.giftcard.no-balance":"Saldo karty podarunkowej jest puste","error.giftcard.card-error":"W naszych rejestrach nie ma karty podarunkowej o tym numerze","error.giftcard.currency-error":"Karty podarunkowe s\u0105 wa\u017cne tylko w walucie, w kt\xf3rej zosta\u0142y wydane","amazonpay.signout":"Wyloguj si\u0119 z Amazon","amazonpay.changePaymentDetails":"Zmie\u0144 szczeg\xf3\u0142y p\u0142atno\u015bci","partialPayment.warning":"Wybierz inn\u0105 metod\u0119 p\u0142atno\u015bci, aby zap\u0142aci\u0107 pozosta\u0142\u0105 kwot\u0119","partialPayment.remainingBalance":"Pozosta\u0142e saldo wynosi %(kwota}","bankTransfer.beneficiary":"Beneficjent","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Ref. sprze.","bankTransfer.introduction":"Kontynuuj tworzenie nowej p\u0142atno\u015bci przelewem bankowym. Mo\u017cesz u\u017cy\u0107 szczeg\xf3\u0142\xf3w na nast\u0119pnym ekranie, aby sfinalizowa\u0107 t\u0119 p\u0142atno\u015b\u0107.","bankTransfer.instructions":"Dzi\u0119kujemy za zakup. Doko\u0144cz p\u0142atno\u015b\u0107 przy u\u017cyciu poni\u017cszych informacji.","bacs.accountHolderName":"Imi\u0119 i nazwisko posiadacza rachunku","bacs.accountHolderName.invalid":"Nieprawid\u0142owe imi\u0119 i nazwisko posiadacza rachunku","bacs.accountNumber":"Numer rachunku","bacs.accountNumber.invalid":"Nieprawid\u0142owy numer rachunku","bacs.bankLocationId":"Numer rozliczeniowy SORT","bacs.bankLocationId.invalid":"Nieprawid\u0142owy numer rozliczeniowy SORT","bacs.consent.amount":"Wyra\u017cam zgod\u0119 na pobranie powy\u017cszej kwoty z mojego rachunku bankowego.","bacs.consent.account":"Potwierdzam, \u017ce konto jest zarejestrowane na moje nazwisko i jestem jedynym sygnatariuszem wymaganym do autoryzacji polecenia zap\u0142aty na tym koncie.",edit:"Edytuj","bacs.confirm":"Potwierd\u017a i zap\u0142a\u0107","bacs.result.introduction":"Pobierz dyspozycj\u0119 polecenia zap\u0142aty (DDI/upowa\u017cnienie)","download.pdf":"Pobierz PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Element Iframe dla numeru zabezpieczonej karty","creditCard.encryptedCardNumber.aria.label":"Pole numeru karty","creditCard.encryptedExpiryDate.aria.iframeTitle":"Element Iframe dla daty wa\u017cno\u015bci zabezpieczonej karty","creditCard.encryptedExpiryDate.aria.label":"Pole daty wa\u017cno\u015bci","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Element Iframe dla miesi\u0105ca wyga\u015bni\u0119cia zabezpieczonej karty","creditCard.encryptedExpiryMonth.aria.label":"Pole miesi\u0105ca wyga\u015bni\u0119cia","creditCard.encryptedExpiryYear.aria.iframeTitle":"Element Iframe dla roku wyga\u015bni\u0119cia zabezpieczonej karty","creditCard.encryptedExpiryYear.aria.label":"Pole roku wyga\u015bni\u0119cia","creditCard.encryptedSecurityCode.aria.iframeTitle":"Element Iframe dla kodu bezpiecze\u0144stwa zabezpieczonej karty","creditCard.encryptedSecurityCode.aria.label":"Pole kodu bezpiecze\u0144stwa","giftcard.encryptedCardNumber.aria.iframeTitle":"Element Iframe dla numeru zabezpieczonej karty podarunkowej","giftcard.encryptedCardNumber.aria.label":"Pole numeru karty podarunkowej","giftcard.encryptedSecurityCode.aria.iframeTitle":"Element Iframe dla kodu bezpiecze\u0144stwa zabezpieczonej karty podarunkowej","giftcard.encryptedSecurityCode.aria.label":"Pole kodu bezpiecze\u0144stwa karty podarunkowej",giftcardTransactionLimit:"Maks. dozwolona kwota (%{amount}) na transakcj\u0119 t\u0105 kart\u0105 upominkow\u0105","ach.encryptedBankAccountNumber.aria.iframeTitle":"Element Iframe dla zabezpieczonego numeru rachunku bankowego","ach.encryptedBankAccountNumber.aria.label":"Pole rachunku bankowego","ach.encryptedBankLocationId.aria.iframeTitle":"Element Iframe dla zabezpieczonego kodu bankowego (Bank Routing Number)","ach.encryptedBankLocationId.aria.label":"Pole kodu bankowego (Bank Routing Number)"}}),fg=Object.freeze({__proto__:null,default:{payButton:"Pagar","payButton.redirecting":"Redirecionando...",storeDetails:"Salvar para meu pr\xf3ximo pagamento","creditCard.holderName":"Nome no cart\xe3o","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Nome do titular do cart\xe3o inv\xe1lido","creditCard.numberField.title":"N\xfamero do cart\xe3o","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Data de validade","creditCard.expiryDateField.placeholder":"MM/AA","creditCard.expiryDateField.month":"M\xeas","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"AA","creditCard.expiryDateField.year":"Ano","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Lembrar para a pr\xf3xima vez","creditCard.cvcField.placeholder.4digits":"4 d\xedgitos","creditCard.cvcField.placeholder.3digits":"3 d\xedgitos","creditCard.taxNumber.placeholder":"AAAMMDD / 0123456789",installments:"Op\xe7\xf5es de Parcelamento",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} meses","installments.oneTime":"Pagamento \xe0 vista","installments.installments":"Pagamento parcelado","installments.revolving":"Pagamento rotativo","sepaDirectDebit.ibanField.invalid":"N\xfamero de conta inv\xe1lido","sepaDirectDebit.nameField.placeholder":"J. Silva","sepa.ownerName":"Nome do titular da conta banc\xe1ria","sepa.ibanNumber":"N\xfamero de conta (NIB)","error.title":"Erro","error.subtitle.redirect":"Falha no redirecionamento","error.subtitle.payment":"Falha no pagamento","error.subtitle.refused":"Pagamento recusado","error.message.unknown":"Ocorreu um erro desconhecido","idealIssuer.selectField.title":"Banco","idealIssuer.selectField.placeholder":"Selecione seu banco","creditCard.success":"Pagamento bem-sucedido",loading:"Carregando...",continue:"Continuar",continueTo:"Continuar para","wechatpay.timetopay":"Voc\xea tem %@ para pagar","wechatpay.scanqrcode":"Escanear c\xf3digo QR",personalDetails:"Informa\xe7\xf5es pessoais",companyDetails:"Dados da empresa","companyDetails.name":"Nome da empresa","companyDetails.registrationNumber":"N\xfamero de registro",socialSecurityNumber:"CPF",firstName:"Nome",infix:"Prefixo",lastName:"Sobrenome",mobileNumber:"Celular","mobileNumber.invalid":"N\xfamero de celular inv\xe1lido",city:"Cidade",postalCode:"CEP",countryCode:"C\xf3digo do pa\xeds",telephoneNumber:"N\xfamero de telefone",dateOfBirth:"Data de nascimento",shopperEmail:"Endere\xe7o de e-mail",gender:"G\xeanero",male:"Masculino",female:"Feminino",billingAddress:"Endere\xe7o de cobran\xe7a",street:"Rua",stateOrProvince:"Estado ou prov\xedncia",country:"Pa\xeds",houseNumberOrName:"N\xfamero da casa",separateDeliveryAddress:"Especificar um endere\xe7o de entrega separado",deliveryAddress:"Endere\xe7o de entrega",zipCode:"C\xf3digo postal",apartmentSuite:"Apartamento/Conjunto",provinceOrTerritory:"Prov\xedncia ou territ\xf3rio",cityTown:"Cidade",address:"Endere\xe7o",state:"Estado","field.title.optional":"(opcional)","creditCard.cvcField.title.optional":"CVC / CVV (opcional)","issuerList.wallet.placeholder":"Selecione uma carteira",privacyPolicy:"Pol\xedtica de Privacidade","afterPay.agreement":"Eu concordo com as %@ do AfterPay",paymentConditions:"condi\xe7\xf5es de pagamento",openApp:"Abrir o aplicativo","voucher.readInstructions":"Leia as instru\xe7\xf5es","voucher.introduction":"Obrigado pela sua compra, use o cupom a seguir para concluir o seu pagamento.","voucher.expirationDate":"Data de validade","voucher.alternativeReference":"Refer\xeancia alternativa","dragonpay.voucher.non.bank.selectField.placeholder":"Selecione o seu fornecedor","dragonpay.voucher.bank.selectField.placeholder":"Selecione seu banco","voucher.paymentReferenceLabel":"Refer\xeancia de pagamento","voucher.surcharge":"Inclui %@ de sobretaxa","voucher.introduction.doku":"Obrigado pela sua compra, use a informa\xe7\xe3o a seguir para concluir o seu pagamento.","voucher.shopperName":"Nome do consumidor","voucher.merchantName":"Comerciante online","voucher.introduction.econtext":"Obrigado pela sua compra, use a informa\xe7\xe3o a seguir para concluir o seu pagamento.","voucher.telephoneNumber":"N\xfamero de telefone","voucher.shopperReference":"Refer\xeancia do consumidor","voucher.collectionInstitutionNumber":"N\xfamero da institui\xe7\xe3o de cobran\xe7a","voucher.econtext.telephoneNumber.invalid":"O n\xfamero de telefone deve ter 10 ou 11 d\xedgitos","boletobancario.btnLabel":"Gerar Boleto","boleto.sendCopyToEmail":"Enviar uma c\xf3pia por e-mail","button.copy":"Copiar","button.download":"Baixar","creditCard.storedCard.description.ariaLabel":"O cart\xe3o armazenado termina em %@","voucher.entity":"Entidade",donateButton:"Doar",notNowButton:"Agora n\xe3o",thanksForYourSupport:"Obrigado pelo apoio!",preauthorizeWith:"Pr\xe9-autorizar com",confirmPreauthorization:"Confirmar pr\xe9-autoriza\xe7\xe3o",confirmPurchase:"Confirmar compra",applyGiftcard:"Resgatar",giftcardBalance:"Saldo do vale-presente",deductedBalance:"Saldo debitado","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"Primeiros dois d\xedgitos da senha do cart\xe3o","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Senha inv\xe1lida","creditCard.taxNumber.label":"Data de nascimento do titular do cart\xe3o (AAMMDD) ou n\xfamero de registro corporativo (10 d\xedgitos)","creditCard.taxNumber.labelAlt":"N\xfamero de registro corporativo (10 d\xedgitos)","creditCard.taxNumber.invalid":"Data de nascimento do titular do cart\xe3o ou n\xfamero de registro corporativo inv\xe1lidos","storedPaymentMethod.disable.button":"Remover","storedPaymentMethod.disable.confirmation":"Remover m\xe9todo de pagamento armazenado","storedPaymentMethod.disable.confirmButton":"Sim, remover","storedPaymentMethod.disable.cancelButton":"Cancelar","ach.bankAccount":"Conta banc\xe1ria","ach.accountHolderNameField.title":"Nome do titular da conta","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Nome do titular da conta inv\xe1lido","ach.accountNumberField.title":"N\xfamero da conta","ach.accountNumberField.invalid":"N\xfamero de conta inv\xe1lido","ach.accountLocationField.title":"N\xfamero de roteamento ABA","ach.accountLocationField.invalid":"N\xfamero de roteamento ABA inv\xe1lido","select.state":"Selecionar estado","select.stateOrProvince":"Selecione estado ou prov\xedncia","select.provinceOrTerritory":"Selecionar prov\xedncia ou territ\xf3rio","select.country":"Selecione o pa\xeds","select.noOptionsFound":"Nenhuma op\xe7\xe3o encontrada","select.filter.placeholder":"Pesquisar...","telephoneNumber.invalid":"N\xfamero de telefone inv\xe1lido",qrCodeOrApp:"ou","paypal.processingPayment":"Processando pagamento...",generateQRCode:"Gerar c\xf3digo QR","await.waitForConfirmation":"Aguardando confirma\xe7\xe3o","mbway.confirmPayment":"Confirme seu pagamento no aplicativo MB WAY","shopperEmail.invalid":"Endere\xe7o de e-mail inv\xe1lido","dateOfBirth.format":"DD/MM/AAAA","dateOfBirth.invalid":"Voc\xea deve ter pelo menos 18 anos","blik.confirmPayment":"Abra o aplicativo do seu banco para confirmar o pagamento.","blik.invalid":"Digite 6 n\xfameros","blik.code":"C\xf3digo de 6 d\xedgitos","blik.help":"Obtenha o c\xf3digo no aplicativo do seu banco.","swish.pendingMessage":"Depois de escanear o QR, o status pode ficar pendente por at\xe9 10 minutos. N\xe3o tente refazer o pagamento antes desse per\xedodo para evitar cobran\xe7a duplicada.","error.va.gen.01":"Campo incompleto","error.va.gen.02":"Campo inv\xe1lido","error.va.sf-cc-num.01":"N\xfamero de cart\xe3o inv\xe1lido","error.va.sf-cc-num.03":"O cart\xe3o inserido n\xe3o \xe9 aceito","error.va.sf-cc-dat.01":"Cart\xe3o muito antigo","error.va.sf-cc-dat.02":"Data muito distante","error.va.sf-cc-dat.03":"Seu cart\xe3o expira antes da data do pagamento","error.giftcard.no-balance":"Este vale-presente tem saldo zero","error.giftcard.card-error":"N\xe3o existe um vale-presente com esse n\xfamero em nossos registros","error.giftcard.currency-error":"Os vales-presente s\xe3o v\xe1lidos somente na moeda em que foram emitidos","amazonpay.signout":"Sair do Amazon","amazonpay.changePaymentDetails":"Alterar dados de pagamento","partialPayment.warning":"Selecione outro m\xe9todo de pagamento para pagar o restante","partialPayment.remainingBalance":"O saldo restante ser\xe1 %{amount}","bankTransfer.beneficiary":"Benefici\xe1rio","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Refer\xeancia","bankTransfer.introduction":"Continue criando o novo pagamento por transfer\xeancia banc\xe1ria. Use as informa\xe7\xf5es na tela a seguir para conclu\xed-lo.","bankTransfer.instructions":"Obrigado pela sua compra, use a informa\xe7\xe3o a seguir para concluir o seu pagamento.","bacs.accountHolderName":"Nome do titular da conta banc\xe1ria","bacs.accountHolderName.invalid":"Nome do titular da conta banc\xe1ria inv\xe1lido","bacs.accountNumber":"N\xfamero da conta banc\xe1ria","bacs.accountNumber.invalid":"N\xfamero da conta banc\xe1ria inv\xe1lido","bacs.bankLocationId":"C\xf3digo de classifica\xe7\xe3o","bacs.bankLocationId.invalid":"C\xf3digo de classifica\xe7\xe3o inv\xe1lido","bacs.consent.amount":"Concordo que o valor acima seja deduzido da minha conta banc\xe1ria.","bacs.consent.account":"Confirmo que a conta est\xe1 em meu nome e que sou o \xfanico signat\xe1rio que deve autorizar o d\xe9bito direto nessa conta.",edit:"Editar","bacs.confirm":"Confirmar e pagar","bacs.result.introduction":"Baixar instru\xe7\xe3o de d\xe9bito direto (DDI)","download.pdf":"Baixar PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe para n\xfamero de cart\xe3o seguro","creditCard.encryptedCardNumber.aria.label":"Campo de n\xfamero de cart\xe3o","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe para data de validade do cart\xe3o seguro","creditCard.encryptedExpiryDate.aria.label":"Campo de data de validade","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe para m\xeas de validade do cart\xe3o seguro","creditCard.encryptedExpiryMonth.aria.label":"Campo de m\xeas de validade","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe para ano de validade do cart\xe3o seguro","creditCard.encryptedExpiryYear.aria.label":"Campo de ano de validade","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe para c\xf3digo de seguran\xe7a do cart\xe3o seguro","creditCard.encryptedSecurityCode.aria.label":"Campo de c\xf3digo de seguran\xe7a","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe para n\xfamero de cart\xe3o-presente seguro","giftcard.encryptedCardNumber.aria.label":"Campo de n\xfamero do cart\xe3o-presente","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe para c\xf3digo de seguran\xe7a do cart\xe3o-presente seguro","giftcard.encryptedSecurityCode.aria.label":"Campo de c\xf3digo de seguran\xe7a do cart\xe3o-presente",giftcardTransactionLimit:"M\xe1ximo de %{amount} permitido por transa\xe7\xe3o neste cart\xe3o-presente","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe para n\xfamero de conta banc\xe1ria segura","ach.encryptedBankAccountNumber.aria.label":"Campo de conta banc\xe1ria","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe para n\xfamero de roteamento banc\xe1rio seguro","ach.encryptedBankLocationId.aria.label":"Campo de n\xfamero de roteamento banc\xe1rio","pix.instructions":"Abra o app com sua chave PIX cadastrada, escolha Pagar com Pix e escaneie o QR Code ou copie e cole o c\xf3digo"}}),yg=Object.freeze({__proto__:null,default:{payButton:"Pl\u0103ti\u021bi","payButton.redirecting":"Se redirec\u021bioneaz\u0103...",storeDetails:"Salveaz\u0103 pentru urm\u0103toarea mea plat\u0103","creditCard.holderName":"Numele de pe card","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Numele posesorului de card este incorect","creditCard.numberField.title":"Num\u0103r card","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Data expir\u0103rii","creditCard.expiryDateField.placeholder":"LL/AA","creditCard.expiryDateField.month":"Lun\u0103","creditCard.expiryDateField.month.placeholder":"LL","creditCard.expiryDateField.year.placeholder":"AA","creditCard.expiryDateField.year":"An","creditCard.cvcField.title":"CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Re\u021bine pentru data viitoare","creditCard.cvcField.placeholder.4digits":"4 cifre","creditCard.cvcField.placeholder.3digits":"3 cifre","creditCard.taxNumber.placeholder":"AALLZZ / 0123456789",installments:"Num\u0103r de rate",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} luni","installments.oneTime":"Plat\u0103 unic\u0103","installments.installments":"Plat\u0103 \xeen rate","installments.revolving":"Plat\u0103 recurent\u0103","sepaDirectDebit.ibanField.invalid":"Num\u0103rul de cont este incorect","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Nume posesor","sepa.ibanNumber":"Num\u0103r cont (IBAN)","error.title":"Eroare","error.subtitle.redirect":"Redirec\u021bionare e\u0219uat\u0103","error.subtitle.payment":"Plat\u0103 e\u0219uat\u0103","error.subtitle.refused":"Plat\u0103 refuzat\u0103","error.message.unknown":"S-a produs o eroare necunoscut\u0103","idealIssuer.selectField.title":"Banc\u0103","idealIssuer.selectField.placeholder":"Selecta\u021bi-v\u0103 banca","creditCard.success":"Plat\u0103 reu\u0219it\u0103",loading:"Se \xeencarc\u0103...",continue:"Continuare",continueTo:"Continua\u021bi c\u0103tre","wechatpay.timetopay":"Trebuie s\u0103 achita\u021bi %@","wechatpay.scanqrcode":"Scana\u021bi codul QR",personalDetails:"Informa\u021bii personale",companyDetails:"Informa\u021bii societate","companyDetails.name":"Denumirea societ\u0103\u021bii","companyDetails.registrationNumber":"Num\u0103r de \xeenregistrare",socialSecurityNumber:"Cod numeric personal",firstName:"Prenume",infix:"Titulatur\u0103",lastName:"Nume de familie",mobileNumber:"Num\u0103r de mobil","mobileNumber.invalid":"Num\u0103r de telefon mobil incorect",city:"Ora\u0219",postalCode:"Cod po\u0219tal",countryCode:"Codul \u021b\u0103rii",telephoneNumber:"Num\u0103r de telefon",dateOfBirth:"Data na\u0219terii",shopperEmail:"Adres\u0103 de e-mail",gender:"Gen",male:"B\u0103rbat",female:"Femeie",billingAddress:"Adresa de facturare",street:"Strada",stateOrProvince:"Jude\u021b sau provincie",country:"\u021aar\u0103",houseNumberOrName:"Num\u0103r",separateDeliveryAddress:"Specifica\u021bi o adres\u0103 de livrare separat\u0103",deliveryAddress:"Adres\u0103 de livrare",zipCode:"Cod po\u0219tal",apartmentSuite:"Apartament",provinceOrTerritory:"Provincie sau teritoriu",cityTown:"Ora\u0219/localitate",address:"Adres\u0103",state:"Stat","field.title.optional":"(op\u021bional)","creditCard.cvcField.title.optional":"CVC/CVV (op\u021bional)","issuerList.wallet.placeholder":"Selecta\u021bi-v\u0103 portofelul",privacyPolicy:"Politica de confiden\u021bialitate","afterPay.agreement":"Sunt de acord cu %@ apar\u021bin\xe2nd AfterPay",paymentConditions:"condi\u021bii de plat\u0103",openApp:"Deschide\u021bi aplica\u021bia","voucher.readInstructions":"Citi\u021bi instruc\u021biunile","voucher.introduction":"V\u0103 mul\u021bumim pentru cump\u0103r\u0103turi, v\u0103 rug\u0103m s\u0103 utiliza\u021bi urm\u0103torul cupon pentru a v\u0103 finaliza plata.","voucher.expirationDate":"Data de expirare","voucher.alternativeReference":"Referin\u021b\u0103 alternativ\u0103","dragonpay.voucher.non.bank.selectField.placeholder":"Selecta\u021bi furnizorul dvs.","dragonpay.voucher.bank.selectField.placeholder":"Selecta\u021bi banca dvs.","voucher.paymentReferenceLabel":"Referin\u021ba pl\u0103\u021bii","voucher.surcharge":"Include suprataxa de %@","voucher.introduction.doku":"V\u0103 mul\u021bumim pentru cump\u0103r\u0103turi, v\u0103 rug\u0103m s\u0103 utiliza\u021bi urm\u0103toarele informa\u021bii pentru a v\u0103 finaliza plata.","voucher.shopperName":"Nume cump\u0103r\u0103tor","voucher.merchantName":"Comerciant","voucher.introduction.econtext":"V\u0103 mul\u021bumim pentru cump\u0103r\u0103turi, v\u0103 rug\u0103m s\u0103 utiliza\u021bi urm\u0103toarele informa\u021bii pentru a v\u0103 finaliza plata.","voucher.telephoneNumber":"Num\u0103r de telefon","voucher.shopperReference":"Referin\u021b\u0103 cump\u0103r\u0103tor","voucher.collectionInstitutionNumber":"Num\u0103r institu\u021bie de colectare","voucher.econtext.telephoneNumber.invalid":"Num\u0103rul de telefon trebuie s\u0103 aib\u0103 10 sau 11 cifre","boletobancario.btnLabel":"Generare Boleto","boleto.sendCopyToEmail":"Trimite o copie la adresa mea de e-mail","button.copy":"Copiere","button.download":"Desc\u0103rcare","creditCard.storedCard.description.ariaLabel":"Cardul memorat se termin\u0103 \xeen %@","voucher.entity":"Entitate",donateButton:"Dona\u021bi",notNowButton:"Nu acum",thanksForYourSupport:"V\u0103 mul\u021bumim pentru sprijin!",preauthorizeWith:"Preautorizare cu",confirmPreauthorization:"Confirma\u021bi preautorizarea",confirmPurchase:"Confirma\u021bi achizi\u021bia",applyGiftcard:"Valorificare",giftcardBalance:"Soldul de pe cardul cadou",deductedBalance:"Sold sc\u0103zut","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Primele 2 cifre ale parolei aferente cardului","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Parol\u0103 incorect\u0103","creditCard.taxNumber.label":"Data de na\u0219tere a posesorului de card (AALLZZ) sau num\u0103rul de \xeenregistrare al societ\u0103\u021bii (10 cifre).","creditCard.taxNumber.labelAlt":"Num\u0103rul de \xeenregistrare al societ\u0103\u021bii (10 cifre)","creditCard.taxNumber.invalid":"Data de na\u0219tere a posesorului de card sau num\u0103rul de \xeenregistrare al societ\u0103\u021bii este incorect","storedPaymentMethod.disable.button":"\u0218tergere","storedPaymentMethod.disable.confirmation":"\u0218terge\u021bi metoda de plat\u0103 memorat\u0103","storedPaymentMethod.disable.confirmButton":"Da, \u0219terge","storedPaymentMethod.disable.cancelButton":"Anulare","ach.bankAccount":"Cont bancar","ach.accountHolderNameField.title":"Numele titularului de cont","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Numele titularului de cont este incorect","ach.accountNumberField.title":"Num\u0103r de cont","ach.accountNumberField.invalid":"Num\u0103rul de cont este incorect","ach.accountLocationField.title":"Num\u0103r de direc\u021bionare ABA","ach.accountLocationField.invalid":"Num\u0103r de direc\u021bionare ABA incorect","select.state":"Selecta\u021bi statul","select.stateOrProvince":"Selecta\u021bi jude\u021bul sau provincia","select.provinceOrTerritory":"Selecta\u021bi provincia sau teritoriul","select.country":"Selecta\u021bi \u021bara","select.noOptionsFound":"Nu s-a g\u0103sit nicio op\u021biune","select.filter.placeholder":"C\u0103utare...","telephoneNumber.invalid":"Num\u0103r de telefon incorect",qrCodeOrApp:"sau","paypal.processingPayment":"Se prelucreaz\u0103 plata...",generateQRCode:"Genera\u021bi codul QR","await.waitForConfirmation":"Se a\u0219teapt\u0103 confirmarea","mbway.confirmPayment":"Confirma\u021bi plata \xeen aplica\u021bia MB WAY","shopperEmail.invalid":"Adres\u0103 de e-mail incorect\u0103","dateOfBirth.format":"ZZ/LL/AAAA","dateOfBirth.invalid":"Trebuie s\u0103 ave\u021bi minimum 18 ani","blik.confirmPayment":"Deschide\u021bi aplica\u021bia dvs. de banking pentru a confirma plata.","blik.invalid":"Introduce\u021bi 6 cifre","blik.code":"Cod din 6 cifre","blik.help":"Ob\u021bine\u021bi codul din aplica\u021bia dvs. de banking.","swish.pendingMessage":"Dup\u0103 ce scana\u021bi, starea poate fi \u201e\xeen a\u0219teptare\u201d timp de maximum 10 minute. \xcencerc\u0103rile de a pl\u0103ti din nou \xeen acest r\u0103stimp pot genera prelev\u0103ri multiple de fonduri.","error.va.gen.01":"C\xe2mp incomplet","error.va.gen.02":"C\xe2mp incorect","error.va.sf-cc-num.01":"Num\u0103r de card incorect","error.va.sf-cc-num.03":"A fost introdus un card neacceptat","error.va.sf-cc-dat.01":"Cardul este prea vechi","error.va.sf-cc-dat.02":"Data este prea departe \xeen viitor","error.va.sf-cc-dat.03":"Cardul dvs. expir\u0103 \xeenainte de data de check-out","error.giftcard.no-balance":"Acest card cadou are soldul zero","error.giftcard.card-error":"\xcen eviden\u021bele noastre nu figureaz\u0103 niciun card cadou cu acest num\u0103r","error.giftcard.currency-error":"Cardurile cadou sunt valabile numai \xeen moneda \xeen care au fost emise","amazonpay.signout":"Deconecta\u021bi-v\u0103 de pe platforma Amazon","amazonpay.changePaymentDetails":"Modifica\u021bi detaliile de plat\u0103","partialPayment.warning":"Pentru a achita suma r\u0103mas\u0103, selecta\u021bi o alt\u0103 metod\u0103 de plat\u0103","partialPayment.remainingBalance":"Soldul r\u0103mas va fi de %{amount}","bankTransfer.beneficiary":"Beneficiar","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referin\u0163\u0103","bankTransfer.introduction":"Continua\u021bi s\u0103 crea\u021bi o nou\u0103 plat\u0103 prin transfer bancar. Pute\u021bi utiliza detaliile din ecranul urm\u0103tor pentru a finaliza aceast\u0103 plat\u0103.","bankTransfer.instructions":"V\u0103 mul\u021bumim pentru cump\u0103r\u0103turi, v\u0103 rug\u0103m s\u0103 utiliza\u021bi urm\u0103toarele informa\u021bii pentru a v\u0103 finaliza plata.","bacs.accountHolderName":"Numele titularului contului bancar","bacs.accountHolderName.invalid":"Numele titularului contului bancar este incorect","bacs.accountNumber":"Num\u0103rul contului bancar","bacs.accountNumber.invalid":"Num\u0103rul contului bancar este incorect","bacs.bankLocationId":"Cod de identificare bancar\u0103","bacs.bankLocationId.invalid":"Cod de identificare bancar\u0103 incorect","bacs.consent.amount":"Sunt de acord ca suma men\u021bionat\u0103 mai sus s\u0103 fie dedus\u0103 din contul meu bancar.","bacs.consent.account":"Confirm c\u0103 sunt titularul acestui cont \u0219i c\u0103 sunt singurul semnatar necesar pentru autorizarea debitului direct pentru acest cont.",edit:"Editare","bacs.confirm":"Confirma\u021bi \u0219i pl\u0103ti\u021bi","bacs.result.introduction":"Desc\u0103rca\u021bi instruc\u021biunile de debitare direct\u0103 (DDI/mandat)","download.pdf":"Desc\u0103rca\u021bi PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe pentru num\u0103rul cardului securizat","creditCard.encryptedCardNumber.aria.label":"C\xe2mp aferent num\u0103rului cardului","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe pentru data de expirare a cardului securizat","creditCard.encryptedExpiryDate.aria.label":"C\xe2mp aferent datei de expirare","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe pentru luna de expirare a cardului securizat","creditCard.encryptedExpiryMonth.aria.label":"C\xe2mp aferent lunii de expirare","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe pentru anul de expirare a cardului securizat","creditCard.encryptedExpiryYear.aria.label":"C\xe2mp aferent anului de expirare","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe pentru codul de securitate al cardului securizat","creditCard.encryptedSecurityCode.aria.label":"C\xe2mp aferent codului de securitate","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe pentru num\u0103rul cardului cadou securizat","giftcard.encryptedCardNumber.aria.label":"C\xe2mp aferent num\u0103rului cardului cadou","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe pentru codul de securitate al cardului cadou securizat","giftcard.encryptedSecurityCode.aria.label":"C\xe2mp aferent codului de securitate al cardului cadou",giftcardTransactionLimit:"Pentru acest card cadou, suma maxim\u0103 permis\u0103 per tranzac\u021bie este de %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe pentru num\u0103rul contului bancar securizat","ach.encryptedBankAccountNumber.aria.label":"C\xe2mp aferent contului bancar","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe pentru num\u0103rul securizat de direc\u021bionare bancar\u0103 (routing number)","ach.encryptedBankLocationId.aria.label":"C\xe2mp aferent codului de direc\u021bionare bancar\u0103 (routing number)"}}),bg=Object.freeze({__proto__:null,default:{payButton:"\u0417\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c","payButton.redirecting":"\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435...",storeDetails:"\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0430","creditCard.holderName":"\u0418\u043c\u044f \u043d\u0430 \u043a\u0430\u0440\u0442\u0435","creditCard.holderName.placeholder":"\u0418. \u041f\u0435\u0442\u0440\u043e\u0432","creditCard.holderName.invalid":"\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u0430\u0440\u0442\u044b","creditCard.numberField.title":"\u041d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"\u0421\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","creditCard.expiryDateField.placeholder":"\u041c\u041c/\u0413\u0413","creditCard.expiryDateField.month":"\u041c\u0435\u0441\u044f\u0446","creditCard.expiryDateField.month.placeholder":"\u041c\u041c","creditCard.expiryDateField.year.placeholder":"\u0413\u0413","creditCard.expiryDateField.year":"\u0413\u043e\u0434","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437","creditCard.cvcField.placeholder.4digits":"4 \u0446\u0438\u0444\u0440\u044b","creditCard.cvcField.placeholder.3digits":"3 \u0446\u0438\u0444\u0440\u044b","creditCard.taxNumber.placeholder":"\u0413\u0413\u041c\u041c\u0414\u0414 / 0123456789",installments:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043b\u0430\u0442\u0435\u0436\u0435\u0439",installmentOption:"%{times}\xd7 %{partialValue}",installmentOptionMonths:"%{times} \u043c\u0435\u0441.","installments.oneTime":"\u041e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0439 \u043f\u043b\u0430\u0442\u0435\u0436","installments.installments":"\u0420\u0430\u0441\u0441\u0440\u043e\u0447\u043a\u0430","installments.revolving":"\u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0430\u044f\u0441\u044f \u043e\u043f\u043b\u0430\u0442\u0430","sepaDirectDebit.ibanField.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0447\u0435\u0442\u0430","sepaDirectDebit.nameField.placeholder":"\u0418. \u041f\u0435\u0442\u0440\u043e\u0432","sepa.ownerName":"\u0418\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430","sepa.ibanNumber":"\u041d\u043e\u043c\u0435\u0440 \u0441\u0447\u0435\u0442\u0430 (IBAN)","error.title":"\u041e\u0448\u0438\u0431\u043a\u0430","error.subtitle.redirect":"\u0421\u0431\u043e\u0439 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f","error.subtitle.payment":"\u0421\u0431\u043e\u0439 \u043e\u043f\u043b\u0430\u0442\u044b","error.subtitle.refused":"\u041e\u043f\u043b\u0430\u0442\u0430 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0430","error.message.unknown":"\u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430","idealIssuer.selectField.title":"\u0411\u0430\u043d\u043a","idealIssuer.selectField.placeholder":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0431\u0430\u043d\u043a","creditCard.success":"\u041f\u043b\u0430\u0442\u0435\u0436 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d",loading:"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u2026",continue:"\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c",continueTo:"\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a","wechatpay.timetopay":"\u0423 \u0432\u0430\u0441 %@ \u043d\u0430 \u043e\u043f\u043b\u0430\u0442\u0443","wechatpay.scanqrcode":"\u0421\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c QR-\u043a\u043e\u0434",personalDetails:"\u041b\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435",companyDetails:"\u0414\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438","companyDetails.name":"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438","companyDetails.registrationNumber":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440",socialSecurityNumber:"\u041d\u043e\u043c\u0435\u0440 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0442\u0440\u0430\u0445\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043b\u0438 \u0418\u041d\u041d",firstName:"\u0418\u043c\u044f",infix:"\u041f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430",lastName:"\u0424\u0430\u043c\u0438\u043b\u0438\u044f",mobileNumber:"\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043b\u0435\u0444\u043e\u043d","mobileNumber.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u043e\u043c\u0435\u0440 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e",city:"\u0413\u043e\u0440\u043e\u0434",postalCode:"\u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",countryCode:"\u041a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b",telephoneNumber:"\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430",dateOfBirth:"\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f",shopperEmail:"\u0410\u0434\u0440\u0435\u0441 \u044d\u043b. \u043f\u043e\u0447\u0442\u044b",gender:"\u041f\u043e\u043b",male:"\u041c\u0443\u0436\u0447\u0438\u043d\u0430",female:"\u0416\u0435\u043d\u0449\u0438\u043d\u0430",billingAddress:"\u041f\u043b\u0430\u0442\u0435\u0436\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441",street:"\u0423\u043b\u0438\u0446\u0430",stateOrProvince:"\u0420\u0435\u0433\u0438\u043e\u043d",country:"\u0421\u0442\u0440\u0430\u043d\u0430",houseNumberOrName:"\u041d\u043e\u043c\u0435\u0440 \u0434\u043e\u043c\u0430",separateDeliveryAddress:"\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438",deliveryAddress:"\u0410\u0434\u0440\u0435\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438",zipCode:"\u041f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441",apartmentSuite:"\u041a\u0432\u0430\u0440\u0442\u0438\u0440\u0430",provinceOrTerritory:"\u041f\u0440\u043e\u0432\u0438\u043d\u0446\u0438\u044f \u0438\u043b\u0438 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044f",cityTown:"\u0413\u043e\u0440\u043e\u0434",address:"\u0410\u0434\u0440\u0435\u0441",state:"\u0428\u0442\u0430\u0442","field.title.optional":"(\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)","creditCard.cvcField.title.optional":"CVC / CVV (\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e)","issuerList.wallet.placeholder":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u043e\u0448\u0435\u043b\u0435\u043a",privacyPolicy:"\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438","afterPay.agreement":"\u042f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e %@ AfterPay",paymentConditions:"\u0443\u0441\u043b\u043e\u0432\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b",openApp:"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435","voucher.readInstructions":"\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438","voucher.introduction":"\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443. \u0414\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u0443\u043f\u043e\u043d.","voucher.expirationDate":"\u0421\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","voucher.alternativeReference":"\u0414\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u0434","dragonpay.voucher.non.bank.selectField.placeholder":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430","dragonpay.voucher.bank.selectField.placeholder":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0431\u0430\u043d\u043a","voucher.paymentReferenceLabel":"\u041a\u043e\u0434 \u043e\u043f\u043b\u0430\u0442\u044b","voucher.surcharge":"\u0412\u043a\u043b. \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044e %@","voucher.introduction.doku":"\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443. \u0414\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","voucher.shopperName":"\u0418\u043c\u044f \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f","voucher.merchantName":"\u041f\u0440\u043e\u0434\u0430\u0432\u0435\u0446","voucher.introduction.econtext":"\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443. \u0414\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","voucher.telephoneNumber":"\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430","voucher.shopperReference":"\u0421\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f","voucher.collectionInstitutionNumber":"\u041d\u043e\u043c\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432","voucher.econtext.telephoneNumber.invalid":"\u041d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043b\u0438\u043d\u043e\u0439 10 \u0438\u043b\u0438 11 \u0446\u0438\u0444\u0440","boletobancario.btnLabel":"\u0421\u043e\u0437\u0434\u0430\u0442\u044c Boleto","boleto.sendCopyToEmail":"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043c\u043d\u0435 \u043a\u043e\u043f\u0438\u044e \u043d\u0430 \u044d\u043b. \u043f\u043e\u0447\u0442\u0443","button.copy":"\u041a\u043e\u043f\u0438\u044f","button.download":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c","creditCard.storedCard.description.ariaLabel":"\u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 %@","voucher.entity":"\u041e\u0431\u044a\u0435\u043a\u0442",donateButton:"\u041f\u043e\u0436\u0435\u0440\u0442\u0432\u043e\u0432\u0430\u0442\u044c",notNowButton:"\u041f\u043e\u0437\u0436\u0435",thanksForYourSupport:"\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0437\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443!",preauthorizeWith:"\u041f\u0440\u0435\u0434\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432",confirmPreauthorization:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e",confirmPurchase:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u043e\u043a\u0443\u043f\u043a\u0443",applyGiftcard:"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c",giftcardBalance:"\u0411\u0430\u043b\u0430\u043d\u0441 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b",deductedBalance:"\u0411\u0430\u043b\u0430\u043d\u0441 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0439","creditCard.pin.title":"PIN-\u043a\u043e\u0434","creditCard.encryptedPassword.label":"\u041f\u0435\u0440\u0432\u044b\u0435 2 \u0446\u0438\u0444\u0440\u044b \u043f\u0430\u0440\u043e\u043b\u044f \u043a\u0430\u0440\u0442\u044b","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c","creditCard.taxNumber.label":"\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u0430\u0440\u0442\u044b (\u0413\u0413\u041c\u041c\u0414\u0414) \u0438\u043b\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f (10 \u0446\u0438\u0444\u0440)","creditCard.taxNumber.labelAlt":"\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f (10 \u0446\u0438\u0444\u0440)","creditCard.taxNumber.invalid":"\u041d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0434\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u0430\u0440\u0442\u044b \u0438\u043b\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u044f\u0442\u0438\u044f","storedPaymentMethod.disable.button":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c","storedPaymentMethod.disable.confirmation":"\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b","storedPaymentMethod.disable.confirmButton":"\u0414\u0430, \u0443\u0434\u0430\u043b\u0438\u0442\u044c","storedPaymentMethod.disable.cancelButton":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c","ach.bankAccount":"\u0411\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0438\u0439 \u0441\u0447\u0435\u0442","ach.accountHolderNameField.title":"\u0418\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u0430\u0440\u0442\u044b","ach.accountHolderNameField.placeholder":"\u0418. \u041f\u0435\u0442\u0440\u043e\u0432","ach.accountHolderNameField.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u043a\u0430\u0440\u0442\u044b","ach.accountNumberField.title":"\u041d\u043e\u043c\u0435\u0440 \u0441\u0447\u0435\u0442\u0430","ach.accountNumberField.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0441\u0447\u0435\u0442\u0430","ach.accountLocationField.title":"\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 ABA","ach.accountLocationField.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 ABA","select.state":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0442\u0430\u0442","select.stateOrProvince":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0448\u0442\u0430\u0442 \u0438\u043b\u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c","select.provinceOrTerritory":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0440\u043e\u0432\u0438\u043d\u0446\u0438\u044e \u0438\u043b\u0438 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u044e","select.country":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0443","select.noOptionsFound":"\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e","select.filter.placeholder":"\u041f\u043e\u0438\u0441\u043a\u2026","telephoneNumber.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430",qrCodeOrApp:"\u0438\u043b\u0438","paypal.processingPayment":"\u041f\u043b\u0430\u0442\u0435\u0436 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f\u2026",generateQRCode:"\u0421\u043e\u0437\u0434\u0430\u0442\u044c QR-\u043a\u043e\u0434","await.waitForConfirmation":"\u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f","mbway.confirmPayment":"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u043e\u043f\u043b\u0430\u0442\u0443 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 MB WAY","shopperEmail.invalid":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u044d\u043b. \u043f\u043e\u0447\u0442\u044b","dateOfBirth.format":"\u0414\u0414/\u041c\u041c/\u0413\u0413\u0413\u0413","dateOfBirth.invalid":"\u0412\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c 18 \u043b\u0435\u0442 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435","blik.confirmPayment":"\u0414\u043b\u044f \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0430\u043d\u043a\u0430.","blik.invalid":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 6 \u0446\u0438\u0444\u0440","blik.code":"6-\u0437\u043d\u0430\u0447\u043d\u044b\u0439 \u043a\u043e\u0434","blik.help":"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043a\u043e\u0434 \u0438\u0437 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.","swish.pendingMessage":"\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u043f\u043b\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c 10 \u043c\u0438\u043d\u0443\u0442. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043e\u043f\u043b\u0430\u0442\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c \u0441\u043e \u0441\u0447\u0435\u0442\u0430.","error.va.gen.01":"\u041d\u0435\u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u0435","error.va.gen.02":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435","error.va.sf-cc-num.01":"\u041d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u044b","error.va.sf-cc-num.03":"\u0412\u0432\u0435\u0434\u0435\u043d\u0430 \u043d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043a\u0430\u0440\u0442\u0430","error.va.sf-cc-dat.01":"\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0430\u044f \u043a\u0430\u0440\u0442\u0430","error.va.sf-cc-dat.02":"\u0414\u0430\u0442\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u0430\u043b\u0435\u043a\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c","error.va.sf-cc-dat.03":"\u0421\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432\u0430\u0448\u0435\u0439 \u043a\u0430\u0440\u0442\u044b \u0438\u0441\u0442\u0435\u043a\u0430\u0435\u0442 \u0434\u043e \u0434\u0430\u0442\u044b \u043e\u043f\u043b\u0430\u0442\u044b","error.giftcard.no-balance":"\u041d\u0430 \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435 \u043d\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432","error.giftcard.card-error":"\u0423 \u043d\u0430\u0441 \u043d\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u0440\u0442\u0430 \u0441 \u0442\u0430\u043a\u0438\u043c \u043d\u043e\u043c\u0435\u0440\u043e\u043c","error.giftcard.currency-error":"\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u0430\u0440\u0442\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0432\u0430\u043b\u044e\u0442\u044b","amazonpay.signout":"\u0412\u044b\u0439\u0442\u0438 \u0438\u0437 Amazon","amazonpay.changePaymentDetails":"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u0435","partialPayment.warning":"\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043f\u043b\u0430\u0442\u044b \u043e\u0441\u0442\u0430\u0442\u043a\u0430","partialPayment.remainingBalance":"\u041e\u0441\u0442\u0430\u0442\u043e\u043a \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 %{amount}","bankTransfer.beneficiary":"\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"\u0421\u0441\u044b\u043b\u043a\u0430","bankTransfer.introduction":"\u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0434\u0430\u043b\u0435\u0435. \u0414\u043b\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0435\u0436\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u044d\u043a\u0440\u0430\u043d\u0435.","bankTransfer.instructions":"\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u043c \u0437\u0430 \u043f\u043e\u043a\u0443\u043f\u043a\u0443. \u0414\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u043b\u0430\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f.","bacs.accountHolderName":"\u0418\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430","bacs.accountHolderName.invalid":"\u041d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0438\u043c\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430","bacs.accountNumber":"\u041d\u043e\u043c\u0435\u0440 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430","bacs.accountNumber.invalid":"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430","bacs.bankLocationId":"\u041a\u043e\u0434 \u0431\u0430\u043d\u043a\u0430","bacs.bankLocationId.invalid":"\u041d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0430\u043d\u043a\u0430","bacs.consent.amount":"\u0412\u044b\u0440\u0430\u0436\u0430\u044e \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0435 \u043d\u0430 \u0441\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0441\u0443\u043c\u043c\u044b \u0441 \u043c\u043e\u0435\u0433\u043e \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430.","bacs.consent.account":"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e, \u0447\u0442\u043e \u0441\u0447\u0435\u0442 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d \u043d\u0430 \u043c\u043e\u0435 \u0438\u043c\u044f \u0438 \u0447\u0442\u043e \u044f \u2013 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043b\u0438\u0446\u043e, \u0438\u043c\u0435\u044e\u0449\u0435\u0435 \u043f\u0440\u0430\u0432\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0435\u0439 \u043f\u0440\u044f\u043c\u043e\u0435 \u0434\u0435\u0431\u0435\u0442\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0441\u043e \u0441\u0447\u0435\u0442\u0430.",edit:"\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c","bacs.confirm":"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0438 \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c","bacs.result.introduction":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0434\u0435\u0431\u0435\u0442\u043e\u0432\u0430\u043d\u0438\u044f (DDI / \u043f\u043e\u0440\u0443\u0447\u0435\u043d\u0438\u0435)","download.pdf":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0440\u0442\u044b","creditCard.encryptedCardNumber.aria.label":"\u041f\u043e\u043b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0440\u0442\u044b","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u0442\u044b \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u0440\u0442\u044b","creditCard.encryptedExpiryDate.aria.label":"\u041f\u043e\u043b\u0435 \u0434\u0430\u0442\u044b \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0441\u044f\u0446\u0430 \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u0440\u0442\u044b","creditCard.encryptedExpiryMonth.aria.label":"\u041f\u043e\u043b\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0433\u043e\u0434\u0430 \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043a\u0430\u0440\u0442\u044b","creditCard.encryptedExpiryYear.aria.label":"\u041f\u043e\u043b\u0435 \u0433\u043e\u0434\u0430 \u0441\u0440\u043e\u043a\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430","creditCard.encryptedSecurityCode.aria.label":"\u041f\u043e\u043b\u0435 \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b","giftcard.encryptedCardNumber.aria.label":"\u041f\u043e\u043b\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b","giftcard.encryptedSecurityCode.aria.label":"\u041f\u043e\u043b\u0435 \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u044b",giftcardTransactionLimit:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0443\u043c\u043c\u0430, \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u043f\u043e\u0434\u0430\u0440\u043e\u0447\u043d\u043e\u0439 \u043a\u0430\u0440\u0442\u0435: %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u043e\u043c\u0435\u0440\u0430 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430","ach.encryptedBankAccountNumber.aria.label":"\u041f\u043e\u043b\u0435 \u0431\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u043e\u0433\u043e \u0441\u0447\u0435\u0442\u0430","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043a\u043e\u0434\u0430 \u0431\u0430\u043d\u043a\u0430","ach.encryptedBankLocationId.aria.label":"\u041f\u043e\u043b\u0435 \u043a\u043e\u0434\u0430 \u0431\u0430\u043d\u043a\u0430"}}),vg=Object.freeze({__proto__:null,default:{payButton:"Zaplati\u0165","payButton.redirecting":"Prebieha presmerovanie ...",storeDetails:"Ulo\u017ei\u0165 pre moju \u010fal\u0161iu platbu","creditCard.holderName":"Meno na karte","creditCard.holderName.placeholder":"J. Nov\xe1k","creditCard.holderName.invalid":"Neplatn\xe9 meno dr\u017eite\u013ea karty","creditCard.numberField.title":"\u010c\xedslo karty","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Koniec platnosti","creditCard.expiryDateField.placeholder":"MM/RR","creditCard.expiryDateField.month":"Mesiac","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"RR","creditCard.expiryDateField.year":"Rok","creditCard.cvcField.title":"CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Zapam\xe4ta\u0165 na bud\xface pou\u017eitie","creditCard.cvcField.placeholder.4digits":"4 \u010d\xedslice","creditCard.cvcField.placeholder.3digits":"3 \u010d\xedslice","creditCard.taxNumber.placeholder":"RRMMDD/0123456789",installments:"Po\u010det spl\xe1tok",installmentOption:"% {times} x % {partialValue}",installmentOptionMonths:"%{times} mesiace/-ov","installments.oneTime":"Jednorazov\xe1 platba","installments.installments":"Platba po spl\xe1tkach","installments.revolving":"Revolvingov\xe1 platba","sepaDirectDebit.ibanField.invalid":"Neplatn\xe9 \u010d\xedslo \xfa\u010dtu","sepaDirectDebit.nameField.placeholder":"J. Nov\xe1k","sepa.ownerName":"Meno dr\u017eite\u013ea","sepa.ibanNumber":"\u010c\xedslo \xfa\u010dtu (IBAN)","error.title":"Chyba","error.subtitle.redirect":"Nepodarilo sa presmerova\u0165","error.subtitle.payment":"Platba zlyhala","error.subtitle.refused":"Platba bola zamietnut\xe1","error.message.unknown":"Vyskytla sa nezn\xe1ma chyba","idealIssuer.selectField.title":"Banka","idealIssuer.selectField.placeholder":"Vyberte svoju banku","creditCard.success":"Platba bola \xfaspe\u0161n\xe1",loading:"Na\u010d\xedtava sa\u2026",continue:"Pokra\u010dova\u0165",continueTo:"Pokra\u010dova\u0165 do","wechatpay.timetopay":"Na zaplatenie m\xe1te %@","wechatpay.scanqrcode":"Naskenujte QR k\xf3d",personalDetails:"Osobn\xe9 \xfadaje",companyDetails:"\xdadaje o spolo\u010dnosti","companyDetails.name":"N\xe1zov spolo\u010dnosti","companyDetails.registrationNumber":"Identifika\u010dn\xe9 \u010d\xedslo",socialSecurityNumber:"Rodn\xe9 \u010d\xedslo",firstName:"Krstn\xe9 meno",infix:"Predpona k priezvisku (ak existuje)",lastName:"Priezvisko",mobileNumber:"Mobiln\xe9 telef\xf3nne \u010d\xedslo","mobileNumber.invalid":"Neplatn\xe9 \u010d\xedslo na mobil",city:"Mesto",postalCode:"PS\u010c",countryCode:"K\xf3d krajiny",telephoneNumber:"Telef\xf3nne \u010d\xedslo",dateOfBirth:"D\xe1tum narodenia",shopperEmail:"E-mailov\xe1 adresa",gender:"Pohlavie",male:"Mu\u017e",female:"\u017dena",billingAddress:"Faktura\u010dn\xe1 adresa",street:"Ulica",stateOrProvince:"Kraj",country:"Krajina",houseNumberOrName:"\u010c\xedslo domu",separateDeliveryAddress:"Zadajte samostatn\xfa dodaciu adresu",deliveryAddress:"Dodacia adresa",zipCode:"PS\u010c",apartmentSuite:"Byt/apartm\xe1n",provinceOrTerritory:"Okres alebo \xfazemie",cityTown:"Mesto/obec",address:"Adresa",state:"\u0160t\xe1t","field.title.optional":"(volite\u013en\xe9)","creditCard.cvcField.title.optional":"CVC/CVV (volite\u013en\xe9)","issuerList.wallet.placeholder":"Vyberte si pe\u0148a\u017eenku",privacyPolicy:"Z\xe1sady ochrany osobn\xfdch \xfadajov","afterPay.agreement":"S\xfahlas\xedm s %@ AfterPay",paymentConditions:"podmienkami platby",openApp:"Otvorte aplik\xe1ciu","voucher.readInstructions":"Pre\u010d\xedtajte si pokyny","voucher.introduction":"\u010eakujeme v\xe1m za n\xe1kup; na dokon\u010denie platby pou\u017eite nasleduj\xfaci kup\xf3n.","voucher.expirationDate":"D\xe1tum vypr\u0161ania platnosti","voucher.alternativeReference":"Alternat\xedvny odkaz","dragonpay.voucher.non.bank.selectField.placeholder":"Vyberte si poskytovate\u013ea","dragonpay.voucher.bank.selectField.placeholder":"Vyberte svoju banku","voucher.paymentReferenceLabel":"Platobn\xe1 referencia","voucher.surcharge":"Vr\xe1tane poplatku vo v\xfd\u0161ke %@","voucher.introduction.doku":"\u010eakujeme v\xe1m za n\xe1kup. Na dokon\u010denie platby pou\u017eite nasleduj\xface inform\xe1cie.","voucher.shopperName":"Meno kupuj\xfaceho","voucher.merchantName":"Predajca","voucher.introduction.econtext":"\u010eakujeme v\xe1m za n\xe1kup. Na dokon\u010denie platby pou\u017eite nasleduj\xface inform\xe1cie.","voucher.telephoneNumber":"Telef\xf3nne \u010d\xedslo","voucher.shopperReference":"Referencia kupuj\xfaceho","voucher.collectionInstitutionNumber":"\u010c\xedslo inkasnej in\u0161tit\xfacie","voucher.econtext.telephoneNumber.invalid":"Telef\xf3nne \u010d\xedslo mus\xed ma\u0165 10 alebo 11 \u010d\xedslic","boletobancario.btnLabel":"Generova\u0165 Boleto","boleto.sendCopyToEmail":"Zasla\u0165 k\xf3piu na m\xf4j e-mail","button.copy":"Kop\xedrova\u0165","button.download":"Stiahnu\u0165","creditCard.storedCard.description.ariaLabel":"Platnos\u0165 ulo\u017eenej karty kon\u010d\xed o %@","voucher.entity":"Subjekt",donateButton:"Prispie\u0165",notNowButton:"Teraz nie",thanksForYourSupport:"\u010eakujeme za podporu!",preauthorizeWith:"Predbe\u017ene autorizova\u0165 pomocou",confirmPreauthorization:"Potvr\u010fte predbe\u017en\xfa autoriz\xe1ciu",confirmPurchase:"Potvr\u010fte n\xe1kup",applyGiftcard:"Uplatni\u0165",giftcardBalance:"Zostatok na dar\u010dekovej karte",deductedBalance:"Zn\xed\u017een\xfd zostatok","creditCard.pin.title":"K\xf3d PIN","creditCard.encryptedPassword.label":"Prv\xe9 2 \u010d\xedslice hesla karty","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Neplan\xe9 heslo","creditCard.taxNumber.label":"D\xe1tum narodenia dr\u017eite\u013ea karty (RRRMMDD) alebo identifika\u010dn\xe9 \u010d\xedslo organiz\xe1cie (10 \u010d\xedslic)","creditCard.taxNumber.labelAlt":"Identifika\u010dn\xe9 \u010d\xedslo organiz\xe1cie (10 \u010d\xedslic)","creditCard.taxNumber.invalid":"Neplatn\xfd d\xe1tum narodenia dr\u017eite\u013ea karty alebo identifika\u010dn\xe9 \u010d\xedslo organiz\xe1cie","storedPaymentMethod.disable.button":"Odstr\xe1ni\u0165","storedPaymentMethod.disable.confirmation":"Odstr\xe1ni\u0165 ulo\u017een\xfd sp\xf4sob platby","storedPaymentMethod.disable.confirmButton":"\xc1no, odstr\xe1ni\u0165","storedPaymentMethod.disable.cancelButton":"Zru\u0161i\u0165","ach.bankAccount":"Bankov\xfd \xfa\u010det","ach.accountHolderNameField.title":"Meno majite\u013ea \xfa\u010dtu","ach.accountHolderNameField.placeholder":"J. Nov\xe1k","ach.accountHolderNameField.invalid":"Neplatn\xe9 meno majite\u013ea \xfa\u010dtu","ach.accountNumberField.title":"\u010c\xedslo \xfa\u010dtu","ach.accountNumberField.invalid":"Neplatn\xe9 \u010d\xedslo \xfa\u010dtu","ach.accountLocationField.title":"Smerovacie \u010d\xedslo ABA","ach.accountLocationField.invalid":"Neplatn\xe9 smerovacie \u010d\xedslo ABA","select.state":"Vyberte kraj","select.stateOrProvince":"Vyberte kraj alebo okres","select.provinceOrTerritory":"Vyberte okres alebo \xfazemie","select.country":"Vyberte krajinu","select.noOptionsFound":"Neboli n\xe1jden\xe9 \u017eiadne mo\u017enosti","select.filter.placeholder":"Vyh\u013ead\xe1vanie...","telephoneNumber.invalid":"Neplatn\xe9 telef\xf3nne \u010d\xedslo",qrCodeOrApp:"alebo","paypal.processingPayment":"Platba sa sprac\xfava.",generateQRCode:"Generova\u0165 QR k\xf3d","await.waitForConfirmation":"\u010cak\xe1 sa na potvrdenie","mbway.confirmPayment":"Potvr\u010fte svoju platbu v aplik\xe1cii MB WAY","shopperEmail.invalid":"Neplatn\xe1 emailov\xe1 adresa","dateOfBirth.format":"DD/MM/RRRR","dateOfBirth.invalid":"Mus\xedte ma\u0165 aspo\u0148 18 rokov","blik.confirmPayment":"Otvorte svoju bankov\xfa aplik\xe1ciu a potvr\u010fte platbu.","blik.invalid":"Zadajte 6 \u010d\xedslic","blik.code":"6-cifern\xfd k\xf3d","blik.help":"Z\xedskajte k\xf3d zo svojej bankovej aplik\xe1cie.","swish.pendingMessage":"Po nasn\xedman\xed m\xf4\u017ee spracovanie trva\u0165 a\u017e 10 min\xfat. Pokus o op\xe4tovn\xe9 zaplatenie v tejto lehote m\xf4\u017ee vies\u0165 k nieko\u013ek\xfdm poplatkom.","error.va.gen.01":"Ne\xfapln\xe9 pole","error.va.gen.02":"Pole je neplatn\xe9","error.va.sf-cc-num.01":"Neplatn\xe9 \u010d\xedslo karty","error.va.sf-cc-num.03":"Zadali ste nepodporovan\xfa kartu","error.va.sf-cc-dat.01":"Karta je pr\xedli\u0161 star\xe1","error.va.sf-cc-dat.02":"D\xe1tum je pr\xedli\u0161 \u010faleko v bud\xfacnosti","error.va.sf-cc-dat.03":"Platnos\u0165 va\u0161ej karty vypr\u0161\xed pred d\xe1tumom odhl\xe1senia","error.giftcard.no-balance":"T\xe1to dar\u010dekov\xe1 karta m\xe1 nulov\xfd zostatok","error.giftcard.card-error":"V na\u0161ich z\xe1znamoch nem\xe1me \u017eiadnu dar\u010dekov\xfa kartu s t\xfdmto \u010d\xedslom","error.giftcard.currency-error":"Dar\u010dekov\xe9 karty s\xfa platn\xe9 iba v mene, v ktorej boli vydan\xe9","amazonpay.signout":"Odhl\xe1si\u0165 sa z Amazonu","amazonpay.changePaymentDetails":"Zmeni\u0165 podrobnosti o platbe","partialPayment.warning":"Ak chcete zaplati\u0165 zostatok, vyberte in\xfd sp\xf4sob platby","partialPayment.remainingBalance":"Zvy\u0161n\xfd zostatok bude %{amount}","bankTransfer.beneficiary":"Pr\xedjemca","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referencie","bankTransfer.introduction":"Pokra\u010dujte vo vytv\xe1ran\xed novej platby bankov\xfdm prevodom. T\xfato platbu m\xf4\u017eete dokon\u010di\u0165 pomocou inform\xe1ci\xed na nasleduj\xfacej obrazovke.","bankTransfer.instructions":"\u010eakujeme v\xe1m za n\xe1kup. Na dokon\u010denie platby pou\u017eite nasleduj\xface inform\xe1cie.","bacs.accountHolderName":"Meno majite\u013ea bankov\xe9ho \xfa\u010dtu","bacs.accountHolderName.invalid":"Neplatn\xe9 meno majite\u013ea bankov\xe9ho \xfa\u010dtu","bacs.accountNumber":"\u010c\xedslo bankov\xe9ho \xfa\u010dtu","bacs.accountNumber.invalid":"Neplatn\xe9 \u010d\xedslo bankov\xe9ho \xfa\u010dtu","bacs.bankLocationId":"Variabiln\xfd symbol","bacs.bankLocationId.invalid":"Neplatn\xfd variabiln\xfd symbol","bacs.consent.amount":"S\xfahlas\xedm s t\xfdm, \u017ee ni\u017e\u0161ie uveden\xe1 \u010diastka bude odp\xedsan\xe1 z m\xf4jho bankov\xe9ho \xfa\u010dtu.","bacs.consent.account":"Potvrdzujem, \u017ee \xfa\u010det je na moje meno a som jedin\xfd podpisovate\u013e, ktor\xfd je povinn\xfd autorizova\u0165 inkaso v tomto \xfa\u010dte.",edit:"Upravi\u0165","bacs.confirm":"Potvrdi\u0165 a zaplati\u0165","bacs.result.introduction":"Stiahnite si pokyny k inkasu (DDI/Mand\xe1t)","download.pdf":"Stiahnu\u0165 vo form\xe1te PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe pre zabezpe\u010den\xe9 \u010d\xedslo karty","creditCard.encryptedCardNumber.aria.label":"Pole pre \u010d\xedslo karty","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe pre de\u0148 konca platnosti zabezpe\u010denej karty","creditCard.encryptedExpiryDate.aria.label":"Pole d\u0148a konca platnosti","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe pre mesiac konca platnosti zabezpe\u010denej karty","creditCard.encryptedExpiryMonth.aria.label":"Pole mesiaca konca platnosti","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe pre rok konca platnosti zabezpe\u010denej karty","creditCard.encryptedExpiryYear.aria.label":"Pole roka konca platnosti","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe pre bezpe\u010dnostn\xfd k\xf3d zabezpe\u010denej karty","creditCard.encryptedSecurityCode.aria.label":"Pole bezpe\u010dnostn\xe9ho k\xf3du","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe pre \u010d\xedslo zabezpe\u010denej dar\u010dekovej karty","giftcard.encryptedCardNumber.aria.label":"Pole pre \u010d\xedslo dar\u010dekovej karty","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe pre bezpe\u010dnostn\xfd k\xf3d zabezpe\u010denej dar\u010dekovej karty","giftcard.encryptedSecurityCode.aria.label":"Pole bezpe\u010dnostn\xe9ho k\xf3du dar\u010dekovej karty",giftcardTransactionLimit:"Pre transakciu s touto dar\u010dekovou kartou je povolen\xe9 maximum %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe pre \u010d\xedslo zabezpe\u010den\xe9ho bankov\xe9ho \xfa\u010dtu","ach.encryptedBankAccountNumber.aria.label":"Pole bankov\xe9ho \xfa\u010dtu","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe pre zabezpe\u010den\xe9 smerovacie \u010d\xedslo banky","ach.encryptedBankLocationId.aria.label":"Pole smerovacieho \u010d\xedsla banky"}}),gg=Object.freeze({__proto__:null,default:{payButton:"Pla\u010dilo","payButton.redirecting":"Preusmerjanje ...",storeDetails:"Shrani za moje naslednje pla\u010dilo","creditCard.holderName":"Ime na kartici","creditCard.holderName.placeholder":"J. Novak","creditCard.holderName.invalid":"Neveljavno ime imetnika kartice","creditCard.numberField.title":"\u0160tevilka kartice","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Datum veljavnosti","creditCard.expiryDateField.placeholder":"MM/LL","creditCard.expiryDateField.month":"Mesec","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"LL","creditCard.expiryDateField.year":"Leto","creditCard.cvcField.title":"CVC/CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Zapomni si za prihodnji\u010d","creditCard.cvcField.placeholder.4digits":"4 \u0161tevke","creditCard.cvcField.placeholder.3digits":"3 \u0161tevke","creditCard.taxNumber.placeholder":"LLMMDD / 0123456789",installments:"\u0160tevilo obrokov",installmentOption:"%{times} \xd7 %{partialValue}",installmentOptionMonths:"\u0160t. mesecev: %{times}","installments.oneTime":"Enkratno pla\u010dilo","installments.installments":"Obro\u010dno pla\u010dilo","installments.revolving":"Revolving pla\u010dilo","sepaDirectDebit.ibanField.invalid":"Neveljavna \u0161tevilka ra\u010duna","sepaDirectDebit.nameField.placeholder":"J. Novak","sepa.ownerName":"Ime imetnika","sepa.ibanNumber":"\u0160tevilka ra\u010duna (IBAN)","error.title":"Napaka","error.subtitle.redirect":"Preusmeritev ni uspela","error.subtitle.payment":"Pla\u010dilo ni uspelo","error.subtitle.refused":"Pla\u010dilo je bilo zavrnjeno","error.message.unknown":"Pri\u0161lo je do neznane napake","idealIssuer.selectField.title":"Banka","idealIssuer.selectField.placeholder":"Izberite svojo banko","creditCard.success":"Pla\u010dilo je bilo uspe\u0161no",loading:"Nalaganje \u2026",continue:"Nadaljuj",continueTo:"Nadaljujte na","wechatpay.timetopay":"Pla\u010dati morate %@","wechatpay.scanqrcode":"Opti\u010dno preberite kodo QR",personalDetails:"Osebni podatki",companyDetails:"Podrobnosti o podjetju","companyDetails.name":"Ime podjetja","companyDetails.registrationNumber":"Mati\u010dna \u0161tevilka podjetja",socialSecurityNumber:"\u0160tevilka socialnega zavarovanja",firstName:"Ime",infix:"Naziv",lastName:"Priimek",mobileNumber:"\u0160tevilka mobilnega telefona","mobileNumber.invalid":"Neveljavna \u0161tevilka mobilnega telefona",city:"Mesto",postalCode:"Po\u0161tna \u0161tevilka",countryCode:"Koda dr\u017eave",telephoneNumber:"Telefonska \u0161tevilka",dateOfBirth:"Datum rojstva",shopperEmail:"Elektronski naslov",gender:"Spol",male:"Mo\u0161ki",female:"\u017denski",billingAddress:"Naslov za ra\u010dun",street:"Ulica",stateOrProvince:"Dr\u017eava ali provinca",country:"Dr\u017eava",houseNumberOrName:"Hi\u0161na \u0161tevilka",separateDeliveryAddress:"Navedite lo\u010den naslov za dostavo",deliveryAddress:"Naslov za dostavo",zipCode:"Po\u0161tna \u0161tevilka",apartmentSuite:"\u0160t. apartmaja/stanovanja",provinceOrTerritory:"Obmo\u010dje ali ozemlje",cityTown:"Mesto",address:"Naslov",state:"Dr\u017eava","field.title.optional":"(izbirno)","creditCard.cvcField.title.optional":"CVC/CVV (neobvezno)","issuerList.wallet.placeholder":"Izberite svojo denarnico",privacyPolicy:"Pravilnik o zasebnosti","afterPay.agreement":"Strinjam se s %@ ponudnika AfterPay",paymentConditions:"pla\u010dilnimi pogoji",openApp:"Odprite aplikacijo","voucher.readInstructions":"Preberite navodila","voucher.introduction":"Zahvaljujemo se vam za nakup. Za dokon\u010danje pla\u010dila uporabite naslednji kupon.","voucher.expirationDate":"Datum poteka veljavnosti","voucher.alternativeReference":"Druga referen\u010dna \u0161tevilka","dragonpay.voucher.non.bank.selectField.placeholder":"Izberite svojega ponudnika","dragonpay.voucher.bank.selectField.placeholder":"Izberite svojo banko","voucher.paymentReferenceLabel":"Referen\u010dna \u0161tevilka pla\u010dila","voucher.surcharge":"Vklj. %@ dopla\u010dila","voucher.introduction.doku":"Zahvaljujemo se vam za nakup. Za dokon\u010danje pla\u010dila uporabite naslednji kupon.","voucher.shopperName":"Ime kupca","voucher.merchantName":"Trgovec","voucher.introduction.econtext":"Zahvaljujemo se vam za nakup. Za dokon\u010danje pla\u010dila uporabite naslednji kupon.","voucher.telephoneNumber":"Telefonska \u0161tevilka","voucher.shopperReference":"Referen\u010dna \u0161tevilka kupca","voucher.collectionInstitutionNumber":"\u0160tevilka ustanove za zbiranje","voucher.econtext.telephoneNumber.invalid":"Telefonska \u0161tevilka mora vsebovati 10 ali 11 \u0161tevk","boletobancario.btnLabel":"Ustvari Boleto","boleto.sendCopyToEmail":"Po\u0161lji kopijo na moj elektronski naslov","button.copy":"Kopiraj","button.download":"Prenesi","creditCard.storedCard.description.ariaLabel":"Shranjena kartica se kon\u010da na %@","voucher.entity":"Entiteta",donateButton:"Donirajte",notNowButton:"Ne zdaj",thanksForYourSupport:"Zahvaljujemo se vam za podporo!",preauthorizeWith:"Predhodna odobritev s/z:",confirmPreauthorization:"Potrdi predhodno odobritev",confirmPurchase:"Potrditev nakupa",applyGiftcard:"Unov\u010di",giftcardBalance:"Stanje na darilni kartici",deductedBalance:"Odbiti znesek","creditCard.pin.title":"PIN","creditCard.encryptedPassword.label":"Prvi dve \u0161tevki gesla za kartico","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Neveljavno geslo","creditCard.taxNumber.label":"Datum rojstva imetnika kartice (LLMMDD) ali registracijska \u0161tevilka podjetja (10 \u0161tevk)","creditCard.taxNumber.labelAlt":"Mati\u010dna \u0161tevilka podjetja (10 \u0161tevk)","creditCard.taxNumber.invalid":"Neveljaven datum rojstva imetnika kartice ali mati\u010dna \u0161tevilka podjetja","storedPaymentMethod.disable.button":"Odstrani","storedPaymentMethod.disable.confirmation":"Odstrani shranjen na\u010din pla\u010dila","storedPaymentMethod.disable.confirmButton":"Da, odstrani","storedPaymentMethod.disable.cancelButton":"Prekli\u010di","ach.bankAccount":"Ban\u010dni ra\u010dun","ach.accountHolderNameField.title":"Ime imetnika ra\u010duna","ach.accountHolderNameField.placeholder":"J. Novak","ach.accountHolderNameField.invalid":"Neveljavno ime imetnika ra\u010duna","ach.accountNumberField.title":"\u0160tevilka ra\u010duna","ach.accountNumberField.invalid":"Neveljavna \u0161tevilka ra\u010duna","ach.accountLocationField.title":"Koda banke ABA","ach.accountLocationField.invalid":"Neveljavna koda banke ABA","select.state":"Izberite dr\u017eavo","select.stateOrProvince":"Izberite dr\u017eavo ali provinco","select.provinceOrTerritory":"Izberite obmo\u010dje ali ozemlje","select.country":"Izberite dr\u017eavo","select.noOptionsFound":"Ni najdenih mo\u017enosti","select.filter.placeholder":"Iskanje ...","telephoneNumber.invalid":"Neveljavna telefonska \u0161tevilka",qrCodeOrApp:"ali","paypal.processingPayment":"Obdelava pla\u010dila ...",generateQRCode:"Ustvari kodo QR","await.waitForConfirmation":"\u010cakanje na potrditev","mbway.confirmPayment":"Potrdite svoje pla\u010dilo v aplikaciji MB WAY","shopperEmail.invalid":"Neveljaven elektronski naslov","dateOfBirth.format":"DD/MM/LLLL","dateOfBirth.invalid":"Imeti morate najmanj 18 let","blik.confirmPayment":"Za potrditev pla\u010dila odprite svojo ban\u010dno aplikacijo.","blik.invalid":"Vnesite 6 \u0161tevilk","blik.code":"6-mestna koda","blik.help":"Pridobite kodo iz ban\u010dne aplikacije.","swish.pendingMessage":"Ko opti\u010dno preberete, lahko \u010dakanje traja do 10 minut. Poskus ponovnega pla\u010dila v tem \u010dasu lahko povzro\u010di ve\u010d odtegljajev.","error.va.gen.01":"Nepopolno polje","error.va.gen.02":"Polje ni veljavno","error.va.sf-cc-num.01":"Neveljavna \u0161tevilka kartice","error.va.sf-cc-num.03":"Vnesena je nepodprta kartica","error.va.sf-cc-dat.01":"Kartica je prestara","error.va.sf-cc-dat.02":"Datum je predale\u010d v prihodnosti","error.va.sf-cc-dat.03":"Va\u0161a kartica pote\u010de pred datumom odjave","error.giftcard.no-balance":"Na tej darilni kartici ni sredstev","error.giftcard.card-error":"V na\u0161i evidenci nimamo darilne kartice s to \u0161tevilko","error.giftcard.currency-error":"Darilne kartice so veljavne samo za valuto, za katero so bile izdane","amazonpay.signout":"Odjava iz Amazona","amazonpay.changePaymentDetails":"Sprememba podrobnosti pla\u010dila","partialPayment.warning":"Izberite drugo vrsto pla\u010dila za pla\u010dilo ostanka","partialPayment.remainingBalance":"Preostalo stanje bo %{amount}","bankTransfer.beneficiary":"Upravi\u010denec","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Referenca","bankTransfer.introduction":"Nadaljujte ustvarjanje novega pla\u010dila z ban\u010dnim nakazilom. Za dokon\u010danje tega pla\u010dila lahko uporabite podatke na naslednjem zaslonu.","bankTransfer.instructions":"Zahvaljujemo se vam za nakup. Za dokon\u010danje pla\u010dila uporabite naslednji kupon.","bacs.accountHolderName":"Ime imetnika ban\u010dnega ra\u010duna","bacs.accountHolderName.invalid":"Neveljavno ime imetnika ra\u010duna","bacs.accountNumber":"\u0160tevilka ban\u010dnega ra\u010duna","bacs.accountNumber.invalid":"Neveljavna \u0161tevilka ban\u010dnega ra\u010duna","bacs.bankLocationId":"\u0160tevilka banke","bacs.bankLocationId.invalid":"Neveljavna \u0161tevilka banke","bacs.consent.amount":"Sogla\u0161am s tem, da bo zgornji znesek odtegnjen z mojega ban\u010dnega ra\u010duna.","bacs.consent.account":"Potrjujem, da je ra\u010dun ustvarjen v mojem imenu in sem edini podpisnik za odobritev neposredne bremenitve za ta ra\u010dun.",edit:"Uredi","bacs.confirm":"Potrdi in pla\u010daj","bacs.result.introduction":"Prenesite navodila za neposredno bremenitev (DDI/mandat)","download.pdf":"Prenos datoteke PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe za zavarovano \u0161tevilko kartice","creditCard.encryptedCardNumber.aria.label":"Polje s \u0161tevilko kartice","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe za zavarovan potek veljavnosti kartice","creditCard.encryptedExpiryDate.aria.label":"Polje z datumom poteka veljavnosti","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe za zavarovan mesec poteka veljavnosti kartice","creditCard.encryptedExpiryMonth.aria.label":"Polje z mesecem poteka veljavnosti","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe za zavarovano leto poteka veljavnosti kartice","creditCard.encryptedExpiryYear.aria.label":"Polje z letom poteka veljavnosti","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe za zavarovano varnostno kodo kartice","creditCard.encryptedSecurityCode.aria.label":"Polje z varnostno kodo","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe za zavarovano \u0161tevilko darilne kartice","giftcard.encryptedCardNumber.aria.label":"Polje s \u0161tevilko darilne kartice","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe za zavarovano varnostno kodo darilne kartice","giftcard.encryptedSecurityCode.aria.label":"Polje z varnostno kodo darilne kartice",giftcardTransactionLimit:"Za posamezno transakcijo na tej darilni kartici je dovoljeno najve\u010d %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe za zavarovano \u0161tevilko ban\u010dnega ra\u010duna","ach.encryptedBankAccountNumber.aria.label":"Polje z ban\u010dnim ra\u010dunom","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe za zavarovano kodo banke","ach.encryptedBankLocationId.aria.label":"Polje s kodo banke"}}),kg=Object.freeze({__proto__:null,default:{payButton:"Betala","payButton.redirecting":"Omdirigerar\u2026",storeDetails:"Spara till min n\xe4sta betalning","creditCard.holderName":"Namn p\xe5 kort","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Kortinnehavarens namn \xe4r ogiltigt","creditCard.numberField.title":"Kortnummer","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Utg\xe5ngsdatum","creditCard.expiryDateField.placeholder":"MM/AA","creditCard.expiryDateField.month":"M\xe5nad","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"\xc5\xc5","creditCard.expiryDateField.year":"\xc5r","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Kom ih\xe5g till n\xe4sta g\xe5ng","creditCard.cvcField.placeholder.4digits":"4 siffror","creditCard.cvcField.placeholder.3digits":"3 siffror","creditCard.taxNumber.placeholder":"\xc5\xc5MMDD / 0123456789",installments:"Number of installments",installmentOption:"%{times} x %{partialValue}",installmentOptionMonths:"%{times} m\xe5nader","installments.oneTime":"Eng\xe5ngsbetalning","installments.installments":"Delbetalningar","installments.revolving":"Uppdelad betalning","sepaDirectDebit.ibanField.invalid":"Ogiltigt kontonummer","sepaDirectDebit.nameField.placeholder":"J. Johansson","sepa.ownerName":"K\xe4nt av kontoinnehavaren","sepa.ibanNumber":"Kontonummer (IBAN)","error.title":"Fel","error.subtitle.redirect":"Omdirigering misslyckades","error.subtitle.payment":"Betalning misslyckades","error.subtitle.refused":"Betalning avvisad","error.message.unknown":"Ett ok\xe4nt fel uppstod","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"V\xe4lj din bank","creditCard.success":"Betalning lyckades",loading:"Laddar\u2026",continue:"Forts\xe4tt",continueTo:"Forts\xe4tt till","wechatpay.timetopay":"Du har %@ att betala","wechatpay.scanqrcode":"Skanna QR-kod",personalDetails:"Personuppgifter",companyDetails:"F\xf6retagsinformation","companyDetails.name":"F\xf6retagsnamn","companyDetails.registrationNumber":"Registreringsnummer",socialSecurityNumber:"Personnummer",firstName:"F\xf6rnamn",infix:"Prefix",lastName:"Efternamn",mobileNumber:"Mobilnummer","mobileNumber.invalid":"Ogiltigt mobilnummer",city:"Stad",postalCode:"Postnummer",countryCode:"Landskod",telephoneNumber:"Telefonnummer",dateOfBirth:"F\xf6delsedatum",shopperEmail:"E-postadress",gender:"K\xf6n",male:"Man",female:"Kvinna",billingAddress:"Faktureringsadress",street:"Gatuadress",stateOrProvince:"Delstat eller region",country:"Land",houseNumberOrName:"Husnummer",separateDeliveryAddress:"Ange en separat leveransadress",deliveryAddress:"Leveransadress",zipCode:"Postnummer",apartmentSuite:"L\xe4genhetsnummer",provinceOrTerritory:"Provins eller territorium",cityTown:"Ort",address:"Adress",state:"Delstat","field.title.optional":"(valfritt)","creditCard.cvcField.title.optional":"CVC/CVV (tillval)","issuerList.wallet.placeholder":"V\xe4j din pl\xe5nbok",privacyPolicy:"Sekretesspolicy","afterPay.agreement":"Jag godk\xe4nner AfterPays %@",paymentConditions:"betalvillkor",openApp:"\xd6ppna appen","voucher.readInstructions":"L\xe4s instruktionerna","voucher.introduction":"Tack f\xf6r ditt k\xf6p, v\xe4nligen anv\xe4nd f\xf6ljande kupong f\xf6r att slutf\xf6ra din betalning.","voucher.expirationDate":"Utg\xe5ngsdatum","voucher.alternativeReference":"Alternativ referens","dragonpay.voucher.non.bank.selectField.placeholder":"V\xe4lj din leverant\xf6r","dragonpay.voucher.bank.selectField.placeholder":"V\xe4lj din bank","voucher.paymentReferenceLabel":"Betalreferens","voucher.surcharge":"Inklusive %@ i avgift","voucher.introduction.doku":"Tack f\xf6r ditt k\xf6p, v\xe4nligen anv\xe4nd f\xf6ljande information f\xf6r att slutf\xf6ra din betalning.","voucher.shopperName":"Konsumentens namn","voucher.merchantName":"Handlare","voucher.introduction.econtext":"Tack f\xf6r ditt k\xf6p, v\xe4nligen anv\xe4nd f\xf6ljande information f\xf6r att slutf\xf6ra din betalning.","voucher.telephoneNumber":"Telefonnummer","voucher.shopperReference":"K\xf6parreferens","voucher.collectionInstitutionNumber":"Nummer p\xe5 upph\xe4mtningsplats","voucher.econtext.telephoneNumber.invalid":"Telefonnumret m\xe5ste inneh\xe5lla 10 eller 11 siffror","boletobancario.btnLabel":"Generera Boleto","boleto.sendCopyToEmail":"Skicka en kopia till min e-post","button.copy":"Kopiera","button.download":"Ladda ner","creditCard.storedCard.description.ariaLabel":"Sparat kort slutar p\xe5 %@","voucher.entity":"Enhet",donateButton:"Donera",notNowButton:"Inte nu",thanksForYourSupport:"Tack f\xf6r ditt st\xf6d!",preauthorizeWith:"F\xf6rauktorisera med",confirmPreauthorization:"Bekr\xe4fta f\xf6rauktorisering",confirmPurchase:"Bekr\xe4fta k\xf6p",applyGiftcard:"L\xf6s in",giftcardBalance:"Presentkortssaldo",deductedBalance:"Avdraget saldo","creditCard.pin.title":"PIN-kod","creditCard.encryptedPassword.label":"De tv\xe5 f\xf6rsta siffrorna i kortets l\xf6senord","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Ogiltigt l\xf6senord","creditCard.taxNumber.label":"Kortinnehavarens f\xf6delsedatum (\xc5\xc5MMDD) eller f\xf6retagets organisationsnummer (10 siffror)","creditCard.taxNumber.labelAlt":"F\xf6retagets organisationsnummer (10 siffror)","creditCard.taxNumber.invalid":"Ogiltigt f\xf6delsedatum eller organisationsnummer","storedPaymentMethod.disable.button":"Ta bort","storedPaymentMethod.disable.confirmation":"Ta bort sparat betalningss\xe4tt","storedPaymentMethod.disable.confirmButton":"Ja, ta bort","storedPaymentMethod.disable.cancelButton":"Avbryt","ach.bankAccount":"Bankkonto","ach.accountHolderNameField.title":"Kontoinnehavarens namn","ach.accountHolderNameField.placeholder":"A. Andersson","ach.accountHolderNameField.invalid":"Kontoinnehavarens namn \xe4r ogiltigt","ach.accountNumberField.title":"Kontonummer","ach.accountNumberField.invalid":"Ogiltigt kontonummer","ach.accountLocationField.title":"ABA-nummer","ach.accountLocationField.invalid":"Ogiltigt ABA-nummer","select.state":"V\xe4lj delstat","select.stateOrProvince":"V\xe4lj delstat eller provins","select.provinceOrTerritory":"V\xe4lj provins eller territorium","select.country":"V\xe4lj land","select.noOptionsFound":"Inga alternativ hittades","select.filter.placeholder":"S\xf6k efter\u2026","telephoneNumber.invalid":"Ogiltigt telefonnummer",qrCodeOrApp:"eller","paypal.processingPayment":"Behandlar betalning \u2026",generateQRCode:"Generera QR-kod","await.waitForConfirmation":"V\xe4ntar p\xe5 bekr\xe4ftelse","mbway.confirmPayment":"Bekr\xe4fta din betalning i appen MB WAY","shopperEmail.invalid":"Ogiltig e-postadress","dateOfBirth.format":"DD/MM/\xc5\xc5\xc5\xc5","dateOfBirth.invalid":"Du m\xe5ste vara minst 18 \xe5r","blik.confirmPayment":"\xd6ppna din bankapp f\xf6r att bekr\xe4fta betalningen.","blik.invalid":"Ange 6 siffror","blik.code":"Sexsiffrig kod","blik.help":"H\xe4mta koden fr\xe5n din bankapp.","swish.pendingMessage":"N\xe4r du har skannat kan statusen vara v\xe4ntande i upp till tio minuter. Att f\xf6rs\xf6ka betala igen inom denna tid kan leda till flera debiteringar.","error.va.gen.01":"Ofullst\xe4ndigt f\xe4lt","error.va.gen.02":"F\xe4ltet ogiltigt","error.va.sf-cc-num.01":"Ogiltigt kortnummer","error.va.sf-cc-num.03":"Det angivna kortet st\xf6ds inte","error.va.sf-cc-dat.01":"Kortet \xe4r f\xf6r gammalt","error.va.sf-cc-dat.02":"Datumet ligger f\xf6r l\xe5ngt fram i framtiden","error.va.sf-cc-dat.03":"Ditt kort g\xe5r ut f\xf6re betalningsdatumet","error.giftcard.no-balance":"Saldot f\xf6r detta presentkort \xe4r noll","error.giftcard.card-error":"Vi har inte registrerat n\xe5got presentkort med det numret","error.giftcard.currency-error":"Presentkort \xe4r endast giltiga i den valuta som de utf\xe4rdades i","amazonpay.signout":"Logga ut fr\xe5n Amazon","amazonpay.changePaymentDetails":"\xc4ndra betalningsuppgifter","partialPayment.warning":"V\xe4lj ett annat betalningss\xe4tt f\xf6r att betala det \xe5terst\xe5ende","partialPayment.remainingBalance":"\xc5terst\xe5ende saldo blir %{amount}","bankTransfer.beneficiary":"Mottagare","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"referens","bankTransfer.introduction":"Forts\xe4tt f\xf6r att skapa en ny bank\xf6verf\xf6ring. Du kan anv\xe4nda informationen p\xe5 f\xf6ljande sk\xe4rm f\xf6r att slutf\xf6ra denna betalning.","bankTransfer.instructions":"Tack f\xf6r ditt k\xf6p! Anv\xe4nd f\xf6ljande information f\xf6r att slutf\xf6ra din betalning.","bacs.accountHolderName":"Bankkontoinnehavarens namn","bacs.accountHolderName.invalid":"Ogiltigt namn p\xe5 bankkontoinnehavare","bacs.accountNumber":"Bankkontonummer","bacs.accountNumber.invalid":"Ogiltigt bankkontonummer","bacs.bankLocationId":"Clearingnummer","bacs.bankLocationId.invalid":"Ogiltigt clearingnummer","bacs.consent.amount":"Jag godk\xe4nner att ovanst\xe5ende belopp dras fr\xe5n mitt bankkonto.","bacs.consent.account":"Jag bekr\xe4ftar att jag \xe4r kontoinnehavare och att jag \xe4r den enda person vars godk\xe4nnande kr\xe4vs f\xf6r att auktorisera autogiro fr\xe5n detta konto.",edit:"Redigera","bacs.confirm":"Bekr\xe4fta och betala","bacs.result.introduction":"Ladda ner din instruktion f\xf6r autogiro/direktdebitering (DDI / Mandate)","download.pdf":"Ladda ner PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe f\xf6r s\xe4krat kortnummer","creditCard.encryptedCardNumber.aria.label":"F\xe4lt f\xf6r kortnummer","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe f\xf6r s\xe4krat utg\xe5ngsdatum f\xf6r kort","creditCard.encryptedExpiryDate.aria.label":"F\xe4lt f\xf6r utg\xe5ngsdatum","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe f\xf6r s\xe4krad utg\xe5ngsm\xe5nad f\xf6r kort","creditCard.encryptedExpiryMonth.aria.label":"F\xe4lt f\xf6r utg\xe5ngsm\xe5nad","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe f\xf6r s\xe4krat utg\xe5ngs\xe5r f\xf6r kort","creditCard.encryptedExpiryYear.aria.label":"F\xe4lt f\xf6r utg\xe5ngs\xe5r","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe f\xf6r s\xe4krad s\xe4kerhetskod f\xf6r kort","creditCard.encryptedSecurityCode.aria.label":"F\xe4lt f\xf6r s\xe4kerhetskod","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe f\xf6r s\xe4krat presentkortsnummer","giftcard.encryptedCardNumber.aria.label":"F\xe4lt f\xf6r presentkortsnummer","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe f\xf6r s\xe4krad s\xe4kerhetskod f\xf6r presentkort","giftcard.encryptedSecurityCode.aria.label":"F\xe4lt f\xf6r s\xe4kerhetskod f\xf6r presentkort",giftcardTransactionLimit:"Maximalt %{amount} per transaktion \xe4r till\xe5tet p\xe5 detta presentkort","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe f\xf6r s\xe4krat bankkontonummer","ach.encryptedBankAccountNumber.aria.label":"F\xe4lt f\xf6r bankkontonummer","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe f\xf6r s\xe4krat clearingnummer","ach.encryptedBankLocationId.aria.label":"F\xe4lt f\xf6r clearingnummer"}}),Cg=Object.freeze({__proto__:null,default:{payButton:"\u652f\u4ed8","payButton.redirecting":"\u6b63\u5728\u91cd\u5b9a\u5411...",storeDetails:"\u4fdd\u5b58\u4ee5\u4fbf\u4e0b\u6b21\u652f\u4ed8\u4f7f\u7528","creditCard.holderName":"\u5361\u7247\u4e0a\u7684\u59d3\u540d","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"\u65e0\u6548\u7684\u6301\u5361\u4eba\u59d3\u540d","creditCard.numberField.title":"\u5361\u53f7","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"\u6709\u6548\u671f","creditCard.expiryDateField.placeholder":"\u6708\u6708/\u5e74\u5e74","creditCard.expiryDateField.month":"\u6708","creditCard.expiryDateField.month.placeholder":"\u6708\u6708","creditCard.expiryDateField.year.placeholder":"\u5e74\u5e74","creditCard.expiryDateField.year":"\u5e74","creditCard.cvcField.title":"CVC / CVV","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\u8bb0\u4f4f\u4ee5\u4fbf\u4e0b\u6b21\u4f7f\u7528","creditCard.cvcField.placeholder.4digits":"4 \u4f4d\u6570","creditCard.cvcField.placeholder.3digits":"3 \u4f4d\u6570","creditCard.taxNumber.placeholder":"\u5e74\u6708\u65e5 / 0123456789",installments:"\u5206\u671f\u4ed8\u6b3e\u671f\u6570",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} \u4e2a\u6708","installments.oneTime":"\u5168\u6b3e\u652f\u4ed8","installments.installments":"\u5206\u671f\u652f\u4ed8","installments.revolving":"\u5faa\u73af\u652f\u4ed8","sepaDirectDebit.ibanField.invalid":"\u65e0\u6548\u7684\u8d26\u53f7","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"\u6301\u5361\u4eba\u59d3\u540d","sepa.ibanNumber":"\u8d26\u53f7 (IBAN)","error.title":"\u9519\u8bef","error.subtitle.redirect":"\u91cd\u5b9a\u5411\u5931\u8d25","error.subtitle.payment":"\u652f\u4ed8\u5931\u8d25","error.subtitle.refused":"\u652f\u4ed8\u88ab\u62d2","error.message.unknown":"\u53d1\u751f\u672a\u77e5\u9519\u8bef","idealIssuer.selectField.title":"\u94f6\u884c","idealIssuer.selectField.placeholder":"\u9009\u62e9\u60a8\u7684\u94f6\u884c","creditCard.success":"\u652f\u4ed8\u6210\u529f",loading:"\u6b63\u5728\u52a0\u8f7d...",continue:"\u7ee7\u7eed",continueTo:"\u7ee7\u7eed\u81f3","wechatpay.timetopay":"\u60a8\u9700\u8981\u652f\u4ed8 %@","wechatpay.scanqrcode":"\u626b\u63cf\u4e8c\u7ef4\u7801",personalDetails:"\u4e2a\u4eba\u8be6\u7ec6\u4fe1\u606f",companyDetails:"\u516c\u53f8\u8be6\u60c5","companyDetails.name":"\u516c\u53f8\u540d\u79f0","companyDetails.registrationNumber":"\u6ce8\u518c\u53f7",socialSecurityNumber:"\u793e\u4f1a\u4fdd\u9669\u53f7\u7801",firstName:"\u540d\u5b57",infix:"\u524d\u7f00",lastName:"\u59d3\u6c0f",mobileNumber:"\u624b\u673a\u53f7","mobileNumber.invalid":"\u65e0\u6548\u7684\u624b\u673a\u53f7\u7801",city:"\u57ce\u5e02",postalCode:"\u90ae\u653f\u7f16\u7801",countryCode:"\u56fd\u5bb6\u4ee3\u7801",telephoneNumber:"\u7535\u8bdd\u53f7\u7801",dateOfBirth:"\u51fa\u751f\u65e5\u671f",shopperEmail:"\u7535\u5b50\u90ae\u4ef6\u5730\u5740",gender:"\u6027\u522b",male:"\u7537",female:"\u5973",billingAddress:"\u8d26\u5355\u5730\u5740",street:"\u8857\u9053",stateOrProvince:"\u5dde\u6216\u7701",country:"\u56fd\u5bb6/\u5730\u533a",houseNumberOrName:"\u95e8\u724c\u53f7",separateDeliveryAddress:"\u6307\u5b9a\u4e00\u4e2a\u5355\u72ec\u7684\u5bc4\u9001\u5730\u5740",deliveryAddress:"\u5bc4\u9001\u5730\u5740",zipCode:"\u90ae\u653f\u7f16\u7801",apartmentSuite:"\u516c\u5bd3 / \u5957\u623f",provinceOrTerritory:"\u7701\u6216\u5730\u533a",cityTown:"\u5e02 / \u9547",address:"\u5730\u5740",state:"\u5dde","field.title.optional":"\uff08\u53ef\u9009\uff09","creditCard.cvcField.title.optional":"CVC / CVV\uff08\u53ef\u9009\uff09","issuerList.wallet.placeholder":"\u9009\u62e9\u60a8\u7684\u94b1\u5305",privacyPolicy:"\u9690\u79c1\u653f\u7b56","afterPay.agreement":"\u6211\u540c\u610f AfterPay \u7684 %@",paymentConditions:"\u652f\u4ed8\u6761\u4ef6",openApp:"\u6253\u5f00\u5e94\u7528","voucher.readInstructions":"\u9605\u8bfb\u8bf4\u660e","voucher.introduction":"\u611f\u8c22\u60a8\u7684\u8d2d\u4e70\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u4f18\u60e0\u5238\u5b8c\u6210\u652f\u4ed8\u3002","voucher.expirationDate":"\u6709\u6548\u671f","voucher.alternativeReference":"\u5907\u9009\u4ee3\u7801","dragonpay.voucher.non.bank.selectField.placeholder":"\u9009\u62e9\u60a8\u7684\u63d0\u4f9b\u5546","dragonpay.voucher.bank.selectField.placeholder":"\u9009\u62e9\u60a8\u7684\u94f6\u884c","voucher.paymentReferenceLabel":"\u4ea4\u6613\u53f7","voucher.surcharge":"\u5305\u62ec %@ \u7684\u9644\u52a0\u8d39","voucher.introduction.doku":"\u611f\u8c22\u60a8\u7684\u8d2d\u4e70\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u4fe1\u606f\u5b8c\u6210\u652f\u4ed8\u3002","voucher.shopperName":"\u987e\u5ba2\u59d3\u540d","voucher.merchantName":"\u5546\u6237","voucher.introduction.econtext":"\u611f\u8c22\u60a8\u7684\u8d2d\u4e70\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u4fe1\u606f\u5b8c\u6210\u652f\u4ed8\u3002","voucher.telephoneNumber":"\u7535\u8bdd\u53f7\u7801","voucher.shopperReference":"\u987e\u5ba2\u53c2\u8003","voucher.collectionInstitutionNumber":"\u6536\u6b3e\u673a\u6784\u7f16\u53f7","voucher.econtext.telephoneNumber.invalid":"\u7535\u8bdd\u53f7\u7801\u5fc5\u987b\u4e3a 10 \u6216 11 \u4f4d\u6570\u5b57","boletobancario.btnLabel":"\u751f\u6210 Boleto","boleto.sendCopyToEmail":"\u5c06\u526f\u672c\u53d1\u9001\u5230\u6211\u7684\u7535\u5b50\u90ae\u7bb1","button.copy":"\u590d\u5236","button.download":"\u4e0b\u8f7d","creditCard.storedCard.description.ariaLabel":"\u5b58\u50a8\u7684\u5361\u7247\u4ee5 \uff05@ \u7ed3\u5c3e","voucher.entity":"\u5b9e\u4f53",donateButton:"\u6350\u8d60",notNowButton:"\u6682\u4e0d",thanksForYourSupport:"\u611f\u8c22\u60a8\u7684\u652f\u6301\uff01",preauthorizeWith:"\u9884\u5148\u6388\u6743",confirmPreauthorization:"\u786e\u8ba4\u9884\u5148\u6388\u6743",confirmPurchase:"\u786e\u8ba4\u8d2d\u4e70",applyGiftcard:"\u5151\u6362",giftcardBalance:"\u793c\u54c1\u5361\u4f59\u989d",deductedBalance:"\u6263\u51cf\u4f59\u989d","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"\u5361\u7247\u5bc6\u7801\u7684\u524d 2 \u4f4d\u6570","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\u65e0\u6548\u7684\u5bc6\u7801","creditCard.taxNumber.label":"\u6301\u5361\u4eba\u751f\u65e5 (YYMMDD) \u6216\u516c\u53f8\u6ce8\u518c\u53f7\uff0810 \u4f4d\u6570\uff09","creditCard.taxNumber.labelAlt":"\u516c\u53f8\u6ce8\u518c\u53f7\uff0810 \u4f4d\u6570\uff09","creditCard.taxNumber.invalid":"\u65e0\u6548\u7684\u6301\u5361\u4eba\u751f\u65e5\u6216\u516c\u53f8\u6ce8\u518c\u53f7","storedPaymentMethod.disable.button":"\u5220\u9664","storedPaymentMethod.disable.confirmation":"\u5220\u9664\u5b58\u50a8\u7684\u652f\u4ed8\u65b9\u5f0f","storedPaymentMethod.disable.confirmButton":"\u662f\uff0c\u5220\u9664","storedPaymentMethod.disable.cancelButton":"\u53d6\u6d88","ach.bankAccount":"\u94f6\u884c\u8d26\u6237","ach.accountHolderNameField.title":"\u8d26\u6237\u6301\u6709\u4eba\u59d3\u540d","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"\u65e0\u6548\u7684\u8d26\u6237\u6301\u6709\u4eba\u59d3\u540d","ach.accountNumberField.title":"\u8d26\u53f7","ach.accountNumberField.invalid":"\u65e0\u6548\u7684\u8d26\u53f7","ach.accountLocationField.title":"ABA \u8def\u7531\u7535\u6c47\u7f16\u7801","ach.accountLocationField.invalid":"\u65e0\u6548\u7684 ABA \u8def\u7531\u7535\u6c47\u7f16\u7801","select.state":"\u9009\u62e9\u5dde","select.stateOrProvince":"\u9009\u62e9\u5dde\u6216\u7701","select.provinceOrTerritory":"\u9009\u62e9\u7701\u6216\u5730\u533a","select.country":"\u9009\u62e9\u56fd\u5bb6/\u5730\u533a","select.noOptionsFound":"\u672a\u627e\u5230\u4efb\u4f55\u9009\u9879","select.filter.placeholder":"\u641c\u7d22\u2026\u2026","telephoneNumber.invalid":"\u65e0\u6548\u7684\u7535\u8bdd\u53f7\u7801",qrCodeOrApp:"\u6216\u8005","paypal.processingPayment":"\u6b63\u5728\u5904\u7406\u4ed8\u6b3e...",generateQRCode:"\u751f\u6210\u4e8c\u7ef4\u7801","await.waitForConfirmation":"\u7b49\u5f85\u786e\u8ba4","mbway.confirmPayment":"\u5728 MB WAY \u5e94\u7528\u4e0a\u786e\u8ba4\u60a8\u7684\u4ed8\u6b3e","shopperEmail.invalid":"\u65e0\u6548\u7684\u90ae\u4ef6\u5730\u5740","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"\u60a8\u5fc5\u987b\u5e74\u6ee1 18 \u5468\u5c81","blik.confirmPayment":"\u6253\u5f00\u60a8\u7684\u94f6\u884c\u5e94\u7528\u4ee5\u786e\u8ba4\u652f\u4ed8\u3002","blik.invalid":"\u8f93\u5165 6 \u4f4d\u6570","blik.code":"6 \u4f4d\u6570\u4ee3\u7801","blik.help":"\u4ece\u60a8\u7684\u94f6\u884c\u5e94\u7528\u4e2d\u83b7\u53d6\u4ee3\u7801\u3002","swish.pendingMessage":"\u626b\u63cf\u540e\uff0c\u72b6\u6001\u53ef\u80fd\u4f1a\u4fdd\u6301\u6700\u591a 10 \u5206\u949f\u3002\u5728\u6b64\u65f6\u95f4\u5185\u518d\u6b21\u5c1d\u8bd5\u4ed8\u6b3e\u53ef\u80fd\u4f1a\u5bfc\u81f4\u591a\u6b21\u6536\u8d39\u3002","error.va.gen.01":"\u4e0d\u5b8c\u6574\u5b57\u6bb5","error.va.gen.02":"\u65e0\u6548\u5b57\u6bb5","error.va.sf-cc-num.01":"\u65e0\u6548\u7684\u5361\u53f7","error.va.sf-cc-num.03":"\u4e0d\u652f\u6301\u8f93\u5165\u7684\u5361\u7247","error.va.sf-cc-dat.01":"\u5361\u7247\u592a\u65e7","error.va.sf-cc-dat.02":"\u65e5\u671f\u592a\u4e45\u8fdc","error.va.sf-cc-dat.03":"\u60a8\u7684\u5361\u5728\u7ed3\u8d26\u65e5\u671f\u524d\u5df2\u8fc7\u671f","error.giftcard.no-balance":"\u793c\u54c1\u5361\u4f59\u989d\u4e3a\u96f6","error.giftcard.card-error":"\u6211\u4eec\u7684\u6570\u636e\u5e93\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u53f7\u7801\u7684\u793c\u54c1\u5361","error.giftcard.currency-error":"\u793c\u54c1\u5361\u4ec5\u4ee5\u5176\u53d1\u884c\u7684\u8d27\u5e01\u4e3a\u6709\u6548\u8d27\u5e01","amazonpay.signout":"\u9000\u51fa Amazon","amazonpay.changePaymentDetails":"\u66f4\u6539\u652f\u4ed8\u8be6\u60c5","partialPayment.warning":"\u8bf7\u9009\u62e9\u5176\u4ed6\u652f\u4ed8\u65b9\u5f0f\u652f\u4ed8\u5269\u4f59\u6b3e\u9879","partialPayment.remainingBalance":"\u5269\u4f59\u989d\u5ea6\u4e3a %{amount}","bankTransfer.beneficiary":"\u6536\u6b3e\u4eba","bankTransfer.iban":"IBAN","bankTransfer.bic":"\u4e2d\u56fd\u5de5\u5546\u94f6\u884c","bankTransfer.reference":"\u53c2\u8003","bankTransfer.introduction":"\u7ee7\u7eed\u65b0\u5efa\u94f6\u884c\u8f6c\u8d26\u4ed8\u6b3e\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u5c4f\u5e55\u4e2d\u7684\u8be6\u7ec6\u4fe1\u606f\u6765\u5b8c\u6210\u8fd9\u7b14\u4ed8\u6b3e\u3002","bankTransfer.instructions":"\u611f\u8c22\u60a8\u7684\u8d2d\u4e70\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u4fe1\u606f\u5b8c\u6210\u652f\u4ed8\u3002","bacs.accountHolderName":"\u94f6\u884c\u8d26\u6237\u6301\u6709\u4eba\u59d3\u540d","bacs.accountHolderName.invalid":"\u65e0\u6548\u7684\u94f6\u884c\u8d26\u6237\u6301\u6709\u4eba\u59d3\u540d","bacs.accountNumber":"\u94f6\u884c\u8d26\u53f7","bacs.accountNumber.invalid":"\u65e0\u6548\u7684\u94f6\u884c\u8d26\u53f7","bacs.bankLocationId":"\u5206\u7c7b\u4ee3\u7801","bacs.bankLocationId.invalid":"\u65e0\u6548\u7684\u5206\u7c7b\u4ee3\u7801","bacs.consent.amount":"\u6211\u540c\u610f\u4ece\u94f6\u884c\u8d26\u6237\u4e2d\u6263\u9664\u4e0a\u8ff0\u91d1\u989d\u3002","bacs.consent.account":"\u6211\u786e\u8ba4\u8be5\u8d26\u6237\u4e3a\u6211\u540d\u4e0b\u7684\u8d26\u6237\uff0c\u5e76\u4e14\u6211\u662f\u6388\u6743\u8be5\u8d26\u6237\u76f4\u63a5\u501f\u8bb0\u7684\u552f\u4e00\u7b7e\u7f72\u4eba\u3002",edit:"\u7f16\u8f91","bacs.confirm":"\u786e\u8ba4\u5e76\u652f\u4ed8","bacs.result.introduction":"\u4e0b\u8f7d\u60a8\u7684\u76f4\u63a5\u501f\u8bb0\u6307\u793a\uff08DDI/\u59d4\u6258\uff09","download.pdf":"\u4e0b\u8f7d PDF \u6587\u4ef6","creditCard.encryptedCardNumber.aria.iframeTitle":"\u5b89\u5168\u5361\u53f7 Iframe","creditCard.encryptedCardNumber.aria.label":"\u5361\u53f7\u5b57\u6bb5","creditCard.encryptedExpiryDate.aria.iframeTitle":"\u5b89\u5168\u5361\u7247\u8fc7\u671f\u65e5\u671f Iframe","creditCard.encryptedExpiryDate.aria.label":"\u8fc7\u671f\u65e5\u671f\u5b57\u6bb5","creditCard.encryptedExpiryMonth.aria.iframeTitle":"\u5b89\u5168\u5361\u7247\u8fc7\u671f\u6708\u4efd Iframe","creditCard.encryptedExpiryMonth.aria.label":"\u8fc7\u671f\u6708\u4efd\u5b57\u6bb5","creditCard.encryptedExpiryYear.aria.iframeTitle":"\u5b89\u5168\u5361\u7247\u8fc7\u671f\u5e74\u4efd Iframe","creditCard.encryptedExpiryYear.aria.label":"\u8fc7\u671f\u5e74\u4efd\u5b57\u6bb5","creditCard.encryptedSecurityCode.aria.iframeTitle":"\u5b89\u5168\u5361\u7247\u5b89\u5168\u7801 Iframe","creditCard.encryptedSecurityCode.aria.label":"\u5b89\u5168\u7801\u5b57\u6bb5","giftcard.encryptedCardNumber.aria.iframeTitle":"\u5b89\u5168\u793c\u54c1\u5361\u53f7 Iframe","giftcard.encryptedCardNumber.aria.label":"\u793c\u54c1\u5361\u53f7\u5b57\u6bb5","giftcard.encryptedSecurityCode.aria.iframeTitle":"\u5b89\u5168\u793c\u54c1\u5361\u5b89\u5168\u7801 Iframe","giftcard.encryptedSecurityCode.aria.label":"\u793c\u54c1\u5361\u5b89\u5168\u7801\u5b57\u6bb5",giftcardTransactionLimit:"\u6b64\u793c\u54c1\u5361\u4e0a\u6bcf\u7b14\u4ea4\u6613\u5141\u8bb8\u7684\u6700\u5927\u91d1\u989d\u4e3a %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"\u5b89\u5168\u94f6\u884c\u8d26\u53f7 Iframe","ach.encryptedBankAccountNumber.aria.label":"\u94f6\u884c\u8d26\u53f7\u5b57\u6bb5","ach.encryptedBankLocationId.aria.iframeTitle":"\u5b89\u5168\u94f6\u884c\u8def\u7531\u7535\u6c47\u7f16\u7801 Iframe","ach.encryptedBankLocationId.aria.label":"\u94f6\u884c\u8def\u7531\u7535\u6c47\u7f16\u7801\u5b57\u6bb5"}}),_g=Object.freeze({__proto__:null,default:{payButton:"\u652f\u4ed8","payButton.redirecting":"\u91cd\u65b0\u5c0e\u5411\u4e2d......",storeDetails:"\u5132\u5b58\u4ee5\u4f9b\u4e0b\u6b21\u4ed8\u6b3e\u4f7f\u7528","creditCard.holderName":"\u4fe1\u7528\u5361\u4e0a\u7684\u59d3\u540d","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"\u6301\u5361\u4eba\u59d3\u540d\u7121\u6548","creditCard.numberField.title":"\u4fe1\u7528\u5361\u865f\u78bc","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"\u5230\u671f\u65e5\u671f","creditCard.expiryDateField.placeholder":"MM/YY","creditCard.expiryDateField.month":"\u6708\u4efd","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"YY","creditCard.expiryDateField.year":"\u5e74\u4efd","creditCard.cvcField.title":"\u4fe1\u7528\u5361\u9a57\u8b49\u78bc / \u4fe1\u7528\u5361\u5b89\u5168\u78bc","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"\u8a18\u4f4f\u4f9b\u4e0b\u6b21\u4f7f\u7528","creditCard.cvcField.placeholder.4digits":"4 \u4f4d\u6578","creditCard.cvcField.placeholder.3digits":"3 \u4f4d\u6578","creditCard.taxNumber.placeholder":"\u5e74\u6708\u65e5\uff0f0123456789",installments:"\u5206\u671f\u4ed8\u6b3e\u7684\u671f\u6578",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"\uff05{times} \u500b\u6708","installments.oneTime":"\u4e00\u6b21\u6027\u4ed8\u6b3e","installments.installments":"\u5206\u671f\u4ed8\u6b3e","installments.revolving":"\u5ef6\u671f\u4ed8\u6b3e","sepaDirectDebit.ibanField.invalid":"\u5e33\u6236\u865f\u78bc\u7121\u6548","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"\u6301\u6709\u4eba\u540d\u7a31","sepa.ibanNumber":"\u5e33\u6236\u865f\u78bc (IBAN)","error.title":"\u932f\u8aa4","error.subtitle.redirect":"\u7121\u6cd5\u91cd\u65b0\u5c0e\u5411","error.subtitle.payment":"\u4ed8\u6b3e\u5931\u6557","error.subtitle.refused":"\u4ed8\u6b3e\u906d\u62d2\u7d55","error.message.unknown":"\u767c\u751f\u672a\u77e5\u932f\u8aa4","idealIssuer.selectField.title":"\u9280\u884c","idealIssuer.selectField.placeholder":"\u9078\u53d6\u60a8\u7684\u9280\u884c","creditCard.success":"\u4ed8\u6b3e\u6210\u529f",loading:"\u6b63\u5728\u8f09\u5165...",continue:"\u7e7c\u7e8c",continueTo:"\u7e7c\u7e8c\u524d\u5f80","wechatpay.timetopay":"\u60a8\u6709 %@ \u53ef\u4ee5\u652f\u4ed8","wechatpay.scanqrcode":"\u6383\u63cf QR \u4ee3\u78bc",personalDetails:"\u500b\u4eba\u8a73\u7d30\u8cc7\u6599",companyDetails:"\u516c\u53f8\u8a73\u60c5","companyDetails.name":"\u516c\u53f8\u540d\u7a31","companyDetails.registrationNumber":"\u8a3b\u518a\u865f\u78bc",socialSecurityNumber:"\u793e\u6703\u5b89\u5168\u78bc",firstName:"\u540d\u5b57",infix:"\u524d\u7db4",lastName:"\u59d3\u6c0f",mobileNumber:"\u884c\u52d5\u96fb\u8a71\u865f\u78bc","mobileNumber.invalid":"\u624b\u6a5f\u865f\u78bc\u7121\u6548",city:"\u57ce\u5e02",postalCode:"\u90f5\u905e\u5340\u865f",countryCode:"\u570b\u5bb6\u4ee3\u78bc",telephoneNumber:"\u96fb\u8a71\u865f\u78bc",dateOfBirth:"\u51fa\u751f\u65e5\u671f",shopperEmail:"\u96fb\u5b50\u90f5\u4ef6\u5730\u5740",gender:"\u6027\u5225",male:"\u7537",female:"\u5973",billingAddress:"\u5e33\u55ae\u5730\u5740",street:"\u8857\u9053",stateOrProvince:"\u5dde/\u7e23/\u5e02",country:"\u570b\u5bb6/\u5730\u5340",houseNumberOrName:"\u9580\u724c\u865f",separateDeliveryAddress:"\u6307\u5b9a\u53e6\u4e00\u500b\u6d3e\u9001\u5730\u5740",deliveryAddress:"\u6d3e\u9001\u5730\u5740",zipCode:"\u90f5\u905e\u5340\u865f",apartmentSuite:"\u516c\u5bd3\uff0f\u5957\u623f",provinceOrTerritory:"\u7701\u6216\u5730\u5340",cityTown:"\u5e02\uff0f\u93ae",address:"\u5730\u5740",state:"\u5dde","field.title.optional":"\uff08\u9078\u7528\uff09","creditCard.cvcField.title.optional":"CVC / CVV (\u53ef\u9078)","issuerList.wallet.placeholder":"\u9078\u53d6\u60a8\u7684\u96fb\u5b50\u9322\u5305",privacyPolicy:"\u96b1\u79c1\u6b0a\u653f\u7b56","afterPay.agreement":"\u6211\u540c\u610f AfterPay \u7684%@",paymentConditions:"\u4ed8\u6b3e\u7d30\u5247",openApp:"\u958b\u555f\u61c9\u7528\u7a0b\u5f0f","voucher.readInstructions":"\u95b1\u89bd\u8aaa\u660e","voucher.introduction":"\u591a\u8b1d\u60e0\u9867\uff0c\u8acb\u4f7f\u7528\u4ee5\u4e0b\u512a\u60e0\u5238\u5b8c\u6210\u4ed8\u6b3e\u3002","voucher.expirationDate":"\u5230\u671f\u65e5\u671f","voucher.alternativeReference":"\u5099\u9078\u53c3\u7167","dragonpay.voucher.non.bank.selectField.placeholder":"\u9078\u64c7\u60a8\u7684\u4f9b\u61c9\u5546","dragonpay.voucher.bank.selectField.placeholder":"\u9078\u53d6\u60a8\u7684\u9280\u884c","voucher.paymentReferenceLabel":"\u4ed8\u6b3e\u53c3\u7167\u865f\u78bc","voucher.surcharge":"\u5305\u542b %@ \u9644\u52a0\u8cbb","voucher.introduction.doku":"\u591a\u8b1d\u60e0\u9867\uff0c\u8acb\u4f7f\u7528\u4ee5\u4e0b\u8cc7\u8a0a\u5b8c\u6210\u4ed8\u6b3e\u3002","voucher.shopperName":"\u8cfc\u7269\u8005\u59d3\u540d","voucher.merchantName":"\u5546\u5bb6","voucher.introduction.econtext":"\u591a\u8b1d\u60e0\u9867\uff0c\u8acb\u4f7f\u7528\u4ee5\u4e0b\u8cc7\u8a0a\u5b8c\u6210\u4ed8\u6b3e\u3002","voucher.telephoneNumber":"\u96fb\u8a71\u865f\u78bc","voucher.shopperReference":"\u8cfc\u7269\u8005\u53c3\u8003","voucher.collectionInstitutionNumber":"\u6536\u6b3e\u6a5f\u69cb\u7de8\u865f","voucher.econtext.telephoneNumber.invalid":"\u96fb\u8a71\u865f\u78bc\u7684\u9577\u5ea6\u5fc5\u9808\u70ba 10 \u6216 11 \u4f4d\u6578","boletobancario.btnLabel":"\u7522\u751f Boleto","boleto.sendCopyToEmail":"\u5c07\u8907\u672c\u50b3\u9001\u81f3\u6211\u7684\u96fb\u5b50\u90f5\u4ef6","button.copy":"\u8907\u88fd","button.download":"\u4e0b\u8f09","creditCard.storedCard.description.ariaLabel":"\u5df2\u5132\u5b58\u4ee5 %@ \u7d50\u5c3e\u7684\u4fe1\u7528\u5361","voucher.entity":"\u5be6\u9ad4",donateButton:"\u6350\u8d08",notNowButton:"\u7a0d\u5f8c\u518d\u8aaa",thanksForYourSupport:"\u611f\u8b1d\u60a8\u7684\u652f\u6301\uff01",preauthorizeWith:"\u900f\u904e\u4ee5\u4e0b\u65b9\u5f0f\u9032\u884c\u9810\u5148\u6388\u6b0a\uff1a",confirmPreauthorization:"\u78ba\u8a8d\u9810\u5148\u6388\u6b0a",confirmPurchase:"\u78ba\u8a8d\u8cfc\u8cb7",applyGiftcard:"\u514c\u63db",giftcardBalance:"\u79ae\u54c1\u5361\u9918\u984d",deductedBalance:"\u6263\u9664\u9918\u984d","creditCard.pin.title":"\u6578\u5b57\u5bc6\u78bc","creditCard.encryptedPassword.label":"\u5361\u5bc6\u78bc\u7684\u524d 2 \u4f4d\u6578\u5b57","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"\u5bc6\u78bc\u7121\u6548","creditCard.taxNumber.label":"\u6301\u5361\u4eba\u751f\u65e5\uff08\u5e74\u6708\u65e5\uff09\u6216\u516c\u53f8\u8a3b\u518a\u865f\u78bc\uff0810 \u4f4d\u6578\uff09","creditCard.taxNumber.labelAlt":"\u516c\u53f8\u8a3b\u518a\u865f\u78bc\uff0810 \u4f4d\u6578\uff09","creditCard.taxNumber.invalid":"\u6301\u5361\u4eba\u751f\u65e5\u6216\u516c\u53f8\u8a3b\u518a\u865f\u78bc\u7121\u6548","storedPaymentMethod.disable.button":"\u79fb\u9664","storedPaymentMethod.disable.confirmation":"\u79fb\u9664\u5df2\u5132\u5b58\u4ed8\u6b3e\u65b9\u5f0f","storedPaymentMethod.disable.confirmButton":"\u662f\uff0c\u8acb\u79fb\u9664","storedPaymentMethod.disable.cancelButton":"\u53d6\u6d88","ach.bankAccount":"\u9280\u884c\u5e33\u6236","ach.accountHolderNameField.title":"\u5e33\u6236\u6301\u6709\u4eba\u59d3\u540d","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"\u5e33\u6236\u6301\u6709\u4eba\u59d3\u540d\u7121\u6548","ach.accountNumberField.title":"\u5e33\u6236\u865f\u78bc","ach.accountNumberField.invalid":"\u5e33\u6236\u865f\u78bc\u7121\u6548","ach.accountLocationField.title":"ABA \u532f\u6b3e\u8def\u5f91\u7de8\u865f","ach.accountLocationField.invalid":"ABA \u532f\u6b3e\u8def\u5f91\u7de8\u865f\u7121\u6548","select.state":"\u9078\u53d6\u5dde","select.stateOrProvince":"\u9078\u64c7\u5dde\u6216\u7701","select.provinceOrTerritory":"\u9078\u53d6\u7701\u6216\u5730\u5340","select.country":"\u9078\u64c7\u570b\u5bb6\uff0f\u5730\u5340","select.noOptionsFound":"\u627e\u4e0d\u5230\u4efb\u4f55\u9078\u9805","select.filter.placeholder":"\u641c\u5c0b\u2026\u2026","telephoneNumber.invalid":"\u96fb\u8a71\u865f\u78bc\u7121\u6548",qrCodeOrApp:"\u6216","paypal.processingPayment":"\u6b63\u5728\u8655\u7406\u4ed8\u6b3e\u2026\u2026",generateQRCode:"\u7522\u751f QR \u4ee3\u78bc","await.waitForConfirmation":"\u6b63\u5728\u7b49\u5019\u78ba\u8a8d","mbway.confirmPayment":"\u5728 MB WAY \u61c9\u7528\u7a0b\u5f0f\u4e0a\u78ba\u8a8d\u60a8\u7684\u4ed8\u6b3e","shopperEmail.invalid":"\u96fb\u5b50\u90f5\u4ef6\u5730\u5740\u7121\u6548","dateOfBirth.format":"\u65e5\uff0f\u6708\uff0f\u5e74","dateOfBirth.invalid":"\u60a8\u5fc5\u9808\u5e74\u6eff 18 \u6b72","blik.confirmPayment":"\u958b\u555f\u60a8\u7684\u9280\u884c\u61c9\u7528\u7a0b\u5f0f\u4ee5\u78ba\u8a8d\u4ed8\u6b3e\u3002","blik.invalid":"\u8f38\u5165 6 \u500b\u6578\u5b57","blik.code":"6 \u4f4d\u6578\u4ee3\u78bc","blik.help":"\u5f9e\u60a8\u7684\u9280\u884c\u61c9\u7528\u7a0b\u5f0f\u4e2d\u7372\u53d6\u4ee3\u78bc\u3002","swish.pendingMessage":"\u6383\u63cf\u5f8c\uff0c\u8a72\u5f85\u5b8c\u6210\u72c0\u614b\u53ef\u80fd\u6301\u7e8c\u9577\u9054 10 \u5206\u9418\u3002\u8a66\u5716\u5728\u9019\u6bb5\u6642\u9593\u5167\u518d\u6b21\u4ed8\u6b3e\u53ef\u80fd\u6703\u5c0e\u81f4\u591a\u91cd\u6536\u8cbb\u3002","error.va.gen.01":"\u4e0d\u5b8c\u6574\u6b04\u4f4d","error.va.gen.02":"\u6b04\u4f4d\u7121\u6548","error.va.sf-cc-num.01":"\u4fe1\u7528\u5361\u865f\u78bc\u7121\u6548","error.va.sf-cc-num.03":"\u8f38\u5165\u4e86\u4e0d\u652f\u63f4\u7684\u5361","error.va.sf-cc-dat.01":"\u5361\u592a\u820a","error.va.sf-cc-dat.02":"\u672a\u4f86\u65e5\u671f\u8ddd\u4eca\u592a\u4e45","error.va.sf-cc-dat.03":"\u60a8\u7684\u5361\u6703\u65bc\u4ed8\u6b3e\u65e5\u671f\u524d\u5230\u671f","error.giftcard.no-balance":"\u6b64\u79ae\u54c1\u5361\u7684\u9918\u984d\u70ba\u96f6","error.giftcard.card-error":"\u6211\u5011\u7684\u8a18\u9304\u4e2d\u4e26\u6c92\u6709\u9019\u500b\u865f\u78bc\u7684\u79ae\u54c1\u5361","error.giftcard.currency-error":"\u79ae\u54c1\u5361\u53ea\u80fd\u4ee5\u5176\u7c3d\u767c\u6642\u6240\u4f7f\u7528\u7684\u8ca8\u5e63\u9032\u884c\u7d50\u7b97","amazonpay.signout":"\u5f9e Amazon \u767b\u51fa","amazonpay.changePaymentDetails":"\u8b8a\u66f4\u4ed8\u6b3e\u660e\u7d30","partialPayment.warning":"\u9078\u53d6\u5176\u4ed6\u4ed8\u6b3e\u65b9\u5f0f\u4f86\u652f\u4ed8\u9918\u984d","partialPayment.remainingBalance":"\u9918\u984d\u5c07\u70ba %{amount}","bankTransfer.beneficiary":"\u53d7\u6b3e\u4eba","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"\u53c3\u7167","bankTransfer.introduction":"\u7e7c\u7e8c\u5efa\u7acb\u65b0\u7684\u9280\u884c\u8f49\u5e33\u4ed8\u6b3e\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u87a2\u5e55\u4e2d\u7684\u8a73\u7d30\u8cc7\u8a0a\u4f86\u5b8c\u6210\u6b64\u9805\u4ed8\u6b3e\u3002","bankTransfer.instructions":"\u591a\u8b1d\u60e0\u9867\uff0c\u8acb\u4f7f\u7528\u4ee5\u4e0b\u8cc7\u8a0a\u5b8c\u6210\u4ed8\u6b3e\u3002","bacs.accountHolderName":"\u9280\u884c\u5e33\u6236\u6301\u6709\u4eba\u59d3\u540d","bacs.accountHolderName.invalid":"\u9280\u884c\u5e33\u6236\u6301\u6709\u4eba\u59d3\u540d\u7121\u6548","bacs.accountNumber":"\u9280\u884c\u5e33\u6236\u865f\u78bc","bacs.accountNumber.invalid":"\u9280\u884c\u5e33\u6236\u865f\u78bc\u7121\u6548","bacs.bankLocationId":"\u9280\u884c\u4ee3\u78bc","bacs.bankLocationId.invalid":"\u9280\u884c\u4ee3\u78bc\u7121\u6548","bacs.consent.amount":"\u6211\u540c\u610f\u5f9e\u6211\u7684\u9280\u884c\u5e33\u6236\u6263\u9664\u4e0a\u8ff0\u91d1\u984d\u3002","bacs.consent.account":"\u6211\u78ba\u8a8d\u8a72\u5e33\u6236\u4ee5\u6211\u7684\u540d\u7fa9\u958b\u8a2d\uff0c\u4e26\u4e14\u6211\u662f\u6388\u6b0a\u5f9e\u8a72\u5e33\u6236\u76f4\u63a5\u6263\u6b3e\u7684\u552f\u4e00\u7c3d\u7f72\u4eba\u3002",edit:"\u7de8\u8f2f","bacs.confirm":"\u78ba\u8a8d\u4e26\u652f\u4ed8","bacs.result.introduction":"\u4e0b\u8f09\u60a8\u7684\u76f4\u63a5\u6263\u6b3e\u6307\u793a\uff08DDI\uff0f\u6388\u6b0a\uff09","download.pdf":"\u4e0b\u8f09 PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"\u5b89\u5168\u5361\u865f\u7684 IFrame","creditCard.encryptedCardNumber.aria.label":"\u5361\u865f\u6b04\u4f4d","creditCard.encryptedExpiryDate.aria.iframeTitle":"\u5b89\u5168\u5361\u5230\u671f\u65e5\u671f\u7684 IFrame","creditCard.encryptedExpiryDate.aria.label":"\u5230\u671f\u65e5\u671f\u6b04\u4f4d","creditCard.encryptedExpiryMonth.aria.iframeTitle":"\u5b89\u5168\u5361\u5230\u671f\u6708\u4efd\u7684 IFrame","creditCard.encryptedExpiryMonth.aria.label":"\u5230\u671f\u6708\u4efd\u6b04\u4f4d","creditCard.encryptedExpiryYear.aria.iframeTitle":"\u5b89\u5168\u5361\u5230\u671f\u5e74\u4efd\u7684 IFrame","creditCard.encryptedExpiryYear.aria.label":"\u5230\u671f\u5e74\u4efd\u6b04\u4f4d","creditCard.encryptedSecurityCode.aria.iframeTitle":"\u5b89\u5168\u5361\u5b89\u5168\u78bc\u7684 IFrame","creditCard.encryptedSecurityCode.aria.label":"\u5b89\u5168\u78bc\u6b04\u4f4d","giftcard.encryptedCardNumber.aria.iframeTitle":"\u5b89\u5168\u79ae\u54c1\u5361\u865f\u7684 IFrame","giftcard.encryptedCardNumber.aria.label":"\u79ae\u54c1\u5361\u865f\u6b04\u4f4d","giftcard.encryptedSecurityCode.aria.iframeTitle":"\u5b89\u5168\u79ae\u54c1\u5361\u5b89\u5168\u78bc\u7684 IFrame","giftcard.encryptedSecurityCode.aria.label":"\u79ae\u54c1\u5361\u5b89\u5168\u78bc\u6b04\u4f4d",giftcardTransactionLimit:"\u6b64\u79ae\u54c1\u5361\u6bcf\u7b46\u4ea4\u6613\u7684\u91d1\u984d\u4e0a\u9650\u70ba %{amount}","ach.encryptedBankAccountNumber.aria.iframeTitle":"\u5b89\u5168\u9280\u884c\u5e33\u6236\u865f\u78bc\u7684 IFrame","ach.encryptedBankAccountNumber.aria.label":"\u9280\u884c\u5e33\u6236\u6b04\u4f4d","ach.encryptedBankLocationId.aria.iframeTitle":"\u5b89\u5168\u9280\u884c\u532f\u6b3e\u8def\u5f91\u7de8\u865f\u7684 IFrame","ach.encryptedBankLocationId.aria.label":"\u9280\u884c\u532f\u6b3e\u8def\u5f91\u7de8\u865f\u6b04\u4f4d"}});return $v}));;var pc = pc || {};
(function ($) {
    var L = {};

    var isApp = false;

    if (
        typeof pc.device !== 'undefined' &&
        pc.device !== null &&
        typeof pc.device.iosApp !== 'undefined' &&
        pc.device.iosApp !== null &&
        pc.device.iosApp === true
    ) {
        isApp = true;
    }

    pc.Loyalty = pc.Loyalty || {};

    L.isFreeMember = false;

    L.loyaltyUrl = {
        "Account": "/Membership/MyAccount",
        "NewMember": "/Membership/Member",
        "Renewal": "/Membership/RenewMember",
        "Register": "/Membership/Register",
        "SignIn": "/Membership/SignIn",
        "SignOut": "/Membership/SignOut"
    };

    L.order = {};

    L.paymentTypes = {};

    L.showLoad = function () {
        $('[data-loyalty-load]').show();
    };

    function CustomAlert() {
        this.show = function (dialog) {
            var winW = window.innerWidth;
            var winH = window.innerHeight;
            var dialogOverlay = document.getElementById('dialog-overlay');
            var dialogBox = document.getElementById('dialog-box');

            dialogOverlay.style.display = "block";
            dialogOverlay.style.height = winH + "px";
            //dialogBox.style.left = ((winW / 2) - (550 / 2)) + "px";
            //dialogBox.style.top = "50%";
            dialogBox.style.display = "block";

            document.getElementById('dialog-box-body').innerHTML = dialog;

            $('[data-close-custom-box]').off('click').on('click', function (e) {
                e.preventDefault();
                document.getElementById('dialog-box').style.display = "none";
                document.getElementById('dialog-overlay').style.display = "none";
            });

        };
    }

    L.hideLoad = function () {
        $('[data-loyalty-load]').hide();
    };

    L.showError = function (error) {
        var hideForm = false,
            errorMessage = "";

        switch (error) {
            case 'username':
                $("input[name='LoyaltyDetails-Email']").val("");
                $("input[name='LoyaltyDetails-ConfirmEmail']").val("");
                errorMessage = 'Looks like you already have an account with us. Please log in to access your membership.<br/><br/><a href="/membership/SignIn" class="btn-1 loyaltyBtn">Login</a>';
                break;
            case 'password':
                errorMessage = 'Sorry the Password and Confirm Password must match.';
                break;
            case 'cinema':
                errorMessage = 'Please choose a favourite cinema.';
                $('[data-loyalty-list-preferredcinema]').addClass('invalid');
                break;
            case 'payment_1':
            case 'payment_3':
                errorMessage = "We're really sorry, but there's been a problem with your order. Please drop us a line on " + pc.support.phoneNumber + " (national call rate charges apply) or email us on <a href='talk@everymangroup.com'>talk@everymangroup.com</a> so we can confirm whether your order has gone through correctly.";
                hideForm = true;
                break;
            case 'payment_2':
                errorMessage = 'The payment has been declined. Please ensure you have entered the correct details.';
                break;
            case 'payment_4':
                errorMessage = 'Your order has already been submitted for processing. Please check your email for confirmation.';
                hideForm = true;
                break;
            case 'timeout':
                errorMessage = 'Sorry your order has timed out. Please try again.';
                // hide payment iframe
                $('[data-register-iframe]').html('');
                // show details tab
                $('[data-tab-link][href="#details"]').trigger('click');

                if (L.isFreeMember) {
                    pc.Authentication.HasLogin = false;
                }
                break;
            case 'order_status':
                errorMessage = "Thank you. Your payment was successful however there was a slight hick up with your membership being set up. Please give us a call on " + pc.support.phoneNumber + " so we can get you sorted.";
                break;
            default:
                errorMessage = 'Sorry we could not process your account at this time. Please try again later. If you continue to have issues please <a href="/contact-us">contact us</a>.';
                break;
        }

        if (hideForm) {
            $('[data-form-error]').html(errorMessage);
            $('[data-tab-link]').removeClass('active').addClass('disabled');
            $('[data-register-page].active').removeClass('active');
            $('[data-register-iframe]').html('');
            $('[data-register-page="error"]').addClass('active');
        }
        else if ($('[data-reg-error-pop]').length > 0 && error === "default") {
            $('[data-reg-error-pop]').show();
            $('#blackoutPage').show();
        }
        else {
            var errorTop = $('[data-register-page].active [data-loyalty-error], [data-loyalty-edit] [data-loyalty-error]').empty().html('<p>' + errorMessage + '</p>').show().offset().top || 0;

            $('html,body').scrollTop(errorTop - 100);
        }

        L.hideLoad();
    };

    L.hideError = function () {
        $('[data-loyalty-error]').empty().hide();
    };

    L.track = function (tempTrack) {
        if (typeof dataLayer !== 'undefined' && typeof tempTrack !== 'undefined') {
            if (typeof tempTrack.event === 'undefined') {
                tempTrack.event = 'VirtualPageview';
            }

            if (pc.Authentication.HasLogin) {
                tempTrack.visitorStatus = 'loggedin';
                tempTrack.customerType = 'Reward Member';
            }
            else {
                tempTrack.visitorStatus = 'loggedoff';
            }

            dataLayer.push(tempTrack);
        }
    };

    L.setupForm = function () {

        if (typeof L.tempUser !== 'undefined' && (pc.Authentication.HasLogin || (typeof L.RegEmail !== 'undefined' && decodeURIComponent(L.RegEmail).toLowerCase() !== L.tempUser.EmailAddress.toLowerCase()))) {
            L.tempUser = undefined;
        }

        // build DOB year options
        var select = $("select[name='LoyaltyDetails-DOB-Year']");
        var dobDate = new Date();
        var dobDateYear = dobDate.getFullYear();

        dobDate.setFullYear(dobDateYear - 18);

        var year = dobDate.getFullYear();

        for (var i = year, len = year - 115; i >= len; --i) {
            var option = '<option value="' + i + '">' + i + '</option>';
            select.append(option);
        }

        // build gender radio
        $('input[name="LoyaltyDetails-Gender"]').on('click',
            function () {
                $('.radioWrap').removeClass('invalid');
            });

        // get cms cinema list
        $.get('/cinemas').always(function (cmsCinemas) {
            // get preferred cinema list
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + 'api/Data/GetCinemas/?circuitId=' + pc.api.circuit,
                crossDomain: true
            }).always(function (data) {
                if (typeof data !== 'undefined' && data !== null && data.length > 0) {
                    var listItems = [],
                        $list = $('[data-loyalty-list-preferredcinema]'),
                        orderedList = [],
                        selectedCinema = '';

                    var addListItems = function () {
                        for (var o = orderedList.length - 1; o >= 0; o--) {
                            if (typeof orderedList[o] === 'undefined') {
                                orderedList.splice(o, 1);
                            }
                        }

                        listItems.push('<option value="">' + "Choose your Venue" + '</option>');

                        for (var j = 0; j < orderedList.length; j++) {
                            listItems.push('<option value="' + orderedList[j].Id + '">' + orderedList[j].CinemaName + '</option>');
                        }

                        $list.html(listItems.join(''));

                        if ($('select[name="preferredcinema"] option[value="' + selectedCinema + '"]').length === 0) {
                            // reset as can't find saved preferred cinema
                            selectedCinema = '';
                        }

                        // preselect cinema
                        $('select[name="preferredcinema"] option[value="' + selectedCinema + '"]').prop('selected', true).trigger('change');
                    };

                    // loop data and remove cinemas
                    if (typeof pc.excludeCinemas !== 'undefined') {
                        for (var i = data.length - 1; i >= 0; i--) {
                            if (typeof pc.excludeCinemas[data[i].Id] !== 'undefined') {
                                data.splice(i, 1);
                            }
                        }
                    }

                    orderedList = data;

                    // populate cinemas
                    if (pc.Authentication.HasLogin
                        && typeof pc.Loyalty.Member !== 'undefined'
                        && pc.Loyalty.Member !== null) {

                        // member saved data
                        if (typeof pc.Loyalty.Member.MemberDetails.PreferredCinemaList !== 'undefined'
                            && pc.Loyalty.Member.MemberDetails.PreferredCinemaList.length > 0) {
                            selectedCinema = pc.Loyalty.Member.MemberDetails.PreferredCinemaList[0];
                        }
                        else {
                            selectedCinema = pc.Loyalty.Member.MemberDetails.PreferredCinemaId;
                        }

                        addListItems();
                    }
                    else if (typeof L.tempUser !== 'undefined') {
                        selectedCinema = L.tempUser.PreferredCinemaId;

                        addListItems();
                    }
                    else if (typeof docCookies !== 'undefined' && docCookies.getItem('PCC.Location') !== null) {
                        // cookie
                        var cinema = docCookies.getItem('PCC.Location').toLowerCase();

                        if (cinema.indexOf(':') > -1) {
                            cinema = cinema.split(':')[1];
                        }

                        for (var d = 0; d < data.length; d++) {
                            if (data[d].CinemaName.toLowerCase().replace(/ /g, '-') === cinema) {
                                selectedCinema = data[d].Id + '';
                                break;
                            }
                        }

                        addListItems();
                    }                    
                    else {
                        addListItems();
                    }

                    $('[data-form-group="preferredCinema"]').off('change').on('change', function () {

                        var $thisCheck = $('[data-form-group="favouriteCinema"][value="' + this.value + '"]');

                        if (this.checked === false && $thisCheck.length > 0) {
                            $thisCheck.prop('checked', false);
                        }

                        $list.removeClass('invalid');
                        L.hideError();
                    });

                    $('[data-form-group="favouriteCinema"]').off('change').on('change', function () {

                        var $thisCheck = $('[data-form-group="preferredCinema"][value="' + this.value + '"]');

                        if (this.checked === true && $thisCheck.length > 0) {
                            $thisCheck.prop('checked', true);
                        }

                        $list.removeClass('invalid');
                        L.hideError();
                    });
                }
            });
        });
        // get newsletter and genre lists
        var userSessionId;
        if (pc.Authentication.HasLogin) {
            userSessionId = pc.Authentication.UserSessionId;
        }
        else {
            userSessionId = L.order.UserSessionId;
        }

        if (pc.Authentication.HasLogin) {
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + 'api/Member/GetMemberDetailsFull?circuitId=' + pc.api.circuit + '&userSessionId=' + userSessionId,
                crossDomain: true
            }).always(function (data) {
                if (data !== null && typeof data.MemberDetails !== 'undefined' && data.MemberDetails !== null) {
                    // save for later
                    pc.Loyalty.Member = data;

                    L.populateForm(data.MemberDetails);
                }

                L.hideLoad();
            });
        }
        else if (typeof L.tempUser !== 'undefined') {
            L.populateForm(L.tempUser);
        }
        else if (typeof L.RegEmail !== 'undefined') {
            $("input[name='LoyaltyDetails-Username']").val(decodeURIComponent(L.RegEmail));
        }
    };

    L.populateForm = function (data) {

        if (typeof data === 'undefined' || data === null) {
            return;
        }

        // populate fields

        $('[data-loyalty-firstname]').text(data.FirstName);
        $('[data-loyalty-lastname]').text(data.LastName);

        $("input[name='LoyaltyDetails-AddressLine1']").val(data.Address1);
        $("input[name='LoyaltyDetails-AddressLine2']").val(data.Address2);
        $("input[name='LoyaltyDetails-City']").val(data.City);
        $("input[name='LoyaltyDetails-State']").val(data.State);
        $("input[name='LoyaltyDetails-Zip']").val(data.ZipCode);
        $("input[name='LoyaltyDetails-Email']").val(data.EmailAddress);
        $("input[name='LoyaltyDetails-Phone']").val(data.PhoneNumber);
        $("input[name='LoyaltyDetails-MobilePhone']").val(data.MobileNumber);
        $("input[name='LoyaltyDetails-Username']").val(data.UserName);

        if (data.SendNewsletter === true) {
            $("input[name='LoyaltyDetails-SendNewsletter']").prop('checked', true);
        }

        if (data.ContactByThirdParty === true) {
            $("input[name='LoyaltyDetails-SendEventsInfo']").prop('checked', true);
        }

        // populate DOB
        if (typeof data.DateOfBirth !== 'undefined' && data.DateOfBirth !== null) {
            var dobSplit = data.DateOfBirth.split("-");
            var dobYear = dobSplit[0];
            var dobMonth = dobSplit[1].substring(0, 2);
            var dobDay = dobSplit[2].substring(0, 2);

            $('select[name="LoyaltyDetails-DOB-Day"] option[value="' + dobDay + '"]').prop('selected', true).trigger('change');
            $('select[name="LoyaltyDetails-DOB-Month"] option[value="' + dobMonth + '"]').prop('selected', true).trigger('change');
            $('select[name="LoyaltyDetails-DOB-Year"] option[value="' + dobYear + '"]').prop('selected', true).trigger('change');
        }

        // populate genres
        var prefGenres = data.PreferredGenres || [];
        for (var i = 0, len = prefGenres.length; i < len; i += 1) {
            $('input[data-form-group="genreList"][value="' + prefGenres[i] + '"]').prop('checked', true);
        }

        // gender
        $('input[name="LoyaltyDetails-Gender"][value="' + data.Gender + '"]').prop('checked', true);

        // selected cinema updated within L.setupForm()
    };

    L.getFormData = function (userSessionId) {
        var data;

        var formData = {
            UserName: $('input[name="LoyaltyDetails-Username"]').val(),
            EmailAddress: $('input[name="LoyaltyDetails-Email"]').val(),
            Email: $('input[name="LoyaltyDetails-Email"]').val(),
            Password: $('input[name="LoyaltyDetails-Password"]').val(),
            Address1: $('input[name="LoyaltyDetails-AddressLine1"]').val(),
            Address2: $('input[name="LoyaltyDetails-AddressLine2"]').val(),
            City: $('input[name="LoyaltyDetails-City"]').val(), // address line 3
            State: $('input[name="LoyaltyDetails-State"]').val(), // address line 4
            ZipCode: $('input[name="LoyaltyDetails-Zip"]').val(), // postcode
            PhoneNumber: $('input[name="LoyaltyDetails-Phone"]').val(),
            MobileNumber: $('input[name="LoyaltyDetails-MobilePhone"]').val()
        };

        // name
        if (pc.Authentication.HasLogin === false) {
            formData.FirstName = $('input[name="LoyaltyDetails-FirstName"]').val();
            formData.Firstname = $('input[name="LoyaltyDetails-FirstName"]').val();
            formData.LastName = $('input[name="LoyaltyDetails-LastName"]').val();
            formData.Lastname = $('input[name="LoyaltyDetails-LastName"]').val();
        }

        // club id
        if (
            pc.Authentication.HasLogin &&
            typeof pc.Loyalty.Member !== 'undefined' &&
            pc.Loyalty.Member !== null &&
            typeof pc.Loyalty.Member.MemberDetails !== 'undefined' &&
            pc.Loyalty.Member.MemberDetails !== null &&
            typeof pc.Loyalty.Member.MemberDetails.ClubId !== 'undefined' &&
            pc.Loyalty.Member.MemberDetails.ClubId !== null
        ) {
            formData.ClubId = pc.Loyalty.Member.MemberDetails.ClubId;
        }
        else if (
            typeof pc.api.loyaltyClubId !== 'undefined' &&
            pc.api.loyaltyClubId !== null
        ) {
            formData.ClubId = pc.api.loyaltyClubId;
        }

        // newsletter
        if ($('input[name="LoyaltyDetails-SendNewsletter"]').length > 0) {
            formData.SendNewsletter = $('input[name="LoyaltyDetails-SendNewsletter"]').prop('checked');
        }

        // contact by third party
        if ($('input[name="LoyaltyDetails-SendEventsInfo"]').length > 0) {
            formData.ContactByThirdParty = $('input[name="LoyaltyDetails-SendEventsInfo"]').prop('checked');
        }

        // preferred cinema selector
        if ($('[data-loyalty-list-preferredcinema]').length > 0) {
            var $preferredcinemaId = $('[data-loyalty-list-preferredcinema]').val();

            if ($preferredcinemaId !== '') {
                formData.PreferredCinemaId = $preferredcinemaId;
                formData.PickupCinemaId = $preferredcinemaId;
                if (typeof L.order.product !== 'undefined') {
                    L.order.product.venueid = $preferredcinemaId;
                }
            }
        }

        // preferred cinema multiple
        if ($('[data-form-group="preferredCinema"]').length > 0) {
            var $preferredCinemaList = $('[data-form-group="preferredCinema"]:checked');

            formData.PreferredCinemaList = [];

            if ($preferredCinemaList.length > 0) {
                $preferredCinemaList.each(function (idx, obj) {
                    formData.PreferredCinemaList.push(obj.value);
                });
            }
        }

        // date of birth
        if ($('select[name="LoyaltyDetails-DOB-Year"]').length > 0) {
            formData.DateOfBirth = $('select[name="LoyaltyDetails-DOB-Year"]').val() + '-' + $('select[name="LoyaltyDetails-DOB-Month"]').val() + '-' + $('select[name="LoyaltyDetails-DOB-Day"]').val() + 'T00:00:00';
        }

        // gender
        if ($('[data-form-group="memberGender"]').length > 0) {
            if ($('input[name="LoyaltyDetails-Gender"]:checked').length > 0) {
                formData.Gender = $('input[name="LoyaltyDetails-Gender"]:checked').val();
            }
            else {
                $('[data-form-group="memberGender"] .radioWrap').addClass('invalid');
                return null;
            }
        }

        if (
            typeof pc.Loyalty.Member !== 'undefined' &&
            pc.Loyalty.Member !== null &&
            pc.Loyalty.Member.MemberDetails !== 'undefined' &&
            pc.Loyalty.Member.MemberDetails !== null
        ) {
            data = $.extend({}, pc.Loyalty.Member.MemberDetails, formData);
        }
        else {
            data = formData;
        }

        data.UserSessionId = userSessionId;

        if (typeof data.UserName === 'undefined') {
            data.UserName = data.EmailAddress;
        }

        return data;
    };

    L.clearFormData = function () {
        // clear fields
        $("input[name='LoyaltyDetails-FirstName']").val('');
        $("input[name='LoyaltyDetails-LastName']").val('');
        $("input[name='LoyaltyDetails-AddressLine1']").val('');
        $("input[name='LoyaltyDetails-AddressLine2']").val('');
        $("input[name='LoyaltyDetails-City']").val('');
        $("input[name='LoyaltyDetails-State']").val('');
        $("input[name='LoyaltyDetails-Zip']").val('');
        $("input[name='LoyaltyDetails-Phone']").val('');
        $("input[name='LoyaltyDetails-MobilePhone']").val('');
        $("input[name='LoyaltyDetails-Username']").val('');

        $('[name="LoyaltyDetails-Password"]').val('');
        $('[name="LoyaltyDetails-Password-Repeat"]').val('');

        $("input[name='LoyaltyDetails-SendNewsletter']").prop('checked', false);
        $("input[name='LoyaltyDetails-SendEventsInfo']").prop('checked', false);

        $('[name="LoyaltyDetails-NoRenewal"]').prop('checked', false);

        // dob
        $('select[name="LoyaltyDetails-DOB-Day"] option:first').prop('selected', true).trigger('change');
        $('select[name="LoyaltyDetails-DOB-Month"] option:first').prop('selected', true).trigger('change');
        $('select[name="LoyaltyDetails-DOB-Year"] option:first').prop('selected', true).trigger('change');

        // genres
        $('input[data-form-group="genreList"]').each(function () {
            $(this).prop('checked', false);
        });

        // gender
        $('input[name="LoyaltyDetails-Gender"]').each(function () {
            $(this).prop('checked', false);
        });
    };

    pc.Loyalty.UserNameReminder = function () {
        var userEmail = $('#LoyaltyDetails-Email').val();
        $.ajax({
            url: pc.api.members + 'api/Member/UsernameReminder?circuitId=' + pc.api.circuit + '&emailAddress=' + userEmail,
            headers: {
                'ApplicationOrigin': pc.api.applicationOrigin
            }
        })
            .done(function (data) {
                var result = data.Result;
                if (result === 0) {
                    $('[data-form="user-Name-Reminder"]').hide();
                    $('[data-passReset-success]').show();
                }
                else if (result === 2) {
                    $('[data-passReset-not-recognised]').show();
                }
                else {
                    $('[data-passReset-servererror]').show();
                }
            })
            .fail(function () {
                $('[data-passReset-servererror]').show();
            });
    };

    L.HasLocalStorage = function () {
        var test = 'test';

        try {
            localStorage.setItem(test, test);
            localStorage.removeItem(test);
            return true;
        }
        catch (e) {
            return false;
        }
    };

    L.monetise = function (cost) {
        var costFormatted = cost / 100;

        if (cost % 1 !== 0) {
            costFormatted = costFormatted.toFixed(2);
        }

        return costFormatted;
    };

    L.setupTimeout = function (response) {
        if (typeof response === 'undefined' || typeof response.SecondsToExpiration === 'undefined') {
            // no response or expiration
            // exit
            return;
        }

        var expiration = response.SecondsToExpiration,
            expDateTime,
            hidden;

        function expireOrder() {
            // session expired
            //expiration = -1;
            //L.showError('timeout');

            // reset expiration
            expiration = response.SecondsToExpiration;
            startInterval();

            // because harlands don't time out call KeepAlive
            $.ajax({
                url: pc.api.members + 'api/member/KeepAlive/' + response.OrderId + '?circuitId=' + pc.api.circuit,
                type: 'POST',
                crossDomain: true
            });
        }

        function visibilityChange(evt) {
            // page visibility change
            var isVisible = false,
                evtType = {
                    focus: true,
                    pageshow: true
                };

            evt = evt || window.event;

            if (typeof evtType[evt.type] !== 'undefined') {
                isVisible = evtType[evt.type];
            }
            else {
                isVisible = !document[hidden];
            }
            if (isVisible && typeof expDateTime !== 'undefined' && expiration > 0) {
                var curDateTime = new Date();
                if (curDateTime >= expDateTime) {
                    expireOrder();
                }
                else {
                    expiration = Math.ceil((expDateTime - curDateTime) / 1000);
                }
            }
        }
        function startInterval() {
            expDateTime = new Date();
            expDateTime.setSeconds(expDateTime.getSeconds() + expiration);
            pc.intervalId = setInterval(function () {
                expiration = expiration - 1;
                if (expiration <= 0) {
                    clearInterval(pc.intervalId);
                    pc.intervalId = undefined;
                    expireOrder();
                }
            }, 1000);
        }

        if (typeof document.hidden !== 'undefined') {
            hidden = 'hidden';
            document.addEventListener('visibilitychange', visibilityChange);
        }
        else if (typeof document.msHidden !== 'undefined') {
            hidden = 'msHidden';
            document.addEventListener('msvisibilitychange', visibilityChange);
        }
        else if (typeof document.webkitHidden !== 'undefined') {
            hidden = 'webkitHidden';
            document.addEventListener('webkitvisibilitychange', visibilityChange);
        }
        else if (typeof document.mozHidden !== 'undefined') {
            hidden = 'mozHidden';
            document.addEventListener('mozvisibilitychange', visibilityChange);
        }
        else if ('onfocusin' in document) {
            document.onfocusin = visibilityChange;
        }
        else {
            window.onpageshow = window.onfocus = visibilityChange;
        }

        if (typeof pc.intervalId !== 'undefined') {
            clearInterval(pc.intervalId);
        }

        startInterval();
    };

    // login buttons
    (function () {

        var $loginBtn = $('[data-login-nav-btn]');

        if ($loginBtn.length === 0) {
            return;
        }

        $loginBtn.on('click', function (e) {
            e.preventDefault();
            e.stopPropagation();

            var $btn = $(this);

            if ($btn.hasClass('active') === true) {
                $btn.removeClass('active');
                $loginModal.removeClass('active');
            }
            else {
                $btn.addClass('active');
                $loginModal.addClass('active');
            }
        });

        var $loginModal = $('[data-login-modal]');
        $(document).on('click.memberLoginOuter', function (e) {
            // hide if clicking elsewhere on page
            if ($loginModal.hasClass('active') === true && $loginModal.is(e.target) === false && $loginModal.has(e.target).length === 0) {
                $loginBtn.filter('.active').trigger('click');
                if (L.HasLocalStorage()) {
                    sessionStorage.removeItem('session_member');
                }
            }
        });
    })();

    // signin
    (function () {

        pc.Loyalty.SubmitLogin = function () {
            if (L.HasLocalStorage() === false) {
                alert('Please disable Private Browsing mode to sign in.');
            }
            else {
                L.showLoad();

                if (isApp) {
                    $('[data-app-loyalty-form-error]').hide().text('');
                }

                var username,
                    password;

                if ($('[data-member-login-modal]').length !== 0) {
                    username = $('[data-member-login-modal] [name="loyalty-username"]').val();
                    password = $('[data-member-login-modal] [name="loyalty-password"]').val();
                }
                else if ($('[data-loyalty-signin]').length === 0) {
                    username = $('[data-login-modal] [name="loyalty-username"]').val();
                    password = $('[data-login-modal] [name="loyalty-password"]').val();
                }
                else {
                    username = $('[data-loyalty-signin] [name="loyalty-username"]').val();
                    password = $('[data-loyalty-signin] [name="loyalty-password"]').val();
                }

                $.ajax({
                    type: 'POST',
                    url: '/membership/CompleteSignIn',
                    dataType: 'json',
                    contentType: 'application/json',
                    data: JSON.stringify({
                        Username: username,
                        Password: password
                    })
                }).always(function (data) {
                    if (typeof data !== 'undefined' && data !== null) {
                        if (data.PeachCode === 0) {

                            var firstname = "";
                            var memberid = "";

                            if (
                                typeof data.MemberDetails !== 'undefined' &&
                                data.MemberDetails !== null
                            ) {
                                firstname = data.MemberDetails.FirstName;
                                memberid = data.MemberDetails.MemberId;
                            }

                            if (
                                typeof evm !== 'undefined' &&
                                evm !== null &&
                                typeof evm.membership !== 'undefined' &&
                                evm.membership !== null &&
                                typeof evm.membership.handleCredentials !== 'undefined' &&
                                evm.membership.handleCredentials !== null
                            ) {
                                evm.membership.handleCredentials(username, password, firstname, memberid);
                            }

                            var sessionMember = null;

                            if (L.HasLocalStorage()) {
                                sessionMember = sessionStorage.getItem('session_member');
                                sessionStorage.removeItem('session_member');
                            }

                            if (sessionMember !== null && sessionMember.indexOf(location.origin) === 0) {
                                window.location = sessionMember;
                            }
                            else {
                                window.location = L.loyaltyUrl.Account;
                            }
                            return;
                        }

                        var isExpired = false;

                        if (data.Result === 4 && data.ResultMessage === "Member account lapsed") {
                            isExpired = true;
                        }

                        if (typeof data.MemberDetails !== 'undefined' &&
                            data.MemberDetails !== null &&
                            typeof data.MemberDetails.MemberLevelId !== 'undefined' &&
                            data.MemberDetails.MemberLevelId !== null &&
                            data.MemberDetails.MemberLevelId.toString() === pc.ml.e) {

                            isExpired = true;
                        }

                        if (isExpired) {
                            if (isApp) {
                                $('[data-app-loyalty-form-error]').text('Sorry your membership has now expired, to continue enjoying the great Everyman membership benefits, please purchase a new membership.').show();
                            }
                            else {
                                $('[data-lapsed-pop], #blackoutPage').show();
                            }
                            L.hideLoad();
                            return;
                        }
                    }

                    if (isApp) {
                        $('[data-app-loyalty-form-error]').text('Incorrect Username and/or Password').show();
                    }
                    else {
                        var Alert = new CustomAlert();
                        Alert.show('Please make sure your username and password are correct.');
                    }

                    L.hideLoad();
                });
            }
        };

        if ($('[data-loyalty-signin]').length === 0) {
            return;
        }

        L.hideLoad();

        $('[data-loyalty-signin-renew]').on('click', function (e) {
            $('[name="logintype"]').val('renew');
        });

        $('[data-close-lapsed-pop]').on('click', function (e) {
            e.preventDefault();
            $('[data-lapsed-pop],[data-loyalty-load],#blackoutPage').hide();
            return false;
        });

        L.track({
            'virtualPageURL': '/membership/signin',
            'virtualPageTitle': 'Loyalty Sign In'
        });
    })();

    // signout
    (function () {

        if ($('[data-loyalty-signout]').length === 0) {
            return;
        }

        L.track({
            'virtualPageURL': '/membership/signout',
            'virtualPageTitle': 'Loyalty Sign Out'
        });
    })();

    // new member landing page
    (function () {
        if ($('[data-loyalty-newmember]').length === 0) {
            return;
        }

        var $memberItems = $('[data-member-items]'),
            $memberGroup = $('[data-member-group]');

        L.showLoad();

        $memberItems.on('click.infoshow', '[data-member-item-info-show]', function (e) {
            e.preventDefault();
            var $btn = $(this),
                $parent = $btn.closest('[data-member-item]'),
                $info = $parent.find('[data-member-item-info]');

            $info.slideDown(400, function () {
                $(this).removeClass('dn').addClass('active').css('display', '');
                $memberGroup.addClass('active');
            });

        });

        $memberItems.on('click.infohide', '[data-member-item-info-hide]', function (e) {
            e.preventDefault();

            var $btn = $(this),
                $parent = $btn.closest('[data-member-item]'),
                $info = $parent.find('[data-member-item-info]');

            $info.slideUp(400, function () {
                $(this).removeClass('active').addClass('dn').css('display', '');
            });

        });

        $memberGroup.on('click.infoshow', '[data-member-group-info-show]', function (e) {
            e.preventDefault();

            var $btn = $(this),
                $info = $memberGroup.find('[data-member-item-info]');


            $info.slideDown(400, function () {
                $(this).removeClass('dn').addClass('active').css('display', '');
                $memberGroup.addClass('active');
            });
        });

        $memberGroup.on('click.infohide', '[data-member-group-info-hide]', function (e) {
            e.preventDefault();

            var $btn = $(this),
                $info = $memberGroup.find('[data-member-item-info]');


            $info.slideUp(400, function () {
                $(this).removeClass('active').addClass('dn').css('display', '');
                $memberGroup.removeClass('active');
            });
        });

        var $loginBtn = $('[data-member-login]'),
            $loginModal = $('[data-member-login-modal]');

        $loginBtn.on('click', function (e) {
            e.preventDefault();
            e.stopPropagation();

            var $btn = $(this);

            if ($btn.hasClass('active') === true) {
                $btn.removeClass('active');
                $loginModal.removeClass('active');
            }
            else {
                if (document.documentElement.clientWidth < 768) {
                    $('html,body').animate({
                        scrollTop: 0
                    }, 500, function () {
                        $btn.addClass('active');
                        $loginModal.fadeIn(500, function () {
                            $loginModal.addClass('active').css('display', '');
                        });
                    });
                }
                else {
                    $btn.addClass('active');
                    $loginModal.addClass('active');
                }
            }
        });

        $(document).on('click.memberLogin', function (e) {
            // hide quick buy if clicking elsewhere on page
            if ($loginModal.hasClass('active') === true && $loginModal.is(e.target) === false && $loginModal.has(e.target).length === 0) {
                $loginBtn.filter('.active').trigger('click');
            }
        });

        // get concessions
        $.ajax({
            type: "GET",
            headers: {
                'ApplicationOrigin': pc.api.applicationOrigin
            },
            contentType: 'application/json',
            dataType: 'json',
            url: pc.api.members + 'api/Member/GetMembershipPrograms?circuitId=' + pc.api.circuit,
            crossDomain: true
        }).always(function (data) {
            //console.log(data);

            // check we have concessions
            if (typeof data !== 'undefined'
                && data !== null
                && typeof data.ListConcessionGrouping !== 'undefined'
                && data.ListConcessionGrouping !== null
                && data.ListConcessionGrouping.length > 0) {

                var template = $('#templateMemberItem').html(),
                    templateFree = $('#templateMemberItemFree').html();

                pc.Loyalty.products = {};

                // loop concessions
                for (var g = 0; g < data.ListConcessionGrouping.length; g++) {
                    var group = data.ListConcessionGrouping[g];

                    // check for items
                    if (typeof group.Items !== 'undefined'
                        && group.Items !== null
                        && group.Items.length > 0) {
                        // loop items
                        for (var c = 0; c < group.Items.length; c++) {
                            var groupItem = group.Items[c],
                                $item = $('[data-member-item="' + groupItem.Description + '"]'),
                                showMonthly = false,
                                itemTemplate = template;

                            // check item exists
                            if ($item.length > 0) {
                                var itemData = {
                                    Id: groupItem.Id,
                                    Title: group.Title,
                                    SubTitle: '',
                                    Copy: groupItem.ExtendedDescriptionAlt,
                                    Image: groupItem.Image,
                                    Price: '',
                                    Description: groupItem.ExtendedDescription
                                };

                                var tempPrice;

                                if (groupItem.AltExtendedDescription.indexOf(' * ') > -1) {
                                    var tempSplit = groupItem.AltExtendedDescription.split(' * ');

                                    tempPrice = tempSplit[0];

                                    itemData.SubTitle = tempSplit[1];
                                }
                                else {
                                    tempPrice = groupItem.AltExtendedDescription;
                                }

                                if (tempPrice.indexOf(' or ') > -1) {
                                    var tempPriceSplit = tempPrice.split(' or ');

                                    itemData.Price = tempPriceSplit[0] + ' or<br>' + tempPriceSplit[1];
                                }
                                else {
                                    itemData.Price = tempPrice;
                                }

                                if (typeof groupItem.Cost === 'undefined' || groupItem.Cost === null || groupItem.Cost === 0) {
                                    itemTemplate = templateFree;
                                    itemData.SubTitle = groupItem.ExtendedDescription;
                                }

                                if (itemData.Description.indexOf('<li>') === 0) {
                                    itemData.Description = '<ul>' + itemData.Description + '</ul>';
                                }

                                $item.html(Mustache.render(itemTemplate, itemData));

                                groupItem.parentTitle = group.Title;

                                pc.Loyalty.products[groupItem.Id] = groupItem;
                            }
                        }
                    }
                }

                $('[data-member-buy]').on('click', function (e) {
                    e.preventDefault();

                    if (typeof pc.memberholding !== 'undefined' && pc.memberholding !== null && pc.memberholding !== '') {
                        window.location.href = pc.memberholding;
                        return;
                    }

                    var $btn = $(this),
                        productId = $btn.attr('data-member-buy') || '';

                    if (typeof docCookies !== 'undefined' && productId !== '' && typeof pc.Loyalty.products[productId] !== 'undefined') {

                        // goal tracking
                        L.track({
                            'virtualPageURL': '/membership/member/' + pc.Loyalty.products[productId].parentTitle.toLowerCase().replace(/ /g, ''),
                            'virtualPageTitle': pc.Loyalty.products[productId].parentTitle.toLowerCase()
                        });

                        docCookies.setItem('everyman_loyalty_order', JSON.stringify(pc.Loyalty.products[productId]), null, '/');
                        window.location = L.loyaltyUrl.Register;
                    }
                });

                $memberItems.removeClass('dn');
                $('[data-loyalty-newmember]').removeClass('dn');

                (function () {
                    // update height of copy items
                    var $copyItems = $memberItems.find('.memberItemCopy').not('.memberItem-free .memberItemCopy');

                    function updateCopyHeight() {
                        var tempMemberItemCopyHeight = 0;

                        if (document.documentElement.clientWidth > 767) {
                            $copyItems.css('min-height', '').each(function () {
                                var itemHeight = $(this).height();

                                if (itemHeight > tempMemberItemCopyHeight) {
                                    tempMemberItemCopyHeight = itemHeight;
                                }

                            });
                        }

                        $copyItems.css('min-height', tempMemberItemCopyHeight);
                    }

                    updateCopyHeight();

                    $(window).on('resize.copyHeight', updateCopyHeight);
                })();

                L.hideLoad();
            }
            else {
                $('[data-member-error]').removeClass('dn');
                $('[data-loyalty-newmember]').removeClass('dn');

                L.hideLoad();
            }
        });
    })();

    // register
    (function () {
        var $registerStep = $('[data-current-register-step]');

        if ($registerStep.length === 0) {
            return;
        }

        var curStep = $registerStep.attr('data-current-register-step'),
            steps = {};

        function changeStep(step) {
            if (step === "#signup") {
                $('[data-loyalty-create-password]').addClass('dn');
                $('[data-loyalty-signup-email]').show();

                // log user out
                $.get(L.loyaltyUrl.SignOut);

                // reset user data
                pc.Authentication = {
                    HasLogin: false
                };

                pc.Loyalty.Member = null;

                $('[data-modal-member-loggedin-name]').hide();
                $('[data-modal-member-loggedout-name]').show();

                L.clearFormData();
            }

            if (step === '#details' && L.isFreeMember) {
                pc.Authentication = {
                    HasLogin: false
                };

                pc.Loyalty.Member = null;
            }

            if (step === '#payment') {
                $('body').addClass('loyaltyHideNav');
            }
            else {
                $('body').removeClass('loyaltyHideNav');
            }

            $('[data-tab-link].active').removeClass('active');
            $('[data-tab-link][href="' + step + '"]').removeClass('disabled').addClass('active').nextAll().not('.disabled').addClass('disabled');

            $('[data-tab-item].active').removeClass('active');
            $('[data-tab-item="' + step + '"]').addClass('active');

            if (typeof steps[step] !== 'undefined') {
                steps[step]();
            }

            $('html,body').animate({
                scrollTop: 0
            }, 500);
        }

        pc.Loyalty.addPassword = function () {
            // save for later
            pc.Loyalty.RegPassword = $('[name="LoyaltyDetails-PasswordFree"]').val();
            // show register page
            changeStep('#details');
        };

        pc.Loyalty.SubmitLoginRegister = function () {
            L.showLoad();

            $.ajax({
                type: 'POST',
                url: '/membership/CompleteSignIn',
                dataType: 'json',
                contentType: 'application/json',
                data: JSON.stringify({
                    Username: $('[name="loyalty-register-username"]').val(),
                    Password: $('[name="loyalty-register-password"]').val()
                })
            }).always(function (data) {
                //console.log(data);

                if (typeof data !== 'undefined' && data !== null && data.StatusCode === 200) {
                    // check email address matches original one entered
                    if (encodeURIComponent(data.MemberDetails.EmailAddress) === L.RegEmail) {
                        // email matches

                        window.location.reload();
                    }
                    else {
                        // email doesn't match
                        alert('Emails do not match, please use the login details for ' + decodeURIComponent(L.RegEmail));
                        L.hideLoad();

                        // log user out
                        $.get(L.loyaltyUrl.SignOut);
                    }
                }
                else {
                    var Alert = new CustomAlert();
                    Alert.show('Please make sure your username and password are correct.');
                    L.hideLoad();
                }
            });
        };

        pc.Loyalty.testEmail = function () {
            L.showLoad();

            L.isFreeMember = undefined;
            L.isUpgrade = undefined;

            var email = $('[name="LoyaltyDetails-Email"]').val(),
                emailEncoded = encodeURIComponent(email);

            // save email for later
            L.RegEmail = emailEncoded;
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + 'api/member/GetMemberLevel?circuitId=' + pc.api.circuit + '&emailAddress=' + emailEncoded,
                crossDomain: true
            }).always(function (data) {
                if (typeof pc.ml !== 'undefined'
                    && typeof data !== 'undefined'
                    && data.StatusCode === 200
                    && typeof data.MemberLevel !== 'undefined'
                    && data.MemberLevel !== null
                    && data.MemberLevel !== -1) {

                    // member details returned
                    // MemberLevel is "Free" (Everybody) (11) or "Expired Paid Member" (9)
                    if (data.MemberLevel.toString() === pc.ml.f || data.MemberLevel.toString() === pc.ml.e) {
                        // free member
                        L.isFreeMember = true;

                        L.isUpgrade = true;

                        // show confirm password field
                        $('[data-new-members-passwords]').removeClass('dn');
                        // go to register step
                        changeStep('#details');
                    }
                    // MemberLevel is not Gold (5).
                    // e.g. EveryIcon, Everywhere...
                    else if (data.MemberLevel.toString() !== pc.ml.g) {
                        if (pc.Authentication.HasLogin && pc.Authentication.EmailAddress === email) {

                            //Error value returns -1, otherwise returns number of days until expiry.
                            var daysUntilExpiry = getDaysUntilMembershipExpiry(data.ExpiryDate);

                            //If the user is not set to auto-renew & it is less than 30 days until their expiry date...
                            //OR if the user is either Standard/Corporate/MemberLevel 2
                            //OR if the user is an Everybody member which is the free tier.
                            if ((data.AutoRenew === false && (typeof daysUntilExpiry !== 'undefined' && daysUntilExpiry >= 0 && daysUntilExpiry <= 30))
                                || data.MemberLevel.toString() === pc.ml.s
                                || data.MemberLevel.toString() === pc.ml.eb) {
                                // logged in
                                // hide confirm password field
                                $('[data-new-members-passwords]').addClass('dn');
                                // save usersessionid
                                L.order.UserSessionId = pc.Authentication.UserSessionId;

                                L.isUpgrade = true;

                                // go to register step
                                changeStep('#details');
                            }
                            else {
                                // show contact message
                                $('[data-register-message="contact"]').show();
                                $('[data-tab-item="#signup"]').addClass('active');
                                L.hideLoad();
                            }
                        }
                        else {
                            // display login popup
                            var $popup = $('[data-register-message="login"]');

                            $popup.find('[data-register-message-email]').html(email);
                            $popup.show();
                            L.hideLoad();
                        }
                    }
                    else {
                        // show contact message
                        $('[data-register-message="contact"]').show();
                        L.hideLoad();
                    }
                }
                else {
                    // email not recognised

                    // show confirm password field
                    $('[data-new-members-passwords]').removeClass('dn');
                    // go to register step
                    changeStep('#details');
                }
            });

            var getDaysUntilMembershipExpiry = function (expiryDate) {

                //If the expiry date passed in has not been provided properly.
                if (typeof expiryDate === 'undefined' || expiryDate === '')
                    return -1;

                var todayDateData = $('[data-date-today]').attr('data-date-today') || '';

                //If data for the current date cannot be resolved.
                if (todayDateData === '')
                    return -1;

                var todayDate = new Date(todayDateData);
                var expDate = new Date(expiryDate);

                return Math.round(Math.abs((todayDate.getTime() - expDate.getTime()) / (24 * 60 * 60 * 1000)));
            };
        };

        pc.Loyalty.SubmitCreate = function () {
            L.showLoad();

            var formData = L.getFormData(L.order.UserSessionId);

            if (typeof formData !== 'undefined' && formData !== null) {

                var addConcession = function () {
                    //console.log('add concession');

                    var doNotRenew = false;

                    if ($('[data-member-renewal]').hasClass('dn') === false) {
                        doNotRenew = $('[name="LoyaltyDetails-NoRenewal"]')[0].checked;
                    }

                    var ConcessionRequest = {
                        "UserSessionId": L.order.MemberDetails.UserSessionId,
                        "CinemaId": pc.api.giftStoreId,
                        "Username": L.order.MemberDetails.Username,
                        "Concessions": [],
                        "SessionId": "0",
                        "IsGiftStoreOrder": false,
                        "IsUserSessionIdSticky": true,
                        "EmailAddress": L.order.MemberDetails.Email,
                        "Mobile": L.order.MemberDetails.MobileNumber,
                        "Name": L.order.MemberDetails.Firstname + " " + L.order.MemberDetails.Lastname,
                        "CircuitId": pc.api.circuit,
                        "IsNotByVenue": true,
                        "PreferredLoyaltyCinemaId": L.order.product.venueid // preferred cinema VISTA id
                    };

                    if (typeof L.order.orderId !== 'undefined') {
                        ConcessionRequest.OrderId = L.order.orderId;
                    }

                    if (typeof L.order.product.invenue !== 'undefined' && L.order.product.invenue === true) {
                        ConcessionRequest.IsNotByVenue = false;
                    }

                    if (typeof L.isUpgrade !== 'undefined') {
                        ConcessionRequest.ParentTitle = L.order.product.parentTitle;
                    }

                    L.order.product.Quantity = 1;
                    L.order.product.IsLoyaltyMembershipActivation = !pc.Authentication.HasLogin;
                    L.order.product.OrderDelivery = {
                        "IsGift": false,
                        "IsGiftWrapped": false,
                        "DeliveryAddress": {
                            "Name": L.order.MemberDetails.Firstname + ' ' + L.order.MemberDetails.Lastname,
                            "Email": L.order.MemberDetails.Email
                        },
                        "BillingAddress": {
                            "Name": L.order.MemberDetails.Firstname + ' ' + L.order.MemberDetails.Lastname,
                            "Email": L.order.MemberDetails.Email,
                            "Address1": L.order.MemberDetails.Address1,
                            "Town": L.order.MemberDetails.City,
                            "Country": null,
                            "Postcode": L.order.MemberDetails.ZipCode
                        }
                    };

                    ConcessionRequest.Concessions.push(L.order.product);

                    ConcessionRequest.MemberConcessionRequestDetails = {
                        PaymentType: L.order.paymentType,
                        AutoRenew: !doNotRenew
                    };

                    $.ajax({
                        type: "POST",
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        contentType: 'application/json',
                        dataType: 'json',
                        url: pc.api.members + 'api/Member/AddConcession/' + pc.api.giftStoreId + '?circuitId=' + pc.api.circuit,
                        data: JSON.stringify(ConcessionRequest),
                        crossDomain: true
                    }).always(function (response) {
                        if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {

                            L.order.product.ExternalOrderId = response.ExternalOrderId;

                            L.order.product.isgiftcard = L.order.paymentType === 'GiftCard' ? true : false;

                            docCookies.setItem('everyman_loyalty_order', JSON.stringify(L.order.product), null, '/');

                            L.order.orderId = response.OrderId;

                            if (L.order.paymentType === 'GiftCard') {
                                completeWithDeal(response);
                            }
                            else {
                                getPaymentProvider(response);
                            }

                            L.setupTimeout(response);
                        }
                        else {
                            L.showError('default');
                        }
                    });
                };

                var completeWithDeal = function (data) {
                    if (typeof data !== 'undefined') {
                        $.ajax({
                            type: "POST",
                            headers: {
                                'ApplicationOrigin': pc.api.applicationOrigin
                            },
                            contentType: 'application/json',
                            dataType: 'json',
                            url: '/api/Membersignup/CompleteWithDeal?circuitId=' + pc.api.circuit,
                            data: JSON.stringify({
                                "OrderId": data.OrderId,
                                "UserSessionId": L.order.MemberDetails.UserSessionId,
                                "CustomerDetails": {
                                    "Name": L.order.MemberDetails.Firstname + ' ' + L.order.MemberDetails.Lastname,
                                    "FirstName": L.order.MemberDetails.Firstname,
                                    "LastName": L.order.MemberDetails.Lastname,
                                    "Email": L.order.MemberDetails.Email,
                                    "PhoneNumber": L.order.MemberDetails.MobileNumber,
                                    "ZipCode": L.order.MemberDetails.ZipCode,
                                    "DateOfBirth": L.order.MemberDetails.DateOfBirth,
                                    "Gender": L.order.MemberDetails.Gender.toLowerCase(),
                                    "Title": ' '
                                },
                                "Payment": {
                                    "Number": L.order.giftcard,
                                    "ExpiryMonth": 0,
                                    "ExpiryYear": 0,
                                    "CVC": null,
                                    "CardType": null,
                                    "NameOnCard": null,
                                    "PrimaryBillingCard": false,
                                    "SaveCardToWallet": false,
                                    "CardToken": null
                                },
                                "OrderDelivery": {
                                    "DeliveryAddress": {
                                        "Address1": L.order.MemberDetails.Address1,
                                        "Address2": L.order.MemberDetails.Address2,
                                        "Address3": "",
                                        "Town": L.order.MemberDetails.City
                                    }
                                },
                                "PaymentList": null,
                                "SessionId": null,
                                "CinemaId": L.order.product.venueid,
                                "LoyaltyNumber": null,
                                "MembershipConcessionId": L.order.product.Id
                            }),
                            crossDomain: true
                        }).always(function (response) {
                            if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {

                                //console.log(['complete', response]);

                                window.location = '/membership/confirmation';
                            }
                            else {
                                L.showError('default');
                            }
                        });
                    }
                    else {
                        L.showError('default');
                    }
                };

                var getPaymentProvider = function (data) {
                    if (typeof data !== 'undefined' && typeof pc.hostedPayment !== 'undefined') {
                        var PaymentProviderRequest = {
                            "OrderId": data.OrderId,
                            "Provider": pc.hostedPayment.provider,
                            "Method": pc.hostedPayment.method,
                            "TypeMethod": pc.hostedPayment.typeMethod,
                            "TestMode": pc.hostedPayment.testMode,
                            "Device": pc.hostedPayment.device,
                            "CallbackUrl": pc.hostedPayment.callbackUrl,
                            "DeclinedUrl": pc.hostedPayment.declinedUrl,
                            "CancelUrl": pc.hostedPayment.cancelUrl,
                            "UserData": null,
                            "Currency": pc.hostedPayment.currency,
                            IsMembershipPurchase: true
                        };

                        $.ajax({
                            type: "POST",
                            headers: {
                                'ApplicationOrigin': pc.api.applicationOrigin
                            },
                            contentType: 'application/json',
                            dataType: 'json',
                            url: pc.api.members + 'api/Member/GetPaymentProvider/?cinemaId=' + pc.api.giftStoreId + '&circuitId=' + pc.api.circuit,
                            data: JSON.stringify(PaymentProviderRequest),
                            crossDomain: true
                        }).always(function (response) {
                            if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                                processISnapPayment(response, data);
                            }
                            else {
                                L.showError('default');
                            }
                        });
                    }
                    else {
                        L.showError('default');
                    }
                };

                var processISnapPayment = function (response, data) {
                    var $container = $('[data-register-iframe]');

                    // check for container
                    if ($container.length > 0) {
                        // check for iframe
                        if ($container.find('iframe').length === 0) {
                            // add iframe
                            $container.append('<div id="IFrameWrapper"><iframe src=' + response.Action + ' id="SnapDDAIframe" frameborder="0" name="SnapDDAIframe" /></div>');
                        }

                        var today = new Date(),
                            todayDay = ('0' + today.getDate()).slice(-2),
                            todayMonth = ('0' + (today.getMonth() + 1)).slice(-2),
                            todayYear = today.getFullYear();

                        var nextMonth = new Date(),
                            nextMonthDay,
                            nextMonthMonth,
                            nextMonthYear;

                        nextMonth.setMonth(nextMonth.getMonth() + 1);
                        nextMonthDay = ('0' + nextMonth.getDate()).slice(-2);
                        nextMonthMonth = ('0' + (nextMonth.getMonth() + 1)).slice(-2);
                        nextMonthYear = nextMonth.getFullYear();

                        var dobSplit = L.order.MemberDetails.DateOfBirth.replace('T00:00:00', '').split('-'),
                            dobYear = dobSplit[0],
                            dobMonth = dobSplit[1],
                            dobDay = dobSplit[2];

                        // get renewal checkbox state
                        var doNotRenew = false;

                        if ($('[data-member-renewal]').hasClass('dn') === false) {
                            doNotRenew = $('[name="LoyaltyDetails-NoRenewal"]')[0].checked;
                        }

                        // setup data
                        var postData = {
                            ClientID: response.PostValues.ClientId,
                            ProductDescription: L.order.product.Title,
                            UID: data.OrderId,
                            MembershipNo: data.UserSessionId,
                            JoiningFee: 0,
                            MembershipStartDate: todayDay + '/' + todayMonth + '/' + todayYear,
                            NonRenewable: doNotRenew,
                            Title: ' ',
                            Firstname: L.order.MemberDetails.Firstname,
                            Surname: L.order.MemberDetails.Lastname,
                            Gender: L.order.MemberDetails.Gender.toLowerCase(),
                            Address1: L.order.MemberDetails.Address1,
                            Address2: L.order.MemberDetails.Address2,
                            Town: L.order.MemberDetails.City,
                            Postcode: L.order.MemberDetails.ZipCode,
                            HomePhone: L.order.MemberDetails.PhoneNumber,
                            MobilePhone: L.order.MemberDetails.MobileNumber,
                            Email: L.order.MemberDetails.Email,
                            DOB: dobDay + '/' + dobMonth + '/' + dobYear,
                            MembershipAmountPence: response.PostValues.PaymentAmount,
                            ProductID: L.paymentTypes[L.order.paymentType].harlandsProduct,
                            BranchID: response.ExternalCinemaId
                        };

                        if (L.order.paymentType === 'OneOff') {
                            // single year payment
                            postData.ContractLengthMonths = 1;
                            postData.PaymentIntervalMonths = 12;
                        }
                        else if (L.order.paymentType === 'Yearly') {
                            // yearly renewal
                            postData.ContractLengthMonths = 1;
                            postData.PaymentIntervalMonths = 12;
                        }
                        else if (L.order.paymentType === 'Monthly') {
                            // monthly
                            postData.ContractLengthMonths = 12;
                            postData.PaymentIntervalMonths = 1;
                            postData.DDDate = nextMonthDay + '/' + nextMonthMonth + '/' + nextMonthYear;
                        }

                        /*if (pc.hostedPayment.testMode === 'True') {
                            postData.Address1 = '88 Must be Eightyeight Ave';
                            postData.Address2 = 'Haywards Heath';
                            postData.Town = 'W.Sussex';
                            postData.Postcode = 'RH41 2TW';
                        }*/

                        // create form to post data to iframe
                        $('body').append('<form action="' + response.Action + '" method="post" target="SnapDDAIframe" id="postToIframe"></form>');
                        // loop data to create hidden form fields
                        $.each(postData, function (n, v) {
                            $('#postToIframe').append('<input type="hidden" name="' + n + '" value="' + v + '" />');
                        });
                        // submit and remove form
                        $('#postToIframe').submit().remove();

                        // change to payment step
                        changeStep('#payment');
                    }
                };


                if (L.HasLocalStorage()) {
                    var tempData = $.extend({}, formData);

                    tempData.Password = '';

                    sessionStorage.setItem('everyman_loyalty_data', JSON.stringify(tempData));
                }

                L.order.MemberDetails = formData;
                L.order.MemberDetails.MemberItem = L.order.product.Code;

                if (typeof docCookies !== 'undefined') {
                    if (docCookies.hasItem('everyman_loyalty_venue')) {
                        var cinemaSplit = docCookies.getItem('everyman_loyalty_venue').split('|'),
                            cinema = cinemaSplit.length > 1 ? cinemaSplit[1] : cinemaSplit[0];

                        L.order.product.venue = cinema;
                        L.order.product.invenue = true;
                    }
                    else {
                        L.order.product.venue = $('[data-loyalty-list-preferredcinema] option:selected').text();
                        L.order.product.invenue = false;
                    }

                    L.order.product.isgiftcard = L.order.paymentType === 'GiftCard' ? true : false;

                    docCookies.setItem('everyman_loyalty_order', JSON.stringify(L.order.product), null, '/');
                }

                if (pc.Authentication.HasLogin) {
                    // logged in member
                    // update user details
                    $.ajax({
                        type: "POST",
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        contentType: 'application/json',
                        dataType: 'json',
                        url: pc.api.members + 'api/Member/Edit/?circuitId=' + pc.api.circuit,
                        data: JSON.stringify(formData),
                        crossDomain: true
                    }).always(function (data) {
                        if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) {
                            // add concession
                            addConcession();
                        }
                        else if (typeof data.PeachErrorCode !== 'undefined' && data.PeachErrorCode === 'Membership Already Exists') {
                            L.showError('username');
                        }
                        else {
                            L.showError('default');
                        }
                    });

                }
                else if (L.isFreeMember) {
                    // free member
                    $.ajax({
                        type: 'POST',
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        url: pc.api.members + 'api/member/Login?circuitId=' + pc.api.circuit,
                        dataType: 'json',
                        contentType: 'application/json',
                        data: JSON.stringify({
                            Username: L.RegEmail,
                            Password: ''
                        })
                    }).always(function (data) {
                        //console.log(data);
                        if (typeof data !== 'undefined' && data !== null && data.StatusCode === 200 && data.PeachCode === 0) {
                            pc.Authentication.HasLogin = true;
                            formData.UserSessionId = data.MemberDetails.UserSessionId;
                            formData.MemberId = data.MemberDetails.MemberId;

                            $.ajax({
                                type: "POST",
                                headers: {
                                    'ApplicationOrigin': pc.api.applicationOrigin
                                },
                                contentType: 'application/json',
                                dataType: 'json',
                                url: pc.api.members + 'api/Member/Edit/?circuitId=' + pc.api.circuit,
                                data: JSON.stringify(formData),
                                crossDomain: true
                            }).always(function (editData) {
                                if (typeof editData !== 'undefined' && editData !== null && editData.StatusCode === 200) {
                                    // add concession
                                    addConcession();
                                }
                                else {
                                    L.showError('default');
                                }
                            });
                        }
                        else {
                            L.showError('default');
                        }
                    });
                }
                else {
                    // not a member

                    $.ajax({
                        url: pc.api.members + 'api/Member/SetMemberToActivateOnComplete/?circuitId=' + pc.api.circuit,
                        type: 'POST',
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        contentType: 'application/json',
                        dataType: 'json',
                        data: JSON.stringify(L.order.MemberDetails),
                        crossDomain: true
                    }).done(function (data) {
                        if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) {
                            L.order.MemberDetails.UserSessionId = data.UserSessionId;

                            addConcession();
                        }
                        else if (typeof data.PeachErrorCode !== 'undefined' && data.PeachErrorCode === 'Membership Already Exists') {
                            L.showError('username');
                        }
                        else {
                            L.showError('default');
                        }
                    }).fail(function (jqXHR, status, err) {
                        L.showError('default');
                    });
                }
            }
        };

        // sign up
        steps['1'] = steps['#signup'] = function () {
            if (typeof docCookies !== 'undefined' && docCookies.hasItem('everyman_loyalty_order')) {
                L.order.product = JSON.parse(docCookies.getItem('everyman_loyalty_order'));

                if (pc.Authentication.HasLogin) {
                    // logged in
                    // prepopulate email and email confirm fields
                    $('[name="LoyaltyDetails-Email"]').val(pc.Authentication.EmailAddress);
                    $('[name="LoyaltyDetails-ConfirmEmail"]').val(pc.Authentication.EmailAddress);
                    // check email
                    pc.Loyalty.testEmail();
                }
                else if (L.HasLocalStorage() && sessionStorage.getItem('everyman_loyalty_data') !== null) {
                    L.tempUser = JSON.parse(sessionStorage.getItem('everyman_loyalty_data'));

                    $('[name="LoyaltyDetails-Email"]').val(L.tempUser.EmailAddress);
                    $('[name="LoyaltyDetails-ConfirmEmail"]').val(L.tempUser.EmailAddress);

                    $('[data-tab-item="#signup"]').addClass('active');
                }
                else {
                    $('[data-tab-item="#signup"]').addClass('active');
                }

                // goal tracking
                L.track({
                    'virtualPageURL': '/membership/register/' + L.order.product.parentTitle.toLowerCase().replace(/ /g, '') + '-signup',
                    'virtualPageTitle': L.order.product.parentTitle.toLowerCase() + ' signup'
                });
            }
            else {
                // no order cookie, redirect back to member landing page
                window.location = L.loyaltyUrl.NewMember;
            }
        };

        // personal details
        steps['#details'] = function () {
            //console.log('personal details');

            L.setupForm();

            $.get('/api/UmbracoServices/GetHarlandsProductLookup?membershipProgramId=' + L.order.product.Id, function (data) {
                //console.log(data);

                if (typeof data !== 'undefined' && data !== null && data.length > 0) {
                    for (var i = 0; i < data.length; i++) {
                        // update button price
                        if (data[i].paymentType === 'OneOff') {
                            $('[data-member-pay="' + data[i].paymentType + '"] [data-member-pay-price]').html(L.monetise(L.order.product.Cost));
                        }

                        if (data[i].paymentType === 'Monthly') {
                            $('[data-member-pay="' + data[i].paymentType + '"] [data-member-pay-price]').html(L.monetise(L.order.product.Cost / 12));
                        }

                        // show button
                        $('[data-member-pay="' + data[i].paymentType + '"]').removeClass('dn');

                        // save for later
                        L.paymentTypes[data[i].paymentType] = data[i];

                    }

                    if (typeof L.paymentTypes.Monthly !== 'undefined') {
                        // show monthly text
                        $('[data-member-pay-text="Monthly"]').removeClass('dn');
                    }
                    else {
                        // show yearly text
                        $('[data-member-pay-text="OneOff"]').removeClass('dn');
                    }

                    if (pc.Authentication.HasLogin === false || typeof L.isUpgrade !== 'undefined') {
                        $('[data-member-pay="GiftCard"]').removeClass('dn');
                    }
                    else {
                        // check for single button and trigger click
                        if (typeof L.paymentTypes.Monthly !== 'undefined' && typeof L.paymentTypes.OneOff === 'undefined') {
                            $('[data-member-pay="Monthly"]').trigger('click');
                        }
                        else if (typeof L.paymentTypes.Monthly === 'undefined' && typeof L.paymentTypes.OneOff !== 'undefined') {
                            $('[data-member-pay="OneOff"]').trigger('click');
                        }
                    }

                    L.hideLoad();
                }
                else {
                    L.showError('default');
                }
            });

            // goal tracking
            L.track({
                'virtualPageURL': '/membership/register/' + L.order.product.parentTitle.toLowerCase().replace(/ /g, '') + '-details',
                'virtualPageTitle': L.order.product.parentTitle.toLowerCase() + ' details'
            });
        };
        // payment
        steps['#payment'] = function () {
            L.hideLoad();

            // goal tracking
            L.track({
                'virtualPageURL': '/membership/register/' + L.order.product.parentTitle.toLowerCase().replace(/ /g, '') + '-payment',
                'virtualPageTitle': L.order.product.parentTitle.toLowerCase() + ' payment'
            });
        };

        // confirmation
        steps['4'] = steps['#confirmation'] = function () {
            // separate page
            L.lastStep = true;

            if (pc.Authentication.HasLogin) {
                // log user out
                $.get(L.loyaltyUrl.SignOut);

                // reset user data
                pc.Authentication = {
                    HasLogin: false
                };

                pc.Loyalty.Member = null;

                $('[data-modal-member-loggedin-name]').hide();
                $('[data-modal-member-loggedout-name]').show();
            }

            if (typeof docCookies !== 'undefined' && docCookies.hasItem('everyman_loyalty_order')) {

                L.order.product = JSON.parse(docCookies.getItem('everyman_loyalty_order')) || {};

                $('[data-tab-link][href="#payment"]').toggleClass('topTabLink-hide', typeof L.order.product.isgiftcard !== 'undefined' && L.order.product.isgiftcard === true);

                //console.log(L.order.product);

                if (typeof L.order.product.ExternalOrderId !== 'undefined') {
                    $.ajax({
                        type: "GET",
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        contentType: 'application/json',
                        dataType: 'json',
                        url: pc.api.members + 'api/member/GetCompleteOrder/' + L.order.product.ExternalOrderId + '?circuitId=' + pc.api.circuit,
                        crossDomain: true
                    }).always(function (response) {
                        if (typeof response !== 'undefined'
                            && response !== null
                            && typeof response.BookingConfirmationId !== 'undefined'
                            && response.BookingConfirmationId !== null
                            && typeof response.GrandTotal !== 'undefined'
                            && response.GrandTotal !== null
                            && typeof response.BookingReference !== 'undefined'
                            && response.BookingReference !== null
                            && docCookies.hasItem('everyman_loyalty_confirm_' + response.BookingReference) === false) {

                            // fb confirmation tracking
                            var tempDataFB = {};
                            tempDataFB['content_name'] = L.order.product.parentTitleTitle;
                            tempDataFB['content_category'] = L.order.product.parentTitleTitle;
                            tempDataFB['content_ids'] = [response.BookingConfirmationId];
                            tempDataFB['content_type'] = 'loyalty';
                            tempDataFB['value'] = parseFloat(response.GrandTotal / 100).toFixed(2);
                            tempDataFB['currency'] = 'GBP';

                            if (typeof fbq !== 'undefined') {
                                fbq('track', 'Loyalty Purchase', tempDataFB);
                            }

                            window._fbq = window._fbq || [];
                            window._fbq.push(['track', '6028350069113', { 'value': tempDataFB['value'], 'currency': 'GBP' }]);

                            // goal tracking
                            L.track({
                                'virtualPageURL': '/membership/confirmation/' + L.order.product.parentTitle.toLowerCase().replace(/ /g, ''),
                                'virtualPageTitle': L.order.product.parentTitle.toLowerCase() + ' confirmation'
                            });
                            L.track({
                                'event': 'MembershipVenue',
                                'MembershipType': L.order.product.parentTitle,
                                'MembershipSignUp': L.order.product.invenue ? 'In-Venue' : 'Online',
                                'Venue': L.order.product.venue
                            });

                            docCookies.setItem('everyman_loyalty_confirm_' + response.BookingReference, response.BookingReference, Infinity, '/');
                        }
                    });
                }
            }

            docCookies.removeItem('everyman_loyalty_order', '/');

            sessionStorage.removeItem('everyman_loyalty_data');
        };

        if (typeof steps[curStep] !== 'undefined') {
            steps[curStep]();
        }

        $('[data-tab-link]').on('click', function (e) {
            e.preventDefault();

            var $link = $(this);

            if ($link.hasClass('disabled') || $link.hasClass('active') || $link.hasClass('done')) {
                return false;
            }
            else if (typeof L.lastStep === 'undefined') {
                changeStep($link.attr('href'));
            }
        });

        $('[data-register-message]').on('click', '[data-register-message-close]', function (e) {
            e.preventDefault();

            $(this).closest('[data-register-message]').hide();
            L.hideLoad();
        });

        $('[data-register-message]').on('click', function (e) {
            if ($(this).has(e.target).length === 0) {
                $(this).hide();
                L.hideLoad();
            }
        });

        $('[data-member-pay]').on('click', function (e) {
            e.preventDefault();

            var $btn = $(this),
                btnType = $btn.attr('data-member-pay');

            if ($btn.hasClass('active') === false) {
                $('[data-member-pay].active').removeClass('active');

                $btn.addClass('active');

                $('[data-register-form-fieldset]').prop('disabled', btnType === 'GiftCard');
                $('[data-member-giftcard]').toggleClass('dn', btnType !== 'GiftCard');
                $('[data-tab-link][href="#payment"]').toggleClass('topTabLink-hide', btnType === 'GiftCard');
                $('[data-member-form] [data-form-submit]').text(btnType === 'GiftCard' ? 'Complete Membership Set-Up' : 'Proceed to Payment');
                $('[data-member-giftcard-input]').val('').trigger('input');
                $('[data-member-form]').toggleClass('dn', btnType === 'GiftCard'); // this has to appear after data-member-giftcard-input trigger('input')

                L.order.giftcard = undefined;

                L.order.paymentType = btnType;

                // show/hide renewal checkbox
                if ((btnType === 'Monthly' && typeof L.paymentTypes.Monthly !== 'undefined') || (btnType === 'OneOff' && typeof L.paymentTypes.Yearly !== 'undefined')) {
                    $('[data-member-renewal]').removeClass('dn');
                    $('[name="LoyaltyDetails-NoRenewal"]').trigger('change');
                }
                else {
                    $('[data-member-renewal]').addClass('dn');
                }
            }
        });

        $('[data-member-giftcard-input]').on('input', function () {
            $('[data-member-giftcard-button]').toggleClass('disabled', this.value === '').prop('disabled', this.value === '');
            $('[data-member-giftcard-error]').hide();
            $('[data-member-form]').addClass('dn');
        });

        $('[data-member-giftcard-button]').on('click', function (e) {
            e.preventDefault();

            var inputVal = $('[data-member-giftcard-input]').val() || '';

            $(this).addClass('disabled').prop('disabled', true);

            $.ajax({
                type: 'GET',
                url: pc.api.booking + 'api/Giftcard/ValidatateGiftCardWithMemberShip?barcode=' + inputVal + '&cinemaId=' + pc.api.giftStoreId + '&membershipId=' + L.order.product.Id
            }).always(function (response) {
                if (typeof response !== 'undefined' && response !== null && response.PeachCode === 0) {

                    L.order.giftcard = inputVal;

                    $('[data-member-form]').removeClass('dn');

                    $('[data-register-form-fieldset]').prop('disabled', false);

                    $('html,body').animate({
                        scrollTop: $('[data-member-form]').offset().top - 100
                    });
                }
                else {

                    // PeachCode
                    // 68 which is for GiftCardNotValidForMembership
                    // 54 which is for invalid gift card request (just a generic invalid gift card error)

                    $('[data-member-giftcard-error]').show();
                }
            });
        });

        $('[name="LoyaltyDetails-NoRenewal"]').on('change', function (e) {
            if (this.checked === false && L.order.paymentType === 'OneOff') {
                L.order.paymentType = 'Yearly';
            }
            else if (this.checked && L.order.paymentType === 'Yearly') {
                L.order.paymentType = 'OneOff';
            }
        });

        if (typeof window.postMessage !== 'undefined') {
            var messageHandler = function (e) {
                //console.log(['peachMessage', e]);

                if (e.origin === 'https://everyman.snapdda.co.uk'
                    && e.data === 'peachPaymentSummary'
                    && typeof L.order.product !== 'undefined'
                    && typeof L.order.product.ExternalOrderId !== 'undefined') {

                    L.lastStep = true;

                    L.showLoad();
                    // call to get order status
                    $.ajax({
                        type: "GET",
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        contentType: 'application/json',
                        dataType: 'json',
                        url: pc.api.members + 'api/member/GetOrderStatus/' + L.order.product.ExternalOrderId + '?circuitId=' + pc.api.circuit,
                        crossDomain: true
                    }).always(function (response) {
                        //console.log(response);

                        /*
                        OrderStatus:
                        Open = 0,
                        Complete = 1,
                        Cancelled = 2,
                        Processing = 3,
                        PaymentTakenError= 4,
                        PaymentDeclined=5,
                        ErrorOnComplete=6
                        */

                        if (typeof response !== 'undefined'
                            && typeof response.OrderStatus !== 'undefined'
                            && (response.OrderStatus === 1
                                || response.OrderStatus === 0
                                || response.OrderStatus === 3)) {

                            if (response.OrderStatus === 0 || response.OrderStatus === 3) {
                                // open or processing - redo call in x time
                                setTimeout(function () {
                                    messageHandler(e);
                                }, 1000);
                            }
                            else if (response.OrderStatus === 1) {
                                L.hideLoad();
                            }
                        }
                        else {
                            // anything else other than complete
                            // show error message
                            L.showError('order_status');
                            // show overlay on top of iframe to disable links
                            $('[data-register-iframe-overlay]').removeClass('dn');

                            L.hideLoad();
                        }
                    });
                }
            };

            if (typeof window.addEventListener !== 'undefined') {
                window.addEventListener('message', messageHandler, false);
            }
            else if (typeof window.attachEvent !== 'undefined') {
                window.attachEvent('onmessage', messageHandler);
            }
        }
    })();

    // my account
    (function () {
        if ($('[data-loyalty-myaccount]').length === 0) {
            return;
        }

        var pointsHistory = pc.Loyalty.Member.MemberDetails.PointsHistory;
        var monthNames = [
            "January",
            "February",
            "March",
            "April",
            "May",
            "June",
            "July",
            "August",
            "September",
            "October",
            "November",
            "December"
        ];

        if (typeof pointsHistory !== 'undefined'
            && pointsHistory !== null
            && typeof pointsHistory.TransactionHistory !== 'undefined'
            && pointsHistory.TransactionHistory !== null
            && pointsHistory.TransactionHistory.length > 0) {

            var $morebtn = $('[data-loyalty-transaction-history-showmore-button]'),
                $lessbtn = $('[data-loyalty-transaction-history-showless-button]'),
                $parent = $('[data-loyalty-transaction-history-showmore]'),
                bookHistory = pointsHistory.TransactionHistory;

            // hide transactions which have no films listed as these can't be filtered out by vista
            // loop transactions
            for (var i = 0, len = bookHistory.length; i < len; i += 1) {
                // loop line items
                lineItems: for (var i2 = 0; i2 < bookHistory[i].LineItems.length; i2 += 1) {
                    //  console.log(typeof(bookHistory[i].LineItems[i2].Film));
                    if (bookHistory[i].LineItems[i2].Film !== null) {
                        bookHistory[i].Film = bookHistory[i].LineItems[i2].Film;

                        if (typeof bookHistory[i].LineItems[i2].SessionTime !== 'undefined' && bookHistory[i].LineItems[i2].SessionTime !== null) {
                            var tempDate = new Date(bookHistory[i].LineItems[i2].SessionTime.replace(/-/g, '/'));
                            bookHistory[i].pFullDate = tempDate;
                            bookHistory[i].pDate = ('0' + tempDate.getDate()).slice(-2) + ' ' + monthNames[tempDate.getMonth()] + ' ' + tempDate.getFullYear() + ' ' + ('0' + tempDate.getHours()).slice(-2) + ':' + ('0' + tempDate.getMinutes()).slice(-2);
                        }

                        break lineItems;
                    }
                }

                // check we have film
                if (typeof bookHistory[i].Film === 'undefined') {
                    bookHistory.splice(i, 1);
                    i -= 1;
                    len -= 1;
                }
            }

            bookHistory.sort(function (a, b) {
                return b.pFullDate - a.pFullDate;
            });

            $morebtn.on('click', function (e) {
                e.preventDefault();
                $('[data-loyalty-transaction-history] tr').addClass('active');
                $(this).hide();
                $lessbtn.css('display', 'block');
            });

            $lessbtn.on('click', function (e) {
                e.preventDefault();
                $('[data-loyalty-transaction-history] tr').removeClass('active');
                $(this).hide();
                $morebtn.css('display', 'block');
            });

            if (bookHistory.length > 0) {

                if (bookHistory.length > 3) {
                    $morebtn.css('display', 'block');
                }

                $.get('/template?name=loyaltyTransactionHistory&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    $('[data-loyalty-transaction-history] tbody').append(Mustache.render(template, bookHistory));
                    $('[data-loyalty-transaction]').removeClass('dn');
                });
            }
        }

        L.hideLoad();

        L.track({
            'virtualPageURL': '/membership/myaccount',
            'virtualPageTitle': 'Loyalty My Account'
        });

    })();

    // reset password
    (function () {
        if ($('[data-loyalty-reset-password]').length === 0) {
            return;
        }

        L.track({
            'virtualPageURL': '/membership/resetpassword',
            'virtualPageTitle': 'Loyalty Reset Password'
        });
    })();

    // edit account
    (function () {
        if ($('[data-loyalty-edit]').length === 0) {
            return;
        }

        L.setupForm();

        var checkEmail = true;
        var checkButton = false;
        var buttonClick = false;

        pc.Loyalty.SubmitEdit = function () {
            if (checkEmail === true && $('[name="LoyaltyDetails-Email"]').val() !== pc.Loyalty.Member.MemberDetails.EmailAddress) {

                var emailEncoded = encodeURIComponent($('[name="LoyaltySignUp-Email"]').val());
                $.ajax({
                    type: "GET",
                    headers: {
                        'ApplicationOrigin': pc.api.applicationOrigin
                    },
                    contentType: 'application/json',
                    dataType: 'json',
                    url: pc.api.members + "api/member/GetMemberLevel?circuitId=13&emailAddress=" + emailEncoded,
                    crossDomain: true
                }).always(function (data) {
                    // if we already have this email registered, find out the type
                    var editPopup = $("[data-Popup-Email], #blackoutPage"),
                        closeBlackOutPage = $('#blackoutPage'),
                        closePopup1 = $("#close_popup1"),
                        closePopup2 = $("#close_popup2"),
                        emailPopup = $("#EditPopup2, .seatDescriptionOuter"),
                        emailPopupClose = $(".closePopup");

                    if (data.StatusCode === 200) {
                        $loader.hide();
                        $('[name="LoyaltySignUp-Email"]').val('').addClass('invalid');

                        emailPopup.css("display", "block");
                        closeBlackOutPage.css("display", "block");

                        closeBlackOutPage.off('click').on('click', function (e) {
                            e.preventDefault();
                            emailPopup.css("display", "none");
                            closeBlackOutPage.css("display", "none");
                        });

                        emailPopupClose.off('click').on('click', function (e) {
                            e.preventDefault();
                            emailPopup.css("display", "none");
                            closeBlackOutPage.css("display", "none");
                        });

                    } else {

                        editPopup.css("display", "block");
                        closeBlackOutPage.css("display", "block");
                        emailPopup.css("display", "none");

                        closePopup1.off('click').on('click', function (e) {
                            e.preventDefault();

                            checkEmail = false;
                            buttonClick = true;
                            pc.Loyalty.SubmitEdit();
                            editPopup.css("display", "none");
                        });

                        closePopup2.off('click').on('click', function (e) {
                            e.preventDefault();

                            editPopup.css("display", "none");
                            closeBlackOutPage.css("display", "none");


                        });
                    }
                });

                return false;
            }

            L.showLoad();

            var formData = L.getFormData(pc.Authentication.UserSessionId);

            if (typeof formData !== 'undefined' && formData !== null) {
                $.ajax({
                    type: "POST",
                    headers: {
                        'ApplicationOrigin': pc.api.applicationOrigin
                    },
                    contentType: 'application/json',
                    dataType: 'json',
                    url: pc.api.members + 'api/Member/Edit/?circuitId=' + pc.api.circuit,
                    data: JSON.stringify(formData),
                    crossDomain: true
                })
                    .always(function (data) {
                        if (typeof data.StatusCode !== 'undefined' && data.StatusCode === 200) {
                            //$.get("/membership/MarkUserAsDirty?userSessionId=" + pc.Authentication.UserSessionId + "&forceExpire=true")
                            //.always(function () {
                            //setTimeout(function () {
                            if (buttonClick === true) {
                                window.location = L.loyaltyUrl.SignOut;
                            } else {
                                window.location = L.loyaltyUrl.Account;
                            }
                            // }, 1500);
                            // });
                        }
                        else {
                            if (typeof data.PeachErrorCode !== 'undefined' && data.PeachErrorCode === 'Membership Already Exists') {
                                L.showError('username');
                            }
                            else {
                                L.showError('default');
                            }
                        }
                    });
            }
            else {
                L.hideLoad();
            }
        };

        L.track({
            'virtualPageURL': '/membership/editaccount',
            'virtualPageTitle': 'Loyalty Edit Account'
        });
    })();

    // t&c modal
    (function () {
        if ($('[data-member-terms-togg]').length > 0) {
            $('[data-member-terms-togg]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-member-terms]').show();
            });
            $('[data-member-terms-close], [data-modalbg]').on('click', function (e) {
                e.preventDefault();
                $('[data-modalbg],[data-member-terms]').hide();
            });
        }
    })();

    // disable confirm email copy paste
    (function () {
        var $field = $('[name="LoyaltyDetails-ConfirmEmail"]');

        if ($field.length > 0) {
            $field.on('copy paste', function (e) {
                return false;
            });
        }
    })();

    // venue landing page
    (function () {
        var $container = $('[data-member-venue]');

        if ($container.length === 0) {
            return;
        }

        // get cinema list
        $.ajax({
            type: "GET",
            headers: {
                'ApplicationOrigin': pc.api.applicationOrigin
            },
            contentType: 'application/json',
            dataType: 'json',
            url: pc.api.members + 'api/Data/GetCinemas/?circuitId=' + pc.api.circuit,
            crossDomain: true
        }).always(function (data) {
            if (typeof data !== 'undefined' && data !== null && data.length > 0) {
                var listItems = [],
                    $list = $('[data-member-venue-select]'),
                    orderedList = [];

                // loop data and remove cinemas
                if (typeof pc.excludeCinemas !== 'undefined') {
                    for (var c = data.length - 1; c >= 0; c--) {
                        if (typeof pc.excludeCinemas[data[c].Id] !== 'undefined') {
                            data.splice(c, 1);
                        }
                    }
                }

                orderedList = data;

                for (var o = orderedList.length - 1; o >= 0; o--) {
                    if (typeof orderedList[o] === 'undefined') {
                        orderedList.splice(o, 1);

                    }
                }

                //listItems.push('<option value="">' + "Choose your Venue" + '</option>');

                for (var j = 0; j < orderedList.length; j++) {
                    listItems.push('<option value="' + orderedList[j].Id + '">' + orderedList[j].CinemaName + '</option>');
                }

                $list.append(listItems.join(''));

                if (typeof docCookies !== 'undefined' && docCookies.hasItem('everyman_loyalty_venue') === true) {
                    var cinema = docCookies.getItem('everyman_loyalty_venue');

                    $list.find('option[value="' + cinema.split('|')[0] + '"]').prop('selected', true).trigger('change');

                    $('[data-member-venue-clear]').on('click', function (e) {
                        e.preventDefault();

                        docCookies.removeItem('everyman_loyalty_venue', '/');

                        document.location.reload();
                    }).removeClass('dn');
                }
                else {
                    $list.find('option:first').prop('selected', true).trigger('change');
                }
            }
        });

        $('[data-member-venue-form]').attr('novalidate', true).on('submit', function (e) {
            e.preventDefault();
            var $form = $(this),
                $select = $form.find('[data-member-venue-select]');

            $form.find('.invalid').removeClass('invalid');

            if ($select.val() !== '') {

                var tempVenue = $select.val() + '|' + $select.find('option:selected').text();

                var temp = document.createElement('div');

                temp.textContent = tempVenue;

                tempVenue = temp.innerHTML;

                if (typeof docCookies !== 'undefined') {
                    docCookies.setItem('everyman_loyalty_venue', tempVenue, Infinity, '/');
                }

                window.location = L.loyaltyUrl.NewMember;
            }
            else {
                $select.addClass('invalid');
            }
        });

        $('[data-modal-member-loggedout-name]').remove();
    })();

    // venue journey
    (function () {

        // check for venue cookie
        if (typeof docCookies === 'undefined' || docCookies.hasItem('everyman_loyalty_venue') === false) {
            return;
        }

        //var cookieData = docCookies.getItem('everyman_loyalty_venue');

        //console.log(cookieData);

        // on faq page add link to return back to member landing page
        $('.faq-link[href="/faqs/"]').hide().after('<p><a href="/Membership/Member" class="btn-1 loyaltyBtn">Back</a></p>');
    })();

    // newsletter/free membership signup
    (function () {
        //
        // Used for newsletter on Members/SubscribeToNewsletter page.
        //
        if ($('[data-newsSubscribe]').length > 0) {
            var $loader = $('[data-gc-load], [data-loyalty-load]');

            // get preferred cinema list
            var getCinemaList = $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + 'api/Data/GetCinemas/?circuitId=' + pc.api.circuit,
                crossDomain: true
            }).done(function (data) {
                if (data) {
                    var listItems = [],
                        $list = $('[data-loyalty-list-preferredcinema]');
                    listItems.push('<option value="">' + "Choose your Venue" + '</option>');

                    if (typeof pc.excludeCinemas !== 'undefined') {
                        for (var c = data.length - 1; c >= 0; c--) {
                            if (typeof pc.excludeCinemas[data[c].Id] !== 'undefined') {
                                data.splice(c, 1);
                            }
                        }
                    }

                    for (var i2 = 0, len = data.length; i2 < len; i2 += 1) {
                        listItems.push('<option value="' + data[i2].Id + '">' + data[i2].CinemaName + '</option>');
                    }

                    $list.html(listItems.join(''));

                    if (window.location.href.indexOf("?") !== -1) {
                        var subscUrl = window.location.href.split('email=')[1].split('+')[0];
                        var subscCinema = window.location.href.split('cinemaId=')[1];
                        $('#LoyaltyDetails-Email').val(subscUrl);
                        $('[data-loyalty-list-preferredcinema]').val(subscCinema).change();
                    }
                }
            });
            //
            // Method called from form submit in _forms.js
            //
            pc.newsletterSubscribe = function () {
                $loader.show();

                var subscData = {},
                    emailAddress = $('#LoyaltyDetails-Email').val();

                subscData['Firstname'] = $('#loyalty-firstname').val();
                subscData['Lastname'] = $('#loyalty-lastname').val();
                subscData['Email'] = emailAddress;
                subscData['ClubId'] = pc.api.loyaltyClubId;
                subscData['Password'] = 'null';
                subscData['SendNewsletter'] = 'false';
                subscData['NewsletterFrequency'] = null;
                subscData['ContactByThirdParty'] = 'false';

                var $preferredcinemaId = $('[data-loyalty-list-preferredcinema]').val();
                if ($preferredcinemaId > 0) {
                    subscData['PreferredCinemaId'] = $preferredcinemaId;
                }

                if ($('[name="LoyaltyDetails-SendNewsletter"]:checked').length > 0) {
                    subscData['SendNewsletter'] = 'true';
                }

                if ($('[name="LoyaltyDetails-SendEventsInfo"]:checked').length > 0) {
                    subscData['ContactByThirdParty'] = 'true';
                }

                function showSuccess() {
                    $('[data-form="subscription"]').hide();
                    $('[data-subsSuccess]').show();
                    $loader.hide();

                    // goal tracking
                    L.track({
                        'virtualPageURL': '/membership/SubscribeToNewsletter/success',
                        'virtualPageTitle': 'subscribe to newsletter success'
                    });
                }

                function showFail() {
                    $('[data-form="subscription"]').hide();
                    $('[data-subsFail]').show();
                    $loader.hide();

                    // goal tracking
                    L.track({
                        'virtualPageURL': '/membership/SubscribeToNewsletter/fail',
                        'virtualPageTitle': 'subscribe to newsletter fail'
                    });
                }

                function showMember() {
                    $('[data-form="subscription"]').hide();
                    $('[data-subsMember]').show();
                    $loader.hide();

                    // goal tracking
                    L.track({
                        'virtualPageURL': '/membership/SubscribeToNewsletter/fail',
                        'virtualPageTitle': 'subscribe to newsletter fail'
                    });
                }
                $.ajax({
                    url: pc.api.members + 'api/Member/Create?circuitId=' + pc.api.circuit,
                    type: 'POST',
                    headers: {
                        'ApplicationOrigin': pc.api.applicationOrigin
                    },
                    dataType: 'json',
                    data: JSON.stringify(subscData),
                    contentType: 'application/json'
                }).always(function (response) {
                    if (typeof response !== 'undefined' && response !== null) {
                        if (response.StatusCode === 200) {
                            showSuccess();
                        }
                        else if (response.PeachCode === 49) {
                            // user already exists
                            // get member level
                            $.ajax({
                                url: pc.api.members + 'api/member/GetMemberLevel?circuitId=' + pc.api.circuit + '&emailAddress=' + encodeURIComponent(emailAddress),
                                type: 'GET',
                                headers: {
                                    'ApplicationOrigin': pc.api.applicationOrigin
                                },
                                dataType: 'json',
                                contentType: 'application/json'
                            }).always(function (mlResponse) {
                                if (typeof pc.ml !== 'undefined'
                                    && typeof mlResponse !== 'undefined'
                                    && mlResponse.StatusCode === 200
                                    && typeof mlResponse.MemberLevel !== 'undefined'
                                    && mlResponse.MemberLevel !== null
                                    && mlResponse.MemberLevel !== -1) {
                                    // member level returned
                                    if (mlResponse.MemberLevel.toString() === pc.ml.f) {
                                        // free member

                                        $.ajax({
                                            type: 'POST',
                                            headers: {
                                                'ApplicationOrigin': pc.api.applicationOrigin
                                            },
                                            url: pc.api.members + 'api/member/Login?circuitId=' + pc.api.circuit,
                                            dataType: 'json',
                                            contentType: 'application/json',
                                            data: JSON.stringify({
                                                Username: emailAddress,
                                                Password: ''
                                            })
                                        }).always(function (data) {
                                            if (typeof data !== 'undefined' && data.StatusCode === 200 && data.PeachCode === 0) {
                                                subscData.UserSessionId = data.MemberDetails.UserSessionId;
                                                subscData.MemberId = data.MemberDetails.MemberId;
                                                $.ajax({
                                                    type: "POST",
                                                    headers: {
                                                        'ApplicationOrigin': pc.api.applicationOrigin
                                                    },
                                                    contentType: 'application/json',
                                                    dataType: 'json',
                                                    url: pc.api.members + 'api/Member/Edit/?circuitId=' + pc.api.circuit,
                                                    data: JSON.stringify(subscData),
                                                    crossDomain: true
                                                }).always(function (editData) {
                                                    if (typeof editData !== 'undefined' && editData !== null && editData.StatusCode === 200) {
                                                        showSuccess();
                                                    }
                                                    else {
                                                        showFail();
                                                    }
                                                });
                                            }
                                            else {
                                                showFail();
                                            }
                                        });
                                    }
                                    else {
                                        showMember();
                                    }
                                }
                                else {
                                    showFail();
                                }
                            });
                        }
                        else {
                            showFail();
                        }
                    }
                    else {
                        showFail();
                    }
                });
            };
        }
    })();
    // create online
    /*
    (function () {
        pc.Loyalty.CreateOnline = function () {
            var userName = $('#loyalty-userId').val(),
                password = $('#online-loyalty-password').val(),
                userEmail = $('#loyalty-emailaddress').val(),
                cardNumber = $('#loyalty-membershipcard').val();

            $.ajax({ url: pc.api.members + 'api/Member/AssignMemberLogin?circuitId=' + pc.api.circuit + '&userName=' + userName + '&password=' + password + '&emailAddress=' + userEmail + '&membershipCardNumber=' + cardNumber })
              .done(function (data) {
                  if (data.StatusCode == 200) {
                      $.ajax({ url: '/membership/SendWebAccountActivationCode?memberId=' + data.MemberDetails.MemberId + '&memberUserName=' + data.MemberDetails.UserName + '&emailAddress=' + data.MemberDetails.EmailAddress + '&activationCode=' + data.ActivationCode })
                          .done(function (data) {
                              $('[data-form="loyalty-create-online"]').hide();
                              $('[create-online-success-msg]').show();

                          })
                          .fail(function (data) {
                              // $('[data-passReset-servererror]').show()
                          });
                  }
                  else {
                      alert("There was an issue logging you in. Please double check your details and try again.");
                  }
              })
              .fail(function (data) {
                  alert("There was an issue logging you in. Please double check your details and try again.");
              });
        }

        if ($('[create-online-activation]').length > 0) {

            var getCinemaList = $.get(pc.api.members + 'api/Data/GetCinemas/?circuitId=' + pc.api.circuit)
                    .done(function (data) {
                        if (data) {
                            var listItems = [],
                              $list = $('[data-loyalty-list-preferredcinema]');

                            listItems.push('<option value="' + "" + '">' + "Choose your Venue" + '</option>');

                            if (typeof pc.excludeCinemas !== 'undefined') {
                                for (var c = data.length - 1; c >= 0; c--) {
                                    if (typeof pc.excludeCinemas[data[c].Id] !== 'undefined') {
                                        data.splice(c, 1);
                                    }
                                }
                            }

                            for (var j = 0, len = data.length; j < len; j += 1) {
                                listItems.push('<option value="' + data[j].Id + '">' + data[j].CinemaName + '</option>');
                            }

                            $list.html(listItems.join(''));
                        }
                    });
            // build DOB year options
            var select = $("select[name='LoyaltyDetails-DOB-Year']");
            var year = new Date().getFullYear();

            for (var i = year, len = year - 115; i >= len; --i) {
                var option = '<option value="' + i + '">' + i + '</option>';
                select.append(option);
            }
        }
    })();
    */

    (function () {
        var $page = $('[data-everybody]');
        var $form = $('[data-form="loyalty-create-free"]');
        var EveryBodyDescription;

        if ($page.length === 0 || $form.length === 0) {
            return;
        }

        EveryBodyDescription = $page.attr('data-everybody');

        L.setupForm();

        // everybody free membership
        pc.Loyalty.CreateFree = function () {
            
            var concessionItem;

            var formData = L.getFormData();
            
            var memberCreationRequest = {
                UserSessionId: null,
                ClubId: formData.ClubId,
                MemberId: null,
                Username: formData.EmailAddress,
                Email: formData.EmailAddress,
                Password: formData.Password,
                Firstname: formData.Firstname,
                Lastname: formData.Lastname,
                SendNewsletter: formData.SendNewsletter,
                ContactByThirdParty: formData.ContactByThirdParty,
                PreferredCinemaId: formData.PreferredCinemaId
            };

            var $successMessage = $('[data-everybody-success]');
            var $memberMessage = $('[data-modalbg],[data-everybody-member]');
            var $errorMessage = $('[data-modalbg],[data-everybody-error]');

            $memberMessage.hide();
            $errorMessage.hide();

            L.showLoad();

            // get concessions
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + 'api/Member/GetMembershipPrograms?circuitId=' + pc.api.circuit,
                crossDomain: true
            }).always(function (data) {
                //console.log(data);

                // check we have concessions
                if (
                    typeof data === 'undefined' ||
                    data === null ||
                    typeof data.ListConcessionGrouping === 'undefined' ||
                    data.ListConcessionGrouping === null ||
                    data.ListConcessionGrouping.length === 0
                ) {
                    $errorMessage.show();
                    L.hideLoad();
                    return;
                }

                groupLoop: for (var g = 0; g < data.ListConcessionGrouping.length; g++) {
                    if (
                        typeof data.ListConcessionGrouping[g].Items === 'undefined' ||
                        data.ListConcessionGrouping[g].Items === null ||
                        data.ListConcessionGrouping[g].Items.length === 0
                    ) {
                        continue;
                    }

                    for (var i = 0; i < data.ListConcessionGrouping[g].Items.length; i++) {
                        if (
                            typeof data.ListConcessionGrouping[g].Items[i].Description === 'undefined' ||
                            data.ListConcessionGrouping[g].Items[i].Description === null ||
                            data.ListConcessionGrouping[g].Items[i].Description !== EveryBodyDescription
                        ) {
                            continue;
                        }

                        data.ListConcessionGrouping[g].Items[i].parentTitle = data.ListConcessionGrouping[g].Title;

                        concessionItem = $.extend({}, data.ListConcessionGrouping[g].Items[i]);
                        break groupLoop;
                    }

                }

                if (typeof concessionItem === 'undefined') {
                    $errorMessage.show();
                    L.hideLoad();
                    return;
                }

                concessionItem.Quantity = 1;

                $.ajax({
                    url: '/Membership/CreateFreeMember',
                    type: 'POST',
                    headers: {
                        'ApplicationOrigin': pc.api.applicationOrigin
                    },
                    contentType: 'application/json',
                    dataType: 'json',
                    data: JSON.stringify({
                        memberCreationRequest: memberCreationRequest,
                        concessionItem: concessionItem,
                        ParentTitle: concessionItem.parentTitle
                    })
                }).always(function (response) {
                    if (typeof response !== 'undefined' && response !== null && typeof response.StatusCode !== 'undefined' && response.StatusCode === 200) {
                        $form.addClass('dn');
                        $successMessage.removeClass('dn');
                    }
                    else if (typeof response !== 'undefined' && response !== null && typeof response.PeachErrorCode !== 'undefined' && response.PeachErrorCode === 'Membership Already Exists') {
                        $memberMessage.show();
                    }
                    else {
                        $errorMessage.show();
                    }

                    L.hideLoad();
                });
            });
        };

        $('[data-everybody-member-close]').on('click', function (e) {
            e.preventDefault();
            $('[data-everybody-member],[data-modalbg]').hide();
        });

        $('[data-everybody-error-close]').on('click', function (e) {
            e.preventDefault();
            $('[data-everybody-error],[data-modalbg]').hide();
        });
    })();

    (function () {
        // app check for logged in state and if login form available
        if (
            typeof evm !== 'undefined' &&
            evm !== null &&
            typeof evm.membership !== 'undefined' &&
            evm.membership !== null &&
            typeof evm.membership.pageLoaded !== 'undefined' &&
            evm.membership.pageLoaded !== null &&
            typeof pc !== 'undefined' &&
            pc !== null &&
            typeof pc.Authentication !== 'undefined' &&
            pc.Authentication !== null &&
            typeof pc.Authentication.HasLogin !== 'undefined' &&
            pc.Authentication.HasLogin !== null
        ) {

            var loginFormIsAvailable = document.querySelectorAll('[data-app-loyalty-signin-form]') !== null ? true : false;

            evm.membership.pageLoaded(pc.Authentication.HasLogin, loginFormIsAvailable);
        }
    })();

    (function () {
        // app auto login
        window.webediaLoyaltyLogin = function (username, password) {
            $.ajax({
                type: 'POST',
                url: '/membership/CompleteSignIn',
                dataType: 'json',
                contentType: 'application/json',
                data: JSON.stringify({
                    Username: username,
                    Password: password
                })
            }).always(function (data) {
                var isSuccess = false;
                var message = '';
                var isExpired = false;

                if (typeof data !== 'undefined' && data !== null) {
                    if (data.PeachCode === 0) {
                        isSuccess = true;
                    }

                    if (data.Result === 4 && data.ResultMessage === "Member account lapsed") {
                        isExpired = true;
                    }

                    if (
                        typeof data.MemberDetails !== 'undefined' &&
                        data.MemberDetails !== null &&
                        typeof data.MemberDetails.MemberLevelId !== 'undefined' &&
                        data.MemberDetails.MemberLevelId !== null &&
                        data.MemberDetails.MemberLevelId.toString() === pc.ml.e
                    ) {
                        isExpired = true;
                    }

                    if (!isSuccess && isExpired) {
                        message = 'Sorry your membership has now expired, to continue enjoying the great Everyman membership benefits, please purchase a new membership.';
                    }
                }

                if (!isSuccess && message === '') {
                    message = 'Incorrect Username and/or Password';
                }

                if (isSuccess) {
                    window.location.href = L.loyaltyUrl.Account;
                } else {
                    if (
                        typeof evm !== 'undefined' &&
                        evm !== null &&
                        typeof evm.membership !== 'undefined' &&
                        evm.membership !== null &&
                        typeof evm.membership.authenticationError !== 'undefined' &&
                        evm.membership.authenticationError !== null
                    ) {
                        evm.membership.authenticationError(message);
                    }
                }
            });
        };
    })();

    (function () {
        // app signout button
        var signoutButton;

        if (typeof pc.device === 'undefined' || pc.device === null || typeof pc.device.iosApp === 'undefined' || pc.device.iosApp === null || pc.device.iosApp === false) {
            return;
        }

        signoutButton = document.querySelectorAll('[data-app-loyalty-signout]');

        if (signoutButton === null) {
            return;
        }

        signoutButton.forEach(function (button) {
            button.addEventListener('click', function (e) {
                e.preventDefault();

                this.disabled = true;

                document.querySelector('[data-loyalty-load]').style.display = 'block';

                fetch(L.loyaltyUrl.SignOut).then(function () {

                    if (
                        typeof evm !== 'undefined' &&
                        evm !== null &&
                        typeof evm.membership !== 'undefined' &&
                        evm.membership !== null &&
                        typeof evm.membership.logout !== 'undefined' &&
                        evm.membership.logout !== null
                    ) {
                        evm.membership.logout();
                    }

                    window.location.href = L.loyaltyUrl.SignIn;

                });

            }, false);
        });
    })();

})(jQuery);;var pc = pc || {};

pc.book = {};

// booking functionality
(function ($) {

    if ($('[data-book]').length === 0) {
        return;
    }

    var book = {};

    pc.book.submit = submitBooking;

    pc.book.submithosted = submitBookingHosted;

    // setup objects
    book.page = {};
    book.currentpage = '';
    book.order = {};

    book.user = {};
    book.user.UserSessionId = null;

    book.cinemaid = '';
    book.screen = '';
    book.sessionid = '';
    book.orderid = '';

    book.api = {};
    book.api.tickets = {};
    book.api.seats = {};

    book.tickets = {};
    book.tickets.orderState = {};

    book.seats = {};

    // templates
    book.temp = {};
    book.temp.tickets = '';
    book.temp.seats = '';
    book.temp.labels = '';
    book.temp.promo = '';
    book.temp.order = '';
    book.temp.film = '';
    book.temp.cinema = '';
    // payment - set to true at the moment
    book.useAdyen = true;
    book.adyenConfiguration = {};
    book.isAdyenRedirect = false;

    // data
    book.data = {};
    book.data.order = {};
    book.data.tickets = {};
    book.data.seats = {};
    book.data.seatsAvailable = false;
    book.data.cinema = {};
    book.data.firstName = '';
    book.data.lastName = '';
    book.data.email = '';
    book.data.phone = '';

    book.basket = {};
    book.basket.tickets = [];

    book.basket.total = 0;
    book.basket.subTotal = 0;
    book.basket.bookingFee = 0;

    pc.partpayment = false;
    pc.partpaymentObj = {};
    pc.partpaymentObj.CardNumber = '';
    pc.partpaymentObj.CardValue = '';

    book.skipSofaRule = false;

    book.paymentType = "Standard";

    book.isApplePay = false;
    book.allowSplitPayment = typeof pc.featureflag !== 'undefined' ? pc.featureflag.allowSplitPayment : true;

    book.app = {};
    book.app.apiVersion = 3;
    book.app.merchantId = typeof pc.ap !== 'undefined' ? pc.ap.mid : undefined;

    var screenVideo = document.querySelector('[data-book-seats-screen-video]');
    var screenClip = document.querySelector('[data-book-seats-screen-clip]');
    var screenImage = document.querySelector('[data-book-seats-screen-image]');
    var screenVideoEnded = false;
    var screenVideoLast = false;
    var screenVideoPlay = undefined;
    var screenClipPlay = undefined;

    var screenClipLength = 4000; //ms
    var screenDelay = '1000ms';
    var screenDuration = '1000ms';

    if (screenVideo !== null) {
        screenImage.style.webkitTransitionDelay = screenDelay;
        screenImage.style.transitionDelay = screenDelay;
        screenImage.style.webkitTransitionDuration = screenDuration;
        screenImage.style.transitionDuration = screenDuration;

        screenVideoPlay = function () {
            screenVideoLast = true;
            screenVideo.pause();
            screenVideo.currentTime = 0;
            screenVideo.loop = false;
            screenVideo.play();
        };

        screenVideo.pause();
        screenVideo.currentTime = 0;

        screenVideo.addEventListener('ended', function () {
            if (!screenVideoEnded && screenVideoLast) {
                screenVideoEnded = true;
                screenImage.style.opacity = 1;
                screenVideo.pause();
            }
        });
    }
    else if (screenClip !== null) {
        screenImage.style.webkitTransitionDelay = screenDelay;
        screenImage.style.transitionDelay = screenDelay;
        screenImage.style.webkitTransitionDuration = screenDuration;
        screenImage.style.transitionDuration = screenDuration;

        var tempImage = new Image();
        tempImage.src = screenClip.getAttribute('data-src');

        screenClipPlay = function () {
            screenClip.src = screenClip.getAttribute('data-src');
            setTimeout(function () {
                screenImage.style.opacity = 1;
            }, screenClipLength);
        };
    }
    else if (screenImage !== null) {
        screenImage.style.opacity = 1;
    }

    function CustomAlert() {
        this.show = function (dialog) {
            var winW = window.innerWidth;
            var winH = window.innerHeight;
            var dialogOverlay = document.getElementById('dialog-overlay');
            var dialogBox = document.getElementById('dialog-box');

            dialogOverlay.style.display = "block";
            dialogOverlay.style.height = winH + "px";
            //dialogBox.style.left = ((winW / 2) - (550 / 2)) + "px";
            //dialogBox.style.top = "50%";
            dialogBox.style.display = "block";

            document.getElementById('dialog-box-body').innerHTML = dialog;

            $('[data-close-custom-box]').off('click').on('click', function (e) {
                e.preventDefault();
                document.getElementById('dialog-box').style.display = "none";
                document.getElementById('dialog-overlay').style.display = "none";
            });

        };
    }



    function setup() {
        var urlPath = window.location.pathname,
            urlPathSplit = [];

        // setup the back to showtimes
        var $bookLinkBack = $('[data-book-link-back]');
        if ($bookLinkBack.length > 0) {
            bookLinkBack();
        }

        // get details
        if (urlPath.indexOf('/') > -1) {

            urlPathSplit = urlPath.split('/');

            if (urlPathSplit.length > 3) {

                book.sessionid = urlPathSplit[3];

                showLoad();

                // we need requirejs for booking api scripts
                $.when(
                    $.getScript('/themes/theme_everyman/content/js/BookingScripts/require.js')
                ).done(function () {
                    // get booking api scripts
                    require.config({
                        paths: {
                            jquery: '/themes/default/content/vendor/jquery/jquery',
                            httprequest: '/themes/theme_everyman/content/js/BookingScripts/HTTPRequest',
                            peachlogger: '/themes/theme_everyman/content/js/BookingScripts/PeachLogger',
                            ticketbookingclient: '/themes/theme_everyman/content/js/BookingScripts/TicketBookingClient',
                            seatbooking: '/themes/theme_everyman/content/js/BookingScripts/SeatBooking',
                            sessionmanager: '/themes/theme_everyman/content/js/BookingScripts/SessionManager'
                        }
                    });

                    require(['ticketbookingclient', 'seatbooking'], function (ticketBookingClient, SeatBooking) {

                        var $tabLinks = $('[data-tab-link]'),
                            $tabs = $('[data-tab-item]');

                        // update tab links click event to add disabled class to previous links
                        $tabLinks.on('click', function (e) {
                            var $link = $(this),
                                linkHash = this.hash || '';

                            e.preventDefault();

                            //hideGC();

                            if ($link.hasClass('disabled') === false && $link.hasClass('active') === false && linkHash !== '') {
                                $tabLinks.filter('.active').removeClass('active');
                                $link.addClass('active');

                                $tabs.filter('.active').removeClass('active');
                                $tabs.filter('[data-tab-item="' + linkHash + '"]').addClass('active');

                                $tabLinks.removeClass('back backNext');
                                $tabLinks.filter(':gt(' + $tabLinks.index($(this)) + ')').addClass('disabled');

                                switch (this.hash) {
                                    case '#login':
                                        loginUserRefreshFail();
                                        hideOrderExtras();
                                        hideOrderTitckets();
                                        break;
                                    case '#tickets':
                                        hideGC();
                                        break;
                                    case '#seats':

                                        break;
                                    case '#payment':
                                        $(this).addClass('backNext');
                                        $(this).prevAll('[data-tab-link]:not(".disabled")').first().addClass('back');
                                        break;
                                }
                            }
                        });

                        // we have booking api scripts, we can now proceed
                        book.api.tickets = ticketBookingClient;
                        book.api.seats = SeatBooking;

                        if (pc.Authentication.HasLogin) {
                            $.ajax({
                                type: "GET",
                                headers: {
                                    'ApplicationOrigin': pc.api.applicationOrigin
                                },
                                contentType: 'application/json',
                                dataType: 'json',
                                url: pc.api.members + 'api/Member/GetMemberDetailsFull?circuitId=' + pc.api.circuit + '&userSessionId=' + pc.Authentication.UserSessionId,
                                crossDomain: true
                            }).always(function (data) {
                                if (data !== null && typeof data.MemberDetails !== 'undefined' && data.MemberDetails !== null) {
                                    if (typeof pc.Loyalty === 'undefined') {
                                        pc.Loyalty = {};
                                    }

                                    pc.Loyalty.Member = data;

                                    $('[data-newsletter-checkbox]').prop('checked', data.MemberDetails.SendNewsletter ? data.MemberDetails.SendNewsletter : false);
                                    $('[data-newsletterevents-checkbox]').prop('checked', data.MemberDetails.ContactByThirdParty ? data.MemberDetails.ContactByThirdParty : false);
                                }
                                setupOrder(true);
                            });
                        }
                        else {
                            setupOrder(true);
                        }
                    });
                });
            }
        }
    }

    $(document).on('click', '[data-book-page-info-link]', function (e) {
        e.preventDefault();
        $('[data-modalbg],[data-book-page-info-popup]').show();
    });
    $('[data-book-page-info-popup-close]').on('click', function (e) {
        e.preventDefault();
        $('[data-modalbg],[data-book-page-info-popup]').hide();
    });
    $('[data-book-page-maxtickets-lockdown-close]').on('click', function (e) {
        e.preventDefault();
        $('[data-modalbg],[data-book-page-max-tickets-lockdown]').hide();
    });

    $('[data-book-page-key-link]').on('click', function (e) {
        e.preventDefault();
        $('[data-modalbg],[data-book-page-key-popup]').show();
    });
    $('[data-book-page-key-popup-close]').on('click', function (e) {
        e.preventDefault();
        $('[data-modalbg],[data-book-page-key-popup]').hide();
    });

    $('[data-seat-desc-togg]').on('click', function (e) {
        e.preventDefault();

        $('[data-modalBg]').show();

        $('[data-seating-descript]').show();

        window.scrollTo(0, 0);
    });

    $('[data-seating-descript-close]').on('click', function (e) {
        e.preventDefault();
        $('[data-seating-descript]').hide();
        $('[data-modalBg]').hide();

    });

    $('[data-seating-descript],[data-voucher-terms]').on('click', function (e) {
        if (event.target.className === 'seatDescriptionOuter') {
            $('[data-seating-descript],[data-voucher-terms]').hide();
            $('[data-modalBg]').hide();
        }
    });

    $('[data-continue-to-booking]').off().on('click', function (e) {
        e.preventDefault();
        showLoad();
        changePage('tickets');
    });

    $("#login-submit").on("click", function (e) {
        e.preventDefault();

        $form = $('[data-form]').attr('data-form');

        showLoad();

        var username = $("#login-username").val() || '',
            password = $("#login-password").val() || '';

        // check inputs have data entered
        if (username.length === 0 || password.length === 0) {
            loginUserFail();

            return false;
        }

        loginUser(username, password);
    });

    $('[data-book-ticket-show]').on('click', function (e) {
        e.preventDefault();

        $('[data-book-tickets] .book-ticket:gt(1)').each(function () {
            $(this).css('display', 'none').slideDown(400);
        });

        $('[data-book-page="tickets"]').removeClass('hideTickets');
    });

    $('[data-close-lapsed-pop]').on('click', function (e) {
        e.preventDefault();
        $('[data-lapsed-pop],[data-loyalty-load],#blackoutPage').hide();
    });

    $('[data-book-retry]').on('click', function (e) {
        e.preventDefault();
        showLoad();
        sessionStorage.setItem('tempDevice', JSON.stringify(pc.device));
        window.location.reload();
    });

    $('[data-newsletter-checkbox]').on('change', function () {
        $('[data-newsletter-checkbox]').prop('checked', this.checked);
    });
    $('[data-newsletterevents-checkbox]').on('change', function () {
        $('[data-newsletterevents-checkbox]').prop('checked', this.checked);
    });

    $('[data-book-page="payment"] [name="phone"]').on('keyup', function () {
        this.value = this.value.replace(/[^0-9\.]/g, '');
    });

    function loginUser(username, password) {
        if (pc.Authentication.HasLogin) {
            // already logged in go to select tickets

            book.tickets.orderState.UserSessionId = pc.Authentication.UserSessionId;
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + "api/member/RefreshLogin/" + pc.Authentication.MemberId + "/?circuitId=" + pc.api.circuit,
                crossDomain: true
            })
                .done(loginUserRefreshSuccess)
                .fail(loginUserRefreshFail);
        }
        else if (typeof username !== 'undefined' && typeof password !== 'undefined') {
            // loginData passed
            $.ajax({
                type: 'POST',
                url: '/membership/CompleteSignIn',
                dataType: 'json',
                contentType: 'application/json',
                data: JSON.stringify({
                    Username: username,
                    Password: password
                })
            }).always(function (response) {
                if (typeof response !== 'undefined' && response.StatusCode === 200) {

                    var firstname = "";
                    var memberid = "";

                    if (
                        typeof response.MemberDetails !== 'undefined' &&
                        response.MemberDetails !== null
                    ) {
                        firstname = response.MemberDetails.FirstName;
                        memberid = response.MemberDetails.MemberId;
                    }

                    if (
                        typeof evm !== 'undefined' &&
                        evm !== null &&
                        typeof evm.membership !== 'undefined' &&
                        evm.membership !== null &&
                        typeof evm.membership.handleCredentials !== 'undefined' &&
                        evm.membership.handleCredentials !== null
                    ) {
                        evm.membership.handleCredentials(username, password, firstname, memberid);
                    }

                    loginUserSuccess(response);
                }
                else {
                    loginUserFail(response);
                }
            });
        }
        else {
            // not logged in show login screen
            changePage('login');
        }
    }

    function loginUserRefreshSuccess(data) {
        // login success
        book.tickets.orderState.UserSessionId = pc.Authentication.UserSessionId;

        displayUserInfo();

        changePage('tickets');

        hideLoad();
    }

    function loginUserRefreshFail() {
        // login refresh fail
        sessionStorage.removeItem('userLogin');

        if (typeof docCookies !== 'undefined') {
            docCookies.removeItem('userRemember');
        }

        book.tickets.orderState.UserSessionId = "";

        pc.Authentication = {
            'HasLogin': false
        };

        $('[data-book-page="payment"] [name="firstname"]').val('');
        $('[data-book-page="payment"] [name="lastname"]').val('');
        $('[data-book-page="payment"] [name="email"]').val('');
        $('[data-book-page="payment"] [name="phone"]').val('');

        changePage('login');
        hideLoad();
    }

    function loginUserSuccess(data) {
        // login success, reload page  
        showLoad();
        sessionStorage.setItem('tempDevice', JSON.stringify(pc.device));
        window.location.reload();
    }

    function loginUserFail(data) {
        // login fail when using login form

        if (typeof data !== 'undefined' &&
            data !== null &&
            typeof data.MemberDetails !== 'undefined' &&
            data.MemberDetails !== null &&
            typeof data.MemberDetails.MemberLevelId !== 'undefined' &&
            data.MemberDetails.MemberLevelId !== null &&
            data.MemberDetails.MemberLevelId.toString() === pc.ml.e) {
            // check for expired memeber
            $('[data-lapsed-pop],#blackoutPage').show();
            hideLoad();
            return;
        }

        var Alert = new CustomAlert();
        Alert.show('Please make sure your username and password are correct.');
        hideLoad();
    }

    function displayUserInfo() {
        /*
        $loginInfo = $(".sign-in-name");
        $userPoints = $(".user-points");
        $("#loyalty-points").show();
        $loginInfo.text(pc.Authentication.FirstName + " " + pc.Authentication.LastName);
        $userPoints.text(pc.Authentication.Balances[0].Total);
        */
    }

    function changePage(page) {
        //$('html,body').animate({ scrollTop: $('.booking_section').offset().top - 120 });

        var $pages = $('[data-book-page]'),
            $curPage,
            $newPage,
            $tabLinks = $('[data-tab-link]'),
            newTab,
            $newTab;

        // check step exists then carry out function
        if (typeof book.page[page] !== 'undefined' && $pages.length > 0) {
            // save current page
            book.currentpage = page;

            $curPage = $pages.filter('.active');
            $newPage = $pages.filter('[data-book-page="' + page + '"]');

            if ($newPage.hasClass('active') === false) {

                // Make page active
                $curPage.removeClass('active');
                $newPage.addClass('active');

                newTab = $newPage.attr('data-tab-item');

                $tabLinks.removeClass('active back backNext');
                $newTab = $tabLinks.filter('[href="' + newTab + '"]');
                $newTab.removeClass('disabled').addClass('active');

                switch (newTab) {
                    case '#tickets':
                        if (pc.Authentication.HasLogin) {
                            book.tickets.orderState.UserSessionId = pc.Authentication.UserSessionId;
                        }
                        break;
                    case '#seats':
                        $('[data-book-boookFee],[data-book-subTotal]').show();
                        break;
                    case '#payment':
                        $newTab.addClass('backNext');
                        $newTab.prevAll('[data-tab-link]:not(".disabled")').first().addClass('back');
                        break;
                    case '#confirmation':
                        if (typeof peach !== 'undefined' && typeof peach.maps !== 'undefined' && typeof peach.maps.recenter !== 'undefined' && $('[data-map]').length > 0) {
                            peach.maps.recenter();
                        }
                        $('[data-conf-message-top]').show();
                        $('.topTabLinks').addClass('confirm');
                        break;
                }
            }

            // call page function
            book.page[page]();

            if (typeof pc.lazyloadsetup !== 'undefined') {
                pc.lazyloadsetup();
            }

            window.scrollTo(0, 0);

            pageTrack(page);
        }
    }

    function pageTrack(page) {
        // track page view        
        var tempTrack;

        switch (page) {
            case 'login':
                tempTrack = {
                    'virtualPageURL': '/booking/reward-login',
                    'virtualPageTitle': 'Reward Login',
                    'stepName': 'reward-login',
                    'ecommerce': {
                        'checkout': {
                            'actionField': {
                                'step': 1,
                                'affiliation': filmData.Sessions[0].Times[0].CinemaName
                            }
                        }
                    }
                };

                break;
            case 'tickets':
                tempTrack = {
                    'stepName': 'select-tickets',
                    'ecommerce': {
                        'checkout': {
                            'actionField': {
                                'step': 2,
                                'affiliation': filmData.Sessions[0].Times[0].CinemaName
                            }
                        }
                    }
                };

                if (pc.Authentication.HasLogin) {
                    tempTrack.virtualPageURL = 'booking/member-select-tickets';
                    tempTrack.virtualPageTitle = 'Member Select Tickets';
                } else {
                    tempTrack.virtualPageURL = 'booking/guest-select-ticket';
                    tempTrack.virtualPageTitle = 'Guest Select Tickets';
                }
                break;
            case 'seats':
                tempTrack = {
                    'stepName': 'select-seats',
                    'ecommerce': {
                        'checkout': {
                            'actionField': {
                                'step': 3,
                                'affiliation': filmData.Sessions[0].Times[0].CinemaName
                            }
                        }
                    }
                };

                if (pc.Authentication.HasLogin) {
                    tempTrack.virtualPageURL = 'booking/Member-choose-seats';
                    tempTrack.virtualPageTitle = 'Member Choose Seats';
                } else {
                    tempTrack.virtualPageURL = 'booking/guest-choose-seats';
                    tempTrack.virtualPageTitle = 'Guest Choose Seats';
                }
                break;
            case 'payment':
                tempTrack = {
                    'stepName': 'payment-details',
                    'ecommerce': {
                        'checkout': {
                            'actionField': {
                                'step': 4,
                                'affiliation': filmData.Sessions[0].Times[0].CinemaName
                            }
                        }
                    }
                };

                if (pc.Authentication.HasLogin) {
                    tempTrack.virtualPageURL = 'booking/member-payment';
                    tempTrack.virtualPageTitle = 'member Secure Payment';
                } else {
                    tempTrack.virtualPageURL = 'booking/guest-payment';
                    tempTrack.virtualPageTitle = 'Guest Secure Payment';
                }
                break;
            case 'confirmation':
                // track later once we have data
                break;
            case 'timeout':
                tempTrack = {
                    'virtualPageURL': '/booking/timeout',
                    'virtualPageTitle': 'Payment Process Timeout'
                };
                break;
            case 'errorfilmdata':
            case 'error':
                tempTrack = {
                    'virtualPageURL': '/booking/error',
                    'virtualPageTitle': 'Payment Process Error'
                };
                break;
        }

        if (typeof tempTrack !== 'undefined') {
            // logged in status
            if (pc.Authentication.HasLogin) {
                tempTrack['visitorStatus'] = 'loggedin';
                tempTrack['customerType'] = 'Reward Member';
                tempTrack['userID'] = pc.Authentication.MemberId;
            }
            else {
                tempTrack['visitorStatus'] = 'loggedoff';
            }

            // order status
            if (typeof book.data.order !== 'undefined') {
                var pTickets = [];

                if (typeof tempTrack['ecommerce'] === 'undefined') {
                    tempTrack['ecommerce'] = {};
                }

                tempTrack['ecommerce']['products'] = [];

                if (typeof book.data.order.Tickets !== 'undefined') {
                    pTickets = book.data.order.Tickets;
                }
                else if (typeof book.data.order.TicketsRequired !== 'undefined') {
                    pTickets = book.data.order.TicketsRequired;
                }

                if (pTickets.length > 0) {
                    $.each(pTickets, function (ticketIndex, ticketValue) {
                        if (ticketValue.Quantity > 0) {
                            var coupon = '';

                            if (typeof ticketValue.VoucherCode !== 'undefined' && ticketValue.VoucherCode !== '') {
                                coupon = ticketValue.DisplayName;
                            }

                            tempTrack['ecommerce']['products'].push({
                                'name': book.data.order.Title,
                                'id': book.data.order.FilmId,
                                'category': 'film',
                                'price': (parseFloat(ticketValue.Price) / 100).toFixed(2),
                                'quantity': ticketValue.Quantity,
                                'variant': ticketValue.DisplayName,
                                'coupon': coupon
                            });
                        }
                    });
                }
                else {
                    tempTrack['ecommerce']['products'].push({
                        'name': book.data.order.Title,
                        'id': book.data.order.FilmId,
                        'category': 'film'
                    });
                }
            }

            if (typeof book.tickets.orderState.BookingFee !== 'undefined' && book.tickets.orderState.BookingFee > 0) {
                tempTrack['ecommerce']['products'].push({
                    'name': 'Booking Fee',
                    'id': '0',
                    'category': 'ticket',
                    'price': (parseFloat(book.tickets.orderState.BookingFee) / 100).toFixed(2),
                    'quantity': 1,
                    'variant': 'Booking Fee'
                });
            }

            tempTrack['event'] = 'VirtualPageview';

            gaTrack(tempTrack);
        }
    }

    function disableTabs(except) {
        var $tabLinks = $('[data-tab-link]');

        if (except) {
            $tabLinks = $tabLinks.not('[href="' + except + '"]');
        }
        else {
            $('[data-book-tabs]').addClass('disabled');
        }

        $tabLinks.removeClass('active back backNext').addClass('disabled');
    }

    book.page.login = function () {
        disableTabs('#login');

        hideLoad();
    };

    book.page.tickets = function () {
        var $ticketSubmit = $('[data-book-tickets-submit]');

        if (!pc.Authentication.HasLogin) {
            $('[data-booking-member-login]').addClass('loggedIn');
        }
        else {
            $('[data-booking-member-loggedin-name]').text(pc.Authentication.FirstName);
            $('[data-booking-member-loggedin-welcome]').addClass('loggedIn').closest('.book-page').addClass('is-loggedin');
        }

        $('[data-booking-loyalty-toggle]').on('click', function () {
            $('[data-booking-member-login]').toggleClass('active', 'slow');
            //$('[data-book-page="tickets"]').toggleClass('active', 'slow');
        });
        // ticket submit click event
        $ticketSubmit.off('click').on('click', function (e) {
	        var screenFound = false,
		        currentLocation = $('[data-book-cinema-name]').attr('data-book-cinema-name'),
		        thisDate = new Date($('[data-booking-date]').attr('data-booking-date')),
		        locationSettings = null,
		        socialDistancingStart = 0,
                to = new Date("2021-08-23"),
                from = new Date("2021-08-02");
            e.preventDefault();


            if (pc.covidSettings &&
                typeof pc.covidSettings.cinemaSocialDistancingSettings !== 'undefined' &&
                pc.covidSettings.cinemaSocialDistancingSettings.filter(x => x.CinemaName == currentLocation).length > 0) {

	            locationSettings = pc.covidSettings.cinemaSocialDistancingSettings.find(x => x.CinemaName == currentLocation);

                if (locationSettings.DateOfEffect !== null) {
                    socialDistancingStart = new Date(locationSettings.DateOfEffect).getTime()
	            }

            }

            if (locationSettings !== null &&
	            thisDate.getTime() >= socialDistancingStart) {
                book.skipSofaRule = true;
                $('[data-distancing-message]').removeClass('dn');

            }

            showLoad();
            if ((thisDate.getTime() <= to.getTime() && thisDate.getTime() >= from.getTime()) || (currentLocation == "Cardiff")) {
                if ($('[data-bookingmessage-location="' + currentLocation + '"]').length > 0) {
                    $('[data-bookingmessage-location="' + currentLocation + '"]').removeClass('dn');
                    hideLoad();
                    $('[data-bookingmessage]').fadeIn(500);
                    screenFound = true;
                }
            }
            if (typeof pc.mergedvenues !== 'undefined' && pc.mergedvenues !== null && pc.mergedvenues.length > 0) {
                venueLoop: for (var v = 0; v < pc.mergedvenues.length; v++) {
                    if (pc.mergedvenues[v].MergeVenueID.toString() === book.cinemaid.toString()) {
                        cinemaLoop: for (var c = 0; c < pc.mergedvenues[v].MergeCinemas.length; c++) {
                            screenLoop: for (var s = 0; s < pc.mergedvenues[v].MergeCinemas[c].MergeCinemaScreenNames.length; s++) {
                                if (pc.mergedvenues[v].MergeCinemas[c].MergeCinemaScreenNames[s] === book.screen) {
                                    $('[data-bookingmessage-mergedvenuemessage="' + pc.mergedvenues[v].MergeCinemas[c].MergeCinemaName + '"]').removeClass('dn');

                                    hideLoad();

                                    $('[data-bookingmessage]').fadeIn(500);

                                    screenFound = true;

                                    break venueLoop;
                                }
                            }
                        }
                    }
                }
            }

            if (typeof pc.stairmessage !== 'undefined' && pc.stairmessage !== null && pc.stairmessage.length > 0) {
                venueLoop: for (var v2 = 0; v2 < pc.stairmessage.length; v2++) {
                    if (pc.stairmessage[v2].CinemaId.toString() === book.cinemaid.toString() && typeof pc.stairmessage[v2].Screens !== 'undefined' && pc.stairmessage[v2].Screens !== null && pc.stairmessage[v2].Screens.length > 0) {
                        screenLoop: for (var s2 = 0; s2 < pc.stairmessage[v2].Screens.length; s2++) {
                            if (pc.stairmessage[v2].Screens[s2] === book.screen) {

                                var $contain = $('[data-bookingmessage-stairmessage]');

                                $contain.find('[data-bookingmessage-stairmessage-title]').html(pc.stairmessage[v2].Title);
                                $contain.find('[data-bookingmessage-stairmessage-message]').html(pc.stairmessage[v2].Message);

                                $contain.removeClass('dn');

                                hideLoad();

                                $('[data-bookingmessage]').fadeIn(500);

                                screenFound = true;

                                break venueLoop;
                            }
                        }
                    }
                }
            }

            if (screenFound === false) {
                countTickets();
            }
        });

        $('[data-bookingmessage]').off('click').on('click', function (e) {
            if ($(this).has(e.target).length === 0) {
                $('[data-bookingmessage]').fadeOut(500, function () {
                    $('[data-bookingmessage-message]').addClass('dn');
                    showLoad();
                    countTickets();
                });
            }
        });

        $('[data-bookingmessage-close]').off('click').on('click', function (e) {
            $('[data-bookingmessage]').fadeOut(500, function () {
                $('[data-bookingmessage-message]').addClass('dn');
                showLoad();
                countTickets();
            });
        });

        if (pc.Authentication.HasLogin) {
            $.ajax({
                type: "GET",
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                contentType: 'application/json',
                dataType: 'json',
                url: pc.api.members + 'api/member/getnewusersessionid?circuitid=' + pc.api.circuit + '&memberid=' + pc.Authentication.MemberId + '&usersessionid=' + book.tickets.orderState.UserSessionId,
                crossDomain: true
            }).always(function (newUsersessionId) {
                if (typeof newUsersessionId !== 'undefined' && newUsersessionId !== null) {
                    book.tickets.orderState.UserSessionId = newUsersessionId;
                }

                getTickets();
            });
        } else {
            getTickets();
        }
    };

    function getTickets() {
        book.tickets.GetTicketTypes(updateTickets, updateTicketsError);
    }

    book.page.seats = function () {
        window.scrollTo(0, 1); // scrollTo to force screen video to play
        setupSeats();
        toggleInfo();
    };

    book.page.payment = function () {
        setupGiftCard();


        if (typeof pc.Authentication.FirstName !== 'undefined') {
            $('[data-book-page="payment"] [name="firstname"]').val(pc.Authentication.FirstName);
        }

        if (typeof pc.Authentication.LastName !== 'undefined') {
            $('[data-book-page="payment"] [name="lastname"]').val(pc.Authentication.LastName);
        }

        if (typeof pc.Authentication.EmailAddress !== 'undefined') {
            $('[data-book-page="payment"] [name="email"]').val(pc.Authentication.EmailAddress);
        }

        if (
            typeof pc.Loyalty !== 'undefined' &&
            pc.Loyalty !== null &&
            typeof pc.Loyalty.Member !== 'undefined' &&
            pc.Loyalty.Member !== null &&
            typeof pc.Loyalty.Member.MemberDetails !== 'undefined' &&
            pc.Loyalty.Member.MemberDetails !== null
        ) {
            if (
                typeof pc.Loyalty.Member.MemberDetails.PhoneNumber !== 'undefined' &&
                pc.Loyalty.Member.MemberDetails.PhoneNumber !== null &&
                pc.Loyalty.Member.MemberDetails.PhoneNumber !== ''
            ) {
                $('[data-book-page="payment"] [name="phone"]').val(pc.Loyalty.Member.MemberDetails.PhoneNumber);
            }
            else if (
                typeof pc.Loyalty.Member.MemberDetails.MobileNumber !== 'undefined' &&
                pc.Loyalty.Member.MemberDetails.MobileNumber !== null &&
                pc.Loyalty.Member.MemberDetails.MobileNumber !== ''
            ) {
                $('[data-book-page="payment"] [name="phone"]').val(pc.Loyalty.Member.MemberDetails.MobileNumber);
            }
        }

        if (book.basket.total === 0) {
            $('[data-ap-other]').show();
            $('[data-ap-btn], [data-gc-fieldcontain], [data-book-pay-divider], [data-ap-newsletter]').hide();
        }
        else if (typeof book.applePayType !== 'undefined') {
            $('[data-ap-other]').hide();
            $('[data-gc-fieldcontain], [data-book-pay-divider]').show();
            $('[data-ap-btn="' + book.applePayType + '"]').show();
            $('[data-ap-btn="other"]').show();
            $('[data-ap-newsletter]').show();
        }
        else {
            $('[data-ap-other]').show();
            $('[data-gc-fieldcontain]').show();
            $('[data-ap-btn], [data-ap-newsletter]').hide();
        }

        hideLoad();
        toggleInfo();

        // fb tracking
        if (typeof fbq !== 'undefined') {
            fbq(
                'track',
                'InitiateCheckout',
                {
                    content_ids: [filmData.FilmId + '|' + filmData.Sessions[0].Times[0].CinemaId + '|' + filmData.Sessions[0].Date],
                    movieref: location.search.indexOf('movieref=fb_movies') > -1 ? 'fb_movies' : '',
                    num_items: book.basket.tickets.reduce(function (accumulator, currentValue) {
                        return accumulator + parseInt(currentValue.Quantity);
                    }, 0)
                }
            );
        }
    };

    book.page.confirmation = function () {
        setupConfirmation();
        disableTabs('#confirmation');
        hideLoad();
        book.isFinished = true;
    };

    book.page.timeout = function () {
        disableTabs();
        hideLoad();
        book.isFinished = true;
    };

    book.page.error = function () {
        disableTabs();
        hideLoad();
        book.isFinished = true;
    };

    book.page.paymenterror = function () {
        disableTabs();
        hideLoad();
        book.isFinished = true;
    };
    book.page.errorfilmdata = function () {
        disableTabs();
        hideLoad();
        book.isFinished = true;
    };

    function setupOrder(firstTime) {

        if (window.location.hash === '#emptyFilmData') {
            changePage('errorfilmdata');
            return;
        }

        if (typeof filmData !== 'undefined' && typeof filmData.Sessions !== 'undefined') {

            book.data.order = filmData;

            // check we have template
            if (book.temp.order === '') {
                // get template
                $.get('/template?name=BookingOrder&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    // save template
                    book.temp.order = template;
                    addOrder();
                });
            }
            else {
                addOrder();
            }

            // check we have template
            if (book.temp.film === '') {
                // get template
                $.get('/template?name=BookingFilm&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    // save template
                    book.temp.film = template;
                    addFilm();
                });
            }
            else {
                addFilm();
            }

            if (firstTime) {
                book.cinemaid = book.data.order.Sessions[0].Times[0].CinemaId;
                book.screen = book.data.order.Sessions[0].Times[0].Screen;

                var cancelCalls = [];

                // check for localstorage
                if (hasLS()) {
                    // storage event listener to show error message when other tabs open
                    $(window).bind('storage', function (e) {
                        if (
                            typeof e !== 'undefined' &&
                            e !== null &&
                            typeof e.originalEvent !== 'undefined' &&
                            e.originalEvent !== null &&
                            typeof e.originalEvent.key !== 'undefined' &&
                            e.originalEvent.key.indexOf('User_Order_') > -1 &&
                            typeof e.originalEvent.newValue !== 'undefined' &&
                            (e.originalEvent.newValue === null || e.originalEvent.newValue !== e.originalEvent.oldValue) &&
                            typeof book.isFinished === 'undefined' &&
                            (typeof pc.device === 'undefined' || pc.device === null || typeof pc.device.iosApp === 'undefined' || pc.device.iosApp === null || pc.device.iosApp === false)
                        ) {
                            // show error message
                            changePage('timeout');
                        }
                    });

                    // loop localstorage to find open orders
                    for (var ls = 0; ls < localStorage.length; ls++) {
                        if (localStorage.key(ls).indexOf('User_Order_') > -1) {
                            var sID = localStorage.key(ls);
                            var lsData = JSON.parse(localStorage.getItem(sID));

                            if (typeof lsData !== 'undefined' && lsData !== null) {
                                // clear from localstorage
                                localStorage.removeItem(sID);

                                cancelCalls.push({
                                    orderId: lsData.OrderId,
                                    userSessionId: lsData.UserSessionId
                                });
                            }
                        }
                    }
                }
                else if (document.cookie.indexOf('User_Order_') > -1) {
                    // localstorage not working try cookie fallback
                    // loop cookies
                    $.each(document.cookie.split(/; */), function () {
                        var cookieSplit = this.split('=');
                        if (cookieSplit[0].indexOf('User_Order_') > -1) {
                            var sID = cookieSplit[0];
                            var lsData = JSON.parse(docCookies.getItem(sID));

                            if (typeof lsData !== 'undefined' && lsData !== null) {
                                // clear from cookie
                                docCookies.removeItem(sID, '/');

                                cancelCalls.push({
                                    orderId: lsData.OrderId,
                                    userSessionId: lsData.UserSessionId
                                });
                            }
                        }
                    });
                }

                if (cancelCalls.length > 0) {
                    var cancelCallsComplete = cancelCalls.length;

                    cancelCalls.forEach(function (callData) {
                        // cancel order
                        $.ajax({
                            url: pc.api.booking + 'api/Booking/Cancel/' + callData.orderId + '?cinemaId=' + book.cinemaid,
                            type: 'POST',
                            contentType: 'application/json',
                            dataType: 'json',
                            data: JSON.stringify({ "userSessionId": callData.userSessionId, "cinemaId": book.cinemaid })
                        }).always(function () {
                            cancelCallsComplete = cancelCallsComplete - 1;

                            if (cancelCallsComplete === 0) {
                                setupTickets();
                            }
                        });
                    });
                }
                else {
                    setupTickets();
                }
            }
        }
        else {
            changePage('errorfilmdata');
        }
    }

    function setupTickets() {
        // create new booking api object
        book.tickets = new book.api.tickets(pc.api.booking + 'api/', book.cinemaid, book.sessionid, '', timeCountdown, timeOut);

        if (window.location.hash.indexOf('order=') > -1) {
            book.orderid = window.location.hash.substring(window.location.hash.indexOf('order=') + 6);
            // go to confirmation page
            book.isConfirmOnly = true;
            changePage('confirmation');
        } else if (window.location.hash.indexOf('paymenterror') > -1) {
            // go to error page
            changePage('paymenterror');
        }
        else {
            setupTicketVouchers();
            setupCeaCards();
            changePage('tickets');

            // fb tracking
            if (typeof fbq !== 'undefined') {
                fbq(
                    'track',
                    'ViewContent',
                    {
                        content_ids: [filmData.FilmId + '|' + filmData.Sessions[0].Times[0].CinemaId + '|' + filmData.Sessions[0].Date],
                        movieref: location.search.indexOf('movieref=fb_movies') > -1 ? 'fb_movies' : ''
                    }
                );
            }
        }
    }

    function addFilm() {
        var $film = $('[data-book-film]'),
            runtime,
            hour,
            min,
            release,
            expArray = [];

        if ($film.length > 0) {
            /*if (book.data.order.RunTime) {
                // pRuntime
                // 2 hrs. 43 mins.
                runtime = parseFloat(book.data.order.RunTime);
                hour = Math.floor(runtime / 60);
                min = (runtime - (hour * 60));
                book.data.order.pRunTime = hour + ' hrs. ' + min + ' mins.';
                //book.data.order.pRunTime = runtime + ' mins';
            }*/

            if (book.data.order.ReleaseDate) {
                // pReleaseDate
                // mm/dd/yyyy
                release = new Date(book.data.order.ReleaseDate);
                book.data.order.pReleaseDate = release.getMonth() + 1 + '/' + release.getDate() + '/' + release.getFullYear();
            }

            if (book.data.order.Sessions[0].Times[0].Experience) {
                for (var i = 0, exp = book.data.order.Sessions[0].Times[0].Experience, len = exp.length; i < len; i += 1) {
                    expArray.push(exp[i].Name);
                }

                book.data.order.pExperiences = expArray.join(', ');
            }

            // add film
            $film.html(Mustache.to_html(book.temp.film, book.data.order));
        }
    }

    function addOrder() {
        var $order = $('[data-book-order]');
        if ($order.length > 0) {
            // add order
            $order.html(Mustache.to_html(book.temp.order, book.data.order));
            toggleInfo();
        }
    }

    function updateOrder() {
        var $order = $('[data-book-order]');

        if ($order.length > 0) {
            // update order
            book.tickets.Initialise(null, function (data) {
                updateTicketOrder(data);
            });

            updateSeatsOrder();
        }
    }

    function updateSeatsOrder(seats) {
        var allocatedSeats = '';
        if (seats) {
            allocatedSeats = seats;
        }
        else {
            book.tickets.Initialise(null, function (data) {
                // check we have allocated seats
                if (typeof data.AllocatedSeats !== 'undefined' && data.AllocatedSeats !== '') {
                    updateSeatsOrder(data.AllocatedSeats);
                }
            });
        }

        $('[data-book-movie-seats-info]').html(allocatedSeats);

        if (allocatedSeats !== '') {
            $('[data-book-movie-seats]').show();
        }
    }

    function updateTicketOrder(data) {
        var tickets = [],
            orderSubTotal = 0,
            orderTotal = 0,
            pTickets = [];

        if (typeof data.Tickets !== 'undefined') {
            pTickets = data.Tickets;
        }
        else if (typeof data.TicketsRequired !== 'undefined') {
            pTickets = data.TicketsRequired;
        }

        if (pTickets.length > 0) {
            // loop tickets
            $.each(pTickets, function (ticketIndex, ticketValue) {

                if (ticketValue.Quantity > 0) {
                    orderSubTotal += ticketValue.Quantity * ticketValue.Price;

                    tickets.push('<div class="clearfix"><div class="bookMovieField">' + ticketValue.Quantity + '</div><div class="bookMovieLabel"> ' + ticketValue.DisplayName + '</div><div class="bookMovieLabel"> &pound;' + (parseFloat(ticketValue.Price) / 100).toFixed(2) + '</div></div>');
                    //<div class="clearfix"><div class="bookMovieLabel">' + thisVal + '</div><div class="bookMovieField">' + $this.attr('data-book-ticket-displayname') + ' </div><div class="bookMovieLabel"> &pound;' + price + '</div></div>
                }
            });

            var bookingFee = parseFloat(data.BookingFee);

            orderTotal = orderSubTotal + bookingFee;

            // add tickets to order
            if (tickets.length > 0) {
                $('[data-book-movie-tickets-info]').html(tickets.join(''));
                $('[data-book-movie-tickets]').show();
            }

            // update order costs
            $('[data-book-movie-cost-subtotal]').html((orderSubTotal / 100).toFixed(2));
            $('[data-book-subtotal]').removeClass('dn');
            $('[data-book-movie-cost-charge]').html((bookingFee / 100).toFixed(2));
            $('[data-book-movie-cost-total]').html((orderTotal / 100).toFixed(2));

            book.basket.subTotal = orderSubTotal;
            book.basket.bookingFee = bookingFee;
            book.basket.total = orderTotal;

            $('[data-book-movie-cost-hidden]').show();
        }
    }

    function hideOrderTitckets() {
        $('[data-book-movie-tickets]').hide();
        $('[data-book-movie-cost-subtotal]').html('0.00');

        book.basket.subTotal = 0;
    }

    function hideOrderExtras() {
        $('[data-book-movie-cost]').hide();
        $('[data-book-movie-seats]').hide();
        $('[data-book-movie-cost-hidden]').hide();
    }

    function setOverrideDisplayLimit() {
        //Check if the max number of tickets should be overridden at the current cinema.
        //This affects all ticket types.

        pc.overrideDisplayLimit = 0;

        if (typeof pc.cinemaTicketLimitOverrideSettings !== 'undefined' && pc.cinemaTicketLimitOverrideSettings !== null) {
            const currentLocation = $('[data-book-cinema-name]').attr('data-book-cinema-name');
            const currentLocationOverrideSettings = pc.cinemaTicketLimitOverrideSettings.find(x => x.CinemaName === currentLocation);

            if (typeof currentLocationOverrideSettings !== 'undefined' && currentLocationOverrideSettings !== null) {
                pc.overrideDisplayLimit = parseInt(currentLocationOverrideSettings.MaxTicketLimitOverride);
            }
        }
    }

    function updateTickets(data) {
        if (typeof data !== 'undefined' && data !== null && typeof data.TicketTypes !== 'undefined' && data.TicketTypes !== null && data.TicketTypes.length > 0) {
            setOverrideDisplayLimit();

            // we have tickets
            //check if any of the ticket types
            $.each(data.TicketTypes, function (index, value) {
                //check if ticket type display name includes Gold    
                if (typeof data.TicketTypes[index].DisplayName !== 'undefined' && data.TicketTypes[index].DisplayName.indexOf('Gold') > -1) {
                    data.TicketTypes[index].isGold = true;
                }
                // create formatted price property
                data.TicketTypes[index].PriceFormatted = parseFloat(value.Price / 100).toFixed(2);

                var quantityLimit = 6;
                if (pc.overrideDisplayLimit > 0) {
                    quantityLimit = pc.overrideDisplayLimit;
                    data.TicketTypes[index].QuantityLimit = quantityLimit;
                }
                else if (typeof data.TicketTypes[index].QuantityLimit !== 'undefined' && data.TicketTypes[index].QuantityLimit !== null && data.TicketTypes[index].QuantityLimit !== '') {
                    quantityLimit = data.TicketTypes[index].QuantityLimit;
                }

                data.TicketTypes[index].pQuantity = [];

                for (var i = 0, len = quantityLimit + 1; i < len; i++) {
                    data.TicketTypes[index].pQuantity.push({
                        index: i,
                        selected: i === 0
                    });
                }
            });

            // save ticket data for later
            book.data.tickets = data;

            // check we have template
            if (book.temp.tickets === '') {
                // get template
                $.get('/template?name=BookingTickets&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    // save template
                    book.temp.tickets = template;
                    addTickets();
                });
            }
            else {
                addTickets();
            }
        }
        else {
            // no tickets
            updateTicketsError();
        }
    }

    function updateTicketsError() {
        // error getting tickets
        changePage('error');
    }

    function addTickets(data) {
        var $tickets = $('[data-book-tickets]'),
            service = book.basket.bookingFee;

        if ($tickets.length > 0) {
            // add tickets
            if (typeof data !== 'undefined' && data !== null) {
                $tickets.prepend(Mustache.to_html(book.temp.tickets, data));
            }
            else {
                $tickets.html(Mustache.to_html(book.temp.tickets, book.data.tickets));

                if (book.data.tickets.TicketTypes.length > 2) {
                    $('[data-book-page="tickets"]').addClass('hideTickets');
                }
            }

            // quantity change event
            $('[data-book-ticket-price]').off('change.quantity').on('change.quantity', updateTicketQuantity);

            if (typeof data !== 'undefined' && data !== null) {
                $('[data-book-ticket-price]').trigger('change.quantity');
            }

            hideLoad();
        }
    }

    function updateTicketQuantity(selectEvent) {

        var $ceaTicket = $(selectEvent.target);
        var ticketId = $ceaTicket.attr('data-book-ticket-type');
        var isCea = book.data.tickets.TicketTypes.filter(t => t.isCea && t.Id === ticketId);
        if (isCea.length > 0) {
            var prevValue = $ceaTicket.attr('data-prev-value');
            $ceaTicket.attr('data-prev-value', selectEvent.target.value);
            if ((typeof prevValue === 'undefined' || prevValue == 0) && selectEvent.target.value > 0) {
                $('[data-ceacards-bookingmessage-overlay]').fadeIn(500);
            }
        }

        var subtotal = 0,
            tickets = [];

        var guestPassCount = 0;
        var ticketCount = 0;

        // add up quantities
        $('[data-book-ticket-price]').each(function () {
            var $this = $(this),
                thisVal = $this.val(),
                thisPrice = $this.attr('data-book-ticket-price');

            if (thisVal > 0) {
                ticketCount += thisVal;
                subtotal += parseInt(thisPrice) * thisVal;
                price = parseFloat(thisPrice / 100).toFixed(2);
                tickets.push('<div class="clearfix"><div class="bookMovieLabel">' + thisVal + '</div><div class="bookMovieField">' + $this.attr('data-book-ticket-displayname') + ' </div><div class="bookMovieLabel"> &pound;' + price + '</div></div>');

                if (
                    typeof this.dataset.bookTicketVouchercode !== 'undefined' &&
                    this.dataset.bookTicketVouchercode !== null &&
                    this.dataset.bookTicketVouchercode !== ''
                ) {
                    guestPassCount += thisVal;
                }
            }
        });

        $('[data-book-movie-tickets-info]').html(tickets.join(''));
        $('[data-book-movie-tickets]').show();

        // update subtotal
        $('[data-book-movie-cost-subtotal]').html(parseFloat(subtotal / 100).toFixed(2));
        $('[data-book-subtotal]').removeClass('dn');

        var bookingFee = 0;
        var grandTotal = subtotal;

        if (
            pc.Authentication.HasLogin === false &&
            ticketCount > 0 &&
            guestPassCount < ticketCount
        ) {
            bookingFee = parseFloat(cmsBookingFee) * 100;
            grandTotal += bookingFee;
        }

        $('[data-book-movie-cost-charge]').html((bookingFee / 100).toFixed(2));
        $('[data-book-movie-cost-total]').html((grandTotal / 100).toFixed(2));

        book.basket.subTotal = subtotal;
        book.basket.bookingFee = bookingFee;
        book.basket.total = grandTotal;

        $('[data-book-movie-cost]').show();
    }

    function countTickets() {
        book.basket.tickets.length = 0;

        // check if we have tickets selected
        var $quantity = $('[data-book-ticket-price]').filter(function () {
            var $this = $(this),
                thisVal = $this.val() || '',
                thisType = $this.attr('data-book-ticket-type') || '',
                thisPrice = $this.attr('data-book-ticket-price') || '',
                thisRecognitionId = $this.attr('data-book-ticket-recognitionid') || '',
                thisVoucherCode = $this.attr('data-book-ticket-vouchercode') || '',
                ticket = {};

            if (thisVal !== '' && thisVal !== '0') {
                if (typeof book.data.tickets.TicketTypes !== 'undefined' && book.data.tickets.TicketTypes.length > 0) {
                    for (var i = 0; i < book.data.tickets.TicketTypes.length; i++) {
                        if (book.data.tickets.TicketTypes[i].Id === thisType) {
                            $.extend(ticket, book.data.tickets.TicketTypes[i]);
                            break;
                        }
                    }
                }

                if (typeof book.tickets.orderState.VoucherTickets !== 'undefined' && book.tickets.orderState.VoucherTickets.length > 0) {
                    book.tickets.orderState.VoucherTickets.forEach(function (voucherTicket, index, object) {
                        if (voucherTicket.VoucherCode === thisVoucherCode) {
                            $.extend(ticket, voucherTicket);
                        }
                    });
                }

                ticket.Id = thisType;
                ticket.Quantity = thisVal;
                ticket.Price = thisPrice;

                ticket.RecognitionId = thisRecognitionId;
                ticket.VoucherCode = thisVoucherCode;
                ticket.Type = thisType;

                book.basket.tickets.push(ticket);
                return true;
            }
            else {
                return false;
            }
        });

        if (pc.overrideDisplayLimit > 0) {
            var totalQuantity = book.basket.tickets.reduce((prev, next) => parseInt(prev.Quantity) + parseInt(next.Quantity));
            if (totalQuantity > pc.overrideDisplayLimit) {
                $('[data-modalbg],[data-book-page-max-tickets-lockdown]').show();
                hideLoad();
                return;
            }
        }

        if ($quantity.length > 0) {
            // we have tickets
            saveTickets();
        }
        else {
            // no tickets selected
            hideLoad();

            var Alert = new CustomAlert();

            Alert.show('Please select a ticket');
            //alert('Please select a ticket');
        }
    }

    function saveTickets() {
        $('[data-book-message="tickets"]').addClass('dn').html('');

        // Save tickets.
        book.tickets.AddTickets(book.basket.tickets, function (ticketResponse) {

            if (typeof ticketResponse !== 'undefined' && ticketResponse !== null && typeof ticketResponse.OrderId !== 'undefined' && ticketResponse.OrderId !== null && typeof ticketResponse.UserSessionId !== 'undefined' && ticketResponse.UserSessionId !== null) {
                if (hasLS()) {
                    localStorage.setItem('User_Order_' + book.sessionid, JSON.stringify({
                        OrderId: ticketResponse.OrderId,
                        UserSessionId: ticketResponse.UserSessionId
                    }));
                }
                else {
                    docCookies.setItem('User_Order_' + book.sessionid, JSON.stringify({
                        OrderId: ticketResponse.OrderId,
                        UserSessionId: ticketResponse.UserSessionId
                    }), null, '/');
                }
            }

            book.seats = new book.api.seats(pc.api.booking + 'api/', book.tickets.orderState.CinemaId, book.tickets.orderState.SessionId, book.tickets.orderState.UserSessionId, book.tickets.orderState.OrderId);

            // Check if need seatpicker.
            book.seats.GetSeatData(function (data) {

                // Ensure the seats page sections are hidden.
                $('[data-seats-section]').each(function () {
                    $(this).addClass('dn');
                });

                if (data.NumberOfAreas > 0) {
                    // We have seating.
                    book.data.seatsAvailable = true;
                    $('[data-seats-section=HasData]').removeClass('dn');

                    // Save for later.
                    book.data.seats = data;

                    changePage('seats');
                }
                else {
                    // No seats.
                    book.data.seatsAvailable = false;
                    $('[data-seats-section=NoData]').removeClass('dn');

                    changePage('seats');
                }

                updateOrder();

                window.addEventListener('beforeunload', function (e) {
                    if (typeof book.isFinished === 'undefined' && !book.isAdyenRedirect) {
                        var text = 'Are you sure you want to leave?'; // browsers are more likely to display a default message rather than this
                        e.returnValue = text;
                        return text;
                    }
                });

                window.addEventListener('unload', function () {
                    if (typeof book.isFinished === 'undefined' && typeof book.tickets !== 'undefined' && typeof book.tickets.orderState !== 'undefined' && !book.isAdyenRedirect) {

                        var url = pc.api.booking + 'api/Booking/Cancel/' + book.tickets.orderState.OrderId + '?cinemaId=' + book.cinemaid;
                        var data = JSON.stringify({ "userSessionId": book.tickets.orderState.UserSessionId, "cinemaId": book.cinemaid });

                        let headers = {
                            type: null // This will be set by the api
                        };
                        let blob = new Blob([data], headers);

                        if (typeof navigator.sendBeacon === 'undefined') {
                            navigator.sendBeacon = function (url, data) {
                                var client = new XMLHttpRequest();
                                client.open("POST", url, false); // third parameter indicates sync xhr
                                client.setRequestHeader("Content-Type", null);
                                client.send(data);
                            };
                        }
                        navigator.sendBeacon(url, blob);

                        if (hasLS()) {
                            localStorage.removeItem('User_Order_' + book.sessionid);
                        }
                        else {
                            docCookies.removeItem('User_Order_' + book.sessionid, '/');
                        }
                    }
                });

            }, saveTicketsError);

        }, saveTicketsError);
    }

    function saveTicketsError(a, b, c) {

        // "Response": a
        // "Status": b
        // "Error Details": c

        // save tickets error

        var $formError = $('[data-form-error]'),
            error = 'Your order could not be completed. The screening may now be sold out.',
            hidePage = true;


        if (typeof a !== 'undefined' && a !== null && typeof a.responseText !== 'undefined' && a.responseText !== null) {
            var responseText = JSON.parse(a.responseText);

            if (typeof responseText !== 'undefined' && responseText !== null && typeof responseText.ClientErrorMessage !== 'undefined' && responseText.ClientErrorMessage !== null && responseText.ClientErrorMessage !== '') {
                error = responseText.ClientErrorMessage;
                hidePage = false;
            }
            else if (typeof responseText !== 'undefined' && responseText !== null && typeof responseText.PeachErrorCode !== 'undefined' && responseText.PeachErrorCode !== null && responseText.PeachErrorCode !== '') {
                error = responseText.PeachErrorCode;
                hidePage = false;
            }
        }

        if (hidePage) {
            // update form error message
            $formError.html(error);

            // send to error page
            changePage('error');
        }
        else {
            if (error === "Maximum ticket quantity exceeded") {
                /* In lock-down times, this error has special meaning, so display it in its own custom popup.  */
                $('[data-modalbg],[data-book-page-max-tickets-lockdown]').show();
            } else {
                /* For other errors, display it next to the form as normal. */
                $('[data-book-message="tickets"]').html(error).removeClass('dn');
            }
            hideLoad();
        }
    }

    function setupSeats() {

        if (book.data.seatsAvailable) {
            var $seatpicker = $('[data-book-seats]'),
                $seatContainer = $('[data-book-seats-container]'),
                $theatre = $('[data-book-seats-theatre]'),
                $labels = $('[data-book-seats-labels]'),
                $seatNum = $('[data-book-seats-num]'),
                seatsToAllocate = [],
                seatWidth = 27,
                seatHeight = 27,
                theatreWidth = 0,
                theatreHeight = 0,
                allocatedSeats = [],
                theatreFactor = 0,
                rowsMatch = true,
                rowsTemp,
                colsMatch = true,
                colsTemp;

            // setup area object
            book.data.seats.pAreas = {};

            // setup allocated object
            book.data.seats.pAllocated = {};

            // setup all seats object
            book.data.seats.pAllSeats = {};

            if (typeof book.tickets.orderState.AllocatedSeats !== 'undefined') {
                allocatedSeats = book.tickets.orderState.AllocatedSeats.replace(/\s/g, '').split(',');
            }

            // loop to get factor to work out correct heights
            for (var areaIndex = 0, areaLen = book.data.seats.Area.length; areaIndex < areaLen; areaIndex += 1) {
                var area = book.data.seats.Area[areaIndex],
                    tempFactor;

                if (area.SeatingContainerColumns === area.Width) {
                    area.Width = 100;
                    area.Left = 0;
                }

                if (area.SeatingContainerRows === area.Height) {
                    area.Height = 100;
                    area.Top = 0;
                }

                tempFactor = Math.round(area.SeatingContainerRows * seatHeight) / area.Height;

                if (tempFactor > theatreFactor) {
                    theatreFactor = tempFactor;
                }

                if (areaIndex === 0) {
                    rowsTemp = area.SeatingContainerRows;
                    colsTemp = area.SeatingContainerColumns;
                }
                else {
                    if (rowsTemp !== area.SeatingContainerRows) {
                        rowsMatch = false;
                    }
                    if (colsTemp !== area.SeatingContainerColumns) {
                        colsMatch = false;
                    }
                }
            }

            // loop areas
            $.each(book.data.seats.Area, function (areaIndex, areaValue) {

                var areaCols = areaValue.SeatingContainerColumns,
                    areaRows = areaValue.SeatingContainerRows,
                    curRow = 0,
                    areaWidth = Math.round(areaCols * seatWidth),
                    areaHeight = Math.round(areaRows * seatHeight),
                    tempRow = [],
                    areaBottom = Math.round(theatreFactor * 100 * ((100 - areaValue.Height - areaValue.Top) / 100)),
                    tempHeight = Math.round(theatreFactor * 100 * (areaValue.Height / 100)) + areaBottom;

                // add description to area object
                book.data.seats.pAreas[areaValue.AreaId] = {
                    "AreaDescription": areaValue.AreaDescription
                };

                // update theatre width
                if (book.data.seats.Area.length === 1) {
                    theatreWidth = areaWidth;
                }
                else {
                    theatreWidth = areaWidth / area.Width * 100;
                }

                // update theatre height
                if (book.data.seats.Area.length > 1) {
                    // multiple area
                    if (tempHeight > theatreHeight) {
                        theatreHeight = tempHeight;
                    }
                } else {
                    // single area
                    // theatreHeight = areaHeight + areaBottom;
                    theatreHeight = areaHeight;
                }
                /*
                  // work out pHeight
                  areaValue.pHeight = Math.round((theatreFactor * 100) * (areaValue.Height / 100)) + 'px';
  
                  // work out pBottom	
                  areaValue.pBottom = areaBottom + 'px';
  
                  // work out pRight
                  areaValue.pRight = Math.round(100 - areaValue.Width - areaValue.Left) + '%';
                */

                if (rowsMatch) {
                    areaValue.pHeight = 100;
                    areaValue.pTop = 0;
                }
                else {
                    areaValue.pHeight = areaValue.Height;
                    areaValue.pTop = areaValue.Top;
                }

                if (colsMatch) {
                    areaValue.pWidth = 100;
                    areaValue.pLeft = 0;
                }
                else {
                    areaValue.pWidth = areaValue.Width;
                    areaValue.pLeft = areaValue.Left;
                }

                // loop rows/columns converting objects to arrays
                // create label array
                areaValue.pLabelArray = [];
                for (curRow = 0; curRow < areaRows; curRow += 1) {
                    tempRow[curRow] = {};
                    tempRow[curRow].Seats = [];
                    if (typeof areaValue.Rows[curRow] === 'undefined') {
                        for (curCol = 0; curCol < areaCols; curCol += 1) {
                            tempRow[curRow].Seats[curCol] = {};
                        }
                        areaValue.pLabelArray.push('');
                    } else {
                        tempRow[curRow]['PhysicalName'] = areaValue.Rows['' + curRow]['PhysicalName'];

                        for (curCol = 0; curCol < areaCols; curCol += 1) {
                            if (typeof areaValue.Rows['' + curRow]['Seats']['' + curCol] === 'undefined') {
                                tempRow[curRow]['Seats'][curCol] = {};
                            } else {
                                tempRow[curRow]['Seats'][curCol] = areaValue.Rows['' + curRow]['Seats']['' + curCol];
                            }
                        }
                        areaValue.pLabelArray.push(areaValue.Rows[curRow].PhysicalName);
                    }
                }

                areaValue.Rows = tempRow;

                // loop rows
                $.each(areaValue.Rows, function (rowIndex, rowValue) {
                    var curCol = 0;

                    // loop through seats
                    for (curCol = 0; curCol < areaCols; curCol += 1) {
                        // check if seats exist
                        if (typeof rowValue.Seats[curCol] === 'undefined') {
                            // add seat spacer
                            rowValue.Seats[curCol] = {};
                        } else {
                            // check status
                            if (typeof rowValue.Seats[curCol].Status === 'undefined') {
                                // available
                                rowValue.Seats[curCol].Status = 0;
                            }

                            // check type
                            // unavailable and selected styled based on status so don't need specific pType
                            if (rowValue.Seats[curCol].Type === 2) {
                                // standard area
                                // special/disabled seat
                                rowValue.Seats[curCol].pType = '4';
                            } else {
                                // standard seats
                                rowValue.Seats[curCol].pType = '0';
                            }

                            if (typeof rowValue.Seats[curCol].SeatStyle !== 'undefined' || typeof rowValue.Seats[curCol].Style !== 'undefined') {
                                var style = rowValue.Seats[curCol].SeatStyle || rowValue.Seats[curCol].Style || 0;
                                // sofa seats
                                switch (style) {
                                    case 1:
                                        // sofa left
                                        rowValue.Seats[curCol].pType += '_sofa_left';
                                        break;
                                    case 2:
                                        // sofa mid
                                        rowValue.Seats[curCol].pType += '_sofa_mid';
                                        break;
                                    case 3:
                                        // sofa right
                                        rowValue.Seats[curCol].pType += '_sofa_right';
                                        break;
                                }
                            }

                            // check if allocated
                            if (typeof rowValue.Seats[curCol].SeatName !== 'undefined' && allocatedSeats.length > 0 && allocatedSeats.indexOf(rowValue.Seats[curCol].SeatName) > -1) {
                                rowValue.Seats[curCol].Status = 5;
                                book.data.seats.pAllocated[rowValue.Seats[curCol].SeatName] = $.extend({}, rowValue.Seats[curCol]);
                            }

                            // add to all seats object
                            book.data.seats.pAllSeats[rowValue.Seats[curCol].SeatName] = $.extend({}, rowValue.Seats[curCol]);
                        }
                    }

                    // create seats array
                    rowValue.pSeatsArray = $.map(rowValue.Seats, function (seat) {
                        return seat;
                    });

                });

                // create row array
                areaValue.pRowsArray = $.map(areaValue.Rows, function (row) {
                    return row;
                });

                $.each(book.data.seats.AreaCategories, function (catIndex, catValue) {

                    if (catValue.AreaCategoryCode === areaValue.AreaId && catValue.SeatsToAllocate === 0) {
                        areaValue.pNoSeatsToAllocate = area.AreaId;
                    }
                });

            });

            $('[data-book-seats-screen]').css('width', theatreWidth + seatWidth + seatWidth);

            // update seat container width and height
            $seatContainer.css({
                'width': theatreWidth + seatWidth + seatWidth,
                'height': theatreHeight
            });
            // update theatre width
            $theatre.css({
                'width': theatreWidth
            });
            // update label width
            $labels.css({
                'width': seatWidth
            });

            // update seat num
            $.each(book.data.seats.AreaCategories, function (catIndex, catValue) {

                // add seat allocation to area object
                for (var catValueItem in catValue) {
                    book.data.seats.pAreas[catValue.AreaCategoryCode][catValueItem] = catValue[catValueItem];
                }

                if (catValue.SeatsToAllocate > 0) {
                    seatsToAllocate.push(
                        '<span data-book-seats-num-area="' + catValue.AreaCategoryCode + '">' + catValue.SeatsAllocatedCount + '</span>/' + catValue.SeatsToAllocate + ' ' + book.data.seats.pAreas[catValue.AreaCategoryCode].AreaDescription
                    );
                }
            });
            $seatNum.html(seatsToAllocate.join('<br>'));

            // check we have template
            if (book.temp.seats === '') {
                // get template
                $.get('/template?name=BookingSeats&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    // save template
                    book.temp.seats = template;
                    addSeats();
                });
            } else {
                addSeats();
            }

            // check we have template
            if (book.temp.labels === '') {
                // get template
                $.get('/template?name=BookingSeatsLabels&extensionToFind=mustache&extensionToReturn=txt', function (template) {
                    // save template
                    book.temp.labels = template;
                    addLabels();
                });
            } else {
                addLabels();
            }

            hideLoad();
        } else {
            $submit = $('[data-book-seats-submit]');
            $submit.off().on('click', function (e) {
                e.preventDefault();
                e.stopPropagation();

                showLoad();
                changePage('payment');
            });

            hideLoad();
        }
    }

    function addSeats() {
        var $seatpicker = $('[data-book-seats]'),
            $theatre = $('[data-book-seats-theatre]'),
            allocatedSeats = [],
            $seats,
            $submit = $('[data-book-seats-submit]');

        if ($theatre.length > 0) {
            $theatre.html(Mustache.to_html(book.temp.seats, book.data.seats));

            // update status of allocated seats
            $.each(book.data.seats.pAllocated, function (selIndex, selValue) {
                $('[data-book-seats-seatname="' + selIndex + '"]').attr('data-book-seats-status', 5);
                allocatedSeats.push(selIndex);
            });

            // update seat order
            allocatedSeats.sort(sortAlphaNum);
            updateSeatsOrder(allocatedSeats.join(', '));

            // redefine seats jquery object
            $seats = $('[data-book-seats-seatname]').not('[data-book-seats-status="1"]');

            // add companion seats
            // loop disabled seats and look for seats next to
            $seats.filter('.book-seats-seat-4').each(function () {
                var $seat = $(this),
                    seatid = $seat.attr('data-book-seats-seatid'),
                    seatidA,
                    $prev,
                    $next,
                    tempName;

                var areaColumns = 0;

                var prevIndex;
                var nextIndex;

                if (typeof seatid !== 'undefined') {
                    seatidA = seatid.split('|');

                    if (seatidA.length > 3) {
                        areaColumns = book.data.seats.Area.reduce(function (acc, value) {
                            if (value.AreaId === seatidA[0]) {
                                return value.SeatingContainerColumns;
                            }

                            return acc;
                        }, 0);

                        if (areaColumns === 0) {
                            return true;
                        }

                        prevIndex = parseInt(seatidA[3]);
                        nextIndex = parseInt(seatidA[3]);

                        while (typeof $prev === 'undefined') {
                            prevIndex++;

                            if (prevIndex > areaColumns) {
                                break;
                            }

                            $prev = $('[data-book-seats-seatid="' + seatidA[0] + '|' + seatidA[1] + '|' + seatidA[2] + '|' + prevIndex + '"][class*="book-seats-seat-0"]');

                            if ($prev.length === 0) {
                                $prev = undefined;
                                continue;
                            }

                            $prev[0].className = $prev[0].className.replace('book-seats-seat-0', 'book-seats-seat-c-4');
                            tempName = $prev.attr('data-book-seats-seatname');
                            $prev.attr('data-book-seats-companion', seatid);
                            book.data.seats.pAllSeats[tempName].pIsCompanion = true;
                            break;
                        }

                        if (typeof tempName === 'undefined') {
                            while (typeof $next === 'undefined') {
                                nextIndex--;

                                if (nextIndex < 0) {
                                    break;
                                }

                                $next = $('[data-book-seats-seatid="' + seatidA[0] + '|' + seatidA[1] + '|' + seatidA[2] + '|' + nextIndex + '"][class*="book-seats-seat-0"]');

                                if ($next.length === 0) {
                                    $next = undefined;
                                    continue;
                                }

                                $next[0].className = $next[0].className.replace('book-seats-seat-0', 'book-seats-seat-c-4');
                                tempName = $next.attr('data-book-seats-seatname');
                                $next.attr('data-book-seats-companion', seatid);
                                book.data.seats.pAllSeats[tempName].pIsCompanion = true;
                                break;
                            }
                        }
                    }
                }
            });

            $seats.filter('[data-book-seats-companion]').each(function () {
                var $seat = $(this);
                var seatid = $seat.attr('data-book-seats-seatid');
                var tempName = $seat.attr('data-book-seats-seatname');
                var seatidA;

                if (typeof seatid === 'undefined') {
                    return;
                }

                seatidA = seatid.split('|');

                // check for seat name in tempName
                if (typeof tempName !== 'undefined') {
                    // get data based on tempName
                    var tempData = book.data.seats.pAllSeats[tempName];

                    // check seat returned in data and we have SeatsInGroup
                    if (typeof tempData !== 'undefined' && typeof tempData.SeatsInGroup !== 'undefined' && tempData.SeatsInGroup !== null) {
                        // loop through SeatsInGroup to get the other seats
                        for (var groupSeat in tempData.SeatsInGroup) {
                            var $groupSeat = $('[data-book-seats-seatid="' + seatidA[0] + '|' + seatidA[1] + '|' + seatidA[2] + '|' + tempData.SeatsInGroup[groupSeat].ColumnIndex + '"][class*="book-seats-seat-0_"]');

                            // check for seat
                            if ($groupSeat.length > 0) {
                                // update class
                                $groupSeat[0].className = $groupSeat[0].className.replace('book-seats-seat-0', 'book-seats-seat-c-4');
                                $groupSeat.attr('data-book-seats-companion', seatid);

                                var groupSeatName = $groupSeat.attr('data-book-seats-seatname');

                                // check we have a sofa
                                if (typeof groupSeatName !== 'undefined' && typeof book.data.seats.pAllSeats[groupSeatName] !== 'undefined' && typeof book.data.seats.pAllSeats[groupSeatName].Style !== 'undefined' && book.data.seats.pAllSeats[groupSeatName].Style !== 0) {
                                    $groupSeat.attr('data-book-seats-companion-sofa', seatid);
                                }
                            }
                        }
                    }
                }
            });

            if (typeof PointerEventsPolyfill !== 'undefined') {
                PointerEventsPolyfill.initialize({});
            }

            $theatre.off('click').on('click', function (e) {
                var $this = $(e.target),
                    seatName = $this.attr('data-book-seats-seatname') || '',
                    seatStatus = $this.attr('data-book-seats-status') || '',
                    seatRow = $this.attr('data-book-seats-row') || '',
                    proceed = false;

                if (seatStatus === '' || seatStatus === '1') {
                    return;
                }

                if (seatStatus === '5') {
                    // preselected seat
                    proceed = true;
                }
                else if (seatStatus === '0') {
                    // new selection

                    var CustomConfirm = function () {
                        this.show = function (dialog) {
                            var winW = window.innerWidth;
                            var winH = window.innerHeight;
                            var dialogOverlay = document.getElementById('dialog-confirm-overlay');
                            var dialogBox = document.getElementById('dialog-confirm-box');

                            dialogOverlay.style.display = "block";
                            dialogOverlay.style.height = winH + "px";
                            //dialogBox.style.left = ((winW / 2) - (550 / 2)) + "px";
                            //dialogBox.style.top = "50%";
                            dialogBox.style.display = "block";

                            document.getElementById('dialog-confirm-box-body').innerHTML = dialog;

                            $('[data-confirm-cancel]' || dialogOverlay).off('click').on('click', function (e) {
                                e.preventDefault();
                                document.getElementById('dialog-confirm-box').style.display = "none";
                                document.getElementById('dialog-confirm-overlay').style.display = "none";
                            });

                            $('[data-confirm-ok]').off('click').on('click', function (e) {
                                e.preventDefault();
                                // add seat
                                changeSeat(seatName);
                                document.getElementById('dialog-confirm-box').style.display = "none";
                                document.getElementById('dialog-confirm-overlay').style.display = "none";
                            });

                        };
                    };

                    var Alert = new CustomAlert();
                    var ConfirmBox = new CustomConfirm();

                    // check for disabled seat
                    if ($this.hasClass('book-seats-seat-4')) {
                        proceed = false;
                        ConfirmBox.show('You have selected a wheelchair space. Please note this is not a seat. Click OK to proceed or cancel to reselect. Wheelchair spaces are sold subject to our terms and conditions.');
                    }
                    // companion seat
                    else if ($this[0].className.indexOf('book-seats-seat-c-4') > -1) {

                        proceed = false;

                        var companionId = $this.attr('data-book-seats-companion'),
                            isSofa = typeof $this.attr('data-book-seats-companion-sofa') !== 'undefined' ? true : false,
                            $disabledSeat = $('[data-book-seats-seatid="' + companionId + '"].book-seats-seat-4'),
                            seatArea = companionId.split('|')[0],
                            seatsToAllocate = book.data.seats.pAreas[seatArea].SeatsToAllocate,
                            seatsAllocated = book.data.seats.pAreas[seatArea].SeatsAllocatedCount;

                        // disabled is available
                        if ($disabledSeat.filter('[data-book-seats-status="0"]').length > 0) {
                            if (isSofa) {
                                Alert.show('This is a companion seat that fills half a sofa. In order to book this seat you must purchase it with a wheelchair space. Please select a wheelchair space in order to select this seat or choose a non-companion seat. Wheelchair companion seats are sold subject to our terms and conditions.');
                            }
                            else {
                                Alert.show('If you are booking this seat along with a wheelchair space, please select the wheelchair space first to proceed. Alternatively, please select an another seat. Wheelchair companion seats are sold subject to our terms and conditions.');
                            }
                        }

                        // disabled is sold
                        if ($disabledSeat.filter('[data-book-seats-status="1"]').length > 0) {
                            if (isSofa) {
                                ConfirmBox.show('You have selected a wheelchair companion seat. Click OK to proceed or cancel to reselect.  Wheelchair spaces and companion seats are sold subject to our terms and  conditions. Please note that this seat is half of a sofa.');
                            }
                            else {
                                ConfirmBox.show('You have selected a wheelchair companion seat. Click OK to proceed or cancel to reselect.  Wheelchair spaces and companion seats are sold subject to our terms and  conditions.');
                            }
                        }

                        // disabled is chosen
                        if ($disabledSeat.filter('[data-book-seats-status="5"]').length > 0) {
                            if (seatsToAllocate === seatsAllocated) {
                                if (isSofa) {
                                    ConfirmBox.show('You have selected a wheelchair companion seat. Click OK to proceed or cancel to reselect. Wheelchair spaces and companion seats are sold subject to our terms and conditions. Please note that this seat is half of a sofa.');
                                }
                                else {
                                    ConfirmBox.show('You have selected a wheelchair companion seat. Click OK to proceed or cancel to reselect. Wheelchair spaces and companion seats are sold subject to our terms and conditions.');
                                }
                            }
                            else if (isSofa) {
                                ConfirmBox.show('You have selected a wheelchair companion seat. Click OK to proceed or cancel to reselect.  Wheelchair spaces and companion seats are sold subject to our terms and  conditions. Please note that this seat is half of a sofa.');
                            }
                            else {
                                ConfirmBox.show('You have selected a wheelchair companion seat. Click OK to proceed or cancel to reselect.  Wheelchair spaces and companion seats are sold subject to our terms and  conditions.');
                            }
                        }

                    }
                    else {
                        proceed = true;
                    }
                }

                if (proceed) {
                    changeSeat(seatName);
                }
            });

            // /hotfix

            // submit click event
            $submit.off().on('click', function (e) {

                e.preventDefault();
                e.stopPropagation();
                var seatSelection = [];
                var tempSeats = [];

                showLoad();

                if (validateSeats()) {
                    $.each(book.data.seats.pAllocated, function (selIndex, selValue) {
                        seatSelection.push(selValue);
                        tempSeats.push(selValue.SeatName);
                    });

                    tempSeats.sort(sortAlphaNum);
                    updateSeatsOrder(tempSeats.join(', '));

                    book.seats.ConfirmSeats(seatSelection, function () {
                        changePage('payment');
                    },
                        function () {
                            var Alert = new CustomAlert();
                            Alert.show("You might have noticed some changes to our seating. This is to make sure there's plenty of space between you and other customers. Sometimes this could mean you can only book half of certain sofas to ensure there's room between your group and others.");
                            hideLoad();
                        });
                }
            });

            setupZoom();

            setupSeatScroll();

            hideLoad();
        }
    }

    function setupSeatScroll() {
        if (typeof book.seatScrollSetup !== 'undefined') {
            return;
        }

        book.seatScrollSetup = true;

        var $seats = $('[data-book-seats-scroll]');

        var seatsObserverOptions = {
            root: null,
            rootMargin: '0px',
            threshold: 0.5
        };

        var seatsIntersectionCallback = function (entries, self) {
            entries.forEach(function (entry) {
                if (entry.isIntersecting) {
                    self.unobserve(entry.target);

                    if (typeof screenVideoPlay !== 'undefined') {
                        screenVideoPlay();
                    }

                    if (typeof screenClipPlay !== 'undefined') {
                        screenClipPlay();
                    }

                    $seats.animate({
                        scrollLeft: '100%'
                    }, 600, function () {
                        $seats.animate({
                            scrollLeft: 0
                        }, 600);
                    });
                }
            });
        };

        var seatsObserver = new IntersectionObserver(seatsIntersectionCallback, seatsObserverOptions);

        seatsObserver.observe($seats[0]);
    }

    function addLabels() {
        var $labels = $('[data-book-seats-labels]');

        if ($labels.length > 0) {
            $labels.html(Mustache.to_html(book.temp.labels, book.data.seats));
        }
    }

    function changeSeat(seatName) {
        var $seat = $('[data-book-seats-seatname="' + seatName + '"]'),
            seatId = $seat.attr('data-book-seats-seatid'),
            seatObj = book.data.seats.pAllSeats[seatName],
            seatArea = seatObj.AreaCategoryCode,
            allocatedSeats = [];

        // check seat exits and area has seats to allocate
        if ($seat.length > 0 && book.data.seats.pAreas[seatArea].SeatsToAllocate > 0) {

            if (typeof book.data.seats.pAllocated[seatName] !== 'undefined') {
                // seat already allocated

                // change status
                $seat.attr('data-book-seats-status', '0');
                seatObj.Status = 0;

                // update area allocated count
                book.data.seats.pAreas[seatArea].SeatsAllocatedCount -= 1;
                book.data.seats.pAreas[seatArea].SeatsNotAllocatedCount += 1;

                // remove from allocated object
                delete book.data.seats.pAllocated[seatName];

                if ($('[data-book-seats-companion="' + seatId + '"][data-book-seats-status="5"]').length > 0) {
                    $('[data-book-seats-companion="' + seatId + '"][data-book-seats-status="5"]').each(function () {
                        var $comp = $(this),
                            compName = $comp.attr('data-book-seats-seatname');

                        changeSeat(compName);
                    });
                }
            }
            else {
                // seat not allocated

                // check if we have reached allocated limit and deselect other seats in area
                if (book.data.seats.pAreas[seatArea].SeatsNotAllocatedCount === 0) {

                    $('[data-book-seats-seatname][data-book-seats-status="5"]').each(function () {
                        var $selSeat = $(this),
                            selSeatName = $selSeat.attr('data-book-seats-seatname'),
                            selSeatObj = book.data.seats.pAllSeats[selSeatName];

                        // double check seat is allocated and is in correct area
                        if (book.data.seats.pAllocated[selSeatName] !== 'undefined' && selSeatObj.AreaCategoryCode === book.data.seats.pAreas[seatArea].AreaCategoryCode) {
                            // update status
                            $selSeat.attr('data-book-seats-status', '0');
                            selSeatObj.Status = 0;

                            // remove from allocated object
                            delete book.data.seats.pAllocated[selSeatName];
                        }
                    });

                    // update area allocated count
                    book.data.seats.pAreas[seatArea].SeatsAllocatedCount = 0;
                    book.data.seats.pAreas[seatArea].SeatsNotAllocatedCount = book.data.seats.pAreas[seatArea].SeatsToAllocate;
                }

                // change status
                $seat.attr('data-book-seats-status', '5');
                seatObj.Status = 5;

                // update area allocated count
                book.data.seats.pAreas[seatArea].SeatsAllocatedCount += 1;
                book.data.seats.pAreas[seatArea].SeatsNotAllocatedCount -= 1;

                // add to allocated object
                book.data.seats.pAllocated[seatName] = seatObj;
            }

            // update area allocated count
            $('[data-book-seats-num-area="' + seatObj.AreaCategoryCode + '"]').html(book.data.seats.pAreas[seatArea].SeatsAllocatedCount);

            // update seat order
            for (var seat in book.data.seats.pAllocated) {
                allocatedSeats.push(seat);
            }
            allocatedSeats.sort(sortAlphaNum);
            updateSeatsOrder(allocatedSeats.join(', '));
        }
    }

    function validateSeats() {
        var isValid = true,
            currentCinema = $('[data-book-cinema-name]').attr('data-book-cinema-name'),
            error = '',
            messages = {};

        messages = {
            'missing': 'Please select another {{number}} seat(s).',
            'sofagap': 'Sorry, you haven’t purchased enough seats to fill a sofa, please select a single seat.',
            'default': 'Please check your seat selection.'
        };

       


        if (isValid) {

            var missingRuleValidationResult = validateWithMissingRule(book.data.seats);

            if (!missingRuleValidationResult.isValid) {

                // seat validation failed.
                isValid = false;

                // show error
                error = messages.missing.toString().replace('{{number}}', missingRuleValidationResult.unallocatedCount);
            }
        }

        if (isValid && !book.skipSofaRule) {

            var sofaRuleValidationResult = validateWithSofaRule(book.data.seats);

            if (!sofaRuleValidationResult.isValid) {

                // seat validation failed.
                isValid = false;

                // show error
                error = messages['sofagap'];
            }
        }

        // there was an error
        if (isValid === false) {
            // check for error message
            if (error !== '') {
                // display error message

                var Alert = new CustomAlert();

                Alert.show(error);
                // alert(error);
            }
            else {
                // display default error message
                alert(messages['default']);
            }
            hideLoad();
        }

        return isValid;
    }

    function setupZoom() {
        // seat zoom functionality
        var $seatpicker = $('[data-book-seats]'),
            seatpickerWidth = $seatpicker.width(),
            seatpickerHeight = $seatpicker.outerHeight(),
            $container = $('[data-book-seats-container]'),
            containerWidth = $container.outerWidth(),
            containerHeight = $container.outerHeight(),
            $zoom = $('[data-book-seats-zoom]'),
            $zoomIn = $('[data-book-seats-zoom-in]'),
            $zoomOut = $('[data-book-seats-zoom-out]'),
            widthRatio = parseFloat((seatpickerWidth / containerWidth).toFixed(2)),
            heightRatio = parseFloat((seatpickerHeight / containerHeight).toFixed(2)),
            minZoom = 1,
            maxZoom = 1.5,
            curZoom = 1,
            stepZoom = 0.05,
            touchStart = [],
            touchEnd = [];

        function zoomSeats(dir) {
            // get new zoom based on direction in/out
            var newZoom;

            curZoom = parseFloat(curZoom);

            if (dir === 1) {
                newZoom = (curZoom + stepZoom).toFixed(2);
            }
            else {
                newZoom = (curZoom - stepZoom).toFixed(2);
            }

            // check newZoom is between minZoom and maxZoom
            if (newZoom <= minZoom) {
                newZoom = minZoom;
                $zoomOut.addClass('is-disabled');
            }
            else {
                $zoomOut.removeClass('is-disabled');
            }

            if (newZoom >= maxZoom) {
                newZoom = maxZoom;
                $zoomIn.addClass('is-disabled');
            }
            else {
                $zoomIn.removeClass('is-disabled');
            }

            // check newZoom isn't curZoom
            if (newZoom !== curZoom) {
                curZoom = newZoom;
                updateZoom(newZoom);
            }
        }

        function updateZoom(zoom) {
            // update zoom
            // check for csstransform support
            if (Modernizr.csstransforms) {
                $container.css({
                    '-webkit-transform': 'scale(' + zoom + ')',
                    '-moz-transform': 'scale(' + zoom + ')',
                    '-ms-transform': 'scale(' + zoom + ')',
                    '-o-transform': 'scale(' + zoom + ')',
                    'transform': 'scale(' + zoom + ')'
                });
            }
            else {
                $container.css({
                    'zoom': zoom
                });
            }

            $('[data-book-seats-screen]').css({
                'width': containerWidth * zoom
            });

            $('[data-book-seats]').css({
                'width': containerWidth * zoom,
                'height': containerHeight * zoom
            });
        }

        function getDistance(touch1, touch2) {
            var x = touch2.clientX - touch1.clientX,
                y = touch2.clientY - touch1.clientY;
            return Math.sqrt(x * x + y * y);
        }

        if (Modernizr.touch) {
            $seatpicker.on('touchstart touchmove touchend', function (event) {

                var e = event.originalEvent;

                switch (event.type) {
                    case 'touchstart':
                        if (e.touches.length === 2) {
                            event.preventDefault();
                            for (var i = 0; i < 2; i += 1) {
                                touchStart[i] = {
                                    'clientX': e.touches[i].clientX,
                                    'clientY': e.touches[i].clientY
                                };
                            }
                        }
                        break;
                    case 'touchmove':
                        if (e.touches.length === 2) {
                            var scale = getDistance(e.touches[0], e.touches[1]) / getDistance(touchStart[0], touchStart[1]);

                            if (scale > 1) {
                                zoomSeats(1);
                            }
                            else {
                                zoomSeats(-1);
                            }
                        }
                        break;
                }
            });
        }

        // zoom in click event
        $zoomIn.off().on('click', function (e) {
            e.preventDefault();
            zoomSeats(1);
        });

        // zoom out click event
        $zoomOut.off().on('click', function (e) {
            e.preventDefault();
            zoomSeats(-1);
        });

        // we zoom out by default so disable zoom out button
        $zoomOut.addClass('is-disabled');

        // show zoom buttons
        $zoom.removeClass('dn');

        // work out minZoom
        if (widthRatio > heightRatio) {
            curZoom = heightRatio;
        }
        else {
            curZoom = widthRatio;
        }

        if (curZoom > minZoom || curZoom < minZoom) {
            curZoom = minZoom;
        }

        // update zoom to minZoom
        minZoom = curZoom;
        updateZoom(curZoom);

        $('[data-book-seats-scroll]').css({
            'height': $('[data-book-seats-scroll]').outerHeight()
        });

        $('[data-book-seats-screen]').css({
            'width': containerWidth * curZoom
        });

        $('[data-book-seats]').css({
            'width': containerWidth * curZoom,
            'height': containerHeight * curZoom
        });
    }

    function submitBooking() {

        var paymentDetails = {},
            $fields = $('[data-form-field]');

        showLoad();

        paymentDetails['CustomerDetails'] = {};
        paymentDetails['Payment'] = {};

        // get form fields and populate payment details
        $fields.each(function () {
            var $field = $(this),
                fieldType = $field.attr('name'),
                fieldVal = $field.val(),
                url = [];

            if (fieldVal !== '') {
                switch (fieldType) {
                    case 'email':
                        paymentDetails['CustomerDetails']['Email'] = fieldVal;
                        break;
                    /*
                     * Zipcode not needed in Vista call.
                    case 'zipcode':
                        paymentDetails['CustomerDetails']['ZipCode'] = fieldVal;
                        break;
                    */
                    case 'giftcard':
                        // only add gift card value if it has been validated
                        if ($field.closest('[data-gc-row]').hasClass('valid')) {
                            paymentDetails['GiftCard'] = {};
                            paymentDetails['GiftCard']['Number'] = fieldVal;
                        }
                        break;
                    case 'name':
                        paymentDetails['Payment']['CardName'] = fieldVal;
                        break;
                    case 'cardtype':
                        paymentDetails['Payment']['CardType'] = fieldVal;
                        break;
                    case 'cardnumber':
                        paymentDetails['Payment']['Number'] = fieldVal;
                        break;
                    case 'expirymonth':
                        paymentDetails['Payment']['ExpiryMonth'] = fieldVal;
                        break;
                    case 'expiryyear':
                        paymentDetails['Payment']['ExpiryYear'] = fieldVal;
                        break;
                    /*
                     * CVC not needed in Vista call.
                    case 'cvc':
                        paymentDetails['Payment']['CVC'] = ""; //fieldVal;
                        break;
                     */
                }
            }
        });

        // submit booking
        book.tickets.CompletePayment(
            paymentDetails,
            paymentSuccess,
            paymentError
        );
    }

    function submitZeroBooking() {
        var paymentDetails = {},
            $fields = $('[data-form-field]');

        showLoad();

        paymentDetails['CustomerDetails'] = {};

        // get form fields and populate payment details
        $fields.each(function () {
            var $field = $(this),
                fieldType = $field.attr('name'),
                fieldVal = $field.val(),
                url = [];

            if (fieldVal !== '') {
                switch (fieldType) {
                    case 'email':
                        paymentDetails['CustomerDetails']['Email'] = fieldVal;
                        book.data.email = fieldVal;
                        break;
                    case 'giftcard':
                        if ($field.closest('[data-gc-row]').hasClass('valid')) {
                            paymentDetails['GiftCard'] = {};
                            paymentDetails['GiftCard']['Number'] = fieldVal;
                        }
                        break;
                    case 'firstname':
                        paymentDetails['CustomerDetails']['FirstName'] = fieldVal;
                        book.data.firstName = fieldVal;
                        break;
                    case 'lastname':
                        paymentDetails['CustomerDetails']['LastName'] = fieldVal;
                        book.data.lastName = fieldVal;
                        break;
                }
            }
        });

        // submit booking
        book.tickets.CompletePayment(
            paymentDetails,
            paymentSuccess,
            paymentError
        );
    }

    function paymentSuccess(data) {

        book.orderid = data.ExternalOrderId;
        window.location.hash = "order=" + data.ExternalOrderId;
        changePage('confirmation');

    }

    function paymentError(a, b, c) {

        var $form = $('[data-form]'),
            $formError = $('[data-form-error]'),
            error = '',
            errorCode = parseInt(JSON.parse(a.responseText).PeachErrorCode),
            hideForm = false;

        switch (errorCode) {
            case 1:
            case 3:
                error =
                    "We're really sorry, but there's been a problem with your booking. Please drop us a line on " + pc.support.phoneNumber + " (national call rate charges apply) or email us on <a href='" + pc.support.emailAddress + "'>" + pc.support.emailAddress + "</a> so we can confirm whether your booking has gone through correctly.";
                hideForm = true;
                break;
            case 2:
                error = 'The payment has been declined. Please ensure you have entered the correct details.';
                break;
            case 4:
                error = 'Your order has already been submitted for processing. Please check your email for confirmation.';
                hideForm = true;
                break;
            // commented out to use default message
            /*case 5:
                error = 'There was an error with your order. Please contact us via the contact us form with the nature of your enquiry. We apologise for any inconvenience caused.';
                hideForm = true;
                break;*/
            default:
                error = 'Your order could not be completed. The screening may now be sold out.';
                hideForm = true;
                break;
        }

        // reset form payment details
        $('[data-form-field][name="cardnumber"]').val('');
        $('[data-form-field][name="expirymonth"]').val('');
        $('[data-form-field][name="expiryyear"]').val('');
        $('[data-form-field][name="cardtype"]').val('');
        $('[data-form-field][name="cvc"]').val('');

        if (hideForm) {
            $formError.html(error);
            // send to error page
            changePage('error');
        } else {
            // reshow submit button
            $('[data-form-submit]').show();
            $('[data-form-error-form]').html(error).show();
            hideLoad();
        }
    }

    function adyenPaymentError(response) {
        console.log(response)
        var $form = $('[data-form]'),
            $formError = $('[data-form-error]'),
            error = '',
            errorCode = 3,
            hideForm = false;

        switch (errorCode) {
            case 1:
            case 3:
                error =
                    "We're really sorry, but there's been a problem with your booking. Please drop us a line on " + pc.support.phoneNumber + " (national call rate charges apply) or email us on <a href='" + pc.support.emailAddress + "'>" + pc.support.emailAddress + "</a> so we can confirm whether your booking has gone through correctly.";
                hideForm = true;
                break;
            case 2:
                error = 'The payment has been declined. Please ensure you have entered the correct details.';
                break;
            case 4:
                error =
                    'Your order has already been submitted for processing. Please check your email for confirmation.';
                hideForm = true;
                break;
            // commented out to use default message
            /*case 5:
                error = 'There was an error with your order. Please contact us via the contact us form with the nature of your enquiry. We apologise for any inconvenience caused.';
                hideForm = true;
                break;*/
            default:
                error = 'Your order could not be completed. The screening may now be sold out.';
                hideForm = true;
                break;
        }


        // reset form payment details
        $('[data-form-field][name="cardnumber"]').val('');
        $('[data-form-field][name="expirymonth"]').val('');
        $('[data-form-field][name="expiryyear"]').val('');
        $('[data-form-field][name="cardtype"]').val('');
        $('[data-form-field][name="cvc"]').val('');

        if (hideForm) {
            $formError.html(error);
            // send to error page
            changePage('error');
        }
        else {
            // reshow submit button
            $('[data-form-submit]').show();
            $('[data-form-error-form]').html(error).show();
            hideLoad();
        }
    }

    function submitBookingHosted() {
        // submit hosted payment to get provider details
        var requestData = {},
            $fields = $('[data-form-field]'),
            isZero = false;

        showLoad();

        if (book.basket.total === 0) {
            isZero = true;
        }

        if (isZero) {
            submitZeroBooking();
        } else if (typeof pc.hostedPayment !== 'undefined') {
            // clone pc.hp object
            requestData = $.extend(true, {}, pc.hostedPayment);

            // loop fields
            $fields.each(function () {
                var $field = $(this),
                    fieldType = $field.attr('name'),
                    fieldVal = $field.val(),
                    url = [];

                if (fieldVal !== '') {
                    switch (fieldType) {
                        case 'email':
                            requestData['emailAddress'] = fieldVal;
                            book.data.email = fieldVal;
                            break;
                        //case 'giftcard':
                        //	requestData['giftCardNumber'] = fieldVal;
                        //	break;
                        //case 'giftcardamount':
                        //	requestData['giftCardAmount'] = fieldVal;
                        //	break;
                        case 'firstname':
                            requestData['forename'] = fieldVal;
                            book.data.firstName = fieldVal;
                            break;
                        case 'lastname':
                            requestData['surname'] = fieldVal;
                            book.data.lastName = fieldVal;
                            break;
                        case 'phone':
                            requestData['phone'] = fieldVal;
                            book.data.phone = fieldVal;
                            break;
                    }
                }
            });

            // callback functions
            //requestData['giftCardAmount'] = pc.cardValue.toString();
            requestData['onRequestComplete'] = getPaymentProviderSuccess;
            requestData['onError'] = getPaymentProviderError;

            if (pc.partpayment) {
                //requestData['GiftCard'] = {};
                requestData['cardnumber'] = pc.partpaymentObj.CardNumber;
                requestData['amounttobill'] = pc.partpaymentObj.CardValue;
            }


            if (!pc.Authentication.HasLogin) {

                //test if a member using email address

                var emailEncoded = encodeURIComponent(requestData['emailAddress']);
                $.ajax({
                    type: "GET",
                    headers: {
                        'ApplicationOrigin': pc.api.applicationOrigin
                    },
                    contentType: 'application/json',
                    dataType: 'json',
                    url: pc.api.members +
                        'api/member/GetMemberLevel?circuitId=' +
                        pc.api.circuit +
                        '&emailAddress=' +
                        emailEncoded,
                    crossDomain: true
                }).done(function (data) {
                    //api/member/MemberSearch?circuitId=13&emailAddress=" + requestData['emailAddress']
                    //{"UserSessionId":null,"MemberLevel":0,"StatusCode":200,"PeachErrorCode":"Member Found","ClientErrorMessage":null,"PeachCode":0} 

                    if (data.StatusCode === 200 &&
                        typeof data.MemberLevel !== 'undefined' &&
                        data.MemberLevel !== null &&
                        data.MemberLevel !== -1 &&
                        data.MemberLevel.toString() !== pc.ml.e) {
                        // if they are a member
                        // what type of member?

                        if (data.MemberLevel.toString() === pc.ml.f) {
                            // free
                            callHostedBooking(requestData);
                        } else {
                            // other
                            $('[data-modalBg]').show();

                            $('[data-login-prompt]').show();

                            hideLoad();

                            window.scrollTo(0, 0);

                            $('[data-login-prompt-true]').on('click',
                                function (e) {
                                    e.preventDefault();
                                    $('[data-login-prompt]').hide();
                                    $('[data-modalBg]').hide();

                                    changePage('tickets');
                                    $('[data-booking-member-login]').toggleClass('active', 'slow');
                                });

                            $('[data-login-prompt-false]').on('click',
                                function (e) {
                                    e.preventDefault();
                                    $('[data-login-prompt]').hide();
                                    $('[data-modalBg]').hide();

                                    callHostedBooking(requestData);
                                });
                        }
                    } else {
                        //not a member just carry on
                        callHostedBooking(requestData);
                    }
                })
                    .fail(function () {
                        callHostedBooking(requestData);
                    }
                    );
            } else {


                callHostedBooking(requestData);
            }


        }

    }

    function callHostedBooking(data) {
        if (book.useAdyen) {
            setupHostedPaymentAdyen(data)
        } else {
            book.tickets.GetPaymentProvider(data);
        }
    }


    function getPaymentProviderSuccess(data) {
        // get payment provider success
        pc.hostedPayment.provider = "ADYEN";

        if (typeof pc.hostedPayment !== 'undefined' && typeof pc.hostedPayment.provider !== 'undefined') {
            switch (pc.hostedPayment.provider) {
                case 'TNS':
                    setupHostedPaymentTNS(data);
                    break;
                case 'ADYEN':
                    setupHostedPaymentAdyen(data);
                    break;
            }
        }
    }

    function getPaymentProviderError(a, b, c) {
        changePage('error');
    }

    function setupHostedPaymentAdyen() {
        setupAdyen();
        $('[data-form="booking-hosted"]').hide()
        $('[data-adyen]').removeClass('dn');
    }

    function setupHostedPaymentTNS(data) {
        // setup hosted payment TNS
        window.hpTNSComplete = function (resultIndicator, sessionVersion) {
            // hosted payment TNS complete

            showLoad();

            var hostedTempData = {};

            if (pc.partpayment) {
                hostedTempData = {
                    'queryString': null,
                    'postValues': {
                        'TNSSessionId': data.PostValues.TNSSessionId,
                        'OrderId': data.PostValues.PeachOrderId,
                        'UserSessionId': book.tickets.orderState.UserSessionId,
                        'PaymentProvider': pc.hostedPayment.provider,
                        'Name': $('[name="firstname"]').val() + ' ' + $('[name="lastname"]').val(),
                        'FirstName': $('[name="firstname"]').val(),
                        'LastName': $('[name="lastname"]').val(),
                        'Email': $('[name="email"]').val(),
                        'Phone': $('[name="phone"]').val()
                    },
                    'GiftCardNumber': $('[data-gc-input]').val().toString(),
                    'GiftCardOrderValue': pc.cardValue.toString(),
                    'testMode': pc.hostedPayment.testMode,
                    'onRequestComplete': paymentSuccess,
                    'onError': paymentErrorTNS,
                    'VoucherServiceCinemaId': $('[data-voucher-webservice-cinemaid]').attr('data-voucher-webservice-cinemaid').toString()
                };

                book.tickets.CompletePaymentProviderPayment(hostedTempData);
            }
            else {
                hostedTempData = {
                    'queryString': null,
                    'postValues': {
                        'TNSSessionId': data.PostValues.TNSSessionId,
                        'OrderId': data.PostValues.PeachOrderId,
                        'UserSessionId': book.tickets.orderState.UserSessionId,
                        'PaymentProvider': pc.hostedPayment.provider,
                        'Name': $('[name="firstname"]').val() + ' ' + $('[name="lastname"]').val(),
                        'FirstName': $('[name="firstname"]').val(),
                        'LastName': $('[name="lastname"]').val(),
                        'Email': $('[name="email"]').val(),
                        'Phone': $('[name="phone"]').val()
                    },
                    'testMode': pc.hostedPayment.testMode,
                    'onRequestComplete': paymentSuccess,
                    'onError': paymentErrorTNS
                };

                book.tickets.CompletePaymentProviderPayment(hostedTempData);
            }
        };

        window.hpTNSError = function (error) {
            // hosted payment TNS error
            changePage('error');
        };

        window.hpTNSCancel = function () {
            // hosted payment TNS cancel
            hideLoad();
        };

        function showBox() {
            // show lightbox
            // data            
            var tempData = {
                merchant: data.PostValues.Merchant,
                order: {
                    amount: data.PostValues.PaymentAmount,
                    currency: data.PostValues.Currency,
                    description: data.PostValues.Description,
                    id: data.PostValues.PeachOrderId
                },
                customer: {
                    email: book.data.email
                },
                interaction: {
                    displayControl: {
                        //customerEmail: 'READ_ONLY',
                        billingAddress: 'HIDE',
                        customerEmail: 'HIDE'
                    },
                    merchant: {
                        name: data.PostValues.MerchantName
                    }
                },
                session: {
                    id: data.PostValues.TNSSessionId
                }
            };

            Checkout.configure(tempData);

            // call showLightbox
            // because we are single page app use lightbox rather than single page
            Checkout.showLightbox();
        }

        if ($('#tnsScript').length === 0) {
            // add script for first time
            var tempScript = document.createElement('script');

            tempScript.src = data.Action;
            tempScript.id = 'tnsScript';
            tempScript.setAttribute('data-error', 'hpTNSError');
            tempScript.setAttribute('data-cancel', 'hpTNSCancel');
            tempScript.setAttribute('data-complete', 'hpTNSComplete');

            tempScript.onload = showBox;

            document.head.appendChild(tempScript);

            // save tns url so we can close the lightbox
            var tempAnchor = document.createElement('a');
            tempAnchor.href = data.Action;
            book.tnsurl = tempAnchor.hostname;
        }
        else {
            showBox();
        }
    }

    function paymentErrorTNS(a, b, c) {
        var $form = $('[data-form]'),
            $formError = $('[data-form-error]'),
            error = '',
            errorCode = parseInt(JSON.parse(a.responseText).PeachErrorCode || 0),
            hideForm = false;

        switch (errorCode) {
            case 1:
            case 3:
                error = "We're really sorry, but there's been a problem with your booking. Please drop us a line on " + pc.support.phoneNumber + " (national call rate charges apply) or email us on <a href='" + pc.support.emailAddress + "'>" + pc.support.emailAddress + "</a> so we can confirm whether your booking has gone through correctly.";
                break;
            case 2:
                error = 'The payment has been declined. Please ensure you have entered the correct details.';
                break;
            case 4:
                error = 'Your order has already been submitted for processing. Please check your email for confirmation.';
                break;
            default:
                error = 'Your order could not be completed. The screening may now be sold out.';
                break;
        }

        // update form error message
        $formError.html(error);

        // send to error page
        changePage('error');
    }

    function setupConfirmation() {
        // setup confirmation page
        // check we have the cinema and order ids
        if (book.cinemaid !== '' && book.orderid !== '') {
            // get order details
            book.tickets.GetCompleteOrder(book.cinemaid, book.orderid, confirmationSuccess, confirmationError);
        }
        else {
            confirmationError();
        }
    }

    function confirmationSuccess(data) {
        var seats = [],
            selSeats,
            selSeatsLen,
            i = 0;

        book.data.order = data;

        // update ticket order
        updateTicketOrder(data);

        // update seat order
        if (typeof data.SelectedSeats !== 'undefined') {
            selSeats = data.SelectedSeats;
            selSeatsLen = selSeats.length;

            if (selSeatsLen > 0) {
                for (i = 0; i < selSeatsLen; i += 1) {
                    seats.push(selSeats[i].SeatName);
                }

                updateSeatsOrder(seats.join(' '));
            }
        }

        // update booking ref
        if (typeof data.BookingReference !== 'undefined') {
            $('[data-book-movie-bookingid-info]').html(data.BookingReference);
            $('[data-book-movie-bookingid]').show();
        }

        if (typeof data.BookingConfirmationId !== 'undefined') {
            //$('[data-book-movie-bookingid-info]').html(data.BookingConfirmationId);
            //$('[data-book-movie-bookingid]').show();
            $('[data-book-qr]').attr('src', '/barcode?scale=5&data=' + data.BookingConfirmationId).removeClass('dn');
        }

        // print functionality
        $('[data-book-print]').on('click.bookprint', function (e) {
            e.preventDefault();
            window.print();
        });

        setupAppleWallet(book.cinemaid, data.ExternalOrderId);

        setupCinemaShare();

        if (hasLS()) {
            localStorage.removeItem('User_Order_' + book.sessionid);
        }
        else {
            docCookies.removeItem('User_Order_' + book.sessionid, '/');
        }

        $('body').css({
            'position': '',
            'width': '',
            'height': ''
        });

        confirmationTrack(data);
    }

    function setupCinemaShare() {
        var $btn = $('[data-book-cinema-share]');

        if (typeof navigator.share === 'undefined' || $btn.length === 0) {
            return;
        }

        $btn.on('click', function (e) {
            e.preventDefault();

            var shareData = JSON.parse($(this).attr('data-book-cinema-share') || null);

            if (shareData !== null) {
                navigator.share(shareData);
            }
        }).removeClass('dn');
    }

    function newsletterSignup() {
        if (typeof book.isConfirmOnly !== 'undefined') {
            return;
        }

        if (pc.Authentication.HasLogin) {
            if (typeof pc.Loyalty.Member !== 'undefined' && pc.Loyalty.Member !== null) {
                $.ajax({
                    type: "POST",
                    headers: {
                        'ApplicationOrigin': pc.api.applicationOrigin
                    },
                    contentType: 'application/json',
                    dataType: 'json',
                    url: pc.api.members + 'api/Member/Edit/?circuitId=' + pc.api.circuit,
                    data: JSON.stringify($.extend({}, pc.Loyalty.Member.MemberDetails, {
                        SendNewsletter: $('[data-newsletter-checkbox]').prop('checked'),
                        ContactByThirdParty: $('[data-newsletterevents-checkbox]').prop('checked')
                    })),
                    crossDomain: true
                });
            }
        }
        else {
            $.ajax({
                url: pc.api.members + 'api/member/GetMemberLevel?circuitId=' + pc.api.circuit + '&emailAddress=' + encodeURIComponent(book.data.email),
                type: 'GET',
                headers: {
                    'ApplicationOrigin': pc.api.applicationOrigin
                },
                dataType: 'json',
                contentType: 'application/json'
            }).always(function (response) {
                if (
                    typeof pc.ml !== 'undefined' &&
                    typeof response !== 'undefined' &&
                    response.StatusCode === 200
                ) {
                    if (
                        typeof response.MemberLevel !== 'undefined' &&
                        response.MemberLevel !== null &&
                        response.MemberLevel.toString() === pc.ml.f
                    ) {
                        $.ajax({
                            type: 'POST',
                            headers: {
                                'ApplicationOrigin': pc.api.applicationOrigin
                            },
                            url: pc.api.members + 'api/member/Login?circuitId=' + pc.api.circuit,
                            dataType: 'json',
                            contentType: 'application/json',
                            data: JSON.stringify({
                                Username: book.data.email,
                                Password: ''
                            })
                        }).always(function (data) {
                            if (typeof data !== 'undefined' && data !== null && typeof data.Member !== 'undefined' && data.Member !== null && data.StatusCode === 200 && data.PeachCode === 0) {
                                $.ajax({
                                    type: "POST",
                                    headers: {
                                        'ApplicationOrigin': pc.api.applicationOrigin
                                    },
                                    contentType: 'application/json',
                                    dataType: 'json',
                                    url: pc.api.members + 'api/Member/Edit/?circuitId=' + pc.api.circuit,
                                    data: JSON.stringify($.extend({}, data.Member.MemberDetails, {
                                        SendNewsletter: $('[data-newsletter-checkbox]').prop('checked'),
                                        ContactByThirdParty: $('[data-newsletterevents-checkbox]').prop('checked')
                                    })),
                                    crossDomain: true
                                });
                            }
                        });
                    }
                }
                else if (
                    ($('[data-newsletter-checkbox]').prop('checked') === true || $('[data-newsletterevents-checkbox]').prop('checked') === true) &&
                    book.data.email !== ''
                ) {
                    $.ajax({
                        url: pc.api.members + 'api/Member/Create?circuitId=' + pc.api.circuit,
                        type: 'POST',
                        headers: {
                            'ApplicationOrigin': pc.api.applicationOrigin
                        },
                        dataType: 'json',
                        data: JSON.stringify({
                            Firstname: book.data.firstName,
                            Lastname: book.data.lastName,
                            Email: book.data.email,
                            SendNewsletter: $('[data-newsletter-checkbox]').prop('checked'),
                            ContactByThirdParty: $('[data-newsletterevents-checkbox]').prop('checked'),
                            ClubId: pc.api.loyaltyClubId
                        }),
                        contentType: 'application/json'
                    });
                }
            });
        }
    }

    function confirmationTrack(data) {
        // confirmation tracking
        var tempData = {},
            totalItems = 0,
            cookieSet = false;

        if (typeof data !== 'undefined') {
            // check if we have cookie as only want to do this part once
            if (typeof docCookies !== 'undefined' && docCookies.getItem('gaOrderId' + data.BookingConfirmationId) !== null) {
                cookieSet = true;
            }

            if (
                typeof performance !== 'undefined' &&
                performance !== null &&
                typeof performance.navigation !== 'undefined' &&
                performance.navigation !== null &&
                performance.navigation.type === 1
            ) {
                cookieSet = true;
            }

            if (cookieSet === false) {
                if (pc.Authentication.HasLogin) {
                    tempData['virtualPageURL'] = 'booking/member-confirmation';
                    tempData['virtualPageTitle'] = 'Member Confirmation';
                } else {
                    tempData['virtualPageURL'] = 'booking/guest-confirmation';
                    tempData['virtualPageTitle'] = 'Guest Confirmation';
                }

                tempData['ecommerce'] = {};
                tempData['ecommerce']['purchase'] = {};
                tempData['ecommerce']['purchase']['actionField'] = {};
                tempData['ecommerce']['purchase']['products'] = [];

                for (var i = 0; i < data.Tickets.length; i++) {

                    if (typeof data.Tickets[i].VoucherCode !== 'undefined' && data.Tickets[i].VoucherCode !== '') {
                        coupon = data.Tickets[i].DisplayName;
                    }

                    tempData['ecommerce']['purchase']['products'].push({
                        'name': data.BookedFilmData.Title,
                        'id': data.BookedFilmData.FilmId,
                        'category': 'film',
                        'price': (parseFloat(data.Tickets[i].Price) / 100).toFixed(2),
                        'quantity': data.Tickets[i].Quantity,
                        'variant': data.Tickets[i].DisplayName,
                        'coupon': coupon
                    });

                    totalItems += data.Tickets[i].Quantity;
                }

                if (typeof book.tickets.orderState.BookingFee !== 'undefined' && book.tickets.orderState.BookingFee > 0) {
                    tempData['ecommerce']['purchase']['products'].push({
                        'name': 'Booking Fee',
                        'id': '0',
                        'category': 'ticket',
                        'price': (parseFloat(book.tickets.orderState.BookingFee) / 100).toFixed(2),
                        'quantity': 1,
                        'variant': 'Booking Fee'
                    });
                }

                tempData['ecommerce']['purchase']['actionField']['id'] = data.BookingConfirmationId;
                tempData['ecommerce']['purchase']['actionField']['affiliation'] = data.Cinema.CinemaName;
                tempData['ecommerce']['purchase']['actionField']['revenue'] = parseFloat(data.GrandTotal / 100).toFixed(2);

                // fb tracking
                if (typeof fbq !== 'undefined') {
                    fbq(
                        'track',
                        'Purchase',
                        {
                            content_ids: [filmData.FilmId + '|' + filmData.Sessions[0].Times[0].CinemaId + '|' + filmData.Sessions[0].Date],
                            currency: 'GBP',
                            movieref: location.search.indexOf('movieref=fb_movies') > -1 ? 'fb_movies' : '',
                            num_items: totalItems,
                            value: parseFloat(data.GrandTotal / 100).toFixed(2)
                        }
                    );
                }

                newsletterSignup();
            }
            else {
                tempData['virtualPageURL'] = '/confirmation-repeat';
                tempData['virtualPageTitle'] = 'Booking Confirmation Repeat';
            }

            if (typeof docCookies !== 'undefined') {
                docCookies.setItem('gaOrderId' + data.BookingConfirmationId, data.BookingConfirmationId, Infinity);
            }

            // logged in status
            if (typeof pc.Authentication !== 'undefined' && pc.Authentication.HasLogin) {
                tempData['visitorStatus'] = 'loggedin';
                tempData['customerType'] = 'Reward Member';
                tempData['userID'] = pc.Authentication.MemberId;
            }
            else {
                tempData['visitorStatus'] = 'loggedoff';
            }

            tempData['event'] = 'VirtualPageview';
            tempData['stepName'] = 'confirmation';

            // payment type track
            gaTrack({
                'event': 'checkoutOption',
                'ecommerce': {
                    'checkout_option': {
                        'actionField': {
                            'step': 4,
                            'option': book.paymentType
                        }
                    }
                }
            });

            // send ga track
            gaTrack(tempData);
        }
    }

    function confirmationError() {
        $('[data-form-error]').html('Sorry, we were unable to display the confirmation page. Your order was successful and you should receive a confirmation email shortly.');
        changePage('error');
    }

    function setupTicketVouchers() {
        var $vouchers = $('[data-ticketvouchers]');

        if ($vouchers.length === 0 || $vouchers.attr('data-ticketvouchers') === 'is-setup') {
            return;
        }

        $vouchers.attr('data-ticketvouchers', 'is-setup');

        $vouchers.find('[data-ticketvouchers-button]').on('click', function (e) {
            e.preventDefault();

            $vouchers.toggleClass('is-active');
        });

        $vouchers.find('[data-ticketvouchers-input]').on('keyup', function (e) {
            if (e.which === 13) {
                checkTicketVouchers();
            }
        });

        $vouchers.find('[data-ticketvouchers-continue]').on('click', function (e) {
            e.preventDefault();
            checkTicketVouchers();
        });

        $vouchers.find('[data-ticketvouchers-info]').on('click', function (e) {
            e.preventDefault();
            $('[data-modalbg], [data-ticketvouchers-overlay-info]').show();
        });

        $('[data-ticketvouchers-overlay-info-close]').on('click', function (e) {
            e.preventDefault();
            $('[data-modalbg], [data-ticketvouchers-overlay-info]').hide();
        });

        $('[data-ticketvouchers-overlay-message-close]').on('click', function (e) {
            e.preventDefault();
            $('[data-modalbg], [data-ticketvouchers-overlay-message]').hide();
        });

        function showTicketVouchersError() {
            $('[data-modalbg], [data-ticketvouchers-overlay-message]').show();
        }

        function checkTicketVouchers() {
            var $input = $vouchers.find('[data-ticketvouchers-input]');
            var inputValue = $input.val().toUpperCase();

            if (inputValue === '') {
                showTicketVouchersError();
                return;
            }

            if (typeof book.tickets.orderState.VoucherTickets !== 'undefined' && book.tickets.orderState.VoucherTickets !== null && book.tickets.orderState.VoucherTickets.length > 0) {
                for (var v = 0; v < book.tickets.orderState.VoucherTickets.length; v++) {
                    if (book.tickets.orderState.VoucherTickets[v].VoucherCode === inputValue && book.tickets.orderState.VoucherTickets[v].Quantity === book.tickets.orderState.VoucherTickets[v].QuantityLimit) {
                        showTicketVouchersError();
                        return;
                    }
                }
            }

            showLoad();

            $.ajax({
                url: pc.api.booking + 'api/Booking/AddVoucherTicket/?cinemaId=' + book.cinemaid,
                type: 'POST',
                contentType: 'application/json',
                dataType: 'json',
                crossDomain: true,
                data: JSON.stringify({
                    voucherCode: inputValue,
                    cinemaId: book.cinemaid,
                    sessionId: book.sessionid,
                    orderId: book.tickets.orderState.OrderId,
                    userSessionId: book.tickets.orderState.UserSessionId
                })
            }).always(function (data) {
                console.log(data);

                if (
                    typeof data === 'undefined' ||
                    data === null ||
                    data.StatusCode !== 200 ||
                    typeof data.TicketTypes === 'undefined' ||
                    data.TicketTypes === null ||
                    data.TicketTypes.length === 0
                ) {
                    showTicketVouchersError();
                    hideLoad();
                    return;
                }

                $vouchers.find('[data-ticketvouchers-input]').val('');
                $vouchers.removeClass('is-active');
                hideLoad();

                if (typeof book.tickets.orderState.VoucherTickets === 'undefined' || book.tickets.orderState.VoucherTickets === null) {
                    book.tickets.orderState.VoucherTickets = [];
                }

                $.each(data.TicketTypes, function (index, value) {

                    for (var v = 0; v < book.tickets.orderState.VoucherTickets.length; v++) {
                        if (
                            book.tickets.orderState.VoucherTickets[v].Id === data.TicketTypes[index].Id &&
                            book.tickets.orderState.VoucherTickets[v].VoucherCode === data.TicketTypes[index].VoucherCode
                        ) {
                            if (book.tickets.orderState.VoucherTickets[v].QuantityLimit > book.tickets.orderState.VoucherTickets[v].Quantity) {
                                book.tickets.orderState.VoucherTickets[v].Quantity += 1;
                                $('[data-book-ticket-type="' + book.tickets.orderState.VoucherTickets[v].Id + '"][data-book-ticket-vouchercode="' + book.tickets.orderState.VoucherTickets[v].VoucherCode + '"]').val(book.tickets.orderState.VoucherTickets[v].Quantity);
                            }
                            return;
                        }
                    }

                    //check if ticket type display name includes Gold    
                    if (typeof data.TicketTypes[index].DisplayName !== 'undefined' && data.TicketTypes[index].DisplayName.indexOf('Gold') > -1) {
                        data.TicketTypes[index].isGold = true;
                    }

                    // create formatted price property
                    data.TicketTypes[index].PriceFormatted = parseFloat(value.Price / 100).toFixed(2);

                    var quantityLimit = data.QuantityLimit || 1;
                    if (typeof data.TicketTypes[index].QuantityLimit !== 'undefined' && data.TicketTypes[index].QuantityLimit !== null && data.TicketTypes[index].QuantityLimit !== '' && data.TicketTypes[index].QuantityLimit !== 0) {
                        quantityLimit = data.TicketTypes[index].QuantityLimit;
                    }
                    else {
                        data.TicketTypes[index].QuantityLimit = quantityLimit;
                    }

                    data.TicketTypes[index].pQuantity = [];

                    for (var i = 0, len = quantityLimit + 1; i < len; i++) {
                        data.TicketTypes[index].pQuantity.push({
                            index: i,
                            selected: i === data.TicketTypes[index].Quantity
                        });
                    }

                    book.tickets.orderState.VoucherTickets.push(data.TicketTypes[index]);
                });

                addTickets({ Voucher: data.TicketTypes });
            });
        }

    }

    function setupCeaCards() {
        var $ceaCards = $('[data-cea-cards]');

        if ($ceaCards.length === 0 || $ceaCards.attr('data-cea-cards') === 'is-setup') {
            return;
        }

        $ceaCards.attr('data-cea-cards', 'is-setup');

        $ceaCards.find('[data-cea-cards-button]').on('click', function (e) {
            e.preventDefault();

            $ceaCards.toggleClass('is-active');
        });

        $ceaCards.find('[data-ceaCards-input]').on('keyup', function (e) {
            if (e.which === 13) {
                checkCeaCard();
            }
        });

        $ceaCards.find('[data-ceaCards-continue]').on('click', function (e) {
            e.preventDefault();
            checkCeaCard();
        });

        $ceaCards.find('[data-ceaCards-info]').on('click', function (e) {
            e.preventDefault();
            $('[data-modalbg], [data-ceaCards-overlay-info]').show();
        });

        $('[data-ceaCards-overlay-info-close]').on('click', function (e) {
            e.preventDefault();
            $('[data-modalbg], [data-ceaCards-overlay-info]').hide();
        });

        $('[data-ceaCards-overlay-message-close]').on('click', function (e) {
            e.preventDefault();
            $('[data-modalbg], [data-ceaCards-overlay-message]').hide();
        });

        $('[data-ceacards-bookingmessage-close]').off('click').on('click', function (e) {
            $('[data-ceacards-bookingmessage-overlay]').fadeOut(500);
        });

        function showCeaCardsError(message) {
            message = message || 'Please make sure your CEA Card code is correct.';
            var $overlay = $('[data-ceaCards-overlay-message]');

            $('p', $overlay).text(message);
            $overlay.show();
            $('[data-modalbg]').show();
        }

        function checkCeaCard() {
            var $input = $ceaCards.find('[data-ceaCards-input]');
            var inputValue = $input.val().trim().toUpperCase();

            if (inputValue === '' || inputValue.length !== 9 || !inputValue.startsWith('40')) {
                showCeaCardsError();
                return;
            }

            var orderCeaCards = book.tickets.orderState.ceaCards;
            if (typeof orderCeaCards !== 'undefined' && orderCeaCards.filter(ca => ca === inputValue).length > 0) {
                showCeaCardsError('This number has already been used, please enter a different one.');
                return;
            } else {
                book.tickets.orderState.ceaCards = [];
            }

            var ceaTickets = book.data.tickets.TicketTypes.filter(t => t.isCea);
            if (ceaTickets.length > 0) {
                $ceaCards.find('[data-ceaCards-input]').val('');
                $ceaCards.removeClass('is-active');

                var ceaTicket = ceaTickets[0];
                book.data.tickets.TicketTypes.push(ceaTicket);
                addTickets({ Voucher: [ceaTicket] });

                if (ceaTickets.length === ceaTicket.ceaQuantityLimit - 1) {
                    var $overlay = $('[data-ceacards-overlay]');
                    $('label, input, [data-ceacards-continue]', $overlay).addClass('dn');
                    $('[data-ceacards-continue]', $overlay).after('<p class="cea-limit-messgae">You have reached the maximum number of CEA Cards, no more can be added.</p>');
                }

                return;
            }

            showLoad();

            $.ajax({
                url: '/api/BookingApi/GetCeaTicketTypesForCardCode/' + inputValue + '/' + book.cinemaid + '/' + book.sessionid + '/' + book.tickets.orderState.UserSessionId,
                contentType: 'application/json',
                dataType: 'json',
                crossDomain: true
            }).always(function (data) {
                if (
                    typeof data === 'undefined' ||
                    data === null ||
                    data.StatusCode !== 200 ||
                    typeof data.TicketTypes === 'undefined' ||
                    data.TicketTypes === null ||
                    data.TicketTypes.length === 0
                ) {
                    showCeaCardsError();
                    hideLoad();
                    return;
                }

                book.tickets.orderState.ceaCards.push(inputValue);

                $ceaCards.find('[data-ceaCards-input]').val('');
                $ceaCards.removeClass('is-active');
                hideLoad();
                
                $.each(data.TicketTypes, function (index, value) {
                                        
                    //check if ticket type display name includes Gold    
                    if (typeof data.TicketTypes[index].DisplayName !== 'undefined' && data.TicketTypes[index].DisplayName.indexOf('Gold') > -1) {
                        data.TicketTypes[index].isGold = true;
                    }

                    // create formatted price property
                    data.TicketTypes[index].PriceFormatted = parseFloat(value.Price / 100).toFixed(2);

                    data.TicketTypes[index].ceaQuantityLimit = data.TicketTypes[index].QuantityLimit;
                    data.TicketTypes[index].QuantityLimit = 1;
                    data.TicketTypes[index].isCea = true;
                    data.TicketTypes[index].pQuantity = [];

                    for (var i = 0, len = 1; i <= len; i++) {
                        data.TicketTypes[index].pQuantity.push({
                            index: i,
                            selected: i === data.TicketTypes[index].Quantity
                        });
                    }

                    book.data.tickets.TicketTypes.push(data.TicketTypes[index]);
                });

                addTickets({ Voucher: data.TicketTypes });
            });
        }
    }

    function setupAdyen() {

        const adyenBlockedPaymentMethods = resolveAdyenBlockedPaymentMethods();
        let enableStoreDetails = pc.Authentication.HasLogin;
        console.log("The following payment methods were excluded: ", adyenBlockedPaymentMethods)


        let postData = {
            CinemaId: book.cinemaid,
            OrderId: book.tickets.orderState.OrderId,
            BlockedPaymentMethods: adyenBlockedPaymentMethods
        }


        if (pc.partpayment) {
            postData.GiftCard = {
                "CardNumber": pc.partpaymentObj.CardNumber,
                'Amount': pc.partpaymentObj.CardValue,
                'VoucherServiceCinemaId': $('[data-voucher-webservice-cinemaid]').attr('data-voucher-webservice-cinemaid').toString()
            }
        }
        // setup Adyen payment
        $.ajax({
            url: '/api/AdyenDropIn/getProviderSettings',
            type: 'POST',
            contentType: 'application/json',
            dataType: 'json',
            crossDomain: true,
            data: JSON.stringify(postData)
        }).always(function (getProviderSettingsResponse) {

            book.adyenConfiguration = {
                paymentMethodsResponse: JSON.parse(getProviderSettingsResponse.PaymentMethods),
                clientKey: getProviderSettingsResponse.ClientKey,
                locale: getProviderSettingsResponse.Locale,
                environment: getProviderSettingsResponse.Environment,
                onSubmit: (state, dropin) => {
                    // initiate Adyen payment
                    initiateAdyenPayment(state, dropin)

                },
                onAdditionalDetails: (state, dropin) => {
                    showLoad();
                    let SubmitAdditionalDetailsRequest = {
                        CinemaId: book.cinemaid,
                        OrderId: book.tickets.orderState.OrderId,
                        'AdyenDropInData': state.data
                    }


                    if (pc.partpayment) {
                        SubmitAdditionalDetailsRequest.GiftCard = {
                            "CardNumber": pc.partpaymentObj.CardNumber,
                            'Amount': pc.partpaymentObj.CardValue,
                            'VoucherServiceCinemaId': $('[data-voucher-webservice-cinemaid]').attr('data-voucher-webservice-cinemaid').toString()
                        }
                    }
                    $.ajax({
                        url: '/api/AdyenDropIn/SubmitAdditionalDetails',
                        type: 'POST',
                        contentType: 'application/json',
                        dataType: 'json',
                        crossDomain: true,
                        data: JSON.stringify(SubmitAdditionalDetailsRequest)
                    }).always(function (response) {
                        if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                            let ProviderData = JSON.parse(response.CompletePaymentResponse.ProviderData);
                            if (typeof ProviderData.resultCode !== 'undefined' && ProviderData.resultCode !== null) {
                                if (ProviderData.resultCode === "Authorised") {
                                    paymentSuccess(response);
                                } else {

                                    if (typeof ProviderData.action !== 'undefined' &&
                                        ProviderData.action !== null) {
                                        console.log(ProviderData.action.type)
                                        dropin.handleAction(ProviderData.action)
                                    } else {
                                        paymentError(response);

                                    }
                                }
                            } else {
                                paymentError(response);

                            }
                        }
                        else {
                            paymentError(response);
                        }
                        hideLoad();

                    });
                },
                onError: (error) => {
                    throw Error(error);
                    //adyenPaymentError(error);
                },
                paymentMethodsConfiguration: {
                    card: {
                        hasHolderName: true,
                        holderNameRequired: true,
                        enableStoreDetails: enableStoreDetails,
                        name: 'Credit or debit card',
                        amount: {
                            value: getProviderSettingsResponse.Amount,
                            currency: getProviderSettingsResponse.Currency
                        }
                    },
                    applepay: {
                        amount: {
                            value: getProviderSettingsResponse.Amount,
                            currency: getProviderSettingsResponse.Currency
                        },
                        countryCode: "GB",
                        onSubmit: (state, dropin) => {
                            initiateAdyenPayment(state, dropin)

                        }
                    }
                }
            };

            initiateAdyen();
            hideLoad();

        });


    }


    function initiateAdyenPayment(state, dropin = false) {
        showLoad();


        let InitiatePaymentRequest = {
            CinemaId: book.cinemaid,
            OrderId: book.tickets.orderState.OrderId,
            'Name': $('[name="firstname"]').val() + ' ' + $('[name="lastname"]').val(),
            'FirstName': $('[name="firstname"]').val(),
            'LastName': $('[name="lastname"]').val(),
            'Email': $('[name="email"]').val(),
            'Phone': $('[name="phone"]').val(),
            'AdyenDropInData': state.data
        }


        if (pc.partpayment) {
            InitiatePaymentRequest.GiftCard = {
                "CardNumber": pc.partpaymentObj.CardNumber,
                'Amount': pc.partpaymentObj.CardValue,
                'VoucherServiceCinemaId': $('[data-voucher-webservice-cinemaid]').attr('data-voucher-webservice-cinemaid').toString()
            }
        }

        $.ajax({
            url: '/api/AdyenDropIn/InitiatePayment',
            type: 'POST',
            contentType: 'application/json',
            dataType: 'json',
            crossDomain: true,
            data: JSON.stringify(InitiatePaymentRequest)
        }).always(function (response) {
            if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                let ProviderData = JSON.parse(response.CompletePaymentResponse.ProviderData);
                if (typeof ProviderData.resultCode !== 'undefined' && ProviderData.resultCode !== null) {
                    if (ProviderData.resultCode === "Authorised") {
                        paymentSuccess(response);
                    } else {

                        if (typeof ProviderData.action !== 'undefined' &&
                            ProviderData.action !== null &&
                            dropin) {
                            if (typeof ProviderData.action.type !== 'undefined' &&
                                ProviderData.action.type !== null &&
                                ProviderData.action.type === "redirect") {
                                book.isAdyenRedirect = true;
                            }
                            dropin.handleAction(ProviderData.action)
                        } else {
                            paymentError(response);

                        }
                    }
                } else {
                    paymentError(response);

                }
            }
            else {
                paymentError(response);
            }
            hideLoad();
        });
    }

    function resolveAdyenBlockedPaymentMethods() {

        //Block apple pay for mobile devices only.
        if (pc.device.iosApp === true) {
            return ['applepay'];
        }

        //Return no blocked payment methods otherwise.
        return [];
    }


    function initiateAdyen() {
        const checkout = new AdyenCheckout(book.adyenConfiguration);

        const dropin = checkout
            .create('dropin', {
                openFirstPaymentMethod: true
            })
            .mount('#dropin-container');
    }

    function setupGiftCard() {
        // gift card redemption

        var $row = $('[data-gc-row]').not('.isSetup');

        if ($row.length > 0) {
            $row.each(setupGiftCardRow);
        }

        var $setupRow = $('[data-gc-row].isSetup');

        $setupRow.each(function () {
            $(this).find('[data-gc-check]').trigger('click');
        });
    }

    function setupGiftCardRow() {
        var $row = $(this),
            $input = $row.find('[data-gc-input]'),
            $btn = $row.find('[data-gc-check]'),
            $msg = $row.find('[data-gc-message="success"]'),
            $error = $row.find('[data-gc-message="error"]'),
            $errorSplitPay = $row.find('[data-gc-message="error-split"]'),
            $errorExpired = $row.find('[data-gc-message="error-expired"]'),
            $pay = $('[data-gc-pay]'),
            paymentFields = null;

        $row.addClass('isSetup');

        function removePayment() {

            $('[data-form="booking"]').find("input[type=text], select").val("");
        }

        function removeGCMessage() {
            // clear messages
            $row.removeClass('valid invalid');
            $input.removeClass('invalid');
            $msg.html('').hide();
            $error.hide();
        }

        function showGCErrorExpired() {
            $row.addClass('invalid');
            $errorExpired.show();
            showGCBalance(0);
            $input.val('');
            $('[data-gc-row]').data('gc-row', 0);
            // show cc
            if (paymentFields) {
                $pay.html(paymentFields);
                paymentFields = null;
            }
            hideLoad();
        }
        function showGCError() {
            $row.addClass('invalid');
            $error.show();
            showGCBalance(0);
            $input.val('');
            $('[data-gc-row]').data('gc-row', 0);
            // show cc
            if (paymentFields) {
                $pay.html(paymentFields);
                paymentFields = null;
            }
            hideLoad();
        }
        function showGCErrorSplitPayment() {
            $row.addClass('invalid');
            $errorSplitPay.show();
            showGCBalance(0);
            $input.val('');
            $('[data-gc-row]').data('gc-row', 0);
            // show cc
            if (paymentFields) {
                $pay.html(paymentFields);
                paymentFields = null;
            }
            hideLoad();
        }
        function showGCSuccess(balance, thetotal, newValue) {
            var msg = '£{{balance}} balance has been applied.';

            if (typeof balance !== 'undefined') {
                msg = msg.replace('{{balance}}', (parseFloat(thetotal) / 100).toFixed(2));
                $msg.html(msg).show();
            }

            $('[data-book-giftcard-balance-amount]').html((thetotal / 100).toFixed(2));
            $('[data-book-movie-cost-total]').html((newValue / 100).toFixed(2));

            book.basket.total = newValue;

            $('[data-book-giftcard-balance]').show();
            $row.addClass('valid');

            //$('[data-ap-other]').slideDown(400);
            $('[data-ap-btn], [data-ap-newsletter]').hide();

            hideLoad();
        }

        function showGCSuccessOutstanding(balance) {

            if (typeof balance === 'undefined') {
                showGCError();
                return;
            }

            var msg = '£{{balance}} balance has been applied.';
            var parsedBalance = parseFloat(balance / 100).toFixed(2);

            msg = msg.replace('{{balance}}', parsedBalance);
            $msg.html(msg).show();

            $row.addClass('valid');
            hideLoad();

            var cardValue = parseFloat(balance),
                total = book.basket.total;

            $('[data-book-giftcard-balance]').show();
            $('[data-book-giftcard-balance-amount]').html(parsedBalance);

            var newTotal = total - cardValue;

            $('[data-book-movie-cost-total]').html((newTotal / 100).toFixed(2));

            book.basket.total = newTotal;

            var s = cardValue + '';
            s = s.replace('.', '');
            s = parseInt(s);

            pc.partpaymentObj.CardValue = s;

            pc.partpayment = true;
            $('button.bookSubmit').prop('disabled', false);

            // make gc required field
            $input.prop('required', true);
        }

        function showGCBalance(balance) {
            if (typeof balance !== 'undefined') {
                var cardValue = parseFloat(balance),
                    total = book.basket.total,
                    newTotal = 0;

                if (total !== 0) {
                    newTotal = total - cardValue;

                    $('[data-gc-balance-cost]').html((cardValue / 100).toFixed(2));

                    $('[data-book-movie-cost-total]').html((newTotal / 100).toFixed(2));

                    book.basket.total = newTotal;

                    if (cardValue !== 0) {
                        $('[data-gc-balance]').show();
                    }
                    else {
                        $('[data-gc-balance]').hide();
                    }
                }
            }
        }

        function checkGC() {
            var inputVal = $input.val() || '';

            pc.partpaymentObj.CardNumber = inputVal;

            if (inputVal !== '') {
                showLoad();
                book.tickets.GetGiftCardDetails(inputVal, function (data) {
                    /*{"Id":"12312312312","BalanceRemaining":"500"}*/
                    var cardValue = 0,
                        thetotal = 0,
                        dif = 0,
                        used = 0;
                    if (typeof data !== 'undefined' && data !== null && data['PeachCode'] === 0) {

	                    // check we have balance
	                    if (data && typeof data['BalanceRemaining'] !== 'undefined') {

		                    cardValue = parseFloat(data['BalanceRemaining']);

		                    pc.cardValue = parseFloat(data['BalanceRemaining']);

		                    thetotal = book.basket.total;

		                    if (cardValue !== 0 && thetotal !== 0) {
			                    dif = cardValue - thetotal;

			                    if (dif >= 0) {
				                    // if card has enough on it
				                    var newValue = thetotal - cardValue;

				                    if (newValue < 0) {
					                    newValue = 0;
				                    }

				                    $('[data-gc-row]').attr('data-gc-row', newValue);

				                    // new call to service for part payment 
				                    showGCSuccess(dif, thetotal, newValue);

				                    // make gc required field
				                    $input.prop('required', true);
			                    } else if (book.allowSplitPayment) {
				                    // if card does not i.e. part-payment
				                    // show cc
				                    $('[data-gc-row]').attr('data-gc-row', cardValue);

				                    showGCSuccessOutstanding(cardValue);

				                    $('.book-payment-submit').prop('disabled', false);
			                    } else {
				                    showGCErrorSplitPayment();
			                    }
		                    } else {
			                    showGCError();
		                    }
	                    } else {
		                    showGCError();
	                    }
                    } else {
	                    showGCErrorExpired();
                    }
                }, showGCError);
            }
            else {
                $input.addClass('invalid');
            }
        }

        $input.on('keyup', function () {
            removeGCMessage();
        });

        $btn.off('click').on('click', function (e) {
            e.preventDefault();

            checkGC();
        });

    }

    function hideGC(clearInput) {
        pc.partpayment = false;

        var subTotalAmount = book.basket.subTotal;
        var bookingFee = book.basket.bookingFee;
        var total = subTotalAmount + bookingFee;

        $('[data-book-movie-cost-total]').html((total / 100).toFixed(2));

        book.basket.total = total;

        $('[data-book-giftcard-balance]').hide();

        if (typeof clearInput !== 'undefined') {
            $('[data-gc-input]').val('').prop('required', false);
            $('[data-gc-message]').hide();
            $('[data-gc-row]').attr('data-gc-row', 0);
        }
    }

    $(document).on("click", ".downToggleimg",
        function () {
            $(this).next('.descript').slideToggle();
            $(this).toggleClass('active');
        });


    function timeCountdown(time) {
        // timer

        var $timer = $('[data-book-timer]'),
            min = Math.floor(time / 60),
            sec = time - min * 60;

        sec = sec < 10 ? '0' + sec : sec;

        $timer.html(min + ':' + sec);

    }

    function timeOut() {
        // time has ellapsed
        // hide timer
        // $('[data-book-timer]').hide();

        // remove tns lightbox
        if (typeof book.tnsurl !== 'undefined') {
            $('iframe[src*="' + book.tnsurl + '"]').remove();
        }

        if (typeof book.isFinished === 'undefined') {
            if (hasLS()) {
                localStorage.removeItem('User_Order_' + book.sessionid);
            }
            else {
                docCookies.removeItem('User_Order_' + book.sessionid, '/');
            }
            // show timeout page
            changePage('timeout');
        }
    }

    function showLoad() {
        $('[data-book-load]').show();
    }

    function hideLoad() {
        $('[data-book-load]').hide();
    }

    function toggleInfo() {
        /*
        var $btn = $('[data-book-order] [data-toggle-btn]:visible');
 
        if ($btn.length > 0) {
            // check which booking page we are on
            switch (book.currentpage) {
                case 'tickets':
                case 'confirmation':
                    // show order			
                    $('[data-toggle-btn]').trigger('click');
                    break;
                default:
                    // hide order
                    if ($btn.hasClass('active')) {
                        $btn.trigger('click');
                    }
                    break;
            }
        }
        */
    }

    // function to sort alphanumerically
    function sortAlphaNum(a, b) {
        var aA = a.replace(/[^a-zA-Z]/g, "");
        var bA = b.replace(/[^a-zA-Z]/g, "");
        if (aA === bA) {
            var aN = parseInt(a.replace(/[^0-9]/g, ""), 10);
            var bN = parseInt(b.replace(/[^0-9]/g, ""), 10);
            return aN === bN ? 0 : aN > bN ? 1 : -1;
        } else {
            return aA > bA ? 1 : -1;
        }
    }

    function bookLinkBack() {
        var ref = document.referrer;

        if (ref !== '') {
            ref = ref.replace(/^http([s]?):\/\/([a-zA-Z0-9-_\.]+)(:[0-9]+)?/, '');

            $('[data-book-link-back]').attr('href', ref);
        }
    }

    function gaTrack(data) {
        // ga tracking
        if (typeof dataLayer !== 'undefined' && typeof data !== 'undefined') {
            dataLayer.push(data);
        }
    }

    function hasLS() {
        var test = 'test';

        try {
            localStorage.setItem(test, test);
            localStorage.removeItem(test);
            return true;
        }
        catch (e) {
            return false;
        }
    }

    function setupApplePayApp() {
        setup();
        if (typeof book.app.merchantId === 'undefined') {
            return;
        }
        var hasActiveCard = typeof pc.device.applePaySetup !== 'undefined' && pc.device.applePaySetup !== null && pc.device.applePaySetup === true ? true : false;

        function applePayClick() {
            var paymentRequest = getApplePaymentRequest();

            evm.payment.handleRequest(book.app.apiVersion, paymentRequest);
        }

        setupApplePayElements(hasActiveCard, applePayClick);

        window.webediaApplePayComplete = function (e) {
            return new Promise(function (resolve, reject) {
                WMPED3619();

                if (typeof e === 'undefined' || e === null || typeof e.payment === 'undefined' || e.payment === null) {
                    WMPED3619('iOS webediaApplePayComplete no data');
                    reject('no data');
                    return;
                }

                if (typeof e.payment.shippingContact === 'undefined' || e.payment.shippingContact === null) {
                    WMPED3619('iOS webediaApplePayComplete no shippingContact');
                    reject('no shippingContact');
                    return;
                }

                if (typeof e.payment.shippingContact.emailAddress === 'undefined' || e.payment.shippingContact.emailAddress === null || e.payment.shippingContact.emailAddress.trim() === '') {
                    WMPED3619('iOS webediaApplePayComplete no emailAddress');
                    reject('no emailAddress');
                    return;
                }

                if (typeof e.payment.shippingContact.givenName === 'undefined' || e.payment.shippingContact.givenName === null || e.payment.shippingContact.givenName.trim() === '') {
                    WMPED3619('iOS webediaApplePayComplete no givenName');
                    reject('no givenName');
                    return;
                }

                if (typeof e.payment.shippingContact.familyName === 'undefined' || e.payment.shippingContact.familyName === null || e.payment.shippingContact.familyName.trim() === '') {
                    WMPED3619('iOS webediaApplePayComplete no familyName');
                    reject('no familyName');
                    return;
                }

                if (typeof e.payment.token === 'undefined' || e.payment.token === null || typeof e.payment.token.paymentData === 'undefined' || e.payment.token.paymentData === null) {
                    WMPED3619('iOS webediaApplePayComplete no token');
                    reject('no token');
                    return;
                }

                if (typeof e.payment.shippingContact.phoneNumber === 'undefined' || e.payment.shippingContact.phoneNumber === null || e.payment.shippingContact.phoneNumber.trim() === '') {
                    WMPED3619('iOS webediaApplePayComplete no phoneNumber');
                    reject('no phoneNumber');
                    return;
                }

                var adyenDropInData = {
                    amount: {
                        currency: "GBP",
                        value: book.basket.total
                    },
                    reference: book.tickets.orderState.OrderId,
                    paymentMethod: {
                        type: "applepay",
                        applePayToken: atob(e.payment.token.paymentData)
                    }                                        
                }

                var initiatePaymentRequest = {
                    OrderId: book.tickets.orderState.OrderId,
                    CinemaId: book.cinemaid,
                    AdyenDropInData: adyenDropInData,
                    Email: e.payment.shippingContact.emailAddress,
                    FirstName: e.payment.shippingContact.givenName,
                    LastName: e.payment.shippingContact.familyName,
                    Phone: e.payment.shippingContact.phoneNumber
                };

                book.data.firstName = e.payment.shippingContact.givenName;
                book.data.lastName = e.payment.shippingContact.familyName;
                book.data.email = e.payment.shippingContact.emailAddress;
                book.data.phone = e.payment.shippingContact.phoneNumber;

                if (pc.partpayment) {
                    initiatePaymentRequest.GiftCard.CardNumber = $('[data-gc-input]').val().toString();
                    initiatePaymentRequest.GiftCard.Amount = pc.cardValue.toString();
                    initiatePaymentRequest.GiftCard.VoucherServiceCinemaId = $('[data-voucher-webservice-cinemaid]').attr('data-voucher-webservice-cinemaid').toString();
                }

                WMPED3619('InitiatePayment start');
                showLoad();

                $.ajax({
                    url: '/api/AdyenDropIn/InitiatePayment',
                    type: 'POST',
                    contentType: 'application/json',
                    dataType: 'json',
                    crossDomain: true,
                    data: JSON.stringify(initiatePaymentRequest)
                }).always(function (response) {
                    if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                        book.paymentType = "Apple Pay";
                        book.isApplePay = true;
                        paymentSuccess(response);
                        WMPED3619('iOS InitiatePayment success');
                        resolve('success');
                    }
                    else {
                        paymentError(response);
                        WMPED3619('iOS InitiatePayment fail');
                        reject(Error('payment error'));
                    }
                });
            });
        };
    }

    function setupApplePay() {
        setup();

        if (typeof book.app.merchantId === 'undefined') {
            return;
        }

        ApplePaySession.canMakePaymentsWithActiveCard(book.app.merchantId).then(function (hasActiveCard) {
            function applePayClick() {
                var paymentRequest = getApplePaymentRequest();
                var apSession = new ApplePaySession(book.app.apiVersion, paymentRequest);

                apSession.onvalidatemerchant = function (e) {
                    if (typeof e !== 'undefined' && e !== null && typeof e.validationURL !== 'undefined' && e.validationURL !== null) {
                        $.ajax({
                            url: '/api/applepay/ValidateAppleURL?URL=' + encodeURIComponent(e.validationURL),
                            method: 'GET'
                        }).always(function (response) {
                            var parsedResponse = JSON.parse(response);
                            apSession.completeMerchantValidation(parsedResponse.Result);
                        });
                    }
                };

                apSession.onpaymentauthorized = function (e) {
                    console.log('onpaymentauthorized handler enter');

                    WMPED3619();
                    if (
                        typeof e === 'undefined' ||
                        e === null ||
                        typeof e.payment === 'undefined' ||
                        e.payment === null ||
                        typeof e.payment.shippingContact === 'undefined' ||
                        e.payment.shippingContact === null ||
                        typeof e.payment.token === 'undefined' ||
                        e.payment.token === null ||
                        typeof e.payment.token.paymentData === 'undefined' ||
                        e.payment.token.paymentData === null
                    ) {
                        if (
                            typeof e === 'undefined' ||
                            e === null
                        ) {
                            WMPED3619('onpaymentauthorized fail no event');
                        }
                        else if (
                            typeof e.payment === 'undefined' ||
                            e.payment === null
                        ) {
                            WMPED3619('onpaymentauthorized fail no payment');
                        }
                        else if (
                            typeof e.payment.shippingContact === 'undefined' ||
                            e.payment.shippingContact === null
                        ) {
                            WMPED3619('onpaymentauthorized fail no shippingContact');
                        }
                        else if (
                            typeof e.payment.token === 'undefined' ||
                            e.payment.token === null
                        ) {
                            WMPED3619('onpaymentauthorized fail no token');
                        }
                        else if (
                            typeof e.payment.token.paymentData === 'undefined' ||
                            e.payment.token.paymentData === null
                        ) {
                            WMPED3619('onpaymentauthorized fail no paymentData');
                        }
                        else {
                            WMPED3619('onpaymentauthorized fail unknown');
                        }

                        apSession.completePayment({ status: 1 });
                        return false;
                    }

                    if (
                        typeof e.payment.shippingContact.emailAddress === 'undefined' ||
                        e.payment.shippingContact.emailAddress === null ||
                        e.payment.shippingContact.emailAddress.trim() === ''
                    ) {
                        WMPED3619('shippingContactInvalid emailAddress');
                        apSession.completePayment({
                            status: 1,
                            errors: [
                                new ApplePayError('shippingContactInvalid', 'emailAddress', 'Email address is required')
                            ]
                        });
                        return false;
                    }

                    if (
                        typeof e.payment.shippingContact.givenName === 'undefined' ||
                        e.payment.shippingContact.givenName === null ||
                        e.payment.shippingContact.givenName.trim() === '' ||
                        typeof e.payment.shippingContact.familyName === 'undefined' ||
                        e.payment.shippingContact.familyName === null ||
                        e.payment.shippingContact.familyName.trim() === ''
                    ) {
                        WMPED3619('shippingContactInvalid name');
                        apSession.completePayment({
                            status: 1,
                            errors: [
                                new ApplePayError('shippingContactInvalid', 'name', 'Name is required')
                            ]
                        });
                        return false;
                    }

                    if (
                        typeof e.payment.shippingContact.phoneNumber === 'undefined' ||
                        e.payment.shippingContact.phoneNumber === null ||
                        e.payment.shippingContact.phoneNumber.trim() === ''
                    ) {
                        WMPED3619('shippingContactInvalid phoneNumber');
                        apSession.completePayment({
                            status: 1,
                            errors: [
                                new ApplePayError('shippingContactInvalid', 'phoneNumber', 'Phone number is required')
                            ]
                        });
                        return false;
                    }

                    console.log(e);

                    var adyenDropInData = {
                        amount: {
                            currency: "GBP",
                            value: book.basket.total
                        },
                        reference: book.tickets.orderState.OrderId,
                        paymentMethod: {
                            type: "applepay",
                            applePayToken: JSON.stringify(e.payment.token.paymentData)
                        }                                               
                    }

                    var initiatePaymentRequest = {
                        OrderId: book.tickets.orderState.OrderId,
                        CinemaId: book.cinemaid,
                        AdyenDropInData: adyenDropInData,
                        Email: e.payment.shippingContact.emailAddress,
                        FirstName: e.payment.shippingContact.givenName,
                        LastName: e.payment.shippingContact.familyName,
                        Phone: e.payment.shippingContact.phoneNumber
                    };

                    book.data.firstName = e.payment.shippingContact.givenName;
                    book.data.lastName = e.payment.shippingContact.familyName;
                    book.data.email = e.payment.shippingContact.emailAddress;
                    book.data.phone = e.payment.shippingContact.phoneNumber;

                    if (pc.partpayment) {
                        initiatePaymentRequest.GiftCard.CardNumber = $('[data-gc-input]').val().toString();
                        initiatePaymentRequest.GiftCard.Amount = pc.cardValue.toString();
                        initiatePaymentRequest.GiftCard.VoucherServiceCinemaId = $('[data-voucher-webservice-cinemaid]').attr('data-voucher-webservice-cinemaid').toString();
                    }

                    WMPED3619('InitiatePayment start');
                    showLoad();

                    $.ajax({
                        url: '/api/AdyenDropIn/InitiatePayment',
                        type: 'POST',
                        contentType: 'application/json',
                        dataType: 'json',
                        crossDomain: true,
                        data: JSON.stringify(initiatePaymentRequest)
                    }).always(function (response) {
                        if (typeof response !== 'undefined' && response !== null && response.StatusCode === 200) {
                            apSession.completePayment({ status: 0 });
                            book.paymentType = "Apple Pay";
                            book.isApplePay = true;
                            paymentSuccess(response);
                            WMPED3619('Web InitiatePayment success');
                        }
                        else {
                            apSession.completePayment({ status: 1 });
                            paymentError(response);
                            WMPED3619('Web InitiatePayment fail');
                        }
                    });
                };

                apSession.begin();
            }

            setupApplePayElements(hasActiveCard, applePayClick);
        });
    }

    function setupApplePayElements(hasActiveCard, applePayClick) {
        function btnClick(evt) {
            evt.preventDefault();

            if (typeof applePayClick !== 'undefined' && applePayClick !== null) {
                applePayClick();
            }
        }

        if (typeof hasActiveCard !== 'undefined' && hasActiveCard !== null && hasActiveCard === true) {
            // show apple pay button
            $('[data-ap-btn="buy"]').on('click', btnClick).removeClass('dn');
            book.applePayType = 'buy';
        }
        else {
            // show setup apple pay button
            $('[data-ap-btn="setup"]').on('click', btnClick).removeClass('dn');
            book.applePayType = 'setup';
        }

        // hide other payment
        $('[data-ap-other]').hide();

        $('[data-ap-newsletter]').show();

        // show other payment button
        $('[data-ap-btn="other"]').on('click', function (evt) {
            evt.preventDefault();
            $(this).addClass('dn');
            $('[data-ap-other]').slideDown(400);
            $('[data-ap-newsletter]').hide();
        }).removeClass('dn');
    }

    function getApplePaymentRequest() {
        return {
            countryCode: 'GB',
            currencyCode: 'GBP',
            merchantCapabilities: [
                'supports3DS'
            ],
            supportedNetworks: pc.ap.methods,
            total: {
                'label': 'Everyman Cinemas',
                'type': 'final',
                'amount': (book.basket.total / 100).toFixed(2)
            },
            requiredShippingContactFields: [
                'name',
                'email',
                'phone'
            ]
        };
    }

    function setupAppleWallet(CinemaId, ExternalOrderId) {
        var $button = $('[data-book-apple-wallet]');
        var url;

        var isWalletDevice = false;

        if (
            typeof pc.device.iosApp !== 'undefined' &&
            pc.device.iosApp !== null &&
            pc.device.iosApp === true
        ) {
            isWalletDevice = true;
        }

        if (/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) {
            isWalletDevice = true;
        }

        if (
            isWalletDevice === false ||
            $button.length === 0 ||
            typeof CinemaId === 'undefined' ||
            CinemaId === null ||
            typeof ExternalOrderId === 'undefined' ||
            ExternalOrderId === null
        ) {
            return;
        }

        url = '/Booking/Pass/' + CinemaId + '/' + ExternalOrderId;

        $button.attr('href', url).removeClass('dn');
    }

    function init() {
        var $book = $('[data-book]');

        // check we are on booking page
        if ($book.length > 0) {

            var tempDevice = null;

            if (hasLS()) {
                tempDevice = sessionStorage.getItem('tempDevice');
                sessionStorage.removeItem('tempDevice');
            }

            if (
                tempDevice !== null &&
                typeof pc !== 'undefined' &&
                pc !== null &&
                typeof pc.ap !== 'undefined' &&
                typeof pc.device !== 'undefined' &&
                pc.device !== null &&
                typeof pc.device.iosApp !== 'undefined' &&
                pc.device.iosApp !== null &&
                pc.device.iosApp === true
            ) {
                pc.device = Object.assign({}, pc.device, JSON.parse(tempDevice));
            }

            if (
                typeof pc !== 'undefined' &&
                pc !== null &&
                typeof pc.ap !== 'undefined' &&
                typeof pc.device !== 'undefined' &&
                pc.device !== null &&
                typeof pc.device.iosApp !== 'undefined' &&
                pc.device.iosApp !== null &&
                pc.device.iosApp === true &&
                typeof pc.device.applePayAvailable !== 'undefined' &&
                pc.device.applePayAvailable !== null &&
                pc.device.applePayAvailable === true &&
                typeof evm !== 'undefined' &&
                evm !== null &&
                typeof evm.payment !== 'undefined' &&
                evm.payment !== null &&
                typeof evm.payment.handleRequest !== 'undefined' &&
                evm.payment.handleRequest !== null
            ) {
                setupApplePayApp();
            } else if (typeof pc.ap !== 'undefined' && window.ApplePaySession && ApplePaySession.canMakePayments() && ApplePaySession.supportsVersion(book.app.apiVersion)) {
	            setupApplePay();
            } else {
                setup();
            }
        }
    }

    init();

    $('[data-link-overlay] a').on('click', function (e) {
        e.preventDefault();
        var link = $(this).attr('href');

        var winW = window.innerWidth;
        var winH = window.innerHeight;
        var dialogOverlay = document.getElementById('dialog-confirm-overlay');
        var dialogBox = document.getElementById('dialog-confirm-box');
        document.getElementById('close_popup1').innerHTML = "Continue";
        dialogOverlay.style.display = "block";
        dialogOverlay.style.height = winH + "px";
        //dialogBox.style.left = ((winW / 2) - (550 / 2)) + "px";
        //dialogBox.style.top = "50%";
        dialogBox.style.display = "block";

        document.getElementById('dialog-confirm-box-body').innerHTML = '<p>You are leaving the booking process to visit our membership page, you may have to restart your booking.</p>';

        $('[data-confirm-cancel]' || dialogOverlay).off('click').on('click', function (e) {
            e.preventDefault();
            document.getElementById('dialog-confirm-box').style.display = "none";
            document.getElementById('dialog-confirm-overlay').style.display = "none";
            document.getElementById('close_popup1').innerHTML = "OK";
        });

        $('[data-confirm-ok]').off('click').on('click', function (e) {
            e.preventDefault();
            // Open link
            window.open(link);
            document.getElementById('dialog-confirm-box').style.display = "none";
            document.getElementById('dialog-confirm-overlay').style.display = "none";
            document.getElementById('close_popup1').innerHTML = "OK";
        });
    });

    function log(msg, obj) {
        if (
            typeof msg === 'undefined' ||
            msg === null ||
            typeof obj === 'undefined' ||
            obj === null
        ) {
            return;
        }

        $.ajax({
            url: pc.api.booking + 'api/ClientLogging/',
            contentType: 'application/json',
            type: 'POST',
            data: JSON.stringify({
                'errorMessage': msg,
                'errorObj': obj
            })
        });
    }

    var WMPED3619_state = {
        session: undefined,
        startTime: 0
    };

    function WMPED3619(msg) {
        if (typeof performance === 'undefined' || performance === null) {
            return;
        }

        if (typeof WMPED3619_state.session === 'undefined') {
            setTimeout(function () {
                WMPED3619('onpaymentauthorized timeout');
            }, 30000);

            WMPED3619_state.startTime = performance.now();

            WMPED3619_state.session = [
                'WMPED3619',
                Math.floor(Math.random() * (999 - 100 + 1) + 100),
                WMPED3619_state.startTime
            ].join('__');
        }

        if (typeof msg !== 'undefined' && msg !== null) {
            log(
                'BuildLog: WMPED-3619 Apple Pay Issue: ',
                {
                    session: WMPED3619_state.session,
                    startTime: WMPED3619_state.startTime,
                    message: msg,
                    messageTime: performance.now()
                }
            );
        }
    }
})(jQuery);;
function validateWithSofaRule(bookingSeatData) {

    function validate() {

        for (var seatKey in bookingSeatData.pAllocated) {
            if (!Object.prototype.hasOwnProperty.call(bookingSeatData.pAllocated, seatKey)) {
                continue;
            }

            // Get the selected seat object from the allocated seat data.
            var seatObject = bookingSeatData.pAllSeats[seatKey];

            if (typeof seatObject === "undefined" || seatObject === null) {
                continue;
            }

            if (!isSofaSeat(seatObject)) {
                continue;
            }

            // loop seat group
            for (var groupKey in seatObject.SeatsInGroup) {
                if (!Object.prototype.hasOwnProperty.call(seatObject.SeatsInGroup, groupKey))
                    continue;

                var groupSeat = seatObject.SeatsInGroup[groupKey];

                // seat exists
                if (typeof groupSeat === "undefined" || groupSeat === null) {
                    continue;
                }

                // get seat ID
                var newSeatId =
                    `${seatObject.AreaCategoryCode}|${groupSeat.AreaNumber}|${groupSeat.RowIndex}|${groupSeat
                        .ColumnIndex}`;

                // get seat name
                var newSeatName = $(`[data-book-seats-seatid="${newSeatId}"]`).attr('data-book-seats-seatname');

                var newSeatObject = bookingSeatData.pAllocated[newSeatName];

                // Seat has been selected/allocated or is sold.
                if (typeof newSeatObject !== "undefined") {
                    continue;
                }

                // Seat has not been allocated.  Check if the seat can be allocated.
                if (seatCannotBeAllocated(bookingSeatData.pAllSeats[newSeatName])) {
                    continue;
                }

                // part of sofa not selected, therefore "sofagap" rule has failed.
                return false;
            }
        }

        return true;
    }

    function isSofaSeat(seat) {

        //The selected seat is not part ofa group, and therefore not part of a sofa.
        if (seat.SeatsInGroup === "undefined")
            return false;

        //The selected seat is part of a group, but not a sofa.
        //Likely part of a wheelchair/companion group.
        if (!isSofaStyledSeat(seat))
            return false;

        return true;
    }

    function isSofaStyledSeat(seat) {

        //0 - Normal (i.e. single seat, wheelchair space.)
        //1 - SofaLeft
        //2 - SofaMiddle
        //3 - SofaRight

        return seat.Style !== 0;
    }

    //Returns true if the seat exists but is not available or sold.
    //Broken seats for example cannot be allocated, and should be exempt from the sofa rule.
    function seatCannotBeAllocated(seat) {
        return (typeof seat !== "undefined" && seat !== null && seat.Status !== 0 && seat.Status !== 1);
    }

    return {
        isValid: validate()
    };
}

function validateWithMissingRule(bookingSeatData) {
    var unallocatedCount = 0;

    $.each(bookingSeatData.pAreas,
        function(areaIndex, areaValue) {

            // ensure the area is bookable.
            if (areaValue.SeatsToAllocate === 0) {
                return true;    //Return true is similar to a "continue" statement in a $.each loop.
            }

            // ensure all seats have been allocated.
            if (areaValue.SeatsNotAllocatedCount === 0) {
                return true;
            }

            unallocatedCount = areaValue.SeatsNotAllocatedCount;

            return false;   //Return false is similar to a "break" statement in a $.each loop.
        });

    return {
        isValid: unallocatedCount === 0,
        unallocatedCount: unallocatedCount
    };
};(function ($) {
    function truncate(parentEl,string, newLength, elyp) {
        if (string.length > newLength) {
            parentEl.addClass('truncated');
            return string.substring(0, newLength) + elyp;
        }
        else {
            return string;
        }
    };
	
   
    $(document).on('ready', function () {
        var HeroTextLength = 111;

        $(".heroItemInfoCopy div").each(function (index) {
            //alert();
            var teaserCopy = $(this).text();

            $(this).text(truncate($(this).parent(), teaserCopy, HeroTextLength, '...'));
        });

        //$(".cPromos-2 h3.promoItemHeader").each(function (index) {
        //    //alert();
        //    var teaserCopy = $(this).text();

        //    $(this).text(truncate($(this).parent(), teaserCopy, 40, '...'));


        //});

        $(".cPromos-2 .promoItemCopy p, .promoItemCopy").each(function (index) {
            //alert();
            var teaserCopy = $(this).text();

            $(this).text(truncate($(this).parent(), teaserCopy, 111, '...'));


        });

        if ($(window).outerWidth() > 768) {

            $(".promos-3 .promoItem:nth-child(2) .promoContent p,.promos-3 .promoItem:first-child .promoContent p").each(function (index) {
                //alert();
                var teaserCopy = $(this).text();

                $(this).text(truncate($(this).parent(), teaserCopy, 44, '...'));


            });

          //  $("li.filmItem .filmPageInfo .filmPageField").each(function (index) {
                //alert();
          //      var teaserCopy = $(this).text();

          //      $(this).text(truncate($(this).parent(), teaserCopy, 25, '...'));


          //  });


        }

        else {

            $('.promos-3 .promoItem .promoContent p').each(function (index) {
                //alert();
                var teaserCopy = $(this).text();

                $(this).text(truncate($(this).parent(), teaserCopy, 44, '...'));


            });

        }

        $('.promos-3 .promoItem:nth-child(4) .promoContent h3.promoItemHead,.promos-3 .promoItem:nth-child(3) .promoContent h3.promoItemHead').each(function (index) {
            //alert();
            var teaserCopy = $(this).text();

            $(this).text(truncate($(this).parent(), teaserCopy, 38, '...'));


        });

        
    });

    //$(document).on('ready', function () {
    //    $(".filmPageSynopsis p").each(function (index) {
    //        //alert();
    //        var teaserCopy = $(this).text();

    //        $(this).text(truncate($(this).parent(), teaserCopy, 230, '...'));


    //    });
    //});


})(jQuery);;/*! Gray v1.4.5 https://github.com/karlhorky/gray) | MIT */
/*! Modernizr 2.8.3 (Custom Build) | MIT & BSD */
;window.Modernizr=window.Modernizr||function(a,b,c){function d(a){n.cssText=a}function f(a,b){return typeof a===b}var o,x,z,i="2.8.3",j={},k=b.documentElement,l="modernizr",m=b.createElement(l),n=m.style,q=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),r={svg:"http://www.w3.org/2000/svg"},s={},v=[],w=v.slice,y={}.hasOwnProperty;z=f(y,"undefined")||f(y.call,"undefined")?function(a,b){return b in a&&f(a.constructor.prototype[b],"undefined")}:function(a,b){return y.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=w.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(w.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(w.call(arguments)))};return d}),s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==r.svg};for(var A in s)z(s,A)&&(x=A.toLowerCase(),j[x]=s[A](),v.push((j[x]?"":"no-")+x));return j.addTest=function(a,b){if("object"==typeof a)for(var d in a)z(a,d)&&j.addTest(d,a[d]);else{if(a=a.toLowerCase(),j[a]!==c)return j;b="function"==typeof b?b():b,"undefined"!=typeof enableClasses&&enableClasses&&(k.className+=" "+(b?"":"no-")+a),j[a]=b}return j},d(""),m=o=null,j._version=i,j._prefixes=q,j}(this,this.document),Modernizr.addTest("cssfilters",function(){var a=document.createElement("div");return a.style.cssText=Modernizr._prefixes.join("filter:blur(2px); "),!!a.style.length&&(void 0===document.documentMode||document.documentMode>9)}),Modernizr.addTest("svgfilters",function(){var a=!1;try{a=void 0!==typeof SVGFEColorMatrixElement&&2==SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE}catch(b){}return a}),function(a,b,c,d){function g(b,c){var d,g;c=c||{},d=c.classes||{},g=d.fade||f.classes.fade,c.fade=c.fade||b.className.indexOf(g)>-1,this.element=b,this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="gray",f={fade:!1,classes:{fade:"grayscale-fade"}};a.extend(g.prototype,{init:function(){var b;!Modernizr.cssfilters&&Modernizr.inlinesvg&&Modernizr.svgfilters&&(b=a(this.element),(this.cssFilterDeprecated(b)||this.settings.fade)&&this.switchImage(b))},cssFilterDeprecated:function(a){return"none"===a.css("filter")},elementType:function(a){return"IMG"===a.prop("tagName")?"Img":"Bg"},pxToNumber:function(a){return parseInt(a.replace("px",""))},getComputedStyle:function(a){var c={},d={};c=b.getComputedStyle(a,null);for(var e=0,f=c.length;f>e;e++){var g=c[e],h=c.getPropertyValue(g);d[g]=h}return d},extractUrl:function(a){var b;return startRegex=/^url\(["']?/,endRegex=/["']?\)$/,b=a.replace(startRegex,"").replace(endRegex,"")},positionToNegativeMargin:function(a){var b,c,d;return b=a.match(/^(-?\d+\S+)/)[0],c=a.match(/\s(-?\d+\S+)$/)[0],d="margin:"+c+" 0 0 "+b},getBgSize:function(b,c){var d,e,f,g,h,i,j;if(d=new Image,d.src=b,"auto"!==c&&"cover"!==c&&"contain"!==c&&"inherit"!==c){var k=a(this.element);e=d.width/d.height,g=parseInt((c.match(/^(\d+)px/)||[0,0])[1]),i=parseInt((c.match(/\s(\d+)px$/)||[0,0])[1]),f=k.height()*e,h=k.width()/e,g=g||f,i=i||h}return j=g||i?{width:g,height:i}:{width:d.width,height:d.height}},getImgParams:function(a){var b={};b.styles=this.getComputedStyle(a[0]);var c={top:this.pxToNumber(b.styles["padding-top"]),right:this.pxToNumber(b.styles["padding-right"]),bottom:this.pxToNumber(b.styles["padding-bottom"]),left:this.pxToNumber(b.styles["padding-left"])},d={top:this.pxToNumber(b.styles["border-top-width"]),right:this.pxToNumber(b.styles["border-right-width"]),bottom:this.pxToNumber(b.styles["border-bottom-width"]),left:this.pxToNumber(b.styles["border-left-width"])};return b.image={width:this.pxToNumber(b.styles.width),height:this.pxToNumber(b.styles.height)},b.svg={url:a[0].src,padding:c,borderWidth:d,width:b.image.width+c.left+c.right+d.left+d.right,height:b.image.height+c.top+c.bottom+d.top+d.bottom,offset:""},b},getBgParams:function(b){var d,c={};return d=this.extractUrl(b.css("background-image")),bgSize=this.getBgSize(d,b.css("background-size")),offset=this.positionToNegativeMargin(b.css("background-position")),c.styles=this.getComputedStyle(b[0]),c.svg=a.extend({url:d},bgSize,{offset:offset}),c.image={width:c.svg.width,height:c.svg.height},c},setStyles:function(a,b,c,d){return b.display="inline-block",b.overflow=b["overflow-x"]=b["overflow-y"]="hidden",b["background-image"]='url("'+c.url+'")',b["background-size"]=d.width+"px "+d.height+"px","Img"===a&&(b["background-repeat"]="no-repeat",b["background-position"]=c.padding.left+"px "+c.padding.top+"px",b.width=c.width,b.height=c.height),delete b.filter,b},addSVGFilterOnce:function(){$body=a("body"),$body.data("plugin_"+e+"_has_filter")||$body.data("plugin_"+e+"_has_filter","true").append('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="0" height="0" style="position:absolute"><defs><filter id="gray"><feColorMatrix type="saturate" values="0"/></filter></defs></svg>')},switchImage:function(b){var c,d,e,f;c=this.elementType(b),d=this["get"+c+"Params"](b),e=this.settings.fade?this.settings.classes.fade:"",f=a('<div class="grayscale grayscale-replaced '+e+'"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '+d.svg.width+" "+d.svg.height+'" width="'+d.svg.width+'" height="'+d.svg.height+'" style="'+d.svg.offset+'"><image filter="url(&quot;#gray&quot;)" x="0" y="0" width="'+d.image.width+'" height="'+d.image.height+'" preserveAspectRatio="none" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+d.svg.url+'" /></svg></div>'),d.styles=this.setStyles(c,d.styles,d.svg,d.image),f.css(d.styles),this.addSVGFilterOnce(),b.replaceWith(f)}}),a.fn[e]=function(b){return this.each(function(){a.data(this,"plugin_"+e)||a.data(this,"plugin_"+e,new g(this,b))}),this},a(b).on("load",function(){a(".grayscale:not(.grayscale-replaced)")[e]()})}(jQuery,window,document);
;var pc = pc || {};

(function ($) {

    $(".contactCopy p").each(function () {
        if (!$(this).text().trim().length) {
            $(this).addClass("noSpace");
        }
    });

    if ($(window).width() < 450) {
        var url = window.location.href;
        if (url.search("#scroll") >= 0) {
            $('html, body').animate({
                scrollTop: $('.showingAt').offset().top - 200
            }, 2000);
        }
    }

    $('.venueInternalLinks .venuePanelHeading').each(function () {
        var $this = $(this);
        $this.html($this.html().replace(/(\S+)\s*$/, '<span><br>$1</span>'));
    });

    if ($('[data-loyalty-newmember]').length === 0) {
        // if logged out show the login link
        if (!pc.Authentication.HasLogin || $('[data-loyalty-signout]').length > 0) {
            $('[data-modal-member-loggedout-name]').show();
        }
            // else show the Hi username stuff
        else {
            $('[data-modal-member-loggedin-name] a.login-btn span:last').text(pc.Authentication.FirstName);
            $('[data-modal-member-loggedin-name]').show();
        }
    }
       
   $(document).ready(function () {

       pc.heroSlider = $('.flexslider').flexslider({
           animation: "slide",
           slideshow: true,
           slideshowSpeed: 8500,
           pauseOnHover: true,
           touch: true,
           video: true,
           before: function () {
             
             //selectWithClass.select2("close");
           },
           start: function () {
               $('.flexslider').each(function () {
                   var sliderHeight = 0;
                   $(this).find('.slides > li .heroItemInfo').each(function () {
                       slideHeight = $(this).outerHeight();
                       if (sliderHeight < slideHeight) {
                           sliderHeight = slideHeight;
                       }
                   });
                   $(this).find('ul.slides li .heroItemInfo').css({ 'height': sliderHeight });
               });
           }

       });

   });
    
    var $instaPanels = $('[data-instaPanels] > div');
    var $instaPanelsShow = $('[data-loadMore-instaPanels]');
    var $instaPanelsHide = $('[data-loadLess-instaPanels]');

    $instaPanelsShow.on('click', function (e) {
        e.preventDefault();
        $instaPanels.addClass('active');
        $(this).hide();
        $instaPanelsHide.show();
    });

    $instaPanelsHide.on('click', function (e) {
        e.preventDefault();
        $instaPanels.removeClass('active');
        $(this).hide();
        $instaPanelsShow.show();
    });

    var $promos = $('[data-promo]');
    var $promosShow = $('[data-loadmore-promos]');
    var $promosHide = $('[data-loadLess-promos]');
    

    $promosShow.on('click', function (e) {
        e.preventDefault();
        $promos.addClass('active');
        $(this).hide();
        $promosHide.show();
    });

    $promosHide.on('click', function (e) {
        e.preventDefault();
        $promos.removeClass('active');
        $(this).hide();
        $promosShow.show();
    });

    var $footerLists = $('[data-footer-list]');
    var $footerShow = $('[data-loadMore-footer]');
    var $footerHide = $('[data-loadLess-footer]');

    $footerShow.on('click', function (e) {
        e.preventDefault();
        $footerLists.addClass('active');
        $(this).hide();
        $footerHide.show();
    });

    $footerHide.on('click', function (e) {
        e.preventDefault();
        $footerLists.removeClass('active');
        $(this).hide();
        $footerShow.show();
    });

    var $moreVenueInfo = $('[data-venuinfo]');
    var $moreVenueInfoShow = $('[data-loadmore-venuinfo]');
    var $moreVenueInfoHide = $('[data-loadless-venuinfo]');

    $moreVenueInfoShow.on('click', function (e) {
        e.preventDefault();
        $moreVenueInfo.addClass('active');
        $(this).hide();
        $moreVenueInfoHide.show();
    });

    $moreVenueInfoHide.on('click', function (e) {
        e.preventDefault();
        $moreVenueInfo.removeClass('active');
        $(this).hide();
        $moreVenueInfoShow.show();
    });

    // var $moreFilmInfo = $('[data-moreFilm]');
    var $moreFilmInfoShow = $('[data-loadmore-film]');
    var $moreFilmInfoHide = $('[data-loadless-film]');

    $moreFilmInfoShow.on('click', function (e) {
        e.preventDefault();
        $(this).parent().parent().next('[data-moreFilm]').addClass('active');
        $(this).hide();
        $(this).next('[data-loadless-film]').css('display','inline');
    });

    $moreFilmInfoHide.on('click', function (e) {
        e.preventDefault();
        $(this).parent().parent().next('[data-moreFilm]').removeClass('active');
        $(this).hide();
        $(this).prev('[data-loadmore-film]').show();
    });
    
    jQuery.fn.reverse = [].reverse;

    function SortByName(a, b) {
        return $(a).data('cinema-name').toUpperCase().localeCompare($(b).data('cinema-name').toUpperCase());
    }
    
    var $cinemaList = $('[data-cinema-name]').reverse(),
        $cinemaListHolder = $('[data-cinema-list]'),
        $sortAlphaBtn = $('[data-venue-sort-alpha]');
        
        $cinemaList.sort(SortByName);
        
        $sortAlphaBtn.on('click', function () {
            $cinemaListHolder.empty();
            $.each($cinemaList, function (idx, itm) {
                $cinemaListHolder.append(itm);
            });
            $('[data-page-header]').hide();
            $('[data-page-header-nearest]').hide();
            $('[data-page-header-sort-alpha]').show();
            $sortAlphaBtn.hide();
            $('[data-finder-geo]').show();
        });

    //
    // Build the footer newsletter cinemas list.
    //
    if ($('[data-footSubscribe]').length > 0) {

        var getCinemaList =  $.ajax({
            type: "GET",
            headers: {
                'ApplicationOrigin': pc.api.applicationOrigin
            },
            contentType: 'application/json',
            dataType: 'json',
            url: pc.api.members + 'api/Data/GetCinemas/?circuitId=' + pc.api.circuit,
            crossDomain: true
        }).done(function (data) {
            if (data) {
                var listItems = [],
                $list = $('[data-footSubscribe]');
                //listItems.push('<option value="' + "" + '">' + "Choose your Venue" + '</option>');

                if (typeof pc.excludeCinemas !== 'undefined') {
                    for (var c = data.length - 1; c >= 0; c--) {
                        if (typeof pc.excludeCinemas[data[c].Id] !== 'undefined') {
                            data.splice(c, 1);
                        }
                    }
                }

                for (var i = 0, len = data.length; i < len; i += 1) {
                    listItems.push('<option value="' + data[i].Id + '">' + data[i].CinemaName + '</option>');
                }

                $list.append(listItems.join(''));

            }
        });
    }

    // equal heights of promo items
    $(window).load(function () {

        var eventHeaders = $('#eventsList.cPromos-2 li.promoItem .promoItemHeader,#eventsGroupList.cPromos-2 li.promoItem .promoItemHeader');

        for (var i = 0; i < eventHeaders.length; i += 3) {
            var everyThree = eventHeaders.slice(i, i + 3);
            var eventHeight = 0;

            everyThree.each(function (i) {
                //var $thisHeight = $(this).height();
                if ($(this).height() > eventHeight) {
                    eventHeight = $(this).height();
                }
            });

            everyThree.each(function (i) {
                $(this).height(eventHeight);
            });
        }
    });

    var $cinemaEventFilter = $('[data-event]');

    $cinemaEventFilter.on('change', function () {

        var thisType = $(this).data('event');

        var selected = $(this).find("option:selected");
        var cinema = selected.val() || '';

        if (cinema !== "") {

            if (thisType === 'group') {

                var cinemaArray = cinema.split('/');

                if (cinemaArray.length === 3) {
                    cinemaArray.splice(1, 1);
                    cinema = cinemaArray.join('/');
                    window.location.href = '/' + cinema;
                }

                else {
                    window.location.href = '/' + cinema;
                }

            }

            else {
                window.location.href = '/' + cinema;
            }

            //  window.location.href =  '/' + cinema;
        }

    });

    $('.subscribe textarea[maxlength]').each(function (index) {
        var $textarea = $(this),
            maxLength = $textarea.attr('maxlength');

        function updateCount() {
            $('[data-gc-con-maxlength="' + index + '"]').html(maxLength - $textarea.val().length + ' characters');
        }

        $textarea.on('keyup', updateCount);

        $textarea.on('paste', null, function () {
            setTimeout(function () {
                updateCount();
            }, 20);
        });

        $textarea.before('<span class="formLabelNote gcMaxLen" data-gc-con-maxlength="' + index + '">' + maxLength + '</span>').trigger('keyup');
    });

    $('.cCinemasItem').hover(function () {
        $(this).find('.grayscale').toggleClass('grayscale-off');
    });

})(jQuery);


(function ($) {

    $('iframe[src*="youtube.com"]').wrap('<div class="videoWrap" />');

})(jQuery);

(function ($) {
    $(window).load(function () {
        var $placements = $('[data-headerbanners]');
        var delay = 5000;

        if ($placements.length === 0) {
            return;
        }

        $placements.each(function () {
            var $placement = $(this);
            var isMobilePlacement = $placement.hasClass('headerBanners-mobile');
            var $banners = $placement.find('[data-headerbanners-item]');
            var curBanner = 0;
            var bannersLen = $banners.length;
            var bannerTimeout;
            var curTop = 0;

            if (bannersLen < 2) {
                return;
            }

            function changeBanner() {

                if ($placement.is(':visible') === false) {
                    bannerTimeout = setTimeout(changeBanner, delay);
                    return;
                }

                var curBanner = $placement.data('headerbanners');

                $banners.eq($placement.data('headerbanners')).fadeOut(300, function () {

                    curBanner++;

                    if (curBanner === bannersLen) {
                        curBanner = 0;
                    }

                    $placement.data('headerbanners', curBanner);

                    $banners.eq(curBanner).fadeIn(300, function () {
                        bannerTimeout = setTimeout(changeBanner, delay);
                    });
                });
            }

            function setup() {
                if (($placement.is(':visible') && $placement.hasClass('notactive') === false) || $placement.is(':visible') === false) {
                    return;
                }

                var maxHeight = 0;

                $banners.each(function () {
                    if (this.offsetHeight > maxHeight) {
                        maxHeight = this.offsetHeight;
                    }
                });

                $placement.css({
                    'padding-top': isMobilePlacement ? ((maxHeight / document.documentElement.clientWidth) * 100) + '%' : maxHeight
                });

                $placement.removeClass('notactive');

                $placement.data('headerbanners', 0);

                $placement.hover(
                    function () {
                        clearTimeout(bannerTimeout);
                    },
                    function () {
                        bannerTimeout = setTimeout(changeBanner, delay);
                    }
                ); 

                bannerTimeout = setTimeout(changeBanner, delay);
            }

            $(window).on('resize', function () {
                setup();
            });   

            setup();
        });
    });
})(jQuery);

(function ($) {
    var $bgImage = $('[data-parallax-backupbg]');

    if ($bgImage.length === 0 || document.documentElement.clientWidth < 768) {
        return;
    }

    bgImage = $bgImage.attr('data-parallax-backupbg');
    var tempImg = new Image();

    tempImg.onload = function () {
        var imgHeight = this.height;

        $bgImage.css({
            'background-image': 'url(' + bgImage + ')'
        });

        $(window).on('scroll.parallaxbg', function () {
            var scrollTop = $(window).scrollTop();
            var maxScroll = imgHeight - document.documentElement.clientHeight;
            var scrollRatio = maxScroll / (document.documentElement.scrollHeight - document.documentElement.clientHeight);
            
            var newScroll = scrollTop * scrollRatio;

            if (newScroll > maxScroll) {
                newScroll = maxScroll;
            }

            $bgImage.css({
                'background-position': '50% ' + (-newScroll) + 'px'
            });
        }).trigger('scroll.parallaxbg');
    };

    tempImg.src = bgImage;
})(jQuery);;(function () {
    var cookieNote = document.querySelector('[data-cookie-note]');
    var cookieNoteClose = document.querySelector('[data-cookie-close]');

    if (cookieNote === null || cookieNoteClose === null) {
        return;
    }

    if (typeof docCookies !== 'undefined') {
        var testcookie = JSON.parse(docCookies.getItem('everyman_cookie_accept'));
        if (testcookie === null) {
            cookieNote.style.display = 'block';
        }
    }
    
    cookieNoteClose.addEventListener('click', function (e) {
        e.preventDefault();
        if (typeof docCookies !== 'undefined') {
            docCookies.setItem('everyman_cookie_accept', 'true', Infinity, '/');
        }

        cookieNote.style.display = 'none';
    });
})();;(function ($) {
    var $musicHub = $('[data-musichub]');

    if ($musicHub.length === 0 || typeof Promise === "undefined" || Promise.toString().indexOf("[native code]") === -1 || typeof pc === 'undefined' || pc === null || typeof pc.amh === 'undefined' || pc.amh === null) {
        return;
    }

    var mk = undefined;

    var token = pc.amh.t;

    var albumItems = pc.amh.a;

    var curatorId = pc.amh.c;

    var playerHeight = 470;
    var artworkSize = 210;

    var templates = {
        listItem: '',
        player: ''
    };
        
    var waitForFinalEvent = (function () {
        var timers = {};
        return function (callback, ms, uniqueId) {
            if (!uniqueId) {
                uniqueId = "uniqueId";
            }
            if (timers[uniqueId]) {
                clearTimeout (timers[uniqueId]);
            }
            timers[uniqueId] = setTimeout(callback, ms);
        };
    })();

    var qs = (function (qsRaw) {
        if (qsRaw === '') {
            // exit as no qs
            return {};
        }

        var qsItems = {},
            qsArray = [],
            el = document.createElement('div');

        el.innerHTML = qsRaw;

        qsRaw = el.childNodes.length === 0 ? "" : el.childNodes[0].nodeValue;

        qsArray = qsRaw.split('&');

        // loop qs items
        for (var i = 0, len = qsArray.length; i < len; i++) {
            // split parameter from value
            var qsItem = qsArray[i].split('=', 2);

            if (qsItem.length === 1) {
                // no value
                qsItems[qsItem[0].toLowerCase()] = '';
            }
            else {
                // value
                qsItems[qsItem[0].toLowerCase()] = decodeURIComponent(qsItem[1].replace(/\+/g, ' '));
            }
        }

        return qsItems;
    })(window.location.search.substring(1));

    function updateItemHeights($contain) {

        var $items;

        if (typeof $contain !== 'undefined' && $contain !== null && $contain.length > 0) {
            $items = $contain.find('[data-musichub-list-item]');
        }
        else {
            $items = $('[data-musichub-list-item]');
        }


        if (typeof $items === 'undefined' || $items.length === 0) {
            return;
        }

        $('[data-musichub-list-item]').each(function () {
            var $item = $(this);
            $item.data('height', $item.height());
        });
    }

    function showPlayer($item, callback) {
        if (typeof $item === 'undefined' || $item === null || $item.length === 0) {
            return;
        }

        var playerUrl = $item.find('[data-musichub-list-item-link]').attr('href') || '';

        if (playerUrl === '') {
            return;
        }
                        
        $item.one('transitionend', function () {
            if (typeof callback !== 'undefined' && callback !== null) {
                callback($item);
            }
        }).addClass('isActive').css('min-height', $item.data('height') + playerHeight);           
            
        $item.find('[data-musichub-list-item-player]').append(Mustache.render(templates.player, { url: playerUrl }));          
    }

    function hidePlayer($item, callback) {            
        $item.one('transitionend', function () {
            $item.css('min-height', '').find('[data-musichub-list-item-player-iframe]').remove();
                
            if (typeof callback !== 'undefined' && callback !== null) {
                callback();
            }
        }).removeClass('isActive').css('min-height', $item.data('height'));            
    }

    function updateData(data, type) {                    
        return {
            id: data.id,
            albumName: data.attributes.name,
            artistName: data.attributes.artistName,
            artworkURL: data.attributes.artwork.url.replace('{w}', artworkSize).replace('{h}', artworkSize),
            previewURL: 'https://embed.music.apple.com/gb/' + (data.id.indexOf('pl.') === 0 ? 'playlist' : 'album') + '/' + data.id + '?app=music&at=1000lLbc&ct=' + (type === 'playlists' ? '760215_Everyman_Web_MkitP_LINK' : '760215_Everyman_Web_MkitS_LINK')
        };
    }

    function outputItem(type, data) {
        if (typeof type === 'undefined' || type === null || typeof data === 'undefined' || data === null || data.length === 0) {
            return;
        }

        var items = data.map(function (itemData) {
            return updateData(itemData, type);
        });

        var $contain = $('[data-musichub-list="' + type + '"]');

        $contain.html(Mustache.render(templates.listItem, items)).parent().removeClass('dn');

        updateItemHeights($contain);

        if (typeof qs !== 'undefined' && qs !== null && typeof qs.item !== 'undefined') {
            for (var i = 0; i < items.length; i++) {
                if (items[i].id === qs.item) {
                    
                    showPlayer($('[data-musichub-list-item="' + items[i].id + '"]'), function ($el) {
                        $('html, body').animate({
                            scrollTop: $el.offset().top - 70
                        }, 500);
                    });
                    break;
                }
            }
        }
    }

    function loadPlaylists() {
        if (typeof mk !== 'undefined' && typeof curatorId !== 'undefined' && curatorId !== null && curatorId !== '') {
            mk.api.curator(curatorId).then(function (curatorData) {
                if (typeof curatorData === 'undefined' || curatorData === null || typeof curatorData.relationships === 'undefined' || curatorData.relationships === null || typeof curatorData.relationships.playlists === 'undefined' || curatorData.relationships.playlists === null || typeof curatorData.relationships.playlists.data === 'undefined' || curatorData.relationships.playlists.data === null || curatorData.relationships.playlists.data.length === 0) {
                    return;
                }

                mk.api.playlists(
                    curatorData.relationships.playlists.data.map(
                        function (playlist) {
                            return playlist.id;
                        }
                    )
                ).then(function (playListsData) {
                    outputItem('playlists', playListsData);
                });
            });
        }      
    }

    function loadAlbums() {
        if (typeof albumItems !== 'undefined' && albumItems !== null && albumItems.length > 0) {

            var albums = [];
            var playlists = [];
            var combined = [];

            albumItems.forEach(function (item) {
                if (typeof item !== 'undefined' && item !== null && typeof item.MusicLink !== 'undefined' && item.MusicLink !== null && item.MusicLink !== '') {
                    if (item.MusicLink.indexOf('pl.') === 0) {
                        playlists.push(item.MusicLink);
                    }
                    else {
                        albums.push(item.MusicLink);
                    }
                }
            });
            
            if (typeof mk !== 'undefined') {
                var getAlbums;
                var getPlaylists;
                
                if (albums.length > 0) {
                    getAlbums = mk.api.albums(albums);
                }

                if (playlists.length > 0) {
                    getPlaylists = mk.api.playlists(playlists);
                }

                Promise.all([getAlbums, getPlaylists]).then(function (allItems) {
                    if (typeof allItems === 'undefined' || allItems === null || allItems.length === 0) {
                        return;
                    }

                    allItems.forEach(function (itemGroup) {
                        if (typeof itemGroup !== 'undefined' && itemGroup !== null && itemGroup.length > 0) {
                            itemGroup.forEach(function (item) {                                
                                combined.push(item);
                            });
                        }
                    });

                    combined.sort(function (a, b) {
                        if (a.attributes.name > b.attributes.name) {
                            return 1;
                        }
                        if (a.attributes.name < b.attributes.name) {
                            return -1;
                        }
                        return 0;
                    });
               
                    outputItem('albums', combined);
                });
            }
        }   
    }
    
    $(window).on('resize', function () {
        waitForFinalEvent(function(){
            updateItemHeights();
        }, 200, "itemHeight");
    });

    $('[data-musichub]').on('click', '[data-musichub-list-item-link]', function (e) {
        e.preventDefault();

        var $item = $(this).closest('[data-musichub-list-item]');

        if ($item.hasClass('isActive')) {
            hidePlayer($item);                
        }
        else if ($('[data-musichub-list-item].isActive').length === 1) {
            hidePlayer($('[data-musichub-list-item].isActive'), showPlayer($item));
        }
        else {
            showPlayer($item);
        }
    });     
    
    document.addEventListener('musickitloaded', function () {

        MusicKit.configure({
            developerToken: token,
            declarativeMarkup: false,
            storefrontId: 'gb',
            app: {
                name: 'Everyman Music',
                build: '1.0'
            }
        });
        
        mk = MusicKit.getInstance();
               
        $.when(           
            $.get('/template?name=MusicHubListItem&extensionToFind=mustache&extensionToReturn=txt'),
            $.get('/template?name=MusicHubPlayer&extensionToFind=mustache&extensionToReturn=txt')
        ).then(function (listItemTemplate, playerTemplate) {

            if (typeof listItemTemplate === 'undefined' || listItemTemplate === null || typeof playerTemplate === 'undefined' || playerTemplate === null) {
                return;
            }
                                    
            templates.listItem = listItemTemplate[0];
            templates.player = playerTemplate[0];

            loadPlaylists();
            loadAlbums();
        });
    });

    $('body').append('<script src="https://js-cdn.music.apple.com/musickit/v1/musickit.js"></script>');
    
})(jQuery);

(function ($) {
    var $filmInfoMusic = $('[data-filminfo-music]');

    if ($filmInfoMusic.length === 0 || typeof Promise === "undefined" || Promise.toString().indexOf("[native code]") === -1 || typeof pc === 'undefined' || pc === null || typeof pc.am === 'undefined' || pc.am === null) {
        return;
    }
    
    $('[data-filminfo-music-link-hub]').attr('href', '/applemusic?item=' + pc.am.id);
    $('[data-filminfo-music-link-other]').attr('href', 'https://geo.itunes.apple.com/gb/' + (pc.am.id.indexOf('pl.') === 0 ? 'playlist' : 'album') + '/' + pc.am.id + '?mt=1&app=music&at=1000lLbc&ct=760215_Everyman_Web_MkitS_LINK&itscg=30200&itsct=am_everyman');
    $('[data-filminfo-music-text]').text(pc.am.text);

    $filmInfoMusic.removeClass('dn').parent().addClass('filmPageMusic');

})(jQuery);;