PageSourceSearch

http://bpsemi.com/cn/res/scripts/jqueryui/jquery-ui.js

js bpsemi.com collected 2026-10-07 22:32:07 UTC 529,159 bytes, 19,062 lines download raw bytes

vendor: 2,676 bytes, lines 1-69
1/*! jQuery UI - v1.13.2 - 2022-12-10
2* http://jqueryui.com
3* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-patch.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/draggable.js, widgets/droppable.js, widgets/resizable.js, widgets/selectable.js, widgets/sortable.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/selectmenu.js, widgets/slider.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js
4* Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6( function( factory ) {
7	"use strict";
8	
9	if ( typeof define === "function" && define.amd ) {
10
11		// AMD. Register as an anonymous module.
12		define( [ "jquery" ], factory );
13	} else {
14
15		// Browser globals
16		factory( jQuery );
17	}
18} )( function( $ ) {
19"use strict";
20
21$.ui = $.ui || {};
22
23var version = $.ui.version = "1.13.2";
24
25
26/*!
27 * jQuery UI Widget 1.13.2
28 * http://jqueryui.com
29 *
30 * Copyright jQuery Foundation and other contributors
31 * Released under the MIT license.
32 * http://jquery.org/license
33 */
34
35//>>label: Widget
36//>>group: Core
37//>>description: Provides a factory for creating stateful widgets with a common API.
38//>>docs: http://api.jqueryui.com/jQuery.widget/
39//>>demos: http://jqueryui.com/widget/
40
41
42var widgetUuid = 0;
43var widgetHasOwnProperty = Array.prototype.hasOwnProperty;
44var widgetSlice = Array.prototype.slice;
45
46$.cleanData = ( function( orig ) {
47	return function( elems ) {
48		var events, elem, i;
49		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
50
51			// Only trigger remove when necessary to save time
52			events = $._data( elem, "events" );
53			if ( events && events.remove ) {
54				$( elem ).triggerHandler( "remove" );
55			}
56		}
57		orig( elems );
58	};
59} )( $.cleanData );
60
61$.widget = function( name, base, prototype ) {
62	var existingConstructor, constructor, basePrototype;
63
64	// ProxiedPrototype allows the provided prototype to remain unmodified
65	// so that it can be used as a mixin for multiple widgets (#8876)
66	var proxiedPrototype = {};
67
68	var namespace = name.split( "." )[ 0 ];
69	name = name.split( "." )[ 1 ];
vendor: 18,823 bytes, lines 69-769
69
70	var fullName = namespace + "-" + name;
71
72	if ( !prototype ) {
73		prototype = base;
74		base = $.Widget;
75	}
76
77	if ( Array.isArray( prototype ) ) {
78		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
79	}
80
81	// Create selector for plugin
82	$.expr.pseudos[ fullName.toLowerCase() ] = function( elem ) {
83		return !!$.data( elem, fullName );
84	};
85
86	$[ namespace ] = $[ namespace ] || {};
87	existingConstructor = $[ namespace ][ name ];
88	constructor = $[ namespace ][ name ] = function( options, element ) {
89
90		// Allow instantiation without "new" keyword
91		if ( !this || !this._createWidget ) {
92			return new constructor( options, element );
93		}
94
95		// Allow instantiation without initializing for simple inheritance
96		// must use "new" keyword (the code above always passes args)
97		if ( arguments.length ) {
98			this._createWidget( options, element );
99		}
100	};
101
102	// Extend with the existing constructor to carry over any static properties
103	$.extend( constructor, existingConstructor, {
104		version: prototype.version,
105
106		// Copy the object used to create the prototype in case we need to
107		// redefine the widget later
108		_proto: $.extend( {}, prototype ),
109
110		// Track widgets that inherit from this widget in case this widget is
111		// redefined after a widget inherits from it
112		_childConstructors: []
113	} );
114
115	basePrototype = new base();
116
117	// We need to make the options hash a property directly on the new instance
118	// otherwise we'll modify the options hash on the prototype that we're
119	// inheriting from
120	basePrototype.options = $.widget.extend( {}, basePrototype.options );
121	$.each( prototype, function( prop, value ) {
122		if ( typeof value !== "function" ) {
123			proxiedPrototype[ prop ] = value;
124			return;
125		}
126		proxiedPrototype[ prop ] = ( function() {
127			function _super() {
128				return base.prototype[ prop ].apply( this, arguments );
129			}
130
131			function _superApply( args ) {
132				return base.prototype[ prop ].apply( this, args );
133			}
134
135			return function() {
136				var __super = this._super;
137				var __superApply = this._superApply;
138				var returnValue;
139
140				this._super = _super;
141				this._superApply = _superApply;
142
143				returnValue = value.apply( this, arguments );
144
145				this._super = __super;
146				this._superApply = __superApply;
147
148				return returnValue;
149			};
150		} )();
151	} );
152	constructor.prototype = $.widget.extend( basePrototype, {
153
154		// TODO: remove support for widgetEventPrefix
155		// always use the name + a colon as the prefix, e.g., draggable:start
156		// don't prefix for widgets that aren't DOM-based
157		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
158	}, proxiedPrototype, {
159		constructor: constructor,
160		namespace: namespace,
161		widgetName: name,
162		widgetFullName: fullName
163	} );
164
165	// If this widget is being redefined then we need to find all widgets that
166	// are inheriting from it and redefine all of them so that they inherit from
167	// the new version of this widget. We're essentially trying to replace one
168	// level in the prototype chain.
169	if ( existingConstructor ) {
170		$.each( existingConstructor._childConstructors, function( i, child ) {
171			var childPrototype = child.prototype;
172
173			// Redefine the child widget using the same prototype that was
174			// originally used, but inherit from the new version of the base
175			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
176				child._proto );
177		} );
178
179		// Remove the list of existing child constructors from the old constructor
180		// so the old child constructors can be garbage collected
181		delete existingConstructor._childConstructors;
182	} else {
183		base._childConstructors.push( constructor );
184	}
185
186	$.widget.bridge( name, constructor );
187
188	return constructor;
189};
190
191$.widget.extend = function( target ) {
192	var input = widgetSlice.call( arguments, 1 );
193	var inputIndex = 0;
194	var inputLength = input.length;
195	var key;
196	var value;
197
198	for ( ; inputIndex < inputLength; inputIndex++ ) {
199		for ( key in input[ inputIndex ] ) {
200			value = input[ inputIndex ][ key ];
201			if ( widgetHasOwnProperty.call( input[ inputIndex ], key ) && value !== undefined ) {
202
203				// Clone objects
204				if ( $.isPlainObject( value ) ) {
205					target[ key ] = $.isPlainObject( target[ key ] ) ?
206						$.widget.extend( {}, target[ key ], value ) :
207
208						// Don't extend strings, arrays, etc. with objects
209						$.widget.extend( {}, value );
210
211				// Copy everything else by reference
212				} else {
213					target[ key ] = value;
214				}
215			}
216		}
217	}
218	return target;
219};
220
221$.widget.bridge = function( name, object ) {
222	var fullName = object.prototype.widgetFullName || name;
223	$.fn[ name ] = function( options ) {
224		var isMethodCall = typeof options === "string";
225		var args = widgetSlice.call( arguments, 1 );
226		var returnValue = this;
227
228		if ( isMethodCall ) {
229
230			// If this is an empty collection, we need to have the instance method
231			// return undefined instead of the jQuery instance
232			if ( !this.length && options === "instance" ) {
233				returnValue = undefined;
234			} else {
235				this.each( function() {
236					var methodValue;
237					var instance = $.data( this, fullName );
238
239					if ( options === "instance" ) {
240						returnValue = instance;
241						return false;
242					}
243
244					if ( !instance ) {
245						return $.error( "cannot call methods on " + name +
246							" prior to initialization; " +
247							"attempted to call method '" + options + "'" );
248					}
249
250					if ( typeof instance[ options ] !== "function" ||
251						options.charAt( 0 ) === "_" ) {
252						return $.error( "no such method '" + options + "' for " + name +
253							" widget instance" );
254					}
255
256					methodValue = instance[ options ].apply( instance, args );
257
258					if ( methodValue !== instance && methodValue !== undefined ) {
259						returnValue = methodValue && methodValue.jquery ?
260							returnValue.pushStack( methodValue.get() ) :
261							methodValue;
262						return false;
263					}
264				} );
265			}
266		} else {
267
268			// Allow multiple hashes to be passed on init
269			if ( args.length ) {
270				options = $.widget.extend.apply( null, [ options ].concat( args ) );
271			}
272
273			this.each( function() {
274				var instance = $.data( this, fullName );
275				if ( instance ) {
276					instance.option( options || {} );
277					if ( instance._init ) {
278						instance._init();
279					}
280				} else {
281					$.data( this, fullName, new object( options, this ) );
282				}
283			} );
284		}
285
286		return returnValue;
287	};
288};
289
290$.Widget = function( /* options, element */ ) {};
291$.Widget._childConstructors = [];
292
293$.Widget.prototype = {
294	widgetName: "widget",
295	widgetEventPrefix: "",
296	defaultElement: "<div>",
297
298	options: {
299		classes: {},
300		disabled: false,
301
302		// Callbacks
303		create: null
304	},
305
306	_createWidget: function( options, element ) {
307		element = $( element || this.defaultElement || this )[ 0 ];
308		this.element = $( element );
309		this.uuid = widgetUuid++;
310		this.eventNamespace = "." + this.widgetName + this.uuid;
311
312		this.bindings = $();
313		this.hoverable = $();
314		this.focusable = $();
315		this.classesElementLookup = {};
316
317		if ( element !== this ) {
318			$.data( element, this.widgetFullName, this );
319			this._on( true, this.element, {
320				remove: function( event ) {
321					if ( event.target === element ) {
322						this.destroy();
323					}
324				}
325			} );
326			this.document = $( element.style ?
327
328				// Element within the document
329				element.ownerDocument :
330
331				// Element is window or document
332				element.document || element );
333			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
334		}
335
336		this.options = $.widget.extend( {},
337			this.options,
338			this._getCreateOptions(),
339			options );
340
341		this._create();
342
343		if ( this.options.disabled ) {
344			this._setOptionDisabled( this.options.disabled );
345		}
346
347		this._trigger( "create", null, this._getCreateEventData() );
348		this._init();
349	},
350
351	_getCreateOptions: function() {
352		return {};
353	},
354
355	_getCreateEventData: $.noop,
356
357	_create: $.noop,
358
359	_init: $.noop,
360
361	destroy: function() {
362		var that = this;
363
364		this._destroy();
365		$.each( this.classesElementLookup, function( key, value ) {
366			that._removeClass( value, key );
367		} );
368
369		// We can probably remove the unbind calls in 2.0
370		// all event bindings should go through this._on()
371		this.element
372			.off( this.eventNamespace )
373			.removeData( this.widgetFullName );
374		this.widget()
375			.off( this.eventNamespace )
376			.removeAttr( "aria-disabled" );
377
378		// Clean up events and states
379		this.bindings.off( this.eventNamespace );
380	},
381
382	_destroy: $.noop,
383
384	widget: function() {
385		return this.element;
386	},
387
388	option: function( key, value ) {
389		var options = key;
390		var parts;
391		var curOption;
392		var i;
393
394		if ( arguments.length === 0 ) {
395
396			// Don't return a reference to the internal hash
397			return $.widget.extend( {}, this.options );
398		}
399
400		if ( typeof key === "string" ) {
401
402			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
403			options = {};
404			parts = key.split( "." );
405			key = parts.shift();
406			if ( parts.length ) {
407				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
408				for ( i = 0; i < parts.length - 1; i++ ) {
409					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
410					curOption = curOption[ parts[ i ] ];
411				}
412				key = parts.pop();
413				if ( arguments.length === 1 ) {
414					return curOption[ key ] === undefined ? null : curOption[ key ];
415				}
416				curOption[ key ] = value;
417			} else {
418				if ( arguments.length === 1 ) {
419					return this.options[ key ] === undefined ? null : this.options[ key ];
420				}
421				options[ key ] = value;
422			}
423		}
424
425		this._setOptions( options );
426
427		return this;
428	},
429
430	_setOptions: function( options ) {
431		var key;
432
433		for ( key in options ) {
434			this._setOption( key, options[ key ] );
435		}
436
437		return this;
438	},
439
440	_setOption: function( key, value ) {
441		if ( key === "classes" ) {
442			this._setOptionClasses( value );
443		}
444
445		this.options[ key ] = value;
446
447		if ( key === "disabled" ) {
448			this._setOptionDisabled( value );
449		}
450
451		return this;
452	},
453
454	_setOptionClasses: function( value ) {
455		var classKey, elements, currentElements;
456
457		for ( classKey in value ) {
458			currentElements = this.classesElementLookup[ classKey ];
459			if ( value[ classKey ] === this.options.classes[ classKey ] ||
460					!currentElements ||
461					!currentElements.length ) {
462				continue;
463			}
464
465			// We are doing this to create a new jQuery object because the _removeClass() call
466			// on the next line is going to destroy the reference to the current elements being
467			// tracked. We need to save a copy of this collection so that we can add the new classes
468			// below.
469			elements = $( currentElements.get() );
470			this._removeClass( currentElements, classKey );
471
472			// We don't use _addClass() here, because that uses this.options.classes
473			// for generating the string of classes. We want to use the value passed in from
474			// _setOption(), this is the new value of the classes option which was passed to
475			// _setOption(). We pass this value directly to _classes().
476			elements.addClass( this._classes( {
477				element: elements,
478				keys: classKey,
479				classes: value,
480				add: true
481			} ) );
482		}
483	},
484
485	_setOptionDisabled: function( value ) {
486		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
487
488		// If the widget is becoming disabled, then nothing is interactive
489		if ( value ) {
490			this._removeClass( this.hoverable, null, "ui-state-hover" );
491			this._removeClass( this.focusable, null, "ui-state-focus" );
492		}
493	},
494
495	enable: function() {
496		return this._setOptions( { disabled: false } );
497	},
498
499	disable: function() {
500		return this._setOptions( { disabled: true } );
501	},
502
503	_classes: function( options ) {
504		var full = [];
505		var that = this;
506
507		options = $.extend( {
508			element: this.element,
509			classes: this.options.classes || {}
510		}, options );
511
512		function bindRemoveEvent() {
513			var nodesToBind = [];
514
515			options.element.each( function( _, element ) {
516				var isTracked = $.map( that.classesElementLookup, function( elements ) {
517					return elements;
518				} )
519					.some( function( elements ) {
520						return elements.is( element );
521					} );
522
523				if ( !isTracked ) {
524					nodesToBind.push( element );
525				}
526			} );
527
528			that._on( $( nodesToBind ), {
529				remove: "_untrackClassesElement"
530			} );
531		}
532
533		function processClassString( classes, checkOption ) {
534			var current, i;
535			for ( i = 0; i < classes.length; i++ ) {
536				current = that.classesElementLookup[ classes[ i ] ] || $();
537				if ( options.add ) {
538					bindRemoveEvent();
539					current = $( $.uniqueSort( current.get().concat( options.element.get() ) ) );
540				} else {
541					current = $( current.not( options.element ).get() );
542				}
543				that.classesElementLookup[ classes[ i ] ] = current;
544				full.push( classes[ i ] );
545				if ( checkOption && options.classes[ classes[ i ] ] ) {
546					full.push( options.classes[ classes[ i ] ] );
547				}
548			}
549		}
550
551		if ( options.keys ) {
552			processClassString( options.keys.match( /\S+/g ) || [], true );
553		}
554		if ( options.extra ) {
555			processClassString( options.extra.match( /\S+/g ) || [] );
556		}
557
558		return full.join( " " );
559	},
560
561	_untrackClassesElement: function( event ) {
562		var that = this;
563		$.each( that.classesElementLookup, function( key, value ) {
564			if ( $.inArray( event.target, value ) !== -1 ) {
565				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
566			}
567		} );
568
569		this._off( $( event.target ) );
570	},
571
572	_removeClass: function( element, keys, extra ) {
573		return this._toggleClass( element, keys, extra, false );
574	},
575
576	_addClass: function( element, keys, extra ) {
577		return this._toggleClass( element, keys, extra, true );
578	},
579
580	_toggleClass: function( element, keys, extra, add ) {
581		add = ( typeof add === "boolean" ) ? add : extra;
582		var shift = ( typeof element === "string" || element === null ),
583			options = {
584				extra: shift ? keys : extra,
585				keys: shift ? element : keys,
586				element: shift ? this.element : element,
587				add: add
588			};
589		options.element.toggleClass( this._classes( options ), add );
590		return this;
591	},
592
593	_on: function( suppressDisabledCheck, element, handlers ) {
594		var delegateElement;
595		var instance = this;
596
597		// No suppressDisabledCheck flag, shuffle arguments
598		if ( typeof suppressDisabledCheck !== "boolean" ) {
599			handlers = element;
600			element = suppressDisabledCheck;
601			suppressDisabledCheck = false;
602		}
603
604		// No element argument, shuffle and use this.element
605		if ( !handlers ) {
606			handlers = element;
607			element = this.element;
608			delegateElement = this.widget();
609		} else {
610			element = delegateElement = $( element );
611			this.bindings = this.bindings.add( element );
612		}
613
614		$.each( handlers, function( event, handler ) {
615			function handlerProxy() {
616
617				// Allow widgets to customize the disabled handling
618				// - disabled as an array instead of boolean
619				// - disabled class as method for disabling individual parts
620				if ( !suppressDisabledCheck &&
621						( instance.options.disabled === true ||
622						$( this ).hasClass( "ui-state-disabled" ) ) ) {
623					return;
624				}
625				return ( typeof handler === "string" ? instance[ handler ] : handler )
626					.apply( instance, arguments );
627			}
628
629			// Copy the guid so direct unbinding works
630			if ( typeof handler !== "string" ) {
631				handlerProxy.guid = handler.guid =
632					handler.guid || handlerProxy.guid || $.guid++;
633			}
634
635			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
636			var eventName = match[ 1 ] + instance.eventNamespace;
637			var selector = match[ 2 ];
638
639			if ( selector ) {
640				delegateElement.on( eventName, selector, handlerProxy );
641			} else {
642				element.on( eventName, handlerProxy );
643			}
644		} );
645	},
646
647	_off: function( element, eventName ) {
648		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
649			this.eventNamespace;
650		element.off( eventName );
651
652		// Clear the stack to avoid memory leaks (#10056)
653		this.bindings = $( this.bindings.not( element ).get() );
654		this.focusable = $( this.focusable.not( element ).get() );
655		this.hoverable = $( this.hoverable.not( element ).get() );
656	},
657
658	_delay: function( handler, delay ) {
659		function handlerProxy() {
660			return ( typeof handler === "string" ? instance[ handler ] : handler )
661				.apply( instance, arguments );
662		}
663		var instance = this;
664		return setTimeout( handlerProxy, delay || 0 );
665	},
666
667	_hoverable: function( element ) {
668		this.hoverable = this.hoverable.add( element );
669		this._on( element, {
670			mouseenter: function( event ) {
671				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
672			},
673			mouseleave: function( event ) {
674				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
675			}
676		} );
677	},
678
679	_focusable: function( element ) {
680		this.focusable = this.focusable.add( element );
681		this._on( element, {
682			focusin: function( event ) {
683				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
684			},
685			focusout: function( event ) {
686				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
687			}
688		} );
689	},
690
691	_trigger: function( type, event, data ) {
692		var prop, orig;
693		var callback = this.options[ type ];
694
695		data = data || {};
696		event = $.Event( event );
697		event.type = ( type === this.widgetEventPrefix ?
698			type :
699			this.widgetEventPrefix + type ).toLowerCase();
700
701		// The original event may come from any element
702		// so we need to reset the target on the new event
703		event.target = this.element[ 0 ];
704
705		// Copy original event properties over to the new event
706		orig = event.originalEvent;
707		if ( orig ) {
708			for ( prop in orig ) {
709				if ( !( prop in event ) ) {
710					event[ prop ] = orig[ prop ];
711				}
712			}
713		}
714
715		this.element.trigger( event, data );
716		return !( typeof callback === "function" &&
717			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
718			event.isDefaultPrevented() );
719	}
720};
721
722$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
723	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
724		if ( typeof options === "string" ) {
725			options = { effect: options };
726		}
727
728		var hasOptions;
729		var effectName = !options ?
730			method :
731			options === true || typeof options === "number" ?
732				defaultEffect :
733				options.effect || defaultEffect;
734
735		options = options || {};
736		if ( typeof options === "number" ) {
737			options = { duration: options };
738		} else if ( options === true ) {
739			options = {};
740		}
741
742		hasOptions = !$.isEmptyObject( options );
743		options.complete = callback;
744
745		if ( options.delay ) {
746			element.delay( options.delay );
747		}
748
749		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
750			element[ method ]( options );
751		} else if ( effectName !== method && element[ effectName ] ) {
752			element[ effectName ]( options.duration, options.easing, callback );
753		} else {
754			element.queue( function( next ) {
755				$( this )[ method ]();
756				if ( callback ) {
757					callback.call( element[ 0 ] );
758				}
759				next();
760			} );
761		}
762	};
763} );
764
765var widget = $.widget;
766
767
768/*!
769 * jQuery UI Position 1.1
vendor: 3,858 bytes, lines 769-912
7693.2
770 * http://jqueryui.com
771 *
772 * Copyright jQuery Foundation and other contributors
773 * Released under the MIT license.
774 * http://jquery.org/license
775 *
776 * http://api.jqueryui.com/position/
777 */
778
779//>>label: Position
780//>>group: Core
781//>>description: Positions elements relative to other elements.
782//>>docs: http://api.jqueryui.com/position/
783//>>demos: http://jqueryui.com/position/
784
785
786( function() {
787var cachedScrollbarWidth,
788	max = Math.max,
789	abs = Math.abs,
790	rhorizontal = /left|center|right/,
791	rvertical = /top|center|bottom/,
792	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
793	rposition = /^\w+/,
794	rpercent = /%$/,
795	_position = $.fn.position;
796
797function getOffsets( offsets, width, height ) {
798	return [
799		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
800		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
801	];
802}
803
804function parseCss( element, property ) {
805	return parseInt( $.css( element, property ), 10 ) || 0;
806}
807
808function isWindow( obj ) {
809	return obj != null && obj === obj.window;
810}
811
812function getDimensions( elem ) {
813	var raw = elem[ 0 ];
814	if ( raw.nodeType === 9 ) {
815		return {
816			width: elem.width(),
817			height: elem.height(),
818			offset: { top: 0, left: 0 }
819		};
820	}
821	if ( isWindow( raw ) ) {
822		return {
823			width: elem.width(),
824			height: elem.height(),
825			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
826		};
827	}
828	if ( raw.preventDefault ) {
829		return {
830			width: 0,
831			height: 0,
832			offset: { top: raw.pageY, left: raw.pageX }
833		};
834	}
835	return {
836		width: elem.outerWidth(),
837		height: elem.outerHeight(),
838		offset: elem.offset()
839	};
840}
841
842$.position = {
843	scrollbarWidth: function() {
844		if ( cachedScrollbarWidth !== undefined ) {
845			return cachedScrollbarWidth;
846		}
847		var w1, w2,
848			div = $( "<div style=" +
849				"'display:block;position:absolute;width:200px;height:200px;overflow:hidden;'>" +
850				"<div style='height:300px;width:auto;'></div></div>" ),
851			innerDiv = div.children()[ 0 ];
852
853		$( "body" ).append( div );
854		w1 = innerDiv.offsetWidth;
855		div.css( "overflow", "scroll" );
856
857		w2 = innerDiv.offsetWidth;
858
859		if ( w1 === w2 ) {
860			w2 = div[ 0 ].clientWidth;
861		}
862
863		div.remove();
864
865		return ( cachedScrollbarWidth = w1 - w2 );
866	},
867	getScrollInfo: function( within ) {
868		var overflowX = within.isWindow || within.isDocument ? "" :
869				within.element.css( "overflow-x" ),
870			overflowY = within.isWindow || within.isDocument ? "" :
871				within.element.css( "overflow-y" ),
872			hasOverflowX = overflowX === "scroll" ||
873				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
874			hasOverflowY = overflowY === "scroll" ||
875				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
876		return {
877			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
878			height: hasOverflowX ? $.position.scrollbarWidth() : 0
879		};
880	},
881	getWithinInfo: function( element ) {
882		var withinElement = $( element || window ),
883			isElemWindow = isWindow( withinElement[ 0 ] ),
884			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
885			hasOffset = !isElemWindow && !isDocument;
886		return {
887			element: withinElement,
888			isWindow: isElemWindow,
889			isDocument: isDocument,
890			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
891			scrollLeft: withinElement.scrollLeft(),
892			scrollTop: withinElement.scrollTop(),
893			width: withinElement.outerWidth(),
894			height: withinElement.outerHeight()
895		};
896	}
897};
898
899$.fn.position = function( options ) {
900	if ( !options || !options.of ) {
901		return _position.apply( this, arguments );
902	}
903
904	// Make a copy, we don't want to modify arguments
905	options = $.extend( {}, options );
906
907	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
908
909		// Make sure string options are treated as CSS selectors
910		target = typeof options.of === "string" ?
911			$( document ).find( options.of ) :
912			$( options.of ),
vendor: 10,992 bytes, lines 913-1266
913
914		within = $.position.getWithinInfo( options.within ),
915		scrollInfo = $.position.getScrollInfo( within ),
916		collision = ( options.collision || "flip" ).split( " " ),
917		offsets = {};
918
919	dimensions = getDimensions( target );
920	if ( target[ 0 ].preventDefault ) {
921
922		// Force left top to allow flipping
923		options.at = "left top";
924	}
925	targetWidth = dimensions.width;
926	targetHeight = dimensions.height;
927	targetOffset = dimensions.offset;
928
929	// Clone to reuse original targetOffset later
930	basePosition = $.extend( {}, targetOffset );
931
932	// Force my and at to have valid horizontal and vertical positions
933	// if a value is missing or invalid, it will be converted to center
934	$.each( [ "my", "at" ], function() {
935		var pos = ( options[ this ] || "" ).split( " " ),
936			horizontalOffset,
937			verticalOffset;
938
939		if ( pos.length === 1 ) {
940			pos = rhorizontal.test( pos[ 0 ] ) ?
941				pos.concat( [ "center" ] ) :
942				rvertical.test( pos[ 0 ] ) ?
943					[ "center" ].concat( pos ) :
944					[ "center", "center" ];
945		}
946		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
947		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
948
949		// Calculate offsets
950		horizontalOffset = roffset.exec( pos[ 0 ] );
951		verticalOffset = roffset.exec( pos[ 1 ] );
952		offsets[ this ] = [
953			horizontalOffset ? horizontalOffset[ 0 ] : 0,
954			verticalOffset ? verticalOffset[ 0 ] : 0
955		];
956
957		// Reduce to just the positions without the offsets
958		options[ this ] = [
959			rposition.exec( pos[ 0 ] )[ 0 ],
960			rposition.exec( pos[ 1 ] )[ 0 ]
961		];
962	} );
963
964	// Normalize collision option
965	if ( collision.length === 1 ) {
966		collision[ 1 ] = collision[ 0 ];
967	}
968
969	if ( options.at[ 0 ] === "right" ) {
970		basePosition.left += targetWidth;
971	} else if ( options.at[ 0 ] === "center" ) {
972		basePosition.left += targetWidth / 2;
973	}
974
975	if ( options.at[ 1 ] === "bottom" ) {
976		basePosition.top += targetHeight;
977	} else if ( options.at[ 1 ] === "center" ) {
978		basePosition.top += targetHeight / 2;
979	}
980
981	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
982	basePosition.left += atOffset[ 0 ];
983	basePosition.top += atOffset[ 1 ];
984
985	return this.each( function() {
986		var collisionPosition, using,
987			elem = $( this ),
988			elemWidth = elem.outerWidth(),
989			elemHeight = elem.outerHeight(),
990			marginLeft = parseCss( this, "marginLeft" ),
991			marginTop = parseCss( this, "marginTop" ),
992			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
993				scrollInfo.width,
994			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
995				scrollInfo.height,
996			position = $.extend( {}, basePosition ),
997			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
998
999		if ( options.my[ 0 ] === "right" ) {
1000			position.left -= elemWidth;
1001		} else if ( options.my[ 0 ] === "center" ) {
1002			position.left -= elemWidth / 2;
1003		}
1004
1005		if ( options.my[ 1 ] === "bottom" ) {
1006			position.top -= elemHeight;
1007		} else if ( options.my[ 1 ] === "center" ) {
1008			position.top -= elemHeight / 2;
1009		}
1010
1011		position.left += myOffset[ 0 ];
1012		position.top += myOffset[ 1 ];
1013
1014		collisionPosition = {
1015			marginLeft: marginLeft,
1016			marginTop: marginTop
1017		};
1018
1019		$.each( [ "left", "top" ], function( i, dir ) {
1020			if ( $.ui.position[ collision[ i ] ] ) {
1021				$.ui.position[ collision[ i ] ][ dir ]( position, {
1022					targetWidth: targetWidth,
1023					targetHeight: targetHeight,
1024					elemWidth: elemWidth,
1025					elemHeight: elemHeight,
1026					collisionPosition: collisionPosition,
1027					collisionWidth: collisionWidth,
1028					collisionHeight: collisionHeight,
1029					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
1030					my: options.my,
1031					at: options.at,
1032					within: within,
1033					elem: elem
1034				} );
1035			}
1036		} );
1037
1038		if ( options.using ) {
1039
1040			// Adds feedback as second argument to using callback, if present
1041			using = function( props ) {
1042				var left = targetOffset.left - position.left,
1043					right = left + targetWidth - elemWidth,
1044					top = targetOffset.top - position.top,
1045					bottom = top + targetHeight - elemHeight,
1046					feedback = {
1047						target: {
1048							element: target,
1049							left: targetOffset.left,
1050							top: targetOffset.top,
1051							width: targetWidth,
1052							height: targetHeight
1053						},
1054						element: {
1055							element: elem,
1056							left: position.left,
1057							top: position.top,
1058							width: elemWidth,
1059							height: elemHeight
1060						},
1061						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1062						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1063					};
1064				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1065					feedback.horizontal = "center";
1066				}
1067				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1068					feedback.vertical = "middle";
1069				}
1070				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1071					feedback.important = "horizontal";
1072				} else {
1073					feedback.important = "vertical";
1074				}
1075				options.using.call( this, props, feedback );
1076			};
1077		}
1078
1079		elem.offset( $.extend( position, { using: using } ) );
1080	} );
1081};
1082
1083$.ui.position = {
1084	fit: {
1085		left: function( position, data ) {
1086			var within = data.within,
1087				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1088				outerWidth = within.width,
1089				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1090				overLeft = withinOffset - collisionPosLeft,
1091				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1092				newOverRight;
1093
1094			// Element is wider than within
1095			if ( data.collisionWidth > outerWidth ) {
1096
1097				// Element is initially over the left side of within
1098				if ( overLeft > 0 && overRight <= 0 ) {
1099					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
1100						withinOffset;
1101					position.left += overLeft - newOverRight;
1102
1103				// Element is initially over right side of within
1104				} else if ( overRight > 0 && overLeft <= 0 ) {
1105					position.left = withinOffset;
1106
1107				// Element is initially over both left and right sides of within
1108				} else {
1109					if ( overLeft > overRight ) {
1110						position.left = withinOffset + outerWidth - data.collisionWidth;
1111					} else {
1112						position.left = withinOffset;
1113					}
1114				}
1115
1116			// Too far left -> align with left edge
1117			} else if ( overLeft > 0 ) {
1118				position.left += overLeft;
1119
1120			// Too far right -> align with right edge
1121			} else if ( overRight > 0 ) {
1122				position.left -= overRight;
1123
1124			// Adjust based on position and margin
1125			} else {
1126				position.left = max( position.left - collisionPosLeft, position.left );
1127			}
1128		},
1129		top: function( position, data ) {
1130			var within = data.within,
1131				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1132				outerHeight = data.within.height,
1133				collisionPosTop = position.top - data.collisionPosition.marginTop,
1134				overTop = withinOffset - collisionPosTop,
1135				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1136				newOverBottom;
1137
1138			// Element is taller than within
1139			if ( data.collisionHeight > outerHeight ) {
1140
1141				// Element is initially over the top of within
1142				if ( overTop > 0 && overBottom <= 0 ) {
1143					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
1144						withinOffset;
1145					position.top += overTop - newOverBottom;
1146
1147				// Element is initially over bottom of within
1148				} else if ( overBottom > 0 && overTop <= 0 ) {
1149					position.top = withinOffset;
1150
1151				// Element is initially over both top and bottom of within
1152				} else {
1153					if ( overTop > overBottom ) {
1154						position.top = withinOffset + outerHeight - data.collisionHeight;
1155					} else {
1156						position.top = withinOffset;
1157					}
1158				}
1159
1160			// Too far up -> align with top
1161			} else if ( overTop > 0 ) {
1162				position.top += overTop;
1163
1164			// Too far down -> align with bottom edge
1165			} else if ( overBottom > 0 ) {
1166				position.top -= overBottom;
1167
1168			// Adjust based on position and margin
1169			} else {
1170				position.top = max( position.top - collisionPosTop, position.top );
1171			}
1172		}
1173	},
1174	flip: {
1175		left: function( position, data ) {
1176			var within = data.within,
1177				withinOffset = within.offset.left + within.scrollLeft,
1178				outerWidth = within.width,
1179				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1180				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1181				overLeft = collisionPosLeft - offsetLeft,
1182				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1183				myOffset = data.my[ 0 ] === "left" ?
1184					-data.elemWidth :
1185					data.my[ 0 ] === "right" ?
1186						data.elemWidth :
1187						0,
1188				atOffset = data.at[ 0 ] === "left" ?
1189					data.targetWidth :
1190					data.at[ 0 ] === "right" ?
1191						-data.targetWidth :
1192						0,
1193				offset = -2 * data.offset[ 0 ],
1194				newOverRight,
1195				newOverLeft;
1196
1197			if ( overLeft < 0 ) {
1198				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
1199					outerWidth - withinOffset;
1200				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1201					position.left += myOffset + atOffset + offset;
1202				}
1203			} else if ( overRight > 0 ) {
1204				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
1205					atOffset + offset - offsetLeft;
1206				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1207					position.left += myOffset + atOffset + offset;
1208				}
1209			}
1210		},
1211		top: function( position, data ) {
1212			var within = data.within,
1213				withinOffset = within.offset.top + within.scrollTop,
1214				outerHeight = within.height,
1215				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1216				collisionPosTop = position.top - data.collisionPosition.marginTop,
1217				overTop = collisionPosTop - offsetTop,
1218				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1219				top = data.my[ 1 ] === "top",
1220				myOffset = top ?
1221					-data.elemHeight :
1222					data.my[ 1 ] === "bottom" ?
1223						data.elemHeight :
1224						0,
1225				atOffset = data.at[ 1 ] === "top" ?
1226					data.targetHeight :
1227					data.at[ 1 ] === "bottom" ?
1228						-data.targetHeight :
1229						0,
1230				offset = -2 * data.offset[ 1 ],
1231				newOverTop,
1232				newOverBottom;
1233			if ( overTop < 0 ) {
1234				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
1235					outerHeight - withinOffset;
1236				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
1237					position.top += myOffset + atOffset + offset;
1238				}
1239			} else if ( overBottom > 0 ) {
1240				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
1241					offset - offsetTop;
1242				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
1243					position.top += myOffset + atOffset + offset;
1244				}
1245			}
1246		}
1247	},
1248	flipfit: {
1249		left: function() {
1250			$.ui.position.flip.left.apply( this, arguments );
1251			$.ui.position.fit.left.apply( this, arguments );
1252		},
1253		top: function() {
1254			$.ui.position.flip.top.apply( this, arguments );
1255			$.ui.position.fit.top.apply( this, arguments );
1256		}
1257	}
1258};
1259
1260} )();
1261
1262var position = $.ui.position;
1263
1264
1265/*!
1266 * jQuery UI :data 1.1
12663.2
1267 * http://jqueryui.com
1268 *
1269 * Copyright jQuery Foundation and other contributors
1270 * Released under the MIT license.
1271 * http://jquery.org/license
1272 */
1273
1274//>>label: :data Selector
vendor: 25,394 bytes, lines 1275-2277
1275//>>group: Core
1276//>>description: Selects elements which have data stored under the specified key.
1277//>>docs: http://api.jqueryui.com/data-selector/
1278
1279
1280var data = $.extend( $.expr.pseudos, {
1281	data: $.expr.createPseudo ?
1282		$.expr.createPseudo( function( dataName ) {
1283			return function( elem ) {
1284				return !!$.data( elem, dataName );
1285			};
1286		} ) :
1287
1288		// Support: jQuery <1.8
1289		function( elem, i, match ) {
1290			return !!$.data( elem, match[ 3 ] );
1291		}
1292} );
1293
1294/*!
1295 * jQuery UI Disable Selection 1.13.2
1296 * http://jqueryui.com
1297 *
1298 * Copyright jQuery Foundation and other contributors
1299 * Released under the MIT license.
1300 * http://jquery.org/license
1301 */
1302
1303//>>label: disableSelection
1304//>>group: Core
1305//>>description: Disable selection of text content within the set of matched elements.
1306//>>docs: http://api.jqueryui.com/disableSelection/
1307
1308// This file is deprecated
1309
1310var disableSelection = $.fn.extend( {
1311	disableSelection: ( function() {
1312		var eventType = "onselectstart" in document.createElement( "div" ) ?
1313			"selectstart" :
1314			"mousedown";
1315
1316		return function() {
1317			return this.on( eventType + ".ui-disableSelection", function( event ) {
1318				event.preventDefault();
1319			} );
1320		};
1321	} )(),
1322
1323	enableSelection: function() {
1324		return this.off( ".ui-disableSelection" );
1325	}
1326} );
1327
1328
1329/*!
1330 * jQuery UI Focusable 1.13.2
1331 * http://jqueryui.com
1332 *
1333 * Copyright jQuery Foundation and other contributors
1334 * Released under the MIT license.
1335 * http://jquery.org/license
1336 */
1337
1338//>>label: :focusable Selector
1339//>>group: Core
1340//>>description: Selects elements which can be focused.
1341//>>docs: http://api.jqueryui.com/focusable-selector/
1342
1343
1344// Selectors
1345$.ui.focusable = function( element, hasTabindex ) {
1346	var map, mapName, img, focusableIfVisible, fieldset,
1347		nodeName = element.nodeName.toLowerCase();
1348
1349	if ( "area" === nodeName ) {
1350		map = element.parentNode;
1351		mapName = map.name;
1352		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
1353			return false;
1354		}
1355		img = $( "img[usemap='#" + mapName + "']" );
1356		return img.length > 0 && img.is( ":visible" );
1357	}
1358
1359	if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
1360		focusableIfVisible = !element.disabled;
1361
1362		if ( focusableIfVisible ) {
1363
1364			// Form controls within a disabled fieldset are disabled.
1365			// However, controls within the fieldset's legend do not get disabled.
1366			// Since controls generally aren't placed inside legends, we skip
1367			// this portion of the check.
1368			fieldset = $( element ).closest( "fieldset" )[ 0 ];
1369			if ( fieldset ) {
1370				focusableIfVisible = !fieldset.disabled;
1371			}
1372		}
1373	} else if ( "a" === nodeName ) {
1374		focusableIfVisible = element.href || hasTabindex;
1375	} else {
1376		focusableIfVisible = hasTabindex;
1377	}
1378
1379	return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
1380};
1381
1382// Support: IE 8 only
1383// IE 8 doesn't resolve inherit to visible/hidden for computed values
1384function visible( element ) {
1385	var visibility = element.css( "visibility" );
1386	while ( visibility === "inherit" ) {
1387		element = element.parent();
1388		visibility = element.css( "visibility" );
1389	}
1390	return visibility === "visible";
1391}
1392
1393$.extend( $.expr.pseudos, {
1394	focusable: function( element ) {
1395		return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
1396	}
1397} );
1398
1399var focusable = $.ui.focusable;
1400
1401
1402
1403// Support: IE8 Only
1404// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
1405// with a string, so we need to find the proper form.
1406var form = $.fn._form = function() {
1407	return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
1408};
1409
1410
1411/*!
1412 * jQuery UI Form Reset Mixin 1.13.2
1413 * http://jqueryui.com
1414 *
1415 * Copyright jQuery Foundation and other contributors
1416 * Released under the MIT license.
1417 * http://jquery.org/license
1418 */
1419
1420//>>label: Form Reset Mixin
1421//>>group: Core
1422//>>description: Refresh input widgets when their form is reset
1423//>>docs: http://api.jqueryui.com/form-reset-mixin/
1424
1425
1426var formResetMixin = $.ui.formResetMixin = {
1427	_formResetHandler: function() {
1428		var form = $( this );
1429
1430		// Wait for the form reset to actually happen before refreshing
1431		setTimeout( function() {
1432			var instances = form.data( "ui-form-reset-instances" );
1433			$.each( instances, function() {
1434				this.refresh();
1435			} );
1436		} );
1437	},
1438
1439	_bindFormResetHandler: function() {
1440		this.form = this.element._form();
1441		if ( !this.form.length ) {
1442			return;
1443		}
1444
1445		var instances = this.form.data( "ui-form-reset-instances" ) || [];
1446		if ( !instances.length ) {
1447
1448			// We don't use _on() here because we use a single event handler per form
1449			this.form.on( "reset.ui-form-reset", this._formResetHandler );
1450		}
1451		instances.push( this );
1452		this.form.data( "ui-form-reset-instances", instances );
1453	},
1454
1455	_unbindFormResetHandler: function() {
1456		if ( !this.form.length ) {
1457			return;
1458		}
1459
1460		var instances = this.form.data( "ui-form-reset-instances" );
1461		instances.splice( $.inArray( this, instances ), 1 );
1462		if ( instances.length ) {
1463			this.form.data( "ui-form-reset-instances", instances );
1464		} else {
1465			this.form
1466				.removeData( "ui-form-reset-instances" )
1467				.off( "reset.ui-form-reset" );
1468		}
1469	}
1470};
1471
1472
1473/*!
1474 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2
1475 * http://jqueryui.com
1476 *
1477 * Copyright jQuery Foundation and other contributors
1478 * Released under the MIT license.
1479 * http://jquery.org/license
1480 *
1481 */
1482
1483//>>label: jQuery 1.8+ Support
1484//>>group: Core
1485//>>description: Support version 1.8.x and newer of jQuery core
1486
1487
1488// Support: jQuery 1.9.x or older
1489// $.expr[ ":" ] is deprecated.
1490if ( !$.expr.pseudos ) {
1491	$.expr.pseudos = $.expr[ ":" ];
1492}
1493
1494// Support: jQuery 1.11.x or older
1495// $.unique has been renamed to $.uniqueSort
1496if ( !$.uniqueSort ) {
1497	$.uniqueSort = $.unique;
1498}
1499
1500// Support: jQuery 2.2.x or older.
1501// This method has been defined in jQuery 3.0.0.
1502// Code from https://github.com/jquery/jquery/blob/e539bac79e666bba95bba86d690b4e609dca2286/src/selector/escapeSelector.js
1503if ( !$.escapeSelector ) {
1504
1505	// CSS string/identifier serialization
1506	// https://drafts.csswg.org/cssom/#common-serializing-idioms
1507	var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
1508
1509	var fcssescape = function( ch, asCodePoint ) {
1510		if ( asCodePoint ) {
1511
1512			// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
1513			if ( ch === "\0" ) {
1514				return "\uFFFD";
1515			}
1516
1517			// Control characters and (dependent upon position) numbers get escaped as code points
1518			return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
1519		}
1520
1521		// Other potentially-special ASCII characters get backslash-escaped
1522		return "\\" + ch;
1523	};
1524
1525	$.escapeSelector = function( sel ) {
1526		return ( sel + "" ).replace( rcssescape, fcssescape );
1527	};
1528}
1529
1530// Support: jQuery 3.4.x or older
1531// These methods have been defined in jQuery 3.5.0.
1532if ( !$.fn.even || !$.fn.odd ) {
1533	$.fn.extend( {
1534		even: function() {
1535			return this.filter( function( i ) {
1536				return i % 2 === 0;
1537			} );
1538		},
1539		odd: function() {
1540			return this.filter( function( i ) {
1541				return i % 2 === 1;
1542			} );
1543		}
1544	} );
1545}
1546
1547;
1548/*!
1549 * jQuery UI Keycode 1.13.2
1550 * http://jqueryui.com
1551 *
1552 * Copyright jQuery Foundation and other contributors
1553 * Released under the MIT license.
1554 * http://jquery.org/license
1555 */
1556
1557//>>label: Keycode
1558//>>group: Core
1559//>>description: Provide keycodes as keynames
1560//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
1561
1562
1563var keycode = $.ui.keyCode = {
1564	BACKSPACE: 8,
1565	COMMA: 188,
1566	DELETE: 46,
1567	DOWN: 40,
1568	END: 35,
1569	ENTER: 13,
1570	ESCAPE: 27,
1571	HOME: 36,
1572	LEFT: 37,
1573	PAGE_DOWN: 34,
1574	PAGE_UP: 33,
1575	PERIOD: 190,
1576	RIGHT: 39,
1577	SPACE: 32,
1578	TAB: 9,
1579	UP: 38
1580};
1581
1582
1583/*!
1584 * jQuery UI Labels 1.13.2
1585 * http://jqueryui.com
1586 *
1587 * Copyright jQuery Foundation and other contributors
1588 * Released under the MIT license.
1589 * http://jquery.org/license
1590 */
1591
1592//>>label: labels
1593//>>group: Core
1594//>>description: Find all the labels associated with a given input
1595//>>docs: http://api.jqueryui.com/labels/
1596
1597
1598var labels = $.fn.labels = function() {
1599	var ancestor, selector, id, labels, ancestors;
1600
1601	if ( !this.length ) {
1602		return this.pushStack( [] );
1603	}
1604
1605	// Check control.labels first
1606	if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
1607		return this.pushStack( this[ 0 ].labels );
1608	}
1609
1610	// Support: IE <= 11, FF <= 37, Android <= 2.3 only
1611	// Above browsers do not support control.labels. Everything below is to support them
1612	// as well as document fragments. control.labels does not work on document fragments
1613	labels = this.eq( 0 ).parents( "label" );
1614
1615	// Look for the label based on the id
1616	id = this.attr( "id" );
1617	if ( id ) {
1618
1619		// We don't search against the document in case the element
1620		// is disconnected from the DOM
1621		ancestor = this.eq( 0 ).parents().last();
1622
1623		// Get a full set of top level ancestors
1624		ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
1625
1626		// Create a selector for the label based on the id
1627		selector = "label[for='" + $.escapeSelector( id ) + "']";
1628
1629		labels = labels.add( ancestors.find( selector ).addBack( selector ) );
1630
1631	}
1632
1633	// Return whatever we have found for labels
1634	return this.pushStack( labels );
1635};
1636
1637
1638/*!
1639 * jQuery UI Scroll Parent 1.13.2
1640 * http://jqueryui.com
1641 *
1642 * Copyright jQuery Foundation and other contributors
1643 * Released under the MIT license.
1644 * http://jquery.org/license
1645 */
1646
1647//>>label: scrollParent
1648//>>group: Core
1649//>>description: Get the closest ancestor element that is scrollable.
1650//>>docs: http://api.jqueryui.com/scrollParent/
1651
1652
1653var scrollParent = $.fn.scrollParent = function( includeHidden ) {
1654	var position = this.css( "position" ),
1655		excludeStaticParent = position === "absolute",
1656		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
1657		scrollParent = this.parents().filter( function() {
1658			var parent = $( this );
1659			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
1660				return false;
1661			}
1662			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
1663				parent.css( "overflow-x" ) );
1664		} ).eq( 0 );
1665
1666	return position === "fixed" || !scrollParent.length ?
1667		$( this[ 0 ].ownerDocument || document ) :
1668		scrollParent;
1669};
1670
1671
1672/*!
1673 * jQuery UI Tabbable 1.13.2
1674 * http://jqueryui.com
1675 *
1676 * Copyright jQuery Foundation and other contributors
1677 * Released under the MIT license.
1678 * http://jquery.org/license
1679 */
1680
1681//>>label: :tabbable Selector
1682//>>group: Core
1683//>>description: Selects elements which can be tabbed to.
1684//>>docs: http://api.jqueryui.com/tabbable-selector/
1685
1686
1687var tabbable = $.extend( $.expr.pseudos, {
1688	tabbable: function( element ) {
1689		var tabIndex = $.attr( element, "tabindex" ),
1690			hasTabindex = tabIndex != null;
1691		return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
1692	}
1693} );
1694
1695
1696/*!
1697 * jQuery UI Unique ID 1.13.2
1698 * http://jqueryui.com
1699 *
1700 * Copyright jQuery Foundation and other contributors
1701 * Released under the MIT license.
1702 * http://jquery.org/license
1703 */
1704
1705//>>label: uniqueId
1706//>>group: Core
1707//>>description: Functions to generate and remove uniqueId's
1708//>>docs: http://api.jqueryui.com/uniqueId/
1709
1710
1711var uniqueId = $.fn.extend( {
1712	uniqueId: ( function() {
1713		var uuid = 0;
1714
1715		return function() {
1716			return this.each( function() {
1717				if ( !this.id ) {
1718					this.id = "ui-id-" + ( ++uuid );
1719				}
1720			} );
1721		};
1722	} )(),
1723
1724	removeUniqueId: function() {
1725		return this.each( function() {
1726			if ( /^ui-id-\d+$/.test( this.id ) ) {
1727				$( this ).removeAttr( "id" );
1728			}
1729		} );
1730	}
1731} );
1732
1733
1734
1735// This file is deprecated
1736var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
1737
1738/*!
1739 * jQuery UI Mouse 1.13.2
1740 * http://jqueryui.com
1741 *
1742 * Copyright jQuery Foundation and other contributors
1743 * Released under the MIT license.
1744 * http://jquery.org/license
1745 */
1746
1747//>>label: Mouse
1748//>>group: Widgets
1749//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
1750//>>docs: http://api.jqueryui.com/mouse/
1751
1752
1753var mouseHandled = false;
1754$( document ).on( "mouseup", function() {
1755	mouseHandled = false;
1756} );
1757
1758var widgetsMouse = $.widget( "ui.mouse", {
1759	version: "1.13.2",
1760	options: {
1761		cancel: "input, textarea, button, select, option",
1762		distance: 1,
1763		delay: 0
1764	},
1765	_mouseInit: function() {
1766		var that = this;
1767
1768		this.element
1769			.on( "mousedown." + this.widgetName, function( event ) {
1770				return that._mouseDown( event );
1771			} )
1772			.on( "click." + this.widgetName, function( event ) {
1773				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
1774					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
1775					event.stopImmediatePropagation();
1776					return false;
1777				}
1778			} );
1779
1780		this.started = false;
1781	},
1782
1783	// TODO: make sure destroying one instance of mouse doesn't mess with
1784	// other instances of mouse
1785	_mouseDestroy: function() {
1786		this.element.off( "." + this.widgetName );
1787		if ( this._mouseMoveDelegate ) {
1788			this.document
1789				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1790				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
1791		}
1792	},
1793
1794	_mouseDown: function( event ) {
1795
1796		// don't let more than one widget handle mouseStart
1797		if ( mouseHandled ) {
1798			return;
1799		}
1800
1801		this._mouseMoved = false;
1802
1803		// We may have missed mouseup (out of window)
1804		if ( this._mouseStarted ) {
1805			this._mouseUp( event );
1806		}
1807
1808		this._mouseDownEvent = event;
1809
1810		var that = this,
1811			btnIsLeft = ( event.which === 1 ),
1812
1813			// event.target.nodeName works around a bug in IE 8 with
1814			// disabled inputs (#7620)
1815			elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
1816				$( event.target ).closest( this.options.cancel ).length : false );
1817		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
1818			return true;
1819		}
1820
1821		this.mouseDelayMet = !this.options.delay;
1822		if ( !this.mouseDelayMet ) {
1823			this._mouseDelayTimer = setTimeout( function() {
1824				that.mouseDelayMet = true;
1825			}, this.options.delay );
1826		}
1827
1828		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
1829			this._mouseStarted = ( this._mouseStart( event ) !== false );
1830			if ( !this._mouseStarted ) {
1831				event.preventDefault();
1832				return true;
1833			}
1834		}
1835
1836		// Click event may never have fired (Gecko & Opera)
1837		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
1838			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
1839		}
1840
1841		// These delegates are required to keep context
1842		this._mouseMoveDelegate = function( event ) {
1843			return that._mouseMove( event );
1844		};
1845		this._mouseUpDelegate = function( event ) {
1846			return that._mouseUp( event );
1847		};
1848
1849		this.document
1850			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1851			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
1852
1853		event.preventDefault();
1854
1855		mouseHandled = true;
1856		return true;
1857	},
1858
1859	_mouseMove: function( event ) {
1860
1861		// Only check for mouseups outside the document if you've moved inside the document
1862		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
1863		// fire a mousemove event if content is placed under the cursor. See #7778
1864		// Support: IE <9
1865		if ( this._mouseMoved ) {
1866
1867			// IE mouseup check - mouseup happened when mouse was out of window
1868			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
1869					!event.button ) {
1870				return this._mouseUp( event );
1871
1872			// Iframe mouseup check - mouseup occurred in another document
1873			} else if ( !event.which ) {
1874
1875				// Support: Safari <=8 - 9
1876				// Safari sets which to 0 if you press any of the following keys
1877				// during a drag (#14461)
1878				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
1879						event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
1880					this.ignoreMissingWhich = true;
1881				} else if ( !this.ignoreMissingWhich ) {
1882					return this._mouseUp( event );
1883				}
1884			}
1885		}
1886
1887		if ( event.which || event.button ) {
1888			this._mouseMoved = true;
1889		}
1890
1891		if ( this._mouseStarted ) {
1892			this._mouseDrag( event );
1893			return event.preventDefault();
1894		}
1895
1896		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
1897			this._mouseStarted =
1898				( this._mouseStart( this._mouseDownEvent, event ) !== false );
1899			if ( this._mouseStarted ) {
1900				this._mouseDrag( event );
1901			} else {
1902				this._mouseUp( event );
1903			}
1904		}
1905
1906		return !this._mouseStarted;
1907	},
1908
1909	_mouseUp: function( event ) {
1910		this.document
1911			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
1912			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
1913
1914		if ( this._mouseStarted ) {
1915			this._mouseStarted = false;
1916
1917			if ( event.target === this._mouseDownEvent.target ) {
1918				$.data( event.target, this.widgetName + ".preventClickEvent", true );
1919			}
1920
1921			this._mouseStop( event );
1922		}
1923
1924		if ( this._mouseDelayTimer ) {
1925			clearTimeout( this._mouseDelayTimer );
1926			delete this._mouseDelayTimer;
1927		}
1928
1929		this.ignoreMissingWhich = false;
1930		mouseHandled = false;
1931		event.preventDefault();
1932	},
1933
1934	_mouseDistanceMet: function( event ) {
1935		return ( Math.max(
1936				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
1937				Math.abs( this._mouseDownEvent.pageY - event.pageY )
1938			) >= this.options.distance
1939		);
1940	},
1941
1942	_mouseDelayMet: function( /* event */ ) {
1943		return this.mouseDelayMet;
1944	},
1945
1946	// These are placeholder methods, to be overriden by extending plugin
1947	_mouseStart: function( /* event */ ) {},
1948	_mouseDrag: function( /* event */ ) {},
1949	_mouseStop: function( /* event */ ) {},
1950	_mouseCapture: function( /* event */ ) {
1951		return true;
1952	}
1953} );
1954
1955
1956
1957// $.ui.plugin is deprecated. Use $.widget() extensions instead.
1958var plugin = $.ui.plugin = {
1959	add: function( module, option, set ) {
1960		var i,
1961			proto = $.ui[ module ].prototype;
1962		for ( i in set ) {
1963			proto.plugins[ i ] = proto.plugins[ i ] || [];
1964			proto.plugins[ i ].push( [ option, set[ i ] ] );
1965		}
1966	},
1967	call: function( instance, name, args, allowDisconnected ) {
1968		var i,
1969			set = instance.plugins[ name ];
1970
1971		if ( !set ) {
1972			return;
1973		}
1974
1975		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
1976				instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
1977			return;
1978		}
1979
1980		for ( i = 0; i < set.length; i++ ) {
1981			if ( instance.options[ set[ i ][ 0 ] ] ) {
1982				set[ i ][ 1 ].apply( instance.element, args );
1983			}
1984		}
1985	}
1986};
1987
1988
1989
1990var safeActiveElement = $.ui.safeActiveElement = function( document ) {
1991	var activeElement;
1992
1993	// Support: IE 9 only
1994	// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
1995	try {
1996		activeElement = document.activeElement;
1997	} catch ( error ) {
1998		activeElement = document.body;
1999	}
2000
2001	// Support: IE 9 - 11 only
2002	// IE may return null instead of an element
2003	// Interestingly, this only seems to occur when NOT in an iframe
2004	if ( !activeElement ) {
2005		activeElement = document.body;
2006	}
2007
2008	// Support: IE 11 only
2009	// IE11 returns a seemingly empty object in some cases when accessing
2010	// document.activeElement from an <iframe>
2011	if ( !activeElement.nodeName ) {
2012		activeElement = document.body;
2013	}
2014
2015	return activeElement;
2016};
2017
2018
2019
2020var safeBlur = $.ui.safeBlur = function( element ) {
2021
2022	// Support: IE9 - 10 only
2023	// If the <body> is blurred, IE will switch windows, see #9420
2024	if ( element && element.nodeName.toLowerCase() !== "body" ) {
2025		$( element ).trigger( "blur" );
2026	}
2027};
2028
2029
2030/*!
2031 * jQuery UI Draggable 1.13.2
2032 * http://jqueryui.com
2033 *
2034 * Copyright jQuery Foundation and other contributors
2035 * Released under the MIT license.
2036 * http://jquery.org/license
2037 */
2038
2039//>>label: Draggable
2040//>>group: Interactions
2041//>>description: Enables dragging functionality for any element.
2042//>>docs: http://api.jqueryui.com/draggable/
2043//>>demos: http://jqueryui.com/draggable/
2044//>>css.structure: ../../themes/base/draggable.css
2045
2046
2047$.widget( "ui.draggable", $.ui.mouse, {
2048	version: "1.13.2",
2049	widgetEventPrefix: "drag",
2050	options: {
2051		addClasses: true,
2052		appendTo: "parent",
2053		axis: false,
2054		connectToSortable: false,
2055		containment: false,
2056		cursor: "auto",
2057		cursorAt: false,
2058		grid: false,
2059		handle: false,
2060		helper: "original",
2061		iframeFix: false,
2062		opacity: false,
2063		refreshPositions: false,
2064		revert: false,
2065		revertDuration: 500,
2066		scope: "default",
2067		scroll: true,
2068		scrollSensitivity: 20,
2069		scrollSpeed: 20,
2070		snap: false,
2071		snapMode: "both",
2072		snapTolerance: 20,
2073		stack: false,
2074		zIndex: false,
2075
2076		// Callbacks
2077		drag: null,
2078		start: null,
2079		stop: null
2080	},
2081	_create: function() {
2082
2083		if ( this.options.helper === "original" ) {
2084			this._setPositionRelative();
2085		}
2086		if ( this.options.addClasses ) {
2087			this._addClass( "ui-draggable" );
2088		}
2089		this._setHandleClassName();
2090
2091		this._mouseInit();
2092	},
2093
2094	_setOption: function( key, value ) {
2095		this._super( key, value );
2096		if ( key === "handle" ) {
2097			this._removeHandleClassName();
2098			this._setHandleClassName();
2099		}
2100	},
2101
2102	_destroy: function() {
2103		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
2104			this.destroyOnClear = true;
2105			return;
2106		}
2107		this._removeHandleClassName();
2108		this._mouseDestroy();
2109	},
2110
2111	_mouseCapture: function( event ) {
2112		var o = this.options;
2113
2114		// Among others, prevent a drag on a resizable-handle
2115		if ( this.helper || o.disabled ||
2116				$( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
2117			return false;
2118		}
2119
2120		//Quit if we're not on a valid handle
2121		this.handle = this._getHandle( event );
2122		if ( !this.handle ) {
2123			return false;
2124		}
2125
2126		this._blurActiveElement( event );
2127
2128		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
2129
2130		return true;
2131
2132	},
2133
2134	_blockFrames: function( selector ) {
2135		this.iframeBlocks = this.document.find( selector ).map( function() {
2136			var iframe = $( this );
2137
2138			return $( "<div>" )
2139				.css( "position", "absolute" )
2140				.appendTo( iframe.parent() )
2141				.outerWidth( iframe.outerWidth() )
2142				.outerHeight( iframe.outerHeight() )
2143				.offset( iframe.offset() )[ 0 ];
2144		} );
2145	},
2146
2147	_unblockFrames: function() {
2148		if ( this.iframeBlocks ) {
2149			this.iframeBlocks.remove();
2150			delete this.iframeBlocks;
2151		}
2152	},
2153
2154	_blurActiveElement: function( event ) {
2155		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
2156			target = $( event.target );
2157
2158		// Don't blur if the event occurred on an element that is within
2159		// the currently focused element
2160		// See #10527, #12472
2161		if ( target.closest( activeElement ).length ) {
2162			return;
2163		}
2164
2165		// Blur any element that currently has focus, see #4261
2166		$.ui.safeBlur( activeElement );
2167	},
2168
2169	_mouseStart: function( event ) {
2170
2171		var o = this.options;
2172
2173		//Create and append the visible helper
2174		this.helper = this._createHelper( event );
2175
2176		this._addClass( this.helper, "ui-draggable-dragging" );
2177
2178		//Cache the helper size
2179		this._cacheHelperProportions();
2180
2181		//If ddmanager is used for droppables, set the global draggable
2182		if ( $.ui.ddmanager ) {
2183			$.ui.ddmanager.current = this;
2184		}
2185
2186		/*
2187		 * - Position generation -
2188		 * This block generates everything position related - it's the core of draggables.
2189		 */
2190
2191		//Cache the margins of the original element
2192		this._cacheMargins();
2193
2194		//Store the helper's css position
2195		this.cssPosition = this.helper.css( "position" );
2196		this.scrollParent = this.helper.scrollParent( true );
2197		this.offsetParent = this.helper.offsetParent();
2198		this.hasFixedAncestor = this.helper.parents().filter( function() {
2199				return $( this ).css( "position" ) === "fixed";
2200			} ).length > 0;
2201
2202		//The element's absolute position on the page minus margins
2203		this.positionAbs = this.element.offset();
2204		this._refreshOffsets( event );
2205
2206		//Generate the original position
2207		this.originalPosition = this.position = this._generatePosition( event, false );
2208		this.originalPageX = event.pageX;
2209		this.originalPageY = event.pageY;
2210
2211		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
2212		if ( o.cursorAt ) {
2213			this._adjustOffsetFromHelper( o.cursorAt );
2214		}
2215
2216		//Set a containment if given in the options
2217		this._setContainment();
2218
2219		//Trigger event + callbacks
2220		if ( this._trigger( "start", event ) === false ) {
2221			this._clear();
2222			return false;
2223		}
2224
2225		//Recache the helper size
2226		this._cacheHelperProportions();
2227
2228		//Prepare the droppable offsets
2229		if ( $.ui.ddmanager && !o.dropBehaviour ) {
2230			$.ui.ddmanager.prepareOffsets( this, event );
2231		}
2232
2233		// Execute the drag once - this causes the helper not to be visible before getting its
2234		// correct position
2235		this._mouseDrag( event, true );
2236
2237		// If the ddmanager is used for droppables, inform the manager that dragging has started
2238		// (see #5003)
2239		if ( $.ui.ddmanager ) {
2240			$.ui.ddmanager.dragStart( this, event );
2241		}
2242
2243		return true;
2244	},
2245
2246	_refreshOffsets: function( event ) {
2247		this.offset = {
2248			top: this.positionAbs.top - this.margins.top,
2249			left: this.positionAbs.left - this.margins.left,
2250			scroll: false,
2251			parent: this._getParentOffset(),
2252			relative: this._getRelativeOffset()
2253		};
2254
2255		this.offset.click = {
2256			left: event.pageX - this.offset.left,
2257			top: event.pageY - this.offset.top
2258		};
2259	},
2260
2261	_mouseDrag: function( event, noPropagation ) {
2262
2263		// reset any necessary cached properties (see #5009)
2264		if ( this.hasFixedAncestor ) {
2265			this.offset.parent = this._getParentOffset();
2266		}
2267
2268		//Compute the helpers position
2269		this.position = this._generatePosition( event, true );
2270		this.positionAbs = this._convertPositionTo( "absolute" );
2271
2272		//Call plugins and callbacks and use the resulting position if something is returned
2273		if ( !noPropagation ) {
2274			var ui = this._uiHash();
2275			if ( this._trigger( "drag", event, ui ) === false ) {
2276				this._mouseUp( new $.Event( "mouseup", event ) );
2277				return false;
vendor: 3,655 bytes, lines 2278-2420
2278			}
2279			this.position = ui.position;
2280		}
2281
2282		this.helper[ 0 ].style.left = this.position.left + "px";
2283		this.helper[ 0 ].style.top = this.position.top + "px";
2284
2285		if ( $.ui.ddmanager ) {
2286			$.ui.ddmanager.drag( this, event );
2287		}
2288
2289		return false;
2290	},
2291
2292	_mouseStop: function( event ) {
2293
2294		//If we are using droppables, inform the manager about the drop
2295		var that = this,
2296			dropped = false;
2297		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
2298			dropped = $.ui.ddmanager.drop( this, event );
2299		}
2300
2301		//if a drop comes from outside (a sortable)
2302		if ( this.dropped ) {
2303			dropped = this.dropped;
2304			this.dropped = false;
2305		}
2306
2307		if ( ( this.options.revert === "invalid" && !dropped ) ||
2308				( this.options.revert === "valid" && dropped ) ||
2309				this.options.revert === true || ( typeof this.options.revert === "function" &&
2310				this.options.revert.call( this.element, dropped ) )
2311		) {
2312			$( this.helper ).animate(
2313				this.originalPosition,
2314				parseInt( this.options.revertDuration, 10 ),
2315				function() {
2316					if ( that._trigger( "stop", event ) !== false ) {
2317						that._clear();
2318					}
2319				}
2320			);
2321		} else {
2322			if ( this._trigger( "stop", event ) !== false ) {
2323				this._clear();
2324			}
2325		}
2326
2327		return false;
2328	},
2329
2330	_mouseUp: function( event ) {
2331		this._unblockFrames();
2332
2333		// If the ddmanager is used for droppables, inform the manager that dragging has stopped
2334		// (see #5003)
2335		if ( $.ui.ddmanager ) {
2336			$.ui.ddmanager.dragStop( this, event );
2337		}
2338
2339		// Only need to focus if the event occurred on the draggable itself, see #10527
2340		if ( this.handleElement.is( event.target ) ) {
2341
2342			// The interaction is over; whether or not the click resulted in a drag,
2343			// focus the element
2344			this.element.trigger( "focus" );
2345		}
2346
2347		return $.ui.mouse.prototype._mouseUp.call( this, event );
2348	},
2349
2350	cancel: function() {
2351
2352		if ( this.helper.is( ".ui-draggable-dragging" ) ) {
2353			this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
2354		} else {
2355			this._clear();
2356		}
2357
2358		return this;
2359
2360	},
2361
2362	_getHandle: function( event ) {
2363		return this.options.handle ?
2364			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
2365			true;
2366	},
2367
2368	_setHandleClassName: function() {
2369		this.handleElement = this.options.handle ?
2370			this.element.find( this.options.handle ) : this.element;
2371		this._addClass( this.handleElement, "ui-draggable-handle" );
2372	},
2373
2374	_removeHandleClassName: function() {
2375		this._removeClass( this.handleElement, "ui-draggable-handle" );
2376	},
2377
2378	_createHelper: function( event ) {
2379
2380		var o = this.options,
2381			helperIsFunction = typeof o.helper === "function",
2382			helper = helperIsFunction ?
2383				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
2384				( o.helper === "clone" ?
2385					this.element.clone().removeAttr( "id" ) :
2386					this.element );
2387
2388		if ( !helper.parents( "body" ).length ) {
2389			helper.appendTo( ( o.appendTo === "parent" ?
2390				this.element[ 0 ].parentNode :
2391				o.appendTo ) );
2392		}
2393
2394		// Http://bugs.jqueryui.com/ticket/9446
2395		// a helper function can return the original element
2396		// which wouldn't have been set to relative in _create
2397		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
2398			this._setPositionRelative();
2399		}
2400
2401		if ( helper[ 0 ] !== this.element[ 0 ] &&
2402				!( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
2403			helper.css( "position", "absolute" );
2404		}
2405
2406		return helper;
2407
2408	},
2409
2410	_setPositionRelative: function() {
2411		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
2412			this.element[ 0 ].style.position = "relative";
2413		}
2414	},
2415
2416	_adjustOffsetFromHelper: function( obj ) {
2417		if ( typeof obj === "string" ) {
2418			obj = obj.split( " " );
2419		}
2420		if ( Array
vendor: 14,647 bytes, lines 2420-2900
2420.isArray( obj ) ) {
2421			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
2422		}
2423		if ( "left" in obj ) {
2424			this.offset.click.left = obj.left + this.margins.left;
2425		}
2426		if ( "right" in obj ) {
2427			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
2428		}
2429		if ( "top" in obj ) {
2430			this.offset.click.top = obj.top + this.margins.top;
2431		}
2432		if ( "bottom" in obj ) {
2433			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
2434		}
2435	},
2436
2437	_isRootNode: function( element ) {
2438		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
2439	},
2440
2441	_getParentOffset: function() {
2442
2443		//Get the offsetParent and cache its position
2444		var po = this.offsetParent.offset(),
2445			document = this.document[ 0 ];
2446
2447		// This is a special case where we need to modify a offset calculated on start, since the
2448		// following happened:
2449		// 1. The position of the helper is absolute, so it's position is calculated based on the
2450		// next positioned parent
2451		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
2452		// the document, which means that the scroll is included in the initial calculation of the
2453		// offset of the parent, and never recalculated upon drag
2454		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
2455				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
2456			po.left += this.scrollParent.scrollLeft();
2457			po.top += this.scrollParent.scrollTop();
2458		}
2459
2460		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
2461			po = { top: 0, left: 0 };
2462		}
2463
2464		return {
2465			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
2466			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
2467		};
2468
2469	},
2470
2471	_getRelativeOffset: function() {
2472		if ( this.cssPosition !== "relative" ) {
2473			return { top: 0, left: 0 };
2474		}
2475
2476		var p = this.element.position(),
2477			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
2478
2479		return {
2480			top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
2481				( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
2482			left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
2483				( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
2484		};
2485
2486	},
2487
2488	_cacheMargins: function() {
2489		this.margins = {
2490			left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
2491			top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
2492			right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
2493			bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
2494		};
2495	},
2496
2497	_cacheHelperProportions: function() {
2498		this.helperProportions = {
2499			width: this.helper.outerWidth(),
2500			height: this.helper.outerHeight()
2501		};
2502	},
2503
2504	_setContainment: function() {
2505
2506		var isUserScrollable, c, ce,
2507			o = this.options,
2508			document = this.document[ 0 ];
2509
2510		this.relativeContainer = null;
2511
2512		if ( !o.containment ) {
2513			this.containment = null;
2514			return;
2515		}
2516
2517		if ( o.containment === "window" ) {
2518			this.containment = [
2519				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
2520				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
2521				$( window ).scrollLeft() + $( window ).width() -
2522					this.helperProportions.width - this.margins.left,
2523				$( window ).scrollTop() +
2524					( $( window ).height() || document.body.parentNode.scrollHeight ) -
2525					this.helperProportions.height - this.margins.top
2526			];
2527			return;
2528		}
2529
2530		if ( o.containment === "document" ) {
2531			this.containment = [
2532				0,
2533				0,
2534				$( document ).width() - this.helperProportions.width - this.margins.left,
2535				( $( document ).height() || document.body.parentNode.scrollHeight ) -
2536					this.helperProportions.height - this.margins.top
2537			];
2538			return;
2539		}
2540
2541		if ( o.containment.constructor === Array ) {
2542			this.containment = o.containment;
2543			return;
2544		}
2545
2546		if ( o.containment === "parent" ) {
2547			o.containment = this.helper[ 0 ].parentNode;
2548		}
2549
2550		c = $( o.containment );
2551		ce = c[ 0 ];
2552
2553		if ( !ce ) {
2554			return;
2555		}
2556
2557		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
2558
2559		this.containment = [
2560			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
2561				( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
2562			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
2563				( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
2564			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
2565				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
2566				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
2567				this.helperProportions.width -
2568				this.margins.left -
2569				this.margins.right,
2570			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
2571				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
2572				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
2573				this.helperProportions.height -
2574				this.margins.top -
2575				this.margins.bottom
2576		];
2577		this.relativeContainer = c;
2578	},
2579
2580	_convertPositionTo: function( d, pos ) {
2581
2582		if ( !pos ) {
2583			pos = this.position;
2584		}
2585
2586		var mod = d === "absolute" ? 1 : -1,
2587			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
2588
2589		return {
2590			top: (
2591
2592				// The absolute mouse position
2593				pos.top	+
2594
2595				// Only for relative positioned nodes: Relative offset from element to offset parent
2596				this.offset.relative.top * mod +
2597
2598				// The offsetParent's offset without borders (offset + border)
2599				this.offset.parent.top * mod -
2600				( ( this.cssPosition === "fixed" ?
2601					-this.offset.scroll.top :
2602					( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
2603			),
2604			left: (
2605
2606				// The absolute mouse position
2607				pos.left +
2608
2609				// Only for relative positioned nodes: Relative offset from element to offset parent
2610				this.offset.relative.left * mod +
2611
2612				// The offsetParent's offset without borders (offset + border)
2613				this.offset.parent.left * mod	-
2614				( ( this.cssPosition === "fixed" ?
2615					-this.offset.scroll.left :
2616					( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
2617			)
2618		};
2619
2620	},
2621
2622	_generatePosition: function( event, constrainPosition ) {
2623
2624		var containment, co, top, left,
2625			o = this.options,
2626			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
2627			pageX = event.pageX,
2628			pageY = event.pageY;
2629
2630		// Cache the scroll
2631		if ( !scrollIsRootNode || !this.offset.scroll ) {
2632			this.offset.scroll = {
2633				top: this.scrollParent.scrollTop(),
2634				left: this.scrollParent.scrollLeft()
2635			};
2636		}
2637
2638		/*
2639		 * - Position constraining -
2640		 * Constrain the position to a mix of grid, containment.
2641		 */
2642
2643		// If we are not dragging yet, we won't check for options
2644		if ( constrainPosition ) {
2645			if ( this.containment ) {
2646				if ( this.relativeContainer ) {
2647					co = this.relativeContainer.offset();
2648					containment = [
2649						this.containment[ 0 ] + co.left,
2650						this.containment[ 1 ] + co.top,
2651						this.containment[ 2 ] + co.left,
2652						this.containment[ 3 ] + co.top
2653					];
2654				} else {
2655					containment = this.containment;
2656				}
2657
2658				if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
2659					pageX = containment[ 0 ] + this.offset.click.left;
2660				}
2661				if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
2662					pageY = containment[ 1 ] + this.offset.click.top;
2663				}
2664				if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
2665					pageX = containment[ 2 ] + this.offset.click.left;
2666				}
2667				if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
2668					pageY = containment[ 3 ] + this.offset.click.top;
2669				}
2670			}
2671
2672			if ( o.grid ) {
2673
2674				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid
2675				// argument errors in IE (see ticket #6950)
2676				top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
2677					this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
2678				pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
2679					top - this.offset.click.top > containment[ 3 ] ) ?
2680						top :
2681						( ( top - this.offset.click.top >= containment[ 1 ] ) ?
2682							top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
2683
2684				left = o.grid[ 0 ] ? this.originalPageX +
2685					Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
2686					this.originalPageX;
2687				pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
2688					left - this.offset.click.left > containment[ 2 ] ) ?
2689						left :
2690						( ( left - this.offset.click.left >= containment[ 0 ] ) ?
2691							left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
2692			}
2693
2694			if ( o.axis === "y" ) {
2695				pageX = this.originalPageX;
2696			}
2697
2698			if ( o.axis === "x" ) {
2699				pageY = this.originalPageY;
2700			}
2701		}
2702
2703		return {
2704			top: (
2705
2706				// The absolute mouse position
2707				pageY -
2708
2709				// Click offset (relative to the element)
2710				this.offset.click.top -
2711
2712				// Only for relative positioned nodes: Relative offset from element to offset parent
2713				this.offset.relative.top -
2714
2715				// The offsetParent's offset without borders (offset + border)
2716				this.offset.parent.top +
2717				( this.cssPosition === "fixed" ?
2718					-this.offset.scroll.top :
2719					( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
2720			),
2721			left: (
2722
2723				// The absolute mouse position
2724				pageX -
2725
2726				// Click offset (relative to the element)
2727				this.offset.click.left -
2728
2729				// Only for relative positioned nodes: Relative offset from element to offset parent
2730				this.offset.relative.left -
2731
2732				// The offsetParent's offset without borders (offset + border)
2733				this.offset.parent.left +
2734				( this.cssPosition === "fixed" ?
2735					-this.offset.scroll.left :
2736					( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
2737			)
2738		};
2739
2740	},
2741
2742	_clear: function() {
2743		this._removeClass( this.helper, "ui-draggable-dragging" );
2744		if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
2745			this.helper.remove();
2746		}
2747		this.helper = null;
2748		this.cancelHelperRemoval = false;
2749		if ( this.destroyOnClear ) {
2750			this.destroy();
2751		}
2752	},
2753
2754	// From now on bulk stuff - mainly helpers
2755
2756	_trigger: function( type, event, ui ) {
2757		ui = ui || this._uiHash();
2758		$.ui.plugin.call( this, type, [ event, ui, this ], true );
2759
2760		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
2761		if ( /^(drag|start|stop)/.test( type ) ) {
2762			this.positionAbs = this._convertPositionTo( "absolute" );
2763			ui.offset = this.positionAbs;
2764		}
2765		return $.Widget.prototype._trigger.call( this, type, event, ui );
2766	},
2767
2768	plugins: {},
2769
2770	_uiHash: function() {
2771		return {
2772			helper: this.helper,
2773			position: this.position,
2774			originalPosition: this.originalPosition,
2775			offset: this.positionAbs
2776		};
2777	}
2778
2779} );
2780
2781$.ui.plugin.add( "draggable", "connectToSortable", {
2782	start: function( event, ui, draggable ) {
2783		var uiSortable = $.extend( {}, ui, {
2784			item: draggable.element
2785		} );
2786
2787		draggable.sortables = [];
2788		$( draggable.options.connectToSortable ).each( function() {
2789			var sortable = $( this ).sortable( "instance" );
2790
2791			if ( sortable && !sortable.options.disabled ) {
2792				draggable.sortables.push( sortable );
2793
2794				// RefreshPositions is called at drag start to refresh the containerCache
2795				// which is used in drag. This ensures it's initialized and synchronized
2796				// with any changes that might have happened on the page since initialization.
2797				sortable.refreshPositions();
2798				sortable._trigger( "activate", event, uiSortable );
2799			}
2800		} );
2801	},
2802	stop: function( event, ui, draggable ) {
2803		var uiSortable = $.extend( {}, ui, {
2804			item: draggable.element
2805		} );
2806
2807		draggable.cancelHelperRemoval = false;
2808
2809		$.each( draggable.sortables, function() {
2810			var sortable = this;
2811
2812			if ( sortable.isOver ) {
2813				sortable.isOver = 0;
2814
2815				// Allow this sortable to handle removing the helper
2816				draggable.cancelHelperRemoval = true;
2817				sortable.cancelHelperRemoval = false;
2818
2819				// Use _storedCSS To restore properties in the sortable,
2820				// as this also handles revert (#9675) since the draggable
2821				// may have modified them in unexpected ways (#8809)
2822				sortable._storedCSS = {
2823					position: sortable.placeholder.css( "position" ),
2824					top: sortable.placeholder.css( "top" ),
2825					left: sortable.placeholder.css( "left" )
2826				};
2827
2828				sortable._mouseStop( event );
2829
2830				// Once drag has ended, the sortable should return to using
2831				// its original helper, not the shared helper from draggable
2832				sortable.options.helper = sortable.options._helper;
2833			} else {
2834
2835				// Prevent this Sortable from removing the helper.
2836				// However, don't set the draggable to remove the helper
2837				// either as another connected Sortable may yet handle the removal.
2838				sortable.cancelHelperRemoval = true;
2839
2840				sortable._trigger( "deactivate", event, uiSortable );
2841			}
2842		} );
2843	},
2844	drag: function( event, ui, draggable ) {
2845		$.each( draggable.sortables, function() {
2846			var innermostIntersecting = false,
2847				sortable = this;
2848
2849			// Copy over variables that sortable's _intersectsWith uses
2850			sortable.positionAbs = draggable.positionAbs;
2851			sortable.helperProportions = draggable.helperProportions;
2852			sortable.offset.click = draggable.offset.click;
2853
2854			if ( sortable._intersectsWith( sortable.containerCache ) ) {
2855				innermostIntersecting = true;
2856
2857				$.each( draggable.sortables, function() {
2858
2859					// Copy over variables that sortable's _intersectsWith uses
2860					this.positionAbs = draggable.positionAbs;
2861					this.helperProportions = draggable.helperProportions;
2862					this.offset.click = draggable.offset.click;
2863
2864					if ( this !== sortable &&
2865							this._intersectsWith( this.containerCache ) &&
2866							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
2867						innermostIntersecting = false;
2868					}
2869
2870					return innermostIntersecting;
2871				} );
2872			}
2873
2874			if ( innermostIntersecting ) {
2875
2876				// If it intersects, we use a little isOver variable and set it once,
2877				// so that the move-in stuff gets fired only once.
2878				if ( !sortable.isOver ) {
2879					sortable.isOver = 1;
2880
2881					// Store draggable's parent in case we need to reappend to it later.
2882					draggable._parent = ui.helper.parent();
2883
2884					sortable.currentItem = ui.helper
2885						.appendTo( sortable.element )
2886						.data( "ui-sortable-item", true );
2887
2888					// Store helper option to later restore it
2889					sortable.options._helper = sortable.options.helper;
2890
2891					sortable.options.helper = function() {
2892						return ui.helper[ 0 ];
2893					};
2894
2895					// Fire the start events of the sortable with our passed browser event,
2896					// and our own helper (so it doesn't create a new one)
2897					event.target = sortable.currentItem[ 0 ];
2898					sortable._mouseCapture( event, true );
2899					sortable._mouseStart( event, true, true );
2900
vendor: 10,619 bytes, lines 2901-3266
2901					// Because the browser event is way off the new appended portlet,
2902					// modify necessary variables to reflect the changes
2903					sortable.offset.click.top = draggable.offset.click.top;
2904					sortable.offset.click.left = draggable.offset.click.left;
2905					sortable.offset.parent.left -= draggable.offset.parent.left -
2906						sortable.offset.parent.left;
2907					sortable.offset.parent.top -= draggable.offset.parent.top -
2908						sortable.offset.parent.top;
2909
2910					draggable._trigger( "toSortable", event );
2911
2912					// Inform draggable that the helper is in a valid drop zone,
2913					// used solely in the revert option to handle "valid/invalid".
2914					draggable.dropped = sortable.element;
2915
2916					// Need to refreshPositions of all sortables in the case that
2917					// adding to one sortable changes the location of the other sortables (#9675)
2918					$.each( draggable.sortables, function() {
2919						this.refreshPositions();
2920					} );
2921
2922					// Hack so receive/update callbacks work (mostly)
2923					draggable.currentItem = draggable.element;
2924					sortable.fromOutside = draggable;
2925				}
2926
2927				if ( sortable.currentItem ) {
2928					sortable._mouseDrag( event );
2929
2930					// Copy the sortable's position because the draggable's can potentially reflect
2931					// a relative position, while sortable is always absolute, which the dragged
2932					// element has now become. (#8809)
2933					ui.position = sortable.position;
2934				}
2935			} else {
2936
2937				// If it doesn't intersect with the sortable, and it intersected before,
2938				// we fake the drag stop of the sortable, but make sure it doesn't remove
2939				// the helper by using cancelHelperRemoval.
2940				if ( sortable.isOver ) {
2941
2942					sortable.isOver = 0;
2943					sortable.cancelHelperRemoval = true;
2944
2945					// Calling sortable's mouseStop would trigger a revert,
2946					// so revert must be temporarily false until after mouseStop is called.
2947					sortable.options._revert = sortable.options.revert;
2948					sortable.options.revert = false;
2949
2950					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
2951					sortable._mouseStop( event, true );
2952
2953					// Restore sortable behaviors that were modfied
2954					// when the draggable entered the sortable area (#9481)
2955					sortable.options.revert = sortable.options._revert;
2956					sortable.options.helper = sortable.options._helper;
2957
2958					if ( sortable.placeholder ) {
2959						sortable.placeholder.remove();
2960					}
2961
2962					// Restore and recalculate the draggable's offset considering the sortable
2963					// may have modified them in unexpected ways. (#8809, #10669)
2964					ui.helper.appendTo( draggable._parent );
2965					draggable._refreshOffsets( event );
2966					ui.position = draggable._generatePosition( event, true );
2967
2968					draggable._trigger( "fromSortable", event );
2969
2970					// Inform draggable that the helper is no longer in a valid drop zone
2971					draggable.dropped = false;
2972
2973					// Need to refreshPositions of all sortables just in case removing
2974					// from one sortable changes the location of other sortables (#9675)
2975					$.each( draggable.sortables, function() {
2976						this.refreshPositions();
2977					} );
2978				}
2979			}
2980		} );
2981	}
2982} );
2983
2984$.ui.plugin.add( "draggable", "cursor", {
2985	start: function( event, ui, instance ) {
2986		var t = $( "body" ),
2987			o = instance.options;
2988
2989		if ( t.css( "cursor" ) ) {
2990			o._cursor = t.css( "cursor" );
2991		}
2992		t.css( "cursor", o.cursor );
2993	},
2994	stop: function( event, ui, instance ) {
2995		var o = instance.options;
2996		if ( o._cursor ) {
2997			$( "body" ).css( "cursor", o._cursor );
2998		}
2999	}
3000} );
3001
3002$.ui.plugin.add( "draggable", "opacity", {
3003	start: function( event, ui, instance ) {
3004		var t = $( ui.helper ),
3005			o = instance.options;
3006		if ( t.css( "opacity" ) ) {
3007			o._opacity = t.css( "opacity" );
3008		}
3009		t.css( "opacity", o.opacity );
3010	},
3011	stop: function( event, ui, instance ) {
3012		var o = instance.options;
3013		if ( o._opacity ) {
3014			$( ui.helper ).css( "opacity", o._opacity );
3015		}
3016	}
3017} );
3018
3019$.ui.plugin.add( "draggable", "scroll", {
3020	start: function( event, ui, i ) {
3021		if ( !i.scrollParentNotHidden ) {
3022			i.scrollParentNotHidden = i.helper.scrollParent( false );
3023		}
3024
3025		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
3026				i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
3027			i.overflowOffset = i.scrollParentNotHidden.offset();
3028		}
3029	},
3030	drag: function( event, ui, i  ) {
3031
3032		var o = i.options,
3033			scrolled = false,
3034			scrollParent = i.scrollParentNotHidden[ 0 ],
3035			document = i.document[ 0 ];
3036
3037		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
3038			if ( !o.axis || o.axis !== "x" ) {
3039				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
3040						o.scrollSensitivity ) {
3041					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
3042				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
3043					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
3044				}
3045			}
3046
3047			if ( !o.axis || o.axis !== "y" ) {
3048				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
3049						o.scrollSensitivity ) {
3050					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
3051				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
3052					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
3053				}
3054			}
3055
3056		} else {
3057
3058			if ( !o.axis || o.axis !== "x" ) {
3059				if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
3060					scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
3061				} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
3062						o.scrollSensitivity ) {
3063					scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
3064				}
3065			}
3066
3067			if ( !o.axis || o.axis !== "y" ) {
3068				if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
3069					scrolled = $( document ).scrollLeft(
3070						$( document ).scrollLeft() - o.scrollSpeed
3071					);
3072				} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
3073						o.scrollSensitivity ) {
3074					scrolled = $( document ).scrollLeft(
3075						$( document ).scrollLeft() + o.scrollSpeed
3076					);
3077				}
3078			}
3079
3080		}
3081
3082		if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
3083			$.ui.ddmanager.prepareOffsets( i, event );
3084		}
3085
3086	}
3087} );
3088
3089$.ui.plugin.add( "draggable", "snap", {
3090	start: function( event, ui, i ) {
3091
3092		var o = i.options;
3093
3094		i.snapElements = [];
3095
3096		$( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
3097			.each( function() {
3098				var $t = $( this ),
3099					$o = $t.offset();
3100				if ( this !== i.element[ 0 ] ) {
3101					i.snapElements.push( {
3102						item: this,
3103						width: $t.outerWidth(), height: $t.outerHeight(),
3104						top: $o.top, left: $o.left
3105					} );
3106				}
3107			} );
3108
3109	},
3110	drag: function( event, ui, inst ) {
3111
3112		var ts, bs, ls, rs, l, r, t, b, i, first,
3113			o = inst.options,
3114			d = o.snapTolerance,
3115			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
3116			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
3117
3118		for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
3119
3120			l = inst.snapElements[ i ].left - inst.margins.left;
3121			r = l + inst.snapElements[ i ].width;
3122			t = inst.snapElements[ i ].top - inst.margins.top;
3123			b = t + inst.snapElements[ i ].height;
3124
3125			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
3126					!$.contains( inst.snapElements[ i ].item.ownerDocument,
3127					inst.snapElements[ i ].item ) ) {
3128				if ( inst.snapElements[ i ].snapping ) {
3129					if ( inst.options.snap.release ) {
3130						inst.options.snap.release.call(
3131							inst.element,
3132							event,
3133							$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
3134						);
3135					}
3136				}
3137				inst.snapElements[ i ].snapping = false;
3138				continue;
3139			}
3140
3141			if ( o.snapMode !== "inner" ) {
3142				ts = Math.abs( t - y2 ) <= d;
3143				bs = Math.abs( b - y1 ) <= d;
3144				ls = Math.abs( l - x2 ) <= d;
3145				rs = Math.abs( r - x1 ) <= d;
3146				if ( ts ) {
3147					ui.position.top = inst._convertPositionTo( "relative", {
3148						top: t - inst.helperProportions.height,
3149						left: 0
3150					} ).top;
3151				}
3152				if ( bs ) {
3153					ui.position.top = inst._convertPositionTo( "relative", {
3154						top: b,
3155						left: 0
3156					} ).top;
3157				}
3158				if ( ls ) {
3159					ui.position.left = inst._convertPositionTo( "relative", {
3160						top: 0,
3161						left: l - inst.helperProportions.width
3162					} ).left;
3163				}
3164				if ( rs ) {
3165					ui.position.left = inst._convertPositionTo( "relative", {
3166						top: 0,
3167						left: r
3168					} ).left;
3169				}
3170			}
3171
3172			first = ( ts || bs || ls || rs );
3173
3174			if ( o.snapMode !== "outer" ) {
3175				ts = Math.abs( t - y1 ) <= d;
3176				bs = Math.abs( b - y2 ) <= d;
3177				ls = Math.abs( l - x1 ) <= d;
3178				rs = Math.abs( r - x2 ) <= d;
3179				if ( ts ) {
3180					ui.position.top = inst._convertPositionTo( "relative", {
3181						top: t,
3182						left: 0
3183					} ).top;
3184				}
3185				if ( bs ) {
3186					ui.position.top = inst._convertPositionTo( "relative", {
3187						top: b - inst.helperProportions.height,
3188						left: 0
3189					} ).top;
3190				}
3191				if ( ls ) {
3192					ui.position.left = inst._convertPositionTo( "relative", {
3193						top: 0,
3194						left: l
3195					} ).left;
3196				}
3197				if ( rs ) {
3198					ui.position.left = inst._convertPositionTo( "relative", {
3199						top: 0,
3200						left: r - inst.helperProportions.width
3201					} ).left;
3202				}
3203			}
3204
3205			if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
3206				if ( inst.options.snap.snap ) {
3207					inst.options.snap.snap.call(
3208						inst.element,
3209						event,
3210						$.extend( inst._uiHash(), {
3211							snapItem: inst.snapElements[ i ].item
3212						} ) );
3213				}
3214			}
3215			inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
3216
3217		}
3218
3219	}
3220} );
3221
3222$.ui.plugin.add( "draggable", "stack", {
3223	start: function( event, ui, instance ) {
3224		var min,
3225			o = instance.options,
3226			group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
3227				return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
3228					( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
3229			} );
3230
3231		if ( !group.length ) {
3232			return;
3233		}
3234
3235		min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
3236		$( group ).each( function( i ) {
3237			$( this ).css( "zIndex", min + i );
3238		} );
3239		this.css( "zIndex", ( min + group.length ) );
3240	}
3241} );
3242
3243$.ui.plugin.add( "draggable", "zIndex", {
3244	start: function( event, ui, instance ) {
3245		var t = $( ui.helper ),
3246			o = instance.options;
3247
3248		if ( t.css( "zIndex" ) ) {
3249			o._zIndex = t.css( "zIndex" );
3250		}
3251		t.css( "zIndex", o.zIndex );
3252	},
3253	stop: function( event, ui, instance ) {
3254		var o = instance.options;
3255
3256		if ( o._zIndex ) {
3257			$( ui.helper ).css( "zIndex", o._zIndex );
3258		}
3259	}
3260} );
3261
3262var widgetsDraggable = $.ui.draggable;
3263
3264
3265/*!
3266 * jQuery UI 
3266Droppable 1.13.2
3267 * http://jqueryui.com
3268 *
3269 * Copyright jQuery Foundation and other contributors
3270 * Released under the MIT license.
3271 * http://jquery.org/license
3272 */
3273
3274//>>label: Droppable
3275//>>group: Interactions
3276//>>description: Enables drop targets for draggable elements.
3277//>>docs: http://api.jqueryui.com/droppable/
3278//>>demos: http://jqueryui.com/droppable/
3279
3280
3281$.widget( "ui.droppable", {
3282	version: "1.13
vendor: 11,313 bytes, lines 3282-3710
3282.2",
3283	widgetEventPrefix: "drop",
3284	options: {
3285		accept: "*",
3286		addClasses: true,
3287		greedy: false,
3288		scope: "default",
3289		tolerance: "intersect",
3290
3291		// Callbacks
3292		activate: null,
3293		deactivate: null,
3294		drop: null,
3295		out: null,
3296		over: null
3297	},
3298	_create: function() {
3299
3300		var proportions,
3301			o = this.options,
3302			accept = o.accept;
3303
3304		this.isover = false;
3305		this.isout = true;
3306
3307		this.accept = typeof accept === "function" ? accept : function( d ) {
3308			return d.is( accept );
3309		};
3310
3311		this.proportions = function( /* valueToWrite */ ) {
3312			if ( arguments.length ) {
3313
3314				// Store the droppable's proportions
3315				proportions = arguments[ 0 ];
3316			} else {
3317
3318				// Retrieve or derive the droppable's proportions
3319				return proportions ?
3320					proportions :
3321					proportions = {
3322						width: this.element[ 0 ].offsetWidth,
3323						height: this.element[ 0 ].offsetHeight
3324					};
3325			}
3326		};
3327
3328		this._addToManager( o.scope );
3329
3330		if ( o.addClasses ) {
3331			this._addClass( "ui-droppable" );
3332		}
3333
3334	},
3335
3336	_addToManager: function( scope ) {
3337
3338		// Add the reference and positions to the manager
3339		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
3340		$.ui.ddmanager.droppables[ scope ].push( this );
3341	},
3342
3343	_splice: function( drop ) {
3344		var i = 0;
3345		for ( ; i < drop.length; i++ ) {
3346			if ( drop[ i ] === this ) {
3347				drop.splice( i, 1 );
3348			}
3349		}
3350	},
3351
3352	_destroy: function() {
3353		var drop = $.ui.ddmanager.droppables[ this.options.scope ];
3354
3355		this._splice( drop );
3356	},
3357
3358	_setOption: function( key, value ) {
3359
3360		if ( key === "accept" ) {
3361			this.accept = typeof value === "function" ? value : function( d ) {
3362				return d.is( value );
3363			};
3364		} else if ( key === "scope" ) {
3365			var drop = $.ui.ddmanager.droppables[ this.options.scope ];
3366
3367			this._splice( drop );
3368			this._addToManager( value );
3369		}
3370
3371		this._super( key, value );
3372	},
3373
3374	_activate: function( event ) {
3375		var draggable = $.ui.ddmanager.current;
3376
3377		this._addActiveClass();
3378		if ( draggable ) {
3379			this._trigger( "activate", event, this.ui( draggable ) );
3380		}
3381	},
3382
3383	_deactivate: function( event ) {
3384		var draggable = $.ui.ddmanager.current;
3385
3386		this._removeActiveClass();
3387		if ( draggable ) {
3388			this._trigger( "deactivate", event, this.ui( draggable ) );
3389		}
3390	},
3391
3392	_over: function( event ) {
3393
3394		var draggable = $.ui.ddmanager.current;
3395
3396		// Bail if draggable and droppable are same element
3397		if ( !draggable || ( draggable.currentItem ||
3398				draggable.element )[ 0 ] === this.element[ 0 ] ) {
3399			return;
3400		}
3401
3402		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
3403				draggable.element ) ) ) {
3404			this._addHoverClass();
3405			this._trigger( "over", event, this.ui( draggable ) );
3406		}
3407
3408	},
3409
3410	_out: function( event ) {
3411
3412		var draggable = $.ui.ddmanager.current;
3413
3414		// Bail if draggable and droppable are same element
3415		if ( !draggable || ( draggable.currentItem ||
3416				draggable.element )[ 0 ] === this.element[ 0 ] ) {
3417			return;
3418		}
3419
3420		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
3421				draggable.element ) ) ) {
3422			this._removeHoverClass();
3423			this._trigger( "out", event, this.ui( draggable ) );
3424		}
3425
3426	},
3427
3428	_drop: function( event, custom ) {
3429
3430		var draggable = custom || $.ui.ddmanager.current,
3431			childrenIntersection = false;
3432
3433		// Bail if draggable and droppable are same element
3434		if ( !draggable || ( draggable.currentItem ||
3435				draggable.element )[ 0 ] === this.element[ 0 ] ) {
3436			return false;
3437		}
3438
3439		this.element
3440			.find( ":data(ui-droppable)" )
3441			.not( ".ui-draggable-dragging" )
3442			.each( function() {
3443				var inst = $( this ).droppable( "instance" );
3444				if (
3445					inst.options.greedy &&
3446					!inst.options.disabled &&
3447					inst.options.scope === draggable.options.scope &&
3448					inst.accept.call(
3449						inst.element[ 0 ], ( draggable.currentItem || draggable.element )
3450					) &&
3451					$.ui.intersect(
3452						draggable,
3453						$.extend( inst, { offset: inst.element.offset() } ),
3454						inst.options.tolerance, event
3455					)
3456				) {
3457					childrenIntersection = true;
3458					return false;
3459				}
3460			} );
3461		if ( childrenIntersection ) {
3462			return false;
3463		}
3464
3465		if ( this.accept.call( this.element[ 0 ],
3466				( draggable.currentItem || draggable.element ) ) ) {
3467			this._removeActiveClass();
3468			this._removeHoverClass();
3469
3470			this._trigger( "drop", event, this.ui( draggable ) );
3471			return this.element;
3472		}
3473
3474		return false;
3475
3476	},
3477
3478	ui: function( c ) {
3479		return {
3480			draggable: ( c.currentItem || c.element ),
3481			helper: c.helper,
3482			position: c.position,
3483			offset: c.positionAbs
3484		};
3485	},
3486
3487	// Extension points just to make backcompat sane and avoid duplicating logic
3488	// TODO: Remove in 1.14 along with call to it below
3489	_addHoverClass: function() {
3490		this._addClass( "ui-droppable-hover" );
3491	},
3492
3493	_removeHoverClass: function() {
3494		this._removeClass( "ui-droppable-hover" );
3495	},
3496
3497	_addActiveClass: function() {
3498		this._addClass( "ui-droppable-active" );
3499	},
3500
3501	_removeActiveClass: function() {
3502		this._removeClass( "ui-droppable-active" );
3503	}
3504} );
3505
3506$.ui.intersect = ( function() {
3507	function isOverAxis( x, reference, size ) {
3508		return ( x >= reference ) && ( x < ( reference + size ) );
3509	}
3510
3511	return function( draggable, droppable, toleranceMode, event ) {
3512
3513		if ( !droppable.offset ) {
3514			return false;
3515		}
3516
3517		var x1 = ( draggable.positionAbs ||
3518				draggable.position.absolute ).left + draggable.margins.left,
3519			y1 = ( draggable.positionAbs ||
3520				draggable.position.absolute ).top + draggable.margins.top,
3521			x2 = x1 + draggable.helperProportions.width,
3522			y2 = y1 + draggable.helperProportions.height,
3523			l = droppable.offset.left,
3524			t = droppable.offset.top,
3525			r = l + droppable.proportions().width,
3526			b = t + droppable.proportions().height;
3527
3528		switch ( toleranceMode ) {
3529		case "fit":
3530			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
3531		case "intersect":
3532			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
3533				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
3534				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
3535				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
3536		case "pointer":
3537			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
3538				isOverAxis( event.pageX, l, droppable.proportions().width );
3539		case "touch":
3540			return (
3541				( y1 >= t && y1 <= b ) || // Top edge touching
3542				( y2 >= t && y2 <= b ) || // Bottom edge touching
3543				( y1 < t && y2 > b ) // Surrounded vertically
3544			) && (
3545				( x1 >= l && x1 <= r ) || // Left edge touching
3546				( x2 >= l && x2 <= r ) || // Right edge touching
3547				( x1 < l && x2 > r ) // Surrounded horizontally
3548			);
3549		default:
3550			return false;
3551		}
3552	};
3553} )();
3554
3555/*
3556	This manager tracks offsets of draggables and droppables
3557*/
3558$.ui.ddmanager = {
3559	current: null,
3560	droppables: { "default": [] },
3561	prepareOffsets: function( t, event ) {
3562
3563		var i, j,
3564			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
3565			type = event ? event.type : null, // workaround for #2317
3566			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
3567
3568		droppablesLoop: for ( i = 0; i < m.length; i++ ) {
3569
3570			// No disabled and non-accepted
3571			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
3572					( t.currentItem || t.element ) ) ) ) {
3573				continue;
3574			}
3575
3576			// Filter out elements in the current dragged item
3577			for ( j = 0; j < list.length; j++ ) {
3578				if ( list[ j ] === m[ i ].element[ 0 ] ) {
3579					m[ i ].proportions().height = 0;
3580					continue droppablesLoop;
3581				}
3582			}
3583
3584			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
3585			if ( !m[ i ].visible ) {
3586				continue;
3587			}
3588
3589			// Activate the droppable if used directly from draggables
3590			if ( type === "mousedown" ) {
3591				m[ i ]._activate.call( m[ i ], event );
3592			}
3593
3594			m[ i ].offset = m[ i ].element.offset();
3595			m[ i ].proportions( {
3596				width: m[ i ].element[ 0 ].offsetWidth,
3597				height: m[ i ].element[ 0 ].offsetHeight
3598			} );
3599
3600		}
3601
3602	},
3603	drop: function( draggable, event ) {
3604
3605		var dropped = false;
3606
3607		// Create a copy of the droppables in case the list changes during the drop (#9116)
3608		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
3609
3610			if ( !this.options ) {
3611				return;
3612			}
3613			if ( !this.options.disabled && this.visible &&
3614					$.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
3615				dropped = this._drop.call( this, event ) || dropped;
3616			}
3617
3618			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
3619					( draggable.currentItem || draggable.element ) ) ) {
3620				this.isout = true;
3621				this.isover = false;
3622				this._deactivate.call( this, event );
3623			}
3624
3625		} );
3626		return dropped;
3627
3628	},
3629	dragStart: function( draggable, event ) {
3630
3631		// Listen for scrolling so that if the dragging causes scrolling the position of the
3632		// droppables can be recalculated (see #5003)
3633		draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
3634			if ( !draggable.options.refreshPositions ) {
3635				$.ui.ddmanager.prepareOffsets( draggable, event );
3636			}
3637		} );
3638	},
3639	drag: function( draggable, event ) {
3640
3641		// If you have a highly dynamic page, you might try this option. It renders positions
3642		// every time you move the mouse.
3643		if ( draggable.options.refreshPositions ) {
3644			$.ui.ddmanager.prepareOffsets( draggable, event );
3645		}
3646
3647		// Run through all droppables and check their positions based on specific tolerance options
3648		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
3649
3650			if ( this.options.disabled || this.greedyChild || !this.visible ) {
3651				return;
3652			}
3653
3654			var parentInstance, scope, parent,
3655				intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
3656				c = !intersects && this.isover ?
3657					"isout" :
3658					( intersects && !this.isover ? "isover" : null );
3659			if ( !c ) {
3660				return;
3661			}
3662
3663			if ( this.options.greedy ) {
3664
3665				// find droppable parents with same scope
3666				scope = this.options.scope;
3667				parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
3668					return $( this ).droppable( "instance" ).options.scope === scope;
3669				} );
3670
3671				if ( parent.length ) {
3672					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
3673					parentInstance.greedyChild = ( c === "isover" );
3674				}
3675			}
3676
3677			// We just moved into a greedy child
3678			if ( parentInstance && c === "isover" ) {
3679				parentInstance.isover = false;
3680				parentInstance.isout = true;
3681				parentInstance._out.call( parentInstance, event );
3682			}
3683
3684			this[ c ] = true;
3685			this[ c === "isout" ? "isover" : "isout" ] = false;
3686			this[ c === "isover" ? "_over" : "_out" ].call( this, event );
3687
3688			// We just moved out of a greedy child
3689			if ( parentInstance && c === "isout" ) {
3690				parentInstance.isout = false;
3691				parentInstance.isover = true;
3692				parentInstance._over.call( parentInstance, event );
3693			}
3694		} );
3695
3696	},
3697	dragStop: function( draggable, event ) {
3698		draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
3699
3700		// Call prepareOffsets one final time since IE does not fire return scroll events when
3701		// overflow was caused by drag (see #5003)
3702		if ( !draggable.options.refreshPositions ) {
3703			$.ui.ddmanager.prepareOffsets( draggable, event );
3704		}
3705	}
3706};
3707
3708// DEPRECATED
3709// TODO: switch return back to widget declaration at top of file when this is removed
3710if ( $.uiBackCompat 
3710!== false ) {
3711
3712	// Backcompat for activeClass and hoverClass options
3713	$.widget( "ui.droppable", $.ui.droppable, {
3714		options: {
3715			hoverClass: false,
3716			activeClass: false
3717		},
3718		_addActiveClass: function() {
3719			this._super();
3720			if ( this.options.activeClass ) {
3721				this.element.addClass( this.options.activeClass );
3722			}
3723		},
3724		_removeActiveClass: function() {
3725			this._super();
3726			if ( this.options.activeClass ) {
3727				this.element.removeClass( this.options.activeClass );
3728			}
3729		},
3730		_addHoverClass: function() {
3731			this._super();
3732			if ( this.options.hoverClass ) {
3733				this.element.addClass( this.options.hoverClass );
3734			}
3735		},
3736		_removeHoverClass: function() {
3737			this._super();
3738			if ( this.options.hoverClass ) {
3739				this.element.removeClass( this.options.hoverClass );
3740			}
3741		}
3742	} );
3743}
3744
3745var widgetsDroppable = $.ui.droppable;
3746
3747
3748/*!
3749 * jQuery UI Resizable 1.13.2
3750 * http://jqueryui.com
3751 *
3752 * Copyright jQuery Foundation and other contributors
3753 * Released under the MIT license.
3754 * http://jquery.org/license
3755 */
3756
3757//>>label: Resizable
3758//>>group: Interactions
3759//>>description: Enables resize functionality for any element.
3760//>>docs: http://api.jqueryui.com/resizable/
3761//>>demos: http://jqueryui.com/resizable/
3762//>>css.structure: ../../themes/base/core.css
3763//>>css.structure: ../../themes/base/resizable.css
3764//>>css.theme: ../../themes/base/theme.css
3765
3766
3767$.widget( "ui.resizable", $.ui.mouse, {
3768	version: "1.13.2
vendor: 11,739 bytes, lines 3768-4261
3768",
3769	widgetEventPrefix: "resize",
3770	options: {
3771		alsoResize: false,
3772		animate: false,
3773		animateDuration: "slow",
3774		animateEasing: "swing",
3775		aspectRatio: false,
3776		autoHide: false,
3777		classes: {
3778			"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
3779		},
3780		containment: false,
3781		ghost: false,
3782		grid: false,
3783		handles: "e,s,se",
3784		helper: false,
3785		maxHeight: null,
3786		maxWidth: null,
3787		minHeight: 10,
3788		minWidth: 10,
3789
3790		// See #7960
3791		zIndex: 90,
3792
3793		// Callbacks
3794		resize: null,
3795		start: null,
3796		stop: null
3797	},
3798
3799	_num: function( value ) {
3800		return parseFloat( value ) || 0;
3801	},
3802
3803	_isNumber: function( value ) {
3804		return !isNaN( parseFloat( value ) );
3805	},
3806
3807	_hasScroll: function( el, a ) {
3808
3809		if ( $( el ).css( "overflow" ) === "hidden" ) {
3810			return false;
3811		}
3812
3813		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
3814			has = false;
3815
3816		if ( el[ scroll ] > 0 ) {
3817			return true;
3818		}
3819
3820		// TODO: determine which cases actually cause this to happen
3821		// if the element doesn't have the scroll set, see if it's possible to
3822		// set the scroll
3823		try {
3824			el[ scroll ] = 1;
3825			has = ( el[ scroll ] > 0 );
3826			el[ scroll ] = 0;
3827		} catch ( e ) {
3828
3829			// `el` might be a string, then setting `scroll` will throw
3830			// an error in strict mode; ignore it.
3831		}
3832		return has;
3833	},
3834
3835	_create: function() {
3836
3837		var margins,
3838			o = this.options,
3839			that = this;
3840		this._addClass( "ui-resizable" );
3841
3842		$.extend( this, {
3843			_aspectRatio: !!( o.aspectRatio ),
3844			aspectRatio: o.aspectRatio,
3845			originalElement: this.element,
3846			_proportionallyResizeElements: [],
3847			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
3848		} );
3849
3850		// Wrap the element if it cannot hold child nodes
3851		if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
3852
3853			this.element.wrap(
3854				$( "<div class='ui-wrapper'></div>" ).css( {
3855					overflow: "hidden",
3856					position: this.element.css( "position" ),
3857					width: this.element.outerWidth(),
3858					height: this.element.outerHeight(),
3859					top: this.element.css( "top" ),
3860					left: this.element.css( "left" )
3861				} )
3862			);
3863
3864			this.element = this.element.parent().data(
3865				"ui-resizable", this.element.resizable( "instance" )
3866			);
3867
3868			this.elementIsWrapper = true;
3869
3870			margins = {
3871				marginTop: this.originalElement.css( "marginTop" ),
3872				marginRight: this.originalElement.css( "marginRight" ),
3873				marginBottom: this.originalElement.css( "marginBottom" ),
3874				marginLeft: this.originalElement.css( "marginLeft" )
3875			};
3876
3877			this.element.css( margins );
3878			this.originalElement.css( "margin", 0 );
3879
3880			// support: Safari
3881			// Prevent Safari textarea resize
3882			this.originalResizeStyle = this.originalElement.css( "resize" );
3883			this.originalElement.css( "resize", "none" );
3884
3885			this._proportionallyResizeElements.push( this.originalElement.css( {
3886				position: "static",
3887				zoom: 1,
3888				display: "block"
3889			} ) );
3890
3891			// Support: IE9
3892			// avoid IE jump (hard set the margin)
3893			this.originalElement.css( margins );
3894
3895			this._proportionallyResize();
3896		}
3897
3898		this._setupHandles();
3899
3900		if ( o.autoHide ) {
3901			$( this.element )
3902				.on( "mouseenter", function() {
3903					if ( o.disabled ) {
3904						return;
3905					}
3906					that._removeClass( "ui-resizable-autohide" );
3907					that._handles.show();
3908				} )
3909				.on( "mouseleave", function() {
3910					if ( o.disabled ) {
3911						return;
3912					}
3913					if ( !that.resizing ) {
3914						that._addClass( "ui-resizable-autohide" );
3915						that._handles.hide();
3916					}
3917				} );
3918		}
3919
3920		this._mouseInit();
3921	},
3922
3923	_destroy: function() {
3924
3925		this._mouseDestroy();
3926		this._addedHandles.remove();
3927
3928		var wrapper,
3929			_destroy = function( exp ) {
3930				$( exp )
3931					.removeData( "resizable" )
3932					.removeData( "ui-resizable" )
3933					.off( ".resizable" );
3934			};
3935
3936		// TODO: Unwrap at same DOM position
3937		if ( this.elementIsWrapper ) {
3938			_destroy( this.element );
3939			wrapper = this.element;
3940			this.originalElement.css( {
3941				position: wrapper.css( "position" ),
3942				width: wrapper.outerWidth(),
3943				height: wrapper.outerHeight(),
3944				top: wrapper.css( "top" ),
3945				left: wrapper.css( "left" )
3946			} ).insertAfter( wrapper );
3947			wrapper.remove();
3948		}
3949
3950		this.originalElement.css( "resize", this.originalResizeStyle );
3951		_destroy( this.originalElement );
3952
3953		return this;
3954	},
3955
3956	_setOption: function( key, value ) {
3957		this._super( key, value );
3958
3959		switch ( key ) {
3960		case "handles":
3961			this._removeHandles();
3962			this._setupHandles();
3963			break;
3964		case "aspectRatio":
3965			this._aspectRatio = !!value;
3966			break;
3967		default:
3968			break;
3969		}
3970	},
3971
3972	_setupHandles: function() {
3973		var o = this.options, handle, i, n, hname, axis, that = this;
3974		this.handles = o.handles ||
3975			( !$( ".ui-resizable-handle", this.element ).length ?
3976				"e,s,se" : {
3977					n: ".ui-resizable-n",
3978					e: ".ui-resizable-e",
3979					s: ".ui-resizable-s",
3980					w: ".ui-resizable-w",
3981					se: ".ui-resizable-se",
3982					sw: ".ui-resizable-sw",
3983					ne: ".ui-resizable-ne",
3984					nw: ".ui-resizable-nw"
3985				} );
3986
3987		this._handles = $();
3988		this._addedHandles = $();
3989		if ( this.handles.constructor === String ) {
3990
3991			if ( this.handles === "all" ) {
3992				this.handles = "n,e,s,w,se,sw,ne,nw";
3993			}
3994
3995			n = this.handles.split( "," );
3996			this.handles = {};
3997
3998			for ( i = 0; i < n.length; i++ ) {
3999
4000				handle = String.prototype.trim.call( n[ i ] );
4001				hname = "ui-resizable-" + handle;
4002				axis = $( "<div>" );
4003				this._addClass( axis, "ui-resizable-handle " + hname );
4004
4005				axis.css( { zIndex: o.zIndex } );
4006
4007				this.handles[ handle ] = ".ui-resizable-" + handle;
4008				if ( !this.element.children( this.handles[ handle ] ).length ) {
4009					this.element.append( axis );
4010					this._addedHandles = this._addedHandles.add( axis );
4011				}
4012			}
4013
4014		}
4015
4016		this._renderAxis = function( target ) {
4017
4018			var i, axis, padPos, padWrapper;
4019
4020			target = target || this.element;
4021
4022			for ( i in this.handles ) {
4023
4024				if ( this.handles[ i ].constructor === String ) {
4025					this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
4026				} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
4027					this.handles[ i ] = $( this.handles[ i ] );
4028					this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
4029				}
4030
4031				if ( this.elementIsWrapper &&
4032						this.originalElement[ 0 ]
4033							.nodeName
4034							.match( /^(textarea|input|select|button)$/i ) ) {
4035					axis = $( this.handles[ i ], this.element );
4036
4037					padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
4038						axis.outerHeight() :
4039						axis.outerWidth();
4040
4041					padPos = [ "padding",
4042						/ne|nw|n/.test( i ) ? "Top" :
4043						/se|sw|s/.test( i ) ? "Bottom" :
4044						/^e$/.test( i ) ? "Right" : "Left" ].join( "" );
4045
4046					target.css( padPos, padWrapper );
4047
4048					this._proportionallyResize();
4049				}
4050
4051				this._handles = this._handles.add( this.handles[ i ] );
4052			}
4053		};
4054
4055		// TODO: make renderAxis a prototype function
4056		this._renderAxis( this.element );
4057
4058		this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
4059		this._handles.disableSelection();
4060
4061		this._handles.on( "mouseover", function() {
4062			if ( !that.resizing ) {
4063				if ( this.className ) {
4064					axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
4065				}
4066				that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
4067			}
4068		} );
4069
4070		if ( o.autoHide ) {
4071			this._handles.hide();
4072			this._addClass( "ui-resizable-autohide" );
4073		}
4074	},
4075
4076	_removeHandles: function() {
4077		this._addedHandles.remove();
4078	},
4079
4080	_mouseCapture: function( event ) {
4081		var i, handle,
4082			capture = false;
4083
4084		for ( i in this.handles ) {
4085			handle = $( this.handles[ i ] )[ 0 ];
4086			if ( handle === event.target || $.contains( handle, event.target ) ) {
4087				capture = true;
4088			}
4089		}
4090
4091		return !this.options.disabled && capture;
4092	},
4093
4094	_mouseStart: function( event ) {
4095
4096		var curleft, curtop, cursor,
4097			o = this.options,
4098			el = this.element;
4099
4100		this.resizing = true;
4101
4102		this._renderProxy();
4103
4104		curleft = this._num( this.helper.css( "left" ) );
4105		curtop = this._num( this.helper.css( "top" ) );
4106
4107		if ( o.containment ) {
4108			curleft += $( o.containment ).scrollLeft() || 0;
4109			curtop += $( o.containment ).scrollTop() || 0;
4110		}
4111
4112		this.offset = this.helper.offset();
4113		this.position = { left: curleft, top: curtop };
4114
4115		this.size = this._helper ? {
4116				width: this.helper.width(),
4117				height: this.helper.height()
4118			} : {
4119				width: el.width(),
4120				height: el.height()
4121			};
4122
4123		this.originalSize = this._helper ? {
4124				width: el.outerWidth(),
4125				height: el.outerHeight()
4126			} : {
4127				width: el.width(),
4128				height: el.height()
4129			};
4130
4131		this.sizeDiff = {
4132			width: el.outerWidth() - el.width(),
4133			height: el.outerHeight() - el.height()
4134		};
4135
4136		this.originalPosition = { left: curleft, top: curtop };
4137		this.originalMousePosition = { left: event.pageX, top: event.pageY };
4138
4139		this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
4140			o.aspectRatio :
4141			( ( this.originalSize.width / this.originalSize.height ) || 1 );
4142
4143		cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
4144		$( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );
4145
4146		this._addClass( "ui-resizable-resizing" );
4147		this._propagate( "start", event );
4148		return true;
4149	},
4150
4151	_mouseDrag: function( event ) {
4152
4153		var data, props,
4154			smp = this.originalMousePosition,
4155			a = this.axis,
4156			dx = ( event.pageX - smp.left ) || 0,
4157			dy = ( event.pageY - smp.top ) || 0,
4158			trigger = this._change[ a ];
4159
4160		this._updatePrevProperties();
4161
4162		if ( !trigger ) {
4163			return false;
4164		}
4165
4166		data = trigger.apply( this, [ event, dx, dy ] );
4167
4168		this._updateVirtualBoundaries( event.shiftKey );
4169		if ( this._aspectRatio || event.shiftKey ) {
4170			data = this._updateRatio( data, event );
4171		}
4172
4173		data = this._respectSize( data, event );
4174
4175		this._updateCache( data );
4176
4177		this._propagate( "resize", event );
4178
4179		props = this._applyChanges();
4180
4181		if ( !this._helper && this._proportionallyResizeElements.length ) {
4182			this._proportionallyResize();
4183		}
4184
4185		if ( !$.isEmptyObject( props ) ) {
4186			this._updatePrevProperties();
4187			this._trigger( "resize", event, this.ui() );
4188			this._applyChanges();
4189		}
4190
4191		return false;
4192	},
4193
4194	_mouseStop: function( event ) {
4195
4196		this.resizing = false;
4197		var pr, ista, soffseth, soffsetw, s, left, top,
4198			o = this.options, that = this;
4199
4200		if ( this._helper ) {
4201
4202			pr = this._proportionallyResizeElements;
4203			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
4204			soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
4205			soffsetw = ista ? 0 : that.sizeDiff.width;
4206
4207			s = {
4208				width: ( that.helper.width()  - soffsetw ),
4209				height: ( that.helper.height() - soffseth )
4210			};
4211			left = ( parseFloat( that.element.css( "left" ) ) +
4212				( that.position.left - that.originalPosition.left ) ) || null;
4213			top = ( parseFloat( that.element.css( "top" ) ) +
4214				( that.position.top - that.originalPosition.top ) ) || null;
4215
4216			if ( !o.animate ) {
4217				this.element.css( $.extend( s, { top: top, left: left } ) );
4218			}
4219
4220			that.helper.height( that.size.height );
4221			that.helper.width( that.size.width );
4222
4223			if ( this._helper && !o.animate ) {
4224				this._proportionallyResize();
4225			}
4226		}
4227
4228		$( "body" ).css( "cursor", "auto" );
4229
4230		this._removeClass( "ui-resizable-resizing" );
4231
4232		this._propagate( "stop", event );
4233
4234		if ( this._helper ) {
4235			this.helper.remove();
4236		}
4237
4238		return false;
4239
4240	},
4241
4242	_updatePrevProperties: function() {
4243		this.prevPosition = {
4244			top: this.position.top,
4245			left: this.position.left
4246		};
4247		this.prevSize = {
4248			width: this.size.width,
4249			height: this.size.height
4250		};
4251	},
4252
4253	_applyChanges: function() {
4254		var props = {};
4255
4256		if ( this.position.top !== this.prevPosition.top ) {
4257			props.top = this.position.top + "px";
4258		}
4259		if ( this.position.left !== this.prevPosition.left ) {
4260			props.left = this.position.left + "px";
4261		}
vendor: 9,533 bytes, lines 4262-4629
4262		if ( this.size.width !== this.prevSize.width ) {
4263			props.width = this.size.width + "px";
4264		}
4265		if ( this.size.height !== this.prevSize.height ) {
4266			props.height = this.size.height + "px";
4267		}
4268
4269		this.helper.css( props );
4270
4271		return props;
4272	},
4273
4274	_updateVirtualBoundaries: function( forceAspectRatio ) {
4275		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
4276			o = this.options;
4277
4278		b = {
4279			minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
4280			maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
4281			minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
4282			maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
4283		};
4284
4285		if ( this._aspectRatio || forceAspectRatio ) {
4286			pMinWidth = b.minHeight * this.aspectRatio;
4287			pMinHeight = b.minWidth / this.aspectRatio;
4288			pMaxWidth = b.maxHeight * this.aspectRatio;
4289			pMaxHeight = b.maxWidth / this.aspectRatio;
4290
4291			if ( pMinWidth > b.minWidth ) {
4292				b.minWidth = pMinWidth;
4293			}
4294			if ( pMinHeight > b.minHeight ) {
4295				b.minHeight = pMinHeight;
4296			}
4297			if ( pMaxWidth < b.maxWidth ) {
4298				b.maxWidth = pMaxWidth;
4299			}
4300			if ( pMaxHeight < b.maxHeight ) {
4301				b.maxHeight = pMaxHeight;
4302			}
4303		}
4304		this._vBoundaries = b;
4305	},
4306
4307	_updateCache: function( data ) {
4308		this.offset = this.helper.offset();
4309		if ( this._isNumber( data.left ) ) {
4310			this.position.left = data.left;
4311		}
4312		if ( this._isNumber( data.top ) ) {
4313			this.position.top = data.top;
4314		}
4315		if ( this._isNumber( data.height ) ) {
4316			this.size.height = data.height;
4317		}
4318		if ( this._isNumber( data.width ) ) {
4319			this.size.width = data.width;
4320		}
4321	},
4322
4323	_updateRatio: function( data ) {
4324
4325		var cpos = this.position,
4326			csize = this.size,
4327			a = this.axis;
4328
4329		if ( this._isNumber( data.height ) ) {
4330			data.width = ( data.height * this.aspectRatio );
4331		} else if ( this._isNumber( data.width ) ) {
4332			data.height = ( data.width / this.aspectRatio );
4333		}
4334
4335		if ( a === "sw" ) {
4336			data.left = cpos.left + ( csize.width - data.width );
4337			data.top = null;
4338		}
4339		if ( a === "nw" ) {
4340			data.top = cpos.top + ( csize.height - data.height );
4341			data.left = cpos.left + ( csize.width - data.width );
4342		}
4343
4344		return data;
4345	},
4346
4347	_respectSize: function( data ) {
4348
4349		var o = this._vBoundaries,
4350			a = this.axis,
4351			ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
4352			ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
4353			isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
4354			isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
4355			dw = this.originalPosition.left + this.originalSize.width,
4356			dh = this.originalPosition.top + this.originalSize.height,
4357			cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
4358		if ( isminw ) {
4359			data.width = o.minWidth;
4360		}
4361		if ( isminh ) {
4362			data.height = o.minHeight;
4363		}
4364		if ( ismaxw ) {
4365			data.width = o.maxWidth;
4366		}
4367		if ( ismaxh ) {
4368			data.height = o.maxHeight;
4369		}
4370
4371		if ( isminw && cw ) {
4372			data.left = dw - o.minWidth;
4373		}
4374		if ( ismaxw && cw ) {
4375			data.left = dw - o.maxWidth;
4376		}
4377		if ( isminh && ch ) {
4378			data.top = dh - o.minHeight;
4379		}
4380		if ( ismaxh && ch ) {
4381			data.top = dh - o.maxHeight;
4382		}
4383
4384		// Fixing jump error on top/left - bug #2330
4385		if ( !data.width && !data.height && !data.left && data.top ) {
4386			data.top = null;
4387		} else if ( !data.width && !data.height && !data.top && data.left ) {
4388			data.left = null;
4389		}
4390
4391		return data;
4392	},
4393
4394	_getPaddingPlusBorderDimensions: function( element ) {
4395		var i = 0,
4396			widths = [],
4397			borders = [
4398				element.css( "borderTopWidth" ),
4399				element.css( "borderRightWidth" ),
4400				element.css( "borderBottomWidth" ),
4401				element.css( "borderLeftWidth" )
4402			],
4403			paddings = [
4404				element.css( "paddingTop" ),
4405				element.css( "paddingRight" ),
4406				element.css( "paddingBottom" ),
4407				element.css( "paddingLeft" )
4408			];
4409
4410		for ( ; i < 4; i++ ) {
4411			widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
4412			widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
4413		}
4414
4415		return {
4416			height: widths[ 0 ] + widths[ 2 ],
4417			width: widths[ 1 ] + widths[ 3 ]
4418		};
4419	},
4420
4421	_proportionallyResize: function() {
4422
4423		if ( !this._proportionallyResizeElements.length ) {
4424			return;
4425		}
4426
4427		var prel,
4428			i = 0,
4429			element = this.helper || this.element;
4430
4431		for ( ; i < this._proportionallyResizeElements.length; i++ ) {
4432
4433			prel = this._proportionallyResizeElements[ i ];
4434
4435			// TODO: Seems like a bug to cache this.outerDimensions
4436			// considering that we are in a loop.
4437			if ( !this.outerDimensions ) {
4438				this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
4439			}
4440
4441			prel.css( {
4442				height: ( element.height() - this.outerDimensions.height ) || 0,
4443				width: ( element.width() - this.outerDimensions.width ) || 0
4444			} );
4445
4446		}
4447
4448	},
4449
4450	_renderProxy: function() {
4451
4452		var el = this.element, o = this.options;
4453		this.elementOffset = el.offset();
4454
4455		if ( this._helper ) {
4456
4457			this.helper = this.helper || $( "<div></div>" ).css( { overflow: "hidden" } );
4458
4459			this._addClass( this.helper, this._helper );
4460			this.helper.css( {
4461				width: this.element.outerWidth(),
4462				height: this.element.outerHeight(),
4463				position: "absolute",
4464				left: this.elementOffset.left + "px",
4465				top: this.elementOffset.top + "px",
4466				zIndex: ++o.zIndex //TODO: Don't modify option
4467			} );
4468
4469			this.helper
4470				.appendTo( "body" )
4471				.disableSelection();
4472
4473		} else {
4474			this.helper = this.element;
4475		}
4476
4477	},
4478
4479	_change: {
4480		e: function( event, dx ) {
4481			return { width: this.originalSize.width + dx };
4482		},
4483		w: function( event, dx ) {
4484			var cs = this.originalSize, sp = this.originalPosition;
4485			return { left: sp.left + dx, width: cs.width - dx };
4486		},
4487		n: function( event, dx, dy ) {
4488			var cs = this.originalSize, sp = this.originalPosition;
4489			return { top: sp.top + dy, height: cs.height - dy };
4490		},
4491		s: function( event, dx, dy ) {
4492			return { height: this.originalSize.height + dy };
4493		},
4494		se: function( event, dx, dy ) {
4495			return $.extend( this._change.s.apply( this, arguments ),
4496				this._change.e.apply( this, [ event, dx, dy ] ) );
4497		},
4498		sw: function( event, dx, dy ) {
4499			return $.extend( this._change.s.apply( this, arguments ),
4500				this._change.w.apply( this, [ event, dx, dy ] ) );
4501		},
4502		ne: function( event, dx, dy ) {
4503			return $.extend( this._change.n.apply( this, arguments ),
4504				this._change.e.apply( this, [ event, dx, dy ] ) );
4505		},
4506		nw: function( event, dx, dy ) {
4507			return $.extend( this._change.n.apply( this, arguments ),
4508				this._change.w.apply( this, [ event, dx, dy ] ) );
4509		}
4510	},
4511
4512	_propagate: function( n, event ) {
4513		$.ui.plugin.call( this, n, [ event, this.ui() ] );
4514		if ( n !== "resize" ) {
4515			this._trigger( n, event, this.ui() );
4516		}
4517	},
4518
4519	plugins: {},
4520
4521	ui: function() {
4522		return {
4523			originalElement: this.originalElement,
4524			element: this.element,
4525			helper: this.helper,
4526			position: this.position,
4527			size: this.size,
4528			originalSize: this.originalSize,
4529			originalPosition: this.originalPosition
4530		};
4531	}
4532
4533} );
4534
4535/*
4536 * Resizable Extensions
4537 */
4538
4539$.ui.plugin.add( "resizable", "animate", {
4540
4541	stop: function( event ) {
4542		var that = $( this ).resizable( "instance" ),
4543			o = that.options,
4544			pr = that._proportionallyResizeElements,
4545			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
4546			soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
4547			soffsetw = ista ? 0 : that.sizeDiff.width,
4548			style = {
4549				width: ( that.size.width - soffsetw ),
4550				height: ( that.size.height - soffseth )
4551			},
4552			left = ( parseFloat( that.element.css( "left" ) ) +
4553				( that.position.left - that.originalPosition.left ) ) || null,
4554			top = ( parseFloat( that.element.css( "top" ) ) +
4555				( that.position.top - that.originalPosition.top ) ) || null;
4556
4557		that.element.animate(
4558			$.extend( style, top && left ? { top: top, left: left } : {} ), {
4559				duration: o.animateDuration,
4560				easing: o.animateEasing,
4561				step: function() {
4562
4563					var data = {
4564						width: parseFloat( that.element.css( "width" ) ),
4565						height: parseFloat( that.element.css( "height" ) ),
4566						top: parseFloat( that.element.css( "top" ) ),
4567						left: parseFloat( that.element.css( "left" ) )
4568					};
4569
4570					if ( pr && pr.length ) {
4571						$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
4572					}
4573
4574					// Propagating resize, and updating values for each animation step
4575					that._updateCache( data );
4576					that._propagate( "resize", event );
4577
4578				}
4579			}
4580		);
4581	}
4582
4583} );
4584
4585$.ui.plugin.add( "resizable", "containment", {
4586
4587	start: function() {
4588		var element, p, co, ch, cw, width, height,
4589			that = $( this ).resizable( "instance" ),
4590			o = that.options,
4591			el = that.element,
4592			oc = o.containment,
4593			ce = ( oc instanceof $ ) ?
4594				oc.get( 0 ) :
4595				( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
4596
4597		if ( !ce ) {
4598			return;
4599		}
4600
4601		that.containerElement = $( ce );
4602
4603		if ( /document/.test( oc ) || oc === document ) {
4604			that.containerOffset = {
4605				left: 0,
4606				top: 0
4607			};
4608			that.containerPosition = {
4609				left: 0,
4610				top: 0
4611			};
4612
4613			that.parentData = {
4614				element: $( document ),
4615				left: 0,
4616				top: 0,
4617				width: $( document ).width(),
4618				height: $( document ).height() || document.body.parentNode.scrollHeight
4619			};
4620		} else {
4621			element = $( ce );
4622			p = [];
4623			$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
4624				p[ i ] = that._num( element.css( "padding" + name ) );
4625			} );
4626
4627			that.containerOffset = element.offset();
4628			that.containerPosition = element.position();
4629			that.containerSize = {
vendor: 5,871 bytes, lines 4630-4854
4630				height: ( element.innerHeight() - p[ 3 ] ),
4631				width: ( element.innerWidth() - p[ 1 ] )
4632			};
4633
4634			co = that.containerOffset;
4635			ch = that.containerSize.height;
4636			cw = that.containerSize.width;
4637			width = ( that._hasScroll( ce, "left" ) ? ce.scrollWidth : cw );
4638			height = ( that._hasScroll( ce ) ? ce.scrollHeight : ch );
4639
4640			that.parentData = {
4641				element: ce,
4642				left: co.left,
4643				top: co.top,
4644				width: width,
4645				height: height
4646			};
4647		}
4648	},
4649
4650	resize: function( event ) {
4651		var woset, hoset, isParent, isOffsetRelative,
4652			that = $( this ).resizable( "instance" ),
4653			o = that.options,
4654			co = that.containerOffset,
4655			cp = that.position,
4656			pRatio = that._aspectRatio || event.shiftKey,
4657			cop = {
4658				top: 0,
4659				left: 0
4660			},
4661			ce = that.containerElement,
4662			continueResize = true;
4663
4664		if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
4665			cop = co;
4666		}
4667
4668		if ( cp.left < ( that._helper ? co.left : 0 ) ) {
4669			that.size.width = that.size.width +
4670				( that._helper ?
4671					( that.position.left - co.left ) :
4672					( that.position.left - cop.left ) );
4673
4674			if ( pRatio ) {
4675				that.size.height = that.size.width / that.aspectRatio;
4676				continueResize = false;
4677			}
4678			that.position.left = o.helper ? co.left : 0;
4679		}
4680
4681		if ( cp.top < ( that._helper ? co.top : 0 ) ) {
4682			that.size.height = that.size.height +
4683				( that._helper ?
4684					( that.position.top - co.top ) :
4685					that.position.top );
4686
4687			if ( pRatio ) {
4688				that.size.width = that.size.height * that.aspectRatio;
4689				continueResize = false;
4690			}
4691			that.position.top = that._helper ? co.top : 0;
4692		}
4693
4694		isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
4695		isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
4696
4697		if ( isParent && isOffsetRelative ) {
4698			that.offset.left = that.parentData.left + that.position.left;
4699			that.offset.top = that.parentData.top + that.position.top;
4700		} else {
4701			that.offset.left = that.element.offset().left;
4702			that.offset.top = that.element.offset().top;
4703		}
4704
4705		woset = Math.abs( that.sizeDiff.width +
4706			( that._helper ?
4707				that.offset.left - cop.left :
4708				( that.offset.left - co.left ) ) );
4709
4710		hoset = Math.abs( that.sizeDiff.height +
4711			( that._helper ?
4712				that.offset.top - cop.top :
4713				( that.offset.top - co.top ) ) );
4714
4715		if ( woset + that.size.width >= that.parentData.width ) {
4716			that.size.width = that.parentData.width - woset;
4717			if ( pRatio ) {
4718				that.size.height = that.size.width / that.aspectRatio;
4719				continueResize = false;
4720			}
4721		}
4722
4723		if ( hoset + that.size.height >= that.parentData.height ) {
4724			that.size.height = that.parentData.height - hoset;
4725			if ( pRatio ) {
4726				that.size.width = that.size.height * that.aspectRatio;
4727				continueResize = false;
4728			}
4729		}
4730
4731		if ( !continueResize ) {
4732			that.position.left = that.prevPosition.left;
4733			that.position.top = that.prevPosition.top;
4734			that.size.width = that.prevSize.width;
4735			that.size.height = that.prevSize.height;
4736		}
4737	},
4738
4739	stop: function() {
4740		var that = $( this ).resizable( "instance" ),
4741			o = that.options,
4742			co = that.containerOffset,
4743			cop = that.containerPosition,
4744			ce = that.containerElement,
4745			helper = $( that.helper ),
4746			ho = helper.offset(),
4747			w = helper.outerWidth() - that.sizeDiff.width,
4748			h = helper.outerHeight() - that.sizeDiff.height;
4749
4750		if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
4751			$( this ).css( {
4752				left: ho.left - cop.left - co.left,
4753				width: w,
4754				height: h
4755			} );
4756		}
4757
4758		if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
4759			$( this ).css( {
4760				left: ho.left - cop.left - co.left,
4761				width: w,
4762				height: h
4763			} );
4764		}
4765	}
4766} );
4767
4768$.ui.plugin.add( "resizable", "alsoResize", {
4769
4770	start: function() {
4771		var that = $( this ).resizable( "instance" ),
4772			o = that.options;
4773
4774		$( o.alsoResize ).each( function() {
4775			var el = $( this );
4776			el.data( "ui-resizable-alsoresize", {
4777				width: parseFloat( el.width() ), height: parseFloat( el.height() ),
4778				left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
4779			} );
4780		} );
4781	},
4782
4783	resize: function( event, ui ) {
4784		var that = $( this ).resizable( "instance" ),
4785			o = that.options,
4786			os = that.originalSize,
4787			op = that.originalPosition,
4788			delta = {
4789				height: ( that.size.height - os.height ) || 0,
4790				width: ( that.size.width - os.width ) || 0,
4791				top: ( that.position.top - op.top ) || 0,
4792				left: ( that.position.left - op.left ) || 0
4793			};
4794
4795			$( o.alsoResize ).each( function() {
4796				var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
4797					css = el.parents( ui.originalElement[ 0 ] ).length ?
4798							[ "width", "height" ] :
4799							[ "width", "height", "top", "left" ];
4800
4801				$.each( css, function( i, prop ) {
4802					var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
4803					if ( sum && sum >= 0 ) {
4804						style[ prop ] = sum || null;
4805					}
4806				} );
4807
4808				el.css( style );
4809			} );
4810	},
4811
4812	stop: function() {
4813		$( this ).removeData( "ui-resizable-alsoresize" );
4814	}
4815} );
4816
4817$.ui.plugin.add( "resizable", "ghost", {
4818
4819	start: function() {
4820
4821		var that = $( this ).resizable( "instance" ), cs = that.size;
4822
4823		that.ghost = that.originalElement.clone();
4824		that.ghost.css( {
4825			opacity: 0.25,
4826			display: "block",
4827			position: "relative",
4828			height: cs.height,
4829			width: cs.width,
4830			margin: 0,
4831			left: 0,
4832			top: 0
4833		} );
4834
4835		that._addClass( that.ghost, "ui-resizable-ghost" );
4836
4837		// DEPRECATED
4838		// TODO: remove after 1.12
4839		if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {
4840
4841			// Ghost option
4842			that.ghost.addClass( this.options.ghost );
4843		}
4844
4845		that.ghost.appendTo( that.helper );
4846
4847	},
4848
4849	resize: function() {
4850		var that = $( this ).resizable( "instance" );
4851		if ( that.ghost ) {
4852			that.ghost.css( {
4853				position: "relative",
4854				height: that.size.height,
vendor: 10,664 bytes, lines 4855-5262
4855				width: that.size.width
4856			} );
4857		}
4858	},
4859
4860	stop: function() {
4861		var that = $( this ).resizable( "instance" );
4862		if ( that.ghost && that.helper ) {
4863			that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
4864		}
4865	}
4866
4867} );
4868
4869$.ui.plugin.add( "resizable", "grid", {
4870
4871	resize: function() {
4872		var outerDimensions,
4873			that = $( this ).resizable( "instance" ),
4874			o = that.options,
4875			cs = that.size,
4876			os = that.originalSize,
4877			op = that.originalPosition,
4878			a = that.axis,
4879			grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
4880			gridX = ( grid[ 0 ] || 1 ),
4881			gridY = ( grid[ 1 ] || 1 ),
4882			ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
4883			oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
4884			newWidth = os.width + ox,
4885			newHeight = os.height + oy,
4886			isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
4887			isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
4888			isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
4889			isMinHeight = o.minHeight && ( o.minHeight > newHeight );
4890
4891		o.grid = grid;
4892
4893		if ( isMinWidth ) {
4894			newWidth += gridX;
4895		}
4896		if ( isMinHeight ) {
4897			newHeight += gridY;
4898		}
4899		if ( isMaxWidth ) {
4900			newWidth -= gridX;
4901		}
4902		if ( isMaxHeight ) {
4903			newHeight -= gridY;
4904		}
4905
4906		if ( /^(se|s|e)$/.test( a ) ) {
4907			that.size.width = newWidth;
4908			that.size.height = newHeight;
4909		} else if ( /^(ne)$/.test( a ) ) {
4910			that.size.width = newWidth;
4911			that.size.height = newHeight;
4912			that.position.top = op.top - oy;
4913		} else if ( /^(sw)$/.test( a ) ) {
4914			that.size.width = newWidth;
4915			that.size.height = newHeight;
4916			that.position.left = op.left - ox;
4917		} else {
4918			if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
4919				outerDimensions = that._getPaddingPlusBorderDimensions( this );
4920			}
4921
4922			if ( newHeight - gridY > 0 ) {
4923				that.size.height = newHeight;
4924				that.position.top = op.top - oy;
4925			} else {
4926				newHeight = gridY - outerDimensions.height;
4927				that.size.height = newHeight;
4928				that.position.top = op.top + os.height - newHeight;
4929			}
4930			if ( newWidth - gridX > 0 ) {
4931				that.size.width = newWidth;
4932				that.position.left = op.left - ox;
4933			} else {
4934				newWidth = gridX - outerDimensions.width;
4935				that.size.width = newWidth;
4936				that.position.left = op.left + os.width - newWidth;
4937			}
4938		}
4939	}
4940
4941} );
4942
4943var widgetsResizable = $.ui.resizable;
4944
4945
4946/*!
4947 * jQuery UI Selectable 1.13.2
4948 * http://jqueryui.com
4949 *
4950 * Copyright jQuery Foundation and other contributors
4951 * Released under the MIT license.
4952 * http://jquery.org/license
4953 */
4954
4955//>>label: Selectable
4956//>>group: Interactions
4957//>>description: Allows groups of elements to be selected with the mouse.
4958//>>docs: http://api.jqueryui.com/selectable/
4959//>>demos: http://jqueryui.com/selectable/
4960//>>css.structure: ../../themes/base/selectable.css
4961
4962
4963var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
4964	version: "1.13.2",
4965	options: {
4966		appendTo: "body",
4967		autoRefresh: true,
4968		distance: 0,
4969		filter: "*",
4970		tolerance: "touch",
4971
4972		// Callbacks
4973		selected: null,
4974		selecting: null,
4975		start: null,
4976		stop: null,
4977		unselected: null,
4978		unselecting: null
4979	},
4980	_create: function() {
4981		var that = this;
4982
4983		this._addClass( "ui-selectable" );
4984
4985		this.dragged = false;
4986
4987		// Cache selectee children based on filter
4988		this.refresh = function() {
4989			that.elementPos = $( that.element[ 0 ] ).offset();
4990			that.selectees = $( that.options.filter, that.element[ 0 ] );
4991			that._addClass( that.selectees, "ui-selectee" );
4992			that.selectees.each( function() {
4993				var $this = $( this ),
4994					selecteeOffset = $this.offset(),
4995					pos = {
4996						left: selecteeOffset.left - that.elementPos.left,
4997						top: selecteeOffset.top - that.elementPos.top
4998					};
4999				$.data( this, "selectable-item", {
5000					element: this,
5001					$element: $this,
5002					left: pos.left,
5003					top: pos.top,
5004					right: pos.left + $this.outerWidth(),
5005					bottom: pos.top + $this.outerHeight(),
5006					startselected: false,
5007					selected: $this.hasClass( "ui-selected" ),
5008					selecting: $this.hasClass( "ui-selecting" ),
5009					unselecting: $this.hasClass( "ui-unselecting" )
5010				} );
5011			} );
5012		};
5013		this.refresh();
5014
5015		this._mouseInit();
5016
5017		this.helper = $( "<div>" );
5018		this._addClass( this.helper, "ui-selectable-helper" );
5019	},
5020
5021	_destroy: function() {
5022		this.selectees.removeData( "selectable-item" );
5023		this._mouseDestroy();
5024	},
5025
5026	_mouseStart: function( event ) {
5027		var that = this,
5028			options = this.options;
5029
5030		this.opos = [ event.pageX, event.pageY ];
5031		this.elementPos = $( this.element[ 0 ] ).offset();
5032
5033		if ( this.options.disabled ) {
5034			return;
5035		}
5036
5037		this.selectees = $( options.filter, this.element[ 0 ] );
5038
5039		this._trigger( "start", event );
5040
5041		$( options.appendTo ).append( this.helper );
5042
5043		// position helper (lasso)
5044		this.helper.css( {
5045			"left": event.pageX,
5046			"top": event.pageY,
5047			"width": 0,
5048			"height": 0
5049		} );
5050
5051		if ( options.autoRefresh ) {
5052			this.refresh();
5053		}
5054
5055		this.selectees.filter( ".ui-selected" ).each( function() {
5056			var selectee = $.data( this, "selectable-item" );
5057			selectee.startselected = true;
5058			if ( !event.metaKey && !event.ctrlKey ) {
5059				that._removeClass( selectee.$element, "ui-selected" );
5060				selectee.selected = false;
5061				that._addClass( selectee.$element, "ui-unselecting" );
5062				selectee.unselecting = true;
5063
5064				// selectable UNSELECTING callback
5065				that._trigger( "unselecting", event, {
5066					unselecting: selectee.element
5067				} );
5068			}
5069		} );
5070
5071		$( event.target ).parents().addBack().each( function() {
5072			var doSelect,
5073				selectee = $.data( this, "selectable-item" );
5074			if ( selectee ) {
5075				doSelect = ( !event.metaKey && !event.ctrlKey ) ||
5076					!selectee.$element.hasClass( "ui-selected" );
5077				that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
5078					._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
5079				selectee.unselecting = !doSelect;
5080				selectee.selecting = doSelect;
5081				selectee.selected = doSelect;
5082
5083				// selectable (UN)SELECTING callback
5084				if ( doSelect ) {
5085					that._trigger( "selecting", event, {
5086						selecting: selectee.element
5087					} );
5088				} else {
5089					that._trigger( "unselecting", event, {
5090						unselecting: selectee.element
5091					} );
5092				}
5093				return false;
5094			}
5095		} );
5096
5097	},
5098
5099	_mouseDrag: function( event ) {
5100
5101		this.dragged = true;
5102
5103		if ( this.options.disabled ) {
5104			return;
5105		}
5106
5107		var tmp,
5108			that = this,
5109			options = this.options,
5110			x1 = this.opos[ 0 ],
5111			y1 = this.opos[ 1 ],
5112			x2 = event.pageX,
5113			y2 = event.pageY;
5114
5115		if ( x1 > x2 ) {
5116			tmp = x2; x2 = x1; x1 = tmp;
5117		}
5118		if ( y1 > y2 ) {
5119			tmp = y2; y2 = y1; y1 = tmp;
5120		}
5121		this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
5122
5123		this.selectees.each( function() {
5124			var selectee = $.data( this, "selectable-item" ),
5125				hit = false,
5126				offset = {};
5127
5128			//prevent helper from being selected if appendTo: selectable
5129			if ( !selectee || selectee.element === that.element[ 0 ] ) {
5130				return;
5131			}
5132
5133			offset.left   = selectee.left   + that.elementPos.left;
5134			offset.right  = selectee.right  + that.elementPos.left;
5135			offset.top    = selectee.top    + that.elementPos.top;
5136			offset.bottom = selectee.bottom + that.elementPos.top;
5137
5138			if ( options.tolerance === "touch" ) {
5139				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
5140                    offset.bottom < y1 ) );
5141			} else if ( options.tolerance === "fit" ) {
5142				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
5143                    offset.bottom < y2 );
5144			}
5145
5146			if ( hit ) {
5147
5148				// SELECT
5149				if ( selectee.selected ) {
5150					that._removeClass( selectee.$element, "ui-selected" );
5151					selectee.selected = false;
5152				}
5153				if ( selectee.unselecting ) {
5154					that._removeClass( selectee.$element, "ui-unselecting" );
5155					selectee.unselecting = false;
5156				}
5157				if ( !selectee.selecting ) {
5158					that._addClass( selectee.$element, "ui-selecting" );
5159					selectee.selecting = true;
5160
5161					// selectable SELECTING callback
5162					that._trigger( "selecting", event, {
5163						selecting: selectee.element
5164					} );
5165				}
5166			} else {
5167
5168				// UNSELECT
5169				if ( selectee.selecting ) {
5170					if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
5171						that._removeClass( selectee.$element, "ui-selecting" );
5172						selectee.selecting = false;
5173						that._addClass( selectee.$element, "ui-selected" );
5174						selectee.selected = true;
5175					} else {
5176						that._removeClass( selectee.$element, "ui-selecting" );
5177						selectee.selecting = false;
5178						if ( selectee.startselected ) {
5179							that._addClass( selectee.$element, "ui-unselecting" );
5180							selectee.unselecting = true;
5181						}
5182
5183						// selectable UNSELECTING callback
5184						that._trigger( "unselecting", event, {
5185							unselecting: selectee.element
5186						} );
5187					}
5188				}
5189				if ( selectee.selected ) {
5190					if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
5191						that._removeClass( selectee.$element, "ui-selected" );
5192						selectee.selected = false;
5193
5194						that._addClass( selectee.$element, "ui-unselecting" );
5195						selectee.unselecting = true;
5196
5197						// selectable UNSELECTING callback
5198						that._trigger( "unselecting", event, {
5199							unselecting: selectee.element
5200						} );
5201					}
5202				}
5203			}
5204		} );
5205
5206		return false;
5207	},
5208
5209	_mouseStop: function( event ) {
5210		var that = this;
5211
5212		this.dragged = false;
5213
5214		$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
5215			var selectee = $.data( this, "selectable-item" );
5216			that._removeClass( selectee.$element, "ui-unselecting" );
5217			selectee.unselecting = false;
5218			selectee.startselected = false;
5219			that._trigger( "unselected", event, {
5220				unselected: selectee.element
5221			} );
5222		} );
5223		$( ".ui-selecting", this.element[ 0 ] ).each( function() {
5224			var selectee = $.data( this, "selectable-item" );
5225			that._removeClass( selectee.$element, "ui-selecting" )
5226				._addClass( selectee.$element, "ui-selected" );
5227			selectee.selecting = false;
5228			selectee.selected = true;
5229			selectee.startselected = true;
5230			that._trigger( "selected", event, {
5231				selected: selectee.element
5232			} );
5233		} );
5234		this._trigger( "stop", event );
5235
5236		this.helper.remove();
5237
5238		return false;
5239	}
5240
5241} );
5242
5243
5244/*!
5245 * jQuery UI Sortable 1.13.2
5246 * http://jqueryui.com
5247 *
5248 * Copyright jQuery Foundation and other contributors
5249 * Released under the MIT license.
5250 * http://jquery.org/license
5251 */
5252
5253//>>label: Sortable
5254//>>group: Interactions
5255//>>description: Enables items in a list to be sorted using the mouse.
5256//>>docs: http://api.jqueryui.com/sortable/
5257//>>demos: http://jqueryui.com/sortable/
5258//>>css.structure: ../../themes/base/sortable.css
5259
5260
5261var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
5262	version: "1.13.2
vendor: 7,925 bytes, lines 5262-5581
5262",
5263	widgetEventPrefix: "sort",
5264	ready: false,
5265	options: {
5266		appendTo: "parent",
5267		axis: false,
5268		connectWith: false,
5269		containment: false,
5270		cursor: "auto",
5271		cursorAt: false,
5272		dropOnEmpty: true,
5273		forcePlaceholderSize: false,
5274		forceHelperSize: false,
5275		grid: false,
5276		handle: false,
5277		helper: "original",
5278		items: "> *",
5279		opacity: false,
5280		placeholder: false,
5281		revert: false,
5282		scroll: true,
5283		scrollSensitivity: 20,
5284		scrollSpeed: 20,
5285		scope: "default",
5286		tolerance: "intersect",
5287		zIndex: 1000,
5288
5289		// Callbacks
5290		activate: null,
5291		beforeStop: null,
5292		change: null,
5293		deactivate: null,
5294		out: null,
5295		over: null,
5296		receive: null,
5297		remove: null,
5298		sort: null,
5299		start: null,
5300		stop: null,
5301		update: null
5302	},
5303
5304	_isOverAxis: function( x, reference, size ) {
5305		return ( x >= reference ) && ( x < ( reference + size ) );
5306	},
5307
5308	_isFloating: function( item ) {
5309		return ( /left|right/ ).test( item.css( "float" ) ) ||
5310			( /inline|table-cell/ ).test( item.css( "display" ) );
5311	},
5312
5313	_create: function() {
5314		this.containerCache = {};
5315		this._addClass( "ui-sortable" );
5316
5317		//Get the items
5318		this.refresh();
5319
5320		//Let's determine the parent's offset
5321		this.offset = this.element.offset();
5322
5323		//Initialize mouse events for interaction
5324		this._mouseInit();
5325
5326		this._setHandleClassName();
5327
5328		//We're ready to go
5329		this.ready = true;
5330
5331	},
5332
5333	_setOption: function( key, value ) {
5334		this._super( key, value );
5335
5336		if ( key === "handle" ) {
5337			this._setHandleClassName();
5338		}
5339	},
5340
5341	_setHandleClassName: function() {
5342		var that = this;
5343		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
5344		$.each( this.items, function() {
5345			that._addClass(
5346				this.instance.options.handle ?
5347					this.item.find( this.instance.options.handle ) :
5348					this.item,
5349				"ui-sortable-handle"
5350			);
5351		} );
5352	},
5353
5354	_destroy: function() {
5355		this._mouseDestroy();
5356
5357		for ( var i = this.items.length - 1; i >= 0; i-- ) {
5358			this.items[ i ].item.removeData( this.widgetName + "-item" );
5359		}
5360
5361		return this;
5362	},
5363
5364	_mouseCapture: function( event, overrideHandle ) {
5365		var currentItem = null,
5366			validHandle = false,
5367			that = this;
5368
5369		if ( this.reverting ) {
5370			return false;
5371		}
5372
5373		if ( this.options.disabled || this.options.type === "static" ) {
5374			return false;
5375		}
5376
5377		//We have to refresh the items data once first
5378		this._refreshItems( event );
5379
5380		//Find out if the clicked node (or one of its parents) is a actual item in this.items
5381		$( event.target ).parents().each( function() {
5382			if ( $.data( this, that.widgetName + "-item" ) === that ) {
5383				currentItem = $( this );
5384				return false;
5385			}
5386		} );
5387		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
5388			currentItem = $( event.target );
5389		}
5390
5391		if ( !currentItem ) {
5392			return false;
5393		}
5394		if ( this.options.handle && !overrideHandle ) {
5395			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
5396				if ( this === event.target ) {
5397					validHandle = true;
5398				}
5399			} );
5400			if ( !validHandle ) {
5401				return false;
5402			}
5403		}
5404
5405		this.currentItem = currentItem;
5406		this._removeCurrentsFromItems();
5407		return true;
5408
5409	},
5410
5411	_mouseStart: function( event, overrideHandle, noActivation ) {
5412
5413		var i, body,
5414			o = this.options;
5415
5416		this.currentContainer = this;
5417
5418		//We only need to call refreshPositions, because the refreshItems call has been moved to
5419		// mouseCapture
5420		this.refreshPositions();
5421
5422		//Prepare the dragged items parent
5423		this.appendTo = $( o.appendTo !== "parent" ?
5424				o.appendTo :
5425				this.currentItem.parent() );
5426
5427		//Create and append the visible helper
5428		this.helper = this._createHelper( event );
5429
5430		//Cache the helper size
5431		this._cacheHelperProportions();
5432
5433		/*
5434		 * - Position generation -
5435		 * This block generates everything position related - it's the core of draggables.
5436		 */
5437
5438		//Cache the margins of the original element
5439		this._cacheMargins();
5440
5441		//The element's absolute position on the page minus margins
5442		this.offset = this.currentItem.offset();
5443		this.offset = {
5444			top: this.offset.top - this.margins.top,
5445			left: this.offset.left - this.margins.left
5446		};
5447
5448		$.extend( this.offset, {
5449			click: { //Where the click happened, relative to the element
5450				left: event.pageX - this.offset.left,
5451				top: event.pageY - this.offset.top
5452			},
5453
5454			// This is a relative to absolute position minus the actual position calculation -
5455			// only used for relative positioned helper
5456			relative: this._getRelativeOffset()
5457		} );
5458
5459		// After we get the helper offset, but before we get the parent offset we can
5460		// change the helper's position to absolute
5461		// TODO: Still need to figure out a way to make relative sorting possible
5462		this.helper.css( "position", "absolute" );
5463		this.cssPosition = this.helper.css( "position" );
5464
5465		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
5466		if ( o.cursorAt ) {
5467			this._adjustOffsetFromHelper( o.cursorAt );
5468		}
5469
5470		//Cache the former DOM position
5471		this.domPosition = {
5472			prev: this.currentItem.prev()[ 0 ],
5473			parent: this.currentItem.parent()[ 0 ]
5474		};
5475
5476		// If the helper is not the original, hide the original so it's not playing any role during
5477		// the drag, won't cause anything bad this way
5478		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
5479			this.currentItem.hide();
5480		}
5481
5482		//Create the placeholder
5483		this._createPlaceholder();
5484
5485		//Get the next scrolling parent
5486		this.scrollParent = this.placeholder.scrollParent();
5487
5488		$.extend( this.offset, {
5489			parent: this._getParentOffset()
5490		} );
5491
5492		//Set a containment if given in the options
5493		if ( o.containment ) {
5494			this._setContainment();
5495		}
5496
5497		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
5498			body = this.document.find( "body" );
5499
5500			// Support: IE
5501			this.storedCursor = body.css( "cursor" );
5502			body.css( "cursor", o.cursor );
5503
5504			this.storedStylesheet =
5505				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
5506		}
5507
5508		// We need to make sure to grab the zIndex before setting the
5509		// opacity, because setting the opacity to anything lower than 1
5510		// causes the zIndex to change from "auto" to 0.
5511		if ( o.zIndex ) { // zIndex option
5512			if ( this.helper.css( "zIndex" ) ) {
5513				this._storedZIndex = this.helper.css( "zIndex" );
5514			}
5515			this.helper.css( "zIndex", o.zIndex );
5516		}
5517
5518		if ( o.opacity ) { // opacity option
5519			if ( this.helper.css( "opacity" ) ) {
5520				this._storedOpacity = this.helper.css( "opacity" );
5521			}
5522			this.helper.css( "opacity", o.opacity );
5523		}
5524
5525		//Prepare scrolling
5526		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
5527				this.scrollParent[ 0 ].tagName !== "HTML" ) {
5528			this.overflowOffset = this.scrollParent.offset();
5529		}
5530
5531		//Call callbacks
5532		this._trigger( "start", event, this._uiHash() );
5533
5534		//Recache the helper size
5535		if ( !this._preserveHelperProportions ) {
5536			this._cacheHelperProportions();
5537		}
5538
5539		//Post "activate" events to possible containers
5540		if ( !noActivation ) {
5541			for ( i = this.containers.length - 1; i >= 0; i-- ) {
5542				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
5543			}
5544		}
5545
5546		//Prepare possible droppables
5547		if ( $.ui.ddmanager ) {
5548			$.ui.ddmanager.current = this;
5549		}
5550
5551		if ( $.ui.ddmanager && !o.dropBehaviour ) {
5552			$.ui.ddmanager.prepareOffsets( this, event );
5553		}
5554
5555		this.dragging = true;
5556
5557		this._addClass( this.helper, "ui-sortable-helper" );
5558
5559		//Move the helper, if needed
5560		if ( !this.helper.parent().is( this.appendTo ) ) {
5561			this.helper.detach().appendTo( this.appendTo );
5562
5563			//Update position
5564			this.offset.parent = this._getParentOffset();
5565		}
5566
5567		//Generate the original position
5568		this.position = this.originalPosition = this._generatePosition( event );
5569		this.originalPageX = event.pageX;
5570		this.originalPageY = event.pageY;
5571		this.lastPositionAbs = this.positionAbs = this._convertPositionTo( "absolute" );
5572
5573		this._mouseDrag( event );
5574
5575		return true;
5576
5577	},
5578
5579	_scroll: function( event ) {
5580		var o = this.options,
5581			scrolled = false;
vendor: 4,489 bytes, lines 5582-5724
5582
5583		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
5584				this.scrollParent[ 0 ].tagName !== "HTML" ) {
5585
5586			if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
5587					event.pageY < o.scrollSensitivity ) {
5588				this.scrollParent[ 0 ].scrollTop =
5589					scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
5590			} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
5591				this.scrollParent[ 0 ].scrollTop =
5592					scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
5593			}
5594
5595			if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
5596					event.pageX < o.scrollSensitivity ) {
5597				this.scrollParent[ 0 ].scrollLeft = scrolled =
5598					this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
5599			} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
5600				this.scrollParent[ 0 ].scrollLeft = scrolled =
5601					this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
5602			}
5603
5604		} else {
5605
5606			if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
5607				scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
5608			} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
5609					o.scrollSensitivity ) {
5610				scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
5611			}
5612
5613			if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
5614				scrolled = this.document.scrollLeft(
5615					this.document.scrollLeft() - o.scrollSpeed
5616				);
5617			} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
5618					o.scrollSensitivity ) {
5619				scrolled = this.document.scrollLeft(
5620					this.document.scrollLeft() + o.scrollSpeed
5621				);
5622			}
5623
5624		}
5625
5626		return scrolled;
5627	},
5628
5629	_mouseDrag: function( event ) {
5630		var i, item, itemElement, intersection,
5631			o = this.options;
5632
5633		//Compute the helpers position
5634		this.position = this._generatePosition( event );
5635		this.positionAbs = this._convertPositionTo( "absolute" );
5636
5637		//Set the helper position
5638		if ( !this.options.axis || this.options.axis !== "y" ) {
5639			this.helper[ 0 ].style.left = this.position.left + "px";
5640		}
5641		if ( !this.options.axis || this.options.axis !== "x" ) {
5642			this.helper[ 0 ].style.top = this.position.top + "px";
5643		}
5644
5645		//Do scrolling
5646		if ( o.scroll ) {
5647			if ( this._scroll( event ) !== false ) {
5648
5649				//Update item positions used in position checks
5650				this._refreshItemPositions( true );
5651
5652				if ( $.ui.ddmanager && !o.dropBehaviour ) {
5653					$.ui.ddmanager.prepareOffsets( this, event );
5654				}
5655			}
5656		}
5657
5658		this.dragDirection = {
5659			vertical: this._getDragVerticalDirection(),
5660			horizontal: this._getDragHorizontalDirection()
5661		};
5662
5663		//Rearrange
5664		for ( i = this.items.length - 1; i >= 0; i-- ) {
5665
5666			//Cache variables and intersection, continue if no intersection
5667			item = this.items[ i ];
5668			itemElement = item.item[ 0 ];
5669			intersection = this._intersectsWithPointer( item );
5670			if ( !intersection ) {
5671				continue;
5672			}
5673
5674			// Only put the placeholder inside the current Container, skip all
5675			// items from other containers. This works because when moving
5676			// an item from one container to another the
5677			// currentContainer is switched before the placeholder is moved.
5678			//
5679			// Without this, moving items in "sub-sortables" can cause
5680			// the placeholder to jitter between the outer and inner container.
5681			if ( item.instance !== this.currentContainer ) {
5682				continue;
5683			}
5684
5685			// Cannot intersect with itself
5686			// no useless actions that have been done before
5687			// no action if the item moved is the parent of the item checked
5688			if ( itemElement !== this.currentItem[ 0 ] &&
5689				this.placeholder[ intersection === 1 ?
5690				"next" : "prev" ]()[ 0 ] !== itemElement &&
5691				!$.contains( this.placeholder[ 0 ], itemElement ) &&
5692				( this.options.type === "semi-dynamic" ?
5693					!$.contains( this.element[ 0 ], itemElement ) :
5694					true
5695				)
5696			) {
5697
5698				this.direction = intersection === 1 ? "down" : "up";
5699
5700				if ( this.options.tolerance === "pointer" ||
5701						this._intersectsWithSides( item ) ) {
5702					this._rearrange( event, item );
5703				} else {
5704					break;
5705				}
5706
5707				this._trigger( "change", event, this._uiHash() );
5708				break;
5709			}
5710		}
5711
5712		//Post events to containers
5713		this._contactContainers( event );
5714
5715		//Interconnect with droppables
5716		if ( $.ui.ddmanager ) {
5717			$.ui.ddmanager.drag( this, event );
5718		}
5719
5720		//Call callbacks
5721		this._trigger( "sort", event, this._uiHash() );
5722
5723		this.lastPositionAbs = this.positionAbs;
5724		return false;
vendor: 5,063 bytes, lines 5725-5914
5725
5726	},
5727
5728	_mouseStop: function( event, noPropagation ) {
5729
5730		if ( !event ) {
5731			return;
5732		}
5733
5734		//If we are using droppables, inform the manager about the drop
5735		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
5736			$.ui.ddmanager.drop( this, event );
5737		}
5738
5739		if ( this.options.revert ) {
5740			var that = this,
5741				cur = this.placeholder.offset(),
5742				axis = this.options.axis,
5743				animation = {};
5744
5745			if ( !axis || axis === "x" ) {
5746				animation.left = cur.left - this.offset.parent.left - this.margins.left +
5747					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
5748						0 :
5749						this.offsetParent[ 0 ].scrollLeft
5750					);
5751			}
5752			if ( !axis || axis === "y" ) {
5753				animation.top = cur.top - this.offset.parent.top - this.margins.top +
5754					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
5755						0 :
5756						this.offsetParent[ 0 ].scrollTop
5757					);
5758			}
5759			this.reverting = true;
5760			$( this.helper ).animate(
5761				animation,
5762				parseInt( this.options.revert, 10 ) || 500,
5763				function() {
5764					that._clear( event );
5765				}
5766			);
5767		} else {
5768			this._clear( event, noPropagation );
5769		}
5770
5771		return false;
5772
5773	},
5774
5775	cancel: function() {
5776
5777		if ( this.dragging ) {
5778
5779			this._mouseUp( new $.Event( "mouseup", { target: null } ) );
5780
5781			if ( this.options.helper === "original" ) {
5782				this.currentItem.css( this._storedCSS );
5783				this._removeClass( this.currentItem, "ui-sortable-helper" );
5784			} else {
5785				this.currentItem.show();
5786			}
5787
5788			//Post deactivating events to containers
5789			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
5790				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
5791				if ( this.containers[ i ].containerCache.over ) {
5792					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
5793					this.containers[ i ].containerCache.over = 0;
5794				}
5795			}
5796
5797		}
5798
5799		if ( this.placeholder ) {
5800
5801			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
5802			// it unbinds ALL events from the original node!
5803			if ( this.placeholder[ 0 ].parentNode ) {
5804				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
5805			}
5806			if ( this.options.helper !== "original" && this.helper &&
5807					this.helper[ 0 ].parentNode ) {
5808				this.helper.remove();
5809			}
5810
5811			$.extend( this, {
5812				helper: null,
5813				dragging: false,
5814				reverting: false,
5815				_noFinalSort: null
5816			} );
5817
5818			if ( this.domPosition.prev ) {
5819				$( this.domPosition.prev ).after( this.currentItem );
5820			} else {
5821				$( this.domPosition.parent ).prepend( this.currentItem );
5822			}
5823		}
5824
5825		return this;
5826
5827	},
5828
5829	serialize: function( o ) {
5830
5831		var items = this._getItemsAsjQuery( o && o.connected ),
5832			str = [];
5833		o = o || {};
5834
5835		$( items ).each( function() {
5836			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
5837				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
5838			if ( res ) {
5839				str.push(
5840					( o.key || res[ 1 ] + "[]" ) +
5841					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
5842			}
5843		} );
5844
5845		if ( !str.length && o.key ) {
5846			str.push( o.key + "=" );
5847		}
5848
5849		return str.join( "&" );
5850
5851	},
5852
5853	toArray: function( o ) {
5854
5855		var items = this._getItemsAsjQuery( o && o.connected ),
5856			ret = [];
5857
5858		o = o || {};
5859
5860		items.each( function() {
5861			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
5862		} );
5863		return ret;
5864
5865	},
5866
5867	/* Be careful with the following core functions */
5868	_intersectsWith: function( item ) {
5869
5870		var x1 = this.positionAbs.left,
5871			x2 = x1 + this.helperProportions.width,
5872			y1 = this.positionAbs.top,
5873			y2 = y1 + this.helperProportions.height,
5874			l = item.left,
5875			r = l + item.width,
5876			t = item.top,
5877			b = t + item.height,
5878			dyClick = this.offset.click.top,
5879			dxClick = this.offset.click.left,
5880			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
5881				( y1 + dyClick ) < b ),
5882			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
5883				( x1 + dxClick ) < r ),
5884			isOverElement = isOverElementHeight && isOverElementWidth;
5885
5886		if ( this.options.tolerance === "pointer" ||
5887			this.options.forcePointerForContainers ||
5888			( this.options.tolerance !== "pointer" &&
5889				this.helperProportions[ this.floating ? "width" : "height" ] >
5890				item[ this.floating ? "width" : "height" ] )
5891		) {
5892			return isOverElement;
5893		} else {
5894
5895			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
5896				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
5897				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
5898				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
5899
5900		}
5901	},
5902
5903	_intersectsWithPointer: function( item ) {
5904		var verticalDirection, horizontalDirection,
5905			isOverElementHeight = ( this.options.axis === "x" ) ||
5906				this._isOverAxis(
5907					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
5908			isOverElementWidth = ( this.options.axis === "y" ) ||
5909				this._isOverAxis(
5910					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
5911			isOverElement = isOverElementHeight && isOverElementWidth;
5912
5913		if ( !isOverElement ) {
5914			return false;
vendor: 8,518 bytes, lines 5915-6189
5915		}
5916
5917		verticalDirection = this.dragDirection.vertical;
5918		horizontalDirection = this.dragDirection.horizontal;
5919
5920		return this.floating ?
5921			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 ) :
5922			( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
5923
5924	},
5925
5926	_intersectsWithSides: function( item ) {
5927
5928		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
5929				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
5930			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
5931				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
5932			verticalDirection = this.dragDirection.vertical,
5933			horizontalDirection = this.dragDirection.horizontal;
5934
5935		if ( this.floating && horizontalDirection ) {
5936			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
5937				( horizontalDirection === "left" && !isOverRightHalf ) );
5938		} else {
5939			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
5940				( verticalDirection === "up" && !isOverBottomHalf ) );
5941		}
5942
5943	},
5944
5945	_getDragVerticalDirection: function() {
5946		var delta = this.positionAbs.top - this.lastPositionAbs.top;
5947		return delta !== 0 && ( delta > 0 ? "down" : "up" );
5948	},
5949
5950	_getDragHorizontalDirection: function() {
5951		var delta = this.positionAbs.left - this.lastPositionAbs.left;
5952		return delta !== 0 && ( delta > 0 ? "right" : "left" );
5953	},
5954
5955	refresh: function( event ) {
5956		this._refreshItems( event );
5957		this._setHandleClassName();
5958		this.refreshPositions();
5959		return this;
5960	},
5961
5962	_connectWith: function() {
5963		var options = this.options;
5964		return options.connectWith.constructor === String ?
5965			[ options.connectWith ] :
5966			options.connectWith;
5967	},
5968
5969	_getItemsAsjQuery: function( connected ) {
5970
5971		var i, j, cur, inst,
5972			items = [],
5973			queries = [],
5974			connectWith = this._connectWith();
5975
5976		if ( connectWith && connected ) {
5977			for ( i = connectWith.length - 1; i >= 0; i-- ) {
5978				cur = $( connectWith[ i ], this.document[ 0 ] );
5979				for ( j = cur.length - 1; j >= 0; j-- ) {
5980					inst = $.data( cur[ j ], this.widgetFullName );
5981					if ( inst && inst !== this && !inst.options.disabled ) {
5982						queries.push( [ typeof inst.options.items === "function" ?
5983							inst.options.items.call( inst.element ) :
5984							$( inst.options.items, inst.element )
5985								.not( ".ui-sortable-helper" )
5986								.not( ".ui-sortable-placeholder" ), inst ] );
5987					}
5988				}
5989			}
5990		}
5991
5992		queries.push( [ typeof this.options.items === "function" ?
5993			this.options.items
5994				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
5995			$( this.options.items, this.element )
5996				.not( ".ui-sortable-helper" )
5997				.not( ".ui-sortable-placeholder" ), this ] );
5998
5999		function addItems() {
6000			items.push( this );
6001		}
6002		for ( i = queries.length - 1; i >= 0; i-- ) {
6003			queries[ i ][ 0 ].each( addItems );
6004		}
6005
6006		return $( items );
6007
6008	},
6009
6010	_removeCurrentsFromItems: function() {
6011
6012		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
6013
6014		this.items = $.grep( this.items, function( item ) {
6015			for ( var j = 0; j < list.length; j++ ) {
6016				if ( list[ j ] === item.item[ 0 ] ) {
6017					return false;
6018				}
6019			}
6020			return true;
6021		} );
6022
6023	},
6024
6025	_refreshItems: function( event ) {
6026
6027		this.items = [];
6028		this.containers = [ this ];
6029
6030		var i, j, cur, inst, targetData, _queries, item, queriesLength,
6031			items = this.items,
6032			queries = [ [ typeof this.options.items === "function" ?
6033				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
6034				$( this.options.items, this.element ), this ] ],
6035			connectWith = this._connectWith();
6036
6037		//Shouldn't be run the first time through due to massive slow-down
6038		if ( connectWith && this.ready ) {
6039			for ( i = connectWith.length - 1; i >= 0; i-- ) {
6040				cur = $( connectWith[ i ], this.document[ 0 ] );
6041				for ( j = cur.length - 1; j >= 0; j-- ) {
6042					inst = $.data( cur[ j ], this.widgetFullName );
6043					if ( inst && inst !== this && !inst.options.disabled ) {
6044						queries.push( [ typeof inst.options.items === "function" ?
6045							inst.options.items
6046								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
6047							$( inst.options.items, inst.element ), inst ] );
6048						this.containers.push( inst );
6049					}
6050				}
6051			}
6052		}
6053
6054		for ( i = queries.length - 1; i >= 0; i-- ) {
6055			targetData = queries[ i ][ 1 ];
6056			_queries = queries[ i ][ 0 ];
6057
6058			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
6059				item = $( _queries[ j ] );
6060
6061				// Data for target checking (mouse manager)
6062				item.data( this.widgetName + "-item", targetData );
6063
6064				items.push( {
6065					item: item,
6066					instance: targetData,
6067					width: 0, height: 0,
6068					left: 0, top: 0
6069				} );
6070			}
6071		}
6072
6073	},
6074
6075	_refreshItemPositions: function( fast ) {
6076		var i, item, t, p;
6077
6078		for ( i = this.items.length - 1; i >= 0; i-- ) {
6079			item = this.items[ i ];
6080
6081			//We ignore calculating positions of all connected containers when we're not over them
6082			if ( this.currentContainer && item.instance !== this.currentContainer &&
6083					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
6084				continue;
6085			}
6086
6087			t = this.options.toleranceElement ?
6088				$( this.options.toleranceElement, item.item ) :
6089				item.item;
6090
6091			if ( !fast ) {
6092				item.width = t.outerWidth();
6093				item.height = t.outerHeight();
6094			}
6095
6096			p = t.offset();
6097			item.left = p.left;
6098			item.top = p.top;
6099		}
6100	},
6101
6102	refreshPositions: function( fast ) {
6103
6104		// Determine whether items are being displayed horizontally
6105		this.floating = this.items.length ?
6106			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
6107			false;
6108
6109		// This has to be redone because due to the item being moved out/into the offsetParent,
6110		// the offsetParent's position will change
6111		if ( this.offsetParent && this.helper ) {
6112			this.offset.parent = this._getParentOffset();
6113		}
6114
6115		this._refreshItemPositions( fast );
6116
6117		var i, p;
6118
6119		if ( this.options.custom && this.options.custom.refreshContainers ) {
6120			this.options.custom.refreshContainers.call( this );
6121		} else {
6122			for ( i = this.containers.length - 1; i >= 0; i-- ) {
6123				p = this.containers[ i ].element.offset();
6124				this.containers[ i ].containerCache.left = p.left;
6125				this.containers[ i ].containerCache.top = p.top;
6126				this.containers[ i ].containerCache.width =
6127					this.containers[ i ].element.outerWidth();
6128				this.containers[ i ].containerCache.height =
6129					this.containers[ i ].element.outerHeight();
6130			}
6131		}
6132
6133		return this;
6134	},
6135
6136	_createPlaceholder: function( that ) {
6137		that = that || this;
6138		var className, nodeName,
6139			o = that.options;
6140
6141		if ( !o.placeholder || o.placeholder.constructor === String ) {
6142			className = o.placeholder;
6143			nodeName = that.currentItem[ 0 ].nodeName.toLowerCase();
6144			o.placeholder = {
6145				element: function() {
6146
6147					var element = $( "<" + nodeName + ">", that.document[ 0 ] );
6148
6149					that._addClass( element, "ui-sortable-placeholder",
6150							className || that.currentItem[ 0 ].className )
6151						._removeClass( element, "ui-sortable-helper" );
6152
6153					if ( nodeName === "tbody" ) {
6154						that._createTrPlaceholder(
6155							that.currentItem.find( "tr" ).eq( 0 ),
6156							$( "<tr>", that.document[ 0 ] ).appendTo( element )
6157						);
6158					} else if ( nodeName === "tr" ) {
6159						that._createTrPlaceholder( that.currentItem, element );
6160					} else if ( nodeName === "img" ) {
6161						element.attr( "src", that.currentItem.attr( "src" ) );
6162					}
6163
6164					if ( !className ) {
6165						element.css( "visibility", "hidden" );
6166					}
6167
6168					return element;
6169				},
6170				update: function( container, p ) {
6171
6172					// 1. If a className is set as 'placeholder option, we don't force sizes -
6173					// the class is responsible for that
6174					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
6175					// class name is specified
6176					if ( className && !o.forcePlaceholderSize ) {
6177						return;
6178					}
6179
6180					// If the element doesn't have a actual height or width by itself (without
6181					// styles coming from a stylesheet), it receives the inline height and width
6182					// from the dragged item. Or, if it's a tbody or tr, it's going to have a height
6183					// anyway since we're populating them with <td>s above, but they're unlikely to
6184					// be the correct height on their own if the row heights are dynamic, so we'll
6185					// always assign the height of the dragged item given forcePlaceholderSize
6186					// is true.
6187					if ( !p.height() || ( o.forcePlaceholderSize &&
6188							( nodeName === "tbody" || nodeName === "tr" ) ) ) {
6189						p.height(
vendor: 10,145 bytes, lines 6190-6497
6190							that.currentItem.innerHeight() -
6191							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
6192							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
6193					}
6194					if ( !p.width() ) {
6195						p.width(
6196							that.currentItem.innerWidth() -
6197							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
6198							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
6199					}
6200				}
6201			};
6202		}
6203
6204		//Create the placeholder
6205		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
6206
6207		//Append it after the actual current item
6208		that.currentItem.after( that.placeholder );
6209
6210		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
6211		o.placeholder.update( that, that.placeholder );
6212
6213	},
6214
6215	_createTrPlaceholder: function( sourceTr, targetTr ) {
6216		var that = this;
6217
6218		sourceTr.children().each( function() {
6219			$( "<td>&#160;</td>", that.document[ 0 ] )
6220				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
6221				.appendTo( targetTr );
6222		} );
6223	},
6224
6225	_contactContainers: function( event ) {
6226		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
6227			floating, axis,
6228			innermostContainer = null,
6229			innermostIndex = null;
6230
6231		// Get innermost container that intersects with item
6232		for ( i = this.containers.length - 1; i >= 0; i-- ) {
6233
6234			// Never consider a container that's located within the item itself
6235			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
6236				continue;
6237			}
6238
6239			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
6240
6241				// If we've already found a container and it's more "inner" than this, then continue
6242				if ( innermostContainer &&
6243						$.contains(
6244							this.containers[ i ].element[ 0 ],
6245							innermostContainer.element[ 0 ] ) ) {
6246					continue;
6247				}
6248
6249				innermostContainer = this.containers[ i ];
6250				innermostIndex = i;
6251
6252			} else {
6253
6254				// container doesn't intersect. trigger "out" event if necessary
6255				if ( this.containers[ i ].containerCache.over ) {
6256					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
6257					this.containers[ i ].containerCache.over = 0;
6258				}
6259			}
6260
6261		}
6262
6263		// If no intersecting containers found, return
6264		if ( !innermostContainer ) {
6265			return;
6266		}
6267
6268		// Move the item into the container if it's not there already
6269		if ( this.containers.length === 1 ) {
6270			if ( !this.containers[ innermostIndex ].containerCache.over ) {
6271				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
6272				this.containers[ innermostIndex ].containerCache.over = 1;
6273			}
6274		} else {
6275
6276			// When entering a new container, we will find the item with the least distance and
6277			// append our item near it
6278			dist = 10000;
6279			itemWithLeastDistance = null;
6280			floating = innermostContainer.floating || this._isFloating( this.currentItem );
6281			posProperty = floating ? "left" : "top";
6282			sizeProperty = floating ? "width" : "height";
6283			axis = floating ? "pageX" : "pageY";
6284
6285			for ( j = this.items.length - 1; j >= 0; j-- ) {
6286				if ( !$.contains(
6287						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
6288				) {
6289					continue;
6290				}
6291				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
6292					continue;
6293				}
6294
6295				cur = this.items[ j ].item.offset()[ posProperty ];
6296				nearBottom = false;
6297				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
6298					nearBottom = true;
6299				}
6300
6301				if ( Math.abs( event[ axis ] - cur ) < dist ) {
6302					dist = Math.abs( event[ axis ] - cur );
6303					itemWithLeastDistance = this.items[ j ];
6304					this.direction = nearBottom ? "up" : "down";
6305				}
6306			}
6307
6308			//Check if dropOnEmpty is enabled
6309			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
6310				return;
6311			}
6312
6313			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
6314				if ( !this.currentContainer.containerCache.over ) {
6315					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
6316					this.currentContainer.containerCache.over = 1;
6317				}
6318				return;
6319			}
6320
6321			if ( itemWithLeastDistance ) {
6322				this._rearrange( event, itemWithLeastDistance, null, true );
6323			} else {
6324				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
6325			}
6326			this._trigger( "change", event, this._uiHash() );
6327			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
6328			this.currentContainer = this.containers[ innermostIndex ];
6329
6330			//Update the placeholder
6331			this.options.placeholder.update( this.currentContainer, this.placeholder );
6332
6333			//Update scrollParent
6334			this.scrollParent = this.placeholder.scrollParent();
6335
6336			//Update overflowOffset
6337			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
6338					this.scrollParent[ 0 ].tagName !== "HTML" ) {
6339				this.overflowOffset = this.scrollParent.offset();
6340			}
6341
6342			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
6343			this.containers[ innermostIndex ].containerCache.over = 1;
6344		}
6345
6346	},
6347
6348	_createHelper: function( event ) {
6349
6350		var o = this.options,
6351			helper = typeof o.helper === "function" ?
6352				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
6353				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
6354
6355		//Add the helper to the DOM if that didn't happen already
6356		if ( !helper.parents( "body" ).length ) {
6357			this.appendTo[ 0 ].appendChild( helper[ 0 ] );
6358		}
6359
6360		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
6361			this._storedCSS = {
6362				width: this.currentItem[ 0 ].style.width,
6363				height: this.currentItem[ 0 ].style.height,
6364				position: this.currentItem.css( "position" ),
6365				top: this.currentItem.css( "top" ),
6366				left: this.currentItem.css( "left" )
6367			};
6368		}
6369
6370		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
6371			helper.width( this.currentItem.width() );
6372		}
6373		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
6374			helper.height( this.currentItem.height() );
6375		}
6376
6377		return helper;
6378
6379	},
6380
6381	_adjustOffsetFromHelper: function( obj ) {
6382		if ( typeof obj === "string" ) {
6383			obj = obj.split( " " );
6384		}
6385		if ( Array.isArray( obj ) ) {
6386			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
6387		}
6388		if ( "left" in obj ) {
6389			this.offset.click.left = obj.left + this.margins.left;
6390		}
6391		if ( "right" in obj ) {
6392			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
6393		}
6394		if ( "top" in obj ) {
6395			this.offset.click.top = obj.top + this.margins.top;
6396		}
6397		if ( "bottom" in obj ) {
6398			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
6399		}
6400	},
6401
6402	_getParentOffset: function() {
6403
6404		//Get the offsetParent and cache its position
6405		this.offsetParent = this.helper.offsetParent();
6406		var po = this.offsetParent.offset();
6407
6408		// This is a special case where we need to modify a offset calculated on start, since the
6409		// following happened:
6410		// 1. The position of the helper is absolute, so it's position is calculated based on the
6411		// next positioned parent
6412		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
6413		// the document, which means that the scroll is included in the initial calculation of the
6414		// offset of the parent, and never recalculated upon drag
6415		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
6416				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
6417			po.left += this.scrollParent.scrollLeft();
6418			po.top += this.scrollParent.scrollTop();
6419		}
6420
6421		// This needs to be actually done for all browsers, since pageX/pageY includes this
6422		// information with an ugly IE fix
6423		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
6424				( this.offsetParent[ 0 ].tagName &&
6425				this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
6426			po = { top: 0, left: 0 };
6427		}
6428
6429		return {
6430			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
6431			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
6432		};
6433
6434	},
6435
6436	_getRelativeOffset: function() {
6437
6438		if ( this.cssPosition === "relative" ) {
6439			var p = this.currentItem.position();
6440			return {
6441				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
6442					this.scrollParent.scrollTop(),
6443				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
6444					this.scrollParent.scrollLeft()
6445			};
6446		} else {
6447			return { top: 0, left: 0 };
6448		}
6449
6450	},
6451
6452	_cacheMargins: function() {
6453		this.margins = {
6454			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
6455			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
6456		};
6457	},
6458
6459	_cacheHelperProportions: function() {
6460		this.helperProportions = {
6461			width: this.helper.outerWidth(),
6462			height: this.helper.outerHeight()
6463		};
6464	},
6465
6466	_setContainment: function() {
6467
6468		var ce, co, over,
6469			o = this.options;
6470		if ( o.containment === "parent" ) {
6471			o.containment = this.helper[ 0 ].parentNode;
6472		}
6473		if ( o.containment === "document" || o.containment === "window" ) {
6474			this.containment = [
6475				0 - this.offset.relative.left - this.offset.parent.left,
6476				0 - this.offset.relative.top - this.offset.parent.top,
6477				o.containment === "document" ?
6478					this.document.width() :
6479					this.window.width() - this.helperProportions.width - this.margins.left,
6480				( o.containment === "document" ?
6481					( this.document.height() || document.body.parentNode.scrollHeight ) :
6482					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
6483				) - this.helperProportions.height - this.margins.top
6484			];
6485		}
6486
6487		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
6488			ce = $( o.containment )[ 0 ];
6489			co = $( o.containment ).offset();
6490			over = ( $( ce ).css( "overflow" ) !== "hidden" );
6491
6492			this.containment = [
6493				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
6494					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
6495				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
6496					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
6497				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) 
vendor: 1,747 bytes, lines 6497-6549
6497: ce.offsetWidth ) -
6498					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
6499					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
6500					this.helperProportions.width - this.margins.left,
6501				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
6502					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
6503					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
6504					this.helperProportions.height - this.margins.top
6505			];
6506		}
6507
6508	},
6509
6510	_convertPositionTo: function( d, pos ) {
6511
6512		if ( !pos ) {
6513			pos = this.position;
6514		}
6515		var mod = d === "absolute" ? 1 : -1,
6516			scroll = this.cssPosition === "absolute" &&
6517				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
6518				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
6519					this.offsetParent :
6520					this.scrollParent,
6521			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
6522
6523		return {
6524			top: (
6525
6526				// The absolute mouse position
6527				pos.top	+
6528
6529				// Only for relative positioned nodes: Relative offset from element to offset parent
6530				this.offset.relative.top * mod +
6531
6532				// The offsetParent's offset without borders (offset + border)
6533				this.offset.parent.top * mod -
6534				( ( this.cssPosition === "fixed" ?
6535					-this.scrollParent.scrollTop() :
6536					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
6537			),
6538			left: (
6539
6540				// The absolute mouse position
6541				pos.left +
6542
6543				// Only for relative positioned nodes: Relative offset from element to offset parent
6544				this.offset.relative.left * mod +
6545
6546				// The offsetParent's offset without borders (offset + border)
6547				this.offset.parent.left * mod	-
6548				( ( this.cssPosition === "fixed" ?
6549					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 4,632 bytes, lines 6550-6693
6550					scroll.scrollLeft() ) * mod )
6551			)
6552		};
6553
6554	},
6555
6556	_generatePosition: function( event ) {
6557
6558		var top, left,
6559			o = this.options,
6560			pageX = event.pageX,
6561			pageY = event.pageY,
6562			scroll = this.cssPosition === "absolute" &&
6563				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
6564				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
6565					this.offsetParent :
6566					this.scrollParent,
6567				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
6568
6569		// This is another very weird special case that only happens for relative elements:
6570		// 1. If the css position is relative
6571		// 2. and the scroll parent is the document or similar to the offset parent
6572		// we have to refresh the relative offset during the scroll so there are no jumps
6573		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
6574				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
6575			this.offset.relative = this._getRelativeOffset();
6576		}
6577
6578		/*
6579		 * - Position constraining -
6580		 * Constrain the position to a mix of grid, containment.
6581		 */
6582
6583		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
6584
6585			if ( this.containment ) {
6586				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
6587					pageX = this.containment[ 0 ] + this.offset.click.left;
6588				}
6589				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
6590					pageY = this.containment[ 1 ] + this.offset.click.top;
6591				}
6592				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
6593					pageX = this.containment[ 2 ] + this.offset.click.left;
6594				}
6595				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
6596					pageY = this.containment[ 3 ] + this.offset.click.top;
6597				}
6598			}
6599
6600			if ( o.grid ) {
6601				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
6602					o.grid[ 1 ] ) * o.grid[ 1 ];
6603				pageY = this.containment ?
6604					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
6605						top - this.offset.click.top <= this.containment[ 3 ] ) ?
6606							top :
6607							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
6608								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
6609								top;
6610
6611				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
6612					o.grid[ 0 ] ) * o.grid[ 0 ];
6613				pageX = this.containment ?
6614					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
6615						left - this.offset.click.left <= this.containment[ 2 ] ) ?
6616							left :
6617							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
6618								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
6619								left;
6620			}
6621
6622		}
6623
6624		return {
6625			top: (
6626
6627				// The absolute mouse position
6628				pageY -
6629
6630				// Click offset (relative to the element)
6631				this.offset.click.top -
6632
6633				// Only for relative positioned nodes: Relative offset from element to offset parent
6634				this.offset.relative.top -
6635
6636				// The offsetParent's offset without borders (offset + border)
6637				this.offset.parent.top +
6638				( ( this.cssPosition === "fixed" ?
6639					-this.scrollParent.scrollTop() :
6640					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
6641			),
6642			left: (
6643
6644				// The absolute mouse position
6645				pageX -
6646
6647				// Click offset (relative to the element)
6648				this.offset.click.left -
6649
6650				// Only for relative positioned nodes: Relative offset from element to offset parent
6651				this.offset.relative.left -
6652
6653				// The offsetParent's offset without borders (offset + border)
6654				this.offset.parent.left +
6655				( ( this.cssPosition === "fixed" ?
6656					-this.scrollParent.scrollLeft() :
6657					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
6658			)
6659		};
6660
6661	},
6662
6663	_rearrange: function( event, i, a, hardRefresh ) {
6664
6665		if ( a ) {
6666			a[ 0 ].appendChild( this.placeholder[ 0 ] );
6667		} else {
6668			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
6669				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
6670		}
6671
6672		//Various things done here to improve the performance:
6673		// 1. we create a setTimeout, that calls refreshPositions
6674		// 2. on the instance, we have a counter variable, that get's higher after every append
6675		// 3. on the local scope, we copy the counter variable, and check in the timeout,
6676		// if it's still the same
6677		// 4. this lets only the last addition to the timeout stack through
6678		this.counter = this.counter ? ++this.counter : 1;
6679		var counter = this.counter;
6680
6681		this._delay( function() {
6682			if ( counter === this.counter ) {
6683
6684				//Precompute after each DOM insertion, NOT on mousemove
6685				this.refreshPositions( !hardRefresh );
6686			}
6687		} );
6688
6689	},
6690
6691	_clear: function( event, noPropagation ) {
6692
6693		this.reverting = false;
vendor: 4,270 bytes, lines 6694-6838
6694
6695		// We delay all events that have to be triggered to after the point where the placeholder
6696		// has been removed and everything else normalized again
6697		var i,
6698			delayedTriggers = [];
6699
6700		// We first have to update the dom position of the actual currentItem
6701		// Note: don't do it if the current item is already removed (by a user), or it gets
6702		// reappended (see #4088)
6703		if ( !this._noFinalSort && this.currentItem.parent().length ) {
6704			this.placeholder.before( this.currentItem );
6705		}
6706		this._noFinalSort = null;
6707
6708		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
6709			for ( i in this._storedCSS ) {
6710				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
6711					this._storedCSS[ i ] = "";
6712				}
6713			}
6714			this.currentItem.css( this._storedCSS );
6715			this._removeClass( this.currentItem, "ui-sortable-helper" );
6716		} else {
6717			this.currentItem.show();
6718		}
6719
6720		if ( this.fromOutside && !noPropagation ) {
6721			delayedTriggers.push( function( event ) {
6722				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
6723			} );
6724		}
6725		if ( ( this.fromOutside ||
6726				this.domPosition.prev !==
6727				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
6728				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
6729
6730			// Trigger update callback if the DOM position has changed
6731			delayedTriggers.push( function( event ) {
6732				this._trigger( "update", event, this._uiHash() );
6733			} );
6734		}
6735
6736		// Check if the items Container has Changed and trigger appropriate
6737		// events.
6738		if ( this !== this.currentContainer ) {
6739			if ( !noPropagation ) {
6740				delayedTriggers.push( function( event ) {
6741					this._trigger( "remove", event, this._uiHash() );
6742				} );
6743				delayedTriggers.push( ( function( c ) {
6744					return function( event ) {
6745						c._trigger( "receive", event, this._uiHash( this ) );
6746					};
6747				} ).call( this, this.currentContainer ) );
6748				delayedTriggers.push( ( function( c ) {
6749					return function( event ) {
6750						c._trigger( "update", event, this._uiHash( this ) );
6751					};
6752				} ).call( this, this.currentContainer ) );
6753			}
6754		}
6755
6756		//Post events to containers
6757		function delayEvent( type, instance, container ) {
6758			return function( event ) {
6759				container._trigger( type, event, instance._uiHash( instance ) );
6760			};
6761		}
6762		for ( i = this.containers.length - 1; i >= 0; i-- ) {
6763			if ( !noPropagation ) {
6764				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
6765			}
6766			if ( this.containers[ i ].containerCache.over ) {
6767				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
6768				this.containers[ i ].containerCache.over = 0;
6769			}
6770		}
6771
6772		//Do what was originally in plugins
6773		if ( this.storedCursor ) {
6774			this.document.find( "body" ).css( "cursor", this.storedCursor );
6775			this.storedStylesheet.remove();
6776		}
6777		if ( this._storedOpacity ) {
6778			this.helper.css( "opacity", this._storedOpacity );
6779		}
6780		if ( this._storedZIndex ) {
6781			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
6782		}
6783
6784		this.dragging = false;
6785
6786		if ( !noPropagation ) {
6787			this._trigger( "beforeStop", event, this._uiHash() );
6788		}
6789
6790		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
6791		// it unbinds ALL events from the original node!
6792		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
6793
6794		if ( !this.cancelHelperRemoval ) {
6795			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
6796				this.helper.remove();
6797			}
6798			this.helper = null;
6799		}
6800
6801		if ( !noPropagation ) {
6802			for ( i = 0; i < delayedTriggers.length; i++ ) {
6803
6804				// Trigger all delayed events
6805				delayedTriggers[ i ].call( this, event );
6806			}
6807			this._trigger( "stop", event, this._uiHash() );
6808		}
6809
6810		this.fromOutside = false;
6811		return !this.cancelHelperRemoval;
6812
6813	},
6814
6815	_trigger: function() {
6816		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
6817			this.cancel();
6818		}
6819	},
6820
6821	_uiHash: function( _inst ) {
6822		var inst = _inst || this;
6823		return {
6824			helper: inst.helper,
6825			placeholder: inst.placeholder || $( [] ),
6826			position: inst.position,
6827			originalPosition: inst.originalPosition,
6828			offset: inst.positionAbs,
6829			item: inst.currentItem,
6830			sender: _inst ? _inst.element : null
6831		};
6832	}
6833
6834} );
6835
6836
6837/*!
6838 * jQuery UI 
6838Accordion 1.13.2
6839 * http://jqueryui.com
6840 *
6841 * Copyright jQuery Foundation and other contributors
6842 * Released under the MIT license.
6843 * http://jquery.org/license
6844 */
6845
6846//>>label: Accordion
6847//>>group: Widgets
6848/* eslint-disable max-len */
6849//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
6850/* eslint-enable max-len */
6851//>>docs: http://api.jqueryui.com/accordion/
6852//>>demos: http://jqueryui.com/accordion/
6853//>>css.structure: ../../themes/base/core.css
6854//>>css.structure: ../../themes/base/accordion.css
6855//>>css.theme: ../../themes/base/theme.css
6856
6857
6858var widgetsAccordion = $.widget( "ui.accordion", {
6859	version: "1.13.2
vendor: 15,122 bytes, lines 6859-7438
6859",
6860	options: {
6861		active: 0,
6862		animate: {},
6863		classes: {
6864			"ui-accordion-header": "ui-corner-top",
6865			"ui-accordion-header-collapsed": "ui-corner-all",
6866			"ui-accordion-content": "ui-corner-bottom"
6867		},
6868		collapsible: false,
6869		event: "click",
6870		header: function( elem ) {
6871			return elem.find( "> li > :first-child" ).add( elem.find( "> :not(li)" ).even() );
6872		},
6873		heightStyle: "auto",
6874		icons: {
6875			activeHeader: "ui-icon-triangle-1-s",
6876			header: "ui-icon-triangle-1-e"
6877		},
6878
6879		// Callbacks
6880		activate: null,
6881		beforeActivate: null
6882	},
6883
6884	hideProps: {
6885		borderTopWidth: "hide",
6886		borderBottomWidth: "hide",
6887		paddingTop: "hide",
6888		paddingBottom: "hide",
6889		height: "hide"
6890	},
6891
6892	showProps: {
6893		borderTopWidth: "show",
6894		borderBottomWidth: "show",
6895		paddingTop: "show",
6896		paddingBottom: "show",
6897		height: "show"
6898	},
6899
6900	_create: function() {
6901		var options = this.options;
6902
6903		this.prevShow = this.prevHide = $();
6904		this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
6905		this.element.attr( "role", "tablist" );
6906
6907		// Don't allow collapsible: false and active: false / null
6908		if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
6909			options.active = 0;
6910		}
6911
6912		this._processPanels();
6913
6914		// handle negative values
6915		if ( options.active < 0 ) {
6916			options.active += this.headers.length;
6917		}
6918		this._refresh();
6919	},
6920
6921	_getCreateEventData: function() {
6922		return {
6923			header: this.active,
6924			panel: !this.active.length ? $() : this.active.next()
6925		};
6926	},
6927
6928	_createIcons: function() {
6929		var icon, children,
6930			icons = this.options.icons;
6931
6932		if ( icons ) {
6933			icon = $( "<span>" );
6934			this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
6935			icon.prependTo( this.headers );
6936			children = this.active.children( ".ui-accordion-header-icon" );
6937			this._removeClass( children, icons.header )
6938				._addClass( children, null, icons.activeHeader )
6939				._addClass( this.headers, "ui-accordion-icons" );
6940		}
6941	},
6942
6943	_destroyIcons: function() {
6944		this._removeClass( this.headers, "ui-accordion-icons" );
6945		this.headers.children( ".ui-accordion-header-icon" ).remove();
6946	},
6947
6948	_destroy: function() {
6949		var contents;
6950
6951		// Clean up main element
6952		this.element.removeAttr( "role" );
6953
6954		// Clean up headers
6955		this.headers
6956			.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
6957			.removeUniqueId();
6958
6959		this._destroyIcons();
6960
6961		// Clean up content panels
6962		contents = this.headers.next()
6963			.css( "display", "" )
6964			.removeAttr( "role aria-hidden aria-labelledby" )
6965			.removeUniqueId();
6966
6967		if ( this.options.heightStyle !== "content" ) {
6968			contents.css( "height", "" );
6969		}
6970	},
6971
6972	_setOption: function( key, value ) {
6973		if ( key === "active" ) {
6974
6975			// _activate() will handle invalid values and update this.options
6976			this._activate( value );
6977			return;
6978		}
6979
6980		if ( key === "event" ) {
6981			if ( this.options.event ) {
6982				this._off( this.headers, this.options.event );
6983			}
6984			this._setupEvents( value );
6985		}
6986
6987		this._super( key, value );
6988
6989		// Setting collapsible: false while collapsed; open first panel
6990		if ( key === "collapsible" && !value && this.options.active === false ) {
6991			this._activate( 0 );
6992		}
6993
6994		if ( key === "icons" ) {
6995			this._destroyIcons();
6996			if ( value ) {
6997				this._createIcons();
6998			}
6999		}
7000	},
7001
7002	_setOptionDisabled: function( value ) {
7003		this._super( value );
7004
7005		this.element.attr( "aria-disabled", value );
7006
7007		// Support: IE8 Only
7008		// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
7009		// so we need to add the disabled class to the headers and panels
7010		this._toggleClass( null, "ui-state-disabled", !!value );
7011		this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
7012			!!value );
7013	},
7014
7015	_keydown: function( event ) {
7016		if ( event.altKey || event.ctrlKey ) {
7017			return;
7018		}
7019
7020		var keyCode = $.ui.keyCode,
7021			length = this.headers.length,
7022			currentIndex = this.headers.index( event.target ),
7023			toFocus = false;
7024
7025		switch ( event.keyCode ) {
7026		case keyCode.RIGHT:
7027		case keyCode.DOWN:
7028			toFocus = this.headers[ ( currentIndex + 1 ) % length ];
7029			break;
7030		case keyCode.LEFT:
7031		case keyCode.UP:
7032			toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
7033			break;
7034		case keyCode.SPACE:
7035		case keyCode.ENTER:
7036			this._eventHandler( event );
7037			break;
7038		case keyCode.HOME:
7039			toFocus = this.headers[ 0 ];
7040			break;
7041		case keyCode.END:
7042			toFocus = this.headers[ length - 1 ];
7043			break;
7044		}
7045
7046		if ( toFocus ) {
7047			$( event.target ).attr( "tabIndex", -1 );
7048			$( toFocus ).attr( "tabIndex", 0 );
7049			$( toFocus ).trigger( "focus" );
7050			event.preventDefault();
7051		}
7052	},
7053
7054	_panelKeyDown: function( event ) {
7055		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
7056			$( event.currentTarget ).prev().trigger( "focus" );
7057		}
7058	},
7059
7060	refresh: function() {
7061		var options = this.options;
7062		this._processPanels();
7063
7064		// Was collapsed or no panel
7065		if ( ( options.active === false && options.collapsible === true ) ||
7066				!this.headers.length ) {
7067			options.active = false;
7068			this.active = $();
7069
7070		// active false only when collapsible is true
7071		} else if ( options.active === false ) {
7072			this._activate( 0 );
7073
7074		// was active, but active panel is gone
7075		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
7076
7077			// all remaining panel are disabled
7078			if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
7079				options.active = false;
7080				this.active = $();
7081
7082			// activate previous panel
7083			} else {
7084				this._activate( Math.max( 0, options.active - 1 ) );
7085			}
7086
7087		// was active, active panel still exists
7088		} else {
7089
7090			// make sure active index is correct
7091			options.active = this.headers.index( this.active );
7092		}
7093
7094		this._destroyIcons();
7095
7096		this._refresh();
7097	},
7098
7099	_processPanels: function() {
7100		var prevHeaders = this.headers,
7101			prevPanels = this.panels;
7102
7103		if ( typeof this.options.header === "function" ) {
7104			this.headers = this.options.header( this.element );
7105		} else {
7106			this.headers = this.element.find( this.options.header );
7107		}
7108		this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
7109			"ui-state-default" );
7110
7111		this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
7112		this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
7113
7114		// Avoid memory leaks (#10056)
7115		if ( prevPanels ) {
7116			this._off( prevHeaders.not( this.headers ) );
7117			this._off( prevPanels.not( this.panels ) );
7118		}
7119	},
7120
7121	_refresh: function() {
7122		var maxHeight,
7123			options = this.options,
7124			heightStyle = options.heightStyle,
7125			parent = this.element.parent();
7126
7127		this.active = this._findActive( options.active );
7128		this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
7129			._removeClass( this.active, "ui-accordion-header-collapsed" );
7130		this._addClass( this.active.next(), "ui-accordion-content-active" );
7131		this.active.next().show();
7132
7133		this.headers
7134			.attr( "role", "tab" )
7135			.each( function() {
7136				var header = $( this ),
7137					headerId = header.uniqueId().attr( "id" ),
7138					panel = header.next(),
7139					panelId = panel.uniqueId().attr( "id" );
7140				header.attr( "aria-controls", panelId );
7141				panel.attr( "aria-labelledby", headerId );
7142			} )
7143			.next()
7144				.attr( "role", "tabpanel" );
7145
7146		this.headers
7147			.not( this.active )
7148				.attr( {
7149					"aria-selected": "false",
7150					"aria-expanded": "false",
7151					tabIndex: -1
7152				} )
7153				.next()
7154					.attr( {
7155						"aria-hidden": "true"
7156					} )
7157					.hide();
7158
7159		// Make sure at least one header is in the tab order
7160		if ( !this.active.length ) {
7161			this.headers.eq( 0 ).attr( "tabIndex", 0 );
7162		} else {
7163			this.active.attr( {
7164				"aria-selected": "true",
7165				"aria-expanded": "true",
7166				tabIndex: 0
7167			} )
7168				.next()
7169					.attr( {
7170						"aria-hidden": "false"
7171					} );
7172		}
7173
7174		this._createIcons();
7175
7176		this._setupEvents( options.event );
7177
7178		if ( heightStyle === "fill" ) {
7179			maxHeight = parent.height();
7180			this.element.siblings( ":visible" ).each( function() {
7181				var elem = $( this ),
7182					position = elem.css( "position" );
7183
7184				if ( position === "absolute" || position === "fixed" ) {
7185					return;
7186				}
7187				maxHeight -= elem.outerHeight( true );
7188			} );
7189
7190			this.headers.each( function() {
7191				maxHeight -= $( this ).outerHeight( true );
7192			} );
7193
7194			this.headers.next()
7195				.each( function() {
7196					$( this ).height( Math.max( 0, maxHeight -
7197						$( this ).innerHeight() + $( this ).height() ) );
7198				} )
7199				.css( "overflow", "auto" );
7200		} else if ( heightStyle === "auto" ) {
7201			maxHeight = 0;
7202			this.headers.next()
7203				.each( function() {
7204					var isVisible = $( this ).is( ":visible" );
7205					if ( !isVisible ) {
7206						$( this ).show();
7207					}
7208					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
7209					if ( !isVisible ) {
7210						$( this ).hide();
7211					}
7212				} )
7213				.height( maxHeight );
7214		}
7215	},
7216
7217	_activate: function( index ) {
7218		var active = this._findActive( index )[ 0 ];
7219
7220		// Trying to activate the already active panel
7221		if ( active === this.active[ 0 ] ) {
7222			return;
7223		}
7224
7225		// Trying to collapse, simulate a click on the currently active header
7226		active = active || this.active[ 0 ];
7227
7228		this._eventHandler( {
7229			target: active,
7230			currentTarget: active,
7231			preventDefault: $.noop
7232		} );
7233	},
7234
7235	_findActive: function( selector ) {
7236		return typeof selector === "number" ? this.headers.eq( selector ) : $();
7237	},
7238
7239	_setupEvents: function( event ) {
7240		var events = {
7241			keydown: "_keydown"
7242		};
7243		if ( event ) {
7244			$.each( event.split( " " ), function( index, eventName ) {
7245				events[ eventName ] = "_eventHandler";
7246			} );
7247		}
7248
7249		this._off( this.headers.add( this.headers.next() ) );
7250		this._on( this.headers, events );
7251		this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
7252		this._hoverable( this.headers );
7253		this._focusable( this.headers );
7254	},
7255
7256	_eventHandler: function( event ) {
7257		var activeChildren, clickedChildren,
7258			options = this.options,
7259			active = this.active,
7260			clicked = $( event.currentTarget ),
7261			clickedIsActive = clicked[ 0 ] === active[ 0 ],
7262			collapsing = clickedIsActive && options.collapsible,
7263			toShow = collapsing ? $() : clicked.next(),
7264			toHide = active.next(),
7265			eventData = {
7266				oldHeader: active,
7267				oldPanel: toHide,
7268				newHeader: collapsing ? $() : clicked,
7269				newPanel: toShow
7270			};
7271
7272		event.preventDefault();
7273
7274		if (
7275
7276				// click on active header, but not collapsible
7277				( clickedIsActive && !options.collapsible ) ||
7278
7279				// allow canceling activation
7280				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
7281			return;
7282		}
7283
7284		options.active = collapsing ? false : this.headers.index( clicked );
7285
7286		// When the call to ._toggle() comes after the class changes
7287		// it causes a very odd bug in IE 8 (see #6720)
7288		this.active = clickedIsActive ? $() : clicked;
7289		this._toggle( eventData );
7290
7291		// Switch classes
7292		// corner classes on the previously active header stay after the animation
7293		this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
7294		if ( options.icons ) {
7295			activeChildren = active.children( ".ui-accordion-header-icon" );
7296			this._removeClass( activeChildren, null, options.icons.activeHeader )
7297				._addClass( activeChildren, null, options.icons.header );
7298		}
7299
7300		if ( !clickedIsActive ) {
7301			this._removeClass( clicked, "ui-accordion-header-collapsed" )
7302				._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
7303			if ( options.icons ) {
7304				clickedChildren = clicked.children( ".ui-accordion-header-icon" );
7305				this._removeClass( clickedChildren, null, options.icons.header )
7306					._addClass( clickedChildren, null, options.icons.activeHeader );
7307			}
7308
7309			this._addClass( clicked.next(), "ui-accordion-content-active" );
7310		}
7311	},
7312
7313	_toggle: function( data ) {
7314		var toShow = data.newPanel,
7315			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
7316
7317		// Handle activating a panel during the animation for another activation
7318		this.prevShow.add( this.prevHide ).stop( true, true );
7319		this.prevShow = toShow;
7320		this.prevHide = toHide;
7321
7322		if ( this.options.animate ) {
7323			this._animate( toShow, toHide, data );
7324		} else {
7325			toHide.hide();
7326			toShow.show();
7327			this._toggleComplete( data );
7328		}
7329
7330		toHide.attr( {
7331			"aria-hidden": "true"
7332		} );
7333		toHide.prev().attr( {
7334			"aria-selected": "false",
7335			"aria-expanded": "false"
7336		} );
7337
7338		// if we're switching panels, remove the old header from the tab order
7339		// if we're opening from collapsed state, remove the previous header from the tab order
7340		// if we're collapsing, then keep the collapsing header in the tab order
7341		if ( toShow.length && toHide.length ) {
7342			toHide.prev().attr( {
7343				"tabIndex": -1,
7344				"aria-expanded": "false"
7345			} );
7346		} else if ( toShow.length ) {
7347			this.headers.filter( function() {
7348				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
7349			} )
7350				.attr( "tabIndex", -1 );
7351		}
7352
7353		toShow
7354			.attr( "aria-hidden", "false" )
7355			.prev()
7356				.attr( {
7357					"aria-selected": "true",
7358					"aria-expanded": "true",
7359					tabIndex: 0
7360				} );
7361	},
7362
7363	_animate: function( toShow, toHide, data ) {
7364		var total, easing, duration,
7365			that = this,
7366			adjust = 0,
7367			boxSizing = toShow.css( "box-sizing" ),
7368			down = toShow.length &&
7369				( !toHide.length || ( toShow.index() < toHide.index() ) ),
7370			animate = this.options.animate || {},
7371			options = down && animate.down || animate,
7372			complete = function() {
7373				that._toggleComplete( data );
7374			};
7375
7376		if ( typeof options === "number" ) {
7377			duration = options;
7378		}
7379		if ( typeof options === "string" ) {
7380			easing = options;
7381		}
7382
7383		// fall back from options to animation in case of partial down settings
7384		easing = easing || options.easing || animate.easing;
7385		duration = duration || options.duration || animate.duration;
7386
7387		if ( !toHide.length ) {
7388			return toShow.animate( this.showProps, duration, easing, complete );
7389		}
7390		if ( !toShow.length ) {
7391			return toHide.animate( this.hideProps, duration, easing, complete );
7392		}
7393
7394		total = toShow.show().outerHeight();
7395		toHide.animate( this.hideProps, {
7396			duration: duration,
7397			easing: easing,
7398			step: function( now, fx ) {
7399				fx.now = Math.round( now );
7400			}
7401		} );
7402		toShow
7403			.hide()
7404			.animate( this.showProps, {
7405				duration: duration,
7406				easing: easing,
7407				complete: complete,
7408				step: function( now, fx ) {
7409					fx.now = Math.round( now );
7410					if ( fx.prop !== "height" ) {
7411						if ( boxSizing === "content-box" ) {
7412							adjust += fx.now;
7413						}
7414					} else if ( that.options.heightStyle !== "content" ) {
7415						fx.now = Math.round( total - toHide.outerHeight() - adjust );
7416						adjust = 0;
7417					}
7418				}
7419			} );
7420	},
7421
7422	_toggleComplete: function( data ) {
7423		var toHide = data.oldPanel,
7424			prev = toHide.prev();
7425
7426		this._removeClass( toHide, "ui-accordion-content-active" );
7427		this._removeClass( prev, "ui-accordion-header-active" )
7428			._addClass( prev, "ui-accordion-header-collapsed" );
7429
7430		// Work around for rendering bug in IE (#5421)
7431		if ( toHide.length ) {
7432			toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
7433		}
7434		this._trigger( "activate", null, data );
7435	}
7436} );
7437
7438
7439/*!
7440 * jQuery UI Menu 1.13.2
7441 * http://jqueryui.com
7442 *
7443 * Copyright jQuery Foundation and other contributors
7444 * Released under the MIT license.
7445 * http://jquery.org/license
7446 */
7447
7448//>>label: Menu
7449//>>group: Widgets
7450//>>description: Creates nestable menus.
7451//>>docs: http://api.jqueryui.com/menu/
7452//>>demos: http://jqueryui.com/menu/
7453//>>css.structure: ../../themes/base/core.css
7454//>>css.structure: ../../themes/base/menu.css
7455//>>css.theme: ../../themes/base/theme.css
7456
7457
7458var widgetsMenu = $.widget( "ui.menu", {
7459	version: "1.13.2
vendor: 2,668 bytes, lines 7459-7561
7459",
7460	defaultElement: "<ul>",
7461	delay: 300,
7462	options: {
7463		icons: {
7464			submenu: "ui-icon-caret-1-e"
7465		},
7466		items: "> *",
7467		menus: "ul",
7468		position: {
7469			my: "left top",
7470			at: "right top"
7471		},
7472		role: "menu",
7473
7474		// Callbacks
7475		blur: null,
7476		focus: null,
7477		select: null
7478	},
7479
7480	_create: function() {
7481		this.activeMenu = this.element;
7482
7483		// Flag used to prevent firing of the click handler
7484		// as the event bubbles up through nested menus
7485		this.mouseHandled = false;
7486		this.lastMousePosition = { x: null, y: null };
7487		this.element
7488			.uniqueId()
7489			.attr( {
7490				role: this.options.role,
7491				tabIndex: 0
7492			} );
7493
7494		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
7495		this._on( {
7496
7497			// Prevent focus from sticking to links inside menu after clicking
7498			// them (focus should always stay on UL during navigation).
7499			"mousedown .ui-menu-item": function( event ) {
7500				event.preventDefault();
7501
7502				this._activateItem( event );
7503			},
7504			"click .ui-menu-item": function( event ) {
7505				var target = $( event.target );
7506				var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
7507				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
7508					this.select( event );
7509
7510					// Only set the mouseHandled flag if the event will bubble, see #9469.
7511					if ( !event.isPropagationStopped() ) {
7512						this.mouseHandled = true;
7513					}
7514
7515					// Open submenu on click
7516					if ( target.has( ".ui-menu" ).length ) {
7517						this.expand( event );
7518					} else if ( !this.element.is( ":focus" ) &&
7519							active.closest( ".ui-menu" ).length ) {
7520
7521						// Redirect focus to the menu
7522						this.element.trigger( "focus", [ true ] );
7523
7524						// If the active item is on the top level, let it stay active.
7525						// Otherwise, blur the active item since it is no longer visible.
7526						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
7527							clearTimeout( this.timer );
7528						}
7529					}
7530				}
7531			},
7532			"mouseenter .ui-menu-item": "_activateItem",
7533			"mousemove .ui-menu-item": "_activateItem",
7534			mouseleave: "collapseAll",
7535			"mouseleave .ui-menu": "collapseAll",
7536			focus: function( event, keepActiveItem ) {
7537
7538				// If there's already an active item, keep it active
7539				// If not, activate the first item
7540				var item = this.active || this._menuItems().first();
7541
7542				if ( !keepActiveItem ) {
7543					this.focus( event, item );
7544				}
7545			},
7546			blur: function( event ) {
7547				this._delay( function() {
7548					var notContained = !$.contains(
7549						this.element[ 0 ],
7550						$.ui.safeActiveElement( this.document[ 0 ] )
7551					);
7552					if ( notContained ) {
7553						this.collapseAll( event );
7554					}
7555				} );
7556			},
7557			keydown: "_keydown"
7558		} );
7559
7560		this.refresh();
7561
vendor: 3,056 bytes, lines 7562-7678
7562		// Clicks outside of a menu collapse any open menus
7563		this._on( this.document, {
7564			click: function( event ) {
7565				if ( this._closeOnDocumentClick( event ) ) {
7566					this.collapseAll( event, true );
7567				}
7568
7569				// Reset the mouseHandled flag
7570				this.mouseHandled = false;
7571			}
7572		} );
7573	},
7574
7575	_activateItem: function( event ) {
7576
7577		// Ignore mouse events while typeahead is active, see #10458.
7578		// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
7579		// is over an item in the menu
7580		if ( this.previousFilter ) {
7581			return;
7582		}
7583
7584		// If the mouse didn't actually move, but the page was scrolled, ignore the event (#9356)
7585		if ( event.clientX === this.lastMousePosition.x &&
7586				event.clientY === this.lastMousePosition.y ) {
7587			return;
7588		}
7589
7590		this.lastMousePosition = {
7591			x: event.clientX,
7592			y: event.clientY
7593		};
7594
7595		var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
7596			target = $( event.currentTarget );
7597
7598		// Ignore bubbled events on parent items, see #11641
7599		if ( actualTarget[ 0 ] !== target[ 0 ] ) {
7600			return;
7601		}
7602
7603		// If the item is already active, there's nothing to do
7604		if ( target.is( ".ui-state-active" ) ) {
7605			return;
7606		}
7607
7608		// Remove ui-state-active class from siblings of the newly focused menu item
7609		// to avoid a jump caused by adjacent elements both having a class with a border
7610		this._removeClass( target.siblings().children( ".ui-state-active" ),
7611			null, "ui-state-active" );
7612		this.focus( event, target );
7613	},
7614
7615	_destroy: function() {
7616		var items = this.element.find( ".ui-menu-item" )
7617				.removeAttr( "role aria-disabled" ),
7618			submenus = items.children( ".ui-menu-item-wrapper" )
7619				.removeUniqueId()
7620				.removeAttr( "tabIndex role aria-haspopup" );
7621
7622		// Destroy (sub)menus
7623		this.element
7624			.removeAttr( "aria-activedescendant" )
7625			.find( ".ui-menu" ).addBack()
7626				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
7627					"tabIndex" )
7628				.removeUniqueId()
7629				.show();
7630
7631		submenus.children().each( function() {
7632			var elem = $( this );
7633			if ( elem.data( "ui-menu-submenu-caret" ) ) {
7634				elem.remove();
7635			}
7636		} );
7637	},
7638
7639	_keydown: function( event ) {
7640		var match, prev, character, skip,
7641			preventDefault = true;
7642
7643		switch ( event.keyCode ) {
7644		case $.ui.keyCode.PAGE_UP:
7645			this.previousPage( event );
7646			break;
7647		case $.ui.keyCode.PAGE_DOWN:
7648			this.nextPage( event );
7649			break;
7650		case $.ui.keyCode.HOME:
7651			this._move( "first", "first", event );
7652			break;
7653		case $.ui.keyCode.END:
7654			this._move( "last", "last", event );
7655			break;
7656		case $.ui.keyCode.UP:
7657			this.previous( event );
7658			break;
7659		case $.ui.keyCode.DOWN:
7660			this.next( event );
7661			break;
7662		case $.ui.keyCode.LEFT:
7663			this.collapse( event );
7664			break;
7665		case $.ui.keyCode.RIGHT:
7666			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
7667				this.expand( event );
7668			}
7669			break;
7670		case $.ui.keyCode.ENTER:
7671		case $.ui.keyCode.SPACE:
7672			this._activate( event );
7673			break;
7674		case $.ui.keyCode.ESCAPE:
7675			this.collapse( event );
7676			break;
7677		default:
7678			preventDefault = false;
vendor: 6,930 bytes, lines 7679-7927
7679			prev = this.previousFilter || "";
7680			skip = false;
7681
7682			// Support number pad values
7683			character = event.keyCode >= 96 && event.keyCode <= 105 ?
7684				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
7685
7686			clearTimeout( this.filterTimer );
7687
7688			if ( character === prev ) {
7689				skip = true;
7690			} else {
7691				character = prev + character;
7692			}
7693
7694			match = this._filterMenuItems( character );
7695			match = skip && match.index( this.active.next() ) !== -1 ?
7696				this.active.nextAll( ".ui-menu-item" ) :
7697				match;
7698
7699			// If no matches on the current filter, reset to the last character pressed
7700			// to move down the menu to the first item that starts with that character
7701			if ( !match.length ) {
7702				character = String.fromCharCode( event.keyCode );
7703				match = this._filterMenuItems( character );
7704			}
7705
7706			if ( match.length ) {
7707				this.focus( event, match );
7708				this.previousFilter = character;
7709				this.filterTimer = this._delay( function() {
7710					delete this.previousFilter;
7711				}, 1000 );
7712			} else {
7713				delete this.previousFilter;
7714			}
7715		}
7716
7717		if ( preventDefault ) {
7718			event.preventDefault();
7719		}
7720	},
7721
7722	_activate: function( event ) {
7723		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
7724			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
7725				this.expand( event );
7726			} else {
7727				this.select( event );
7728			}
7729		}
7730	},
7731
7732	refresh: function() {
7733		var menus, items, newSubmenus, newItems, newWrappers,
7734			that = this,
7735			icon = this.options.icons.submenu,
7736			submenus = this.element.find( this.options.menus );
7737
7738		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
7739
7740		// Initialize nested menus
7741		newSubmenus = submenus.filter( ":not(.ui-menu)" )
7742			.hide()
7743			.attr( {
7744				role: this.options.role,
7745				"aria-hidden": "true",
7746				"aria-expanded": "false"
7747			} )
7748			.each( function() {
7749				var menu = $( this ),
7750					item = menu.prev(),
7751					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
7752
7753				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
7754				item
7755					.attr( "aria-haspopup", "true" )
7756					.prepend( submenuCaret );
7757				menu.attr( "aria-labelledby", item.attr( "id" ) );
7758			} );
7759
7760		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
7761
7762		menus = submenus.add( this.element );
7763		items = menus.find( this.options.items );
7764
7765		// Initialize menu-items containing spaces and/or dashes only as dividers
7766		items.not( ".ui-menu-item" ).each( function() {
7767			var item = $( this );
7768			if ( that._isDivider( item ) ) {
7769				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
7770			}
7771		} );
7772
7773		// Don't refresh list items that are already adapted
7774		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
7775		newWrappers = newItems.children()
7776			.not( ".ui-menu" )
7777				.uniqueId()
7778				.attr( {
7779					tabIndex: -1,
7780					role: this._itemRole()
7781				} );
7782		this._addClass( newItems, "ui-menu-item" )
7783			._addClass( newWrappers, "ui-menu-item-wrapper" );
7784
7785		// Add aria-disabled attribute to any disabled menu item
7786		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
7787
7788		// If the active item has been removed, blur the menu
7789		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
7790			this.blur();
7791		}
7792	},
7793
7794	_itemRole: function() {
7795		return {
7796			menu: "menuitem",
7797			listbox: "option"
7798		}[ this.options.role ];
7799	},
7800
7801	_setOption: function( key, value ) {
7802		if ( key === "icons" ) {
7803			var icons = this.element.find( ".ui-menu-icon" );
7804			this._removeClass( icons, null, this.options.icons.submenu )
7805				._addClass( icons, null, value.submenu );
7806		}
7807		this._super( key, value );
7808	},
7809
7810	_setOptionDisabled: function( value ) {
7811		this._super( value );
7812
7813		this.element.attr( "aria-disabled", String( value ) );
7814		this._toggleClass( null, "ui-state-disabled", !!value );
7815	},
7816
7817	focus: function( event, item ) {
7818		var nested, focused, activeParent;
7819		this.blur( event, event && event.type === "focus" );
7820
7821		this._scrollIntoView( item );
7822
7823		this.active = item.first();
7824
7825		focused = this.active.children( ".ui-menu-item-wrapper" );
7826		this._addClass( focused, null, "ui-state-active" );
7827
7828		// Only update aria-activedescendant if there's a role
7829		// otherwise we assume focus is managed elsewhere
7830		if ( this.options.role ) {
7831			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
7832		}
7833
7834		// Highlight active parent menu item, if any
7835		activeParent = this.active
7836			.parent()
7837				.closest( ".ui-menu-item" )
7838					.children( ".ui-menu-item-wrapper" );
7839		this._addClass( activeParent, null, "ui-state-active" );
7840
7841		if ( event && event.type === "keydown" ) {
7842			this._close();
7843		} else {
7844			this.timer = this._delay( function() {
7845				this._close();
7846			}, this.delay );
7847		}
7848
7849		nested = item.children( ".ui-menu" );
7850		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
7851			this._startOpening( nested );
7852		}
7853		this.activeMenu = item.parent();
7854
7855		this._trigger( "focus", event, { item: item } );
7856	},
7857
7858	_scrollIntoView: function( item ) {
7859		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
7860		if ( this._hasScroll() ) {
7861			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
7862			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
7863			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
7864			scroll = this.activeMenu.scrollTop();
7865			elementHeight = this.activeMenu.height();
7866			itemHeight = item.outerHeight();
7867
7868			if ( offset < 0 ) {
7869				this.activeMenu.scrollTop( scroll + offset );
7870			} else if ( offset + itemHeight > elementHeight ) {
7871				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
7872			}
7873		}
7874	},
7875
7876	blur: function( event, fromFocus ) {
7877		if ( !fromFocus ) {
7878			clearTimeout( this.timer );
7879		}
7880
7881		if ( !this.active ) {
7882			return;
7883		}
7884
7885		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
7886			null, "ui-state-active" );
7887
7888		this._trigger( "blur", event, { item: this.active } );
7889		this.active = null;
7890	},
7891
7892	_startOpening: function( submenu ) {
7893		clearTimeout( this.timer );
7894
7895		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
7896		// shift in the submenu position when mousing over the caret icon
7897		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
7898			return;
7899		}
7900
7901		this.timer = this._delay( function() {
7902			this._close();
7903			this._open( submenu );
7904		}, this.delay );
7905	},
7906
7907	_open: function( submenu ) {
7908		var position = $.extend( {
7909			of: this.active
7910		}, this.options.position );
7911
7912		clearTimeout( this.timer );
7913		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
7914			.hide()
7915			.attr( "aria-hidden", "true" );
7916
7917		submenu
7918			.show()
7919			.removeAttr( "aria-hidden" )
7920			.attr( "aria-expanded", "true" )
7921			.position( position );
7922	},
7923
7924	collapseAll: function( event, all ) {
7925		clearTimeout( this.timer );
7926		this.timer = this._delay( function() {
7927
vendor: 5,432 bytes, lines 7928-8131
7928			// If we were passed an event, look for the submenu that contains the event
7929			var currentMenu = all ? this.element :
7930				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
7931
7932			// If we found no valid submenu ancestor, use the main menu to close all
7933			// sub menus anyway
7934			if ( !currentMenu.length ) {
7935				currentMenu = this.element;
7936			}
7937
7938			this._close( currentMenu );
7939
7940			this.blur( event );
7941
7942			// Work around active item staying active after menu is blurred
7943			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
7944
7945			this.activeMenu = currentMenu;
7946		}, all ? 0 : this.delay );
7947	},
7948
7949	// With no arguments, closes the currently active menu - if nothing is active
7950	// it closes all menus.  If passed an argument, it will search for menus BELOW
7951	_close: function( startMenu ) {
7952		if ( !startMenu ) {
7953			startMenu = this.active ? this.active.parent() : this.element;
7954		}
7955
7956		startMenu.find( ".ui-menu" )
7957			.hide()
7958			.attr( "aria-hidden", "true" )
7959			.attr( "aria-expanded", "false" );
7960	},
7961
7962	_closeOnDocumentClick: function( event ) {
7963		return !$( event.target ).closest( ".ui-menu" ).length;
7964	},
7965
7966	_isDivider: function( item ) {
7967
7968		// Match hyphen, em dash, en dash
7969		return !/[^\-\u2014\u2013\s]/.test( item.text() );
7970	},
7971
7972	collapse: function( event ) {
7973		var newItem = this.active &&
7974			this.active.parent().closest( ".ui-menu-item", this.element );
7975		if ( newItem && newItem.length ) {
7976			this._close();
7977			this.focus( event, newItem );
7978		}
7979	},
7980
7981	expand: function( event ) {
7982		var newItem = this.active && this._menuItems( this.active.children( ".ui-menu" ) ).first();
7983
7984		if ( newItem && newItem.length ) {
7985			this._open( newItem.parent() );
7986
7987			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
7988			this._delay( function() {
7989				this.focus( event, newItem );
7990			} );
7991		}
7992	},
7993
7994	next: function( event ) {
7995		this._move( "next", "first", event );
7996	},
7997
7998	previous: function( event ) {
7999		this._move( "prev", "last", event );
8000	},
8001
8002	isFirstItem: function() {
8003		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
8004	},
8005
8006	isLastItem: function() {
8007		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
8008	},
8009
8010	_menuItems: function( menu ) {
8011		return ( menu || this.element )
8012			.find( this.options.items )
8013			.filter( ".ui-menu-item" );
8014	},
8015
8016	_move: function( direction, filter, event ) {
8017		var next;
8018		if ( this.active ) {
8019			if ( direction === "first" || direction === "last" ) {
8020				next = this.active
8021					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
8022					.last();
8023			} else {
8024				next = this.active
8025					[ direction + "All" ]( ".ui-menu-item" )
8026					.first();
8027			}
8028		}
8029		if ( !next || !next.length || !this.active ) {
8030			next = this._menuItems( this.activeMenu )[ filter ]();
8031		}
8032
8033		this.focus( event, next );
8034	},
8035
8036	nextPage: function( event ) {
8037		var item, base, height;
8038
8039		if ( !this.active ) {
8040			this.next( event );
8041			return;
8042		}
8043		if ( this.isLastItem() ) {
8044			return;
8045		}
8046		if ( this._hasScroll() ) {
8047			base = this.active.offset().top;
8048			height = this.element.innerHeight();
8049
8050			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
8051			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
8052				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
8053			}
8054
8055			this.active.nextAll( ".ui-menu-item" ).each( function() {
8056				item = $( this );
8057				return item.offset().top - base - height < 0;
8058			} );
8059
8060			this.focus( event, item );
8061		} else {
8062			this.focus( event, this._menuItems( this.activeMenu )
8063				[ !this.active ? "first" : "last" ]() );
8064		}
8065	},
8066
8067	previousPage: function( event ) {
8068		var item, base, height;
8069		if ( !this.active ) {
8070			this.next( event );
8071			return;
8072		}
8073		if ( this.isFirstItem() ) {
8074			return;
8075		}
8076		if ( this._hasScroll() ) {
8077			base = this.active.offset().top;
8078			height = this.element.innerHeight();
8079
8080			// jQuery 3.2 doesn't include scrollbars in innerHeight, add it back.
8081			if ( $.fn.jquery.indexOf( "3.2." ) === 0 ) {
8082				height += this.element[ 0 ].offsetHeight - this.element.outerHeight();
8083			}
8084
8085			this.active.prevAll( ".ui-menu-item" ).each( function() {
8086				item = $( this );
8087				return item.offset().top - base + height > 0;
8088			} );
8089
8090			this.focus( event, item );
8091		} else {
8092			this.focus( event, this._menuItems( this.activeMenu ).first() );
8093		}
8094	},
8095
8096	_hasScroll: function() {
8097		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
8098	},
8099
8100	select: function( event ) {
8101
8102		// TODO: It should never be possible to not have an active item at this
8103		// point, but the tests don't trigger mouseenter before click.
8104		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
8105		var ui = { item: this.active };
8106		if ( !this.active.has( ".ui-menu" ).length ) {
8107			this.collapseAll( event, true );
8108		}
8109		this._trigger( "select", event, ui );
8110	},
8111
8112	_filterMenuItems: function( character ) {
8113		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
8114			regex = new RegExp( "^" + escapedCharacter, "i" );
8115
8116		return this.activeMenu
8117			.find( this.options.items )
8118
8119				// Only match on items, not dividers or other content (#10571)
8120				.filter( ".ui-menu-item" )
8121					.filter( function() {
8122						return regex.test(
8123							String.prototype.trim.call(
8124								$( this ).children( ".ui-menu-item-wrapper" ).text() ) );
8125					} );
8126	}
8127} );
8128
8129
8130/*!
8131 * jQuery UI Autocomplete 1.1
81313.2
8132 * http://jqueryui.com
8133 *
8134 * Copyright jQuery Foundation and other contributors
8135 * Released under the MIT license.
8136 * http://jquery.org/license
8137 */
8138
8139//>>label: Autocomplete
8140//>>group: Widgets
8141//>>description: Lists suggested words as the user is typing.
8142//>>docs: http://api.jqueryui.com/autocomplete/
8143//>>demos: http://jqueryui.com/autocomplete/
8144//>>css.structure: ../../themes/base/core.css
8145//>>css.structure: ../../themes/base/autocomplete.css
8146//>>css.theme: ../../themes/base/theme.css
8147
8148
8149$.widget( "ui.autocomplete", {
8150	version: "1.13.2
vendor: 16,621 bytes, lines 8150-8787
8150",
8151	defaultElement: "<input>",
8152	options: {
8153		appendTo: null,
8154		autoFocus: false,
8155		delay: 300,
8156		minLength: 1,
8157		position: {
8158			my: "left top",
8159			at: "left bottom",
8160			collision: "none"
8161		},
8162		source: null,
8163
8164		// Callbacks
8165		change: null,
8166		close: null,
8167		focus: null,
8168		open: null,
8169		response: null,
8170		search: null,
8171		select: null
8172	},
8173
8174	requestIndex: 0,
8175	pending: 0,
8176	liveRegionTimer: null,
8177
8178	_create: function() {
8179
8180		// Some browsers only repeat keydown events, not keypress events,
8181		// so we use the suppressKeyPress flag to determine if we've already
8182		// handled the keydown event. #7269
8183		// Unfortunately the code for & in keypress is the same as the up arrow,
8184		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
8185		// events when we know the keydown event was used to modify the
8186		// search term. #7799
8187		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
8188			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
8189			isTextarea = nodeName === "textarea",
8190			isInput = nodeName === "input";
8191
8192		// Textareas are always multi-line
8193		// Inputs are always single-line, even if inside a contentEditable element
8194		// IE also treats inputs as contentEditable
8195		// All other element types are determined by whether or not they're contentEditable
8196		this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
8197
8198		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
8199		this.isNewMenu = true;
8200
8201		this._addClass( "ui-autocomplete-input" );
8202		this.element.attr( "autocomplete", "off" );
8203
8204		this._on( this.element, {
8205			keydown: function( event ) {
8206				if ( this.element.prop( "readOnly" ) ) {
8207					suppressKeyPress = true;
8208					suppressInput = true;
8209					suppressKeyPressRepeat = true;
8210					return;
8211				}
8212
8213				suppressKeyPress = false;
8214				suppressInput = false;
8215				suppressKeyPressRepeat = false;
8216				var keyCode = $.ui.keyCode;
8217				switch ( event.keyCode ) {
8218				case keyCode.PAGE_UP:
8219					suppressKeyPress = true;
8220					this._move( "previousPage", event );
8221					break;
8222				case keyCode.PAGE_DOWN:
8223					suppressKeyPress = true;
8224					this._move( "nextPage", event );
8225					break;
8226				case keyCode.UP:
8227					suppressKeyPress = true;
8228					this._keyEvent( "previous", event );
8229					break;
8230				case keyCode.DOWN:
8231					suppressKeyPress = true;
8232					this._keyEvent( "next", event );
8233					break;
8234				case keyCode.ENTER:
8235
8236					// when menu is open and has focus
8237					if ( this.menu.active ) {
8238
8239						// #6055 - Opera still allows the keypress to occur
8240						// which causes forms to submit
8241						suppressKeyPress = true;
8242						event.preventDefault();
8243						this.menu.select( event );
8244					}
8245					break;
8246				case keyCode.TAB:
8247					if ( this.menu.active ) {
8248						this.menu.select( event );
8249					}
8250					break;
8251				case keyCode.ESCAPE:
8252					if ( this.menu.element.is( ":visible" ) ) {
8253						if ( !this.isMultiLine ) {
8254							this._value( this.term );
8255						}
8256						this.close( event );
8257
8258						// Different browsers have different default behavior for escape
8259						// Single press can mean undo or clear
8260						// Double press in IE means clear the whole form
8261						event.preventDefault();
8262					}
8263					break;
8264				default:
8265					suppressKeyPressRepeat = true;
8266
8267					// search timeout should be triggered before the input value is changed
8268					this._searchTimeout( event );
8269					break;
8270				}
8271			},
8272			keypress: function( event ) {
8273				if ( suppressKeyPress ) {
8274					suppressKeyPress = false;
8275					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
8276						event.preventDefault();
8277					}
8278					return;
8279				}
8280				if ( suppressKeyPressRepeat ) {
8281					return;
8282				}
8283
8284				// Replicate some key handlers to allow them to repeat in Firefox and Opera
8285				var keyCode = $.ui.keyCode;
8286				switch ( event.keyCode ) {
8287				case keyCode.PAGE_UP:
8288					this._move( "previousPage", event );
8289					break;
8290				case keyCode.PAGE_DOWN:
8291					this._move( "nextPage", event );
8292					break;
8293				case keyCode.UP:
8294					this._keyEvent( "previous", event );
8295					break;
8296				case keyCode.DOWN:
8297					this._keyEvent( "next", event );
8298					break;
8299				}
8300			},
8301			input: function( event ) {
8302				if ( suppressInput ) {
8303					suppressInput = false;
8304					event.preventDefault();
8305					return;
8306				}
8307				this._searchTimeout( event );
8308			},
8309			focus: function() {
8310				this.selectedItem = null;
8311				this.previous = this._value();
8312			},
8313			blur: function( event ) {
8314				clearTimeout( this.searching );
8315				this.close( event );
8316				this._change( event );
8317			}
8318		} );
8319
8320		this._initSource();
8321		this.menu = $( "<ul>" )
8322			.appendTo( this._appendTo() )
8323			.menu( {
8324
8325				// disable ARIA support, the live region takes care of that
8326				role: null
8327			} )
8328			.hide()
8329
8330			// Support: IE 11 only, Edge <= 14
8331			// For other browsers, we preventDefault() on the mousedown event
8332			// to keep the dropdown from taking focus from the input. This doesn't
8333			// work for IE/Edge, causing problems with selection and scrolling (#9638)
8334			// Happily, IE and Edge support an "unselectable" attribute that
8335			// prevents an element from receiving focus, exactly what we want here.
8336			.attr( {
8337				"unselectable": "on"
8338			} )
8339			.menu( "instance" );
8340
8341		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
8342		this._on( this.menu.element, {
8343			mousedown: function( event ) {
8344
8345				// Prevent moving focus out of the text field
8346				event.preventDefault();
8347			},
8348			menufocus: function( event, ui ) {
8349				var label, item;
8350
8351				// support: Firefox
8352				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
8353				if ( this.isNewMenu ) {
8354					this.isNewMenu = false;
8355					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
8356						this.menu.blur();
8357
8358						this.document.one( "mousemove", function() {
8359							$( event.target ).trigger( event.originalEvent );
8360						} );
8361
8362						return;
8363					}
8364				}
8365
8366				item = ui.item.data( "ui-autocomplete-item" );
8367				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
8368
8369					// use value to match what will end up in the input, if it was a key event
8370					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
8371						this._value( item.value );
8372					}
8373				}
8374
8375				// Announce the value in the liveRegion
8376				label = ui.item.attr( "aria-label" ) || item.value;
8377				if ( label && String.prototype.trim.call( label ).length ) {
8378					clearTimeout( this.liveRegionTimer );
8379					this.liveRegionTimer = this._delay( function() {
8380						this.liveRegion.html( $( "<div>" ).text( label ) );
8381					}, 100 );
8382				}
8383			},
8384			menuselect: function( event, ui ) {
8385				var item = ui.item.data( "ui-autocomplete-item" ),
8386					previous = this.previous;
8387
8388				// Only trigger when focus was lost (click on menu)
8389				if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
8390					this.element.trigger( "focus" );
8391					this.previous = previous;
8392
8393					// #6109 - IE triggers two focus events and the second
8394					// is asynchronous, so we need to reset the previous
8395					// term synchronously and asynchronously :-(
8396					this._delay( function() {
8397						this.previous = previous;
8398						this.selectedItem = item;
8399					} );
8400				}
8401
8402				if ( false !== this._trigger( "select", event, { item: item } ) ) {
8403					this._value( item.value );
8404				}
8405
8406				// reset the term after the select event
8407				// this allows custom select handling to work properly
8408				this.term = this._value();
8409
8410				this.close( event );
8411				this.selectedItem = item;
8412			}
8413		} );
8414
8415		this.liveRegion = $( "<div>", {
8416			role: "status",
8417			"aria-live": "assertive",
8418			"aria-relevant": "additions"
8419		} )
8420			.appendTo( this.document[ 0 ].body );
8421
8422		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
8423
8424		// Turning off autocomplete prevents the browser from remembering the
8425		// value when navigating through history, so we re-enable autocomplete
8426		// if the page is unloaded before the widget is destroyed. #7790
8427		this._on( this.window, {
8428			beforeunload: function() {
8429				this.element.removeAttr( "autocomplete" );
8430			}
8431		} );
8432	},
8433
8434	_destroy: function() {
8435		clearTimeout( this.searching );
8436		this.element.removeAttr( "autocomplete" );
8437		this.menu.element.remove();
8438		this.liveRegion.remove();
8439	},
8440
8441	_setOption: function( key, value ) {
8442		this._super( key, value );
8443		if ( key === "source" ) {
8444			this._initSource();
8445		}
8446		if ( key === "appendTo" ) {
8447			this.menu.element.appendTo( this._appendTo() );
8448		}
8449		if ( key === "disabled" && value && this.xhr ) {
8450			this.xhr.abort();
8451		}
8452	},
8453
8454	_isEventTargetInWidget: function( event ) {
8455		var menuElement = this.menu.element[ 0 ];
8456
8457		return event.target === this.element[ 0 ] ||
8458			event.target === menuElement ||
8459			$.contains( menuElement, event.target );
8460	},
8461
8462	_closeOnClickOutside: function( event ) {
8463		if ( !this._isEventTargetInWidget( event ) ) {
8464			this.close();
8465		}
8466	},
8467
8468	_appendTo: function() {
8469		var element = this.options.appendTo;
8470
8471		if ( element ) {
8472			element = element.jquery || element.nodeType ?
8473				$( element ) :
8474				this.document.find( element ).eq( 0 );
8475		}
8476
8477		if ( !element || !element[ 0 ] ) {
8478			element = this.element.closest( ".ui-front, dialog" );
8479		}
8480
8481		if ( !element.length ) {
8482			element = this.document[ 0 ].body;
8483		}
8484
8485		return element;
8486	},
8487
8488	_initSource: function() {
8489		var array, url,
8490			that = this;
8491		if ( Array.isArray( this.options.source ) ) {
8492			array = this.options.source;
8493			this.source = function( request, response ) {
8494				response( $.ui.autocomplete.filter( array, request.term ) );
8495			};
8496		} else if ( typeof this.options.source === "string" ) {
8497			url = this.options.source;
8498			this.source = function( request, response ) {
8499				if ( that.xhr ) {
8500					that.xhr.abort();
8501				}
8502				that.xhr = $.ajax( {
8503					url: url,
8504					data: request,
8505					dataType: "json",
8506					success: function( data ) {
8507						response( data );
8508					},
8509					error: function() {
8510						response( [] );
8511					}
8512				} );
8513			};
8514		} else {
8515			this.source = this.options.source;
8516		}
8517	},
8518
8519	_searchTimeout: function( event ) {
8520		clearTimeout( this.searching );
8521		this.searching = this._delay( function() {
8522
8523			// Search if the value has changed, or if the user retypes the same value (see #7434)
8524			var equalValues = this.term === this._value(),
8525				menuVisible = this.menu.element.is( ":visible" ),
8526				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
8527
8528			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
8529				this.selectedItem = null;
8530				this.search( null, event );
8531			}
8532		}, this.options.delay );
8533	},
8534
8535	search: function( value, event ) {
8536		value = value != null ? value : this._value();
8537
8538		// Always save the actual value, not the one passed as an argument
8539		this.term = this._value();
8540
8541		if ( value.length < this.options.minLength ) {
8542			return this.close( event );
8543		}
8544
8545		if ( this._trigger( "search", event ) === false ) {
8546			return;
8547		}
8548
8549		return this._search( value );
8550	},
8551
8552	_search: function( value ) {
8553		this.pending++;
8554		this._addClass( "ui-autocomplete-loading" );
8555		this.cancelSearch = false;
8556
8557		this.source( { term: value }, this._response() );
8558	},
8559
8560	_response: function() {
8561		var index = ++this.requestIndex;
8562
8563		return function( content ) {
8564			if ( index === this.requestIndex ) {
8565				this.__response( content );
8566			}
8567
8568			this.pending--;
8569			if ( !this.pending ) {
8570				this._removeClass( "ui-autocomplete-loading" );
8571			}
8572		}.bind( this );
8573	},
8574
8575	__response: function( content ) {
8576		if ( content ) {
8577			content = this._normalize( content );
8578		}
8579		this._trigger( "response", null, { content: content } );
8580		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
8581			this._suggest( content );
8582			this._trigger( "open" );
8583		} else {
8584
8585			// use ._close() instead of .close() so we don't cancel future searches
8586			this._close();
8587		}
8588	},
8589
8590	close: function( event ) {
8591		this.cancelSearch = true;
8592		this._close( event );
8593	},
8594
8595	_close: function( event ) {
8596
8597		// Remove the handler that closes the menu on outside clicks
8598		this._off( this.document, "mousedown" );
8599
8600		if ( this.menu.element.is( ":visible" ) ) {
8601			this.menu.element.hide();
8602			this.menu.blur();
8603			this.isNewMenu = true;
8604			this._trigger( "close", event );
8605		}
8606	},
8607
8608	_change: function( event ) {
8609		if ( this.previous !== this._value() ) {
8610			this._trigger( "change", event, { item: this.selectedItem } );
8611		}
8612	},
8613
8614	_normalize: function( items ) {
8615
8616		// assume all items have the right format when the first item is complete
8617		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
8618			return items;
8619		}
8620		return $.map( items, function( item ) {
8621			if ( typeof item === "string" ) {
8622				return {
8623					label: item,
8624					value: item
8625				};
8626			}
8627			return $.extend( {}, item, {
8628				label: item.label || item.value,
8629				value: item.value || item.label
8630			} );
8631		} );
8632	},
8633
8634	_suggest: function( items ) {
8635		var ul = this.menu.element.empty();
8636		this._renderMenu( ul, items );
8637		this.isNewMenu = true;
8638		this.menu.refresh();
8639
8640		// Size and position menu
8641		ul.show();
8642		this._resizeMenu();
8643		ul.position( $.extend( {
8644			of: this.element
8645		}, this.options.position ) );
8646
8647		if ( this.options.autoFocus ) {
8648			this.menu.next();
8649		}
8650
8651		// Listen for interactions outside of the widget (#6642)
8652		this._on( this.document, {
8653			mousedown: "_closeOnClickOutside"
8654		} );
8655	},
8656
8657	_resizeMenu: function() {
8658		var ul = this.menu.element;
8659		ul.outerWidth( Math.max(
8660
8661			// Firefox wraps long text (possibly a rounding bug)
8662			// so we add 1px to avoid the wrapping (#7513)
8663			ul.width( "" ).outerWidth() + 1,
8664			this.element.outerWidth()
8665		) );
8666	},
8667
8668	_renderMenu: function( ul, items ) {
8669		var that = this;
8670		$.each( items, function( index, item ) {
8671			that._renderItemData( ul, item );
8672		} );
8673	},
8674
8675	_renderItemData: function( ul, item ) {
8676		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
8677	},
8678
8679	_renderItem: function( ul, item ) {
8680		return $( "<li>" )
8681			.append( $( "<div>" ).text( item.label ) )
8682			.appendTo( ul );
8683	},
8684
8685	_move: function( direction, event ) {
8686		if ( !this.menu.element.is( ":visible" ) ) {
8687			this.search( null, event );
8688			return;
8689		}
8690		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
8691				this.menu.isLastItem() && /^next/.test( direction ) ) {
8692
8693			if ( !this.isMultiLine ) {
8694				this._value( this.term );
8695			}
8696
8697			this.menu.blur();
8698			return;
8699		}
8700		this.menu[ direction ]( event );
8701	},
8702
8703	widget: function() {
8704		return this.menu.element;
8705	},
8706
8707	_value: function() {
8708		return this.valueMethod.apply( this.element, arguments );
8709	},
8710
8711	_keyEvent: function( keyEvent, event ) {
8712		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
8713			this._move( keyEvent, event );
8714
8715			// Prevents moving cursor to beginning/end of the text field in some browsers
8716			event.preventDefault();
8717		}
8718	},
8719
8720	// Support: Chrome <=50
8721	// We should be able to just use this.element.prop( "isContentEditable" )
8722	// but hidden elements always report false in Chrome.
8723	// https://code.google.com/p/chromium/issues/detail?id=313082
8724	_isContentEditable: function( element ) {
8725		if ( !element.length ) {
8726			return false;
8727		}
8728
8729		var editable = element.prop( "contentEditable" );
8730
8731		if ( editable === "inherit" ) {
8732			return this._isContentEditable( element.parent() );
8733		}
8734
8735		return editable === "true";
8736	}
8737} );
8738
8739$.extend( $.ui.autocomplete, {
8740	escapeRegex: function( value ) {
8741		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
8742	},
8743	filter: function( array, term ) {
8744		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
8745		return $.grep( array, function( value ) {
8746			return matcher.test( value.label || value.value || value );
8747		} );
8748	}
8749} );
8750
8751// Live region extension, adding a `messages` option
8752// NOTE: This is an experimental API. We are still investigating
8753// a full solution for string manipulation and internationalization.
8754$.widget( "ui.autocomplete", $.ui.autocomplete, {
8755	options: {
8756		messages: {
8757			noResults: "No search results.",
8758			results: function( amount ) {
8759				return amount + ( amount > 1 ? " results are" : " result is" ) +
8760					" available, use up and down arrow keys to navigate.";
8761			}
8762		}
8763	},
8764
8765	__response: function( content ) {
8766		var message;
8767		this._superApply( arguments );
8768		if ( this.options.disabled || this.cancelSearch ) {
8769			return;
8770		}
8771		if ( content && content.length ) {
8772			message = this.options.messages.results( content.length );
8773		} else {
8774			message = this.options.messages.noResults;
8775		}
8776		clearTimeout( this.liveRegionTimer );
8777		this.liveRegionTimer = this._delay( function() {
8778			this.liveRegion.html( $( "<div>" ).text( message ) );
8779		}, 100 );
8780	}
8781} );
8782
8783var widgetsAutocomplete = $.ui.autocomplete;
8784
8785
8786/*!
8787 * jQuery UI Controlgroup 1.13.
87872
8788 * http://jqueryui.com
8789 *
8790 * Copyright jQuery Foundation and other contributors
8791 * Released under the MIT license.
8792 * http://jquery.org/license
8793 */
8794
8795//>>label: Controlgroup
8796//>>group: Widgets
8797//>>description: Visually groups form control widgets
8798//>>docs: http://api.jqueryui.com/controlgroup/
8799//>>demos: http://jqueryui.com/controlgroup/
8800//>>css.structure: ../../themes/base/core.css
8801//>>css.structure: ../../themes/base/controlgroup.css
8802//>>css.theme: ../../themes/base/theme.css
8803
8804
8805var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
8806
8807var widgetsControlgroup = $.widget( "ui.controlgroup", {
8808	version: "1.13
vendor: 7,736 bytes, lines 8808-9072
8808.2",
8809	defaultElement: "<div>",
8810	options: {
8811		direction: "horizontal",
8812		disabled: null,
8813		onlyVisible: true,
8814		items: {
8815			"button": "input[type=button], input[type=submit], input[type=reset], button, a",
8816			"controlgroupLabel": ".ui-controlgroup-label",
8817			"checkboxradio": "input[type='checkbox'], input[type='radio']",
8818			"selectmenu": "select",
8819			"spinner": ".ui-spinner-input"
8820		}
8821	},
8822
8823	_create: function() {
8824		this._enhance();
8825	},
8826
8827	// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
8828	_enhance: function() {
8829		this.element.attr( "role", "toolbar" );
8830		this.refresh();
8831	},
8832
8833	_destroy: function() {
8834		this._callChildMethod( "destroy" );
8835		this.childWidgets.removeData( "ui-controlgroup-data" );
8836		this.element.removeAttr( "role" );
8837		if ( this.options.items.controlgroupLabel ) {
8838			this.element
8839				.find( this.options.items.controlgroupLabel )
8840				.find( ".ui-controlgroup-label-contents" )
8841				.contents().unwrap();
8842		}
8843	},
8844
8845	_initWidgets: function() {
8846		var that = this,
8847			childWidgets = [];
8848
8849		// First we iterate over each of the items options
8850		$.each( this.options.items, function( widget, selector ) {
8851			var labels;
8852			var options = {};
8853
8854			// Make sure the widget has a selector set
8855			if ( !selector ) {
8856				return;
8857			}
8858
8859			if ( widget === "controlgroupLabel" ) {
8860				labels = that.element.find( selector );
8861				labels.each( function() {
8862					var element = $( this );
8863
8864					if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
8865						return;
8866					}
8867					element.contents()
8868						.wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
8869				} );
8870				that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
8871				childWidgets = childWidgets.concat( labels.get() );
8872				return;
8873			}
8874
8875			// Make sure the widget actually exists
8876			if ( !$.fn[ widget ] ) {
8877				return;
8878			}
8879
8880			// We assume everything is in the middle to start because we can't determine
8881			// first / last elements until all enhancments are done.
8882			if ( that[ "_" + widget + "Options" ] ) {
8883				options = that[ "_" + widget + "Options" ]( "middle" );
8884			} else {
8885				options = { classes: {} };
8886			}
8887
8888			// Find instances of this widget inside controlgroup and init them
8889			that.element
8890				.find( selector )
8891				.each( function() {
8892					var element = $( this );
8893					var instance = element[ widget ]( "instance" );
8894
8895					// We need to clone the default options for this type of widget to avoid
8896					// polluting the variable options which has a wider scope than a single widget.
8897					var instanceOptions = $.widget.extend( {}, options );
8898
8899					// If the button is the child of a spinner ignore it
8900					// TODO: Find a more generic solution
8901					if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
8902						return;
8903					}
8904
8905					// Create the widget if it doesn't exist
8906					if ( !instance ) {
8907						instance = element[ widget ]()[ widget ]( "instance" );
8908					}
8909					if ( instance ) {
8910						instanceOptions.classes =
8911							that._resolveClassesValues( instanceOptions.classes, instance );
8912					}
8913					element[ widget ]( instanceOptions );
8914
8915					// Store an instance of the controlgroup to be able to reference
8916					// from the outermost element for changing options and refresh
8917					var widgetElement = element[ widget ]( "widget" );
8918					$.data( widgetElement[ 0 ], "ui-controlgroup-data",
8919						instance ? instance : element[ widget ]( "instance" ) );
8920
8921					childWidgets.push( widgetElement[ 0 ] );
8922				} );
8923		} );
8924
8925		this.childWidgets = $( $.uniqueSort( childWidgets ) );
8926		this._addClass( this.childWidgets, "ui-controlgroup-item" );
8927	},
8928
8929	_callChildMethod: function( method ) {
8930		this.childWidgets.each( function() {
8931			var element = $( this ),
8932				data = element.data( "ui-controlgroup-data" );
8933			if ( data && data[ method ] ) {
8934				data[ method ]();
8935			}
8936		} );
8937	},
8938
8939	_updateCornerClass: function( element, position ) {
8940		var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
8941		var add = this._buildSimpleOptions( position, "label" ).classes.label;
8942
8943		this._removeClass( element, null, remove );
8944		this._addClass( element, null, add );
8945	},
8946
8947	_buildSimpleOptions: function( position, key ) {
8948		var direction = this.options.direction === "vertical";
8949		var result = {
8950			classes: {}
8951		};
8952		result.classes[ key ] = {
8953			"middle": "",
8954			"first": "ui-corner-" + ( direction ? "top" : "left" ),
8955			"last": "ui-corner-" + ( direction ? "bottom" : "right" ),
8956			"only": "ui-corner-all"
8957		}[ position ];
8958
8959		return result;
8960	},
8961
8962	_spinnerOptions: function( position ) {
8963		var options = this._buildSimpleOptions( position, "ui-spinner" );
8964
8965		options.classes[ "ui-spinner-up" ] = "";
8966		options.classes[ "ui-spinner-down" ] = "";
8967
8968		return options;
8969	},
8970
8971	_buttonOptions: function( position ) {
8972		return this._buildSimpleOptions( position, "ui-button" );
8973	},
8974
8975	_checkboxradioOptions: function( position ) {
8976		return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
8977	},
8978
8979	_selectmenuOptions: function( position ) {
8980		var direction = this.options.direction === "vertical";
8981		return {
8982			width: direction ? "auto" : false,
8983			classes: {
8984				middle: {
8985					"ui-selectmenu-button-open": "",
8986					"ui-selectmenu-button-closed": ""
8987				},
8988				first: {
8989					"ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
8990					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
8991				},
8992				last: {
8993					"ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
8994					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
8995				},
8996				only: {
8997					"ui-selectmenu-button-open": "ui-corner-top",
8998					"ui-selectmenu-button-closed": "ui-corner-all"
8999				}
9000
9001			}[ position ]
9002		};
9003	},
9004
9005	_resolveClassesValues: function( classes, instance ) {
9006		var result = {};
9007		$.each( classes, function( key ) {
9008			var current = instance.options.classes[ key ] || "";
9009			current = String.prototype.trim.call( current.replace( controlgroupCornerRegex, "" ) );
9010			result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
9011		} );
9012		return result;
9013	},
9014
9015	_setOption: function( key, value ) {
9016		if ( key === "direction" ) {
9017			this._removeClass( "ui-controlgroup-" + this.options.direction );
9018		}
9019
9020		this._super( key, value );
9021		if ( key === "disabled" ) {
9022			this._callChildMethod( value ? "disable" : "enable" );
9023			return;
9024		}
9025
9026		this.refresh();
9027	},
9028
9029	refresh: function() {
9030		var children,
9031			that = this;
9032
9033		this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
9034
9035		if ( this.options.direction === "horizontal" ) {
9036			this._addClass( null, "ui-helper-clearfix" );
9037		}
9038		this._initWidgets();
9039
9040		children = this.childWidgets;
9041
9042		// We filter here because we need to track all childWidgets not just the visible ones
9043		if ( this.options.onlyVisible ) {
9044			children = children.filter( ":visible" );
9045		}
9046
9047		if ( children.length ) {
9048
9049			// We do this last because we need to make sure all enhancment is done
9050			// before determining first and last
9051			$.each( [ "first", "last" ], function( index, value ) {
9052				var instance = children[ value ]().data( "ui-controlgroup-data" );
9053
9054				if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
9055					var options = that[ "_" + instance.widgetName + "Options" ](
9056						children.length === 1 ? "only" : value
9057					);
9058					options.classes = that._resolveClassesValues( options.classes, instance );
9059					instance.element[ instance.widgetName ]( options );
9060				} else {
9061					that._updateCornerClass( children[ value ](), value );
9062				}
9063			} );
9064
9065			// Finally call the refresh method on each of the child widgets.
9066			this._callChildMethod( "refresh" );
9067		}
9068	}
9069} );
9070
9071/*!
9072 * jQuery UI Checkboxradio 1.1
vendor: 5,069 bytes, lines 9072-9255
90723.2
9073 * http://jqueryui.com
9074 *
9075 * Copyright jQuery Foundation and other contributors
9076 * Released under the MIT license.
9077 * http://jquery.org/license
9078 */
9079
9080//>>label: Checkboxradio
9081//>>group: Widgets
9082//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
9083//>>docs: http://api.jqueryui.com/checkboxradio/
9084//>>demos: http://jqueryui.com/checkboxradio/
9085//>>css.structure: ../../themes/base/core.css
9086//>>css.structure: ../../themes/base/button.css
9087//>>css.structure: ../../themes/base/checkboxradio.css
9088//>>css.theme: ../../themes/base/theme.css
9089
9090
9091$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
9092	version: "1.13.2",
9093	options: {
9094		disabled: null,
9095		label: null,
9096		icon: true,
9097		classes: {
9098			"ui-checkboxradio-label": "ui-corner-all",
9099			"ui-checkboxradio-icon": "ui-corner-all"
9100		}
9101	},
9102
9103	_getCreateOptions: function() {
9104		var disabled, labels, labelContents;
9105		var options = this._super() || {};
9106
9107		// We read the type here, because it makes more sense to throw a element type error first,
9108		// rather then the error for lack of a label. Often if its the wrong type, it
9109		// won't have a label (e.g. calling on a div, btn, etc)
9110		this._readType();
9111
9112		labels = this.element.labels();
9113
9114		// If there are multiple labels, use the last one
9115		this.label = $( labels[ labels.length - 1 ] );
9116		if ( !this.label.length ) {
9117			$.error( "No label found for checkboxradio widget" );
9118		}
9119
9120		this.originalLabel = "";
9121
9122		// We need to get the label text but this may also need to make sure it does not contain the
9123		// input itself.
9124		// The label contents could be text, html, or a mix. We wrap all elements
9125		// and read the wrapper's `innerHTML` to get a string representation of
9126		// the label, without the input as part of it.
9127		labelContents = this.label.contents().not( this.element[ 0 ] );
9128
9129		if ( labelContents.length ) {
9130			this.originalLabel += labelContents
9131				.clone()
9132				.wrapAll( "<div></div>" )
9133				.parent()
9134				.html();
9135		}
9136
9137		// Set the label option if we found label text
9138		if ( this.originalLabel ) {
9139			options.label = this.originalLabel;
9140		}
9141
9142		disabled = this.element[ 0 ].disabled;
9143		if ( disabled != null ) {
9144			options.disabled = disabled;
9145		}
9146		return options;
9147	},
9148
9149	_create: function() {
9150		var checked = this.element[ 0 ].checked;
9151
9152		this._bindFormResetHandler();
9153
9154		if ( this.options.disabled == null ) {
9155			this.options.disabled = this.element[ 0 ].disabled;
9156		}
9157
9158		this._setOption( "disabled", this.options.disabled );
9159		this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
9160		this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
9161
9162		if ( this.type === "radio" ) {
9163			this._addClass( this.label, "ui-checkboxradio-radio-label" );
9164		}
9165
9166		if ( this.options.label && this.options.label !== this.originalLabel ) {
9167			this._updateLabel();
9168		} else if ( this.originalLabel ) {
9169			this.options.label = this.originalLabel;
9170		}
9171
9172		this._enhance();
9173
9174		if ( checked ) {
9175			this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
9176		}
9177
9178		this._on( {
9179			change: "_toggleClasses",
9180			focus: function() {
9181				this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
9182			},
9183			blur: function() {
9184				this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
9185			}
9186		} );
9187	},
9188
9189	_readType: function() {
9190		var nodeName = this.element[ 0 ].nodeName.toLowerCase();
9191		this.type = this.element[ 0 ].type;
9192		if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
9193			$.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
9194				" and element.type=" + this.type );
9195		}
9196	},
9197
9198	// Support jQuery Mobile enhanced option
9199	_enhance: function() {
9200		this._updateIcon( this.element[ 0 ].checked );
9201	},
9202
9203	widget: function() {
9204		return this.label;
9205	},
9206
9207	_getRadioGroup: function() {
9208		var group;
9209		var name = this.element[ 0 ].name;
9210		var nameSelector = "input[name='" + $.escapeSelector( name ) + "']";
9211
9212		if ( !name ) {
9213			return $( [] );
9214		}
9215
9216		if ( this.form.length ) {
9217			group = $( this.form[ 0 ].elements ).filter( nameSelector );
9218		} else {
9219
9220			// Not inside a form, check all inputs that also are not inside a form
9221			group = $( nameSelector ).filter( function() {
9222				return $( this )._form().length === 0;
9223			} );
9224		}
9225
9226		return group.not( this.element );
9227	},
9228
9229	_toggleClasses: function() {
9230		var checked = this.element[ 0 ].checked;
9231		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
9232
9233		if ( this.options.icon && this.type === "checkbox" ) {
9234			this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
9235				._toggleClass( this.icon, null, "ui-icon-blank", !checked );
9236		}
9237
9238		if ( this.type === "radio" ) {
9239			this._getRadioGroup()
9240				.each( function() {
9241					var instance = $( this ).checkboxradio( "instance" );
9242
9243					if ( instance ) {
9244						instance._removeClass( instance.label,
9245							"ui-checkboxradio-checked", "ui-state-active" );
9246					}
9247				} );
9248		}
9249	},
9250
9251	_destroy: function() {
9252		this._unbindFormResetHandler();
9253
9254		if ( this.icon ) {
9255			this.icon.remove();
vendor: 2,708 bytes, lines 9256-9362
9256			this.iconSpace.remove();
9257		}
9258	},
9259
9260	_setOption: function( key, value ) {
9261
9262		// We don't allow the value to be set to nothing
9263		if ( key === "label" && !value ) {
9264			return;
9265		}
9266
9267		this._super( key, value );
9268
9269		if ( key === "disabled" ) {
9270			this._toggleClass( this.label, null, "ui-state-disabled", value );
9271			this.element[ 0 ].disabled = value;
9272
9273			// Don't refresh when setting disabled
9274			return;
9275		}
9276		this.refresh();
9277	},
9278
9279	_updateIcon: function( checked ) {
9280		var toAdd = "ui-icon ui-icon-background ";
9281
9282		if ( this.options.icon ) {
9283			if ( !this.icon ) {
9284				this.icon = $( "<span>" );
9285				this.iconSpace = $( "<span> </span>" );
9286				this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
9287			}
9288
9289			if ( this.type === "checkbox" ) {
9290				toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
9291				this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
9292			} else {
9293				toAdd += "ui-icon-blank";
9294			}
9295			this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
9296			if ( !checked ) {
9297				this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
9298			}
9299			this.icon.prependTo( this.label ).after( this.iconSpace );
9300		} else if ( this.icon !== undefined ) {
9301			this.icon.remove();
9302			this.iconSpace.remove();
9303			delete this.icon;
9304		}
9305	},
9306
9307	_updateLabel: function() {
9308
9309		// Remove the contents of the label ( minus the icon, icon space, and input )
9310		var contents = this.label.contents().not( this.element[ 0 ] );
9311		if ( this.icon ) {
9312			contents = contents.not( this.icon[ 0 ] );
9313		}
9314		if ( this.iconSpace ) {
9315			contents = contents.not( this.iconSpace[ 0 ] );
9316		}
9317		contents.remove();
9318
9319		this.label.append( this.options.label );
9320	},
9321
9322	refresh: function() {
9323		var checked = this.element[ 0 ].checked,
9324			isDisabled = this.element[ 0 ].disabled;
9325
9326		this._updateIcon( checked );
9327		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
9328		if ( this.options.label !== null ) {
9329			this._updateLabel();
9330		}
9331
9332		if ( isDisabled !== this.options.disabled ) {
9333			this._setOptions( { "disabled": isDisabled } );
9334		}
9335	}
9336
9337} ] );
9338
9339var widgetsCheckboxradio = $.ui.checkboxradio;
9340
9341
9342/*!
9343 * jQuery UI Button 1.13.2
9344 * http://jqueryui.com
9345 *
9346 * Copyright jQuery Foundation and other contributors
9347 * Released under the MIT license.
9348 * http://jquery.org/license
9349 */
9350
9351//>>label: Button
9352//>>group: Widgets
9353//>>description: Enhances a form with themeable buttons.
9354//>>docs: http://api.jqueryui.com/button/
9355//>>demos: http://jqueryui.com/button/
9356//>>css.structure: ../../themes/base/core.css
9357//>>css.structure: ../../themes/base/button.css
9358//>>css.theme: ../../themes/base/theme.css
9359
9360
9361$.widget( "ui.button", {
9362	version: "1.13.2
vendor: 10,836 bytes, lines 9362-9769
9362",
9363	defaultElement: "<button>",
9364	options: {
9365		classes: {
9366			"ui-button": "ui-corner-all"
9367		},
9368		disabled: null,
9369		icon: null,
9370		iconPosition: "beginning",
9371		label: null,
9372		showLabel: true
9373	},
9374
9375	_getCreateOptions: function() {
9376		var disabled,
9377
9378			// This is to support cases like in jQuery Mobile where the base widget does have
9379			// an implementation of _getCreateOptions
9380			options = this._super() || {};
9381
9382		this.isInput = this.element.is( "input" );
9383
9384		disabled = this.element[ 0 ].disabled;
9385		if ( disabled != null ) {
9386			options.disabled = disabled;
9387		}
9388
9389		this.originalLabel = this.isInput ? this.element.val() : this.element.html();
9390		if ( this.originalLabel ) {
9391			options.label = this.originalLabel;
9392		}
9393
9394		return options;
9395	},
9396
9397	_create: function() {
9398		if ( !this.option.showLabel & !this.options.icon ) {
9399			this.options.showLabel = true;
9400		}
9401
9402		// We have to check the option again here even though we did in _getCreateOptions,
9403		// because null may have been passed on init which would override what was set in
9404		// _getCreateOptions
9405		if ( this.options.disabled == null ) {
9406			this.options.disabled = this.element[ 0 ].disabled || false;
9407		}
9408
9409		this.hasTitle = !!this.element.attr( "title" );
9410
9411		// Check to see if the label needs to be set or if its already correct
9412		if ( this.options.label && this.options.label !== this.originalLabel ) {
9413			if ( this.isInput ) {
9414				this.element.val( this.options.label );
9415			} else {
9416				this.element.html( this.options.label );
9417			}
9418		}
9419		this._addClass( "ui-button", "ui-widget" );
9420		this._setOption( "disabled", this.options.disabled );
9421		this._enhance();
9422
9423		if ( this.element.is( "a" ) ) {
9424			this._on( {
9425				"keyup": function( event ) {
9426					if ( event.keyCode === $.ui.keyCode.SPACE ) {
9427						event.preventDefault();
9428
9429						// Support: PhantomJS <= 1.9, IE 8 Only
9430						// If a native click is available use it so we actually cause navigation
9431						// otherwise just trigger a click event
9432						if ( this.element[ 0 ].click ) {
9433							this.element[ 0 ].click();
9434						} else {
9435							this.element.trigger( "click" );
9436						}
9437					}
9438				}
9439			} );
9440		}
9441	},
9442
9443	_enhance: function() {
9444		if ( !this.element.is( "button" ) ) {
9445			this.element.attr( "role", "button" );
9446		}
9447
9448		if ( this.options.icon ) {
9449			this._updateIcon( "icon", this.options.icon );
9450			this._updateTooltip();
9451		}
9452	},
9453
9454	_updateTooltip: function() {
9455		this.title = this.element.attr( "title" );
9456
9457		if ( !this.options.showLabel && !this.title ) {
9458			this.element.attr( "title", this.options.label );
9459		}
9460	},
9461
9462	_updateIcon: function( option, value ) {
9463		var icon = option !== "iconPosition",
9464			position = icon ? this.options.iconPosition : value,
9465			displayBlock = position === "top" || position === "bottom";
9466
9467		// Create icon
9468		if ( !this.icon ) {
9469			this.icon = $( "<span>" );
9470
9471			this._addClass( this.icon, "ui-button-icon", "ui-icon" );
9472
9473			if ( !this.options.showLabel ) {
9474				this._addClass( "ui-button-icon-only" );
9475			}
9476		} else if ( icon ) {
9477
9478			// If we are updating the icon remove the old icon class
9479			this._removeClass( this.icon, null, this.options.icon );
9480		}
9481
9482		// If we are updating the icon add the new icon class
9483		if ( icon ) {
9484			this._addClass( this.icon, null, value );
9485		}
9486
9487		this._attachIcon( position );
9488
9489		// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
9490		// the iconSpace if there is one.
9491		if ( displayBlock ) {
9492			this._addClass( this.icon, null, "ui-widget-icon-block" );
9493			if ( this.iconSpace ) {
9494				this.iconSpace.remove();
9495			}
9496		} else {
9497
9498			// Position is beginning or end so remove the ui-widget-icon-block class and add the
9499			// space if it does not exist
9500			if ( !this.iconSpace ) {
9501				this.iconSpace = $( "<span> </span>" );
9502				this._addClass( this.iconSpace, "ui-button-icon-space" );
9503			}
9504			this._removeClass( this.icon, null, "ui-wiget-icon-block" );
9505			this._attachIconSpace( position );
9506		}
9507	},
9508
9509	_destroy: function() {
9510		this.element.removeAttr( "role" );
9511
9512		if ( this.icon ) {
9513			this.icon.remove();
9514		}
9515		if ( this.iconSpace ) {
9516			this.iconSpace.remove();
9517		}
9518		if ( !this.hasTitle ) {
9519			this.element.removeAttr( "title" );
9520		}
9521	},
9522
9523	_attachIconSpace: function( iconPosition ) {
9524		this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
9525	},
9526
9527	_attachIcon: function( iconPosition ) {
9528		this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
9529	},
9530
9531	_setOptions: function( options ) {
9532		var newShowLabel = options.showLabel === undefined ?
9533				this.options.showLabel :
9534				options.showLabel,
9535			newIcon = options.icon === undefined ? this.options.icon : options.icon;
9536
9537		if ( !newShowLabel && !newIcon ) {
9538			options.showLabel = true;
9539		}
9540		this._super( options );
9541	},
9542
9543	_setOption: function( key, value ) {
9544		if ( key === "icon" ) {
9545			if ( value ) {
9546				this._updateIcon( key, value );
9547			} else if ( this.icon ) {
9548				this.icon.remove();
9549				if ( this.iconSpace ) {
9550					this.iconSpace.remove();
9551				}
9552			}
9553		}
9554
9555		if ( key === "iconPosition" ) {
9556			this._updateIcon( key, value );
9557		}
9558
9559		// Make sure we can't end up with a button that has neither text nor icon
9560		if ( key === "showLabel" ) {
9561				this._toggleClass( "ui-button-icon-only", null, !value );
9562				this._updateTooltip();
9563		}
9564
9565		if ( key === "label" ) {
9566			if ( this.isInput ) {
9567				this.element.val( value );
9568			} else {
9569
9570				// If there is an icon, append it, else nothing then append the value
9571				// this avoids removal of the icon when setting label text
9572				this.element.html( value );
9573				if ( this.icon ) {
9574					this._attachIcon( this.options.iconPosition );
9575					this._attachIconSpace( this.options.iconPosition );
9576				}
9577			}
9578		}
9579
9580		this._super( key, value );
9581
9582		if ( key === "disabled" ) {
9583			this._toggleClass( null, "ui-state-disabled", value );
9584			this.element[ 0 ].disabled = value;
9585			if ( value ) {
9586				this.element.trigger( "blur" );
9587			}
9588		}
9589	},
9590
9591	refresh: function() {
9592
9593		// Make sure to only check disabled if its an element that supports this otherwise
9594		// check for the disabled class to determine state
9595		var isDisabled = this.element.is( "input, button" ) ?
9596			this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );
9597
9598		if ( isDisabled !== this.options.disabled ) {
9599			this._setOptions( { disabled: isDisabled } );
9600		}
9601
9602		this._updateTooltip();
9603	}
9604} );
9605
9606// DEPRECATED
9607if ( $.uiBackCompat !== false ) {
9608
9609	// Text and Icons options
9610	$.widget( "ui.button", $.ui.button, {
9611		options: {
9612			text: true,
9613			icons: {
9614				primary: null,
9615				secondary: null
9616			}
9617		},
9618
9619		_create: function() {
9620			if ( this.options.showLabel && !this.options.text ) {
9621				this.options.showLabel = this.options.text;
9622			}
9623			if ( !this.options.showLabel && this.options.text ) {
9624				this.options.text = this.options.showLabel;
9625			}
9626			if ( !this.options.icon && ( this.options.icons.primary ||
9627					this.options.icons.secondary ) ) {
9628				if ( this.options.icons.primary ) {
9629					this.options.icon = this.options.icons.primary;
9630				} else {
9631					this.options.icon = this.options.icons.secondary;
9632					this.options.iconPosition = "end";
9633				}
9634			} else if ( this.options.icon ) {
9635				this.options.icons.primary = this.options.icon;
9636			}
9637			this._super();
9638		},
9639
9640		_setOption: function( key, value ) {
9641			if ( key === "text" ) {
9642				this._super( "showLabel", value );
9643				return;
9644			}
9645			if ( key === "showLabel" ) {
9646				this.options.text = value;
9647			}
9648			if ( key === "icon" ) {
9649				this.options.icons.primary = value;
9650			}
9651			if ( key === "icons" ) {
9652				if ( value.primary ) {
9653					this._super( "icon", value.primary );
9654					this._super( "iconPosition", "beginning" );
9655				} else if ( value.secondary ) {
9656					this._super( "icon", value.secondary );
9657					this._super( "iconPosition", "end" );
9658				}
9659			}
9660			this._superApply( arguments );
9661		}
9662	} );
9663
9664	$.fn.button = ( function( orig ) {
9665		return function( options ) {
9666			var isMethodCall = typeof options === "string";
9667			var args = Array.prototype.slice.call( arguments, 1 );
9668			var returnValue = this;
9669
9670			if ( isMethodCall ) {
9671
9672				// If this is an empty collection, we need to have the instance method
9673				// return undefined instead of the jQuery instance
9674				if ( !this.length && options === "instance" ) {
9675					returnValue = undefined;
9676				} else {
9677					this.each( function() {
9678						var methodValue;
9679						var type = $( this ).attr( "type" );
9680						var name = type !== "checkbox" && type !== "radio" ?
9681							"button" :
9682							"checkboxradio";
9683						var instance = $.data( this, "ui-" + name );
9684
9685						if ( options === "instance" ) {
9686							returnValue = instance;
9687							return false;
9688						}
9689
9690						if ( !instance ) {
9691							return $.error( "cannot call methods on button" +
9692								" prior to initialization; " +
9693								"attempted to call method '" + options + "'" );
9694						}
9695
9696						if ( typeof instance[ options ] !== "function" ||
9697							options.charAt( 0 ) === "_" ) {
9698							return $.error( "no such method '" + options + "' for button" +
9699								" widget instance" );
9700						}
9701
9702						methodValue = instance[ options ].apply( instance, args );
9703
9704						if ( methodValue !== instance && methodValue !== undefined ) {
9705							returnValue = methodValue && methodValue.jquery ?
9706								returnValue.pushStack( methodValue.get() ) :
9707								methodValue;
9708							return false;
9709						}
9710					} );
9711				}
9712			} else {
9713
9714				// Allow multiple hashes to be passed on init
9715				if ( args.length ) {
9716					options = $.widget.extend.apply( null, [ options ].concat( args ) );
9717				}
9718
9719				this.each( function() {
9720					var type = $( this ).attr( "type" );
9721					var name = type !== "checkbox" && type !== "radio" ? "button" : "checkboxradio";
9722					var instance = $.data( this, "ui-" + name );
9723
9724					if ( instance ) {
9725						instance.option( options || {} );
9726						if ( instance._init ) {
9727							instance._init();
9728						}
9729					} else {
9730						if ( name === "button" ) {
9731							orig.call( $( this ), options );
9732							return;
9733						}
9734
9735						$( this ).checkboxradio( $.extend( { icon: false }, options ) );
9736					}
9737				} );
9738			}
9739
9740			return returnValue;
9741		};
9742	} )( $.fn.button );
9743
9744	$.fn.buttonset = function() {
9745		if ( !$.ui.controlgroup ) {
9746			$.error( "Controlgroup widget missing" );
9747		}
9748		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
9749			return this.controlgroup.apply( this,
9750				[ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
9751		}
9752		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
9753			return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
9754		}
9755		if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
9756			arguments[ 0 ].items = {
9757				button: arguments[ 0 ].items
9758			};
9759		}
9760		return this.controlgroup.apply( this, arguments );
9761	};
9762}
9763
9764var widgetsButton = $.ui.button;
9765
9766
9767/* eslint-disable max-len, camelcase */
9768/*!
9769 * jQuery UI Datepicker 1.13.
97692
9770 * http://jqueryui.com
9771 *
9772 * Copyright jQuery Foundation and other contributors
9773 * Released under the MIT license.
9774 * http://jquery.org/license
9775 */
9776
9777//>>label: Datepicker
9778//>>group: Widgets
9779//>>description: Displays a calendar from an input or inline for selecting dates.
9780//>>docs: http://api.jqueryui.com/datepicker/
9781//>>demos: http://jqueryui.com/datepicker/
9782//>>css.structure: ../../themes/base/core.css
9783//>>css.structure: ../../themes/base/datepicker.css
9784//>>css.theme: ../../themes/base/theme.css
9785
9786
9787$.extend( $.ui, { datepicker: { version: "1.13
vendor: 14,164 bytes, lines 9787-10104
9787.2" } } );
9788
9789var datepicker_instActive;
9790
9791function datepicker_getZindex( elem ) {
9792	var position, value;
9793	while ( elem.length && elem[ 0 ] !== document ) {
9794
9795		// Ignore z-index if position is set to a value where z-index is ignored by the browser
9796		// This makes behavior of this function consistent across browsers
9797		// WebKit always returns auto if the element is positioned
9798		position = elem.css( "position" );
9799		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
9800
9801			// IE returns 0 when zIndex is not specified
9802			// other browsers return a string
9803			// we ignore the case of nested elements with an explicit value of 0
9804			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
9805			value = parseInt( elem.css( "zIndex" ), 10 );
9806			if ( !isNaN( value ) && value !== 0 ) {
9807				return value;
9808			}
9809		}
9810		elem = elem.parent();
9811	}
9812
9813	return 0;
9814}
9815
9816/* Date picker manager.
9817   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
9818   Settings for (groups of) date pickers are maintained in an instance object,
9819   allowing multiple different settings on the same page. */
9820
9821function Datepicker() {
9822	this._curInst = null; // The current instance in use
9823	this._keyEvent = false; // If the last event was a key event
9824	this._disabledInputs = []; // List of date picker inputs that have been disabled
9825	this._datepickerShowing = false; // True if the popup picker is showing , false if not
9826	this._inDialog = false; // True if showing within a "dialog", false if not
9827	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
9828	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
9829	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
9830	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
9831	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
9832	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
9833	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
9834	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
9835	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
9836	this.regional = []; // Available regional settings, indexed by language code
9837	this.regional[ "" ] = { // Default regional settings
9838		closeText: "Done", // Display text for close link
9839		prevText: "Prev", // Display text for previous month link
9840		nextText: "Next", // Display text for next month link
9841		currentText: "Today", // Display text for current month link
9842		monthNames: [ "January", "February", "March", "April", "May", "June",
9843			"July", "August", "September", "October", "November", "December" ], // Names of months for drop-down and formatting
9844		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
9845		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
9846		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
9847		dayNamesMin: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ], // Column headings for days starting at Sunday
9848		weekHeader: "Wk", // Column header for week of the year
9849		dateFormat: "mm/dd/yy", // See format options on parseDate
9850		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
9851		isRTL: false, // True if right-to-left language, false if left-to-right
9852		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
9853		yearSuffix: "", // Additional text to append to the year in the month headers,
9854		selectMonthLabel: "Select month", // Invisible label for month selector
9855		selectYearLabel: "Select year" // Invisible label for year selector
9856	};
9857	this._defaults = { // Global defaults for all the date picker instances
9858		showOn: "focus", // "focus" for popup on focus,
9859			// "button" for trigger button, or "both" for either
9860		showAnim: "fadeIn", // Name of jQuery animation for popup
9861		showOptions: {}, // Options for enhanced animations
9862		defaultDate: null, // Used when field is blank: actual date,
9863			// +/-number for offset from today, null for today
9864		appendText: "", // Display text following the input box, e.g. showing the format
9865		buttonText: "...", // Text for trigger button
9866		buttonImage: "", // URL for trigger button image
9867		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
9868		hideIfNoPrevNext: false, // True to hide next/previous month links
9869			// if not applicable, false to just disable them
9870		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
9871		gotoCurrent: false, // True if today link goes back to current selection instead
9872		changeMonth: false, // True if month can be selected directly, false if only prev/next
9873		changeYear: false, // True if year can be selected directly, false if only prev/next
9874		yearRange: "c-10:c+10", // Range of years to display in drop-down,
9875			// either relative to today's year (-nn:+nn), relative to currently displayed year
9876			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
9877		showOtherMonths: false, // True to show dates in other months, false to leave blank
9878		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
9879		showWeek: false, // True to show week of the year, false to not show it
9880		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
9881			// takes a Date and returns the number of the week for it
9882		shortYearCutoff: "+10", // Short year values < this are in the current century,
9883			// > this are in the previous century,
9884			// string value starting with "+" for current year + value
9885		minDate: null, // The earliest selectable date, or null for no limit
9886		maxDate: null, // The latest selectable date, or null for no limit
9887		duration: "fast", // Duration of display/closure
9888		beforeShowDay: null, // Function that takes a date and returns an array with
9889			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
9890			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
9891		beforeShow: null, // Function that takes an input field and
9892			// returns a set of custom settings for the date picker
9893		onSelect: null, // Define a callback function when a date is selected
9894		onChangeMonthYear: null, // Define a callback function when the month or year is changed
9895		onClose: null, // Define a callback function when the datepicker is closed
9896		onUpdateDatepicker: null, // Define a callback function when the datepicker is updated
9897		numberOfMonths: 1, // Number of months to show at a time
9898		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
9899		stepMonths: 1, // Number of months to step back/forward
9900		stepBigMonths: 12, // Number of months to step back/forward for the big links
9901		altField: "", // Selector for an alternate field to store selected dates into
9902		altFormat: "", // The date format to use for the alternate field
9903		constrainInput: true, // The input is constrained by the current date format
9904		showButtonPanel: false, // True to show button panel, false to not show it
9905		autoSize: false, // True to size the input for the date format, false to leave as is
9906		disabled: false // The initial disabled state
9907	};
9908	$.extend( this._defaults, this.regional[ "" ] );
9909	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
9910	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
9911	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
9912}
9913
9914$.extend( Datepicker.prototype, {
9915
9916	/* Class name added to elements to indicate already configured with a date picker. */
9917	markerClassName: "hasDatepicker",
9918
9919	//Keep track of the maximum number of rows displayed (see #7043)
9920	maxRows: 4,
9921
9922	// TODO rename to "widget" when switching to widget factory
9923	_widgetDatepicker: function() {
9924		return this.dpDiv;
9925	},
9926
9927	/* Override the default settings for all instances of the date picker.
9928	 * @param  settings  object - the new settings to use as defaults (anonymous object)
9929	 * @return the manager object
9930	 */
9931	setDefaults: function( settings ) {
9932		datepicker_extendRemove( this._defaults, settings || {} );
9933		return this;
9934	},
9935
9936	/* Attach the date picker to a jQuery selection.
9937	 * @param  target	element - the target input field or division or span
9938	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
9939	 */
9940	_attachDatepicker: function( target, settings ) {
9941		var nodeName, inline, inst;
9942		nodeName = target.nodeName.toLowerCase();
9943		inline = ( nodeName === "div" || nodeName === "span" );
9944		if ( !target.id ) {
9945			this.uuid += 1;
9946			target.id = "dp" + this.uuid;
9947		}
9948		inst = this._newInst( $( target ), inline );
9949		inst.settings = $.extend( {}, settings || {} );
9950		if ( nodeName === "input" ) {
9951			this._connectDatepicker( target, inst );
9952		} else if ( inline ) {
9953			this._inlineDatepicker( target, inst );
9954		}
9955	},
9956
9957	/* Create a new instance object. */
9958	_newInst: function( target, inline ) {
9959		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
9960		return { id: id, input: target, // associated target
9961			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
9962			drawMonth: 0, drawYear: 0, // month being drawn
9963			inline: inline, // is datepicker inline or not
9964			dpDiv: ( !inline ? this.dpDiv : // presentation div
9965			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
9966	},
9967
9968	/* Attach the date picker to an input field. */
9969	_connectDatepicker: function( target, inst ) {
9970		var input = $( target );
9971		inst.append = $( [] );
9972		inst.trigger = $( [] );
9973		if ( input.hasClass( this.markerClassName ) ) {
9974			return;
9975		}
9976		this._attachments( input, inst );
9977		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
9978			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
9979		this._autoSize( inst );
9980		$.data( target, "datepicker", inst );
9981
9982		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
9983		if ( inst.settings.disabled ) {
9984			this._disableDatepicker( target );
9985		}
9986	},
9987
9988	/* Make attachments based on settings. */
9989	_attachments: function( input, inst ) {
9990		var showOn, buttonText, buttonImage,
9991			appendText = this._get( inst, "appendText" ),
9992			isRTL = this._get( inst, "isRTL" );
9993
9994		if ( inst.append ) {
9995			inst.append.remove();
9996		}
9997		if ( appendText ) {
9998			inst.append = $( "<span>" )
9999				.addClass( this._appendClass )
10000				.text( appendText );
10001			input[ isRTL ? "before" : "after" ]( inst.append );
10002		}
10003
10004		input.off( "focus", this._showDatepicker );
10005
10006		if ( inst.trigger ) {
10007			inst.trigger.remove();
10008		}
10009
10010		showOn = this._get( inst, "showOn" );
10011		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
10012			input.on( "focus", this._showDatepicker );
10013		}
10014		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
10015			buttonText = this._get( inst, "buttonText" );
10016			buttonImage = this._get( inst, "buttonImage" );
10017
10018			if ( this._get( inst, "buttonImageOnly" ) ) {
10019				inst.trigger = $( "<img>" )
10020					.addClass( this._triggerClass )
10021					.attr( {
10022						src: buttonImage,
10023						alt: buttonText,
10024						title: buttonText
10025					} );
10026			} else {
10027				inst.trigger = $( "<button type='button'>" )
10028					.addClass( this._triggerClass );
10029				if ( buttonImage ) {
10030					inst.trigger.html(
10031						$( "<img>" )
10032							.attr( {
10033								src: buttonImage,
10034								alt: buttonText,
10035								title: buttonText
10036							} )
10037					);
10038				} else {
10039					inst.trigger.text( buttonText );
10040				}
10041			}
10042
10043			input[ isRTL ? "before" : "after" ]( inst.trigger );
10044			inst.trigger.on( "click", function() {
10045				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
10046					$.datepicker._hideDatepicker();
10047				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
10048					$.datepicker._hideDatepicker();
10049					$.datepicker._showDatepicker( input[ 0 ] );
10050				} else {
10051					$.datepicker._showDatepicker( input[ 0 ] );
10052				}
10053				return false;
10054			} );
10055		}
10056	},
10057
10058	/* Apply the maximum length for the date format. */
10059	_autoSize: function( inst ) {
10060		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
10061			var findMax, max, maxI, i,
10062				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
10063				dateFormat = this._get( inst, "dateFormat" );
10064
10065			if ( dateFormat.match( /[DM]/ ) ) {
10066				findMax = function( names ) {
10067					max = 0;
10068					maxI = 0;
10069					for ( i = 0; i < names.length; i++ ) {
10070						if ( names[ i ].length > max ) {
10071							max = names[ i ].length;
10072							maxI = i;
10073						}
10074					}
10075					return maxI;
10076				};
10077				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
10078					"monthNames" : "monthNamesShort" ) ) ) );
10079				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
10080					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
10081			}
10082			inst.input.attr( "size", this._formatDate( inst, date ).length );
10083		}
10084	},
10085
10086	/* Attach an inline date picker to a div. */
10087	_inlineDatepicker: function( target, inst ) {
10088		var divSpan = $( target );
10089		if ( divSpan.hasClass( this.markerClassName ) ) {
10090			return;
10091		}
10092		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
10093		$.data( target, "datepicker", inst );
10094		this._setDate( inst, this._getDefaultDate( inst ), true );
10095		this._updateDatepicker( inst );
10096		this._updateAlternate( inst );
10097
10098		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
10099		if ( inst.settings.disabled ) {
10100			this._disableDatepicker( target );
10101		}
10102
10103		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
10104		// http
vendor: 14,693 bytes, lines 10104-10526
10104://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
10105		inst.dpDiv.css( "display", "block" );
10106	},
10107
10108	/* Pop-up the date picker in a "dialog" box.
10109	 * @param  input element - ignored
10110	 * @param  date	string or Date - the initial date to display
10111	 * @param  onSelect  function - the function to call when a date is selected
10112	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
10113	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
10114	 *					event - with x/y coordinates or
10115	 *					leave empty for default (screen centre)
10116	 * @return the manager object
10117	 */
10118	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
10119		var id, browserWidth, browserHeight, scrollX, scrollY,
10120			inst = this._dialogInst; // internal instance
10121
10122		if ( !inst ) {
10123			this.uuid += 1;
10124			id = "dp" + this.uuid;
10125			this._dialogInput = $( "<input type='text' id='" + id +
10126				"' style='position: absolute; top: -100px; width: 0px;'/>" );
10127			this._dialogInput.on( "keydown", this._doKeyDown );
10128			$( "body" ).append( this._dialogInput );
10129			inst = this._dialogInst = this._newInst( this._dialogInput, false );
10130			inst.settings = {};
10131			$.data( this._dialogInput[ 0 ], "datepicker", inst );
10132		}
10133		datepicker_extendRemove( inst.settings, settings || {} );
10134		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
10135		this._dialogInput.val( date );
10136
10137		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
10138		if ( !this._pos ) {
10139			browserWidth = document.documentElement.clientWidth;
10140			browserHeight = document.documentElement.clientHeight;
10141			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
10142			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
10143			this._pos = // should use actual width/height below
10144				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
10145		}
10146
10147		// Move input on screen for focus, but hidden behind dialog
10148		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
10149		inst.settings.onSelect = onSelect;
10150		this._inDialog = true;
10151		this.dpDiv.addClass( this._dialogClass );
10152		this._showDatepicker( this._dialogInput[ 0 ] );
10153		if ( $.blockUI ) {
10154			$.blockUI( this.dpDiv );
10155		}
10156		$.data( this._dialogInput[ 0 ], "datepicker", inst );
10157		return this;
10158	},
10159
10160	/* Detach a datepicker from its control.
10161	 * @param  target	element - the target input field or division or span
10162	 */
10163	_destroyDatepicker: function( target ) {
10164		var nodeName,
10165			$target = $( target ),
10166			inst = $.data( target, "datepicker" );
10167
10168		if ( !$target.hasClass( this.markerClassName ) ) {
10169			return;
10170		}
10171
10172		nodeName = target.nodeName.toLowerCase();
10173		$.removeData( target, "datepicker" );
10174		if ( nodeName === "input" ) {
10175			inst.append.remove();
10176			inst.trigger.remove();
10177			$target.removeClass( this.markerClassName ).
10178				off( "focus", this._showDatepicker ).
10179				off( "keydown", this._doKeyDown ).
10180				off( "keypress", this._doKeyPress ).
10181				off( "keyup", this._doKeyUp );
10182		} else if ( nodeName === "div" || nodeName === "span" ) {
10183			$target.removeClass( this.markerClassName ).empty();
10184		}
10185
10186		if ( datepicker_instActive === inst ) {
10187			datepicker_instActive = null;
10188			this._curInst = null;
10189		}
10190	},
10191
10192	/* Enable the date picker to a jQuery selection.
10193	 * @param  target	element - the target input field or division or span
10194	 */
10195	_enableDatepicker: function( target ) {
10196		var nodeName, inline,
10197			$target = $( target ),
10198			inst = $.data( target, "datepicker" );
10199
10200		if ( !$target.hasClass( this.markerClassName ) ) {
10201			return;
10202		}
10203
10204		nodeName = target.nodeName.toLowerCase();
10205		if ( nodeName === "input" ) {
10206			target.disabled = false;
10207			inst.trigger.filter( "button" ).
10208				each( function() {
10209					this.disabled = false;
10210				} ).end().
10211				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
10212		} else if ( nodeName === "div" || nodeName === "span" ) {
10213			inline = $target.children( "." + this._inlineClass );
10214			inline.children().removeClass( "ui-state-disabled" );
10215			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
10216				prop( "disabled", false );
10217		}
10218		this._disabledInputs = $.map( this._disabledInputs,
10219
10220			// Delete entry
10221			function( value ) {
10222				return ( value === target ? null : value );
10223			} );
10224	},
10225
10226	/* Disable the date picker to a jQuery selection.
10227	 * @param  target	element - the target input field or division or span
10228	 */
10229	_disableDatepicker: function( target ) {
10230		var nodeName, inline,
10231			$target = $( target ),
10232			inst = $.data( target, "datepicker" );
10233
10234		if ( !$target.hasClass( this.markerClassName ) ) {
10235			return;
10236		}
10237
10238		nodeName = target.nodeName.toLowerCase();
10239		if ( nodeName === "input" ) {
10240			target.disabled = true;
10241			inst.trigger.filter( "button" ).
10242				each( function() {
10243					this.disabled = true;
10244				} ).end().
10245				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
10246		} else if ( nodeName === "div" || nodeName === "span" ) {
10247			inline = $target.children( "." + this._inlineClass );
10248			inline.children().addClass( "ui-state-disabled" );
10249			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
10250				prop( "disabled", true );
10251		}
10252		this._disabledInputs = $.map( this._disabledInputs,
10253
10254			// Delete entry
10255			function( value ) {
10256				return ( value === target ? null : value );
10257			} );
10258		this._disabledInputs[ this._disabledInputs.length ] = target;
10259	},
10260
10261	/* Is the first field in a jQuery collection disabled as a datepicker?
10262	 * @param  target	element - the target input field or division or span
10263	 * @return boolean - true if disabled, false if enabled
10264	 */
10265	_isDisabledDatepicker: function( target ) {
10266		if ( !target ) {
10267			return false;
10268		}
10269		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
10270			if ( this._disabledInputs[ i ] === target ) {
10271				return true;
10272			}
10273		}
10274		return false;
10275	},
10276
10277	/* Retrieve the instance data for the target control.
10278	 * @param  target  element - the target input field or division or span
10279	 * @return  object - the associated instance data
10280	 * @throws  error if a jQuery problem getting data
10281	 */
10282	_getInst: function( target ) {
10283		try {
10284			return $.data( target, "datepicker" );
10285		} catch ( err ) {
10286			throw "Missing instance data for this datepicker";
10287		}
10288	},
10289
10290	/* Update or retrieve the settings for a date picker attached to an input field or division.
10291	 * @param  target  element - the target input field or division or span
10292	 * @param  name	object - the new settings to update or
10293	 *				string - the name of the setting to change or retrieve,
10294	 *				when retrieving also "all" for all instance settings or
10295	 *				"defaults" for all global defaults
10296	 * @param  value   any - the new value for the setting
10297	 *				(omit if above is an object or to retrieve a value)
10298	 */
10299	_optionDatepicker: function( target, name, value ) {
10300		var settings, date, minDate, maxDate,
10301			inst = this._getInst( target );
10302
10303		if ( arguments.length === 2 && typeof name === "string" ) {
10304			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
10305				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
10306				this._get( inst, name ) ) : null ) );
10307		}
10308
10309		settings = name || {};
10310		if ( typeof name === "string" ) {
10311			settings = {};
10312			settings[ name ] = value;
10313		}
10314
10315		if ( inst ) {
10316			if ( this._curInst === inst ) {
10317				this._hideDatepicker();
10318			}
10319
10320			date = this._getDateDatepicker( target, true );
10321			minDate = this._getMinMaxDate( inst, "min" );
10322			maxDate = this._getMinMaxDate( inst, "max" );
10323			datepicker_extendRemove( inst.settings, settings );
10324
10325			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
10326			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
10327				inst.settings.minDate = this._formatDate( inst, minDate );
10328			}
10329			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
10330				inst.settings.maxDate = this._formatDate( inst, maxDate );
10331			}
10332			if ( "disabled" in settings ) {
10333				if ( settings.disabled ) {
10334					this._disableDatepicker( target );
10335				} else {
10336					this._enableDatepicker( target );
10337				}
10338			}
10339			this._attachments( $( target ), inst );
10340			this._autoSize( inst );
10341			this._setDate( inst, date );
10342			this._updateAlternate( inst );
10343			this._updateDatepicker( inst );
10344		}
10345	},
10346
10347	// Change method deprecated
10348	_changeDatepicker: function( target, name, value ) {
10349		this._optionDatepicker( target, name, value );
10350	},
10351
10352	/* Redraw the date picker attached to an input field or division.
10353	 * @param  target  element - the target input field or division or span
10354	 */
10355	_refreshDatepicker: function( target ) {
10356		var inst = this._getInst( target );
10357		if ( inst ) {
10358			this._updateDatepicker( inst );
10359		}
10360	},
10361
10362	/* Set the dates for a jQuery selection.
10363	 * @param  target element - the target input field or division or span
10364	 * @param  date	Date - the new date
10365	 */
10366	_setDateDatepicker: function( target, date ) {
10367		var inst = this._getInst( target );
10368		if ( inst ) {
10369			this._setDate( inst, date );
10370			this._updateDatepicker( inst );
10371			this._updateAlternate( inst );
10372		}
10373	},
10374
10375	/* Get the date(s) for the first entry in a jQuery selection.
10376	 * @param  target element - the target input field or division or span
10377	 * @param  noDefault boolean - true if no default date is to be used
10378	 * @return Date - the current date
10379	 */
10380	_getDateDatepicker: function( target, noDefault ) {
10381		var inst = this._getInst( target );
10382		if ( inst && !inst.inline ) {
10383			this._setDateFromField( inst, noDefault );
10384		}
10385		return ( inst ? this._getDate( inst ) : null );
10386	},
10387
10388	/* Handle keystrokes. */
10389	_doKeyDown: function( event ) {
10390		var onSelect, dateStr, sel,
10391			inst = $.datepicker._getInst( event.target ),
10392			handled = true,
10393			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
10394
10395		inst._keyEvent = true;
10396		if ( $.datepicker._datepickerShowing ) {
10397			switch ( event.keyCode ) {
10398				case 9: $.datepicker._hideDatepicker();
10399						handled = false;
10400						break; // hide on tab out
10401				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
10402									$.datepicker._currentClass + ")", inst.dpDiv );
10403						if ( sel[ 0 ] ) {
10404							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
10405						}
10406
10407						onSelect = $.datepicker._get( inst, "onSelect" );
10408						if ( onSelect ) {
10409							dateStr = $.datepicker._formatDate( inst );
10410
10411							// Trigger custom callback
10412							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
10413						} else {
10414							$.datepicker._hideDatepicker();
10415						}
10416
10417						return false; // don't submit the form
10418				case 27: $.datepicker._hideDatepicker();
10419						break; // hide on escape
10420				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
10421							-$.datepicker._get( inst, "stepBigMonths" ) :
10422							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
10423						break; // previous month/year on page up/+ ctrl
10424				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
10425							+$.datepicker._get( inst, "stepBigMonths" ) :
10426							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
10427						break; // next month/year on page down/+ ctrl
10428				case 35: if ( event.ctrlKey || event.metaKey ) {
10429							$.datepicker._clearDate( event.target );
10430						}
10431						handled = event.ctrlKey || event.metaKey;
10432						break; // clear on ctrl or command +end
10433				case 36: if ( event.ctrlKey || event.metaKey ) {
10434							$.datepicker._gotoToday( event.target );
10435						}
10436						handled = event.ctrlKey || event.metaKey;
10437						break; // current on ctrl or command +home
10438				case 37: if ( event.ctrlKey || event.metaKey ) {
10439							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
10440						}
10441						handled = event.ctrlKey || event.metaKey;
10442
10443						// -1 day on ctrl or command +left
10444						if ( event.originalEvent.altKey ) {
10445							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
10446								-$.datepicker._get( inst, "stepBigMonths" ) :
10447								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
10448						}
10449
10450						// next month/year on alt +left on Mac
10451						break;
10452				case 38: if ( event.ctrlKey || event.metaKey ) {
10453							$.datepicker._adjustDate( event.target, -7, "D" );
10454						}
10455						handled = event.ctrlKey || event.metaKey;
10456						break; // -1 week on ctrl or command +up
10457				case 39: if ( event.ctrlKey || event.metaKey ) {
10458							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
10459						}
10460						handled = event.ctrlKey || event.metaKey;
10461
10462						// +1 day on ctrl or command +right
10463						if ( event.originalEvent.altKey ) {
10464							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
10465								+$.datepicker._get( inst, "stepBigMonths" ) :
10466								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
10467						}
10468
10469						// next month/year on alt +right
10470						break;
10471				case 40: if ( event.ctrlKey || event.metaKey ) {
10472							$.datepicker._adjustDate( event.target, +7, "D" );
10473						}
10474						handled = event.ctrlKey || event.metaKey;
10475						break; // +1 week on ctrl or command +down
10476				default: handled = false;
10477			}
10478		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
10479			$.datepicker._showDatepicker( this );
10480		} else {
10481			handled = false;
10482		}
10483
10484		if ( handled ) {
10485			event.preventDefault();
10486			event.stopPropagation();
10487		}
10488	},
10489
10490	/* Filter entered characters - based on date format. */
10491	_doKeyPress: function( event ) {
10492		var chars, chr,
10493			inst = $.datepicker._getInst( event.target );
10494
10495		if ( $.datepicker._get( inst, "constrainInput" ) ) {
10496			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
10497			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
10498			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
10499		}
10500	},
10501
10502	/* Synchronise manual entry and field/alternate field. */
10503	_doKeyUp: function( event ) {
10504		var date,
10505			inst = $.datepicker._getInst( event.target );
10506
10507		if ( inst.input.val() !== inst.lastVal ) {
10508			try {
10509				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
10510					( inst.input ? inst.input.val() : null ),
10511					$.datepicker._getFormatConfig( inst ) );
10512
10513				if ( date ) { // only if valid
10514					$.datepicker._setDateFromField( inst );
10515					$.datepicker._updateAlternate( inst );
10516					$.datepicker._updateDatepicker( inst );
10517				}
10518			} catch ( err ) {
10519			}
10520		}
10521		return true;
10522	},
10523
10524	/* Pop-up the date picker for a given input field.
10525	 * If false returned from beforeShow event handler do not show.
10526	 * @param  input  element - the input field attached to the date picker or
vendor: 4,332 bytes, lines 10527-10649
10527	 *					event - if triggered by focus
10528	 */
10529	_showDatepicker: function( input ) {
10530		input = input.target || input;
10531		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
10532			input = $( "input", input.parentNode )[ 0 ];
10533		}
10534
10535		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
10536			return;
10537		}
10538
10539		var inst, beforeShow, beforeShowSettings, isFixed,
10540			offset, showAnim, duration;
10541
10542		inst = $.datepicker._getInst( input );
10543		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
10544			$.datepicker._curInst.dpDiv.stop( true, true );
10545			if ( inst && $.datepicker._datepickerShowing ) {
10546				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
10547			}
10548		}
10549
10550		beforeShow = $.datepicker._get( inst, "beforeShow" );
10551		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
10552		if ( beforeShowSettings === false ) {
10553			return;
10554		}
10555		datepicker_extendRemove( inst.settings, beforeShowSettings );
10556
10557		inst.lastVal = null;
10558		$.datepicker._lastInput = input;
10559		$.datepicker._setDateFromField( inst );
10560
10561		if ( $.datepicker._inDialog ) { // hide cursor
10562			input.value = "";
10563		}
10564		if ( !$.datepicker._pos ) { // position below input
10565			$.datepicker._pos = $.datepicker._findPos( input );
10566			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
10567		}
10568
10569		isFixed = false;
10570		$( input ).parents().each( function() {
10571			isFixed |= $( this ).css( "position" ) === "fixed";
10572			return !isFixed;
10573		} );
10574
10575		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
10576		$.datepicker._pos = null;
10577
10578		//to avoid flashes on Firefox
10579		inst.dpDiv.empty();
10580
10581		// determine sizing offscreen
10582		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
10583		$.datepicker._updateDatepicker( inst );
10584
10585		// fix width for dynamic number of date pickers
10586		// and adjust position before showing
10587		offset = $.datepicker._checkOffset( inst, offset, isFixed );
10588		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
10589			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
10590			left: offset.left + "px", top: offset.top + "px" } );
10591
10592		if ( !inst.inline ) {
10593			showAnim = $.datepicker._get( inst, "showAnim" );
10594			duration = $.datepicker._get( inst, "duration" );
10595			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
10596			$.datepicker._datepickerShowing = true;
10597
10598			if ( $.effects && $.effects.effect[ showAnim ] ) {
10599				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
10600			} else {
10601				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
10602			}
10603
10604			if ( $.datepicker._shouldFocusInput( inst ) ) {
10605				inst.input.trigger( "focus" );
10606			}
10607
10608			$.datepicker._curInst = inst;
10609		}
10610	},
10611
10612	/* Generate the date picker content. */
10613	_updateDatepicker: function( inst ) {
10614		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
10615		datepicker_instActive = inst; // for delegate hover events
10616		inst.dpDiv.empty().append( this._generateHTML( inst ) );
10617		this._attachHandlers( inst );
10618
10619		var origyearshtml,
10620			numMonths = this._getNumberOfMonths( inst ),
10621			cols = numMonths[ 1 ],
10622			width = 17,
10623			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ),
10624			onUpdateDatepicker = $.datepicker._get( inst, "onUpdateDatepicker" );
10625
10626		if ( activeCell.length > 0 ) {
10627			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
10628		}
10629
10630		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
10631		if ( cols > 1 ) {
10632			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
10633		}
10634		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
10635			"Class" ]( "ui-datepicker-multi" );
10636		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
10637			"Class" ]( "ui-datepicker-rtl" );
10638
10639		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
10640			inst.input.trigger( "focus" );
10641		}
10642
10643		// Deffered render of the years select (to avoid flashes on Firefox)
10644		if ( inst.yearshtml ) {
10645			origyearshtml = inst.yearshtml;
10646			setTimeout( function() {
10647
10648				//assure that inst.yearshtml didn't change.
10649				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
vendor: 5,508 bytes, lines 10650-10808
10650					inst.dpDiv.find( "select.ui-datepicker-year" ).first().replaceWith( inst.yearshtml );
10651				}
10652				origyearshtml = inst.yearshtml = null;
10653			}, 0 );
10654		}
10655
10656		if ( onUpdateDatepicker ) {
10657			onUpdateDatepicker.apply( ( inst.input ? inst.input[ 0 ] : null ), [ inst ] );
10658		}
10659	},
10660
10661	// #6694 - don't focus the input if it's already focused
10662	// this breaks the change event in IE
10663	// Support: IE and jQuery <1.9
10664	_shouldFocusInput: function( inst ) {
10665		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
10666	},
10667
10668	/* Check positioning to remain on screen. */
10669	_checkOffset: function( inst, offset, isFixed ) {
10670		var dpWidth = inst.dpDiv.outerWidth(),
10671			dpHeight = inst.dpDiv.outerHeight(),
10672			inputWidth = inst.input ? inst.input.outerWidth() : 0,
10673			inputHeight = inst.input ? inst.input.outerHeight() : 0,
10674			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
10675			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
10676
10677		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
10678		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
10679		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
10680
10681		// Now check if datepicker is showing outside window viewport - move to a better place if so.
10682		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
10683			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
10684		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
10685			Math.abs( dpHeight + inputHeight ) : 0 );
10686
10687		return offset;
10688	},
10689
10690	/* Find an object's position on the screen. */
10691	_findPos: function( obj ) {
10692		var position,
10693			inst = this._getInst( obj ),
10694			isRTL = this._get( inst, "isRTL" );
10695
10696		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.pseudos.hidden( obj ) ) ) {
10697			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
10698		}
10699
10700		position = $( obj ).offset();
10701		return [ position.left, position.top ];
10702	},
10703
10704	/* Hide the date picker from view.
10705	 * @param  input  element - the input field attached to the date picker
10706	 */
10707	_hideDatepicker: function( input ) {
10708		var showAnim, duration, postProcess, onClose,
10709			inst = this._curInst;
10710
10711		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
10712			return;
10713		}
10714
10715		if ( this._datepickerShowing ) {
10716			showAnim = this._get( inst, "showAnim" );
10717			duration = this._get( inst, "duration" );
10718			postProcess = function() {
10719				$.datepicker._tidyDialog( inst );
10720			};
10721
10722			// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
10723			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
10724				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
10725			} else {
10726				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
10727					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
10728			}
10729
10730			if ( !showAnim ) {
10731				postProcess();
10732			}
10733			this._datepickerShowing = false;
10734
10735			onClose = this._get( inst, "onClose" );
10736			if ( onClose ) {
10737				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
10738			}
10739
10740			this._lastInput = null;
10741			if ( this._inDialog ) {
10742				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
10743				if ( $.blockUI ) {
10744					$.unblockUI();
10745					$( "body" ).append( this.dpDiv );
10746				}
10747			}
10748			this._inDialog = false;
10749		}
10750	},
10751
10752	/* Tidy up after a dialog display. */
10753	_tidyDialog: function( inst ) {
10754		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
10755	},
10756
10757	/* Close date picker if clicked elsewhere. */
10758	_checkExternalClick: function( event ) {
10759		if ( !$.datepicker._curInst ) {
10760			return;
10761		}
10762
10763		var $target = $( event.target ),
10764			inst = $.datepicker._getInst( $target[ 0 ] );
10765
10766		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
10767				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
10768				!$target.hasClass( $.datepicker.markerClassName ) &&
10769				!$target.closest( "." + $.datepicker._triggerClass ).length &&
10770				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
10771			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
10772				$.datepicker._hideDatepicker();
10773		}
10774	},
10775
10776	/* Adjust one of the date sub-fields. */
10777	_adjustDate: function( id, offset, period ) {
10778		var target = $( id ),
10779			inst = this._getInst( target[ 0 ] );
10780
10781		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
10782			return;
10783		}
10784		this._adjustInstDate( inst, offset, period );
10785		this._updateDatepicker( inst );
10786	},
10787
10788	/* Action for current link. */
10789	_gotoToday: function( id ) {
10790		var date,
10791			target = $( id ),
10792			inst = this._getInst( target[ 0 ] );
10793
10794		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
10795			inst.selectedDay = inst.currentDay;
10796			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
10797			inst.drawYear = inst.selectedYear = inst.currentYear;
10798		} else {
10799			date = new Date();
10800			inst.selectedDay = date.getDate();
10801			inst.drawMonth = inst.selectedMonth = date.getMonth();
10802			inst.drawYear = inst.selectedYear = date.getFullYear();
10803		}
10804		this._notifyChange( inst );
10805		this._adjustDate( target );
10806	},
10807
10808	/* Action for selecting a new month/year. */
vendor: 4,615 bytes, lines 10809-10940
10809	_selectMonthYear: function( id, select, period ) {
10810		var target = $( id ),
10811			inst = this._getInst( target[ 0 ] );
10812
10813		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
10814		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
10815			parseInt( select.options[ select.selectedIndex ].value, 10 );
10816
10817		this._notifyChange( inst );
10818		this._adjustDate( target );
10819	},
10820
10821	/* Action for selecting a day. */
10822	_selectDay: function( id, month, year, td ) {
10823		var inst,
10824			target = $( id );
10825
10826		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
10827			return;
10828		}
10829
10830		inst = this._getInst( target[ 0 ] );
10831		inst.selectedDay = inst.currentDay = parseInt( $( "a", td ).attr( "data-date" ) );
10832		inst.selectedMonth = inst.currentMonth = month;
10833		inst.selectedYear = inst.currentYear = year;
10834		this._selectDate( id, this._formatDate( inst,
10835			inst.currentDay, inst.currentMonth, inst.currentYear ) );
10836	},
10837
10838	/* Erase the input field and hide the date picker. */
10839	_clearDate: function( id ) {
10840		var target = $( id );
10841		this._selectDate( target, "" );
10842	},
10843
10844	/* Update the input field with the selected date. */
10845	_selectDate: function( id, dateStr ) {
10846		var onSelect,
10847			target = $( id ),
10848			inst = this._getInst( target[ 0 ] );
10849
10850		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
10851		if ( inst.input ) {
10852			inst.input.val( dateStr );
10853		}
10854		this._updateAlternate( inst );
10855
10856		onSelect = this._get( inst, "onSelect" );
10857		if ( onSelect ) {
10858			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
10859		} else if ( inst.input ) {
10860			inst.input.trigger( "change" ); // fire the change event
10861		}
10862
10863		if ( inst.inline ) {
10864			this._updateDatepicker( inst );
10865		} else {
10866			this._hideDatepicker();
10867			this._lastInput = inst.input[ 0 ];
10868			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
10869				inst.input.trigger( "focus" ); // restore focus
10870			}
10871			this._lastInput = null;
10872		}
10873	},
10874
10875	/* Update any alternate field to synchronise with the main field. */
10876	_updateAlternate: function( inst ) {
10877		var altFormat, date, dateStr,
10878			altField = this._get( inst, "altField" );
10879
10880		if ( altField ) { // update alternate field too
10881			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
10882			date = this._getDate( inst );
10883			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
10884			$( document ).find( altField ).val( dateStr );
10885		}
10886	},
10887
10888	/* Set as beforeShowDay function to prevent selection of weekends.
10889	 * @param  date  Date - the date to customise
10890	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
10891	 */
10892	noWeekends: function( date ) {
10893		var day = date.getDay();
10894		return [ ( day > 0 && day < 6 ), "" ];
10895	},
10896
10897	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
10898	 * @param  date  Date - the date to get the week for
10899	 * @return  number - the number of the week within the year that contains this date
10900	 */
10901	iso8601Week: function( date ) {
10902		var time,
10903			checkDate = new Date( date.getTime() );
10904
10905		// Find Thursday of this week starting on Monday
10906		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
10907
10908		time = checkDate.getTime();
10909		checkDate.setMonth( 0 ); // Compare with Jan 1
10910		checkDate.setDate( 1 );
10911		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
10912	},
10913
10914	/* Parse a string value into a date object.
10915	 * See formatDate below for the possible formats.
10916	 *
10917	 * @param  format string - the expected format of the date
10918	 * @param  value string - the date in the above format
10919	 * @param  settings Object - attributes include:
10920	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
10921	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
10922	 *					dayNames		string[7] - names of the days from Sunday (optional)
10923	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
10924	 *					monthNames		string[12] - names of the months (optional)
10925	 * @return  Date - the extracted date value or null if value is blank
10926	 */
10927	parseDate: function( format, value, settings ) {
10928		if ( format == null || value == null ) {
10929			throw "Invalid arguments";
10930		}
10931
10932		value = ( typeof value === "object" ? value.toString() : value + "" );
10933		if ( value === "" ) {
10934			return null;
10935		}
10936
10937		var iFormat, dim, extra,
10938			iValue = 0,
10939			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
10940			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp 
vendor: 5,431 bytes, lines 10940-11130
10940:
10941				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
10942			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
10943			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
10944			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
10945			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
10946			year = -1,
10947			month = -1,
10948			day = -1,
10949			doy = -1,
10950			literal = false,
10951			date,
10952
10953			// Check whether a format character is doubled
10954			lookAhead = function( match ) {
10955				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
10956				if ( matches ) {
10957					iFormat++;
10958				}
10959				return matches;
10960			},
10961
10962			// Extract a number from the string value
10963			getNumber = function( match ) {
10964				var isDoubled = lookAhead( match ),
10965					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
10966					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
10967					minSize = ( match === "y" ? size : 1 ),
10968					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
10969					num = value.substring( iValue ).match( digits );
10970				if ( !num ) {
10971					throw "Missing number at position " + iValue;
10972				}
10973				iValue += num[ 0 ].length;
10974				return parseInt( num[ 0 ], 10 );
10975			},
10976
10977			// Extract a name from the string value and convert to an index
10978			getName = function( match, shortNames, longNames ) {
10979				var index = -1,
10980					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
10981						return [ [ k, v ] ];
10982					} ).sort( function( a, b ) {
10983						return -( a[ 1 ].length - b[ 1 ].length );
10984					} );
10985
10986				$.each( names, function( i, pair ) {
10987					var name = pair[ 1 ];
10988					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
10989						index = pair[ 0 ];
10990						iValue += name.length;
10991						return false;
10992					}
10993				} );
10994				if ( index !== -1 ) {
10995					return index + 1;
10996				} else {
10997					throw "Unknown name at position " + iValue;
10998				}
10999			},
11000
11001			// Confirm that a literal character matches the string value
11002			checkLiteral = function() {
11003				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
11004					throw "Unexpected literal at position " + iValue;
11005				}
11006				iValue++;
11007			};
11008
11009		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
11010			if ( literal ) {
11011				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
11012					literal = false;
11013				} else {
11014					checkLiteral();
11015				}
11016			} else {
11017				switch ( format.charAt( iFormat ) ) {
11018					case "d":
11019						day = getNumber( "d" );
11020						break;
11021					case "D":
11022						getName( "D", dayNamesShort, dayNames );
11023						break;
11024					case "o":
11025						doy = getNumber( "o" );
11026						break;
11027					case "m":
11028						month = getNumber( "m" );
11029						break;
11030					case "M":
11031						month = getName( "M", monthNamesShort, monthNames );
11032						break;
11033					case "y":
11034						year = getNumber( "y" );
11035						break;
11036					case "@":
11037						date = new Date( getNumber( "@" ) );
11038						year = date.getFullYear();
11039						month = date.getMonth() + 1;
11040						day = date.getDate();
11041						break;
11042					case "!":
11043						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
11044						year = date.getFullYear();
11045						month = date.getMonth() + 1;
11046						day = date.getDate();
11047						break;
11048					case "'":
11049						if ( lookAhead( "'" ) ) {
11050							checkLiteral();
11051						} else {
11052							literal = true;
11053						}
11054						break;
11055					default:
11056						checkLiteral();
11057				}
11058			}
11059		}
11060
11061		if ( iValue < value.length ) {
11062			extra = value.substr( iValue );
11063			if ( !/^\s+/.test( extra ) ) {
11064				throw "Extra/unparsed characters found in date: " + extra;
11065			}
11066		}
11067
11068		if ( year === -1 ) {
11069			year = new Date().getFullYear();
11070		} else if ( year < 100 ) {
11071			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
11072				( year <= shortYearCutoff ? 0 : -100 );
11073		}
11074
11075		if ( doy > -1 ) {
11076			month = 1;
11077			day = doy;
11078			do {
11079				dim = this._getDaysInMonth( year, month - 1 );
11080				if ( day <= dim ) {
11081					break;
11082				}
11083				month++;
11084				day -= dim;
11085			} while ( true );
11086		}
11087
11088		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
11089		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
11090			throw "Invalid date"; // E.g. 31/02/00
11091		}
11092		return date;
11093	},
11094
11095	/* Standard date formats. */
11096	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
11097	COOKIE: "D, dd M yy",
11098	ISO_8601: "yy-mm-dd",
11099	RFC_822: "D, d M y",
11100	RFC_850: "DD, dd-M-y",
11101	RFC_1036: "D, d M y",
11102	RFC_1123: "D, d M yy",
11103	RFC_2822: "D, d M yy",
11104	RSS: "D, d M y", // RFC 822
11105	TICKS: "!",
11106	TIMESTAMP: "@",
11107	W3C: "yy-mm-dd", // ISO 8601
11108
11109	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
11110		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
11111
11112	/* Format a date object into a string value.
11113	 * The format can be combinations of the following:
11114	 * d  - day of month (no leading zero)
11115	 * dd - day of month (two digit)
11116	 * o  - day of year (no leading zeros)
11117	 * oo - day of year (three digit)
11118	 * D  - day name short
11119	 * DD - day name long
11120	 * m  - month of year (no leading zero)
11121	 * mm - month of year (two digit)
11122	 * M  - month name short
11123	 * MM - month name long
11124	 * y  - year (two digit)
11125	 * yy - year (four digit)
11126	 * @ - Unix timestamp (ms since 01/01/1970)
11127	 * ! - Windows ticks (100ns since 01/01/0001)
11128	 * "..." - literal text
11129	 * '' - single quote
11130	 *
vendor: 6,198 bytes, lines 11131-11330
11131	 * @param  format string - the desired format of the date
11132	 * @param  date Date - the date value to format
11133	 * @param  settings Object - attributes include:
11134	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
11135	 *					dayNames		string[7] - names of the days from Sunday (optional)
11136	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
11137	 *					monthNames		string[12] - names of the months (optional)
11138	 * @return  string - the date in the above format
11139	 */
11140	formatDate: function( format, date, settings ) {
11141		if ( !date ) {
11142			return "";
11143		}
11144
11145		var iFormat,
11146			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
11147			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
11148			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
11149			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
11150
11151			// Check whether a format character is doubled
11152			lookAhead = function( match ) {
11153				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
11154				if ( matches ) {
11155					iFormat++;
11156				}
11157				return matches;
11158			},
11159
11160			// Format a number, with leading zero if necessary
11161			formatNumber = function( match, value, len ) {
11162				var num = "" + value;
11163				if ( lookAhead( match ) ) {
11164					while ( num.length < len ) {
11165						num = "0" + num;
11166					}
11167				}
11168				return num;
11169			},
11170
11171			// Format a name, short or long as requested
11172			formatName = function( match, value, shortNames, longNames ) {
11173				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
11174			},
11175			output = "",
11176			literal = false;
11177
11178		if ( date ) {
11179			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
11180				if ( literal ) {
11181					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
11182						literal = false;
11183					} else {
11184						output += format.charAt( iFormat );
11185					}
11186				} else {
11187					switch ( format.charAt( iFormat ) ) {
11188						case "d":
11189							output += formatNumber( "d", date.getDate(), 2 );
11190							break;
11191						case "D":
11192							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
11193							break;
11194						case "o":
11195							output += formatNumber( "o",
11196								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
11197							break;
11198						case "m":
11199							output += formatNumber( "m", date.getMonth() + 1, 2 );
11200							break;
11201						case "M":
11202							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
11203							break;
11204						case "y":
11205							output += ( lookAhead( "y" ) ? date.getFullYear() :
11206								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
11207							break;
11208						case "@":
11209							output += date.getTime();
11210							break;
11211						case "!":
11212							output += date.getTime() * 10000 + this._ticksTo1970;
11213							break;
11214						case "'":
11215							if ( lookAhead( "'" ) ) {
11216								output += "'";
11217							} else {
11218								literal = true;
11219							}
11220							break;
11221						default:
11222							output += format.charAt( iFormat );
11223					}
11224				}
11225			}
11226		}
11227		return output;
11228	},
11229
11230	/* Extract all possible characters from the date format. */
11231	_possibleChars: function( format ) {
11232		var iFormat,
11233			chars = "",
11234			literal = false,
11235
11236			// Check whether a format character is doubled
11237			lookAhead = function( match ) {
11238				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
11239				if ( matches ) {
11240					iFormat++;
11241				}
11242				return matches;
11243			};
11244
11245		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
11246			if ( literal ) {
11247				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
11248					literal = false;
11249				} else {
11250					chars += format.charAt( iFormat );
11251				}
11252			} else {
11253				switch ( format.charAt( iFormat ) ) {
11254					case "d": case "m": case "y": case "@":
11255						chars += "0123456789";
11256						break;
11257					case "D": case "M":
11258						return null; // Accept anything
11259					case "'":
11260						if ( lookAhead( "'" ) ) {
11261							chars += "'";
11262						} else {
11263							literal = true;
11264						}
11265						break;
11266					default:
11267						chars += format.charAt( iFormat );
11268				}
11269			}
11270		}
11271		return chars;
11272	},
11273
11274	/* Get a setting value, defaulting if necessary. */
11275	_get: function( inst, name ) {
11276		return inst.settings[ name ] !== undefined ?
11277			inst.settings[ name ] : this._defaults[ name ];
11278	},
11279
11280	/* Parse existing date and initialise date picker. */
11281	_setDateFromField: function( inst, noDefault ) {
11282		if ( inst.input.val() === inst.lastVal ) {
11283			return;
11284		}
11285
11286		var dateFormat = this._get( inst, "dateFormat" ),
11287			dates = inst.lastVal = inst.input ? inst.input.val() : null,
11288			defaultDate = this._getDefaultDate( inst ),
11289			date = defaultDate,
11290			settings = this._getFormatConfig( inst );
11291
11292		try {
11293			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
11294		} catch ( event ) {
11295			dates = ( noDefault ? "" : dates );
11296		}
11297		inst.selectedDay = date.getDate();
11298		inst.drawMonth = inst.selectedMonth = date.getMonth();
11299		inst.drawYear = inst.selectedYear = date.getFullYear();
11300		inst.currentDay = ( dates ? date.getDate() : 0 );
11301		inst.currentMonth = ( dates ? date.getMonth() : 0 );
11302		inst.currentYear = ( dates ? date.getFullYear() : 0 );
11303		this._adjustInstDate( inst );
11304	},
11305
11306	/* Retrieve the default date shown on opening. */
11307	_getDefaultDate: function( inst ) {
11308		return this._restrictMinMax( inst,
11309			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
11310	},
11311
11312	/* A date may be specified as an exact value or a relative one. */
11313	_determineDate: function( inst, date, defaultDate ) {
11314		var offsetNumeric = function( offset ) {
11315				var date = new Date();
11316				date.setDate( date.getDate() + offset );
11317				return date;
11318			},
11319			offsetString = function( offset ) {
11320				try {
11321					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
11322						offset, $.datepicker._getFormatConfig( inst ) );
11323				} catch ( e ) {
11324
11325					// Ignore
11326				}
11327
11328				var date = ( offset.toLowerCase().match( /^c/ ) ?
11329					$.datepicker._getDate( inst ) : null ) || new Date(),
11330					year = date.getFullYear(),
vendor: 5,359 bytes, lines 11331-11469
11331					month = date.getMonth(),
11332					day = date.getDate(),
11333					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
11334					matches = pattern.exec( offset );
11335
11336				while ( matches ) {
11337					switch ( matches[ 2 ] || "d" ) {
11338						case "d" : case "D" :
11339							day += parseInt( matches[ 1 ], 10 ); break;
11340						case "w" : case "W" :
11341							day += parseInt( matches[ 1 ], 10 ) * 7; break;
11342						case "m" : case "M" :
11343							month += parseInt( matches[ 1 ], 10 );
11344							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
11345							break;
11346						case "y": case "Y" :
11347							year += parseInt( matches[ 1 ], 10 );
11348							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
11349							break;
11350					}
11351					matches = pattern.exec( offset );
11352				}
11353				return new Date( year, month, day );
11354			},
11355			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
11356				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
11357
11358		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
11359		if ( newDate ) {
11360			newDate.setHours( 0 );
11361			newDate.setMinutes( 0 );
11362			newDate.setSeconds( 0 );
11363			newDate.setMilliseconds( 0 );
11364		}
11365		return this._daylightSavingAdjust( newDate );
11366	},
11367
11368	/* Handle switch to/from daylight saving.
11369	 * Hours may be non-zero on daylight saving cut-over:
11370	 * > 12 when midnight changeover, but then cannot generate
11371	 * midnight datetime, so jump to 1AM, otherwise reset.
11372	 * @param  date  (Date) the date to check
11373	 * @return  (Date) the corrected date
11374	 */
11375	_daylightSavingAdjust: function( date ) {
11376		if ( !date ) {
11377			return null;
11378		}
11379		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
11380		return date;
11381	},
11382
11383	/* Set the date(s) directly. */
11384	_setDate: function( inst, date, noChange ) {
11385		var clear = !date,
11386			origMonth = inst.selectedMonth,
11387			origYear = inst.selectedYear,
11388			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
11389
11390		inst.selectedDay = inst.currentDay = newDate.getDate();
11391		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
11392		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
11393		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
11394			this._notifyChange( inst );
11395		}
11396		this._adjustInstDate( inst );
11397		if ( inst.input ) {
11398			inst.input.val( clear ? "" : this._formatDate( inst ) );
11399		}
11400	},
11401
11402	/* Retrieve the date(s) directly. */
11403	_getDate: function( inst ) {
11404		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
11405			this._daylightSavingAdjust( new Date(
11406			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
11407			return startDate;
11408	},
11409
11410	/* Attach the onxxx handlers.  These are declared statically so
11411	 * they work with static code transformers like Caja.
11412	 */
11413	_attachHandlers: function( inst ) {
11414		var stepMonths = this._get( inst, "stepMonths" ),
11415			id = "#" + inst.id.replace( /\\\\/g, "\\" );
11416		inst.dpDiv.find( "[data-handler]" ).map( function() {
11417			var handler = {
11418				prev: function() {
11419					$.datepicker._adjustDate( id, -stepMonths, "M" );
11420				},
11421				next: function() {
11422					$.datepicker._adjustDate( id, +stepMonths, "M" );
11423				},
11424				hide: function() {
11425					$.datepicker._hideDatepicker();
11426				},
11427				today: function() {
11428					$.datepicker._gotoToday( id );
11429				},
11430				selectDay: function() {
11431					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
11432					return false;
11433				},
11434				selectMonth: function() {
11435					$.datepicker._selectMonthYear( id, this, "M" );
11436					return false;
11437				},
11438				selectYear: function() {
11439					$.datepicker._selectMonthYear( id, this, "Y" );
11440					return false;
11441				}
11442			};
11443			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
11444		} );
11445	},
11446
11447	/* Generate the HTML for the current state of the date picker. */
11448	_generateHTML: function( inst ) {
11449		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
11450			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
11451			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
11452			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
11453			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
11454			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
11455			tempDate = new Date(),
11456			today = this._daylightSavingAdjust(
11457				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
11458			isRTL = this._get( inst, "isRTL" ),
11459			showButtonPanel = this._get( inst, "showButtonPanel" ),
11460			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
11461			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
11462			numMonths = this._getNumberOfMonths( inst ),
11463			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
11464			stepMonths = this._get( inst, "stepMonths" ),
11465			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
11466			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
11467				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
11468			minDate = this._getMinMaxDate( inst, "min" ),
11469			maxDate = this._getMinMaxDate( inst, "max" ),
vendor: 21,257 bytes, lines 11470-11984
11470			drawMonth = inst.drawMonth - showCurrentAtPos,
11471			drawYear = inst.drawYear;
11472
11473		if ( drawMonth < 0 ) {
11474			drawMonth += 12;
11475			drawYear--;
11476		}
11477		if ( maxDate ) {
11478			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
11479				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
11480			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
11481			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
11482				drawMonth--;
11483				if ( drawMonth < 0 ) {
11484					drawMonth = 11;
11485					drawYear--;
11486				}
11487			}
11488		}
11489		inst.drawMonth = drawMonth;
11490		inst.drawYear = drawYear;
11491
11492		prevText = this._get( inst, "prevText" );
11493		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
11494			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
11495			this._getFormatConfig( inst ) ) );
11496
11497		if ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ) {
11498			prev = $( "<a>" )
11499				.attr( {
11500					"class": "ui-datepicker-prev ui-corner-all",
11501					"data-handler": "prev",
11502					"data-event": "click",
11503					title: prevText
11504				} )
11505				.append(
11506					$( "<span>" )
11507						.addClass( "ui-icon ui-icon-circle-triangle-" +
11508							( isRTL ? "e" : "w" ) )
11509						.text( prevText )
11510				)[ 0 ].outerHTML;
11511		} else if ( hideIfNoPrevNext ) {
11512			prev = "";
11513		} else {
11514			prev = $( "<a>" )
11515				.attr( {
11516					"class": "ui-datepicker-prev ui-corner-all ui-state-disabled",
11517					title: prevText
11518				} )
11519				.append(
11520					$( "<span>" )
11521						.addClass( "ui-icon ui-icon-circle-triangle-" +
11522							( isRTL ? "e" : "w" ) )
11523						.text( prevText )
11524				)[ 0 ].outerHTML;
11525		}
11526
11527		nextText = this._get( inst, "nextText" );
11528		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
11529			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
11530			this._getFormatConfig( inst ) ) );
11531
11532		if ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ) {
11533			next = $( "<a>" )
11534				.attr( {
11535					"class": "ui-datepicker-next ui-corner-all",
11536					"data-handler": "next",
11537					"data-event": "click",
11538					title: nextText
11539				} )
11540				.append(
11541					$( "<span>" )
11542						.addClass( "ui-icon ui-icon-circle-triangle-" +
11543							( isRTL ? "w" : "e" ) )
11544						.text( nextText )
11545				)[ 0 ].outerHTML;
11546		} else if ( hideIfNoPrevNext ) {
11547			next = "";
11548		} else {
11549			next = $( "<a>" )
11550				.attr( {
11551					"class": "ui-datepicker-next ui-corner-all ui-state-disabled",
11552					title: nextText
11553				} )
11554				.append(
11555					$( "<span>" )
11556						.attr( "class", "ui-icon ui-icon-circle-triangle-" +
11557							( isRTL ? "w" : "e" ) )
11558						.text( nextText )
11559				)[ 0 ].outerHTML;
11560		}
11561
11562		currentText = this._get( inst, "currentText" );
11563		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
11564		currentText = ( !navigationAsDateFormat ? currentText :
11565			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
11566
11567		controls = "";
11568		if ( !inst.inline ) {
11569			controls = $( "<button>" )
11570				.attr( {
11571					type: "button",
11572					"class": "ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all",
11573					"data-handler": "hide",
11574					"data-event": "click"
11575				} )
11576				.text( this._get( inst, "closeText" ) )[ 0 ].outerHTML;
11577		}
11578
11579		buttonPanel = "";
11580		if ( showButtonPanel ) {
11581			buttonPanel = $( "<div class='ui-datepicker-buttonpane ui-widget-content'>" )
11582				.append( isRTL ? controls : "" )
11583				.append( this._isInRange( inst, gotoDate ) ?
11584					$( "<button>" )
11585						.attr( {
11586							type: "button",
11587							"class": "ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all",
11588							"data-handler": "today",
11589							"data-event": "click"
11590						} )
11591						.text( currentText ) :
11592					"" )
11593				.append( isRTL ? "" : controls )[ 0 ].outerHTML;
11594		}
11595
11596		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
11597		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
11598
11599		showWeek = this._get( inst, "showWeek" );
11600		dayNames = this._get( inst, "dayNames" );
11601		dayNamesMin = this._get( inst, "dayNamesMin" );
11602		monthNames = this._get( inst, "monthNames" );
11603		monthNamesShort = this._get( inst, "monthNamesShort" );
11604		beforeShowDay = this._get( inst, "beforeShowDay" );
11605		showOtherMonths = this._get( inst, "showOtherMonths" );
11606		selectOtherMonths = this._get( inst, "selectOtherMonths" );
11607		defaultDate = this._getDefaultDate( inst );
11608		html = "";
11609
11610		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
11611			group = "";
11612			this.maxRows = 4;
11613			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
11614				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
11615				cornerClass = " ui-corner-all";
11616				calender = "";
11617				if ( isMultiMonth ) {
11618					calender += "<div class='ui-datepicker-group";
11619					if ( numMonths[ 1 ] > 1 ) {
11620						switch ( col ) {
11621							case 0: calender += " ui-datepicker-group-first";
11622								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
11623							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
11624								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
11625							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
11626						}
11627					}
11628					calender += "'>";
11629				}
11630				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
11631					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
11632					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
11633					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
11634					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
11635					"</div><table class='ui-datepicker-calendar'><thead>" +
11636					"<tr>";
11637				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
11638				for ( dow = 0; dow < 7; dow++ ) { // days of the week
11639					day = ( dow + firstDay ) % 7;
11640					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
11641						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
11642				}
11643				calender += thead + "</tr></thead><tbody>";
11644				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
11645				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
11646					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
11647				}
11648				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
11649				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
11650				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
11651				this.maxRows = numRows;
11652				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
11653				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
11654					calender += "<tr>";
11655					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
11656						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
11657					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
11658						daySettings = ( beforeShowDay ?
11659							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
11660						otherMonth = ( printDate.getMonth() !== drawMonth );
11661						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
11662							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
11663						tbody += "<td class='" +
11664							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
11665							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
11666							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
11667							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
11668
11669							// or defaultDate is current printedDate and defaultDate is selectedDate
11670							" " + this._dayOverClass : "" ) + // highlight selected day
11671							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
11672							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
11673							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
11674							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
11675							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
11676							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
11677							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
11678							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
11679							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
11680							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
11681							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
11682							"' href='#' aria-current='" + ( printDate.getTime() === currentDate.getTime() ? "true" : "false" ) + // mark date as selected for screen reader
11683							"' data-date='" + printDate.getDate() + // store date as data
11684							"'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
11685						printDate.setDate( printDate.getDate() + 1 );
11686						printDate = this._daylightSavingAdjust( printDate );
11687					}
11688					calender += tbody + "</tr>";
11689				}
11690				drawMonth++;
11691				if ( drawMonth > 11 ) {
11692					drawMonth = 0;
11693					drawYear++;
11694				}
11695				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
11696							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
11697				group += calender;
11698			}
11699			html += group;
11700		}
11701		html += buttonPanel;
11702		inst._keyEvent = false;
11703		return html;
11704	},
11705
11706	/* Generate the month and year header. */
11707	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
11708			secondary, monthNames, monthNamesShort ) {
11709
11710		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
11711			changeMonth = this._get( inst, "changeMonth" ),
11712			changeYear = this._get( inst, "changeYear" ),
11713			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
11714			selectMonthLabel = this._get( inst, "selectMonthLabel" ),
11715			selectYearLabel = this._get( inst, "selectYearLabel" ),
11716			html = "<div class='ui-datepicker-title'>",
11717			monthHtml = "";
11718
11719		// Month selection
11720		if ( secondary || !changeMonth ) {
11721			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
11722		} else {
11723			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
11724			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
11725			monthHtml += "<select class='ui-datepicker-month' aria-label='" + selectMonthLabel + "' data-handler='selectMonth' data-event='change'>";
11726			for ( month = 0; month < 12; month++ ) {
11727				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
11728					monthHtml += "<option value='" + month + "'" +
11729						( month === drawMonth ? " selected='selected'" : "" ) +
11730						">" + monthNamesShort[ month ] + "</option>";
11731				}
11732			}
11733			monthHtml += "</select>";
11734		}
11735
11736		if ( !showMonthAfterYear ) {
11737			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
11738		}
11739
11740		// Year selection
11741		if ( !inst.yearshtml ) {
11742			inst.yearshtml = "";
11743			if ( secondary || !changeYear ) {
11744				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
11745			} else {
11746
11747				// determine range of years to display
11748				years = this._get( inst, "yearRange" ).split( ":" );
11749				thisYear = new Date().getFullYear();
11750				determineYear = function( value ) {
11751					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
11752						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
11753						parseInt( value, 10 ) ) );
11754					return ( isNaN( year ) ? thisYear : year );
11755				};
11756				year = determineYear( years[ 0 ] );
11757				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
11758				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
11759				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
11760				inst.yearshtml += "<select class='ui-datepicker-year' aria-label='" + selectYearLabel + "' data-handler='selectYear' data-event='change'>";
11761				for ( ; year <= endYear; year++ ) {
11762					inst.yearshtml += "<option value='" + year + "'" +
11763						( year === drawYear ? " selected='selected'" : "" ) +
11764						">" + year + "</option>";
11765				}
11766				inst.yearshtml += "</select>";
11767
11768				html += inst.yearshtml;
11769				inst.yearshtml = null;
11770			}
11771		}
11772
11773		html += this._get( inst, "yearSuffix" );
11774		if ( showMonthAfterYear ) {
11775			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
11776		}
11777		html += "</div>"; // Close datepicker_header
11778		return html;
11779	},
11780
11781	/* Adjust one of the date sub-fields. */
11782	_adjustInstDate: function( inst, offset, period ) {
11783		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
11784			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
11785			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
11786			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
11787
11788		inst.selectedDay = date.getDate();
11789		inst.drawMonth = inst.selectedMonth = date.getMonth();
11790		inst.drawYear = inst.selectedYear = date.getFullYear();
11791		if ( period === "M" || period === "Y" ) {
11792			this._notifyChange( inst );
11793		}
11794	},
11795
11796	/* Ensure a date is within any min/max bounds. */
11797	_restrictMinMax: function( inst, date ) {
11798		var minDate = this._getMinMaxDate( inst, "min" ),
11799			maxDate = this._getMinMaxDate( inst, "max" ),
11800			newDate = ( minDate && date < minDate ? minDate : date );
11801		return ( maxDate && newDate > maxDate ? maxDate : newDate );
11802	},
11803
11804	/* Notify change of month/year. */
11805	_notifyChange: function( inst ) {
11806		var onChange = this._get( inst, "onChangeMonthYear" );
11807		if ( onChange ) {
11808			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
11809				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
11810		}
11811	},
11812
11813	/* Determine the number of months to show. */
11814	_getNumberOfMonths: function( inst ) {
11815		var numMonths = this._get( inst, "numberOfMonths" );
11816		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
11817	},
11818
11819	/* Determine the current maximum date - ensure no time components are set. */
11820	_getMinMaxDate: function( inst, minMax ) {
11821		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
11822	},
11823
11824	/* Find the number of days in a given month. */
11825	_getDaysInMonth: function( year, month ) {
11826		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
11827	},
11828
11829	/* Find the day of the week of the first of a month. */
11830	_getFirstDayOfMonth: function( year, month ) {
11831		return new Date( year, month, 1 ).getDay();
11832	},
11833
11834	/* Determines if we should allow a "next/prev" month display change. */
11835	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
11836		var numMonths = this._getNumberOfMonths( inst ),
11837			date = this._daylightSavingAdjust( new Date( curYear,
11838			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
11839
11840		if ( offset < 0 ) {
11841			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
11842		}
11843		return this._isInRange( inst, date );
11844	},
11845
11846	/* Is the given date in the accepted range? */
11847	_isInRange: function( inst, date ) {
11848		var yearSplit, currentYear,
11849			minDate = this._getMinMaxDate( inst, "min" ),
11850			maxDate = this._getMinMaxDate( inst, "max" ),
11851			minYear = null,
11852			maxYear = null,
11853			years = this._get( inst, "yearRange" );
11854			if ( years ) {
11855				yearSplit = years.split( ":" );
11856				currentYear = new Date().getFullYear();
11857				minYear = parseInt( yearSplit[ 0 ], 10 );
11858				maxYear = parseInt( yearSplit[ 1 ], 10 );
11859				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
11860					minYear += currentYear;
11861				}
11862				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
11863					maxYear += currentYear;
11864				}
11865			}
11866
11867		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
11868			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
11869			( !minYear || date.getFullYear() >= minYear ) &&
11870			( !maxYear || date.getFullYear() <= maxYear ) );
11871	},
11872
11873	/* Provide the configuration settings for formatting/parsing. */
11874	_getFormatConfig: function( inst ) {
11875		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
11876		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
11877			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
11878		return { shortYearCutoff: shortYearCutoff,
11879			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
11880			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
11881	},
11882
11883	/* Format the given date for display. */
11884	_formatDate: function( inst, day, month, year ) {
11885		if ( !day ) {
11886			inst.currentDay = inst.selectedDay;
11887			inst.currentMonth = inst.selectedMonth;
11888			inst.currentYear = inst.selectedYear;
11889		}
11890		var date = ( day ? ( typeof day === "object" ? day :
11891			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
11892			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
11893		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
11894	}
11895} );
11896
11897/*
11898 * Bind hover events for datepicker elements.
11899 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
11900 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
11901 */
11902function datepicker_bindHover( dpDiv ) {
11903	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
11904	return dpDiv.on( "mouseout", selector, function() {
11905			$( this ).removeClass( "ui-state-hover" );
11906			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
11907				$( this ).removeClass( "ui-datepicker-prev-hover" );
11908			}
11909			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
11910				$( this ).removeClass( "ui-datepicker-next-hover" );
11911			}
11912		} )
11913		.on( "mouseover", selector, datepicker_handleMouseover );
11914}
11915
11916function datepicker_handleMouseover() {
11917	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
11918		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
11919		$( this ).addClass( "ui-state-hover" );
11920		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
11921			$( this ).addClass( "ui-datepicker-prev-hover" );
11922		}
11923		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
11924			$( this ).addClass( "ui-datepicker-next-hover" );
11925		}
11926	}
11927}
11928
11929/* jQuery extend now ignores nulls! */
11930function datepicker_extendRemove( target, props ) {
11931	$.extend( target, props );
11932	for ( var name in props ) {
11933		if ( props[ name ] == null ) {
11934			target[ name ] = props[ name ];
11935		}
11936	}
11937	return target;
11938}
11939
11940/* Invoke the datepicker functionality.
11941   @param  options  string - a command, optionally followed by additional parameters or
11942					Object - settings for attaching new datepicker functionality
11943   @return  jQuery object */
11944$.fn.datepicker = function( options ) {
11945
11946	/* Verify an empty collection wasn't passed - Fixes #6976 */
11947	if ( !this.length ) {
11948		return this;
11949	}
11950
11951	/* Initialise the date picker. */
11952	if ( !$.datepicker.initialized ) {
11953		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
11954		$.datepicker.initialized = true;
11955	}
11956
11957	/* Append datepicker main container to body if not exist. */
11958	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
11959		$( "body" ).append( $.datepicker.dpDiv );
11960	}
11961
11962	var otherArgs = Array.prototype.slice.call( arguments, 1 );
11963	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
11964		return $.datepicker[ "_" + options + "Datepicker" ].
11965			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
11966	}
11967	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
11968		return $.datepicker[ "_" + options + "Datepicker" ].
11969			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
11970	}
11971	return this.each( function() {
11972		if ( typeof options === "string" ) {
11973			$.datepicker[ "_" + options + "Datepicker" ]
11974				.apply( $.datepicker, [ this ].concat( otherArgs ) );
11975		} else {
11976			$.datepicker._attachDatepicker( this, options );
11977		}
11978	} );
11979};
11980
11981$.datepicker = new Datepicker(); // singleton instance
11982$.datepicker.initialized = false;
11983$.datepicker.uuid = new Date().getTime();
11984$.datepicker.version = "1.1
119843.2";
11985
11986var widgetsDatepicker = $.datepicker;
11987
11988
11989/*!
11990 * jQuery UI Dialog 1.13.2
11991 * http://jqueryui.com
11992 *
11993 * Copyright jQuery Foundation and other contributors
11994 * Released under the MIT license.
11995 * http://jquery.org/license
11996 */
11997
11998//>>label: Dialog
11999//>>group: Widgets
12000//>>description: Displays customizable dialog windows.
12001//>>docs: http://api.jqueryui.com/dialog/
12002//>>demos: http://jqueryui.com/dialog/
12003//>>css.structure: ../../themes/base/core.css
12004//>>css.structure: ../../themes/base/dialog.css
12005//>>css.theme: ../../themes/base/theme.css
12006
12007
12008$.widget( "ui.dialog", {
12009	version: "1.13.2
vendor: 20,928 bytes, lines 12009-12843
12009",
12010	options: {
12011		appendTo: "body",
12012		autoOpen: true,
12013		buttons: [],
12014		classes: {
12015			"ui-dialog": "ui-corner-all",
12016			"ui-dialog-titlebar": "ui-corner-all"
12017		},
12018		closeOnEscape: true,
12019		closeText: "Close",
12020		draggable: true,
12021		hide: null,
12022		height: "auto",
12023		maxHeight: null,
12024		maxWidth: null,
12025		minHeight: 150,
12026		minWidth: 150,
12027		modal: false,
12028		position: {
12029			my: "center",
12030			at: "center",
12031			of: window,
12032			collision: "fit",
12033
12034			// Ensure the titlebar is always visible
12035			using: function( pos ) {
12036				var topOffset = $( this ).css( pos ).offset().top;
12037				if ( topOffset < 0 ) {
12038					$( this ).css( "top", pos.top - topOffset );
12039				}
12040			}
12041		},
12042		resizable: true,
12043		show: null,
12044		title: null,
12045		width: 300,
12046
12047		// Callbacks
12048		beforeClose: null,
12049		close: null,
12050		drag: null,
12051		dragStart: null,
12052		dragStop: null,
12053		focus: null,
12054		open: null,
12055		resize: null,
12056		resizeStart: null,
12057		resizeStop: null
12058	},
12059
12060	sizeRelatedOptions: {
12061		buttons: true,
12062		height: true,
12063		maxHeight: true,
12064		maxWidth: true,
12065		minHeight: true,
12066		minWidth: true,
12067		width: true
12068	},
12069
12070	resizableRelatedOptions: {
12071		maxHeight: true,
12072		maxWidth: true,
12073		minHeight: true,
12074		minWidth: true
12075	},
12076
12077	_create: function() {
12078		this.originalCss = {
12079			display: this.element[ 0 ].style.display,
12080			width: this.element[ 0 ].style.width,
12081			minHeight: this.element[ 0 ].style.minHeight,
12082			maxHeight: this.element[ 0 ].style.maxHeight,
12083			height: this.element[ 0 ].style.height
12084		};
12085		this.originalPosition = {
12086			parent: this.element.parent(),
12087			index: this.element.parent().children().index( this.element )
12088		};
12089		this.originalTitle = this.element.attr( "title" );
12090		if ( this.options.title == null && this.originalTitle != null ) {
12091			this.options.title = this.originalTitle;
12092		}
12093
12094		// Dialogs can't be disabled
12095		if ( this.options.disabled ) {
12096			this.options.disabled = false;
12097		}
12098
12099		this._createWrapper();
12100
12101		this.element
12102			.show()
12103			.removeAttr( "title" )
12104			.appendTo( this.uiDialog );
12105
12106		this._addClass( "ui-dialog-content", "ui-widget-content" );
12107
12108		this._createTitlebar();
12109		this._createButtonPane();
12110
12111		if ( this.options.draggable && $.fn.draggable ) {
12112			this._makeDraggable();
12113		}
12114		if ( this.options.resizable && $.fn.resizable ) {
12115			this._makeResizable();
12116		}
12117
12118		this._isOpen = false;
12119
12120		this._trackFocus();
12121	},
12122
12123	_init: function() {
12124		if ( this.options.autoOpen ) {
12125			this.open();
12126		}
12127	},
12128
12129	_appendTo: function() {
12130		var element = this.options.appendTo;
12131		if ( element && ( element.jquery || element.nodeType ) ) {
12132			return $( element );
12133		}
12134		return this.document.find( element || "body" ).eq( 0 );
12135	},
12136
12137	_destroy: function() {
12138		var next,
12139			originalPosition = this.originalPosition;
12140
12141		this._untrackInstance();
12142		this._destroyOverlay();
12143
12144		this.element
12145			.removeUniqueId()
12146			.css( this.originalCss )
12147
12148			// Without detaching first, the following becomes really slow
12149			.detach();
12150
12151		this.uiDialog.remove();
12152
12153		if ( this.originalTitle ) {
12154			this.element.attr( "title", this.originalTitle );
12155		}
12156
12157		next = originalPosition.parent.children().eq( originalPosition.index );
12158
12159		// Don't try to place the dialog next to itself (#8613)
12160		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
12161			next.before( this.element );
12162		} else {
12163			originalPosition.parent.append( this.element );
12164		}
12165	},
12166
12167	widget: function() {
12168		return this.uiDialog;
12169	},
12170
12171	disable: $.noop,
12172	enable: $.noop,
12173
12174	close: function( event ) {
12175		var that = this;
12176
12177		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
12178			return;
12179		}
12180
12181		this._isOpen = false;
12182		this._focusedElement = null;
12183		this._destroyOverlay();
12184		this._untrackInstance();
12185
12186		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
12187
12188			// Hiding a focused element doesn't trigger blur in WebKit
12189			// so in case we have nothing to focus on, explicitly blur the active element
12190			// https://bugs.webkit.org/show_bug.cgi?id=47182
12191			$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
12192		}
12193
12194		this._hide( this.uiDialog, this.options.hide, function() {
12195			that._trigger( "close", event );
12196		} );
12197	},
12198
12199	isOpen: function() {
12200		return this._isOpen;
12201	},
12202
12203	moveToTop: function() {
12204		this._moveToTop();
12205	},
12206
12207	_moveToTop: function( event, silent ) {
12208		var moved = false,
12209			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
12210				return +$( this ).css( "z-index" );
12211			} ).get(),
12212			zIndexMax = Math.max.apply( null, zIndices );
12213
12214		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
12215			this.uiDialog.css( "z-index", zIndexMax + 1 );
12216			moved = true;
12217		}
12218
12219		if ( moved && !silent ) {
12220			this._trigger( "focus", event );
12221		}
12222		return moved;
12223	},
12224
12225	open: function() {
12226		var that = this;
12227		if ( this._isOpen ) {
12228			if ( this._moveToTop() ) {
12229				this._focusTabbable();
12230			}
12231			return;
12232		}
12233
12234		this._isOpen = true;
12235		this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
12236
12237		this._size();
12238		this._position();
12239		this._createOverlay();
12240		this._moveToTop( null, true );
12241
12242		// Ensure the overlay is moved to the top with the dialog, but only when
12243		// opening. The overlay shouldn't move after the dialog is open so that
12244		// modeless dialogs opened after the modal dialog stack properly.
12245		if ( this.overlay ) {
12246			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
12247		}
12248
12249		this._show( this.uiDialog, this.options.show, function() {
12250			that._focusTabbable();
12251			that._trigger( "focus" );
12252		} );
12253
12254		// Track the dialog immediately upon opening in case a focus event
12255		// somehow occurs outside of the dialog before an element inside the
12256		// dialog is focused (#10152)
12257		this._makeFocusTarget();
12258
12259		this._trigger( "open" );
12260	},
12261
12262	_focusTabbable: function() {
12263
12264		// Set focus to the first match:
12265		// 1. An element that was focused previously
12266		// 2. First element inside the dialog matching [autofocus]
12267		// 3. Tabbable element inside the content element
12268		// 4. Tabbable element inside the buttonpane
12269		// 5. The close button
12270		// 6. The dialog itself
12271		var hasFocus = this._focusedElement;
12272		if ( !hasFocus ) {
12273			hasFocus = this.element.find( "[autofocus]" );
12274		}
12275		if ( !hasFocus.length ) {
12276			hasFocus = this.element.find( ":tabbable" );
12277		}
12278		if ( !hasFocus.length ) {
12279			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
12280		}
12281		if ( !hasFocus.length ) {
12282			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
12283		}
12284		if ( !hasFocus.length ) {
12285			hasFocus = this.uiDialog;
12286		}
12287		hasFocus.eq( 0 ).trigger( "focus" );
12288	},
12289
12290	_restoreTabbableFocus: function() {
12291		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
12292			isActive = this.uiDialog[ 0 ] === activeElement ||
12293				$.contains( this.uiDialog[ 0 ], activeElement );
12294		if ( !isActive ) {
12295			this._focusTabbable();
12296		}
12297	},
12298
12299	_keepFocus: function( event ) {
12300		event.preventDefault();
12301		this._restoreTabbableFocus();
12302
12303		// support: IE
12304		// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
12305		// so we check again later
12306		this._delay( this._restoreTabbableFocus );
12307	},
12308
12309	_createWrapper: function() {
12310		this.uiDialog = $( "<div>" )
12311			.hide()
12312			.attr( {
12313
12314				// Setting tabIndex makes the div focusable
12315				tabIndex: -1,
12316				role: "dialog"
12317			} )
12318			.appendTo( this._appendTo() );
12319
12320		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
12321		this._on( this.uiDialog, {
12322			keydown: function( event ) {
12323				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
12324						event.keyCode === $.ui.keyCode.ESCAPE ) {
12325					event.preventDefault();
12326					this.close( event );
12327					return;
12328				}
12329
12330				// Prevent tabbing out of dialogs
12331				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
12332					return;
12333				}
12334				var tabbables = this.uiDialog.find( ":tabbable" ),
12335					first = tabbables.first(),
12336					last = tabbables.last();
12337
12338				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
12339						!event.shiftKey ) {
12340					this._delay( function() {
12341						first.trigger( "focus" );
12342					} );
12343					event.preventDefault();
12344				} else if ( ( event.target === first[ 0 ] ||
12345						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
12346					this._delay( function() {
12347						last.trigger( "focus" );
12348					} );
12349					event.preventDefault();
12350				}
12351			},
12352			mousedown: function( event ) {
12353				if ( this._moveToTop( event ) ) {
12354					this._focusTabbable();
12355				}
12356			}
12357		} );
12358
12359		// We assume that any existing aria-describedby attribute means
12360		// that the dialog content is marked up properly
12361		// otherwise we brute force the content as the description
12362		if ( !this.element.find( "[aria-describedby]" ).length ) {
12363			this.uiDialog.attr( {
12364				"aria-describedby": this.element.uniqueId().attr( "id" )
12365			} );
12366		}
12367	},
12368
12369	_createTitlebar: function() {
12370		var uiDialogTitle;
12371
12372		this.uiDialogTitlebar = $( "<div>" );
12373		this._addClass( this.uiDialogTitlebar,
12374			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
12375		this._on( this.uiDialogTitlebar, {
12376			mousedown: function( event ) {
12377
12378				// Don't prevent click on close button (#8838)
12379				// Focusing a dialog that is partially scrolled out of view
12380				// causes the browser to scroll it into view, preventing the click event
12381				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
12382
12383					// Dialog isn't getting focus when dragging (#8063)
12384					this.uiDialog.trigger( "focus" );
12385				}
12386			}
12387		} );
12388
12389		// Support: IE
12390		// Use type="button" to prevent enter keypresses in textboxes from closing the
12391		// dialog in IE (#9312)
12392		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
12393			.button( {
12394				label: $( "<a>" ).text( this.options.closeText ).html(),
12395				icon: "ui-icon-closethick",
12396				showLabel: false
12397			} )
12398			.appendTo( this.uiDialogTitlebar );
12399
12400		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
12401		this._on( this.uiDialogTitlebarClose, {
12402			click: function( event ) {
12403				event.preventDefault();
12404				this.close( event );
12405			}
12406		} );
12407
12408		uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
12409		this._addClass( uiDialogTitle, "ui-dialog-title" );
12410		this._title( uiDialogTitle );
12411
12412		this.uiDialogTitlebar.prependTo( this.uiDialog );
12413
12414		this.uiDialog.attr( {
12415			"aria-labelledby": uiDialogTitle.attr( "id" )
12416		} );
12417	},
12418
12419	_title: function( title ) {
12420		if ( this.options.title ) {
12421			title.text( this.options.title );
12422		} else {
12423			title.html( "&#160;" );
12424		}
12425	},
12426
12427	_createButtonPane: function() {
12428		this.uiDialogButtonPane = $( "<div>" );
12429		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
12430			"ui-widget-content ui-helper-clearfix" );
12431
12432		this.uiButtonSet = $( "<div>" )
12433			.appendTo( this.uiDialogButtonPane );
12434		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
12435
12436		this._createButtons();
12437	},
12438
12439	_createButtons: function() {
12440		var that = this,
12441			buttons = this.options.buttons;
12442
12443		// If we already have a button pane, remove it
12444		this.uiDialogButtonPane.remove();
12445		this.uiButtonSet.empty();
12446
12447		if ( $.isEmptyObject( buttons ) || ( Array.isArray( buttons ) && !buttons.length ) ) {
12448			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
12449			return;
12450		}
12451
12452		$.each( buttons, function( name, props ) {
12453			var click, buttonOptions;
12454			props = typeof props === "function" ?
12455				{ click: props, text: name } :
12456				props;
12457
12458			// Default to a non-submitting button
12459			props = $.extend( { type: "button" }, props );
12460
12461			// Change the context for the click callback to be the main element
12462			click = props.click;
12463			buttonOptions = {
12464				icon: props.icon,
12465				iconPosition: props.iconPosition,
12466				showLabel: props.showLabel,
12467
12468				// Deprecated options
12469				icons: props.icons,
12470				text: props.text
12471			};
12472
12473			delete props.click;
12474			delete props.icon;
12475			delete props.iconPosition;
12476			delete props.showLabel;
12477
12478			// Deprecated options
12479			delete props.icons;
12480			if ( typeof props.text === "boolean" ) {
12481				delete props.text;
12482			}
12483
12484			$( "<button></button>", props )
12485				.button( buttonOptions )
12486				.appendTo( that.uiButtonSet )
12487				.on( "click", function() {
12488					click.apply( that.element[ 0 ], arguments );
12489				} );
12490		} );
12491		this._addClass( this.uiDialog, "ui-dialog-buttons" );
12492		this.uiDialogButtonPane.appendTo( this.uiDialog );
12493	},
12494
12495	_makeDraggable: function() {
12496		var that = this,
12497			options = this.options;
12498
12499		function filteredUi( ui ) {
12500			return {
12501				position: ui.position,
12502				offset: ui.offset
12503			};
12504		}
12505
12506		this.uiDialog.draggable( {
12507			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
12508			handle: ".ui-dialog-titlebar",
12509			containment: "document",
12510			start: function( event, ui ) {
12511				that._addClass( $( this ), "ui-dialog-dragging" );
12512				that._blockFrames();
12513				that._trigger( "dragStart", event, filteredUi( ui ) );
12514			},
12515			drag: function( event, ui ) {
12516				that._trigger( "drag", event, filteredUi( ui ) );
12517			},
12518			stop: function( event, ui ) {
12519				var left = ui.offset.left - that.document.scrollLeft(),
12520					top = ui.offset.top - that.document.scrollTop();
12521
12522				options.position = {
12523					my: "left top",
12524					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
12525						"top" + ( top >= 0 ? "+" : "" ) + top,
12526					of: that.window
12527				};
12528				that._removeClass( $( this ), "ui-dialog-dragging" );
12529				that._unblockFrames();
12530				that._trigger( "dragStop", event, filteredUi( ui ) );
12531			}
12532		} );
12533	},
12534
12535	_makeResizable: function() {
12536		var that = this,
12537			options = this.options,
12538			handles = options.resizable,
12539
12540			// .ui-resizable has position: relative defined in the stylesheet
12541			// but dialogs have to use absolute or fixed positioning
12542			position = this.uiDialog.css( "position" ),
12543			resizeHandles = typeof handles === "string" ?
12544				handles :
12545				"n,e,s,w,se,sw,ne,nw";
12546
12547		function filteredUi( ui ) {
12548			return {
12549				originalPosition: ui.originalPosition,
12550				originalSize: ui.originalSize,
12551				position: ui.position,
12552				size: ui.size
12553			};
12554		}
12555
12556		this.uiDialog.resizable( {
12557			cancel: ".ui-dialog-content",
12558			containment: "document",
12559			alsoResize: this.element,
12560			maxWidth: options.maxWidth,
12561			maxHeight: options.maxHeight,
12562			minWidth: options.minWidth,
12563			minHeight: this._minHeight(),
12564			handles: resizeHandles,
12565			start: function( event, ui ) {
12566				that._addClass( $( this ), "ui-dialog-resizing" );
12567				that._blockFrames();
12568				that._trigger( "resizeStart", event, filteredUi( ui ) );
12569			},
12570			resize: function( event, ui ) {
12571				that._trigger( "resize", event, filteredUi( ui ) );
12572			},
12573			stop: function( event, ui ) {
12574				var offset = that.uiDialog.offset(),
12575					left = offset.left - that.document.scrollLeft(),
12576					top = offset.top - that.document.scrollTop();
12577
12578				options.height = that.uiDialog.height();
12579				options.width = that.uiDialog.width();
12580				options.position = {
12581					my: "left top",
12582					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
12583						"top" + ( top >= 0 ? "+" : "" ) + top,
12584					of: that.window
12585				};
12586				that._removeClass( $( this ), "ui-dialog-resizing" );
12587				that._unblockFrames();
12588				that._trigger( "resizeStop", event, filteredUi( ui ) );
12589			}
12590		} )
12591			.css( "position", position );
12592	},
12593
12594	_trackFocus: function() {
12595		this._on( this.widget(), {
12596			focusin: function( event ) {
12597				this._makeFocusTarget();
12598				this._focusedElement = $( event.target );
12599			}
12600		} );
12601	},
12602
12603	_makeFocusTarget: function() {
12604		this._untrackInstance();
12605		this._trackingInstances().unshift( this );
12606	},
12607
12608	_untrackInstance: function() {
12609		var instances = this._trackingInstances(),
12610			exists = $.inArray( this, instances );
12611		if ( exists !== -1 ) {
12612			instances.splice( exists, 1 );
12613		}
12614	},
12615
12616	_trackingInstances: function() {
12617		var instances = this.document.data( "ui-dialog-instances" );
12618		if ( !instances ) {
12619			instances = [];
12620			this.document.data( "ui-dialog-instances", instances );
12621		}
12622		return instances;
12623	},
12624
12625	_minHeight: function() {
12626		var options = this.options;
12627
12628		return options.height === "auto" ?
12629			options.minHeight :
12630			Math.min( options.minHeight, options.height );
12631	},
12632
12633	_position: function() {
12634
12635		// Need to show the dialog to get the actual offset in the position plugin
12636		var isVisible = this.uiDialog.is( ":visible" );
12637		if ( !isVisible ) {
12638			this.uiDialog.show();
12639		}
12640		this.uiDialog.position( this.options.position );
12641		if ( !isVisible ) {
12642			this.uiDialog.hide();
12643		}
12644	},
12645
12646	_setOptions: function( options ) {
12647		var that = this,
12648			resize = false,
12649			resizableOptions = {};
12650
12651		$.each( options, function( key, value ) {
12652			that._setOption( key, value );
12653
12654			if ( key in that.sizeRelatedOptions ) {
12655				resize = true;
12656			}
12657			if ( key in that.resizableRelatedOptions ) {
12658				resizableOptions[ key ] = value;
12659			}
12660		} );
12661
12662		if ( resize ) {
12663			this._size();
12664			this._position();
12665		}
12666		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
12667			this.uiDialog.resizable( "option", resizableOptions );
12668		}
12669	},
12670
12671	_setOption: function( key, value ) {
12672		var isDraggable, isResizable,
12673			uiDialog = this.uiDialog;
12674
12675		if ( key === "disabled" ) {
12676			return;
12677		}
12678
12679		this._super( key, value );
12680
12681		if ( key === "appendTo" ) {
12682			this.uiDialog.appendTo( this._appendTo() );
12683		}
12684
12685		if ( key === "buttons" ) {
12686			this._createButtons();
12687		}
12688
12689		if ( key === "closeText" ) {
12690			this.uiDialogTitlebarClose.button( {
12691
12692				// Ensure that we always pass a string
12693				label: $( "<a>" ).text( "" + this.options.closeText ).html()
12694			} );
12695		}
12696
12697		if ( key === "draggable" ) {
12698			isDraggable = uiDialog.is( ":data(ui-draggable)" );
12699			if ( isDraggable && !value ) {
12700				uiDialog.draggable( "destroy" );
12701			}
12702
12703			if ( !isDraggable && value ) {
12704				this._makeDraggable();
12705			}
12706		}
12707
12708		if ( key === "position" ) {
12709			this._position();
12710		}
12711
12712		if ( key === "resizable" ) {
12713
12714			// currently resizable, becoming non-resizable
12715			isResizable = uiDialog.is( ":data(ui-resizable)" );
12716			if ( isResizable && !value ) {
12717				uiDialog.resizable( "destroy" );
12718			}
12719
12720			// Currently resizable, changing handles
12721			if ( isResizable && typeof value === "string" ) {
12722				uiDialog.resizable( "option", "handles", value );
12723			}
12724
12725			// Currently non-resizable, becoming resizable
12726			if ( !isResizable && value !== false ) {
12727				this._makeResizable();
12728			}
12729		}
12730
12731		if ( key === "title" ) {
12732			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
12733		}
12734	},
12735
12736	_size: function() {
12737
12738		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
12739		// divs will both have width and height set, so we need to reset them
12740		var nonContentHeight, minContentHeight, maxContentHeight,
12741			options = this.options;
12742
12743		// Reset content sizing
12744		this.element.show().css( {
12745			width: "auto",
12746			minHeight: 0,
12747			maxHeight: "none",
12748			height: 0
12749		} );
12750
12751		if ( options.minWidth > options.width ) {
12752			options.width = options.minWidth;
12753		}
12754
12755		// Reset wrapper sizing
12756		// determine the height of all the non-content elements
12757		nonContentHeight = this.uiDialog.css( {
12758			height: "auto",
12759			width: options.width
12760		} )
12761			.outerHeight();
12762		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
12763		maxContentHeight = typeof options.maxHeight === "number" ?
12764			Math.max( 0, options.maxHeight - nonContentHeight ) :
12765			"none";
12766
12767		if ( options.height === "auto" ) {
12768			this.element.css( {
12769				minHeight: minContentHeight,
12770				maxHeight: maxContentHeight,
12771				height: "auto"
12772			} );
12773		} else {
12774			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
12775		}
12776
12777		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
12778			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
12779		}
12780	},
12781
12782	_blockFrames: function() {
12783		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
12784			var iframe = $( this );
12785
12786			return $( "<div>" )
12787				.css( {
12788					position: "absolute",
12789					width: iframe.outerWidth(),
12790					height: iframe.outerHeight()
12791				} )
12792				.appendTo( iframe.parent() )
12793				.offset( iframe.offset() )[ 0 ];
12794		} );
12795	},
12796
12797	_unblockFrames: function() {
12798		if ( this.iframeBlocks ) {
12799			this.iframeBlocks.remove();
12800			delete this.iframeBlocks;
12801		}
12802	},
12803
12804	_allowInteraction: function( event ) {
12805		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
12806			return true;
12807		}
12808
12809		// TODO: Remove hack when datepicker implements
12810		// the .ui-front logic (#8989)
12811		return !!$( event.target ).closest( ".ui-datepicker" ).length;
12812	},
12813
12814	_createOverlay: function() {
12815		if ( !this.options.modal ) {
12816			return;
12817		}
12818
12819		var jqMinor = $.fn.jquery.substring( 0, 4 );
12820
12821		// We use a delay in case the overlay is created from an
12822		// event that we're going to be cancelling (#2804)
12823		var isOpening = true;
12824		this._delay( function() {
12825			isOpening = false;
12826		} );
12827
12828		if ( !this.document.data( "ui-dialog-overlays" ) ) {
12829
12830			// Prevent use of anchors and inputs
12831			// This doesn't use `_on()` because it is a shared event handler
12832			// across all open modal dialogs.
12833			this.document.on( "focusin.ui-dialog", function( event ) {
12834				if ( isOpening ) {
12835					return;
12836				}
12837
12838				var instance = this._trackingInstances()[ 0 ];
12839				if ( !instance._allowInteraction( event ) ) {
12840					event.preventDefault();
12841					instance._focusTabbable();
12842
12843					// Support: jQuery >=3.4 <3.
vendor: 3,764 bytes, lines 12843-12993
128436 only
12844					// Focus re-triggering in jQuery 3.4/3.5 makes the original element
12845					// have its focus event propagated last, breaking the re-targeting.
12846					// Trigger focus in a delay in addition if needed to avoid the issue
12847					// See https://github.com/jquery/jquery/issues/4382
12848					if ( jqMinor === "3.4." || jqMinor === "3.5." ) {
12849						instance._delay( instance._restoreTabbableFocus );
12850					}
12851				}
12852			}.bind( this ) );
12853		}
12854
12855		this.overlay = $( "<div>" )
12856			.appendTo( this._appendTo() );
12857
12858		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
12859		this._on( this.overlay, {
12860			mousedown: "_keepFocus"
12861		} );
12862		this.document.data( "ui-dialog-overlays",
12863			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
12864	},
12865
12866	_destroyOverlay: function() {
12867		if ( !this.options.modal ) {
12868			return;
12869		}
12870
12871		if ( this.overlay ) {
12872			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
12873
12874			if ( !overlays ) {
12875				this.document.off( "focusin.ui-dialog" );
12876				this.document.removeData( "ui-dialog-overlays" );
12877			} else {
12878				this.document.data( "ui-dialog-overlays", overlays );
12879			}
12880
12881			this.overlay.remove();
12882			this.overlay = null;
12883		}
12884	}
12885} );
12886
12887// DEPRECATED
12888// TODO: switch return back to widget declaration at top of file when this is removed
12889if ( $.uiBackCompat !== false ) {
12890
12891	// Backcompat for dialogClass option
12892	$.widget( "ui.dialog", $.ui.dialog, {
12893		options: {
12894			dialogClass: ""
12895		},
12896		_createWrapper: function() {
12897			this._super();
12898			this.uiDialog.addClass( this.options.dialogClass );
12899		},
12900		_setOption: function( key, value ) {
12901			if ( key === "dialogClass" ) {
12902				this.uiDialog
12903					.removeClass( this.options.dialogClass )
12904					.addClass( value );
12905			}
12906			this._superApply( arguments );
12907		}
12908	} );
12909}
12910
12911var widgetsDialog = $.ui.dialog;
12912
12913
12914/*!
12915 * jQuery UI Progressbar 1.13.2
12916 * http://jqueryui.com
12917 *
12918 * Copyright jQuery Foundation and other contributors
12919 * Released under the MIT license.
12920 * http://jquery.org/license
12921 */
12922
12923//>>label: Progressbar
12924//>>group: Widgets
12925/* eslint-disable max-len */
12926//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
12927/* eslint-enable max-len */
12928//>>docs: http://api.jqueryui.com/progressbar/
12929//>>demos: http://jqueryui.com/progressbar/
12930//>>css.structure: ../../themes/base/core.css
12931//>>css.structure: ../../themes/base/progressbar.css
12932//>>css.theme: ../../themes/base/theme.css
12933
12934
12935var widgetsProgressbar = $.widget( "ui.progressbar", {
12936	version: "1.13.2",
12937	options: {
12938		classes: {
12939			"ui-progressbar": "ui-corner-all",
12940			"ui-progressbar-value": "ui-corner-left",
12941			"ui-progressbar-complete": "ui-corner-right"
12942		},
12943		max: 100,
12944		value: 0,
12945
12946		change: null,
12947		complete: null
12948	},
12949
12950	min: 0,
12951
12952	_create: function() {
12953
12954		// Constrain initial value
12955		this.oldValue = this.options.value = this._constrainedValue();
12956
12957		this.element.attr( {
12958
12959			// Only set static values; aria-valuenow and aria-valuemax are
12960			// set inside _refreshValue()
12961			role: "progressbar",
12962			"aria-valuemin": this.min
12963		} );
12964		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
12965
12966		this.valueDiv = $( "<div>" ).appendTo( this.element );
12967		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
12968		this._refreshValue();
12969	},
12970
12971	_destroy: function() {
12972		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
12973
12974		this.valueDiv.remove();
12975	},
12976
12977	value: function( newValue ) {
12978		if ( newValue === undefined ) {
12979			return this.options.value;
12980		}
12981
12982		this.options.value = this._constrainedValue( newValue );
12983		this._refreshValue();
12984	},
12985
12986	_constrainedValue: function( newValue ) {
12987		if ( newValue === undefined ) {
12988			newValue = this.options.value;
12989		}
12990
12991		this.indeterminate = newValue === false;
12992
12993		// Sanitize value
vendor: 3,946 bytes, lines 12994-13154
12994		if ( typeof newValue !== "number" ) {
12995			newValue = 0;
12996		}
12997
12998		return this.indeterminate ? false :
12999			Math.min( this.options.max, Math.max( this.min, newValue ) );
13000	},
13001
13002	_setOptions: function( options ) {
13003
13004		// Ensure "value" option is set after other values (like max)
13005		var value = options.value;
13006		delete options.value;
13007
13008		this._super( options );
13009
13010		this.options.value = this._constrainedValue( value );
13011		this._refreshValue();
13012	},
13013
13014	_setOption: function( key, value ) {
13015		if ( key === "max" ) {
13016
13017			// Don't allow a max less than min
13018			value = Math.max( this.min, value );
13019		}
13020		this._super( key, value );
13021	},
13022
13023	_setOptionDisabled: function( value ) {
13024		this._super( value );
13025
13026		this.element.attr( "aria-disabled", value );
13027		this._toggleClass( null, "ui-state-disabled", !!value );
13028	},
13029
13030	_percentage: function() {
13031		return this.indeterminate ?
13032			100 :
13033			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
13034	},
13035
13036	_refreshValue: function() {
13037		var value = this.options.value,
13038			percentage = this._percentage();
13039
13040		this.valueDiv
13041			.toggle( this.indeterminate || value > this.min )
13042			.width( percentage.toFixed( 0 ) + "%" );
13043
13044		this
13045			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
13046				value === this.options.max )
13047			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
13048
13049		if ( this.indeterminate ) {
13050			this.element.removeAttr( "aria-valuenow" );
13051			if ( !this.overlayDiv ) {
13052				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
13053				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
13054			}
13055		} else {
13056			this.element.attr( {
13057				"aria-valuemax": this.options.max,
13058				"aria-valuenow": value
13059			} );
13060			if ( this.overlayDiv ) {
13061				this.overlayDiv.remove();
13062				this.overlayDiv = null;
13063			}
13064		}
13065
13066		if ( this.oldValue !== value ) {
13067			this.oldValue = value;
13068			this._trigger( "change" );
13069		}
13070		if ( value === this.options.max ) {
13071			this._trigger( "complete" );
13072		}
13073	}
13074} );
13075
13076
13077/*!
13078 * jQuery UI Selectmenu 1.13.2
13079 * http://jqueryui.com
13080 *
13081 * Copyright jQuery Foundation and other contributors
13082 * Released under the MIT license.
13083 * http://jquery.org/license
13084 */
13085
13086//>>label: Selectmenu
13087//>>group: Widgets
13088/* eslint-disable max-len */
13089//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
13090/* eslint-enable max-len */
13091//>>docs: http://api.jqueryui.com/selectmenu/
13092//>>demos: http://jqueryui.com/selectmenu/
13093//>>css.structure: ../../themes/base/core.css
13094//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
13095//>>css.theme: ../../themes/base/theme.css
13096
13097
13098var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
13099	version: "1.13.2",
13100	defaultElement: "<select>",
13101	options: {
13102		appendTo: null,
13103		classes: {
13104			"ui-selectmenu-button-open": "ui-corner-top",
13105			"ui-selectmenu-button-closed": "ui-corner-all"
13106		},
13107		disabled: null,
13108		icons: {
13109			button: "ui-icon-triangle-1-s"
13110		},
13111		position: {
13112			my: "left top",
13113			at: "left bottom",
13114			collision: "none"
13115		},
13116		width: false,
13117
13118		// Callbacks
13119		change: null,
13120		close: null,
13121		focus: null,
13122		open: null,
13123		select: null
13124	},
13125
13126	_create: function() {
13127		var selectmenuId = this.element.uniqueId().attr( "id" );
13128		this.ids = {
13129			element: selectmenuId,
13130			button: selectmenuId + "-button",
13131			menu: selectmenuId + "-menu"
13132		};
13133
13134		this._drawButton();
13135		this._drawMenu();
13136		this._bindFormResetHandler();
13137
13138		this._rendered = false;
13139		this.menuItems = $();
13140	},
13141
13142	_drawButton: function() {
13143		var icon,
13144			that = this,
13145			item = this._parseOption(
13146				this.element.find( "option:selected" ),
13147				this.element[ 0 ].selectedIndex
13148			);
13149
13150		// Associate existing label with the new button
13151		this.labels = this.element.labels().attr( "for", this.ids.button );
13152		this._on( this.labels, {
13153			click: function( event ) {
13154				this.button.trigger( "focus" 
vendor: 7,319 bytes, lines 13154-13463
13154);
13155				event.preventDefault();
13156			}
13157		} );
13158
13159		// Hide original select element
13160		this.element.hide();
13161
13162		// Create button
13163		this.button = $( "<span>", {
13164			tabindex: this.options.disabled ? -1 : 0,
13165			id: this.ids.button,
13166			role: "combobox",
13167			"aria-expanded": "false",
13168			"aria-autocomplete": "list",
13169			"aria-owns": this.ids.menu,
13170			"aria-haspopup": "true",
13171			title: this.element.attr( "title" )
13172		} )
13173			.insertAfter( this.element );
13174
13175		this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
13176			"ui-button ui-widget" );
13177
13178		icon = $( "<span>" ).appendTo( this.button );
13179		this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
13180		this.buttonItem = this._renderButtonItem( item )
13181			.appendTo( this.button );
13182
13183		if ( this.options.width !== false ) {
13184			this._resizeButton();
13185		}
13186
13187		this._on( this.button, this._buttonEvents );
13188		this.button.one( "focusin", function() {
13189
13190			// Delay rendering the menu items until the button receives focus.
13191			// The menu may have already been rendered via a programmatic open.
13192			if ( !that._rendered ) {
13193				that._refreshMenu();
13194			}
13195		} );
13196	},
13197
13198	_drawMenu: function() {
13199		var that = this;
13200
13201		// Create menu
13202		this.menu = $( "<ul>", {
13203			"aria-hidden": "true",
13204			"aria-labelledby": this.ids.button,
13205			id: this.ids.menu
13206		} );
13207
13208		// Wrap menu
13209		this.menuWrap = $( "<div>" ).append( this.menu );
13210		this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
13211		this.menuWrap.appendTo( this._appendTo() );
13212
13213		// Initialize menu widget
13214		this.menuInstance = this.menu
13215			.menu( {
13216				classes: {
13217					"ui-menu": "ui-corner-bottom"
13218				},
13219				role: "listbox",
13220				select: function( event, ui ) {
13221					event.preventDefault();
13222
13223					// Support: IE8
13224					// If the item was selected via a click, the text selection
13225					// will be destroyed in IE
13226					that._setSelection();
13227
13228					that._select( ui.item.data( "ui-selectmenu-item" ), event );
13229				},
13230				focus: function( event, ui ) {
13231					var item = ui.item.data( "ui-selectmenu-item" );
13232
13233					// Prevent inital focus from firing and check if its a newly focused item
13234					if ( that.focusIndex != null && item.index !== that.focusIndex ) {
13235						that._trigger( "focus", event, { item: item } );
13236						if ( !that.isOpen ) {
13237							that._select( item, event );
13238						}
13239					}
13240					that.focusIndex = item.index;
13241
13242					that.button.attr( "aria-activedescendant",
13243						that.menuItems.eq( item.index ).attr( "id" ) );
13244				}
13245			} )
13246			.menu( "instance" );
13247
13248		// Don't close the menu on mouseleave
13249		this.menuInstance._off( this.menu, "mouseleave" );
13250
13251		// Cancel the menu's collapseAll on document click
13252		this.menuInstance._closeOnDocumentClick = function() {
13253			return false;
13254		};
13255
13256		// Selects often contain empty items, but never contain dividers
13257		this.menuInstance._isDivider = function() {
13258			return false;
13259		};
13260	},
13261
13262	refresh: function() {
13263		this._refreshMenu();
13264		this.buttonItem.replaceWith(
13265			this.buttonItem = this._renderButtonItem(
13266
13267				// Fall back to an empty object in case there are no options
13268				this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
13269			)
13270		);
13271		if ( this.options.width === null ) {
13272			this._resizeButton();
13273		}
13274	},
13275
13276	_refreshMenu: function() {
13277		var item,
13278			options = this.element.find( "option" );
13279
13280		this.menu.empty();
13281
13282		this._parseOptions( options );
13283		this._renderMenu( this.menu, this.items );
13284
13285		this.menuInstance.refresh();
13286		this.menuItems = this.menu.find( "li" )
13287			.not( ".ui-selectmenu-optgroup" )
13288				.find( ".ui-menu-item-wrapper" );
13289
13290		this._rendered = true;
13291
13292		if ( !options.length ) {
13293			return;
13294		}
13295
13296		item = this._getSelectedItem();
13297
13298		// Update the menu to have the correct item focused
13299		this.menuInstance.focus( null, item );
13300		this._setAria( item.data( "ui-selectmenu-item" ) );
13301
13302		// Set disabled state
13303		this._setOption( "disabled", this.element.prop( "disabled" ) );
13304	},
13305
13306	open: function( event ) {
13307		if ( this.options.disabled ) {
13308			return;
13309		}
13310
13311		// If this is the first time the menu is being opened, render the items
13312		if ( !this._rendered ) {
13313			this._refreshMenu();
13314		} else {
13315
13316			// Menu clears focus on close, reset focus to selected item
13317			this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
13318			this.menuInstance.focus( null, this._getSelectedItem() );
13319		}
13320
13321		// If there are no options, don't open the menu
13322		if ( !this.menuItems.length ) {
13323			return;
13324		}
13325
13326		this.isOpen = true;
13327		this._toggleAttr();
13328		this._resizeMenu();
13329		this._position();
13330
13331		this._on( this.document, this._documentClick );
13332
13333		this._trigger( "open", event );
13334	},
13335
13336	_position: function() {
13337		this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
13338	},
13339
13340	close: function( event ) {
13341		if ( !this.isOpen ) {
13342			return;
13343		}
13344
13345		this.isOpen = false;
13346		this._toggleAttr();
13347
13348		this.range = null;
13349		this._off( this.document );
13350
13351		this._trigger( "close", event );
13352	},
13353
13354	widget: function() {
13355		return this.button;
13356	},
13357
13358	menuWidget: function() {
13359		return this.menu;
13360	},
13361
13362	_renderButtonItem: function( item ) {
13363		var buttonItem = $( "<span>" );
13364
13365		this._setText( buttonItem, item.label );
13366		this._addClass( buttonItem, "ui-selectmenu-text" );
13367
13368		return buttonItem;
13369	},
13370
13371	_renderMenu: function( ul, items ) {
13372		var that = this,
13373			currentOptgroup = "";
13374
13375		$.each( items, function( index, item ) {
13376			var li;
13377
13378			if ( item.optgroup !== currentOptgroup ) {
13379				li = $( "<li>", {
13380					text: item.optgroup
13381				} );
13382				that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
13383					( item.element.parent( "optgroup" ).prop( "disabled" ) ?
13384						" ui-state-disabled" :
13385						"" ) );
13386
13387				li.appendTo( ul );
13388
13389				currentOptgroup = item.optgroup;
13390			}
13391
13392			that._renderItemData( ul, item );
13393		} );
13394	},
13395
13396	_renderItemData: function( ul, item ) {
13397		return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
13398	},
13399
13400	_renderItem: function( ul, item ) {
13401		var li = $( "<li>" ),
13402			wrapper = $( "<div>", {
13403				title: item.element.attr( "title" )
13404			} );
13405
13406		if ( item.disabled ) {
13407			this._addClass( li, null, "ui-state-disabled" );
13408		}
13409		this._setText( wrapper, item.label );
13410
13411		return li.append( wrapper ).appendTo( ul );
13412	},
13413
13414	_setText: function( element, value ) {
13415		if ( value ) {
13416			element.text( value );
13417		} else {
13418			element.html( "&#160;" );
13419		}
13420	},
13421
13422	_move: function( direction, event ) {
13423		var item, next,
13424			filter = ".ui-menu-item";
13425
13426		if ( this.isOpen ) {
13427			item = this.menuItems.eq( this.focusIndex ).parent( "li" );
13428		} else {
13429			item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
13430			filter += ":not(.ui-state-disabled)";
13431		}
13432
13433		if ( direction === "first" || direction === "last" ) {
13434			next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
13435		} else {
13436			next = item[ direction + "All" ]( filter ).eq( 0 );
13437		}
13438
13439		if ( next.length ) {
13440			this.menuInstance.focus( event, next );
13441		}
13442	},
13443
13444	_getSelectedItem: function() {
13445		return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
13446	},
13447
13448	_toggle: function( event ) {
13449		this[ this.isOpen ? "close" : "open" ]( event );
13450	},
13451
13452	_setSelection: function() {
13453		var selection;
13454
13455		if ( !this.range ) {
13456			return;
13457		}
13458
13459		if ( window.getSelection ) {
13460			selection = window.getSelection();
13461			selection.removeAllRanges();
13462			selection.addRange( this.range );
13463
vendor: 1,173 bytes, lines 13464-13517
13464		// Support: IE8
13465		} else {
13466			this.range.select();
13467		}
13468
13469		// Support: IE
13470		// Setting the text selection kills the button focus in IE, but
13471		// restoring the focus doesn't kill the selection.
13472		this.button.trigger( "focus" );
13473	},
13474
13475	_documentClick: {
13476		mousedown: function( event ) {
13477			if ( !this.isOpen ) {
13478				return;
13479			}
13480
13481			if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
13482				$.escapeSelector( this.ids.button ) ).length ) {
13483				this.close( event );
13484			}
13485		}
13486	},
13487
13488	_buttonEvents: {
13489
13490		// Prevent text selection from being reset when interacting with the selectmenu (#10144)
13491		mousedown: function() {
13492			var selection;
13493
13494			if ( window.getSelection ) {
13495				selection = window.getSelection();
13496				if ( selection.rangeCount ) {
13497					this.range = selection.getRangeAt( 0 );
13498				}
13499
13500			// Support: IE8
13501			} else {
13502				this.range = document.selection.createRange();
13503			}
13504		},
13505
13506		click: function( event ) {
13507			this._setSelection();
13508			this._toggle( event );
13509		},
13510
13511		keydown: function( event ) {
13512			var preventDefault = true;
13513			switch ( event.keyCode ) {
13514			case $.ui.keyCode.TAB:
13515			case $.ui.keyCode.ESCAPE:
13516				this.close( event );
13517				preventDefault = false;
vendor: 4,716 bytes, lines 13518-13713
13518				break;
13519			case $.ui.keyCode.ENTER:
13520				if ( this.isOpen ) {
13521					this._selectFocusedItem( event );
13522				}
13523				break;
13524			case $.ui.keyCode.UP:
13525				if ( event.altKey ) {
13526					this._toggle( event );
13527				} else {
13528					this._move( "prev", event );
13529				}
13530				break;
13531			case $.ui.keyCode.DOWN:
13532				if ( event.altKey ) {
13533					this._toggle( event );
13534				} else {
13535					this._move( "next", event );
13536				}
13537				break;
13538			case $.ui.keyCode.SPACE:
13539				if ( this.isOpen ) {
13540					this._selectFocusedItem( event );
13541				} else {
13542					this._toggle( event );
13543				}
13544				break;
13545			case $.ui.keyCode.LEFT:
13546				this._move( "prev", event );
13547				break;
13548			case $.ui.keyCode.RIGHT:
13549				this._move( "next", event );
13550				break;
13551			case $.ui.keyCode.HOME:
13552			case $.ui.keyCode.PAGE_UP:
13553				this._move( "first", event );
13554				break;
13555			case $.ui.keyCode.END:
13556			case $.ui.keyCode.PAGE_DOWN:
13557				this._move( "last", event );
13558				break;
13559			default:
13560				this.menu.trigger( event );
13561				preventDefault = false;
13562			}
13563
13564			if ( preventDefault ) {
13565				event.preventDefault();
13566			}
13567		}
13568	},
13569
13570	_selectFocusedItem: function( event ) {
13571		var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
13572		if ( !item.hasClass( "ui-state-disabled" ) ) {
13573			this._select( item.data( "ui-selectmenu-item" ), event );
13574		}
13575	},
13576
13577	_select: function( item, event ) {
13578		var oldIndex = this.element[ 0 ].selectedIndex;
13579
13580		// Change native select element
13581		this.element[ 0 ].selectedIndex = item.index;
13582		this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
13583		this._setAria( item );
13584		this._trigger( "select", event, { item: item } );
13585
13586		if ( item.index !== oldIndex ) {
13587			this._trigger( "change", event, { item: item } );
13588		}
13589
13590		this.close( event );
13591	},
13592
13593	_setAria: function( item ) {
13594		var id = this.menuItems.eq( item.index ).attr( "id" );
13595
13596		this.button.attr( {
13597			"aria-labelledby": id,
13598			"aria-activedescendant": id
13599		} );
13600		this.menu.attr( "aria-activedescendant", id );
13601	},
13602
13603	_setOption: function( key, value ) {
13604		if ( key === "icons" ) {
13605			var icon = this.button.find( "span.ui-icon" );
13606			this._removeClass( icon, null, this.options.icons.button )
13607				._addClass( icon, null, value.button );
13608		}
13609
13610		this._super( key, value );
13611
13612		if ( key === "appendTo" ) {
13613			this.menuWrap.appendTo( this._appendTo() );
13614		}
13615
13616		if ( key === "width" ) {
13617			this._resizeButton();
13618		}
13619	},
13620
13621	_setOptionDisabled: function( value ) {
13622		this._super( value );
13623
13624		this.menuInstance.option( "disabled", value );
13625		this.button.attr( "aria-disabled", value );
13626		this._toggleClass( this.button, null, "ui-state-disabled", value );
13627
13628		this.element.prop( "disabled", value );
13629		if ( value ) {
13630			this.button.attr( "tabindex", -1 );
13631			this.close();
13632		} else {
13633			this.button.attr( "tabindex", 0 );
13634		}
13635	},
13636
13637	_appendTo: function() {
13638		var element = this.options.appendTo;
13639
13640		if ( element ) {
13641			element = element.jquery || element.nodeType ?
13642				$( element ) :
13643				this.document.find( element ).eq( 0 );
13644		}
13645
13646		if ( !element || !element[ 0 ] ) {
13647			element = this.element.closest( ".ui-front, dialog" );
13648		}
13649
13650		if ( !element.length ) {
13651			element = this.document[ 0 ].body;
13652		}
13653
13654		return element;
13655	},
13656
13657	_toggleAttr: function() {
13658		this.button.attr( "aria-expanded", this.isOpen );
13659
13660		// We can't use two _toggleClass() calls here, because we need to make sure
13661		// we always remove classes first and add them second, otherwise if both classes have the
13662		// same theme class, it will be removed after we add it.
13663		this._removeClass( this.button, "ui-selectmenu-button-" +
13664			( this.isOpen ? "closed" : "open" ) )
13665			._addClass( this.button, "ui-selectmenu-button-" +
13666				( this.isOpen ? "open" : "closed" ) )
13667			._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
13668
13669		this.menu.attr( "aria-hidden", !this.isOpen );
13670	},
13671
13672	_resizeButton: function() {
13673		var width = this.options.width;
13674
13675		// For `width: false`, just remove inline style and stop
13676		if ( width === false ) {
13677			this.button.css( "width", "" );
13678			return;
13679		}
13680
13681		// For `width: null`, match the width of the original element
13682		if ( width === null ) {
13683			width = this.element.show().outerWidth();
13684			this.element.hide();
13685		}
13686
13687		this.button.outerWidth( width );
13688	},
13689
13690	_resizeMenu: function() {
13691		this.menu.outerWidth( Math.max(
13692			this.button.outerWidth(),
13693
13694			// Support: IE10
13695			// IE10 wraps long text (possibly a rounding bug)
13696			// so we add 1px to avoid the wrapping
13697			this.menu.width( "" ).outerWidth() + 1
13698		) );
13699	},
13700
13701	_getCreateOptions: function() {
13702		var options = this._super();
13703
13704		options.disabled = this.element.prop( "disabled" );
13705
13706		return options;
13707	},
13708
13709	_parseOptions: function( options ) {
13710		var that = this,
13711			data = [];
13712		options.each( function( index, item ) {
13713			
vendor: 3,668 bytes, lines 13713-13863
13713if ( item.hidden ) {
13714				return;
13715			}
13716
13717			data.push( that._parseOption( $( item ), index ) );
13718		} );
13719		this.items = data;
13720	},
13721
13722	_parseOption: function( option, index ) {
13723		var optgroup = option.parent( "optgroup" );
13724
13725		return {
13726			element: option,
13727			index: index,
13728			value: option.val(),
13729			label: option.text(),
13730			optgroup: optgroup.attr( "label" ) || "",
13731			disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
13732		};
13733	},
13734
13735	_destroy: function() {
13736		this._unbindFormResetHandler();
13737		this.menuWrap.remove();
13738		this.button.remove();
13739		this.element.show();
13740		this.element.removeUniqueId();
13741		this.labels.attr( "for", this.ids.element );
13742	}
13743} ] );
13744
13745
13746/*!
13747 * jQuery UI Slider 1.13.2
13748 * http://jqueryui.com
13749 *
13750 * Copyright jQuery Foundation and other contributors
13751 * Released under the MIT license.
13752 * http://jquery.org/license
13753 */
13754
13755//>>label: Slider
13756//>>group: Widgets
13757//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
13758//>>docs: http://api.jqueryui.com/slider/
13759//>>demos: http://jqueryui.com/slider/
13760//>>css.structure: ../../themes/base/core.css
13761//>>css.structure: ../../themes/base/slider.css
13762//>>css.theme: ../../themes/base/theme.css
13763
13764
13765var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
13766	version: "1.13.2",
13767	widgetEventPrefix: "slide",
13768
13769	options: {
13770		animate: false,
13771		classes: {
13772			"ui-slider": "ui-corner-all",
13773			"ui-slider-handle": "ui-corner-all",
13774
13775			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
13776			// element, but worked best visually with a variety of themes
13777			"ui-slider-range": "ui-corner-all ui-widget-header"
13778		},
13779		distance: 0,
13780		max: 100,
13781		min: 0,
13782		orientation: "horizontal",
13783		range: false,
13784		step: 1,
13785		value: 0,
13786		values: null,
13787
13788		// Callbacks
13789		change: null,
13790		slide: null,
13791		start: null,
13792		stop: null
13793	},
13794
13795	// Number of pages in a slider
13796	// (how many times can you page up/down to go through the whole range)
13797	numPages: 5,
13798
13799	_create: function() {
13800		this._keySliding = false;
13801		this._mouseSliding = false;
13802		this._animateOff = true;
13803		this._handleIndex = null;
13804		this._detectOrientation();
13805		this._mouseInit();
13806		this._calculateNewMax();
13807
13808		this._addClass( "ui-slider ui-slider-" + this.orientation,
13809			"ui-widget ui-widget-content" );
13810
13811		this._refresh();
13812
13813		this._animateOff = false;
13814	},
13815
13816	_refresh: function() {
13817		this._createRange();
13818		this._createHandles();
13819		this._setupEvents();
13820		this._refreshValue();
13821	},
13822
13823	_createHandles: function() {
13824		var i, handleCount,
13825			options = this.options,
13826			existingHandles = this.element.find( ".ui-slider-handle" ),
13827			handle = "<span tabindex='0'></span>",
13828			handles = [];
13829
13830		handleCount = ( options.values && options.values.length ) || 1;
13831
13832		if ( existingHandles.length > handleCount ) {
13833			existingHandles.slice( handleCount ).remove();
13834			existingHandles = existingHandles.slice( 0, handleCount );
13835		}
13836
13837		for ( i = existingHandles.length; i < handleCount; i++ ) {
13838			handles.push( handle );
13839		}
13840
13841		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
13842
13843		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
13844
13845		this.handle = this.handles.eq( 0 );
13846
13847		this.handles.each( function( i ) {
13848			$( this )
13849				.data( "ui-slider-handle-index", i )
13850				.attr( "tabIndex", 0 );
13851		} );
13852	},
13853
13854	_createRange: function() {
13855		var options = this.options;
13856
13857		if ( options.range ) {
13858			if ( options.range === true ) {
13859				if ( !options.values ) {
13860					options.values = [ this._valueMin(), this._valueMin() ];
13861				} else if ( options.values.length && options.values.length !== 2 ) {
13862					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
13863				} else if ( Array
vendor: 6,343 bytes, lines 13863-14109
13863.isArray( options.values ) ) {
13864					options.values = options.values.slice( 0 );
13865				}
13866			}
13867
13868			if ( !this.range || !this.range.length ) {
13869				this.range = $( "<div>" )
13870					.appendTo( this.element );
13871
13872				this._addClass( this.range, "ui-slider-range" );
13873			} else {
13874				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
13875
13876				// Handle range switching from true to min/max
13877				this.range.css( {
13878					"left": "",
13879					"bottom": ""
13880				} );
13881			}
13882			if ( options.range === "min" || options.range === "max" ) {
13883				this._addClass( this.range, "ui-slider-range-" + options.range );
13884			}
13885		} else {
13886			if ( this.range ) {
13887				this.range.remove();
13888			}
13889			this.range = null;
13890		}
13891	},
13892
13893	_setupEvents: function() {
13894		this._off( this.handles );
13895		this._on( this.handles, this._handleEvents );
13896		this._hoverable( this.handles );
13897		this._focusable( this.handles );
13898	},
13899
13900	_destroy: function() {
13901		this.handles.remove();
13902		if ( this.range ) {
13903			this.range.remove();
13904		}
13905
13906		this._mouseDestroy();
13907	},
13908
13909	_mouseCapture: function( event ) {
13910		var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
13911			that = this,
13912			o = this.options;
13913
13914		if ( o.disabled ) {
13915			return false;
13916		}
13917
13918		this.elementSize = {
13919			width: this.element.outerWidth(),
13920			height: this.element.outerHeight()
13921		};
13922		this.elementOffset = this.element.offset();
13923
13924		position = { x: event.pageX, y: event.pageY };
13925		normValue = this._normValueFromMouse( position );
13926		distance = this._valueMax() - this._valueMin() + 1;
13927		this.handles.each( function( i ) {
13928			var thisDistance = Math.abs( normValue - that.values( i ) );
13929			if ( ( distance > thisDistance ) ||
13930				( distance === thisDistance &&
13931					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
13932				distance = thisDistance;
13933				closestHandle = $( this );
13934				index = i;
13935			}
13936		} );
13937
13938		allowed = this._start( event, index );
13939		if ( allowed === false ) {
13940			return false;
13941		}
13942		this._mouseSliding = true;
13943
13944		this._handleIndex = index;
13945
13946		this._addClass( closestHandle, null, "ui-state-active" );
13947		closestHandle.trigger( "focus" );
13948
13949		offset = closestHandle.offset();
13950		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
13951		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
13952			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
13953			top: event.pageY - offset.top -
13954				( closestHandle.height() / 2 ) -
13955				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
13956				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
13957				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
13958		};
13959
13960		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
13961			this._slide( event, index, normValue );
13962		}
13963		this._animateOff = true;
13964		return true;
13965	},
13966
13967	_mouseStart: function() {
13968		return true;
13969	},
13970
13971	_mouseDrag: function( event ) {
13972		var position = { x: event.pageX, y: event.pageY },
13973			normValue = this._normValueFromMouse( position );
13974
13975		this._slide( event, this._handleIndex, normValue );
13976
13977		return false;
13978	},
13979
13980	_mouseStop: function( event ) {
13981		this._removeClass( this.handles, null, "ui-state-active" );
13982		this._mouseSliding = false;
13983
13984		this._stop( event, this._handleIndex );
13985		this._change( event, this._handleIndex );
13986
13987		this._handleIndex = null;
13988		this._clickOffset = null;
13989		this._animateOff = false;
13990
13991		return false;
13992	},
13993
13994	_detectOrientation: function() {
13995		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
13996	},
13997
13998	_normValueFromMouse: function( position ) {
13999		var pixelTotal,
14000			pixelMouse,
14001			percentMouse,
14002			valueTotal,
14003			valueMouse;
14004
14005		if ( this.orientation === "horizontal" ) {
14006			pixelTotal = this.elementSize.width;
14007			pixelMouse = position.x - this.elementOffset.left -
14008				( this._clickOffset ? this._clickOffset.left : 0 );
14009		} else {
14010			pixelTotal = this.elementSize.height;
14011			pixelMouse = position.y - this.elementOffset.top -
14012				( this._clickOffset ? this._clickOffset.top : 0 );
14013		}
14014
14015		percentMouse = ( pixelMouse / pixelTotal );
14016		if ( percentMouse > 1 ) {
14017			percentMouse = 1;
14018		}
14019		if ( percentMouse < 0 ) {
14020			percentMouse = 0;
14021		}
14022		if ( this.orientation === "vertical" ) {
14023			percentMouse = 1 - percentMouse;
14024		}
14025
14026		valueTotal = this._valueMax() - this._valueMin();
14027		valueMouse = this._valueMin() + percentMouse * valueTotal;
14028
14029		return this._trimAlignValue( valueMouse );
14030	},
14031
14032	_uiHash: function( index, value, values ) {
14033		var uiHash = {
14034			handle: this.handles[ index ],
14035			handleIndex: index,
14036			value: value !== undefined ? value : this.value()
14037		};
14038
14039		if ( this._hasMultipleValues() ) {
14040			uiHash.value = value !== undefined ? value : this.values( index );
14041			uiHash.values = values || this.values();
14042		}
14043
14044		return uiHash;
14045	},
14046
14047	_hasMultipleValues: function() {
14048		return this.options.values && this.options.values.length;
14049	},
14050
14051	_start: function( event, index ) {
14052		return this._trigger( "start", event, this._uiHash( index ) );
14053	},
14054
14055	_slide: function( event, index, newVal ) {
14056		var allowed, otherVal,
14057			currentValue = this.value(),
14058			newValues = this.values();
14059
14060		if ( this._hasMultipleValues() ) {
14061			otherVal = this.values( index ? 0 : 1 );
14062			currentValue = this.values( index );
14063
14064			if ( this.options.values.length === 2 && this.options.range === true ) {
14065				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
14066			}
14067
14068			newValues[ index ] = newVal;
14069		}
14070
14071		if ( newVal === currentValue ) {
14072			return;
14073		}
14074
14075		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
14076
14077		// A slide can be canceled by returning false from the slide callback
14078		if ( allowed === false ) {
14079			return;
14080		}
14081
14082		if ( this._hasMultipleValues() ) {
14083			this.values( index, newVal );
14084		} else {
14085			this.value( newVal );
14086		}
14087	},
14088
14089	_stop: function( event, index ) {
14090		this._trigger( "stop", event, this._uiHash( index ) );
14091	},
14092
14093	_change: function( event, index ) {
14094		if ( !this._keySliding && !this._mouseSliding ) {
14095
14096			//store the last changed value index for reference when handles overlap
14097			this._lastChangedValue = index;
14098			this._trigger( "change", event, this._uiHash( index ) );
14099		}
14100	},
14101
14102	value: function( newValue ) {
14103		if ( arguments.length ) {
14104			this.options.value = this._trimAlignValue( newValue );
14105			this._refreshValue();
14106			this._change( null, 0 );
14107			return;
14108		}
14109
vendor: 4,358 bytes, lines 14110-14282
14110		return this._value();
14111	},
14112
14113	values: function( index, newValue ) {
14114		var vals,
14115			newValues,
14116			i;
14117
14118		if ( arguments.length > 1 ) {
14119			this.options.values[ index ] = this._trimAlignValue( newValue );
14120			this._refreshValue();
14121			this._change( null, index );
14122			return;
14123		}
14124
14125		if ( arguments.length ) {
14126			if ( Array.isArray( arguments[ 0 ] ) ) {
14127				vals = this.options.values;
14128				newValues = arguments[ 0 ];
14129				for ( i = 0; i < vals.length; i += 1 ) {
14130					vals[ i ] = this._trimAlignValue( newValues[ i ] );
14131					this._change( null, i );
14132				}
14133				this._refreshValue();
14134			} else {
14135				if ( this._hasMultipleValues() ) {
14136					return this._values( index );
14137				} else {
14138					return this.value();
14139				}
14140			}
14141		} else {
14142			return this._values();
14143		}
14144	},
14145
14146	_setOption: function( key, value ) {
14147		var i,
14148			valsLength = 0;
14149
14150		if ( key === "range" && this.options.range === true ) {
14151			if ( value === "min" ) {
14152				this.options.value = this._values( 0 );
14153				this.options.values = null;
14154			} else if ( value === "max" ) {
14155				this.options.value = this._values( this.options.values.length - 1 );
14156				this.options.values = null;
14157			}
14158		}
14159
14160		if ( Array.isArray( this.options.values ) ) {
14161			valsLength = this.options.values.length;
14162		}
14163
14164		this._super( key, value );
14165
14166		switch ( key ) {
14167			case "orientation":
14168				this._detectOrientation();
14169				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
14170					._addClass( "ui-slider-" + this.orientation );
14171				this._refreshValue();
14172				if ( this.options.range ) {
14173					this._refreshRange( value );
14174				}
14175
14176				// Reset positioning from previous orientation
14177				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
14178				break;
14179			case "value":
14180				this._animateOff = true;
14181				this._refreshValue();
14182				this._change( null, 0 );
14183				this._animateOff = false;
14184				break;
14185			case "values":
14186				this._animateOff = true;
14187				this._refreshValue();
14188
14189				// Start from the last handle to prevent unreachable handles (#9046)
14190				for ( i = valsLength - 1; i >= 0; i-- ) {
14191					this._change( null, i );
14192				}
14193				this._animateOff = false;
14194				break;
14195			case "step":
14196			case "min":
14197			case "max":
14198				this._animateOff = true;
14199				this._calculateNewMax();
14200				this._refreshValue();
14201				this._animateOff = false;
14202				break;
14203			case "range":
14204				this._animateOff = true;
14205				this._refresh();
14206				this._animateOff = false;
14207				break;
14208		}
14209	},
14210
14211	_setOptionDisabled: function( value ) {
14212		this._super( value );
14213
14214		this._toggleClass( null, "ui-state-disabled", !!value );
14215	},
14216
14217	//internal value getter
14218	// _value() returns value trimmed by min and max, aligned by step
14219	_value: function() {
14220		var val = this.options.value;
14221		val = this._trimAlignValue( val );
14222
14223		return val;
14224	},
14225
14226	//internal values getter
14227	// _values() returns array of values trimmed by min and max, aligned by step
14228	// _values( index ) returns single value trimmed by min and max, aligned by step
14229	_values: function( index ) {
14230		var val,
14231			vals,
14232			i;
14233
14234		if ( arguments.length ) {
14235			val = this.options.values[ index ];
14236			val = this._trimAlignValue( val );
14237
14238			return val;
14239		} else if ( this._hasMultipleValues() ) {
14240
14241			// .slice() creates a copy of the array
14242			// this copy gets trimmed by min and max and then returned
14243			vals = this.options.values.slice();
14244			for ( i = 0; i < vals.length; i += 1 ) {
14245				vals[ i ] = this._trimAlignValue( vals[ i ] );
14246			}
14247
14248			return vals;
14249		} else {
14250			return [];
14251		}
14252	},
14253
14254	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
14255	_trimAlignValue: function( val ) {
14256		if ( val <= this._valueMin() ) {
14257			return this._valueMin();
14258		}
14259		if ( val >= this._valueMax() ) {
14260			return this._valueMax();
14261		}
14262		var step = ( this.options.step > 0 ) ? this.options.step : 1,
14263			valModStep = ( val - this._valueMin() ) % step,
14264			alignValue = val - valModStep;
14265
14266		if ( Math.abs( valModStep ) * 2 >= step ) {
14267			alignValue += ( valModStep > 0 ) ? step : ( -step );
14268		}
14269
14270		// Since JavaScript has problems with large floats, round
14271		// the final value to 5 digits after the decimal point (see #4124)
14272		return parseFloat( alignValue.toFixed( 5 ) );
14273	},
14274
14275	_calculateNewMax: function() {
14276		var max = this.options.max,
14277			min = this._valueMin(),
14278			step = this.options.step,
14279			aboveMin = Math.round( ( max - min ) / step ) * step;
14280		max = aboveMin + min;
14281		if ( max > this.options.max ) {
14282
vendor: 5,583 bytes, lines 14283-14482
14283			//If max is not divisible by step, rounding off may increase its value
14284			max -= step;
14285		}
14286		this.max = parseFloat( max.toFixed( this._precision() ) );
14287	},
14288
14289	_precision: function() {
14290		var precision = this._precisionOf( this.options.step );
14291		if ( this.options.min !== null ) {
14292			precision = Math.max( precision, this._precisionOf( this.options.min ) );
14293		}
14294		return precision;
14295	},
14296
14297	_precisionOf: function( num ) {
14298		var str = num.toString(),
14299			decimal = str.indexOf( "." );
14300		return decimal === -1 ? 0 : str.length - decimal - 1;
14301	},
14302
14303	_valueMin: function() {
14304		return this.options.min;
14305	},
14306
14307	_valueMax: function() {
14308		return this.max;
14309	},
14310
14311	_refreshRange: function( orientation ) {
14312		if ( orientation === "vertical" ) {
14313			this.range.css( { "width": "", "left": "" } );
14314		}
14315		if ( orientation === "horizontal" ) {
14316			this.range.css( { "height": "", "bottom": "" } );
14317		}
14318	},
14319
14320	_refreshValue: function() {
14321		var lastValPercent, valPercent, value, valueMin, valueMax,
14322			oRange = this.options.range,
14323			o = this.options,
14324			that = this,
14325			animate = ( !this._animateOff ) ? o.animate : false,
14326			_set = {};
14327
14328		if ( this._hasMultipleValues() ) {
14329			this.handles.each( function( i ) {
14330				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
14331					that._valueMin() ) * 100;
14332				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
14333				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
14334				if ( that.options.range === true ) {
14335					if ( that.orientation === "horizontal" ) {
14336						if ( i === 0 ) {
14337							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
14338								left: valPercent + "%"
14339							}, o.animate );
14340						}
14341						if ( i === 1 ) {
14342							that.range[ animate ? "animate" : "css" ]( {
14343								width: ( valPercent - lastValPercent ) + "%"
14344							}, {
14345								queue: false,
14346								duration: o.animate
14347							} );
14348						}
14349					} else {
14350						if ( i === 0 ) {
14351							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
14352								bottom: ( valPercent ) + "%"
14353							}, o.animate );
14354						}
14355						if ( i === 1 ) {
14356							that.range[ animate ? "animate" : "css" ]( {
14357								height: ( valPercent - lastValPercent ) + "%"
14358							}, {
14359								queue: false,
14360								duration: o.animate
14361							} );
14362						}
14363					}
14364				}
14365				lastValPercent = valPercent;
14366			} );
14367		} else {
14368			value = this.value();
14369			valueMin = this._valueMin();
14370			valueMax = this._valueMax();
14371			valPercent = ( valueMax !== valueMin ) ?
14372					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
14373					0;
14374			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
14375			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
14376
14377			if ( oRange === "min" && this.orientation === "horizontal" ) {
14378				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
14379					width: valPercent + "%"
14380				}, o.animate );
14381			}
14382			if ( oRange === "max" && this.orientation === "horizontal" ) {
14383				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
14384					width: ( 100 - valPercent ) + "%"
14385				}, o.animate );
14386			}
14387			if ( oRange === "min" && this.orientation === "vertical" ) {
14388				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
14389					height: valPercent + "%"
14390				}, o.animate );
14391			}
14392			if ( oRange === "max" && this.orientation === "vertical" ) {
14393				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
14394					height: ( 100 - valPercent ) + "%"
14395				}, o.animate );
14396			}
14397		}
14398	},
14399
14400	_handleEvents: {
14401		keydown: function( event ) {
14402			var allowed, curVal, newVal, step,
14403				index = $( event.target ).data( "ui-slider-handle-index" );
14404
14405			switch ( event.keyCode ) {
14406				case $.ui.keyCode.HOME:
14407				case $.ui.keyCode.END:
14408				case $.ui.keyCode.PAGE_UP:
14409				case $.ui.keyCode.PAGE_DOWN:
14410				case $.ui.keyCode.UP:
14411				case $.ui.keyCode.RIGHT:
14412				case $.ui.keyCode.DOWN:
14413				case $.ui.keyCode.LEFT:
14414					event.preventDefault();
14415					if ( !this._keySliding ) {
14416						this._keySliding = true;
14417						this._addClass( $( event.target ), null, "ui-state-active" );
14418						allowed = this._start( event, index );
14419						if ( allowed === false ) {
14420							return;
14421						}
14422					}
14423					break;
14424			}
14425
14426			step = this.options.step;
14427			if ( this._hasMultipleValues() ) {
14428				curVal = newVal = this.values( index );
14429			} else {
14430				curVal = newVal = this.value();
14431			}
14432
14433			switch ( event.keyCode ) {
14434				case $.ui.keyCode.HOME:
14435					newVal = this._valueMin();
14436					break;
14437				case $.ui.keyCode.END:
14438					newVal = this._valueMax();
14439					break;
14440				case $.ui.keyCode.PAGE_UP:
14441					newVal = this._trimAlignValue(
14442						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
14443					);
14444					break;
14445				case $.ui.keyCode.PAGE_DOWN:
14446					newVal = this._trimAlignValue(
14447						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
14448					break;
14449				case $.ui.keyCode.UP:
14450				case $.ui.keyCode.RIGHT:
14451					if ( curVal === this._valueMax() ) {
14452						return;
14453					}
14454					newVal = this._trimAlignValue( curVal + step );
14455					break;
14456				case $.ui.keyCode.DOWN:
14457				case $.ui.keyCode.LEFT:
14458					if ( curVal === this._valueMin() ) {
14459						return;
14460					}
14461					newVal = this._trimAlignValue( curVal - step );
14462					break;
14463			}
14464
14465			this._slide( event, index, newVal );
14466		},
14467		keyup: function( event ) {
14468			var index = $( event.target ).data( "ui-slider-handle-index" );
14469
14470			if ( this._keySliding ) {
14471				this._keySliding = false;
14472				this._stop( event, index );
14473				this._change( event, index );
14474				this._removeClass( $( event.target ), null, "ui-state-active" );
14475			}
14476		}
14477	}
14478} );
14479
14480
14481/*!
14482 * jQuery UI S
14482pinner 1.13.2
14483 * http://jqueryui.com
14484 *
14485 * Copyright jQuery Foundation and other contributors
14486 * Released under the MIT license.
14487 * http://jquery.org/license
14488 */
14489
14490//>>label: Spinner
14491//>>group: Widgets
14492//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
14493//>>docs: http://api.jqueryui.com/spinner/
14494//>>demos: http://jqueryui.com/spinner/
14495//>>css.structure: ../../themes/base/core.css
14496//>>css.structure: ../../themes/base/spinner.css
14497//>>css.theme: ../../themes/base/theme.css
14498
14499
14500function spinnerModifier( fn ) {
14501	return function() {
14502		var previous = this.element.val();
14503		fn.apply( this, arguments );
14504		this._refresh();
14505		if ( previous !== this.element.val() ) {
14506			this._trigger( "change" );
14507		}
14508	};
14509}
14510
14511$.widget( "ui.spinner", {
14512	version: "1.13.2
vendor: 13,310 bytes, lines 14512-15043
14512",
14513	defaultElement: "<input>",
14514	widgetEventPrefix: "spin",
14515	options: {
14516		classes: {
14517			"ui-spinner": "ui-corner-all",
14518			"ui-spinner-down": "ui-corner-br",
14519			"ui-spinner-up": "ui-corner-tr"
14520		},
14521		culture: null,
14522		icons: {
14523			down: "ui-icon-triangle-1-s",
14524			up: "ui-icon-triangle-1-n"
14525		},
14526		incremental: true,
14527		max: null,
14528		min: null,
14529		numberFormat: null,
14530		page: 10,
14531		step: 1,
14532
14533		change: null,
14534		spin: null,
14535		start: null,
14536		stop: null
14537	},
14538
14539	_create: function() {
14540
14541		// handle string values that need to be parsed
14542		this._setOption( "max", this.options.max );
14543		this._setOption( "min", this.options.min );
14544		this._setOption( "step", this.options.step );
14545
14546		// Only format if there is a value, prevents the field from being marked
14547		// as invalid in Firefox, see #9573.
14548		if ( this.value() !== "" ) {
14549
14550			// Format the value, but don't constrain.
14551			this._value( this.element.val(), true );
14552		}
14553
14554		this._draw();
14555		this._on( this._events );
14556		this._refresh();
14557
14558		// Turning off autocomplete prevents the browser from remembering the
14559		// value when navigating through history, so we re-enable autocomplete
14560		// if the page is unloaded before the widget is destroyed. #7790
14561		this._on( this.window, {
14562			beforeunload: function() {
14563				this.element.removeAttr( "autocomplete" );
14564			}
14565		} );
14566	},
14567
14568	_getCreateOptions: function() {
14569		var options = this._super();
14570		var element = this.element;
14571
14572		$.each( [ "min", "max", "step" ], function( i, option ) {
14573			var value = element.attr( option );
14574			if ( value != null && value.length ) {
14575				options[ option ] = value;
14576			}
14577		} );
14578
14579		return options;
14580	},
14581
14582	_events: {
14583		keydown: function( event ) {
14584			if ( this._start( event ) && this._keydown( event ) ) {
14585				event.preventDefault();
14586			}
14587		},
14588		keyup: "_stop",
14589		focus: function() {
14590			this.previous = this.element.val();
14591		},
14592		blur: function( event ) {
14593			if ( this.cancelBlur ) {
14594				delete this.cancelBlur;
14595				return;
14596			}
14597
14598			this._stop();
14599			this._refresh();
14600			if ( this.previous !== this.element.val() ) {
14601				this._trigger( "change", event );
14602			}
14603		},
14604		mousewheel: function( event, delta ) {
14605			var activeElement = $.ui.safeActiveElement( this.document[ 0 ] );
14606			var isActive = this.element[ 0 ] === activeElement;
14607
14608			if ( !isActive || !delta ) {
14609				return;
14610			}
14611
14612			if ( !this.spinning && !this._start( event ) ) {
14613				return false;
14614			}
14615
14616			this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
14617			clearTimeout( this.mousewheelTimer );
14618			this.mousewheelTimer = this._delay( function() {
14619				if ( this.spinning ) {
14620					this._stop( event );
14621				}
14622			}, 100 );
14623			event.preventDefault();
14624		},
14625		"mousedown .ui-spinner-button": function( event ) {
14626			var previous;
14627
14628			// We never want the buttons to have focus; whenever the user is
14629			// interacting with the spinner, the focus should be on the input.
14630			// If the input is focused then this.previous is properly set from
14631			// when the input first received focus. If the input is not focused
14632			// then we need to set this.previous based on the value before spinning.
14633			previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?
14634				this.previous : this.element.val();
14635			function checkFocus() {
14636				var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );
14637				if ( !isActive ) {
14638					this.element.trigger( "focus" );
14639					this.previous = previous;
14640
14641					// support: IE
14642					// IE sets focus asynchronously, so we need to check if focus
14643					// moved off of the input because the user clicked on the button.
14644					this._delay( function() {
14645						this.previous = previous;
14646					} );
14647				}
14648			}
14649
14650			// Ensure focus is on (or stays on) the text field
14651			event.preventDefault();
14652			checkFocus.call( this );
14653
14654			// Support: IE
14655			// IE doesn't prevent moving focus even with event.preventDefault()
14656			// so we set a flag to know when we should ignore the blur event
14657			// and check (again) if focus moved off of the input.
14658			this.cancelBlur = true;
14659			this._delay( function() {
14660				delete this.cancelBlur;
14661				checkFocus.call( this );
14662			} );
14663
14664			if ( this._start( event ) === false ) {
14665				return;
14666			}
14667
14668			this._repeat( null, $( event.currentTarget )
14669				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
14670		},
14671		"mouseup .ui-spinner-button": "_stop",
14672		"mouseenter .ui-spinner-button": function( event ) {
14673
14674			// button will add ui-state-active if mouse was down while mouseleave and kept down
14675			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
14676				return;
14677			}
14678
14679			if ( this._start( event ) === false ) {
14680				return false;
14681			}
14682			this._repeat( null, $( event.currentTarget )
14683				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
14684		},
14685
14686		// TODO: do we really want to consider this a stop?
14687		// shouldn't we just stop the repeater and wait until mouseup before
14688		// we trigger the stop event?
14689		"mouseleave .ui-spinner-button": "_stop"
14690	},
14691
14692	// Support mobile enhanced option and make backcompat more sane
14693	_enhance: function() {
14694		this.uiSpinner = this.element
14695			.attr( "autocomplete", "off" )
14696			.wrap( "<span>" )
14697			.parent()
14698
14699				// Add buttons
14700				.append(
14701					"<a></a><a></a>"
14702				);
14703	},
14704
14705	_draw: function() {
14706		this._enhance();
14707
14708		this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
14709		this._addClass( "ui-spinner-input" );
14710
14711		this.element.attr( "role", "spinbutton" );
14712
14713		// Button bindings
14714		this.buttons = this.uiSpinner.children( "a" )
14715			.attr( "tabIndex", -1 )
14716			.attr( "aria-hidden", true )
14717			.button( {
14718				classes: {
14719					"ui-button": ""
14720				}
14721			} );
14722
14723		// TODO: Right now button does not support classes this is already updated in button PR
14724		this._removeClass( this.buttons, "ui-corner-all" );
14725
14726		this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
14727		this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
14728		this.buttons.first().button( {
14729			"icon": this.options.icons.up,
14730			"showLabel": false
14731		} );
14732		this.buttons.last().button( {
14733			"icon": this.options.icons.down,
14734			"showLabel": false
14735		} );
14736
14737		// IE 6 doesn't understand height: 50% for the buttons
14738		// unless the wrapper has an explicit height
14739		if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
14740				this.uiSpinner.height() > 0 ) {
14741			this.uiSpinner.height( this.uiSpinner.height() );
14742		}
14743	},
14744
14745	_keydown: function( event ) {
14746		var options = this.options,
14747			keyCode = $.ui.keyCode;
14748
14749		switch ( event.keyCode ) {
14750		case keyCode.UP:
14751			this._repeat( null, 1, event );
14752			return true;
14753		case keyCode.DOWN:
14754			this._repeat( null, -1, event );
14755			return true;
14756		case keyCode.PAGE_UP:
14757			this._repeat( null, options.page, event );
14758			return true;
14759		case keyCode.PAGE_DOWN:
14760			this._repeat( null, -options.page, event );
14761			return true;
14762		}
14763
14764		return false;
14765	},
14766
14767	_start: function( event ) {
14768		if ( !this.spinning && this._trigger( "start", event ) === false ) {
14769			return false;
14770		}
14771
14772		if ( !this.counter ) {
14773			this.counter = 1;
14774		}
14775		this.spinning = true;
14776		return true;
14777	},
14778
14779	_repeat: function( i, steps, event ) {
14780		i = i || 500;
14781
14782		clearTimeout( this.timer );
14783		this.timer = this._delay( function() {
14784			this._repeat( 40, steps, event );
14785		}, i );
14786
14787		this._spin( steps * this.options.step, event );
14788	},
14789
14790	_spin: function( step, event ) {
14791		var value = this.value() || 0;
14792
14793		if ( !this.counter ) {
14794			this.counter = 1;
14795		}
14796
14797		value = this._adjustValue( value + step * this._increment( this.counter ) );
14798
14799		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
14800			this._value( value );
14801			this.counter++;
14802		}
14803	},
14804
14805	_increment: function( i ) {
14806		var incremental = this.options.incremental;
14807
14808		if ( incremental ) {
14809			return typeof incremental === "function" ?
14810				incremental( i ) :
14811				Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
14812		}
14813
14814		return 1;
14815	},
14816
14817	_precision: function() {
14818		var precision = this._precisionOf( this.options.step );
14819		if ( this.options.min !== null ) {
14820			precision = Math.max( precision, this._precisionOf( this.options.min ) );
14821		}
14822		return precision;
14823	},
14824
14825	_precisionOf: function( num ) {
14826		var str = num.toString(),
14827			decimal = str.indexOf( "." );
14828		return decimal === -1 ? 0 : str.length - decimal - 1;
14829	},
14830
14831	_adjustValue: function( value ) {
14832		var base, aboveMin,
14833			options = this.options;
14834
14835		// Make sure we're at a valid step
14836		// - find out where we are relative to the base (min or 0)
14837		base = options.min !== null ? options.min : 0;
14838		aboveMin = value - base;
14839
14840		// - round to the nearest step
14841		aboveMin = Math.round( aboveMin / options.step ) * options.step;
14842
14843		// - rounding is based on 0, so adjust back to our base
14844		value = base + aboveMin;
14845
14846		// Fix precision from bad JS floating point math
14847		value = parseFloat( value.toFixed( this._precision() ) );
14848
14849		// Clamp the value
14850		if ( options.max !== null && value > options.max ) {
14851			return options.max;
14852		}
14853		if ( options.min !== null && value < options.min ) {
14854			return options.min;
14855		}
14856
14857		return value;
14858	},
14859
14860	_stop: function( event ) {
14861		if ( !this.spinning ) {
14862			return;
14863		}
14864
14865		clearTimeout( this.timer );
14866		clearTimeout( this.mousewheelTimer );
14867		this.counter = 0;
14868		this.spinning = false;
14869		this._trigger( "stop", event );
14870	},
14871
14872	_setOption: function( key, value ) {
14873		var prevValue, first, last;
14874
14875		if ( key === "culture" || key === "numberFormat" ) {
14876			prevValue = this._parse( this.element.val() );
14877			this.options[ key ] = value;
14878			this.element.val( this._format( prevValue ) );
14879			return;
14880		}
14881
14882		if ( key === "max" || key === "min" || key === "step" ) {
14883			if ( typeof value === "string" ) {
14884				value = this._parse( value );
14885			}
14886		}
14887		if ( key === "icons" ) {
14888			first = this.buttons.first().find( ".ui-icon" );
14889			this._removeClass( first, null, this.options.icons.up );
14890			this._addClass( first, null, value.up );
14891			last = this.buttons.last().find( ".ui-icon" );
14892			this._removeClass( last, null, this.options.icons.down );
14893			this._addClass( last, null, value.down );
14894		}
14895
14896		this._super( key, value );
14897	},
14898
14899	_setOptionDisabled: function( value ) {
14900		this._super( value );
14901
14902		this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
14903		this.element.prop( "disabled", !!value );
14904		this.buttons.button( value ? "disable" : "enable" );
14905	},
14906
14907	_setOptions: spinnerModifier( function( options ) {
14908		this._super( options );
14909	} ),
14910
14911	_parse: function( val ) {
14912		if ( typeof val === "string" && val !== "" ) {
14913			val = window.Globalize && this.options.numberFormat ?
14914				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
14915		}
14916		return val === "" || isNaN( val ) ? null : val;
14917	},
14918
14919	_format: function( value ) {
14920		if ( value === "" ) {
14921			return "";
14922		}
14923		return window.Globalize && this.options.numberFormat ?
14924			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
14925			value;
14926	},
14927
14928	_refresh: function() {
14929		this.element.attr( {
14930			"aria-valuemin": this.options.min,
14931			"aria-valuemax": this.options.max,
14932
14933			// TODO: what should we do with values that can't be parsed?
14934			"aria-valuenow": this._parse( this.element.val() )
14935		} );
14936	},
14937
14938	isValid: function() {
14939		var value = this.value();
14940
14941		// Null is invalid
14942		if ( value === null ) {
14943			return false;
14944		}
14945
14946		// If value gets adjusted, it's invalid
14947		return value === this._adjustValue( value );
14948	},
14949
14950	// Update the value without triggering change
14951	_value: function( value, allowAny ) {
14952		var parsed;
14953		if ( value !== "" ) {
14954			parsed = this._parse( value );
14955			if ( parsed !== null ) {
14956				if ( !allowAny ) {
14957					parsed = this._adjustValue( parsed );
14958				}
14959				value = this._format( parsed );
14960			}
14961		}
14962		this.element.val( value );
14963		this._refresh();
14964	},
14965
14966	_destroy: function() {
14967		this.element
14968			.prop( "disabled", false )
14969			.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
14970
14971		this.uiSpinner.replaceWith( this.element );
14972	},
14973
14974	stepUp: spinnerModifier( function( steps ) {
14975		this._stepUp( steps );
14976	} ),
14977	_stepUp: function( steps ) {
14978		if ( this._start() ) {
14979			this._spin( ( steps || 1 ) * this.options.step );
14980			this._stop();
14981		}
14982	},
14983
14984	stepDown: spinnerModifier( function( steps ) {
14985		this._stepDown( steps );
14986	} ),
14987	_stepDown: function( steps ) {
14988		if ( this._start() ) {
14989			this._spin( ( steps || 1 ) * -this.options.step );
14990			this._stop();
14991		}
14992	},
14993
14994	pageUp: spinnerModifier( function( pages ) {
14995		this._stepUp( ( pages || 1 ) * this.options.page );
14996	} ),
14997
14998	pageDown: spinnerModifier( function( pages ) {
14999		this._stepDown( ( pages || 1 ) * this.options.page );
15000	} ),
15001
15002	value: function( newVal ) {
15003		if ( !arguments.length ) {
15004			return this._parse( this.element.val() );
15005		}
15006		spinnerModifier( this._value ).call( this, newVal );
15007	},
15008
15009	widget: function() {
15010		return this.uiSpinner;
15011	}
15012} );
15013
15014// DEPRECATED
15015// TODO: switch return back to widget declaration at top of file when this is removed
15016if ( $.uiBackCompat !== false ) {
15017
15018	// Backcompat for spinner html extension points
15019	$.widget( "ui.spinner", $.ui.spinner, {
15020		_enhance: function() {
15021			this.uiSpinner = this.element
15022				.attr( "autocomplete", "off" )
15023				.wrap( this._uiSpinnerHtml() )
15024				.parent()
15025
15026					// Add buttons
15027					.append( this._buttonHtml() );
15028		},
15029		_uiSpinnerHtml: function() {
15030			return "<span>";
15031		},
15032
15033		_buttonHtml: function() {
15034			return "<a></a><a></a>";
15035		}
15036	} );
15037}
15038
15039var widgetsSpinner = $.ui.spinner;
15040
15041
15042/*!
15043 * jQuery UI Tabs 1.13.
150432
15044 * http://jqueryui.com
15045 *
15046 * Copyright jQuery Foundation and other contributors
15047 * Released under the MIT license.
15048 * http://jquery.org/license
15049 */
15050
15051//>>label: Tabs
15052//>>group: Widgets
15053//>>description: Transforms a set of container elements into a tab structure.
15054//>>docs: http://api.jqueryui.com/tabs/
15055//>>demos: http://jqueryui.com/tabs/
15056//>>css.structure: ../../themes/base/core.css
15057//>>css.structure: ../../themes/base/tabs.css
15058//>>css.theme: ../../themes/base/theme.css
15059
15060
15061$.widget( "ui.tabs", {
15062	version: "1.13.2
vendor: 12,261 bytes, lines 15062-15529
15062",
15063	delay: 300,
15064	options: {
15065		active: null,
15066		classes: {
15067			"ui-tabs": "ui-corner-all",
15068			"ui-tabs-nav": "ui-corner-all",
15069			"ui-tabs-panel": "ui-corner-bottom",
15070			"ui-tabs-tab": "ui-corner-top"
15071		},
15072		collapsible: false,
15073		event: "click",
15074		heightStyle: "content",
15075		hide: null,
15076		show: null,
15077
15078		// Callbacks
15079		activate: null,
15080		beforeActivate: null,
15081		beforeLoad: null,
15082		load: null
15083	},
15084
15085	_isLocal: ( function() {
15086		var rhash = /#.*$/;
15087
15088		return function( anchor ) {
15089			var anchorUrl, locationUrl;
15090
15091			anchorUrl = anchor.href.replace( rhash, "" );
15092			locationUrl = location.href.replace( rhash, "" );
15093
15094			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
15095			try {
15096				anchorUrl = decodeURIComponent( anchorUrl );
15097			} catch ( error ) {}
15098			try {
15099				locationUrl = decodeURIComponent( locationUrl );
15100			} catch ( error ) {}
15101
15102			return anchor.hash.length > 1 && anchorUrl === locationUrl;
15103		};
15104	} )(),
15105
15106	_create: function() {
15107		var that = this,
15108			options = this.options;
15109
15110		this.running = false;
15111
15112		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
15113		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
15114
15115		this._processTabs();
15116		options.active = this._initialActive();
15117
15118		// Take disabling tabs via class attribute from HTML
15119		// into account and update option properly.
15120		if ( Array.isArray( options.disabled ) ) {
15121			options.disabled = $.uniqueSort( options.disabled.concat(
15122				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
15123					return that.tabs.index( li );
15124				} )
15125			) ).sort();
15126		}
15127
15128		// Check for length avoids error when initializing empty list
15129		if ( this.options.active !== false && this.anchors.length ) {
15130			this.active = this._findActive( options.active );
15131		} else {
15132			this.active = $();
15133		}
15134
15135		this._refresh();
15136
15137		if ( this.active.length ) {
15138			this.load( options.active );
15139		}
15140	},
15141
15142	_initialActive: function() {
15143		var active = this.options.active,
15144			collapsible = this.options.collapsible,
15145			locationHash = location.hash.substring( 1 );
15146
15147		if ( active === null ) {
15148
15149			// check the fragment identifier in the URL
15150			if ( locationHash ) {
15151				this.tabs.each( function( i, tab ) {
15152					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
15153						active = i;
15154						return false;
15155					}
15156				} );
15157			}
15158
15159			// Check for a tab marked active via a class
15160			if ( active === null ) {
15161				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
15162			}
15163
15164			// No active tab, set to false
15165			if ( active === null || active === -1 ) {
15166				active = this.tabs.length ? 0 : false;
15167			}
15168		}
15169
15170		// Handle numbers: negative, out of range
15171		if ( active !== false ) {
15172			active = this.tabs.index( this.tabs.eq( active ) );
15173			if ( active === -1 ) {
15174				active = collapsible ? false : 0;
15175			}
15176		}
15177
15178		// Don't allow collapsible: false and active: false
15179		if ( !collapsible && active === false && this.anchors.length ) {
15180			active = 0;
15181		}
15182
15183		return active;
15184	},
15185
15186	_getCreateEventData: function() {
15187		return {
15188			tab: this.active,
15189			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
15190		};
15191	},
15192
15193	_tabKeydown: function( event ) {
15194		var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
15195			selectedIndex = this.tabs.index( focusedTab ),
15196			goingForward = true;
15197
15198		if ( this._handlePageNav( event ) ) {
15199			return;
15200		}
15201
15202		switch ( event.keyCode ) {
15203		case $.ui.keyCode.RIGHT:
15204		case $.ui.keyCode.DOWN:
15205			selectedIndex++;
15206			break;
15207		case $.ui.keyCode.UP:
15208		case $.ui.keyCode.LEFT:
15209			goingForward = false;
15210			selectedIndex--;
15211			break;
15212		case $.ui.keyCode.END:
15213			selectedIndex = this.anchors.length - 1;
15214			break;
15215		case $.ui.keyCode.HOME:
15216			selectedIndex = 0;
15217			break;
15218		case $.ui.keyCode.SPACE:
15219
15220			// Activate only, no collapsing
15221			event.preventDefault();
15222			clearTimeout( this.activating );
15223			this._activate( selectedIndex );
15224			return;
15225		case $.ui.keyCode.ENTER:
15226
15227			// Toggle (cancel delayed activation, allow collapsing)
15228			event.preventDefault();
15229			clearTimeout( this.activating );
15230
15231			// Determine if we should collapse or activate
15232			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
15233			return;
15234		default:
15235			return;
15236		}
15237
15238		// Focus the appropriate tab, based on which key was pressed
15239		event.preventDefault();
15240		clearTimeout( this.activating );
15241		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
15242
15243		// Navigating with control/command key will prevent automatic activation
15244		if ( !event.ctrlKey && !event.metaKey ) {
15245
15246			// Update aria-selected immediately so that AT think the tab is already selected.
15247			// Otherwise AT may confuse the user by stating that they need to activate the tab,
15248			// but the tab will already be activated by the time the announcement finishes.
15249			focusedTab.attr( "aria-selected", "false" );
15250			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
15251
15252			this.activating = this._delay( function() {
15253				this.option( "active", selectedIndex );
15254			}, this.delay );
15255		}
15256	},
15257
15258	_panelKeydown: function( event ) {
15259		if ( this._handlePageNav( event ) ) {
15260			return;
15261		}
15262
15263		// Ctrl+up moves focus to the current tab
15264		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
15265			event.preventDefault();
15266			this.active.trigger( "focus" );
15267		}
15268	},
15269
15270	// Alt+page up/down moves focus to the previous/next tab (and activates)
15271	_handlePageNav: function( event ) {
15272		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
15273			this._activate( this._focusNextTab( this.options.active - 1, false ) );
15274			return true;
15275		}
15276		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
15277			this._activate( this._focusNextTab( this.options.active + 1, true ) );
15278			return true;
15279		}
15280	},
15281
15282	_findNextTab: function( index, goingForward ) {
15283		var lastTabIndex = this.tabs.length - 1;
15284
15285		function constrain() {
15286			if ( index > lastTabIndex ) {
15287				index = 0;
15288			}
15289			if ( index < 0 ) {
15290				index = lastTabIndex;
15291			}
15292			return index;
15293		}
15294
15295		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
15296			index = goingForward ? index + 1 : index - 1;
15297		}
15298
15299		return index;
15300	},
15301
15302	_focusNextTab: function( index, goingForward ) {
15303		index = this._findNextTab( index, goingForward );
15304		this.tabs.eq( index ).trigger( "focus" );
15305		return index;
15306	},
15307
15308	_setOption: function( key, value ) {
15309		if ( key === "active" ) {
15310
15311			// _activate() will handle invalid values and update this.options
15312			this._activate( value );
15313			return;
15314		}
15315
15316		this._super( key, value );
15317
15318		if ( key === "collapsible" ) {
15319			this._toggleClass( "ui-tabs-collapsible", null, value );
15320
15321			// Setting collapsible: false while collapsed; open first panel
15322			if ( !value && this.options.active === false ) {
15323				this._activate( 0 );
15324			}
15325		}
15326
15327		if ( key === "event" ) {
15328			this._setupEvents( value );
15329		}
15330
15331		if ( key === "heightStyle" ) {
15332			this._setupHeightStyle( value );
15333		}
15334	},
15335
15336	_sanitizeSelector: function( hash ) {
15337		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
15338	},
15339
15340	refresh: function() {
15341		var options = this.options,
15342			lis = this.tablist.children( ":has(a[href])" );
15343
15344		// Get disabled tabs from class attribute from HTML
15345		// this will get converted to a boolean if needed in _refresh()
15346		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
15347			return lis.index( tab );
15348		} );
15349
15350		this._processTabs();
15351
15352		// Was collapsed or no tabs
15353		if ( options.active === false || !this.anchors.length ) {
15354			options.active = false;
15355			this.active = $();
15356
15357		// was active, but active tab is gone
15358		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
15359
15360			// all remaining tabs are disabled
15361			if ( this.tabs.length === options.disabled.length ) {
15362				options.active = false;
15363				this.active = $();
15364
15365			// activate previous tab
15366			} else {
15367				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
15368			}
15369
15370		// was active, active tab still exists
15371		} else {
15372
15373			// make sure active index is correct
15374			options.active = this.tabs.index( this.active );
15375		}
15376
15377		this._refresh();
15378	},
15379
15380	_refresh: function() {
15381		this._setOptionDisabled( this.options.disabled );
15382		this._setupEvents( this.options.event );
15383		this._setupHeightStyle( this.options.heightStyle );
15384
15385		this.tabs.not( this.active ).attr( {
15386			"aria-selected": "false",
15387			"aria-expanded": "false",
15388			tabIndex: -1
15389		} );
15390		this.panels.not( this._getPanelForTab( this.active ) )
15391			.hide()
15392			.attr( {
15393				"aria-hidden": "true"
15394			} );
15395
15396		// Make sure one tab is in the tab order
15397		if ( !this.active.length ) {
15398			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
15399		} else {
15400			this.active
15401				.attr( {
15402					"aria-selected": "true",
15403					"aria-expanded": "true",
15404					tabIndex: 0
15405				} );
15406			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
15407			this._getPanelForTab( this.active )
15408				.show()
15409				.attr( {
15410					"aria-hidden": "false"
15411				} );
15412		}
15413	},
15414
15415	_processTabs: function() {
15416		var that = this,
15417			prevTabs = this.tabs,
15418			prevAnchors = this.anchors,
15419			prevPanels = this.panels;
15420
15421		this.tablist = this._getList().attr( "role", "tablist" );
15422		this._addClass( this.tablist, "ui-tabs-nav",
15423			"ui-helper-reset ui-helper-clearfix ui-widget-header" );
15424
15425		// Prevent users from focusing disabled tabs via click
15426		this.tablist
15427			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
15428				if ( $( this ).is( ".ui-state-disabled" ) ) {
15429					event.preventDefault();
15430				}
15431			} )
15432
15433			// Support: IE <9
15434			// Preventing the default action in mousedown doesn't prevent IE
15435			// from focusing the element, so if the anchor gets focused, blur.
15436			// We don't have to worry about focusing the previously focused
15437			// element since clicking on a non-focusable element should focus
15438			// the body anyway.
15439			.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
15440				if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
15441					this.blur();
15442				}
15443			} );
15444
15445		this.tabs = this.tablist.find( "> li:has(a[href])" )
15446			.attr( {
15447				role: "tab",
15448				tabIndex: -1
15449			} );
15450		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
15451
15452		this.anchors = this.tabs.map( function() {
15453			return $( "a", this )[ 0 ];
15454		} )
15455			.attr( {
15456				tabIndex: -1
15457			} );
15458		this._addClass( this.anchors, "ui-tabs-anchor" );
15459
15460		this.panels = $();
15461
15462		this.anchors.each( function( i, anchor ) {
15463			var selector, panel, panelId,
15464				anchorId = $( anchor ).uniqueId().attr( "id" ),
15465				tab = $( anchor ).closest( "li" ),
15466				originalAriaControls = tab.attr( "aria-controls" );
15467
15468			// Inline tab
15469			if ( that._isLocal( anchor ) ) {
15470				selector = anchor.hash;
15471				panelId = selector.substring( 1 );
15472				panel = that.element.find( that._sanitizeSelector( selector ) );
15473
15474			// remote tab
15475			} else {
15476
15477				// If the tab doesn't already have aria-controls,
15478				// generate an id by using a throw-away element
15479				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
15480				selector = "#" + panelId;
15481				panel = that.element.find( selector );
15482				if ( !panel.length ) {
15483					panel = that._createPanel( panelId );
15484					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
15485				}
15486				panel.attr( "aria-live", "polite" );
15487			}
15488
15489			if ( panel.length ) {
15490				that.panels = that.panels.add( panel );
15491			}
15492			if ( originalAriaControls ) {
15493				tab.data( "ui-tabs-aria-controls", originalAriaControls );
15494			}
15495			tab.attr( {
15496				"aria-controls": panelId,
15497				"aria-labelledby": anchorId
15498			} );
15499			panel.attr( "aria-labelledby", anchorId );
15500		} );
15501
15502		this.panels.attr( "role", "tabpanel" );
15503		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
15504
15505		// Avoid memory leaks (#10056)
15506		if ( prevTabs ) {
15507			this._off( prevTabs.not( this.tabs ) );
15508			this._off( prevAnchors.not( this.anchors ) );
15509			this._off( prevPanels.not( this.panels ) );
15510		}
15511	},
15512
15513	// Allow overriding how to find the list for rare usage scenarios (#7715)
15514	_getList: function() {
15515		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
15516	},
15517
15518	_createPanel: function( id ) {
15519		return $( "<div>" )
15520			.attr( "id", id )
15521			.data( "ui-tabs-destroy", true );
15522	},
15523
15524	_setOptionDisabled: function( disabled ) {
15525		var currentItem, li, i;
15526
15527		if ( Array.isArray( disabled ) ) {
15528			if ( !disabled.length ) {
15529				disabled = false;
vendor: 6,148 bytes, lines 15530-15758
15530			} else if ( disabled.length === this.anchors.length ) {
15531				disabled = true;
15532			}
15533		}
15534
15535		// Disable tabs
15536		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
15537			currentItem = $( li );
15538			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
15539				currentItem.attr( "aria-disabled", "true" );
15540				this._addClass( currentItem, null, "ui-state-disabled" );
15541			} else {
15542				currentItem.removeAttr( "aria-disabled" );
15543				this._removeClass( currentItem, null, "ui-state-disabled" );
15544			}
15545		}
15546
15547		this.options.disabled = disabled;
15548
15549		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
15550			disabled === true );
15551	},
15552
15553	_setupEvents: function( event ) {
15554		var events = {};
15555		if ( event ) {
15556			$.each( event.split( " " ), function( index, eventName ) {
15557				events[ eventName ] = "_eventHandler";
15558			} );
15559		}
15560
15561		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
15562
15563		// Always prevent the default action, even when disabled
15564		this._on( true, this.anchors, {
15565			click: function( event ) {
15566				event.preventDefault();
15567			}
15568		} );
15569		this._on( this.anchors, events );
15570		this._on( this.tabs, { keydown: "_tabKeydown" } );
15571		this._on( this.panels, { keydown: "_panelKeydown" } );
15572
15573		this._focusable( this.tabs );
15574		this._hoverable( this.tabs );
15575	},
15576
15577	_setupHeightStyle: function( heightStyle ) {
15578		var maxHeight,
15579			parent = this.element.parent();
15580
15581		if ( heightStyle === "fill" ) {
15582			maxHeight = parent.height();
15583			maxHeight -= this.element.outerHeight() - this.element.height();
15584
15585			this.element.siblings( ":visible" ).each( function() {
15586				var elem = $( this ),
15587					position = elem.css( "position" );
15588
15589				if ( position === "absolute" || position === "fixed" ) {
15590					return;
15591				}
15592				maxHeight -= elem.outerHeight( true );
15593			} );
15594
15595			this.element.children().not( this.panels ).each( function() {
15596				maxHeight -= $( this ).outerHeight( true );
15597			} );
15598
15599			this.panels.each( function() {
15600				$( this ).height( Math.max( 0, maxHeight -
15601					$( this ).innerHeight() + $( this ).height() ) );
15602			} )
15603				.css( "overflow", "auto" );
15604		} else if ( heightStyle === "auto" ) {
15605			maxHeight = 0;
15606			this.panels.each( function() {
15607				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
15608			} ).height( maxHeight );
15609		}
15610	},
15611
15612	_eventHandler: function( event ) {
15613		var options = this.options,
15614			active = this.active,
15615			anchor = $( event.currentTarget ),
15616			tab = anchor.closest( "li" ),
15617			clickedIsActive = tab[ 0 ] === active[ 0 ],
15618			collapsing = clickedIsActive && options.collapsible,
15619			toShow = collapsing ? $() : this._getPanelForTab( tab ),
15620			toHide = !active.length ? $() : this._getPanelForTab( active ),
15621			eventData = {
15622				oldTab: active,
15623				oldPanel: toHide,
15624				newTab: collapsing ? $() : tab,
15625				newPanel: toShow
15626			};
15627
15628		event.preventDefault();
15629
15630		if ( tab.hasClass( "ui-state-disabled" ) ||
15631
15632				// tab is already loading
15633				tab.hasClass( "ui-tabs-loading" ) ||
15634
15635				// can't switch durning an animation
15636				this.running ||
15637
15638				// click on active header, but not collapsible
15639				( clickedIsActive && !options.collapsible ) ||
15640
15641				// allow canceling activation
15642				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
15643			return;
15644		}
15645
15646		options.active = collapsing ? false : this.tabs.index( tab );
15647
15648		this.active = clickedIsActive ? $() : tab;
15649		if ( this.xhr ) {
15650			this.xhr.abort();
15651		}
15652
15653		if ( !toHide.length && !toShow.length ) {
15654			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
15655		}
15656
15657		if ( toShow.length ) {
15658			this.load( this.tabs.index( tab ), event );
15659		}
15660		this._toggle( event, eventData );
15661	},
15662
15663	// Handles show/hide for selecting tabs
15664	_toggle: function( event, eventData ) {
15665		var that = this,
15666			toShow = eventData.newPanel,
15667			toHide = eventData.oldPanel;
15668
15669		this.running = true;
15670
15671		function complete() {
15672			that.running = false;
15673			that._trigger( "activate", event, eventData );
15674		}
15675
15676		function show() {
15677			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
15678
15679			if ( toShow.length && that.options.show ) {
15680				that._show( toShow, that.options.show, complete );
15681			} else {
15682				toShow.show();
15683				complete();
15684			}
15685		}
15686
15687		// Start out by hiding, then showing, then completing
15688		if ( toHide.length && this.options.hide ) {
15689			this._hide( toHide, this.options.hide, function() {
15690				that._removeClass( eventData.oldTab.closest( "li" ),
15691					"ui-tabs-active", "ui-state-active" );
15692				show();
15693			} );
15694		} else {
15695			this._removeClass( eventData.oldTab.closest( "li" ),
15696				"ui-tabs-active", "ui-state-active" );
15697			toHide.hide();
15698			show();
15699		}
15700
15701		toHide.attr( "aria-hidden", "true" );
15702		eventData.oldTab.attr( {
15703			"aria-selected": "false",
15704			"aria-expanded": "false"
15705		} );
15706
15707		// If we're switching tabs, remove the old tab from the tab order.
15708		// If we're opening from collapsed state, remove the previous tab from the tab order.
15709		// If we're collapsing, then keep the collapsing tab in the tab order.
15710		if ( toShow.length && toHide.length ) {
15711			eventData.oldTab.attr( "tabIndex", -1 );
15712		} else if ( toShow.length ) {
15713			this.tabs.filter( function() {
15714				return $( this ).attr( "tabIndex" ) === 0;
15715			} )
15716				.attr( "tabIndex", -1 );
15717		}
15718
15719		toShow.attr( "aria-hidden", "false" );
15720		eventData.newTab.attr( {
15721			"aria-selected": "true",
15722			"aria-expanded": "true",
15723			tabIndex: 0
15724		} );
15725	},
15726
15727	_activate: function( index ) {
15728		var anchor,
15729			active = this._findActive( index );
15730
15731		// Trying to activate the already active panel
15732		if ( active[ 0 ] === this.active[ 0 ] ) {
15733			return;
15734		}
15735
15736		// Trying to collapse, simulate a click on the current active header
15737		if ( !active.length ) {
15738			active = this.active;
15739		}
15740
15741		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
15742		this._eventHandler( {
15743			target: anchor,
15744			currentTarget: anchor,
15745			preventDefault: $.noop
15746		} );
15747	},
15748
15749	_findActive: function( index ) {
15750		return index === false ? $() : this.tabs.eq( index );
15751	},
15752
15753	_getIndex: function( index ) {
15754
15755		// meta-function to give users option to provide a href string instead of a numerical index.
15756		if ( typeof index === "string" ) {
15757			index = this.anchors.index( this.anchors.filter( "[href$='" +
15758				$.
vendor: 4,911 bytes, lines 15758-15966
15758escapeSelector( index ) + "']" ) );
15759		}
15760
15761		return index;
15762	},
15763
15764	_destroy: function() {
15765		if ( this.xhr ) {
15766			this.xhr.abort();
15767		}
15768
15769		this.tablist
15770			.removeAttr( "role" )
15771			.off( this.eventNamespace );
15772
15773		this.anchors
15774			.removeAttr( "role tabIndex" )
15775			.removeUniqueId();
15776
15777		this.tabs.add( this.panels ).each( function() {
15778			if ( $.data( this, "ui-tabs-destroy" ) ) {
15779				$( this ).remove();
15780			} else {
15781				$( this ).removeAttr( "role tabIndex " +
15782					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
15783			}
15784		} );
15785
15786		this.tabs.each( function() {
15787			var li = $( this ),
15788				prev = li.data( "ui-tabs-aria-controls" );
15789			if ( prev ) {
15790				li
15791					.attr( "aria-controls", prev )
15792					.removeData( "ui-tabs-aria-controls" );
15793			} else {
15794				li.removeAttr( "aria-controls" );
15795			}
15796		} );
15797
15798		this.panels.show();
15799
15800		if ( this.options.heightStyle !== "content" ) {
15801			this.panels.css( "height", "" );
15802		}
15803	},
15804
15805	enable: function( index ) {
15806		var disabled = this.options.disabled;
15807		if ( disabled === false ) {
15808			return;
15809		}
15810
15811		if ( index === undefined ) {
15812			disabled = false;
15813		} else {
15814			index = this._getIndex( index );
15815			if ( Array.isArray( disabled ) ) {
15816				disabled = $.map( disabled, function( num ) {
15817					return num !== index ? num : null;
15818				} );
15819			} else {
15820				disabled = $.map( this.tabs, function( li, num ) {
15821					return num !== index ? num : null;
15822				} );
15823			}
15824		}
15825		this._setOptionDisabled( disabled );
15826	},
15827
15828	disable: function( index ) {
15829		var disabled = this.options.disabled;
15830		if ( disabled === true ) {
15831			return;
15832		}
15833
15834		if ( index === undefined ) {
15835			disabled = true;
15836		} else {
15837			index = this._getIndex( index );
15838			if ( $.inArray( index, disabled ) !== -1 ) {
15839				return;
15840			}
15841			if ( Array.isArray( disabled ) ) {
15842				disabled = $.merge( [ index ], disabled ).sort();
15843			} else {
15844				disabled = [ index ];
15845			}
15846		}
15847		this._setOptionDisabled( disabled );
15848	},
15849
15850	load: function( index, event ) {
15851		index = this._getIndex( index );
15852		var that = this,
15853			tab = this.tabs.eq( index ),
15854			anchor = tab.find( ".ui-tabs-anchor" ),
15855			panel = this._getPanelForTab( tab ),
15856			eventData = {
15857				tab: tab,
15858				panel: panel
15859			},
15860			complete = function( jqXHR, status ) {
15861				if ( status === "abort" ) {
15862					that.panels.stop( false, true );
15863				}
15864
15865				that._removeClass( tab, "ui-tabs-loading" );
15866				panel.removeAttr( "aria-busy" );
15867
15868				if ( jqXHR === that.xhr ) {
15869					delete that.xhr;
15870				}
15871			};
15872
15873		// Not remote
15874		if ( this._isLocal( anchor[ 0 ] ) ) {
15875			return;
15876		}
15877
15878		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
15879
15880		// Support: jQuery <1.8
15881		// jQuery <1.8 returns false if the request is canceled in beforeSend,
15882		// but as of 1.8, $.ajax() always returns a jqXHR object.
15883		if ( this.xhr && this.xhr.statusText !== "canceled" ) {
15884			this._addClass( tab, "ui-tabs-loading" );
15885			panel.attr( "aria-busy", "true" );
15886
15887			this.xhr
15888				.done( function( response, status, jqXHR ) {
15889
15890					// support: jQuery <1.8
15891					// http://bugs.jquery.com/ticket/11778
15892					setTimeout( function() {
15893						panel.html( response );
15894						that._trigger( "load", event, eventData );
15895
15896						complete( jqXHR, status );
15897					}, 1 );
15898				} )
15899				.fail( function( jqXHR, status ) {
15900
15901					// support: jQuery <1.8
15902					// http://bugs.jquery.com/ticket/11778
15903					setTimeout( function() {
15904						complete( jqXHR, status );
15905					}, 1 );
15906				} );
15907		}
15908	},
15909
15910	_ajaxSettings: function( anchor, event, eventData ) {
15911		var that = this;
15912		return {
15913
15914			// Support: IE <11 only
15915			// Strip any hash that exists to prevent errors with the Ajax request
15916			url: anchor.attr( "href" ).replace( /#.*$/, "" ),
15917			beforeSend: function( jqXHR, settings ) {
15918				return that._trigger( "beforeLoad", event,
15919					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
15920			}
15921		};
15922	},
15923
15924	_getPanelForTab: function( tab ) {
15925		var id = $( tab ).attr( "aria-controls" );
15926		return this.element.find( this._sanitizeSelector( "#" + id ) );
15927	}
15928} );
15929
15930// DEPRECATED
15931// TODO: Switch return back to widget declaration at top of file when this is removed
15932if ( $.uiBackCompat !== false ) {
15933
15934	// Backcompat for ui-tab class (now ui-tabs-tab)
15935	$.widget( "ui.tabs", $.ui.tabs, {
15936		_processTabs: function() {
15937			this._superApply( arguments );
15938			this._addClass( this.tabs, "ui-tab" );
15939		}
15940	} );
15941}
15942
15943var widgetsTabs = $.ui.tabs;
15944
15945
15946/*!
15947 * jQuery UI Tooltip 1.13.2
15948 * http://jqueryui.com
15949 *
15950 * Copyright jQuery Foundation and other contributors
15951 * Released under the MIT license.
15952 * http://jquery.org/license
15953 */
15954
15955//>>label: Tooltip
15956//>>group: Widgets
15957//>>description: Shows additional information for any element on hover or focus.
15958//>>docs: http://api.jqueryui.com/tooltip/
15959//>>demos: http://jqueryui.com/tooltip/
15960//>>css.structure: ../../themes/base/core.css
15961//>>css.structure: ../../themes/base/tooltip.css
15962//>>css.theme: ../../themes/base/theme.css
15963
15964
15965$.widget( "ui.tooltip", {
15966	version: "1.13.2
vendor: 13,562 bytes, lines 15966-16452
15966",
15967	options: {
15968		classes: {
15969			"ui-tooltip": "ui-corner-all ui-widget-shadow"
15970		},
15971		content: function() {
15972			var title = $( this ).attr( "title" );
15973
15974			// Escape title, since we're going from an attribute to raw HTML
15975			return $( "<a>" ).text( title ).html();
15976		},
15977		hide: true,
15978
15979		// Disabled elements have inconsistent behavior across browsers (#8661)
15980		items: "[title]:not([disabled])",
15981		position: {
15982			my: "left top+15",
15983			at: "left bottom",
15984			collision: "flipfit flip"
15985		},
15986		show: true,
15987		track: false,
15988
15989		// Callbacks
15990		close: null,
15991		open: null
15992	},
15993
15994	_addDescribedBy: function( elem, id ) {
15995		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
15996		describedby.push( id );
15997		elem
15998			.data( "ui-tooltip-id", id )
15999			.attr( "aria-describedby", String.prototype.trim.call( describedby.join( " " ) ) );
16000	},
16001
16002	_removeDescribedBy: function( elem ) {
16003		var id = elem.data( "ui-tooltip-id" ),
16004			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
16005			index = $.inArray( id, describedby );
16006
16007		if ( index !== -1 ) {
16008			describedby.splice( index, 1 );
16009		}
16010
16011		elem.removeData( "ui-tooltip-id" );
16012		describedby = String.prototype.trim.call( describedby.join( " " ) );
16013		if ( describedby ) {
16014			elem.attr( "aria-describedby", describedby );
16015		} else {
16016			elem.removeAttr( "aria-describedby" );
16017		}
16018	},
16019
16020	_create: function() {
16021		this._on( {
16022			mouseover: "open",
16023			focusin: "open"
16024		} );
16025
16026		// IDs of generated tooltips, needed for destroy
16027		this.tooltips = {};
16028
16029		// IDs of parent tooltips where we removed the title attribute
16030		this.parents = {};
16031
16032		// Append the aria-live region so tooltips announce correctly
16033		this.liveRegion = $( "<div>" )
16034			.attr( {
16035				role: "log",
16036				"aria-live": "assertive",
16037				"aria-relevant": "additions"
16038			} )
16039			.appendTo( this.document[ 0 ].body );
16040		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
16041
16042		this.disabledTitles = $( [] );
16043	},
16044
16045	_setOption: function( key, value ) {
16046		var that = this;
16047
16048		this._super( key, value );
16049
16050		if ( key === "content" ) {
16051			$.each( this.tooltips, function( id, tooltipData ) {
16052				that._updateContent( tooltipData.element );
16053			} );
16054		}
16055	},
16056
16057	_setOptionDisabled: function( value ) {
16058		this[ value ? "_disable" : "_enable" ]();
16059	},
16060
16061	_disable: function() {
16062		var that = this;
16063
16064		// Close open tooltips
16065		$.each( this.tooltips, function( id, tooltipData ) {
16066			var event = $.Event( "blur" );
16067			event.target = event.currentTarget = tooltipData.element[ 0 ];
16068			that.close( event, true );
16069		} );
16070
16071		// Remove title attributes to prevent native tooltips
16072		this.disabledTitles = this.disabledTitles.add(
16073			this.element.find( this.options.items ).addBack()
16074				.filter( function() {
16075					var element = $( this );
16076					if ( element.is( "[title]" ) ) {
16077						return element
16078							.data( "ui-tooltip-title", element.attr( "title" ) )
16079							.removeAttr( "title" );
16080					}
16081				} )
16082		);
16083	},
16084
16085	_enable: function() {
16086
16087		// restore title attributes
16088		this.disabledTitles.each( function() {
16089			var element = $( this );
16090			if ( element.data( "ui-tooltip-title" ) ) {
16091				element.attr( "title", element.data( "ui-tooltip-title" ) );
16092			}
16093		} );
16094		this.disabledTitles = $( [] );
16095	},
16096
16097	open: function( event ) {
16098		var that = this,
16099			target = $( event ? event.target : this.element )
16100
16101				// we need closest here due to mouseover bubbling,
16102				// but always pointing at the same event target
16103				.closest( this.options.items );
16104
16105		// No element to show a tooltip for or the tooltip is already open
16106		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
16107			return;
16108		}
16109
16110		if ( target.attr( "title" ) ) {
16111			target.data( "ui-tooltip-title", target.attr( "title" ) );
16112		}
16113
16114		target.data( "ui-tooltip-open", true );
16115
16116		// Kill parent tooltips, custom or native, for hover
16117		if ( event && event.type === "mouseover" ) {
16118			target.parents().each( function() {
16119				var parent = $( this ),
16120					blurEvent;
16121				if ( parent.data( "ui-tooltip-open" ) ) {
16122					blurEvent = $.Event( "blur" );
16123					blurEvent.target = blurEvent.currentTarget = this;
16124					that.close( blurEvent, true );
16125				}
16126				if ( parent.attr( "title" ) ) {
16127					parent.uniqueId();
16128					that.parents[ this.id ] = {
16129						element: this,
16130						title: parent.attr( "title" )
16131					};
16132					parent.attr( "title", "" );
16133				}
16134			} );
16135		}
16136
16137		this._registerCloseHandlers( event, target );
16138		this._updateContent( target, event );
16139	},
16140
16141	_updateContent: function( target, event ) {
16142		var content,
16143			contentOption = this.options.content,
16144			that = this,
16145			eventType = event ? event.type : null;
16146
16147		if ( typeof contentOption === "string" || contentOption.nodeType ||
16148				contentOption.jquery ) {
16149			return this._open( event, target, contentOption );
16150		}
16151
16152		content = contentOption.call( target[ 0 ], function( response ) {
16153
16154			// IE may instantly serve a cached response for ajax requests
16155			// delay this call to _open so the other call to _open runs first
16156			that._delay( function() {
16157
16158				// Ignore async response if tooltip was closed already
16159				if ( !target.data( "ui-tooltip-open" ) ) {
16160					return;
16161				}
16162
16163				// JQuery creates a special event for focusin when it doesn't
16164				// exist natively. To improve performance, the native event
16165				// object is reused and the type is changed. Therefore, we can't
16166				// rely on the type being correct after the event finished
16167				// bubbling, so we set it back to the previous value. (#8740)
16168				if ( event ) {
16169					event.type = eventType;
16170				}
16171				this._open( event, target, response );
16172			} );
16173		} );
16174		if ( content ) {
16175			this._open( event, target, content );
16176		}
16177	},
16178
16179	_open: function( event, target, content ) {
16180		var tooltipData, tooltip, delayedShow, a11yContent,
16181			positionOption = $.extend( {}, this.options.position );
16182
16183		if ( !content ) {
16184			return;
16185		}
16186
16187		// Content can be updated multiple times. If the tooltip already
16188		// exists, then just update the content and bail.
16189		tooltipData = this._find( target );
16190		if ( tooltipData ) {
16191			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
16192			return;
16193		}
16194
16195		// If we have a title, clear it to prevent the native tooltip
16196		// we have to check first to avoid defining a title if none exists
16197		// (we don't want to cause an element to start matching [title])
16198		//
16199		// We use removeAttr only for key events, to allow IE to export the correct
16200		// accessible attributes. For mouse events, set to empty string to avoid
16201		// native tooltip showing up (happens only when removing inside mouseover).
16202		if ( target.is( "[title]" ) ) {
16203			if ( event && event.type === "mouseover" ) {
16204				target.attr( "title", "" );
16205			} else {
16206				target.removeAttr( "title" );
16207			}
16208		}
16209
16210		tooltipData = this._tooltip( target );
16211		tooltip = tooltipData.tooltip;
16212		this._addDescribedBy( target, tooltip.attr( "id" ) );
16213		tooltip.find( ".ui-tooltip-content" ).html( content );
16214
16215		// Support: Voiceover on OS X, JAWS on IE <= 9
16216		// JAWS announces deletions even when aria-relevant="additions"
16217		// Voiceover will sometimes re-read the entire log region's contents from the beginning
16218		this.liveRegion.children().hide();
16219		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
16220		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
16221		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
16222		a11yContent.appendTo( this.liveRegion );
16223
16224		function position( event ) {
16225			positionOption.of = event;
16226			if ( tooltip.is( ":hidden" ) ) {
16227				return;
16228			}
16229			tooltip.position( positionOption );
16230		}
16231		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
16232			this._on( this.document, {
16233				mousemove: position
16234			} );
16235
16236			// trigger once to override element-relative positioning
16237			position( event );
16238		} else {
16239			tooltip.position( $.extend( {
16240				of: target
16241			}, this.options.position ) );
16242		}
16243
16244		tooltip.hide();
16245
16246		this._show( tooltip, this.options.show );
16247
16248		// Handle tracking tooltips that are shown with a delay (#8644). As soon
16249		// as the tooltip is visible, position the tooltip using the most recent
16250		// event.
16251		// Adds the check to add the timers only when both delay and track options are set (#14682)
16252		if ( this.options.track && this.options.show && this.options.show.delay ) {
16253			delayedShow = this.delayedShow = setInterval( function() {
16254				if ( tooltip.is( ":visible" ) ) {
16255					position( positionOption.of );
16256					clearInterval( delayedShow );
16257				}
16258			}, 13 );
16259		}
16260
16261		this._trigger( "open", event, { tooltip: tooltip } );
16262	},
16263
16264	_registerCloseHandlers: function( event, target ) {
16265		var events = {
16266			keyup: function( event ) {
16267				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
16268					var fakeEvent = $.Event( event );
16269					fakeEvent.currentTarget = target[ 0 ];
16270					this.close( fakeEvent, true );
16271				}
16272			}
16273		};
16274
16275		// Only bind remove handler for delegated targets. Non-delegated
16276		// tooltips will handle this in destroy.
16277		if ( target[ 0 ] !== this.element[ 0 ] ) {
16278			events.remove = function() {
16279				var targetElement = this._find( target );
16280				if ( targetElement ) {
16281					this._removeTooltip( targetElement.tooltip );
16282				}
16283			};
16284		}
16285
16286		if ( !event || event.type === "mouseover" ) {
16287			events.mouseleave = "close";
16288		}
16289		if ( !event || event.type === "focusin" ) {
16290			events.focusout = "close";
16291		}
16292		this._on( true, target, events );
16293	},
16294
16295	close: function( event ) {
16296		var tooltip,
16297			that = this,
16298			target = $( event ? event.currentTarget : this.element ),
16299			tooltipData = this._find( target );
16300
16301		// The tooltip may already be closed
16302		if ( !tooltipData ) {
16303
16304			// We set ui-tooltip-open immediately upon open (in open()), but only set the
16305			// additional data once there's actually content to show (in _open()). So even if the
16306			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
16307			// the period between open() and _open().
16308			target.removeData( "ui-tooltip-open" );
16309			return;
16310		}
16311
16312		tooltip = tooltipData.tooltip;
16313
16314		// Disabling closes the tooltip, so we need to track when we're closing
16315		// to avoid an infinite loop in case the tooltip becomes disabled on close
16316		if ( tooltipData.closing ) {
16317			return;
16318		}
16319
16320		// Clear the interval for delayed tracking tooltips
16321		clearInterval( this.delayedShow );
16322
16323		// Only set title if we had one before (see comment in _open())
16324		// If the title attribute has changed since open(), don't restore
16325		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
16326			target.attr( "title", target.data( "ui-tooltip-title" ) );
16327		}
16328
16329		this._removeDescribedBy( target );
16330
16331		tooltipData.hiding = true;
16332		tooltip.stop( true );
16333		this._hide( tooltip, this.options.hide, function() {
16334			that._removeTooltip( $( this ) );
16335		} );
16336
16337		target.removeData( "ui-tooltip-open" );
16338		this._off( target, "mouseleave focusout keyup" );
16339
16340		// Remove 'remove' binding only on delegated targets
16341		if ( target[ 0 ] !== this.element[ 0 ] ) {
16342			this._off( target, "remove" );
16343		}
16344		this._off( this.document, "mousemove" );
16345
16346		if ( event && event.type === "mouseleave" ) {
16347			$.each( this.parents, function( id, parent ) {
16348				$( parent.element ).attr( "title", parent.title );
16349				delete that.parents[ id ];
16350			} );
16351		}
16352
16353		tooltipData.closing = true;
16354		this._trigger( "close", event, { tooltip: tooltip } );
16355		if ( !tooltipData.hiding ) {
16356			tooltipData.closing = false;
16357		}
16358	},
16359
16360	_tooltip: function( element ) {
16361		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
16362			content = $( "<div>" ).appendTo( tooltip ),
16363			id = tooltip.uniqueId().attr( "id" );
16364
16365		this._addClass( content, "ui-tooltip-content" );
16366		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
16367
16368		tooltip.appendTo( this._appendTo( element ) );
16369
16370		return this.tooltips[ id ] = {
16371			element: element,
16372			tooltip: tooltip
16373		};
16374	},
16375
16376	_find: function( target ) {
16377		var id = target.data( "ui-tooltip-id" );
16378		return id ? this.tooltips[ id ] : null;
16379	},
16380
16381	_removeTooltip: function( tooltip ) {
16382
16383		// Clear the interval for delayed tracking tooltips
16384		clearInterval( this.delayedShow );
16385
16386		tooltip.remove();
16387		delete this.tooltips[ tooltip.attr( "id" ) ];
16388	},
16389
16390	_appendTo: function( target ) {
16391		var element = target.closest( ".ui-front, dialog" );
16392
16393		if ( !element.length ) {
16394			element = this.document[ 0 ].body;
16395		}
16396
16397		return element;
16398	},
16399
16400	_destroy: function() {
16401		var that = this;
16402
16403		// Close open tooltips
16404		$.each( this.tooltips, function( id, tooltipData ) {
16405
16406			// Delegate to close method to handle common cleanup
16407			var event = $.Event( "blur" ),
16408				element = tooltipData.element;
16409			event.target = event.currentTarget = element[ 0 ];
16410			that.close( event, true );
16411
16412			// Remove immediately; destroying an open tooltip doesn't use the
16413			// hide animation
16414			$( "#" + id ).remove();
16415
16416			// Restore the title
16417			if ( element.data( "ui-tooltip-title" ) ) {
16418
16419				// If the title attribute has changed since open(), don't restore
16420				if ( !element.attr( "title" ) ) {
16421					element.attr( "title", element.data( "ui-tooltip-title" ) );
16422				}
16423				element.removeData( "ui-tooltip-title" );
16424			}
16425		} );
16426		this.liveRegion.remove();
16427	}
16428} );
16429
16430// DEPRECATED
16431// TODO: Switch return back to widget declaration at top of file when this is removed
16432if ( $.uiBackCompat !== false ) {
16433
16434	// Backcompat for tooltipClass option
16435	$.widget( "ui.tooltip", $.ui.tooltip, {
16436		options: {
16437			tooltipClass: null
16438		},
16439		_tooltip: function() {
16440			var tooltipData = this._superApply( arguments );
16441			if ( this.options.tooltipClass ) {
16442				tooltipData.tooltip.addClass( this.options.tooltipClass );
16443			}
16444			return tooltipData;
16445		}
16446	} );
16447}
16448
16449var widgetsTooltip = $.ui.tooltip;
16450
16451
16452
16453// Create a local jQuery because jQuery Color relies on it and the
16454// global may not exist with AMD and a custom build (#10199).
16455// This module is a noop if used as a regular AMD module.
16456// eslint-disable-next-line no-unused-vars
16457var jQuery = $;
16458
16459
16460/*!
16461 * jQuery Color Animations v2.2.0
16462 * https://github.com/jquery/jquery-color
16463 *
16464 * Copyright OpenJS Foundation and other contributors
16465 * Released under the MIT license.
16466 * http
vendor: 16,926 bytes, lines 16466-17173
16466://jquery.org/license
16467 *
16468 * Date: Sun May 10 09:02:36 2020 +0200
16469 */
16470
16471
16472
16473	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
16474		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
16475
16476	class2type = {},
16477	toString = class2type.toString,
16478
16479	// plusequals test for += 100 -= 100
16480	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
16481
16482	// a set of RE's that can match strings and generate color tuples.
16483	stringParsers = [ {
16484			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
16485			parse: function( execResult ) {
16486				return [
16487					execResult[ 1 ],
16488					execResult[ 2 ],
16489					execResult[ 3 ],
16490					execResult[ 4 ]
16491				];
16492			}
16493		}, {
16494			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
16495			parse: function( execResult ) {
16496				return [
16497					execResult[ 1 ] * 2.55,
16498					execResult[ 2 ] * 2.55,
16499					execResult[ 3 ] * 2.55,
16500					execResult[ 4 ]
16501				];
16502			}
16503		}, {
16504
16505			// this regex ignores A-F because it's compared against an already lowercased string
16506			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})?/,
16507			parse: function( execResult ) {
16508				return [
16509					parseInt( execResult[ 1 ], 16 ),
16510					parseInt( execResult[ 2 ], 16 ),
16511					parseInt( execResult[ 3 ], 16 ),
16512					execResult[ 4 ] ?
16513						( parseInt( execResult[ 4 ], 16 ) / 255 ).toFixed( 2 ) :
16514						1
16515				];
16516			}
16517		}, {
16518
16519			// this regex ignores A-F because it's compared against an already lowercased string
16520			re: /#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])?/,
16521			parse: function( execResult ) {
16522				return [
16523					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
16524					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
16525					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ),
16526					execResult[ 4 ] ?
16527						( parseInt( execResult[ 4 ] + execResult[ 4 ], 16 ) / 255 )
16528							.toFixed( 2 ) :
16529						1
16530				];
16531			}
16532		}, {
16533			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
16534			space: "hsla",
16535			parse: function( execResult ) {
16536				return [
16537					execResult[ 1 ],
16538					execResult[ 2 ] / 100,
16539					execResult[ 3 ] / 100,
16540					execResult[ 4 ]
16541				];
16542			}
16543		} ],
16544
16545	// jQuery.Color( )
16546	color = jQuery.Color = function( color, green, blue, alpha ) {
16547		return new jQuery.Color.fn.parse( color, green, blue, alpha );
16548	},
16549	spaces = {
16550		rgba: {
16551			props: {
16552				red: {
16553					idx: 0,
16554					type: "byte"
16555				},
16556				green: {
16557					idx: 1,
16558					type: "byte"
16559				},
16560				blue: {
16561					idx: 2,
16562					type: "byte"
16563				}
16564			}
16565		},
16566
16567		hsla: {
16568			props: {
16569				hue: {
16570					idx: 0,
16571					type: "degrees"
16572				},
16573				saturation: {
16574					idx: 1,
16575					type: "percent"
16576				},
16577				lightness: {
16578					idx: 2,
16579					type: "percent"
16580				}
16581			}
16582		}
16583	},
16584	propTypes = {
16585		"byte": {
16586			floor: true,
16587			max: 255
16588		},
16589		"percent": {
16590			max: 1
16591		},
16592		"degrees": {
16593			mod: 360,
16594			floor: true
16595		}
16596	},
16597	support = color.support = {},
16598
16599	// element for support tests
16600	supportElem = jQuery( "<p>" )[ 0 ],
16601
16602	// colors = jQuery.Color.names
16603	colors,
16604
16605	// local aliases of functions called often
16606	each = jQuery.each;
16607
16608// determine rgba support immediately
16609supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
16610support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
16611
16612// define cache name and alpha properties
16613// for rgba and hsla spaces
16614each( spaces, function( spaceName, space ) {
16615	space.cache = "_" + spaceName;
16616	space.props.alpha = {
16617		idx: 3,
16618		type: "percent",
16619		def: 1
16620	};
16621} );
16622
16623// Populate the class2type map
16624jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
16625	function( _i, name ) {
16626		class2type[ "[object " + name + "]" ] = name.toLowerCase();
16627	} );
16628
16629function getType( obj ) {
16630	if ( obj == null ) {
16631		return obj + "";
16632	}
16633
16634	return typeof obj === "object" ?
16635		class2type[ toString.call( obj ) ] || "object" :
16636		typeof obj;
16637}
16638
16639function clamp( value, prop, allowEmpty ) {
16640	var type = propTypes[ prop.type ] || {};
16641
16642	if ( value == null ) {
16643		return ( allowEmpty || !prop.def ) ? null : prop.def;
16644	}
16645
16646	// ~~ is an short way of doing floor for positive numbers
16647	value = type.floor ? ~~value : parseFloat( value );
16648
16649	// IE will pass in empty strings as value for alpha,
16650	// which will hit this case
16651	if ( isNaN( value ) ) {
16652		return prop.def;
16653	}
16654
16655	if ( type.mod ) {
16656
16657		// we add mod before modding to make sure that negatives values
16658		// get converted properly: -10 -> 350
16659		return ( value + type.mod ) % type.mod;
16660	}
16661
16662	// for now all property types without mod have min and max
16663	return Math.min( type.max, Math.max( 0, value ) );
16664}
16665
16666function stringParse( string ) {
16667	var inst = color(),
16668		rgba = inst._rgba = [];
16669
16670	string = string.toLowerCase();
16671
16672	each( stringParsers, function( _i, parser ) {
16673		var parsed,
16674			match = parser.re.exec( string ),
16675			values = match && parser.parse( match ),
16676			spaceName = parser.space || "rgba";
16677
16678		if ( values ) {
16679			parsed = inst[ spaceName ]( values );
16680
16681			// if this was an rgba parse the assignment might happen twice
16682			// oh well....
16683			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
16684			rgba = inst._rgba = parsed._rgba;
16685
16686			// exit each( stringParsers ) here because we matched
16687			return false;
16688		}
16689	} );
16690
16691	// Found a stringParser that handled it
16692	if ( rgba.length ) {
16693
16694		// if this came from a parsed string, force "transparent" when alpha is 0
16695		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
16696		if ( rgba.join() === "0,0,0,0" ) {
16697			jQuery.extend( rgba, colors.transparent );
16698		}
16699		return inst;
16700	}
16701
16702	// named colors
16703	return colors[ string ];
16704}
16705
16706color.fn = jQuery.extend( color.prototype, {
16707	parse: function( red, green, blue, alpha ) {
16708		if ( red === undefined ) {
16709			this._rgba = [ null, null, null, null ];
16710			return this;
16711		}
16712		if ( red.jquery || red.nodeType ) {
16713			red = jQuery( red ).css( green );
16714			green = undefined;
16715		}
16716
16717		var inst = this,
16718			type = getType( red ),
16719			rgba = this._rgba = [];
16720
16721		// more than 1 argument specified - assume ( red, green, blue, alpha )
16722		if ( green !== undefined ) {
16723			red = [ red, green, blue, alpha ];
16724			type = "array";
16725		}
16726
16727		if ( type === "string" ) {
16728			return this.parse( stringParse( red ) || colors._default );
16729		}
16730
16731		if ( type === "array" ) {
16732			each( spaces.rgba.props, function( _key, prop ) {
16733				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
16734			} );
16735			return this;
16736		}
16737
16738		if ( type === "object" ) {
16739			if ( red instanceof color ) {
16740				each( spaces, function( _spaceName, space ) {
16741					if ( red[ space.cache ] ) {
16742						inst[ space.cache ] = red[ space.cache ].slice();
16743					}
16744				} );
16745			} else {
16746				each( spaces, function( _spaceName, space ) {
16747					var cache = space.cache;
16748					each( space.props, function( key, prop ) {
16749
16750						// if the cache doesn't exist, and we know how to convert
16751						if ( !inst[ cache ] && space.to ) {
16752
16753							// if the value was null, we don't need to copy it
16754							// if the key was alpha, we don't need to copy it either
16755							if ( key === "alpha" || red[ key ] == null ) {
16756								return;
16757							}
16758							inst[ cache ] = space.to( inst._rgba );
16759						}
16760
16761						// this is the only case where we allow nulls for ALL properties.
16762						// call clamp with alwaysAllowEmpty
16763						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
16764					} );
16765
16766					// everything defined but alpha?
16767					if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
16768
16769						// use the default of 1
16770						if ( inst[ cache ][ 3 ] == null ) {
16771							inst[ cache ][ 3 ] = 1;
16772						}
16773
16774						if ( space.from ) {
16775							inst._rgba = space.from( inst[ cache ] );
16776						}
16777					}
16778				} );
16779			}
16780			return this;
16781		}
16782	},
16783	is: function( compare ) {
16784		var is = color( compare ),
16785			same = true,
16786			inst = this;
16787
16788		each( spaces, function( _, space ) {
16789			var localCache,
16790				isCache = is[ space.cache ];
16791			if ( isCache ) {
16792				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
16793				each( space.props, function( _, prop ) {
16794					if ( isCache[ prop.idx ] != null ) {
16795						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
16796						return same;
16797					}
16798				} );
16799			}
16800			return same;
16801		} );
16802		return same;
16803	},
16804	_space: function() {
16805		var used = [],
16806			inst = this;
16807		each( spaces, function( spaceName, space ) {
16808			if ( inst[ space.cache ] ) {
16809				used.push( spaceName );
16810			}
16811		} );
16812		return used.pop();
16813	},
16814	transition: function( other, distance ) {
16815		var end = color( other ),
16816			spaceName = end._space(),
16817			space = spaces[ spaceName ],
16818			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
16819			start = startColor[ space.cache ] || space.to( startColor._rgba ),
16820			result = start.slice();
16821
16822		end = end[ space.cache ];
16823		each( space.props, function( _key, prop ) {
16824			var index = prop.idx,
16825				startValue = start[ index ],
16826				endValue = end[ index ],
16827				type = propTypes[ prop.type ] || {};
16828
16829			// if null, don't override start value
16830			if ( endValue === null ) {
16831				return;
16832			}
16833
16834			// if null - use end
16835			if ( startValue === null ) {
16836				result[ index ] = endValue;
16837			} else {
16838				if ( type.mod ) {
16839					if ( endValue - startValue > type.mod / 2 ) {
16840						startValue += type.mod;
16841					} else if ( startValue - endValue > type.mod / 2 ) {
16842						startValue -= type.mod;
16843					}
16844				}
16845				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
16846			}
16847		} );
16848		return this[ spaceName ]( result );
16849	},
16850	blend: function( opaque ) {
16851
16852		// if we are already opaque - return ourself
16853		if ( this._rgba[ 3 ] === 1 ) {
16854			return this;
16855		}
16856
16857		var rgb = this._rgba.slice(),
16858			a = rgb.pop(),
16859			blend = color( opaque )._rgba;
16860
16861		return color( jQuery.map( rgb, function( v, i ) {
16862			return ( 1 - a ) * blend[ i ] + a * v;
16863		} ) );
16864	},
16865	toRgbaString: function() {
16866		var prefix = "rgba(",
16867			rgba = jQuery.map( this._rgba, function( v, i ) {
16868				if ( v != null ) {
16869					return v;
16870				}
16871				return i > 2 ? 1 : 0;
16872			} );
16873
16874		if ( rgba[ 3 ] === 1 ) {
16875			rgba.pop();
16876			prefix = "rgb(";
16877		}
16878
16879		return prefix + rgba.join() + ")";
16880	},
16881	toHslaString: function() {
16882		var prefix = "hsla(",
16883			hsla = jQuery.map( this.hsla(), function( v, i ) {
16884				if ( v == null ) {
16885					v = i > 2 ? 1 : 0;
16886				}
16887
16888				// catch 1 and 2
16889				if ( i && i < 3 ) {
16890					v = Math.round( v * 100 ) + "%";
16891				}
16892				return v;
16893			} );
16894
16895		if ( hsla[ 3 ] === 1 ) {
16896			hsla.pop();
16897			prefix = "hsl(";
16898		}
16899		return prefix + hsla.join() + ")";
16900	},
16901	toHexString: function( includeAlpha ) {
16902		var rgba = this._rgba.slice(),
16903			alpha = rgba.pop();
16904
16905		if ( includeAlpha ) {
16906			rgba.push( ~~( alpha * 255 ) );
16907		}
16908
16909		return "#" + jQuery.map( rgba, function( v ) {
16910
16911			// default to 0 when nulls exist
16912			v = ( v || 0 ).toString( 16 );
16913			return v.length === 1 ? "0" + v : v;
16914		} ).join( "" );
16915	},
16916	toString: function() {
16917		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
16918	}
16919} );
16920color.fn.parse.prototype = color.fn;
16921
16922// hsla conversions adapted from:
16923// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
16924
16925function hue2rgb( p, q, h ) {
16926	h = ( h + 1 ) % 1;
16927	if ( h * 6 < 1 ) {
16928		return p + ( q - p ) * h * 6;
16929	}
16930	if ( h * 2 < 1 ) {
16931		return q;
16932	}
16933	if ( h * 3 < 2 ) {
16934		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
16935	}
16936	return p;
16937}
16938
16939spaces.hsla.to = function( rgba ) {
16940	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
16941		return [ null, null, null, rgba[ 3 ] ];
16942	}
16943	var r = rgba[ 0 ] / 255,
16944		g = rgba[ 1 ] / 255,
16945		b = rgba[ 2 ] / 255,
16946		a = rgba[ 3 ],
16947		max = Math.max( r, g, b ),
16948		min = Math.min( r, g, b ),
16949		diff = max - min,
16950		add = max + min,
16951		l = add * 0.5,
16952		h, s;
16953
16954	if ( min === max ) {
16955		h = 0;
16956	} else if ( r === max ) {
16957		h = ( 60 * ( g - b ) / diff ) + 360;
16958	} else if ( g === max ) {
16959		h = ( 60 * ( b - r ) / diff ) + 120;
16960	} else {
16961		h = ( 60 * ( r - g ) / diff ) + 240;
16962	}
16963
16964	// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
16965	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
16966	if ( diff === 0 ) {
16967		s = 0;
16968	} else if ( l <= 0.5 ) {
16969		s = diff / add;
16970	} else {
16971		s = diff / ( 2 - add );
16972	}
16973	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
16974};
16975
16976spaces.hsla.from = function( hsla ) {
16977	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
16978		return [ null, null, null, hsla[ 3 ] ];
16979	}
16980	var h = hsla[ 0 ] / 360,
16981		s = hsla[ 1 ],
16982		l = hsla[ 2 ],
16983		a = hsla[ 3 ],
16984		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
16985		p = 2 * l - q;
16986
16987	return [
16988		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
16989		Math.round( hue2rgb( p, q, h ) * 255 ),
16990		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
16991		a
16992	];
16993};
16994
16995
16996each( spaces, function( spaceName, space ) {
16997	var props = space.props,
16998		cache = space.cache,
16999		to = space.to,
17000		from = space.from;
17001
17002	// makes rgba() and hsla()
17003	color.fn[ spaceName ] = function( value ) {
17004
17005		// generate a cache for this space if it doesn't exist
17006		if ( to && !this[ cache ] ) {
17007			this[ cache ] = to( this._rgba );
17008		}
17009		if ( value === undefined ) {
17010			return this[ cache ].slice();
17011		}
17012
17013		var ret,
17014			type = getType( value ),
17015			arr = ( type === "array" || type === "object" ) ? value : arguments,
17016			local = this[ cache ].slice();
17017
17018		each( props, function( key, prop ) {
17019			var val = arr[ type === "object" ? key : prop.idx ];
17020			if ( val == null ) {
17021				val = local[ prop.idx ];
17022			}
17023			local[ prop.idx ] = clamp( val, prop );
17024		} );
17025
17026		if ( from ) {
17027			ret = color( from( local ) );
17028			ret[ cache ] = local;
17029			return ret;
17030		} else {
17031			return color( local );
17032		}
17033	};
17034
17035	// makes red() green() blue() alpha() hue() saturation() lightness()
17036	each( props, function( key, prop ) {
17037
17038		// alpha is included in more than one space
17039		if ( color.fn[ key ] ) {
17040			return;
17041		}
17042		color.fn[ key ] = function( value ) {
17043			var local, cur, match, fn,
17044				vtype = getType( value );
17045
17046			if ( key === "alpha" ) {
17047				fn = this._hsla ? "hsla" : "rgba";
17048			} else {
17049				fn = spaceName;
17050			}
17051			local = this[ fn ]();
17052			cur = local[ prop.idx ];
17053
17054			if ( vtype === "undefined" ) {
17055				return cur;
17056			}
17057
17058			if ( vtype === "function" ) {
17059				value = value.call( this, cur );
17060				vtype = getType( value );
17061			}
17062			if ( value == null && prop.empty ) {
17063				return this;
17064			}
17065			if ( vtype === "string" ) {
17066				match = rplusequals.exec( value );
17067				if ( match ) {
17068					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
17069				}
17070			}
17071			local[ prop.idx ] = value;
17072			return this[ fn ]( local );
17073		};
17074	} );
17075} );
17076
17077// add cssHook and .fx.step function for each named hook.
17078// accept a space separated string of properties
17079color.hook = function( hook ) {
17080	var hooks = hook.split( " " );
17081	each( hooks, function( _i, hook ) {
17082		jQuery.cssHooks[ hook ] = {
17083			set: function( elem, value ) {
17084				var parsed, curElem,
17085					backgroundColor = "";
17086
17087				if ( value !== "transparent" && ( getType( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
17088					value = color( parsed || value );
17089					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
17090						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
17091						while (
17092							( backgroundColor === "" || backgroundColor === "transparent" ) &&
17093							curElem && curElem.style
17094						) {
17095							try {
17096								backgroundColor = jQuery.css( curElem, "backgroundColor" );
17097								curElem = curElem.parentNode;
17098							} catch ( e ) {
17099							}
17100						}
17101
17102						value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
17103							backgroundColor :
17104							"_default" );
17105					}
17106
17107					value = value.toRgbaString();
17108				}
17109				try {
17110					elem.style[ hook ] = value;
17111				} catch ( e ) {
17112
17113					// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
17114				}
17115			}
17116		};
17117		jQuery.fx.step[ hook ] = function( fx ) {
17118			if ( !fx.colorInit ) {
17119				fx.start = color( fx.elem, hook );
17120				fx.end = color( fx.end );
17121				fx.colorInit = true;
17122			}
17123			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
17124		};
17125	} );
17126
17127};
17128
17129color.hook( stepHooks );
17130
17131jQuery.cssHooks.borderColor = {
17132	expand: function( value ) {
17133		var expanded = {};
17134
17135		each( [ "Top", "Right", "Bottom", "Left" ], function( _i, part ) {
17136			expanded[ "border" + part + "Color" ] = value;
17137		} );
17138		return expanded;
17139	}
17140};
17141
17142// Basic color names only.
17143// Usage of any of the other color names requires adding yourself or including
17144// jquery.color.svg-names.js.
17145colors = jQuery.Color.names = {
17146
17147	// 4.1. Basic color keywords
17148	aqua: "#00ffff",
17149	black: "#000000",
17150	blue: "#0000ff",
17151	fuchsia: "#ff00ff",
17152	gray: "#808080",
17153	green: "#008000",
17154	lime: "#00ff00",
17155	maroon: "#800000",
17156	navy: "#000080",
17157	olive: "#808000",
17158	purple: "#800080",
17159	red: "#ff0000",
17160	silver: "#c0c0c0",
17161	teal: "#008080",
17162	white: "#ffffff",
17163	yellow: "#ffff00",
17164
17165	// 4.2.3. "transparent" color keyword
17166	transparent: [ null, null, null, 0 ],
17167
17168	_default: "#ffffff"
17169};
17170
17171
17172/*!
17173 * jQuery UI Effects 1.13.
171732
17174 * http://jqueryui.com
17175 *
17176 * Copyright jQuery Foundation and other contributors
17177 * Released under the MIT license.
17178 * http://jquery.org/license
17179 */
17180
17181//>>label: Effects Core
17182//>>group: Effects
17183/* eslint-disable max-len */
17184//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
17185/* eslint-enable max-len */
17186//>>docs: http://api.jqueryui.com/category/effects-core/
17187//>>demos: http
vendor: 9,484 bytes, lines 17187-17557
17187://jqueryui.com/effect/
17188
17189
17190var dataSpace = "ui-effects-",
17191	dataSpaceStyle = "ui-effects-style",
17192	dataSpaceAnimated = "ui-effects-animated";
17193
17194$.effects = {
17195	effect: {}
17196};
17197
17198/******************************************************************************/
17199/****************************** CLASS ANIMATIONS ******************************/
17200/******************************************************************************/
17201( function() {
17202
17203var classAnimationActions = [ "add", "remove", "toggle" ],
17204	shorthandStyles = {
17205		border: 1,
17206		borderBottom: 1,
17207		borderColor: 1,
17208		borderLeft: 1,
17209		borderRight: 1,
17210		borderTop: 1,
17211		borderWidth: 1,
17212		margin: 1,
17213		padding: 1
17214	};
17215
17216$.each(
17217	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
17218	function( _, prop ) {
17219		$.fx.step[ prop ] = function( fx ) {
17220			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
17221				jQuery.style( fx.elem, prop, fx.end );
17222				fx.setAttr = true;
17223			}
17224		};
17225	}
17226);
17227
17228function camelCase( string ) {
17229	return string.replace( /-([\da-z])/gi, function( all, letter ) {
17230		return letter.toUpperCase();
17231	} );
17232}
17233
17234function getElementStyles( elem ) {
17235	var key, len,
17236		style = elem.ownerDocument.defaultView ?
17237			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
17238			elem.currentStyle,
17239		styles = {};
17240
17241	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
17242		len = style.length;
17243		while ( len-- ) {
17244			key = style[ len ];
17245			if ( typeof style[ key ] === "string" ) {
17246				styles[ camelCase( key ) ] = style[ key ];
17247			}
17248		}
17249
17250	// Support: Opera, IE <9
17251	} else {
17252		for ( key in style ) {
17253			if ( typeof style[ key ] === "string" ) {
17254				styles[ key ] = style[ key ];
17255			}
17256		}
17257	}
17258
17259	return styles;
17260}
17261
17262function styleDifference( oldStyle, newStyle ) {
17263	var diff = {},
17264		name, value;
17265
17266	for ( name in newStyle ) {
17267		value = newStyle[ name ];
17268		if ( oldStyle[ name ] !== value ) {
17269			if ( !shorthandStyles[ name ] ) {
17270				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
17271					diff[ name ] = value;
17272				}
17273			}
17274		}
17275	}
17276
17277	return diff;
17278}
17279
17280// Support: jQuery <1.8
17281if ( !$.fn.addBack ) {
17282	$.fn.addBack = function( selector ) {
17283		return this.add( selector == null ?
17284			this.prevObject : this.prevObject.filter( selector )
17285		);
17286	};
17287}
17288
17289$.effects.animateClass = function( value, duration, easing, callback ) {
17290	var o = $.speed( duration, easing, callback );
17291
17292	return this.queue( function() {
17293		var animated = $( this ),
17294			baseClass = animated.attr( "class" ) || "",
17295			applyClassChange,
17296			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
17297
17298		// Map the animated objects to store the original styles.
17299		allAnimations = allAnimations.map( function() {
17300			var el = $( this );
17301			return {
17302				el: el,
17303				start: getElementStyles( this )
17304			};
17305		} );
17306
17307		// Apply class change
17308		applyClassChange = function() {
17309			$.each( classAnimationActions, function( i, action ) {
17310				if ( value[ action ] ) {
17311					animated[ action + "Class" ]( value[ action ] );
17312				}
17313			} );
17314		};
17315		applyClassChange();
17316
17317		// Map all animated objects again - calculate new styles and diff
17318		allAnimations = allAnimations.map( function() {
17319			this.end = getElementStyles( this.el[ 0 ] );
17320			this.diff = styleDifference( this.start, this.end );
17321			return this;
17322		} );
17323
17324		// Apply original class
17325		animated.attr( "class", baseClass );
17326
17327		// Map all animated objects again - this time collecting a promise
17328		allAnimations = allAnimations.map( function() {
17329			var styleInfo = this,
17330				dfd = $.Deferred(),
17331				opts = $.extend( {}, o, {
17332					queue: false,
17333					complete: function() {
17334						dfd.resolve( styleInfo );
17335					}
17336				} );
17337
17338			this.el.animate( this.diff, opts );
17339			return dfd.promise();
17340		} );
17341
17342		// Once all animations have completed:
17343		$.when.apply( $, allAnimations.get() ).done( function() {
17344
17345			// Set the final class
17346			applyClassChange();
17347
17348			// For each animated element,
17349			// clear all css properties that were animated
17350			$.each( arguments, function() {
17351				var el = this.el;
17352				$.each( this.diff, function( key ) {
17353					el.css( key, "" );
17354				} );
17355			} );
17356
17357			// This is guarnteed to be there if you use jQuery.speed()
17358			// it also handles dequeuing the next anim...
17359			o.complete.call( animated[ 0 ] );
17360		} );
17361	} );
17362};
17363
17364$.fn.extend( {
17365	addClass: ( function( orig ) {
17366		return function( classNames, speed, easing, callback ) {
17367			return speed ?
17368				$.effects.animateClass.call( this,
17369					{ add: classNames }, speed, easing, callback ) :
17370				orig.apply( this, arguments );
17371		};
17372	} )( $.fn.addClass ),
17373
17374	removeClass: ( function( orig ) {
17375		return function( classNames, speed, easing, callback ) {
17376			return arguments.length > 1 ?
17377				$.effects.animateClass.call( this,
17378					{ remove: classNames }, speed, easing, callback ) :
17379				orig.apply( this, arguments );
17380		};
17381	} )( $.fn.removeClass ),
17382
17383	toggleClass: ( function( orig ) {
17384		return function( classNames, force, speed, easing, callback ) {
17385			if ( typeof force === "boolean" || force === undefined ) {
17386				if ( !speed ) {
17387
17388					// Without speed parameter
17389					return orig.apply( this, arguments );
17390				} else {
17391					return $.effects.animateClass.call( this,
17392						( force ? { add: classNames } : { remove: classNames } ),
17393						speed, easing, callback );
17394				}
17395			} else {
17396
17397				// Without force parameter
17398				return $.effects.animateClass.call( this,
17399					{ toggle: classNames }, force, speed, easing );
17400			}
17401		};
17402	} )( $.fn.toggleClass ),
17403
17404	switchClass: function( remove, add, speed, easing, callback ) {
17405		return $.effects.animateClass.call( this, {
17406			add: add,
17407			remove: remove
17408		}, speed, easing, callback );
17409	}
17410} );
17411
17412} )();
17413
17414/******************************************************************************/
17415/*********************************** EFFECTS **********************************/
17416/******************************************************************************/
17417
17418( function() {
17419
17420if ( $.expr && $.expr.pseudos && $.expr.pseudos.animated ) {
17421	$.expr.pseudos.animated = ( function( orig ) {
17422		return function( elem ) {
17423			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
17424		};
17425	} )( $.expr.pseudos.animated );
17426}
17427
17428if ( $.uiBackCompat !== false ) {
17429	$.extend( $.effects, {
17430
17431		// Saves a set of properties in a data storage
17432		save: function( element, set ) {
17433			var i = 0, length = set.length;
17434			for ( ; i < length; i++ ) {
17435				if ( set[ i ] !== null ) {
17436					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
17437				}
17438			}
17439		},
17440
17441		// Restores a set of previously saved properties from a data storage
17442		restore: function( element, set ) {
17443			var val, i = 0, length = set.length;
17444			for ( ; i < length; i++ ) {
17445				if ( set[ i ] !== null ) {
17446					val = element.data( dataSpace + set[ i ] );
17447					element.css( set[ i ], val );
17448				}
17449			}
17450		},
17451
17452		setMode: function( el, mode ) {
17453			if ( mode === "toggle" ) {
17454				mode = el.is( ":hidden" ) ? "show" : "hide";
17455			}
17456			return mode;
17457		},
17458
17459		// Wraps the element around a wrapper that copies position properties
17460		createWrapper: function( element ) {
17461
17462			// If the element is already wrapped, return it
17463			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
17464				return element.parent();
17465			}
17466
17467			// Wrap the element
17468			var props = {
17469					width: element.outerWidth( true ),
17470					height: element.outerHeight( true ),
17471					"float": element.css( "float" )
17472				},
17473				wrapper = $( "<div></div>" )
17474					.addClass( "ui-effects-wrapper" )
17475					.css( {
17476						fontSize: "100%",
17477						background: "transparent",
17478						border: "none",
17479						margin: 0,
17480						padding: 0
17481					} ),
17482
17483				// Store the size in case width/height are defined in % - Fixes #5245
17484				size = {
17485					width: element.width(),
17486					height: element.height()
17487				},
17488				active = document.activeElement;
17489
17490			// Support: Firefox
17491			// Firefox incorrectly exposes anonymous content
17492			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
17493			try {
17494				// eslint-disable-next-line no-unused-expressions
17495				active.id;
17496			} catch ( e ) {
17497				active = document.body;
17498			}
17499
17500			element.wrap( wrapper );
17501
17502			// Fixes #7595 - Elements lose focus when wrapped.
17503			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
17504				$( active ).trigger( "focus" );
17505			}
17506
17507			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
17508			// lose the reference to the wrapped element
17509			wrapper = element.parent();
17510
17511			// Transfer positioning properties to the wrapper
17512			if ( element.css( "position" ) === "static" ) {
17513				wrapper.css( { position: "relative" } );
17514				element.css( { position: "relative" } );
17515			} else {
17516				$.extend( props, {
17517					position: element.css( "position" ),
17518					zIndex: element.css( "z-index" )
17519				} );
17520				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
17521					props[ pos ] = element.css( pos );
17522					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
17523						props[ pos ] = "auto";
17524					}
17525				} );
17526				element.css( {
17527					position: "relative",
17528					top: 0,
17529					left: 0,
17530					right: "auto",
17531					bottom: "auto"
17532				} );
17533			}
17534			element.css( size );
17535
17536			return wrapper.css( props ).show();
17537		},
17538
17539		removeWrapper: function( element ) {
17540			var active = document.activeElement;
17541
17542			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
17543				element.parent().replaceWith( element );
17544
17545				// Fixes #7595 - Elements lose focus when wrapped.
17546				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
17547					$( active ).trigger( "focus" );
17548				}
17549			}
17550
17551			return element;
17552		}
17553	} );
17554}
17555
17556$.extend( $.effects, {
17557	version: "1.13.
vendor: 2,055 bytes, lines 17557-17652
175572",
17558
17559	define: function( name, mode, effect ) {
17560		if ( !effect ) {
17561			effect = mode;
17562			mode = "effect";
17563		}
17564
17565		$.effects.effect[ name ] = effect;
17566		$.effects.effect[ name ].mode = mode;
17567
17568		return effect;
17569	},
17570
17571	scaledDimensions: function( element, percent, direction ) {
17572		if ( percent === 0 ) {
17573			return {
17574				height: 0,
17575				width: 0,
17576				outerHeight: 0,
17577				outerWidth: 0
17578			};
17579		}
17580
17581		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
17582			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
17583
17584		return {
17585			height: element.height() * y,
17586			width: element.width() * x,
17587			outerHeight: element.outerHeight() * y,
17588			outerWidth: element.outerWidth() * x
17589		};
17590
17591	},
17592
17593	clipToBox: function( animation ) {
17594		return {
17595			width: animation.clip.right - animation.clip.left,
17596			height: animation.clip.bottom - animation.clip.top,
17597			left: animation.clip.left,
17598			top: animation.clip.top
17599		};
17600	},
17601
17602	// Injects recently queued functions to be first in line (after "inprogress")
17603	unshift: function( element, queueLength, count ) {
17604		var queue = element.queue();
17605
17606		if ( queueLength > 1 ) {
17607			queue.splice.apply( queue,
17608				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
17609		}
17610		element.dequeue();
17611	},
17612
17613	saveStyle: function( element ) {
17614		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
17615	},
17616
17617	restoreStyle: function( element ) {
17618		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
17619		element.removeData( dataSpaceStyle );
17620	},
17621
17622	mode: function( element, mode ) {
17623		var hidden = element.is( ":hidden" );
17624
17625		if ( mode === "toggle" ) {
17626			mode = hidden ? "show" : "hide";
17627		}
17628		if ( hidden ? mode === "hide" : mode === "show" ) {
17629			mode = "none";
17630		}
17631		return mode;
17632	},
17633
17634	// Translates a [top,left] array into a baseline value
17635	getBaseline: function( origin, original ) {
17636		var y, x;
17637
17638		switch ( origin[ 0 ] ) {
17639		case "top":
17640			y = 0;
17641			break;
17642		case "middle":
17643			y = 0.5;
17644			break;
17645		case "bottom":
17646			y = 1;
17647			break;
17648		default:
17649			y = origin[ 0 ] / original.height;
17650		}
17651
17652		switch ( origin[ 1 ] ) {
17653		case "left":
17654			x = 0;
17655			break;
17656		case "center":
17657			x = 0.5;
17658			break;
17659		case "right":
17660			x = 1;
17661			break;
17662		default:
17663			x = origin[ 1 ] / original.width;
17664		}
17665
17666		return {
17667			x: x,
17668			y: y
17669		};
17670	},
17671
17672	// Creates a placeholder element so that the original element can be made absolute
17673	createPlaceholder: function( element ) {
17674		var placeholder,
17675			cssPosition = element.css( "position" ),
17676			position = element.position();
17677
17678		// Lock in margins first to account for form elements, which
17679		// will change margin if you explicitly set height
17680		// see: http
vendor: 10,558 bytes, lines 17680-18074
17680://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
17681		// Support: Safari
17682		element.css( {
17683			marginTop: element.css( "marginTop" ),
17684			marginBottom: element.css( "marginBottom" ),
17685			marginLeft: element.css( "marginLeft" ),
17686			marginRight: element.css( "marginRight" )
17687		} )
17688		.outerWidth( element.outerWidth() )
17689		.outerHeight( element.outerHeight() );
17690
17691		if ( /^(static|relative)/.test( cssPosition ) ) {
17692			cssPosition = "absolute";
17693
17694			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
17695
17696				// Convert inline to inline block to account for inline elements
17697				// that turn to inline block based on content (like img)
17698				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
17699					"inline-block" :
17700					"block",
17701				visibility: "hidden",
17702
17703				// Margins need to be set to account for margin collapse
17704				marginTop: element.css( "marginTop" ),
17705				marginBottom: element.css( "marginBottom" ),
17706				marginLeft: element.css( "marginLeft" ),
17707				marginRight: element.css( "marginRight" ),
17708				"float": element.css( "float" )
17709			} )
17710			.outerWidth( element.outerWidth() )
17711			.outerHeight( element.outerHeight() )
17712			.addClass( "ui-effects-placeholder" );
17713
17714			element.data( dataSpace + "placeholder", placeholder );
17715		}
17716
17717		element.css( {
17718			position: cssPosition,
17719			left: position.left,
17720			top: position.top
17721		} );
17722
17723		return placeholder;
17724	},
17725
17726	removePlaceholder: function( element ) {
17727		var dataKey = dataSpace + "placeholder",
17728				placeholder = element.data( dataKey );
17729
17730		if ( placeholder ) {
17731			placeholder.remove();
17732			element.removeData( dataKey );
17733		}
17734	},
17735
17736	// Removes a placeholder if it exists and restores
17737	// properties that were modified during placeholder creation
17738	cleanUp: function( element ) {
17739		$.effects.restoreStyle( element );
17740		$.effects.removePlaceholder( element );
17741	},
17742
17743	setTransition: function( element, list, factor, value ) {
17744		value = value || {};
17745		$.each( list, function( i, x ) {
17746			var unit = element.cssUnit( x );
17747			if ( unit[ 0 ] > 0 ) {
17748				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
17749			}
17750		} );
17751		return value;
17752	}
17753} );
17754
17755// Return an effect options object for the given parameters:
17756function _normalizeArguments( effect, options, speed, callback ) {
17757
17758	// Allow passing all options as the first parameter
17759	if ( $.isPlainObject( effect ) ) {
17760		options = effect;
17761		effect = effect.effect;
17762	}
17763
17764	// Convert to an object
17765	effect = { effect: effect };
17766
17767	// Catch (effect, null, ...)
17768	if ( options == null ) {
17769		options = {};
17770	}
17771
17772	// Catch (effect, callback)
17773	if ( typeof options === "function" ) {
17774		callback = options;
17775		speed = null;
17776		options = {};
17777	}
17778
17779	// Catch (effect, speed, ?)
17780	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
17781		callback = speed;
17782		speed = options;
17783		options = {};
17784	}
17785
17786	// Catch (effect, options, callback)
17787	if ( typeof speed === "function" ) {
17788		callback = speed;
17789		speed = null;
17790	}
17791
17792	// Add options to effect
17793	if ( options ) {
17794		$.extend( effect, options );
17795	}
17796
17797	speed = speed || options.duration;
17798	effect.duration = $.fx.off ? 0 :
17799		typeof speed === "number" ? speed :
17800		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
17801		$.fx.speeds._default;
17802
17803	effect.complete = callback || options.complete;
17804
17805	return effect;
17806}
17807
17808function standardAnimationOption( option ) {
17809
17810	// Valid standard speeds (nothing, number, named speed)
17811	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
17812		return true;
17813	}
17814
17815	// Invalid strings - treat as "normal" speed
17816	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
17817		return true;
17818	}
17819
17820	// Complete callback
17821	if ( typeof option === "function" ) {
17822		return true;
17823	}
17824
17825	// Options hash (but not naming an effect)
17826	if ( typeof option === "object" && !option.effect ) {
17827		return true;
17828	}
17829
17830	// Didn't match any standard API
17831	return false;
17832}
17833
17834$.fn.extend( {
17835	effect: function( /* effect, options, speed, callback */ ) {
17836		var args = _normalizeArguments.apply( this, arguments ),
17837			effectMethod = $.effects.effect[ args.effect ],
17838			defaultMode = effectMethod.mode,
17839			queue = args.queue,
17840			queueName = queue || "fx",
17841			complete = args.complete,
17842			mode = args.mode,
17843			modes = [],
17844			prefilter = function( next ) {
17845				var el = $( this ),
17846					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
17847
17848				// Sentinel for duck-punching the :animated pseudo-selector
17849				el.data( dataSpaceAnimated, true );
17850
17851				// Save effect mode for later use,
17852				// we can't just call $.effects.mode again later,
17853				// as the .show() below destroys the initial state
17854				modes.push( normalizedMode );
17855
17856				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.14
17857				if ( defaultMode && ( normalizedMode === "show" ||
17858						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
17859					el.show();
17860				}
17861
17862				if ( !defaultMode || normalizedMode !== "none" ) {
17863					$.effects.saveStyle( el );
17864				}
17865
17866				if ( typeof next === "function" ) {
17867					next();
17868				}
17869			};
17870
17871		if ( $.fx.off || !effectMethod ) {
17872
17873			// Delegate to the original method (e.g., .show()) if possible
17874			if ( mode ) {
17875				return this[ mode ]( args.duration, complete );
17876			} else {
17877				return this.each( function() {
17878					if ( complete ) {
17879						complete.call( this );
17880					}
17881				} );
17882			}
17883		}
17884
17885		function run( next ) {
17886			var elem = $( this );
17887
17888			function cleanup() {
17889				elem.removeData( dataSpaceAnimated );
17890
17891				$.effects.cleanUp( elem );
17892
17893				if ( args.mode === "hide" ) {
17894					elem.hide();
17895				}
17896
17897				done();
17898			}
17899
17900			function done() {
17901				if ( typeof complete === "function" ) {
17902					complete.call( elem[ 0 ] );
17903				}
17904
17905				if ( typeof next === "function" ) {
17906					next();
17907				}
17908			}
17909
17910			// Override mode option on a per element basis,
17911			// as toggle can be either show or hide depending on element state
17912			args.mode = modes.shift();
17913
17914			if ( $.uiBackCompat !== false && !defaultMode ) {
17915				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
17916
17917					// Call the core method to track "olddisplay" properly
17918					elem[ mode ]();
17919					done();
17920				} else {
17921					effectMethod.call( elem[ 0 ], args, done );
17922				}
17923			} else {
17924				if ( args.mode === "none" ) {
17925
17926					// Call the core method to track "olddisplay" properly
17927					elem[ mode ]();
17928					done();
17929				} else {
17930					effectMethod.call( elem[ 0 ], args, cleanup );
17931				}
17932			}
17933		}
17934
17935		// Run prefilter on all elements first to ensure that
17936		// any showing or hiding happens before placeholder creation,
17937		// which ensures that any layout changes are correctly captured.
17938		return queue === false ?
17939			this.each( prefilter ).each( run ) :
17940			this.queue( queueName, prefilter ).queue( queueName, run );
17941	},
17942
17943	show: ( function( orig ) {
17944		return function( option ) {
17945			if ( standardAnimationOption( option ) ) {
17946				return orig.apply( this, arguments );
17947			} else {
17948				var args = _normalizeArguments.apply( this, arguments );
17949				args.mode = "show";
17950				return this.effect.call( this, args );
17951			}
17952		};
17953	} )( $.fn.show ),
17954
17955	hide: ( function( orig ) {
17956		return function( option ) {
17957			if ( standardAnimationOption( option ) ) {
17958				return orig.apply( this, arguments );
17959			} else {
17960				var args = _normalizeArguments.apply( this, arguments );
17961				args.mode = "hide";
17962				return this.effect.call( this, args );
17963			}
17964		};
17965	} )( $.fn.hide ),
17966
17967	toggle: ( function( orig ) {
17968		return function( option ) {
17969			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
17970				return orig.apply( this, arguments );
17971			} else {
17972				var args = _normalizeArguments.apply( this, arguments );
17973				args.mode = "toggle";
17974				return this.effect.call( this, args );
17975			}
17976		};
17977	} )( $.fn.toggle ),
17978
17979	cssUnit: function( key ) {
17980		var style = this.css( key ),
17981			val = [];
17982
17983		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
17984			if ( style.indexOf( unit ) > 0 ) {
17985				val = [ parseFloat( style ), unit ];
17986			}
17987		} );
17988		return val;
17989	},
17990
17991	cssClip: function( clipObj ) {
17992		if ( clipObj ) {
17993			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
17994				clipObj.bottom + "px " + clipObj.left + "px)" );
17995		}
17996		return parseClip( this.css( "clip" ), this );
17997	},
17998
17999	transfer: function( options, done ) {
18000		var element = $( this ),
18001			target = $( options.to ),
18002			targetFixed = target.css( "position" ) === "fixed",
18003			body = $( "body" ),
18004			fixTop = targetFixed ? body.scrollTop() : 0,
18005			fixLeft = targetFixed ? body.scrollLeft() : 0,
18006			endPosition = target.offset(),
18007			animation = {
18008				top: endPosition.top - fixTop,
18009				left: endPosition.left - fixLeft,
18010				height: target.innerHeight(),
18011				width: target.innerWidth()
18012			},
18013			startPosition = element.offset(),
18014			transfer = $( "<div class='ui-effects-transfer'></div>" );
18015
18016		transfer
18017			.appendTo( "body" )
18018			.addClass( options.className )
18019			.css( {
18020				top: startPosition.top - fixTop,
18021				left: startPosition.left - fixLeft,
18022				height: element.innerHeight(),
18023				width: element.innerWidth(),
18024				position: targetFixed ? "fixed" : "absolute"
18025			} )
18026			.animate( animation, options.duration, options.easing, function() {
18027				transfer.remove();
18028				if ( typeof done === "function" ) {
18029					done();
18030				}
18031			} );
18032	}
18033} );
18034
18035function parseClip( str, element ) {
18036		var outerWidth = element.outerWidth(),
18037			outerHeight = element.outerHeight(),
18038			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
18039			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
18040
18041		return {
18042			top: parseFloat( values[ 1 ] ) || 0,
18043			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
18044			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
18045			left: parseFloat( values[ 4 ] ) || 0
18046		};
18047}
18048
18049$.fx.step.clip = function( fx ) {
18050	if ( !fx.clipInit ) {
18051		fx.start = $( fx.elem ).cssClip();
18052		if ( typeof fx.end === "string" ) {
18053			fx.end = parseClip( fx.end, fx.elem );
18054		}
18055		fx.clipInit = true;
18056	}
18057
18058	$( fx.elem ).cssClip( {
18059		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
18060		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
18061		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
18062		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
18063	} );
18064};
18065
18066} )();
18067
18068/******************************************************************************/
18069/*********************************** EASING ***********************************/
18070/******************************************************************************/
18071
18072( function() {
18073
18074// Based on easing equations from Robert Penner (http://
vendor: 24,998 bytes, lines 18074-19029
18074www.robertpenner.com/easing)
18075
18076var baseEasings = {};
18077
18078$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
18079	baseEasings[ name ] = function( p ) {
18080		return Math.pow( p, i + 2 );
18081	};
18082} );
18083
18084$.extend( baseEasings, {
18085	Sine: function( p ) {
18086		return 1 - Math.cos( p * Math.PI / 2 );
18087	},
18088	Circ: function( p ) {
18089		return 1 - Math.sqrt( 1 - p * p );
18090	},
18091	Elastic: function( p ) {
18092		return p === 0 || p === 1 ? p :
18093			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
18094	},
18095	Back: function( p ) {
18096		return p * p * ( 3 * p - 2 );
18097	},
18098	Bounce: function( p ) {
18099		var pow2,
18100			bounce = 4;
18101
18102		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
18103		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
18104	}
18105} );
18106
18107$.each( baseEasings, function( name, easeIn ) {
18108	$.easing[ "easeIn" + name ] = easeIn;
18109	$.easing[ "easeOut" + name ] = function( p ) {
18110		return 1 - easeIn( 1 - p );
18111	};
18112	$.easing[ "easeInOut" + name ] = function( p ) {
18113		return p < 0.5 ?
18114			easeIn( p * 2 ) / 2 :
18115			1 - easeIn( p * -2 + 2 ) / 2;
18116	};
18117} );
18118
18119} )();
18120
18121var effect = $.effects;
18122
18123
18124/*!
18125 * jQuery UI Effects Blind 1.13.2
18126 * http://jqueryui.com
18127 *
18128 * Copyright jQuery Foundation and other contributors
18129 * Released under the MIT license.
18130 * http://jquery.org/license
18131 */
18132
18133//>>label: Blind Effect
18134//>>group: Effects
18135//>>description: Blinds the element.
18136//>>docs: http://api.jqueryui.com/blind-effect/
18137//>>demos: http://jqueryui.com/effect/
18138
18139
18140var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) {
18141	var map = {
18142			up: [ "bottom", "top" ],
18143			vertical: [ "bottom", "top" ],
18144			down: [ "top", "bottom" ],
18145			left: [ "right", "left" ],
18146			horizontal: [ "right", "left" ],
18147			right: [ "left", "right" ]
18148		},
18149		element = $( this ),
18150		direction = options.direction || "up",
18151		start = element.cssClip(),
18152		animate = { clip: $.extend( {}, start ) },
18153		placeholder = $.effects.createPlaceholder( element );
18154
18155	animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
18156
18157	if ( options.mode === "show" ) {
18158		element.cssClip( animate.clip );
18159		if ( placeholder ) {
18160			placeholder.css( $.effects.clipToBox( animate ) );
18161		}
18162
18163		animate.clip = start;
18164	}
18165
18166	if ( placeholder ) {
18167		placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
18168	}
18169
18170	element.animate( animate, {
18171		queue: false,
18172		duration: options.duration,
18173		easing: options.easing,
18174		complete: done
18175	} );
18176} );
18177
18178
18179/*!
18180 * jQuery UI Effects Bounce 1.13.2
18181 * http://jqueryui.com
18182 *
18183 * Copyright jQuery Foundation and other contributors
18184 * Released under the MIT license.
18185 * http://jquery.org/license
18186 */
18187
18188//>>label: Bounce Effect
18189//>>group: Effects
18190//>>description: Bounces an element horizontally or vertically n times.
18191//>>docs: http://api.jqueryui.com/bounce-effect/
18192//>>demos: http://jqueryui.com/effect/
18193
18194
18195var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) {
18196	var upAnim, downAnim, refValue,
18197		element = $( this ),
18198
18199		// Defaults:
18200		mode = options.mode,
18201		hide = mode === "hide",
18202		show = mode === "show",
18203		direction = options.direction || "up",
18204		distance = options.distance,
18205		times = options.times || 5,
18206
18207		// Number of internal animations
18208		anims = times * 2 + ( show || hide ? 1 : 0 ),
18209		speed = options.duration / anims,
18210		easing = options.easing,
18211
18212		// Utility:
18213		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
18214		motion = ( direction === "up" || direction === "left" ),
18215		i = 0,
18216
18217		queuelen = element.queue().length;
18218
18219	$.effects.createPlaceholder( element );
18220
18221	refValue = element.css( ref );
18222
18223	// Default distance for the BIGGEST bounce is the outer Distance / 3
18224	if ( !distance ) {
18225		distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
18226	}
18227
18228	if ( show ) {
18229		downAnim = { opacity: 1 };
18230		downAnim[ ref ] = refValue;
18231
18232		// If we are showing, force opacity 0 and set the initial position
18233		// then do the "first" animation
18234		element
18235			.css( "opacity", 0 )
18236			.css( ref, motion ? -distance * 2 : distance * 2 )
18237			.animate( downAnim, speed, easing );
18238	}
18239
18240	// Start at the smallest distance if we are hiding
18241	if ( hide ) {
18242		distance = distance / Math.pow( 2, times - 1 );
18243	}
18244
18245	downAnim = {};
18246	downAnim[ ref ] = refValue;
18247
18248	// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
18249	for ( ; i < times; i++ ) {
18250		upAnim = {};
18251		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
18252
18253		element
18254			.animate( upAnim, speed, easing )
18255			.animate( downAnim, speed, easing );
18256
18257		distance = hide ? distance * 2 : distance / 2;
18258	}
18259
18260	// Last Bounce when Hiding
18261	if ( hide ) {
18262		upAnim = { opacity: 0 };
18263		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
18264
18265		element.animate( upAnim, speed, easing );
18266	}
18267
18268	element.queue( done );
18269
18270	$.effects.unshift( element, queuelen, anims + 1 );
18271} );
18272
18273
18274/*!
18275 * jQuery UI Effects Clip 1.13.2
18276 * http://jqueryui.com
18277 *
18278 * Copyright jQuery Foundation and other contributors
18279 * Released under the MIT license.
18280 * http://jquery.org/license
18281 */
18282
18283//>>label: Clip Effect
18284//>>group: Effects
18285//>>description: Clips the element on and off like an old TV.
18286//>>docs: http://api.jqueryui.com/clip-effect/
18287//>>demos: http://jqueryui.com/effect/
18288
18289
18290var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) {
18291	var start,
18292		animate = {},
18293		element = $( this ),
18294		direction = options.direction || "vertical",
18295		both = direction === "both",
18296		horizontal = both || direction === "horizontal",
18297		vertical = both || direction === "vertical";
18298
18299	start = element.cssClip();
18300	animate.clip = {
18301		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
18302		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
18303		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
18304		left: horizontal ? ( start.right - start.left ) / 2 : start.left
18305	};
18306
18307	$.effects.createPlaceholder( element );
18308
18309	if ( options.mode === "show" ) {
18310		element.cssClip( animate.clip );
18311		animate.clip = start;
18312	}
18313
18314	element.animate( animate, {
18315		queue: false,
18316		duration: options.duration,
18317		easing: options.easing,
18318		complete: done
18319	} );
18320
18321} );
18322
18323
18324/*!
18325 * jQuery UI Effects Drop 1.13.2
18326 * http://jqueryui.com
18327 *
18328 * Copyright jQuery Foundation and other contributors
18329 * Released under the MIT license.
18330 * http://jquery.org/license
18331 */
18332
18333//>>label: Drop Effect
18334//>>group: Effects
18335//>>description: Moves an element in one direction and hides it at the same time.
18336//>>docs: http://api.jqueryui.com/drop-effect/
18337//>>demos: http://jqueryui.com/effect/
18338
18339
18340var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) {
18341
18342	var distance,
18343		element = $( this ),
18344		mode = options.mode,
18345		show = mode === "show",
18346		direction = options.direction || "left",
18347		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
18348		motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
18349		oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
18350		animation = {
18351			opacity: 0
18352		};
18353
18354	$.effects.createPlaceholder( element );
18355
18356	distance = options.distance ||
18357		element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
18358
18359	animation[ ref ] = motion + distance;
18360
18361	if ( show ) {
18362		element.css( animation );
18363
18364		animation[ ref ] = oppositeMotion + distance;
18365		animation.opacity = 1;
18366	}
18367
18368	// Animate
18369	element.animate( animation, {
18370		queue: false,
18371		duration: options.duration,
18372		easing: options.easing,
18373		complete: done
18374	} );
18375} );
18376
18377
18378/*!
18379 * jQuery UI Effects Explode 1.13.2
18380 * http://jqueryui.com
18381 *
18382 * Copyright jQuery Foundation and other contributors
18383 * Released under the MIT license.
18384 * http://jquery.org/license
18385 */
18386
18387//>>label: Explode Effect
18388//>>group: Effects
18389/* eslint-disable max-len */
18390//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
18391/* eslint-enable max-len */
18392//>>docs: http://api.jqueryui.com/explode-effect/
18393//>>demos: http://jqueryui.com/effect/
18394
18395
18396var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) {
18397
18398	var i, j, left, top, mx, my,
18399		rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
18400		cells = rows,
18401		element = $( this ),
18402		mode = options.mode,
18403		show = mode === "show",
18404
18405		// Show and then visibility:hidden the element before calculating offset
18406		offset = element.show().css( "visibility", "hidden" ).offset(),
18407
18408		// Width and height of a piece
18409		width = Math.ceil( element.outerWidth() / cells ),
18410		height = Math.ceil( element.outerHeight() / rows ),
18411		pieces = [];
18412
18413	// Children animate complete:
18414	function childComplete() {
18415		pieces.push( this );
18416		if ( pieces.length === rows * cells ) {
18417			animComplete();
18418		}
18419	}
18420
18421	// Clone the element for each row and cell.
18422	for ( i = 0; i < rows; i++ ) { // ===>
18423		top = offset.top + i * height;
18424		my = i - ( rows - 1 ) / 2;
18425
18426		for ( j = 0; j < cells; j++ ) { // |||
18427			left = offset.left + j * width;
18428			mx = j - ( cells - 1 ) / 2;
18429
18430			// Create a clone of the now hidden main element that will be absolute positioned
18431			// within a wrapper div off the -left and -top equal to size of our pieces
18432			element
18433				.clone()
18434				.appendTo( "body" )
18435				.wrap( "<div></div>" )
18436				.css( {
18437					position: "absolute",
18438					visibility: "visible",
18439					left: -j * width,
18440					top: -i * height
18441				} )
18442
18443				// Select the wrapper - make it overflow: hidden and absolute positioned based on
18444				// where the original was located +left and +top equal to the size of pieces
18445				.parent()
18446					.addClass( "ui-effects-explode" )
18447					.css( {
18448						position: "absolute",
18449						overflow: "hidden",
18450						width: width,
18451						height: height,
18452						left: left + ( show ? mx * width : 0 ),
18453						top: top + ( show ? my * height : 0 ),
18454						opacity: show ? 0 : 1
18455					} )
18456					.animate( {
18457						left: left + ( show ? 0 : mx * width ),
18458						top: top + ( show ? 0 : my * height ),
18459						opacity: show ? 1 : 0
18460					}, options.duration || 500, options.easing, childComplete );
18461		}
18462	}
18463
18464	function animComplete() {
18465		element.css( {
18466			visibility: "visible"
18467		} );
18468		$( pieces ).remove();
18469		done();
18470	}
18471} );
18472
18473
18474/*!
18475 * jQuery UI Effects Fade 1.13.2
18476 * http://jqueryui.com
18477 *
18478 * Copyright jQuery Foundation and other contributors
18479 * Released under the MIT license.
18480 * http://jquery.org/license
18481 */
18482
18483//>>label: Fade Effect
18484//>>group: Effects
18485//>>description: Fades the element.
18486//>>docs: http://api.jqueryui.com/fade-effect/
18487//>>demos: http://jqueryui.com/effect/
18488
18489
18490var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) {
18491	var show = options.mode === "show";
18492
18493	$( this )
18494		.css( "opacity", show ? 0 : 1 )
18495		.animate( {
18496			opacity: show ? 1 : 0
18497		}, {
18498			queue: false,
18499			duration: options.duration,
18500			easing: options.easing,
18501			complete: done
18502		} );
18503} );
18504
18505
18506/*!
18507 * jQuery UI Effects Fold 1.13.2
18508 * http://jqueryui.com
18509 *
18510 * Copyright jQuery Foundation and other contributors
18511 * Released under the MIT license.
18512 * http://jquery.org/license
18513 */
18514
18515//>>label: Fold Effect
18516//>>group: Effects
18517//>>description: Folds an element first horizontally and then vertically.
18518//>>docs: http://api.jqueryui.com/fold-effect/
18519//>>demos: http://jqueryui.com/effect/
18520
18521
18522var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) {
18523
18524	// Create element
18525	var element = $( this ),
18526		mode = options.mode,
18527		show = mode === "show",
18528		hide = mode === "hide",
18529		size = options.size || 15,
18530		percent = /([0-9]+)%/.exec( size ),
18531		horizFirst = !!options.horizFirst,
18532		ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
18533		duration = options.duration / 2,
18534
18535		placeholder = $.effects.createPlaceholder( element ),
18536
18537		start = element.cssClip(),
18538		animation1 = { clip: $.extend( {}, start ) },
18539		animation2 = { clip: $.extend( {}, start ) },
18540
18541		distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
18542
18543		queuelen = element.queue().length;
18544
18545	if ( percent ) {
18546		size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
18547	}
18548	animation1.clip[ ref[ 0 ] ] = size;
18549	animation2.clip[ ref[ 0 ] ] = size;
18550	animation2.clip[ ref[ 1 ] ] = 0;
18551
18552	if ( show ) {
18553		element.cssClip( animation2.clip );
18554		if ( placeholder ) {
18555			placeholder.css( $.effects.clipToBox( animation2 ) );
18556		}
18557
18558		animation2.clip = start;
18559	}
18560
18561	// Animate
18562	element
18563		.queue( function( next ) {
18564			if ( placeholder ) {
18565				placeholder
18566					.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
18567					.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
18568			}
18569
18570			next();
18571		} )
18572		.animate( animation1, duration, options.easing )
18573		.animate( animation2, duration, options.easing )
18574		.queue( done );
18575
18576	$.effects.unshift( element, queuelen, 4 );
18577} );
18578
18579
18580/*!
18581 * jQuery UI Effects Highlight 1.13.2
18582 * http://jqueryui.com
18583 *
18584 * Copyright jQuery Foundation and other contributors
18585 * Released under the MIT license.
18586 * http://jquery.org/license
18587 */
18588
18589//>>label: Highlight Effect
18590//>>group: Effects
18591//>>description: Highlights the background of an element in a defined color for a custom duration.
18592//>>docs: http://api.jqueryui.com/highlight-effect/
18593//>>demos: http://jqueryui.com/effect/
18594
18595
18596var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) {
18597	var element = $( this ),
18598		animation = {
18599			backgroundColor: element.css( "backgroundColor" )
18600		};
18601
18602	if ( options.mode === "hide" ) {
18603		animation.opacity = 0;
18604	}
18605
18606	$.effects.saveStyle( element );
18607
18608	element
18609		.css( {
18610			backgroundImage: "none",
18611			backgroundColor: options.color || "#ffff99"
18612		} )
18613		.animate( animation, {
18614			queue: false,
18615			duration: options.duration,
18616			easing: options.easing,
18617			complete: done
18618		} );
18619} );
18620
18621
18622/*!
18623 * jQuery UI Effects Size 1.13.2
18624 * http://jqueryui.com
18625 *
18626 * Copyright jQuery Foundation and other contributors
18627 * Released under the MIT license.
18628 * http://jquery.org/license
18629 */
18630
18631//>>label: Size Effect
18632//>>group: Effects
18633//>>description: Resize an element to a specified width and height.
18634//>>docs: http://api.jqueryui.com/size-effect/
18635//>>demos: http://jqueryui.com/effect/
18636
18637
18638var effectsEffectSize = $.effects.define( "size", function( options, done ) {
18639
18640	// Create element
18641	var baseline, factor, temp,
18642		element = $( this ),
18643
18644		// Copy for children
18645		cProps = [ "fontSize" ],
18646		vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
18647		hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
18648
18649		// Set options
18650		mode = options.mode,
18651		restore = mode !== "effect",
18652		scale = options.scale || "both",
18653		origin = options.origin || [ "middle", "center" ],
18654		position = element.css( "position" ),
18655		pos = element.position(),
18656		original = $.effects.scaledDimensions( element ),
18657		from = options.from || original,
18658		to = options.to || $.effects.scaledDimensions( element, 0 );
18659
18660	$.effects.createPlaceholder( element );
18661
18662	if ( mode === "show" ) {
18663		temp = from;
18664		from = to;
18665		to = temp;
18666	}
18667
18668	// Set scaling factor
18669	factor = {
18670		from: {
18671			y: from.height / original.height,
18672			x: from.width / original.width
18673		},
18674		to: {
18675			y: to.height / original.height,
18676			x: to.width / original.width
18677		}
18678	};
18679
18680	// Scale the css box
18681	if ( scale === "box" || scale === "both" ) {
18682
18683		// Vertical props scaling
18684		if ( factor.from.y !== factor.to.y ) {
18685			from = $.effects.setTransition( element, vProps, factor.from.y, from );
18686			to = $.effects.setTransition( element, vProps, factor.to.y, to );
18687		}
18688
18689		// Horizontal props scaling
18690		if ( factor.from.x !== factor.to.x ) {
18691			from = $.effects.setTransition( element, hProps, factor.from.x, from );
18692			to = $.effects.setTransition( element, hProps, factor.to.x, to );
18693		}
18694	}
18695
18696	// Scale the content
18697	if ( scale === "content" || scale === "both" ) {
18698
18699		// Vertical props scaling
18700		if ( factor.from.y !== factor.to.y ) {
18701			from = $.effects.setTransition( element, cProps, factor.from.y, from );
18702			to = $.effects.setTransition( element, cProps, factor.to.y, to );
18703		}
18704	}
18705
18706	// Adjust the position properties based on the provided origin points
18707	if ( origin ) {
18708		baseline = $.effects.getBaseline( origin, original );
18709		from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
18710		from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
18711		to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
18712		to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
18713	}
18714	delete from.outerHeight;
18715	delete from.outerWidth;
18716	element.css( from );
18717
18718	// Animate the children if desired
18719	if ( scale === "content" || scale === "both" ) {
18720
18721		vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
18722		hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
18723
18724		// Only animate children with width attributes specified
18725		// TODO: is this right? should we include anything with css width specified as well
18726		element.find( "*[width]" ).each( function() {
18727			var child = $( this ),
18728				childOriginal = $.effects.scaledDimensions( child ),
18729				childFrom = {
18730					height: childOriginal.height * factor.from.y,
18731					width: childOriginal.width * factor.from.x,
18732					outerHeight: childOriginal.outerHeight * factor.from.y,
18733					outerWidth: childOriginal.outerWidth * factor.from.x
18734				},
18735				childTo = {
18736					height: childOriginal.height * factor.to.y,
18737					width: childOriginal.width * factor.to.x,
18738					outerHeight: childOriginal.height * factor.to.y,
18739					outerWidth: childOriginal.width * factor.to.x
18740				};
18741
18742			// Vertical props scaling
18743			if ( factor.from.y !== factor.to.y ) {
18744				childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
18745				childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
18746			}
18747
18748			// Horizontal props scaling
18749			if ( factor.from.x !== factor.to.x ) {
18750				childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
18751				childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
18752			}
18753
18754			if ( restore ) {
18755				$.effects.saveStyle( child );
18756			}
18757
18758			// Animate children
18759			child.css( childFrom );
18760			child.animate( childTo, options.duration, options.easing, function() {
18761
18762				// Restore children
18763				if ( restore ) {
18764					$.effects.restoreStyle( child );
18765				}
18766			} );
18767		} );
18768	}
18769
18770	// Animate
18771	element.animate( to, {
18772		queue: false,
18773		duration: options.duration,
18774		easing: options.easing,
18775		complete: function() {
18776
18777			var offset = element.offset();
18778
18779			if ( to.opacity === 0 ) {
18780				element.css( "opacity", from.opacity );
18781			}
18782
18783			if ( !restore ) {
18784				element
18785					.css( "position", position === "static" ? "relative" : position )
18786					.offset( offset );
18787
18788				// Need to save style here so that automatic style restoration
18789				// doesn't restore to the original styles from before the animation.
18790				$.effects.saveStyle( element );
18791			}
18792
18793			done();
18794		}
18795	} );
18796
18797} );
18798
18799
18800/*!
18801 * jQuery UI Effects Scale 1.13.2
18802 * http://jqueryui.com
18803 *
18804 * Copyright jQuery Foundation and other contributors
18805 * Released under the MIT license.
18806 * http://jquery.org/license
18807 */
18808
18809//>>label: Scale Effect
18810//>>group: Effects
18811//>>description: Grows or shrinks an element and its content.
18812//>>docs: http://api.jqueryui.com/scale-effect/
18813//>>demos: http://jqueryui.com/effect/
18814
18815
18816var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
18817
18818	// Create element
18819	var el = $( this ),
18820		mode = options.mode,
18821		percent = parseInt( options.percent, 10 ) ||
18822			( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
18823
18824		newOptions = $.extend( true, {
18825			from: $.effects.scaledDimensions( el ),
18826			to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
18827			origin: options.origin || [ "middle", "center" ]
18828		}, options );
18829
18830	// Fade option to support puff
18831	if ( options.fade ) {
18832		newOptions.from.opacity = 1;
18833		newOptions.to.opacity = 0;
18834	}
18835
18836	$.effects.effect.size.call( this, newOptions, done );
18837} );
18838
18839
18840/*!
18841 * jQuery UI Effects Puff 1.13.2
18842 * http://jqueryui.com
18843 *
18844 * Copyright jQuery Foundation and other contributors
18845 * Released under the MIT license.
18846 * http://jquery.org/license
18847 */
18848
18849//>>label: Puff Effect
18850//>>group: Effects
18851//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
18852//>>docs: http://api.jqueryui.com/puff-effect/
18853//>>demos: http://jqueryui.com/effect/
18854
18855
18856var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) {
18857	var newOptions = $.extend( true, {}, options, {
18858		fade: true,
18859		percent: parseInt( options.percent, 10 ) || 150
18860	} );
18861
18862	$.effects.effect.scale.call( this, newOptions, done );
18863} );
18864
18865
18866/*!
18867 * jQuery UI Effects Pulsate 1.13.2
18868 * http://jqueryui.com
18869 *
18870 * Copyright jQuery Foundation and other contributors
18871 * Released under the MIT license.
18872 * http://jquery.org/license
18873 */
18874
18875//>>label: Pulsate Effect
18876//>>group: Effects
18877//>>description: Pulsates an element n times by changing the opacity to zero and back.
18878//>>docs: http://api.jqueryui.com/pulsate-effect/
18879//>>demos: http://jqueryui.com/effect/
18880
18881
18882var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) {
18883	var element = $( this ),
18884		mode = options.mode,
18885		show = mode === "show",
18886		hide = mode === "hide",
18887		showhide = show || hide,
18888
18889		// Showing or hiding leaves off the "last" animation
18890		anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
18891		duration = options.duration / anims,
18892		animateTo = 0,
18893		i = 1,
18894		queuelen = element.queue().length;
18895
18896	if ( show || !element.is( ":visible" ) ) {
18897		element.css( "opacity", 0 ).show();
18898		animateTo = 1;
18899	}
18900
18901	// Anims - 1 opacity "toggles"
18902	for ( ; i < anims; i++ ) {
18903		element.animate( { opacity: animateTo }, duration, options.easing );
18904		animateTo = 1 - animateTo;
18905	}
18906
18907	element.animate( { opacity: animateTo }, duration, options.easing );
18908
18909	element.queue( done );
18910
18911	$.effects.unshift( element, queuelen, anims + 1 );
18912} );
18913
18914
18915/*!
18916 * jQuery UI Effects Shake 1.13.2
18917 * http://jqueryui.com
18918 *
18919 * Copyright jQuery Foundation and other contributors
18920 * Released under the MIT license.
18921 * http://jquery.org/license
18922 */
18923
18924//>>label: Shake Effect
18925//>>group: Effects
18926//>>description: Shakes an element horizontally or vertically n times.
18927//>>docs: http://api.jqueryui.com/shake-effect/
18928//>>demos: http://jqueryui.com/effect/
18929
18930
18931var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
18932
18933	var i = 1,
18934		element = $( this ),
18935		direction = options.direction || "left",
18936		distance = options.distance || 20,
18937		times = options.times || 3,
18938		anims = times * 2 + 1,
18939		speed = Math.round( options.duration / anims ),
18940		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
18941		positiveMotion = ( direction === "up" || direction === "left" ),
18942		animation = {},
18943		animation1 = {},
18944		animation2 = {},
18945
18946		queuelen = element.queue().length;
18947
18948	$.effects.createPlaceholder( element );
18949
18950	// Animation
18951	animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
18952	animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
18953	animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
18954
18955	// Animate
18956	element.animate( animation, speed, options.easing );
18957
18958	// Shakes
18959	for ( ; i < times; i++ ) {
18960		element
18961			.animate( animation1, speed, options.easing )
18962			.animate( animation2, speed, options.easing );
18963	}
18964
18965	element
18966		.animate( animation1, speed, options.easing )
18967		.animate( animation, speed / 2, options.easing )
18968		.queue( done );
18969
18970	$.effects.unshift( element, queuelen, anims + 1 );
18971} );
18972
18973
18974/*!
18975 * jQuery UI Effects Slide 1.13.2
18976 * http://jqueryui.com
18977 *
18978 * Copyright jQuery Foundation and other contributors
18979 * Released under the MIT license.
18980 * http://jquery.org/license
18981 */
18982
18983//>>label: Slide Effect
18984//>>group: Effects
18985//>>description: Slides an element in and out of the viewport.
18986//>>docs: http://api.jqueryui.com/slide-effect/
18987//>>demos: http://jqueryui.com/effect/
18988
18989
18990var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) {
18991	var startClip, startRef,
18992		element = $( this ),
18993		map = {
18994			up: [ "bottom", "top" ],
18995			down: [ "top", "bottom" ],
18996			left: [ "right", "left" ],
18997			right: [ "left", "right" ]
18998		},
18999		mode = options.mode,
19000		direction = options.direction || "left",
19001		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
19002		positiveMotion = ( direction === "up" || direction === "left" ),
19003		distance = options.distance ||
19004			element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
19005		animation = {};
19006
19007	$.effects.createPlaceholder( element );
19008
19009	startClip = element.cssClip();
19010	startRef = element.position()[ ref ];
19011
19012	// Define hide animation
19013	animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
19014	animation.clip = element.cssClip();
19015	animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
19016
19017	// Reverse the animation if we're showing
19018	if ( mode === "show" ) {
19019		element.cssClip( animation.clip );
19020		element.css( ref, animation[ ref ] );
19021		animation.clip = startClip;
19022		animation[ ref ] = startRef;
19023	}
19024
19025	// Actually animate
19026	element.animate( animation, {
19027		queue: false,
19028		duration: options.duration,
19029		easing: options.easing,
19030		complete: done
19031	} );
19032} );
19033
19034
19035/*!
19036 * jQuery UI Effects Transfer 1.13.2
19037 * http://jqueryui.com
19038 *
19039 * Copyright jQuery Foundation and other contributors
19040 * Released under the MIT license.
19041 * http://jquery.org/license
19042 */
19043
19044//>>label: Transfer Effect
19045//>>group: Effects
19046//>>description: Displays a transfer effect from one element to another.
19047//>>docs: http://api.jqueryui.com/transfer-effect/
19048//>>demos: http://jqueryui.com/effect/
19049
19050
19051var effect;
19052if ( $.uiBackCompat !== false ) {
19053	effect = $.effects.define( "transfer", function( options, done ) {
19054		$( this ).transfer( options, done );
19055	} );
19056}
19057var effectsEffectTransfer = effect;
19058
19059
19060
19061
19062} );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.